rem stringlengths 1 53.3k | add stringlengths 0 80.5k | context stringlengths 6 326k | meta stringlengths 141 403 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
Class clazz; ClassLoader loader = getClass().getClassLoader(); if (loader != null) { clazz = ClassManager.loadClass(loader, name, resolve); if (clazz != null) return clazz; | Class clazz = findLoadedClass(name); if (clazz == null) { ClassLoader loader = getClass().getClassLoader(); if (loader != null) { clazz = ClassManager.loadClass(loader, name, resolve); if (clazz != null) return clazz; } clazz = findSystemClass(name); | public Class loadClass(String name, boolean resolve) throws ClassNotFoundException { Class clazz; ClassLoader loader = getClass().getClassLoader(); if (loader != null) { clazz = ClassManager.loadClass(loader, name, resolve); if (clazz != null) return clazz; } clazz = findLoadedClass(name); if (clazz == null) clazz = findSystemClass(name); if (resolve) resolveClass(clazz); return clazz; } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/f7417f7060c11be1359953bdaadcaebd072b36c6/DefiningClassLoader.java/clean/js/rhino/src/org/mozilla/classfile/DefiningClassLoader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1659,
16038,
12,
780,
508,
16,
1250,
2245,
13,
3639,
1216,
10403,
565,
288,
3639,
1659,
4003,
31,
3639,
9403,
4088,
273,
2900,
7675,
588,
7805,
5621,
3639,
309,
261,
6714,
480,
446,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1659,
16038,
12,
780,
508,
16,
1250,
2245,
13,
3639,
1216,
10403,
565,
288,
3639,
1659,
4003,
31,
3639,
9403,
4088,
273,
2900,
7675,
588,
7805,
5621,
3639,
309,
261,
6714,
480,
446,... |
} | attr = (AttrImpl) attr.m_next; } | public Attr createAttribute(String name) throws DOMException { // System.out.println("name: "+name); AttrImpl attrImpl; if(QName.isXMLNSDecl(name)) { attrImpl = new NameSpaceDecl(getDocumentImpl(), "http://www.w3.org/2000/xmlns/", name, ""); } else attrImpl = new AttrImpl(getDocumentImpl(), name, ""); boolean found = false; for (int i = 0; i < attrsEnd; i++) { AttrImpl attr = (AttrImpl)m_children[i]; if (attr.getNodeName().equals(name)) { m_children[i] = attrImpl; found = true; break; } } if (!found) { appendChild(attrImpl); attrsEnd++; } return (Attr)attrImpl; } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/0e2298c0c460e281c6e54e92ac95421ec5eca2e4/ElementImpl.java/clean/src/org/apache/xalan/stree/ElementImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
11289,
9079,
752,
1499,
12,
780,
508,
13,
565,
1216,
4703,
503,
225,
288,
565,
368,
2332,
18,
659,
18,
8222,
2932,
529,
30,
13773,
529,
1769,
565,
11289,
2828,
1604,
2828,
31,
565... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
11289,
9079,
752,
1499,
12,
780,
508,
13,
565,
1216,
4703,
503,
225,
288,
565,
368,
2332,
18,
659,
18,
8222,
2932,
529,
30,
13773,
529,
1769,
565,
11289,
2828,
1604,
2828,
31,
565... |
private LanguageIdentifier() { | public LanguageIdentifier(NutchConf nutchConf) { | private LanguageIdentifier() { // Gets ngram sizes to take into account from the Nutch Config minLength = NutchConf.get().getInt("lang.ngram.min.length", NGramProfile.DEFAULT_MIN_NGRAM_LENGTH); maxLength = NutchConf.get().getInt("lang.ngram.max.length", NGramProfile.DEFAULT_MAX_NGRAM_LENGTH); // Ensure the min and max values are in an acceptale range // (ie min >= DEFAULT_MIN_NGRAM_LENGTH and max <= DEFAULT_MAX_NGRAM_LENGTH) maxLength = Math.min(maxLength, NGramProfile.ABSOLUTE_MAX_NGRAM_LENGTH); maxLength = Math.max(maxLength, NGramProfile.ABSOLUTE_MIN_NGRAM_LENGTH); minLength = Math.max(minLength, NGramProfile.ABSOLUTE_MIN_NGRAM_LENGTH); minLength = Math.min(minLength, maxLength); // Gets the value of the maximum size of data to analyze analyzeLength = NutchConf.get().getInt("lang.analyze.max.length", DEFAULT_ANALYSIS_LENGTH); Properties p = new Properties(); try { p.load(this.getClass().getResourceAsStream("langmappings.properties")); Enumeration alllanguages = p.keys(); LOG.info(new StringBuffer() .append("Language identifier configuration [") .append(minLength).append("-").append(maxLength) .append("/").append(analyzeLength).append("]").toString()); StringBuffer list = new StringBuffer("Language identifier plugin supports:"); HashMap tmpIdx = new HashMap(); while (alllanguages.hasMoreElements()) { String lang = (String) (alllanguages.nextElement()); InputStream is = this.getClass().getClassLoader().getResourceAsStream( "org/apache/nutch/analysis/lang/" + lang + "." + NGramProfile.FILE_EXTENSION); if (is != null) { NGramProfile profile = new NGramProfile(lang, minLength, maxLength); try { profile.load(is); languages.add(profile); supportedLanguages.add(lang); List ngrams = profile.getSorted(); for (int i=0; i<ngrams.size(); i++) { NGramEntry entry = (NGramEntry) ngrams.get(i); List registered = (List) tmpIdx.get(entry); if (registered == null) { registered = new ArrayList(); tmpIdx.put(entry, registered); } registered.add(entry); entry.setProfile(profile); } list.append(" " + lang + "(" + ngrams.size() + ")"); is.close(); } catch (IOException e1) { LOG.severe(e1.toString()); } } } // transform all ngrams lists to arrays for performances Iterator keys = tmpIdx.keySet().iterator(); while (keys.hasNext()) { NGramEntry entry = (NGramEntry) keys.next(); List l = (List) tmpIdx.get(entry); if (l != null) { NGramEntry[] array = (NGramEntry[]) l.toArray(new NGramEntry[l.size()]); ngramsIdx.put(entry.getSeq(), array); } } LOG.info(list.toString()); // Create the suspect profile suspect = new NGramProfile("suspect", minLength, maxLength); } catch (Exception e) { LOG.severe(e.toString()); } } | 50818 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50818/329ff64e9d7295aff108f85e9a8103f5e5f8f398/LanguageIdentifier.java/buggy/src/plugin/languageidentifier/src/java/org/apache/nutch/analysis/lang/LanguageIdentifier.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
9889,
3004,
12,
50,
322,
343,
3976,
290,
322,
343,
3976,
13,
288,
565,
368,
11881,
20368,
8453,
358,
4862,
1368,
2236,
628,
326,
423,
322,
343,
1903,
565,
21552,
273,
423,
322,
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,
282,
1071,
9889,
3004,
12,
50,
322,
343,
3976,
290,
322,
343,
3976,
13,
288,
565,
368,
11881,
20368,
8453,
358,
4862,
1368,
2236,
628,
326,
423,
322,
343,
1903,
565,
21552,
273,
423,
322,
34... |
return new Font (name, attrs); | Font f = null; try { Constructor fontConstructor = Font.class.getDeclaredConstructor (new Class[] { String.class, Map.class }); AccessController.doPrivileged (new SetAccessibleAction(fontConstructor)); f = (Font) fontConstructor.newInstance(new Object[] { name, attrs }); } catch (IllegalAccessException e) { throw new AssertionError(e); } catch (NoSuchMethodException e) { throw new AssertionError(e); } catch (InstantiationException e) { throw new AssertionError(e); } catch (InvocationTargetException e) { throw new AssertionError(e); } return f; | public Font getFont (String name, Map attrs) { return new Font (name, attrs); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/a0ec912f89d8c04b4596a0977a98d99f7221f606/ClasspathToolkit.java/buggy/core/src/classpath/gnu/gnu/java/awt/ClasspathToolkit.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
10063,
18776,
261,
780,
508,
16,
1635,
3422,
13,
282,
288,
565,
10063,
284,
273,
446,
31,
565,
775,
288,
11417,
3512,
6293,
273,
10063,
18,
1106,
18,
588,
18888,
6293,
261,
2704,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
10063,
18776,
261,
780,
508,
16,
1635,
3422,
13,
282,
288,
565,
10063,
284,
273,
446,
31,
565,
775,
288,
11417,
3512,
6293,
273,
10063,
18,
1106,
18,
588,
18888,
6293,
261,
2704,
... |
public Integer getProjects(CmsObject cms, CmsXmlLanguageFile lang, Vector names, Vector values, Hashtable parameters) throws CmsException { | public Integer getProjects(CmsObject cms, CmsXmlLanguageFile lang, Vector names, Vector values, Hashtable parameters) throws CmsException { | public Integer getProjects(CmsObject cms, CmsXmlLanguageFile lang, Vector names, Vector values, Hashtable parameters) throws CmsException { // get all projects Vector projects = cms.getAllAccessibleProjects(); int retValue = -1; String defaultProject = new String(); CmsProject curProject = cms.getRequestContext().currentProject(); if(curProject.isOnlineProject()){ defaultProject = curProject.getId()+""; } I_CmsSession session = cms.getRequestContext().getSession(true); String enteredProject = (String)session.getValue(C_SYNCPROJECT); if(enteredProject != null && !"".equals(enteredProject)) { // if an error has occurred before, take the previous entry of the user defaultProject = enteredProject; } // fill the names and values int n = 0; for(int z = 0;z < projects.size();z++) { CmsProject loopProject = (CmsProject)projects.elementAt(z); if(loopProject.isOnlineProject()) { String loopProjectName = loopProject.getName(); String loopProjectId = loopProject.getId() + ""; if(defaultProject.equals(loopProjectId)) { retValue = n; cms.getRequestContext().setCurrentProject(Integer.parseInt(loopProjectId)); } names.addElement(loopProjectName); values.addElement(loopProjectId); n++; } } return new Integer(retValue); } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/0bb0b0810c20e8340dbb16cc85c18a3a89623c35/CmsAdminSyncProperties.java/buggy/src/com/opencms/workplace/CmsAdminSyncProperties.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2144,
11080,
87,
12,
4747,
921,
6166,
16,
16084,
3779,
812,
3303,
16,
5589,
1257,
16,
5411,
5589,
924,
16,
18559,
1472,
13,
1216,
11228,
288,
3639,
368,
336,
777,
10137,
3639,
5589,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2144,
11080,
87,
12,
4747,
921,
6166,
16,
16084,
3779,
812,
3303,
16,
5589,
1257,
16,
5411,
5589,
924,
16,
18559,
1472,
13,
1216,
11228,
288,
3639,
368,
336,
777,
10137,
3639,
5589,... |
public void storePatch(IPatch p, int bankNum, int patchNum) { | public void storePatch(Patch p, int bankNum, int patchNum) { | public void storePatch(IPatch p, int bankNum, int patchNum) { try { Thread.sleep(100); } catch (Exception e) { } ((Patch)p).sysex[3] = (byte) 0x21; ((Patch)p).sysex[6] = (byte) (bankNum << 1); ((Patch)p).sysex[7] = (byte) 0x0; sendPatchWorker(p); try { Thread.sleep(100); } catch (Exception e) { } } | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/8de9e9d107eb8c0487bbadf2f24d3a5cc9bc1add/KawaiK4BankDriver.java/clean/JSynthLib/synthdrivers/KawaiK4/KawaiK4BankDriver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1707,
7332,
12,
7332,
293,
16,
509,
11218,
2578,
16,
509,
4729,
2578,
13,
288,
3639,
775,
288,
202,
565,
4884,
18,
19607,
12,
6625,
1769,
202,
97,
1044,
261,
503,
425,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1707,
7332,
12,
7332,
293,
16,
509,
11218,
2578,
16,
509,
4729,
2578,
13,
288,
3639,
775,
288,
202,
565,
4884,
18,
19607,
12,
6625,
1769,
202,
97,
1044,
261,
503,
425,
13,
... |
if (_isRestartable) { _node = _parent[_startNode = node]; return resetPosition(); } return this; } | if (_isRestartable) { _node = _parent[_startNode = node]; return resetPosition(); } return this; } | public NodeIterator setStartNode(int node) { if (_isRestartable) { _node = _parent[_startNode = node]; return resetPosition(); } return this; } | 2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/264066e4e3d606d5167a1f5680c45669efd7e5c9/DOMImpl.java/clean/src/org/apache/xalan/xsltc/dom/DOMImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2029,
3198,
18171,
907,
12,
474,
756,
13,
288,
202,
565,
309,
261,
67,
291,
15057,
429,
13,
288,
202,
202,
67,
2159,
273,
389,
2938,
63,
67,
1937,
907,
273,
756,
15533,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2029,
3198,
18171,
907,
12,
474,
756,
13,
288,
202,
565,
309,
261,
67,
291,
15057,
429,
13,
288,
202,
202,
67,
2159,
273,
389,
2938,
63,
67,
1937,
907,
273,
756,
15533,
202,... |
createContents(message, SIZING_SELECTION_PANE_HEIGHT, SIZING_SELECTION_PANE_WIDTH); } | createContents(message, SIZING_SELECTION_PANE_HEIGHT, SIZING_SELECTION_PANE_WIDTH); } | public void createContents(String message) { createContents(message, SIZING_SELECTION_PANE_HEIGHT, SIZING_SELECTION_PANE_WIDTH); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/8e7c72ceda3ed80aa8d03a8921de32470f1b8c25/ContainerSelectionGroup.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/ContainerSelectionGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
752,
6323,
12,
780,
883,
13,
288,
3639,
752,
6323,
12,
2150,
16,
5705,
62,
1360,
67,
1090,
15445,
67,
30819,
41,
67,
14595,
16,
5705,
62,
1360,
67,
1090,
15445,
67,
30819,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
752,
6323,
12,
780,
883,
13,
288,
3639,
752,
6323,
12,
2150,
16,
5705,
62,
1360,
67,
1090,
15445,
67,
30819,
41,
67,
14595,
16,
5705,
62,
1360,
67,
1090,
15445,
67,
30819,
... |
checkBuffered(); | outBuffer.flip(); flushOutBuffer(); | public int syswrite(String string) throws BadDescriptorException, IOException { checkWritable(); checkBuffered(); ByteBuffer buffer = ByteBuffer.wrap(RubyString.stringToBytes(string)); while (buffer.hasRemaining()) { if (((WritableByteChannel) channel).write(buffer) < 0) { // does this ever happen?? throw new IOException("write returned less than zero"); } } return buffer.capacity(); } | 45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/a6049d13f9eab0fce512fac5890ac20bf9ba9a27/IOHandlerNio.java/clean/src/org/jruby/util/IOHandlerNio.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
2589,
2626,
12,
780,
533,
13,
1216,
6107,
3187,
503,
16,
1860,
288,
3639,
866,
12061,
5621,
3639,
866,
17947,
5621,
202,
3639,
7400,
1613,
273,
7400,
18,
4113,
12,
54,
10340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
2589,
2626,
12,
780,
533,
13,
1216,
6107,
3187,
503,
16,
1860,
288,
3639,
866,
12061,
5621,
3639,
866,
17947,
5621,
202,
3639,
7400,
1613,
273,
7400,
18,
4113,
12,
54,
10340,
... |
NodeDescriptor descriptor = (NodeDescriptor)node.getUserObject(); Object element = descriptor.getElement(); | AbstractTreeNode descriptor = (AbstractTreeNode)node.getUserObject(); Object element = descriptor.getValue(); if (element instanceof StructureViewTreeElement) { element = ((StructureViewTreeElement)element).getValue(); } | public Object getData(String dataId) { if (DataConstants.PSI_ELEMENT.equals(dataId)) { TreePath path = getSelectedPath(); if (path == null) { return null; } DefaultMutableTreeNode node = (DefaultMutableTreeNode)path.getLastPathComponent(); NodeDescriptor descriptor = (NodeDescriptor)node.getUserObject(); Object element = descriptor.getElement(); //if (element instanceof PropertyElement) { // PsiElement[] elements = ((PropertyElement)element).getPsiElements(); // if (elements[0].isValid()) return elements[0]; //} if (!(element instanceof PsiElement)) { return null; } if (!((PsiElement)element).isValid()) { return null; } return element; } else if (DataConstantsEx.PSI_ELEMENT_ARRAY.equals(dataId)) { return convertToPsiElementsArray(getSelectedElements()); } else if (DataConstants.FILE_EDITOR.equals(dataId)) { return myFileEditor; } else if (DataConstantsEx.CUT_PROVIDER.equals(dataId)) { return myCopyPasteDelegator.getCutProvider(); } else if (DataConstantsEx.COPY_PROVIDER.equals(dataId)) { return myCopyPasteDelegator.getCopyProvider(); } else if (DataConstantsEx.PASTE_PROVIDER.equals(dataId)) { return myCopyPasteDelegator.getPasteProvider(); } else if (DataConstantsEx.NAVIGATABLE.equals(dataId)) { Object[] selectedElements = getSelectedTreeElements(); if (selectedElements == null || selectedElements.length == 0) { return null; } if (selectedElements[0] instanceof Navigatable) { return selectedElements[0]; } return null; } return null; } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/f7284f7111047fdba5568415d36a14b5e81b0687/StructureViewComponent.java/buggy/source/com/intellij/ide/structureView/newStructureView/StructureViewComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1033,
4303,
12,
780,
501,
548,
13,
288,
565,
309,
261,
751,
2918,
18,
52,
2320,
67,
10976,
18,
14963,
12,
892,
548,
3719,
288,
1377,
4902,
743,
589,
273,
16625,
743,
5621,
1377,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1033,
4303,
12,
780,
501,
548,
13,
288,
565,
309,
261,
751,
2918,
18,
52,
2320,
67,
10976,
18,
14963,
12,
892,
548,
3719,
288,
1377,
4902,
743,
589,
273,
16625,
743,
5621,
1377,
... |
return (expired() ? 0 : expiration.getTime() - nowMs()); | return getRemainingTime(); | public synchronized long getSleepTime() { if (TimeBase.isSimulated()) { return 5; } else { return (expired() ? 0 : expiration.getTime() - nowMs()); } } | 8150 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8150/48c953ccf20730345107e2880e6416d8cb5d8140/Deadline.java/clean/src/org/lockss/util/Deadline.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3852,
1525,
1322,
4265,
950,
1435,
288,
565,
309,
261,
950,
2171,
18,
291,
7993,
11799,
10756,
288,
1377,
327,
1381,
31,
565,
289,
469,
288,
1377,
327,
336,
11429,
950,
5621,
565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3852,
1525,
1322,
4265,
950,
1435,
288,
565,
309,
261,
950,
2171,
18,
291,
7993,
11799,
10756,
288,
1377,
327,
1381,
31,
565,
289,
469,
288,
1377,
327,
336,
11429,
950,
5621,
565,
... |
CAPA_FETCH_HIERARCHICAL/*, CAPA_ALBUM_INFO*/, CAPA_NEW_ALBUM, CAPA_FETCH_ALBUMS_PRUNE}; | CAPA_FETCH_HIERARCHICAL, CAPA_NEW_ALBUM, CAPA_FETCH_ALBUMS_PRUNE}; | protected GalleryComm2_5(Gallery g) { super(g); scriptName = "main.php"; capabilities2 = new int[]{CAPA_UPLOAD_FILES, CAPA_FETCH_ALBUMS, CAPA_UPLOAD_CAPTION, CAPA_FETCH_HIERARCHICAL/*, CAPA_ALBUM_INFO, CAPA_NEW_ALBUM*/, CAPA_FETCH_ALBUMS_PRUNE}; capabilities3 = new int[]{CAPA_UPLOAD_FILES, CAPA_FETCH_ALBUMS, CAPA_UPLOAD_CAPTION, CAPA_FETCH_HIERARCHICAL/*, CAPA_ALBUM_INFO*/, CAPA_NEW_ALBUM, CAPA_FETCH_ALBUMS_PRUNE}; capabilities4 = new int[]{CAPA_UPLOAD_FILES, CAPA_FETCH_ALBUMS, CAPA_UPLOAD_CAPTION, CAPA_FETCH_HIERARCHICAL/*, CAPA_ALBUM_INFO*/, CAPA_NEW_ALBUM, CAPA_FETCH_ALBUMS_PRUNE, CAPA_FETCH_ALBUM_IMAGES}; capabilities6 = new int[]{CAPA_UPLOAD_FILES, CAPA_FETCH_ALBUMS, CAPA_UPLOAD_CAPTION, CAPA_FETCH_HIERARCHICAL, CAPA_ALBUM_INFO, CAPA_NEW_ALBUM, CAPA_FETCH_ALBUMS_PRUNE, CAPA_FETCH_ALBUM_IMAGES}; capabilities7 = new int[]{CAPA_UPLOAD_FILES, CAPA_FETCH_ALBUMS, CAPA_UPLOAD_CAPTION, CAPA_FETCH_HIERARCHICAL, CAPA_ALBUM_INFO, CAPA_NEW_ALBUM, CAPA_FETCH_ALBUMS_PRUNE, CAPA_FETCH_ALBUM_IMAGES, CAPA_INCREMENT_VIEW_COUNT}; capabilities8 = new int[]{CAPA_UPLOAD_FILES, CAPA_FETCH_ALBUMS, CAPA_UPLOAD_CAPTION, CAPA_FETCH_HIERARCHICAL, CAPA_ALBUM_INFO, CAPA_NEW_ALBUM, CAPA_FETCH_ALBUMS_PRUNE, CAPA_FETCH_ALBUM_IMAGES, CAPA_INCREMENT_VIEW_COUNT, CAPA_FETCH_ALBUMS}; capabilities9 = new int[]{CAPA_UPLOAD_FILES, CAPA_FETCH_ALBUMS, CAPA_UPLOAD_CAPTION, CAPA_FETCH_HIERARCHICAL, CAPA_ALBUM_INFO, CAPA_NEW_ALBUM, CAPA_FETCH_ALBUMS_PRUNE, CAPA_FETCH_ALBUM_IMAGES, CAPA_INCREMENT_VIEW_COUNT, CAPA_FETCH_ALBUMS, CAPA_FETCH_RANDOM}; Arrays.sort(capabilities2); Arrays.sort(capabilities3); Arrays.sort(capabilities4); Arrays.sort(capabilities6); Arrays.sort(capabilities7); Arrays.sort(capabilities8); Arrays.sort(capabilities9); g.setGalleryVersion(2); } | 5431 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5431/f77f83c516b590c20a10738804581b369c3a017b/GalleryComm2_5.java/clean/gallery_remote/com/gallery/GalleryRemote/GalleryComm2_5.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
31398,
12136,
22,
67,
25,
12,
18511,
314,
13,
288,
202,
202,
9565,
12,
75,
1769,
202,
202,
4263,
461,
273,
315,
5254,
18,
2684,
14432,
202,
202,
22140,
22,
273,
394,
509,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
31398,
12136,
22,
67,
25,
12,
18511,
314,
13,
288,
202,
202,
9565,
12,
75,
1769,
202,
202,
4263,
461,
273,
315,
5254,
18,
2684,
14432,
202,
202,
22140,
22,
273,
394,
509,
6... |
ComponentConfigurationHandler componentConfiguration = ProActiveComponentImpl.loadComponentConfiguration(controllersConfigFile); | ComponentConfigurationHandler componentConfiguration = ProActiveComponentImpl.loadComponentConfiguration(controllersConfigFileLocation); | public ProActiveComponentRepresentativeImpl(ComponentType componentType, String hierarchicalType, File controllersConfigFile) { this.componentType = componentType; this.hierarchicalType = hierarchicalType; ComponentConfigurationHandler componentConfiguration = ProActiveComponentImpl.loadComponentConfiguration(controllersConfigFile); Map controllersConfiguration = componentConfiguration.getControllers(); useShortcuts = ("true".equals(System.getProperty( "proactive.components.use_shortcuts"))); // create the interface references tables // the size is the addition of : // - 1 for the current ItfRef (that is at the same time a binding controller, lifecycle controller, // content controller and name controller // - the number of client functional interfaces // - the number of server functional interfaces //ArrayList interface_references_list = new ArrayList(1 +componentType.getFcInterfaceTypes().length+controllersConfiguration.size()); nfInterfaceReferences = new HashMap(1 + controllersConfiguration.size()); // interfaceReferences = new Interface[1 + // componentType.getFcInterfaceTypes().length+controllersConfiguration.size()]; int i = 0; // add controllers //Enumeration controllersInterfaces = controllersConfiguration.propertyNames(); Iterator iteratorOnControllers = controllersConfiguration.keySet() .iterator(); Class controllerClass = null; AbstractProActiveController currentController; ProActiveInterface currentInterface = null; Class controllerItf; while (iteratorOnControllers.hasNext()) { String controllerItfName = (String) iteratorOnControllers.next(); try { controllerItf = Class.forName(controllerItfName); controllerClass = Class.forName((String) controllersConfiguration.get( controllerItf.getName())); Constructor controllerClassConstructor = controllerClass.getConstructor(new Class[] { Component.class }); currentController = (AbstractProActiveController) controllerClassConstructor.newInstance(new Object[] { this }); // currentInterface = RepresentativeInterfaceClassGenerator.instance() // .generateControllerInterface(currentController.getFcItfName(), // this, (InterfaceType) currentController.getFcItfType()); currentInterface = RepresentativeInterfaceClassGenerator.instance() .generateControllerInterface(currentController.getFcItfName(), this, (InterfaceType) currentController.getFcItfType()); } catch (Exception e) { logger.error("could not create controller " + controllersConfiguration.get(controllerItfName) + " : " + e.getMessage()); continue; } if (BindingController.class.isAssignableFrom(controllerClass)) { if ((hierarchicalType.equals(Constants.PRIMITIVE) && (Fractive.getClientInterfaceTypes(componentType).length == 0))) { //bindingController = null; if (logger.isDebugEnabled()) { logger.debug( "user component class of this component does not have any client interface. It will have no BindingController"); } continue; } } if (ContentController.class.isAssignableFrom(controllerClass)) { if (hierarchicalType.equals(Constants.PRIMITIVE)) { // no content controller here continue; } } if (currentInterface != null) { nfInterfaceReferences.put(currentController.getFcItfName(), currentInterface); i++; } } // add functional interfaces // functional interfaces are proxies on the corresponding meta-objects // 3. external functional interfaces fcInterfaceReferences = new HashMap(componentType.getFcInterfaceTypes().length); InterfaceType[] interface_types = componentType.getFcInterfaceTypes(); try { for (int j = 0; j < interface_types.length; j++) { Interface interface_reference = RepresentativeInterfaceClassGenerator.instance() .generateFunctionalInterface(interface_types[j].getFcItfName(), this, interface_types[j]); // all calls are to be reified fcInterfaceReferences.put(interface_reference.getFcItfName(), interface_reference); i++; } } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("cannot create interface references : " + e.getMessage()); } } | 14315 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14315/3687adae6555fd3151a6a916d4c87e297f9b3abc/ProActiveComponentRepresentativeImpl.java/buggy/src/org/objectweb/proactive/core/component/representative/ProActiveComponentRepresentativeImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1186,
3896,
1841,
23869,
1535,
2828,
12,
28116,
20065,
16,
3639,
514,
26633,
559,
16,
1387,
12403,
13705,
13,
288,
3639,
333,
18,
4652,
559,
273,
20065,
31,
3639,
333,
18,
76,
14529... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1186,
3896,
1841,
23869,
1535,
2828,
12,
28116,
20065,
16,
3639,
514,
26633,
559,
16,
1387,
12403,
13705,
13,
288,
3639,
333,
18,
4652,
559,
273,
20065,
31,
3639,
333,
18,
76,
14529... |
PropertyDefinition propDef, int row) | PropertyDefinition propDef, int row, int propValueNum) | public void addEmbeddedElement(PropertySheet sheet, ConfigContext ctx, ConfigElement elm, Object value, PropertyDefinition propDef, int row) { // Embedded Element // Adding a List EmbeddedElementPanel editor_list = new EmbeddedElementPanel(ctx, (ConfigElement) value, sheet.getColor()); ((TableLayout)sheet.getLayout()).insertRow(row, TableLayout.PREFERRED); // Embedded element panels span the label and editor columns. TableLayoutConstraints c = new TableLayoutConstraints(PropertySheet.LABEL_COLUMN, row, PropertySheet.EDITOR_COLUMN, row, TableLayout.FULL, TableLayout.FULL); sheet.add(editor_list, c); addDeleteButton(sheet, ctx, elm, propDef, value, row); revalidate(); repaint(); } | 49828 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49828/f242e00f1c3174b9eb5f9082d59792f86ef9af88/PropertySheetFactory.java/clean/modules/jackal/editors/org/vrjuggler/jccl/editors/PropertySheetFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
527,
14980,
1046,
12,
1396,
8229,
6202,
16,
1903,
1042,
1103,
16,
21394,
1903,
1046,
12531,
16,
1033,
460,
16,
21394,
4276,
1852,
2270,
3262,
16,
509,
1027,
16,
509,
19432,
257... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
527,
14980,
1046,
12,
1396,
8229,
6202,
16,
1903,
1042,
1103,
16,
21394,
1903,
1046,
12531,
16,
1033,
460,
16,
21394,
4276,
1852,
2270,
3262,
16,
509,
1027,
16,
509,
19432,
257... |
int oldHeight = b.length / (oldWidth * c); | int totalX = width - img.getWidth(); int totalY = height - img.getHeight(); | public static byte[] padImage(byte[] b, boolean interleaved, int c, int oldWidth, int width, int height) { boolean needsPadding = (oldWidth != width) || ((b.length / (oldWidth*c)) != height); if (needsPadding) { int oldHeight = b.length / (oldWidth * c); // adjust to correct width byte[] padded = new byte[width * oldHeight * c]; int clip = (width - oldWidth) / 2; for (int i=0; i<oldHeight; i++) { System.arraycopy(b, i*oldWidth*c, padded, i*width*c, clip < 0 ? width*c : oldWidth*c); } // adjust to correct height byte[] rtn = new byte[width * height * c]; clip = (height - oldHeight) / 2; if (clip < 0) { clip *= -1; for (int i=0; i<height; i++) { System.arraycopy(padded, (i+clip)*width*c, rtn, i*width*c, width*c); } } else { for (int i=clip; i<height+clip; i++) { System.arraycopy(padded, i*width*c, rtn, (i-clip)*width*c, width*c); } } return rtn; } return b; } | 46826 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46826/23ac7e153f199dc75b71ab8259e74911eaa82fa8/ImageTools.java/buggy/loci/formats/ImageTools.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1160,
8526,
4627,
2040,
12,
7229,
8526,
324,
16,
1250,
1554,
22593,
16,
509,
276,
16,
565,
509,
1592,
2384,
16,
509,
1835,
16,
509,
2072,
13,
225,
288,
565,
1250,
4260,
9485,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1160,
8526,
4627,
2040,
12,
7229,
8526,
324,
16,
1250,
1554,
22593,
16,
509,
276,
16,
565,
509,
1592,
2384,
16,
509,
1835,
16,
509,
2072,
13,
225,
288,
565,
1250,
4260,
9485,... |
return getLayoutInfo (parent, sizeflag); | if (sizeflag != MINSIZE && sizeflag != PREFERREDSIZE) throw new IllegalArgumentException(); Dimension parentDim = parent.getSize (); Insets parentInsets = parent.getInsets (); parentDim.width -= parentInsets.left + parentInsets.right; parentDim.height -= parentInsets.top + parentInsets.bottom; int x = 0; int y = 0; int max_x = 0; int max_y = 0; Component[] components = parent.getComponents(); for (int i = 0; i < components.length; i++) { Component component = components [i]; if (!component.isVisible()) continue; GridBagConstraints constraints = lookupConstraints (component); if(constraints.gridx == GridBagConstraints.RELATIVE) constraints.gridx = x; if(constraints.gridy == GridBagConstraints.RELATIVE) constraints.gridy = y; max_x = Math.max(max_x, constraints.gridx + Math.max(1, constraints.gridwidth)); max_y = Math.max(max_y, constraints.gridy + Math.max(1, constraints.gridheight)); if(constraints.gridwidth == GridBagConstraints.REMAINDER) { x = 0; y++; } else { x = constraints.gridx + Math.max(1, constraints.gridwidth); y = constraints.gridy; } } GridBagLayoutInfo info = new GridBagLayoutInfo(max_x, max_y); for (x = 0; x <= max_x; x++) { if(columnWidths != null && columnWidths.length > x) { info.colWidths[x] = columnWidths[x]; } if(columnWeights != null && columnWeights.length > x) { info.colWeights[x] = columnWeights[x]; } for (int i = 0; i < components.length; i++) { Component component = components [i]; if (!component.isVisible()) continue; GridBagConstraints constraints = lookupConstraints (component); if(constraints.gridwidth == GridBagConstraints.REMAINDER) { constraints.gridwidth = max_x - constraints.gridx; } if(constraints.gridheight == GridBagConstraints.REMAINDER) { constraints.gridheight = max_y - constraints.gridy; } if(constraints.gridx + constraints.gridwidth - 1 == x) { int width = (sizeflag == PREFERREDSIZE) ? component.getPreferredSize().width : component.getMinimumSize().width; if(constraints.insets != null) { width += constraints.insets.left + constraints.insets.right; } width += constraints.ipadx; for(int w = 1; w < constraints.gridwidth; w++) { width -= info.colWidths[x - w]; } info.colWidths[x] = Math.max(info.colWidths[x], width); info.colWeights[x] = Math.max(info.colWeights[x], constraints.weightx); } } } for (y = 0; y <= max_y; y++) { if(rowHeights != null && rowHeights.length > y) { info.rowHeights[y] = rowHeights[y]; } if(rowWeights != null && rowWeights.length > y) { info.rowWeights[y] = rowWeights[y]; } for (int i = 0; i < components.length; i++) { Component component = components [i]; if (!component.isVisible()) continue; GridBagConstraints constraints = lookupConstraints (component); if(constraints.gridy + constraints.gridheight - 1 == y) { int height = (sizeflag == PREFERREDSIZE) ? component.getPreferredSize().height : component.getMinimumSize().height; if(constraints.insets != null) { height += constraints.insets.top + constraints.insets.bottom; } height += constraints.ipady; for(int h = 1; h < constraints.gridheight; h++) { height -= info.rowHeights[y - h]; } info.rowHeights[y] = Math.max(info.rowHeights[y], height); info.rowWeights[y] = Math.max(info.rowWeights[y], constraints.weighty); } } } calcCellSizes (info.colWidths, info.colWeights, parentDim.width); calcCellSizes (info.rowHeights, info.rowWeights, parentDim.height); int totalWidth = sumIntArray(info.colWidths); int totalHeight = sumIntArray(info.rowHeights); info.pos_x = parentInsets.left + (parentDim.width - totalWidth) / 2; info.pos_y = parentInsets.top + (parentDim.height - totalHeight) / 2; return info; | protected GridBagLayoutInfo GetLayoutInfo (Container parent, int sizeflag) { return getLayoutInfo (parent, sizeflag); } | 45163 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45163/3fe1c14284ce32b79d0e66441aec6a45a77ff684/GridBagLayout.java/buggy/libjava/java/awt/GridBagLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
7145,
5013,
3744,
966,
968,
3744,
966,
261,
2170,
982,
16,
509,
963,
6420,
13,
565,
288,
202,
430,
261,
1467,
6420,
480,
6989,
4574,
597,
963,
6420,
480,
19175,
4574,
13,
604,
394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
7145,
5013,
3744,
966,
968,
3744,
966,
261,
2170,
982,
16,
509,
963,
6420,
13,
565,
288,
202,
430,
261,
1467,
6420,
480,
6989,
4574,
597,
963,
6420,
480,
19175,
4574,
13,
604,
394... |
return null; } if (globalInspectionContext.isSuppressed(refEntity, getShortName())) { | public CommonProblemDescriptor[] checkElement(RefEntity refEntity, AnalysisScope analysisScope, InspectionManager inspectionManager, GlobalInspectionContext globalInspectionContext) { if (!(refEntity instanceof RefClass)) { return null; } if (globalInspectionContext.isSuppressed(refEntity, getShortName())) { return null; } final RefClass refClass = (RefClass) refEntity; final PsiClass aClass = refClass.getElement(); if (aClass.getContainingClass() != null) { return null; } final Set<RefClass> dependencies = InitializationDependencyUtils.calculateTransitiveInitializationDependentsForClass(refClass); final Set<RefClass> dependents = InitializationDependencyUtils.calculateTransitiveInitializationDependenciesForClass(refClass); final Set<RefClass> mutualDependents = new HashSet<RefClass>(dependencies); mutualDependents.retainAll(dependents); final int numMutualDependents = mutualDependents.size(); if (numMutualDependents == 0) { return null; } final String errorString = InspectionGadgetsBundle.message("cyclic.class.initialization.problem.descriptor", refEntity.getName(), numMutualDependents); return new CommonProblemDescriptor[]{inspectionManager.createProblemDescriptor(errorString)}; } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/35cfb92e90812fb89d3411c214b6e37d08f443fb/CyclicClassInitializationInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/dependency/CyclicClassInitializationInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5658,
13719,
3187,
8526,
866,
1046,
12,
1957,
1943,
1278,
1943,
16,
4766,
5375,
16318,
3876,
6285,
3876,
16,
4766,
5375,
22085,
7017,
1318,
2763,
7017,
1318,
16,
4766,
5375,
8510,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5658,
13719,
3187,
8526,
866,
1046,
12,
1957,
1943,
1278,
1943,
16,
4766,
5375,
16318,
3876,
6285,
3876,
16,
4766,
5375,
22085,
7017,
1318,
2763,
7017,
1318,
16,
4766,
5375,
8510,
149... | |
public static RubyBoolean between_p(Ruby ruby, RubyObject recv, RubyObject arg1, RubyObject arg2) { RubyFixnum fn = (RubyFixnum) recv.funcall("<=>", arg1); if (fn.getValue() < 0) { | public static RubyBoolean between_p(Ruby ruby, RubyObject recv, RubyObject first, RubyObject second) { if (RubyNumeric.fix2int(recv.funcall("<=>", first)) < 0) { | public static RubyBoolean between_p(Ruby ruby, RubyObject recv, RubyObject arg1, RubyObject arg2) { RubyFixnum fn = (RubyFixnum) recv.funcall("<=>", arg1); if (fn.getValue() < 0) { return ruby.getFalse(); } fn = (RubyFixnum) recv.funcall("<=>", arg2); if (fn.getValue() > 0) { return ruby.getFalse(); } return ruby.getTrue(); } | 46217 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46217/786cea08c1dd2092a02d1254b49fbee371ace5f9/RubyComparable.java/clean/org/jruby/RubyComparable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
5507,
3086,
67,
84,
12,
54,
10340,
22155,
16,
19817,
921,
10665,
16,
19817,
921,
1501,
21,
16,
19817,
921,
1501,
22,
13,
288,
3639,
19817,
8585,
2107,
2295,
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,
377,
1071,
760,
19817,
5507,
3086,
67,
84,
12,
54,
10340,
22155,
16,
19817,
921,
10665,
16,
19817,
921,
1501,
21,
16,
19817,
921,
1501,
22,
13,
288,
3639,
19817,
8585,
2107,
2295,
273,
261,
... |
Detector2[] detectors = analysisPass.getDetectorList(); | private void examineClass(AnalysisPass analysisPass, String className) throws InterruptedException { if (DEBUG) System.out.println("Examining class " + className); long entireClassAnalysisStart = 0; if (TIMEDEBUG || DEBUG) { entireClassAnalysisStart = System.currentTimeMillis(); } this.currentClass = className; Detector2[] detectors = analysisPass.getDetectorList(); try { JavaClass javaClass = Repository.lookupClass(className); // Notify ClassObservers for (ClassObserver aClassObserverList : classObserverList) { aClassObserverList.observeClass(javaClass); } // Create a ClassContext for the class ClassContext classContext = analysisContext.getClassContext(javaClass); // Run the Detectors for (Detector2 detector1 : detectors) { if (Thread.interrupted()) throw new InterruptedException(); Detector2 detector = detector1; // MUSTFIX: Evaluate whether this makes a difference if (false && detector instanceof StatelessDetector) { try { detector = (Detector2) ((StatelessDetector) detector).clone(); } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } } try { long start = 0, end; if (TIMEDEBUG || DEBUG) { start = System.currentTimeMillis(); if (DEBUG) { System.out.println(" running " + detector.getClass().getName()); } } //detector.visitClassContext(classContext); ClassDescriptor classDescriptor = new ClassDescriptor(className.replace('.', '/')); detector.visitClass(classDescriptor); if (TIMEDEBUG || DEBUG) { end = System.currentTimeMillis(); long delta = end - start; entireClassAnalysisStart += delta; if (delta > TIMEQUANTUM) System.out.println("TIME: " + detector.getClass().getName() + " " + className + " " + delta); if (DEBUG) { String detectorName = detector.getClass().getName(); Long total = detectorTimings.get(detectorName); if (total == null) total = new Long(delta); else total = new Long(total.longValue() + delta); detectorTimings.put(detectorName, total); } } } catch (CheckedAnalysisException e) { reportRecoverableDetectorException(className, detector, e); } catch (AnalysisException e) { reportRecoverableDetectorException(className, detector, e); } catch (ArrayIndexOutOfBoundsException e) { reportRecoverableDetectorException(className, detector, e); } catch (ClassCastException e) { reportRecoverableDetectorException(className, detector, e); } } } catch (ClassNotFoundException e) { // This should never happen unless there are bugs in BCEL. bugReporter.reportMissingClass(e); reportRecoverableException(className, e); } catch (ClassFormatException e) { reportRecoverableException(className, e); } catch (RuntimeException re) { RuntimeException annotatedEx; try { String sep = System.getProperty("line.separator"); Constructor<? extends RuntimeException> c = re.getClass().getConstructor(new Class[] { String.class }); String msg = re.getMessage(); msg = sep + "While finding bugs in class: " + className + ((msg == null) ? "" : (sep + msg)); annotatedEx = c.newInstance(new Object[] {msg}); annotatedEx.setStackTrace(re.getStackTrace()); } catch (RuntimeException e) { throw re; } catch (Exception e) { throw re; } throw annotatedEx; } if (TIMEDEBUG || DEBUG) { long classSetupTime = System.currentTimeMillis() - entireClassAnalysisStart; if (classSetupTime > TIMEQUANTUM) System.out.println("TIME: setup " + className + " " + classSetupTime); } progressCallback.finishClass(); } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/25c55f15b2a3422c334c2dcf73aafecc91dbed45/FindBugs.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/FindBugs.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
19707,
558,
797,
12,
9418,
6433,
6285,
6433,
16,
514,
2658,
13,
1216,
7558,
288,
202,
202,
430,
261,
9394,
13,
2332,
18,
659,
18,
8222,
2932,
424,
301,
10008,
667,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19707,
558,
797,
12,
9418,
6433,
6285,
6433,
16,
514,
2658,
13,
1216,
7558,
288,
202,
202,
430,
261,
9394,
13,
2332,
18,
659,
18,
8222,
2932,
424,
301,
10008,
667,
315,
... | |
EARConfigBuilder earConfigBuilder = getEARConfigBuilder(); TestingUtils.buildConfiguration(jarfile,store,earConfigBuilder,kernel,wsConfgBuilderName); | TestingUtils.buildConfiguration(jarfile,store,kernel,wsConfgBuilderName); | public void testLoad() throws Exception { ClassLoader cl = Thread.currentThread().getContextClassLoader(); ClassLoader myCl = new URLClassLoader(new URL[]{}, cl); File jarfile = new File(getTestFile("target/generated/samples/echo-ewsimpl.jar")); EARConfigBuilder earConfigBuilder = getEARConfigBuilder(); TestingUtils.buildConfiguration(jarfile,store,earConfigBuilder,kernel,wsConfgBuilderName); //check the real web service invocations Class echoLoacaterClass = ClassUtils.forName("org.apache.ws.echosample.EchoServiceLocator"); Class structClass = ClassUtils.forName("org.apache.ws.echosample.EchoStruct"); Object echoLoacater = echoLoacaterClass.newInstance(); Method getportMethod = echoLoacaterClass.getMethod("getechoPort", new Class[]{URL.class}); URL serviceURL = AxisGeronimoUtils.getURL("/axis/services/echoPort"); Object echoPort = getportMethod.invoke(echoLoacater, new Object[]{serviceURL}); Class echoClass = echoPort.getClass(); Method echostuctMethod = echoClass.getMethod("echoStruct", new Class[]{structClass}); Object structval = structClass.newInstance(); Object structret = echostuctMethod.invoke(echoPort, new Object[]{null}); structret = echostuctMethod.invoke(echoPort, new Object[]{structval}); assertEquals(structval, structret); //Thread.currentThread().setContextClassLoader(ocl); kernel.stopGBean(axisname); kernel.unloadGBean(axisname); } | 12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/74231cfea49804f57cc6ffd1fe03fc6a617bf856/ComplexTypeWebServiceTest.java/buggy/modules/axis/src/test/org/apache/geronimo/axis/ComplexTypeWebServiceTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2563,
1435,
1216,
1185,
288,
3639,
9403,
927,
273,
4884,
18,
2972,
3830,
7675,
29120,
7805,
5621,
3639,
9403,
3399,
2009,
273,
394,
1976,
7805,
12,
2704,
1976,
8526,
2916,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2563,
1435,
1216,
1185,
288,
3639,
9403,
927,
273,
4884,
18,
2972,
3830,
7675,
29120,
7805,
5621,
3639,
9403,
3399,
2009,
273,
394,
1976,
7805,
12,
2704,
1976,
8526,
2916,
... |
return value < 0 ? -1 : value > 0 ? 1 : 0; | return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; | public int cmp(RubyString other) { int value = getValue().compareTo(other.getValue()); return value < 0 ? -1 : value > 0 ? 1 : 0; } | 47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/803c66ee682936beecc8a43fe2cfc90fe5645b22/RubyString.java/buggy/src/org/jruby/RubyString.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
9411,
12,
54,
10340,
780,
1308,
13,
288,
202,
565,
509,
460,
273,
2366,
7675,
9877,
774,
12,
3011,
18,
24805,
10663,
202,
202,
2463,
9411,
411,
374,
692,
300,
21,
294,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
9411,
12,
54,
10340,
780,
1308,
13,
288,
202,
565,
509,
460,
273,
2366,
7675,
9877,
774,
12,
3011,
18,
24805,
10663,
202,
202,
2463,
9411,
411,
374,
692,
300,
21,
294,
... |
System.out.println( "Processing contents file: " + contentspath ); | System.out.println( "\tProcessing contents file: " + contentspath ); | private void processContentsFile( Context c, Item i, String path, String filename ) { String contentspath = path + "/" + filename; String line = ""; System.out.println( "Processing contents file: " + contentspath ); try { BufferedReader is = new BufferedReader( new FileReader( contentspath ) ); while( ( line = is.readLine() ) != null ) { System.out.println( "Bitstream: " + line ); processContentFileEntry( c, i, path, line ); } is.close(); } catch( Exception e ) { e.printStackTrace(); System.out.println( "Caught exception: " + e ); } } | 52457 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52457/d2c45bb93d8def7196e87f13413af7d1392f4802/ItemImport.java/buggy/dspace/src/org/dspace/app/itemimport/ItemImport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
6323,
812,
12,
1772,
276,
16,
4342,
277,
16,
514,
589,
16,
514,
1544,
262,
565,
288,
3639,
514,
2939,
803,
273,
589,
397,
4016,
397,
1544,
31,
3639,
514,
980,
273,
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,
3238,
918,
1207,
6323,
812,
12,
1772,
276,
16,
4342,
277,
16,
514,
589,
16,
514,
1544,
262,
565,
288,
3639,
514,
2939,
803,
273,
589,
397,
4016,
397,
1544,
31,
3639,
514,
980,
273,
14... |
Relative.untranslateRelative(c); c.popStyle(); | public static void layoutContent(Context c, Box box, List contentList) { //Here we should always be inside something that corresponds to a block-level element //for formatting purposes Rectangle bounds = new Rectangle(); bounds.width = c.getExtents().width; Border border = c.getCurrentStyle().getBorderWidth(c.getBlockFormattingContext().getWidth(), c.getBlockFormattingContext().getHeight()); Border margin = c.getCurrentStyle().getMarginWidth(c.getBlockFormattingContext().getWidth(), c.getBlockFormattingContext().getHeight()); Border padding = c.getCurrentStyle().getPaddingWidth(c.getBlockFormattingContext().getWidth(), c.getBlockFormattingContext().getHeight()); //below should maybe be done somewhere else? bounds.width -= margin.left + border.left + padding.left + padding.right + border.right + margin.right; validateBounds(bounds); bounds.x = 0; bounds.y = 0; bounds.height = 0; //dummy style to make sure that text nodes don't get extra padding and such c.pushStyle(new CascadedStyle()); int blockLineHeight = FontUtil.lineHeight(c); LineMetrics blockLineMetrics = c.getTextRenderer().getLineMetrics(c.getGraphics(), FontUtil.getFont(c), "thequickbrownfoxjumpedoverthelazydogTHEQUICKBROWNFOXJUMPEDOVERTHELAZYDOG"); // prepare remaining width and first linebox int remaining_width = bounds.width; LineBox curr_line = newLine(box, bounds, null); c.setFirstLine(true); // account for text-indent CalculatedStyle parentStyle = c.getCurrentStyle(); remaining_width = TextIndent.doTextIndent(parentStyle, remaining_width, curr_line); // more setup LineBox prev_line = new LineBox(); prev_line.setParent(box); prev_line.y = bounds.y; prev_line.height = 0; InlineBox prev_inline = null; InlineBox prev_align_inline = null; // adjust the first line for float tabs remaining_width = FloatUtil.adjustForTab(c, prev_line, remaining_width); CalculatedStyle currentStyle = parentStyle; boolean isFirstLetter = true; List pendingPushStyles = null; // loop until no more nodes while (contentList.size() > 0) { Object o = contentList.get(0); contentList.remove(0); if (o instanceof FirstLineStyle) {//can actually only be the first object in list box.firstLineStyle = ((FirstLineStyle) o).getStyle(); continue; } if (o instanceof FirstLetterStyle) {//can actually only be the first or second object in list box.firstLetterStyle = ((FirstLetterStyle) o).getStyle(); continue; } if (o instanceof StylePush) { CascadedStyle style; StylePush sp = (StylePush) o; if (sp.getPseudoElement() != null) { style = c.getCss().getPseudoElementStyle(sp.getElement(), sp.getPseudoElement()); } else { style = c.getCss().getCascadedStyle(sp.getElement(), false);//already restyled by ContentUtil } c.pushStyle(style); if (pendingPushStyles == null) { pendingPushStyles = new LinkedList(); } pendingPushStyles.add((StylePush) o); Relative.translateRelative(c); continue; } if (o instanceof StylePop) { Relative.untranslateRelative(c); c.popStyle(); if (pendingPushStyles != null && pendingPushStyles.size() != 0) { pendingPushStyles.remove(pendingPushStyles.size() - 1);//was a redundant one } else { if (prev_inline != null) { if (prev_inline.popstyles == null) { prev_inline.popstyles = new LinkedList(); } prev_inline.popstyles.add(o); } } continue; } Content currentContent = (Content) o; if (currentContent.getStyle() != null) { c.pushStyle(currentContent.getStyle()); } // loop until no more text in this node InlineBox new_inline = null; int start = 0; do { new_inline = null; if (currentContent instanceof AbsolutelyPositionedContent) { // Uu.p("this might be a problem, but it could just be an absolute block"); // result = new BoxLayout().layout(c,content); Box absolute = Absolute.generateAbsoluteBox(c, currentContent); curr_line.addChild(absolute); break; } // debugging check if (bounds.width < 0) { Uu.p("bounds width = " + bounds.width); Uu.dump_stack(); System.exit(-1); } // the crash warning code if (bounds.width < 1) { Uu.p("warning. width < 1 " + bounds.width); } currentStyle = c.getCurrentStyle(); // look at current inline // break off the longest section that will fit new_inline = calculateInline(c, currentContent, remaining_width, bounds.width, prev_align_inline, isFirstLetter, box.firstLetterStyle, box.firstLineStyle, curr_line, start); // Uu.p("got back inline: " + new_inline); // if this inline needs to be on a new line if (prev_align_inline != null && new_inline.break_before) { // Uu.p("break before"); remaining_width = bounds.width; saveLine(curr_line, currentStyle, prev_line, bounds.width, bounds.x, c, box, false, blockLineHeight); bounds.height += curr_line.height; prev_line = curr_line; curr_line = newLine(box, bounds, prev_line); remaining_width = FloatUtil.adjustForTab(c, curr_line, remaining_width); //have to discard it and recalculate, particularly if this was the first line //HACK: is my thinking straight? - tobe prev_align_inline.break_after = true; new_inline = null; continue; } // save the new inline to the list // Uu.p("adding inline child: " + new_inline); //the inline might be set to size 0,0 after this, if it is first whitespace on line. // Cannot discard because it may contain style-pushes curr_line.addInlineChild(c, new_inline); // Uu.p("current line = " + curr_line); if (new_inline instanceof InlineTextBox) { start = ((InlineTextBox) new_inline).end_index; } isFirstLetter = false; new_inline.pushstyles = pendingPushStyles; pendingPushStyles = null; // calc new height of the line // don't count floats and absolutes if (!new_inline.floated && !new_inline.absolute) { adjustLineHeight(c, curr_line, new_inline, blockLineHeight, blockLineMetrics); } if (!(currentContent instanceof FloatedBlockContent)) { // calc new width of the line curr_line.width += new_inline.width; } // reduce the available width remaining_width = remaining_width - new_inline.width; // if the last inline was at the end of a line, then go to next line if (new_inline.break_after) { // Uu.p("break after"); // then remaining_width = max_width remaining_width = bounds.width; // save the line saveLine(curr_line, currentStyle, prev_line, bounds.width, bounds.x, c, box, false, blockLineHeight); // increase bounds height to account for the new line bounds.height += curr_line.height; prev_line = curr_line; curr_line = newLine(box, bounds, prev_line); remaining_width = FloatUtil.adjustForTab(c, curr_line, remaining_width); } // set the inline to use for left alignment if (!isOutsideFlow(currentContent)) { prev_align_inline = new_inline; // } } prev_inline = new_inline; } while (new_inline == null || !new_inline.isEndOfParentContent()); if (currentContent.getStyle() != null) { c.popStyle(); } } // save the final line saveLine(curr_line, currentStyle, prev_line, bounds.width, bounds.x, c, box, true, blockLineHeight); finishBlock(box, curr_line, bounds); // Uu.p("- InlineLayout.layoutContent(): " + box); //pop the dummy style c.popStyle(); } | 8125 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8125/8f81e5fe9f6f8593d3c596d30a3f100cb87dbf27/InlineBoxing.java/clean/src/java/org/xhtmlrenderer/layout/InlineBoxing.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
3511,
1350,
12,
1042,
276,
16,
8549,
3919,
16,
987,
913,
682,
13,
288,
3639,
368,
26715,
732,
1410,
3712,
506,
4832,
5943,
716,
13955,
358,
279,
1203,
17,
2815,
930,
363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
3511,
1350,
12,
1042,
276,
16,
8549,
3919,
16,
987,
913,
682,
13,
288,
3639,
368,
26715,
732,
1410,
3712,
506,
4832,
5943,
716,
13955,
358,
279,
1203,
17,
2815,
930,
363... | |
Dimension size = getPreferredSize(c); size.width = 32767; return size; | return new Dimension(32767, 32767); | public Dimension getMaximumSize(JComponent c) { Dimension size = getPreferredSize(c); size.width = 32767; return size; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/2fe995482ddd93e201e63c55d9ab773c376aa6f3/BasicComboBoxUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
13037,
25194,
1225,
12,
46,
1841,
276,
13,
225,
288,
565,
13037,
963,
273,
12822,
4193,
1225,
12,
71,
1769,
565,
963,
18,
2819,
273,
29317,
27,
31,
565,
327,
963,
31,
225,
289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
13037,
25194,
1225,
12,
46,
1841,
276,
13,
225,
288,
565,
13037,
963,
273,
12822,
4193,
1225,
12,
71,
1769,
565,
963,
18,
2819,
273,
29317,
27,
31,
565,
327,
963,
31,
225,
289,
... |
} catch (AxisFault axisFault) { __log.error("Error process in-only message.", axisFault); } } }); | public final void receive(final MessageContext msgContext) throws AxisFault { if (__log.isDebugEnabled()) __log.debug("Received message for " + msgContext.getAxisService().getName() + "." + msgContext.getAxisOperation().getName()); if (hasResponse(msgContext.getAxisOperation())) { // Client is expecting a response, running in the same thread MessageContext outMsgContext = Utils.createOutMessageContext(msgContext); outMsgContext.getOperationContext().addMessageContext(outMsgContext); invokeBusinessLogic(msgContext, outMsgContext); if (__log.isDebugEnabled()) { __log.debug("Reply for " + msgContext.getAxisService().getName() + "." + msgContext.getAxisOperation().getName()); __log.debug("Reply message " + outMsgContext.getEnvelope()); } AxisEngine engine = new AxisEngine( msgContext.getOperationContext().getServiceContext().getConfigurationContext()); engine.send(outMsgContext); } else { // No response expected, this thread doesn't need us _executorService.submit(new Runnable() { public void run() { try { invokeBusinessLogic(msgContext, null); } catch (AxisFault axisFault) { __log.error("Error process in-only message.", axisFault); } } }); } } | 45373 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45373/3d5d00371b775dabb3a8e74de457bb4956027a11/PXEMessageReceiver.java/clean/axis2/src/main/java/com/fs/pxe/axis2/hooks/PXEMessageReceiver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
6798,
12,
6385,
2350,
1042,
1234,
1042,
13,
1216,
15509,
7083,
288,
565,
309,
261,
972,
1330,
18,
291,
2829,
1526,
10756,
1377,
1001,
1330,
18,
4148,
2932,
8872,
883,
364,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
6798,
12,
6385,
2350,
1042,
1234,
1042,
13,
1216,
15509,
7083,
288,
565,
309,
261,
972,
1330,
18,
291,
2829,
1526,
10756,
1377,
1001,
1330,
18,
4148,
2932,
8872,
883,
364,... | |
optionsGroup.setFont(parentFont); | protected void createOptionsGroup(Composite parent) { // options group Font parentFont = parent.getFont(); Composite optionsGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = 0; optionsGroup.setLayout(layout); optionsGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL)); optionsGroup.setFont(parentFont); // overwrite... checkbox overwriteExistingFilesCheckbox = new Button(optionsGroup, SWT.CHECK | SWT.LEFT); overwriteExistingFilesCheckbox .setText(PreferencesMessages.ExportFile_overwriteExisting); overwriteExistingFilesCheckbox.setFont(parentFont); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6c0d1242419b0af01d151bee22811c04d14f68c9/WizardPreferencesPage.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
752,
1320,
1114,
12,
9400,
982,
13,
288,
202,
202,
759,
702,
1041,
202,
202,
5711,
982,
5711,
273,
982,
18,
588,
5711,
5621,
9506,
202,
9400,
702,
1114,
273,
394,
14728,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
752,
1320,
1114,
12,
9400,
982,
13,
288,
202,
202,
759,
702,
1041,
202,
202,
5711,
982,
5711,
273,
982,
18,
588,
5711,
5621,
9506,
202,
9400,
702,
1114,
273,
394,
14728,... | |
case 191: break; | case 194: break; | public Symbol next_token() throws java.io.IOException { int yyFlexInput; int yyFlexAction; int [] yyFlexTransL = YY_TRANS; int [] yyFlexRowMapL = YY_ROWMAP; int [] yyFlexAttrL = YY_ATTRIBUTE; int yyFlexPushbackPos_l = yyFlexPushbackPos = -1; boolean yy_was_pushback; while (true) { // cached fields: int yyFlexCurrentPosL; int yyFlexMarkedPosL = yyFlexMarkedPos; int yyFlexEndReadL = yyFlexEndRead; char [] yyFlexBufferL = yyFlexBuffer; char [] yyCMapL = YY_CMAP; boolean yyFlexR = false; for (yyFlexCurrentPosL = yyFlexStartRead; yyFlexCurrentPosL < yyFlexMarkedPosL; yyFlexCurrentPosL++) { switch (yyFlexBufferL[yyFlexCurrentPosL]) { case '\u000B': case '\u000C': case '\u0085': case '\u2028': case '\u2029': yyline++; yycolumn = 0; yyFlexR = false; break; case '\r': yyline++; yycolumn = 0; yyFlexR = true; break; case '\n': if (yyFlexR) yyFlexR = false; else { yyline++; yycolumn = 0; } break; default: yyFlexR = false; yycolumn++; } } if (yyFlexR) { // peek one character ahead if it is \n (if we have counted one line too much) boolean yyFlexPeek; if (yyFlexMarkedPosL < yyFlexEndReadL) yyFlexPeek = yyFlexBufferL[yyFlexMarkedPosL] == '\n'; else if (yyFlexAtEOF) yyFlexPeek = false; else { boolean eof = yyFlexRefill(); yyFlexMarkedPosL = yyFlexMarkedPos; yyFlexBufferL = yyFlexBuffer; if (eof) yyFlexPeek = false; else yyFlexPeek = yyFlexBufferL[yyFlexMarkedPosL] == '\n'; } if (yyFlexPeek) yyline--; } if (yyFlexMarkedPosL > yyFlexStartRead) { switch (yyFlexBufferL[yyFlexMarkedPosL-1]) { case '\n': case '\u000B': case '\u000C': case '\u0085': case '\u2028': case '\u2029': yyFlexAtBOL = true; break; case '\r': if (yyFlexMarkedPosL < yyFlexEndReadL) yyFlexAtBOL = yyFlexBufferL[yyFlexMarkedPosL] != '\n'; else if (yyFlexAtEOF) yyFlexAtBOL = false; else { boolean eof = yyFlexRefill(); yyFlexMarkedPosL = yyFlexMarkedPos; yyFlexBufferL = yyFlexBuffer; if (eof) yyFlexAtBOL = false; else yyFlexAtBOL = yyFlexBufferL[yyFlexMarkedPosL] != '\n'; } break; default: yyFlexAtBOL = false; } } yyFlexAction = -1; yyFlexCurrentPosL = yyFlexCurrentPos = yyFlexStartRead = yyFlexMarkedPosL; if (yyFlexAtBOL) yyFlexState = YY_LEXSTATE[yyFlexLexicalState+1]; else yyFlexState = YY_LEXSTATE[yyFlexLexicalState]; yy_was_pushback = false; yy_forAction: { while (true) { if (yyFlexCurrentPosL < yyFlexEndReadL) yyFlexInput = yyFlexBufferL[yyFlexCurrentPosL++]; else if (yyFlexAtEOF) { yyFlexInput = YYEOF; break yy_forAction; } else { // store back cached positions yyFlexCurrentPos = yyFlexCurrentPosL; yyFlexMarkedPos = yyFlexMarkedPosL; yyFlexPushbackPos = yyFlexPushbackPos_l; boolean eof = yyFlexRefill(); // get translated positions and possibly new buffer yyFlexCurrentPosL = yyFlexCurrentPos; yyFlexMarkedPosL = yyFlexMarkedPos; yyFlexBufferL = yyFlexBuffer; yyFlexEndReadL = yyFlexEndRead; yyFlexPushbackPos_l = yyFlexPushbackPos; if (eof) { yyFlexInput = YYEOF; break yy_forAction; } else { yyFlexInput = yyFlexBufferL[yyFlexCurrentPosL++]; } } int yyFlexNext = yyFlexTransL[ yyFlexRowMapL[yyFlexState] + yyCMapL[yyFlexInput] ]; if (yyFlexNext == -1) break yy_forAction; yyFlexState = yyFlexNext; int yyFlexAttributes = yyFlexAttrL[yyFlexState]; if ( (yyFlexAttributes & 2) == 2 ) yyFlexPushbackPos_l = yyFlexCurrentPosL; if ( (yyFlexAttributes & 1) == 1 ) { yy_was_pushback = (yyFlexAttributes & 4) == 4; yyFlexAction = yyFlexState; yyFlexMarkedPosL = yyFlexCurrentPosL; if ( (yyFlexAttributes & 8) == 8 ) break yy_forAction; } } } // store back cached position yyFlexMarkedPos = yyFlexMarkedPosL; if (yy_was_pushback) yyFlexMarkedPos = yyFlexPushbackPos_l; switch (yyFlexAction < 0 ? yyFlexAction : YY_ACTION[yyFlexAction]) { case 85: { return symbol(FULL); } case 141: break; case 92: { debugOption = true; } case 142: break; case 57: { return symbol(CHAR,new Character('\t')); } case 143: break; case 107: { throw new ScannerException(file,ErrorMessages.NO_BUFFER_SIZE, yyline); } case 144: break; case 91: { isYYEOF = true; } case 145: break; case 54: { return symbol(CHAR, new Character(yytext().charAt(1))); } case 146: break; case 11: { yybegin(REGEXP); } case 147: break; case 112: { isAbstract = true; } case 148: break; case 101: { initCode = conc(initCode,string); yybegin(MACROS); } case 149: break; case 45: { throw new ScannerException(file,ErrorMessages.UNEXPECTED_NL, yyline, yycolumn); } case 150: break; case 12: { return symbol_countUpdate(RBRACE, null); } case 151: break; case 74: { return symbol(REPEAT, new Integer(yytext().substring(1).trim())); } case 152: break; case 55: { return symbol(CHAR, new Character( (char) Integer.parseInt(yytext().substring(1,yytext().length()), 8))); } case 153: break; case 97: { columnCount = true; } case 154: break; case 122: { return symbol(LETTERCLASS); } case 155: break; case 15: { if (macroDefinition) { yybegin(MACROS); } return symbol(REGEXPEND); } case 156: break; case 77: { inclusive_states = true; yybegin(STATELIST); } case 157: break; case 56: { return symbol(CHAR,new Character('\n')); } case 158: break; case 81: { return symbol(MACROUSE, yytext().substring(1,yytext().length()-1)); } case 159: break; case 25: { return symbol(OPENBRACKET); } case 160: break; case 123: { throw new ScannerException(file,ErrorMessages.QUIL_INITTHROW, yyline); } case 161: break; case 126: { visibility = "private"; Skeleton.makePrivate(); } case 162: break; case 49: { commentbalance++; } case 163: break; case 9: { throw new ScannerException(file,ErrorMessages.UNKNOWN_OPTION, yyline, yycolumn); } case 164: break; case 68: { string.append('\n'); } case 165: break; case 33: { balance++; actionText.append('{'); } case 166: break; case 48: { if (commentbalance > 0) commentbalance--; else yybegin(nextState); } case 167: break; case 67: { string.append('\"'); } case 168: break; case 95: { tokenType = yytext().substring(6).trim(); } case 169: break; case 79: { return symbol_countUpdate(MACROUSE, makeMacroIdent()); } case 170: break; case 14: { return symbol(CHAR, new Character(yytext().charAt(0))); } case 171: break; case 32: { if (balance > 0) { balance--; actionText.append('}'); } else { yybegin(REGEXPSTART); Action a = new Action(actionText.toString(), action_line); actions.addElement(a); return symbol(ACTION, a); } } case 172: break; case 108: { actionText.setLength(0); yybegin(JAVA_CODE); action_line = yyline+1; return symbol_countUpdate(EOFRULE, null); } case 173: break; case 120: { isExtending = yytext().substring(9).trim(); } case 174: break; case 113: { cupSymbol = yytext().substring(8).trim(); if (cupCompatible) Out.warning(ErrorMessages.CUPSYM_AFTER_CUP, yyline); } case 175: break; case 63: { yybegin(REPEATEXP); return symbol(REPEAT, new Integer(yytext().trim().substring(1).trim())); } case 176: break; case 88: { packed = true; useRowMap = true; } case 177: break; case 27: { return symbol(PLUS); } case 178: break; case 99: { isPublic = true; } case 179: break; case 70: { string.append('\r'); } case 180: break; case 76: { inclusive_states = false; yybegin(STATELIST); } case 181: break; case 3: { userCode.append(yytext()); } case 182: break; case 19: { lookAheadUsed = true; return symbol(LOOKAHEAD); } case 183: break; case 110: { lexThrow = concExc(lexThrow,yytext().substring(8).trim()); } case 184: break; case 26: { return symbol(CLOSEBRACKET); } case 185: break; case 80: { string.append( (char) Integer.parseInt(yytext().substring(2,yytext().length()), 16)); } case 186: break; case 37: { throw new ScannerException(file,ErrorMessages.UNTERMINATED_STR, yyline, yycolumn); } case 187: break; case 111: { eofCode = conc(eofCode, " yyclose();"); eofThrow = concExc(eofThrow, "java.io.IOException"); } case 188: break; case 69: { string.append('\t'); } case 189: break; case 23: { return symbol(BANG); } case 190: break; case 17: { yybegin(CHARCLASS); return symbol(OPENCLASS); } case 191: break; case 114: { cupDebug = true; } case 192: break; case 87: { charCount = true; } case 193: break; case 58: { return symbol(CHAR,new Character('\r')); } case 194: break; case 66: { string.append( (char) Integer.parseInt(yytext().substring(1,yytext().length()), 8)); } case 195: break; case 134: { scanErrorException = yytext().substring(11).trim(); } case 196: break; case 60: { return symbol(CHAR,new Character('\b')); } case 197: break; case 35: { yybegin(REGEXP); return symbol(MORETHAN); } case 198: break; case 132: { isImplementing = concExc(isImplementing, yytext().substring(12).trim()); } case 199: break; case 78: { return symbol(CHAR, new Character( (char) Integer.parseInt(yytext().substring(2,yytext().length()), 16))); } case 200: break; case 90: { isFinal = true; } case 201: break; case 137: { return symbol(UPPERCLASS); } case 202: break; case 46: { yybegin(REGEXP); return symbol(RBRACE); } case 203: break; case 51: { Out.warning(ErrorMessages.NOT_AT_BOL, yyline); yypushback(1); } case 204: break; case 28: { return symbol(QUESTION); } case 205: break; case 36: { string.append(yytext()); } case 206: break; case 135: { initThrow = concExc(initThrow,string); yybegin(MACROS); } case 207: break; case 140: { return symbol(JLETTERDIGITCLASS); } case 208: break; case 53: { nextState = REGEXPSTART; yybegin(COMMENT); } case 209: break; case 130: { eofThrow = concExc(eofThrow,string); yybegin(MACROS); } case 210: break; case 61: { actionText.setLength(0); yybegin(JAVA_CODE); action_line = yyline+1; return symbol(REGEXPEND); } case 211: break; case 138: { return symbol(LOWERCLASS); } case 212: break; case 38: { yybegin(nextState); return symbol(STRING, string.toString()); } case 213: break; case 82: { classCode = conc(classCode,string); yybegin(MACROS); } case 214: break; case 8: { return symbol(IDENT, yytext()); } case 215: break; case 43: { return symbol(HAT); } case 216: break; case 29: { lookAheadUsed = true; return symbol(DOLLAR); } case 217: break; case 124: { eofThrow = concExc(eofThrow,yytext().substring(10).trim()); } case 218: break; case 5: { states.insert(yytext(),inclusive_states); } case 219: break; case 84: { cupCompatible = true; isImplementing = concExc(isImplementing, "java_cup.runtime.Scanner"); if (functionName == null) functionName = "next_token"; if (tokenType == null) tokenType = "java_cup.runtime.Symbol"; if (eofVal == null) eofVal = "return new java_cup.runtime.Symbol("+cupSymbol+".EOF);"; eofCode = conc(eofCode, " yyclose();"); eofThrow = concExc(eofThrow, "java.io.IOException"); } case 220: break; case 127: { standalone = true; isInteger = true; } case 221: break; case 4: { throw new ScannerException(file,ErrorMessages.UNEXPECTED_CHAR, yyline, yycolumn); } case 222: break; case 47: { t.start(); yybegin(MACROS); macroDefinition = true; return symbol(USERCODE,userCode); } case 223: break; case 59: { return symbol(CHAR,new Character('\f')); } case 224: break; case 94: { eofCode = conc(eofCode,string); yybegin(MACROS); } case 225: break; case 65: { string.append(yytext().charAt(1)); } case 226: break; case 115: { caseless = true; } case 227: break; case 39: { throw new ScannerException(file,ErrorMessages.EOL_IN_CHARCLASS,yyline,yycolumn); } case 228: break; case 117: { return symbol(DIGITCLASS); } case 229: break; case 64: { if (macroDefinition) { yybegin(EATWSPNL); return symbol(BAR); } else { yybegin(REGEXPSTART); return symbol(NOACTION); } } case 230: break; case 30: { bolUsed = true; return symbol(HAT); } case 231: break; case 105: { throw new ScannerException(file,ErrorMessages.QUIL_CUPSYM, yyline); } case 232: break; case 102: { isIntWrap = true; } case 233: break; case 41: { if (balance > 0) balance--; else yybegin(REGEXP); return symbol(CLOSECLASS); } case 234: break; case 116: { bufferSize = Integer.parseInt(yytext().substring(8).trim()); } case 235: break; case 31: { actionText.append(yytext()); } case 236: break; case 86: { lineCount = true; } case 237: break; case 128: { throw new ScannerException(file,ErrorMessages.QUIL_SCANERROR, yyline); } case 238: break; case 104: { throw new ScannerException(file,ErrorMessages.QUIL_THROW, yyline); } case 239: break; case 83: { isInteger = true; } case 240: break; case 129: { return symbol(JLETTERCLASS); } case 241: break; case 98: { isInteger = true; if (eofVal == null) eofVal = "return 0;"; eofCode = conc(eofCode, " yyclose();"); eofThrow = concExc(eofThrow, "java.io.IOException"); } case 242: break; case 18: { return symbol(STAR); } case 243: break; case 121: { throw new ScannerException(file,ErrorMessages.QUIL_EOFTHROW, yyline); } case 244: break; case 44: { return symbol(DASH); } case 245: break; case 106: { className = yytext().substring(7).trim(); } case 246: break; case 62: { nextState = REGEXP; yybegin(COMMENT); } case 247: break; case 136: { lexThrow = concExc(lexThrow,yytext().substring(12).trim()); } case 248: break; case 22: { return symbol(BAR); } case 249: break; case 125: { functionName = yytext().substring(10).trim(); } case 250: break; case 13: { yybegin(STATES); return symbol_countUpdate(LESSTHAN, null); } case 251: break; case 119: { eofVal = string.toString(); yybegin(MACROS); } case 252: break; case 73: { yypushback(1); yycolumn--; return symbol(CHAR, new Character(yytext().charAt(0))); } case 253: break; case 24: { return symbol(TILDE); } case 254: break; case 139: { lexThrow = concExc(lexThrow,string); yybegin(MACROS); } case 255: break; case 103: { notUnix = true; } case 256: break; case 89: { packed = false; useRowMap = true; } case 257: break; case 20: { string.setLength(0); nextState = REGEXP; yybegin(STRING_CONTENT); } case 258: break; case 2: { /* ignore */ } case 259: break; case 93: { return symbol(UNICODE); } case 260: break; case 16: { return symbol(POINT); } case 261: break; case 72: { string.append('\b'); } case 262: break; case 21: { yybegin(REGEXPSTART); return symbol(LBRACE); } case 263: break; case 131: { initThrow = concExc(initThrow,yytext().substring(11).trim()); } case 264: break; case 96: { packed = false; useRowMap = false; } case 265: break; case 7: { yybegin(MACROS); } case 266: break; case 75: { string.setLength(0); yybegin(COPY); } case 267: break; case 42: { string.setLength(0); nextState = CHARCLASS; yybegin(STRING_CONTENT); } case 268: break; case 118: { actionText.setLength(0); yybegin(JAVA_CODE); action_line = yyline+1; return symbol(EOFRULE); } case 269: break; case 52: { macroDefinition = false; yybegin(REGEXPSTART); return symbol(DELIMITER); } case 270: break; case 50: { nextState = MACROS; yybegin(COMMENT); } case 271: break; case 10: { yybegin(REGEXP); return symbol(EQUALS); } case 272: break; case 34: { return symbol(COMMA); } case 273: break; case 1: { return symbol(EOF); } case 274: break; case 100: { throw new ScannerException(file,ErrorMessages.EOF_WO_ACTION); } case 275: break; case 71: { string.append('\f'); } case 276: break; case 40: { balance++; return symbol(OPENCLASS); } case 277: break; case 133: { throw new ScannerException(file,ErrorMessages.QUIL_YYLEXTHROW, yyline); } case 278: break; case 109: { File f = new File(yytext().substring(9).trim()); if ( !f.canRead() ) throw new ScannerException(file,ErrorMessages.NOT_READABLE, yyline); // check for cycle if (files.search(f) > 0) throw new ScannerException(file,ErrorMessages.FILE_CYCLE, yyline); try { yypushStream( new FileReader(f) ); files.push(file); file = f; Out.println("Including \""+file+"\""); } catch (FileNotFoundException e) { throw new ScannerException(file,ErrorMessages.NOT_READABLE, yyline); } } case 279: break; case 6: { } case 280: break; default: if (yyFlexInput == YYEOF && yyFlexStartRead == yyFlexCurrentPos) { yyFlexAtEOF = true; yyFlexDoEOF(); switch (yyFlexLexicalState) { case STRING_CONTENT: { throw new ScannerException(file,ErrorMessages.EOF_IN_STRING); } case 745: break; case MACROS: { if ( yymoreStreams() ) { file = (File) files.pop(); yypopStream(); } else throw new ScannerException(file,ErrorMessages.EOF_IN_MACROS); } case 746: break; case STATELIST: { throw new ScannerException(file,ErrorMessages.EOF_IN_MACROS); } case 747: break; case CHARCLASS: { throw new ScannerException(file,ErrorMessages.EOF_IN_REGEXP); } case 748: break; case JAVA_CODE: { throw new ScannerException(file,ErrorMessages.EOF_IN_ACTION, action_line-1); } case 749: break; case REPEATEXP: { throw new ScannerException(file,ErrorMessages.EOF_IN_REGEXP); } case 750: break; case COMMENT: { throw new ScannerException(file,ErrorMessages.EOF_IN_COMMENT); } case 751: break; case STATES: { throw new ScannerException(file,ErrorMessages.EOF_IN_STATES); } case 752: break; case COPY: { throw new ScannerException(file,ErrorMessages.EOF_IN_MACROS); } case 753: break; default: { if ( yymoreStreams() ) { file = (File) files.pop(); yypopStream(); } else return symbol(EOF); } } } else { yyFlexScanError(YY_NO_MATCH); } } } } | 6220 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6220/9b61944465740d14ca2a4b7d70253b3cd65d7570/LexScan.java/clean/jflex/src/JFlex/LexScan.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
8565,
1024,
67,
2316,
1435,
1216,
2252,
18,
1594,
18,
14106,
288,
565,
509,
9016,
19667,
1210,
31,
565,
509,
9016,
19667,
1803,
31,
565,
509,
5378,
9016,
19667,
1429,
48,
273,
1624,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8565,
1024,
67,
2316,
1435,
1216,
2252,
18,
1594,
18,
14106,
288,
565,
509,
9016,
19667,
1210,
31,
565,
509,
9016,
19667,
1803,
31,
565,
509,
5378,
9016,
19667,
1429,
48,
273,
1624,... |
public void testSkip() { byte[] data = new byte[] {-127, -100, -50, -10, -1, 0, 1, 10, 50, 127}; | public void testSkip() throws Exception { byte[] data = new byte[] { -127, -100, -50, -10, -1, 0, 1, 10, 50, 127 }; | public void testSkip() { byte[] data = new byte[] {-127, -100, -50, -10, -1, 0, 1, 10, 50, 127}; TestInputStream tis = new TestInputStream(data); CipherInputStream cis = new CipherInputStream(tis, new NullCipher()); try { int expected = data.length; byte[] result = new byte[expected]; int skipped = (int) cis.skip(2); int ind = skipped; int got = skipped + cis.read(result, 0, 1); // the number of got bytes while (true) { for (int j=0; j<got-ind; j++) { if (result[j] != data[ind+j]) { fail("read(byte[] b, int off, int len) " + "returned incorrect data: Expected " + data[ind+j] + ", got: " + result[j]); } } if (got == expected) { break; } else if (got > expected) { fail("The data returned by " + "read(byte[] b, int off, int len) " + "is larger than expected."); } else { ind = got; got += cis.read(result, 0, 1); } } if ((got = cis.read(result, 0, 1)) != -1) { fail("read() should return -1 at the end of the stream. " + "Output is: " + got + "."); } } catch (NullPointerException e) { e.printStackTrace(); fail("Unexpected NullPointerException was thrown."); } catch (IOException e) { e.printStackTrace(); fail("Unexpected IOException was thrown."); } } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/4d76bfb2eadb70e06c48c35a604c83b3f0eefc76/CipherInputStreamTest.java/clean/modules/crypto/src/test/api/java.injected/javax/crypto/CipherInputStreamTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
6368,
1435,
288,
3639,
1160,
8526,
501,
273,
394,
1160,
8526,
288,
17,
14260,
16,
300,
6625,
16,
300,
3361,
16,
300,
2163,
16,
300,
21,
16,
374,
16,
404,
16,
1728,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
6368,
1435,
288,
3639,
1160,
8526,
501,
273,
394,
1160,
8526,
288,
17,
14260,
16,
300,
6625,
16,
300,
3361,
16,
300,
2163,
16,
300,
21,
16,
374,
16,
404,
16,
1728,
16... |
((ShortMessage) msg).setMessage(runningStatus, data1, 0); | ((ShortMessage) msg).setMessage((int) (buf[0] & 0xff), c, 0); | private void addToList(int c) throws InvalidMidiDataException { MidiMessage msg; if ((c & 0x80) == 0x80) { // status byte if ((c & 0xf8) == 0xf8 // System Real Time Message || c == ShortMessage.TUNE_REQUEST) { // 0 byte message msg = (MidiMessage) new ShortMessage(); ((ShortMessage) msg).setMessage(c); list.add(msg); } else if (c == SysexMessage.SYSTEM_EXCLUSIVE) { buf[0] = (byte) c; size = 1; } else if (c == ShortMessage.END_OF_EXCLUSIVE && runningStatus == SysexMessage.SYSTEM_EXCLUSIVE) { byte[] d = new byte[size + 1]; System.arraycopy(buf, 0, d, 0, size); d[size++] = (byte) c; msg = (MidiMessage) new SysexMessage(); ((SysexMessage) msg).setMessage(d, size); list.add(msg); } if ((c & 0xf8) != 0xf8) { // System Real Time Message // should not affect runningStatus nor thirdByte runningStatus = c; thirdByte = false; } } else { // data byte if (thirdByte) { thirdByte = false; msg = (MidiMessage) new ShortMessage(); ((ShortMessage) msg).setMessage(runningStatus, data1, c); list.add(msg); } else if (runningStatus == 0) { ; // ignore } else if (runningStatus < ShortMessage.PROGRAM_CHANGE || (runningStatus >= ShortMessage.PITCH_BEND && runningStatus < SysexMessage.SYSTEM_EXCLUSIVE)) { // 2 byte message thirdByte = true; data1 = c; } else if (runningStatus == ShortMessage.SONG_POSITION_POINTER) { // 2 byte message runningStatus = 0; thirdByte = true; data1 = c; } else if (runningStatus >= ShortMessage.PROGRAM_CHANGE && runningStatus < ShortMessage.PITCH_BEND) { // 1 byte message msg = (MidiMessage) new ShortMessage(); ((ShortMessage) msg).setMessage(runningStatus, data1, 0); list.add(msg); } else if (runningStatus == ShortMessage.MIDI_TIME_CODE || runningStatus == ShortMessage.SONG_SELECT) { // 1 byte message runningStatus = 0; msg = (MidiMessage) new ShortMessage(); ((ShortMessage) msg).setMessage(runningStatus, data1, 0); list.add(msg); } else if (runningStatus == SysexMessage.SYSTEM_EXCLUSIVE) { buf[size++] = (byte) c; if (size == buf.length) { // Sysex data buffer is full byte[] d = new byte[size]; System.arraycopy(buf, 0, d, 0, size); msg = (MidiMessage) new SysexMessage(); ((SysexMessage) msg).setMessage(d, size); list.add(msg); // See SysexMessage document. buf[0] = (byte) SysexMessage.SPECIAL_SYSTEM_EXCLUSIVE; size = 1; } } else { // f4 (undef), f5 (undef), f6 (Tune Request), f7 (EOX) runningStatus = 0; // ignore Status } } } | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/c48c84bed3b2cb56ce951476fc4eba7c57e23e4b/LinuxMidiWrapper.java/clean/JSynthLib/core/LinuxMidiWrapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1152,
918,
9604,
682,
12,
474,
276,
13,
1216,
1962,
20711,
77,
22480,
288,
1082,
565,
490,
350,
77,
1079,
1234,
31,
1082,
565,
309,
14015,
71,
473,
374,
92,
3672,
13,
422,
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,
3196,
202,
1152,
918,
9604,
682,
12,
474,
276,
13,
1216,
1962,
20711,
77,
22480,
288,
1082,
565,
490,
350,
77,
1079,
1234,
31,
1082,
565,
309,
14015,
71,
473,
374,
92,
3672,
13,
422,
374,
... |
String expected2 = "<br> <br><b>Next Build Starts At:</b><br>" + formatter.format(new Date(date.getTime() + (800 * 1000))); | String expected2 = "<span class=\"link\">Next Build Starts At:<br>" + formatter.format(new Date(date.getTime() + (800 * 1000))) + "</span>"; | public void testWriteFile() { CurrentBuildStatusPublisher cbsb = new CurrentBuildStatusPublisher(); cbsb.setFile("_testCurrentBuildStatus.txt"); Date date = new Date(); try { cbsb.writeFile(date, 300); SimpleDateFormat formatter = new SimpleDateFormat("MMM/dd/yyyy HH:mm"); String expected = "<br> <br><b>Next Build Starts At:</b><br>" + formatter.format(new Date(date.getTime() + (300 * 1000))); assertEquals(expected, readFileToString("_testCurrentBuildStatus.txt")); cbsb.setDateFormat("dd/MMM/yyyy"); cbsb.writeFile(date, 800); formatter = new SimpleDateFormat("dd/MMM/yyyy"); String expected2 = "<br> <br><b>Next Build Starts At:</b><br>" + formatter.format(new Date(date.getTime() + (800 * 1000))); assertEquals(expected2, readFileToString("_testCurrentBuildStatus.txt")); } catch (CruiseControlException cce2) { cce2.printStackTrace(); } } | 52149 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52149/0619a6f1a2906dbd2d9529c6cb0ec549d56961a2/CurrentBuildStatusPublisherTest.java/clean/main/test/net/sourceforge/cruisecontrol/publishers/CurrentBuildStatusPublisherTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
3067,
812,
1435,
288,
3639,
6562,
3116,
1482,
15960,
276,
2038,
70,
273,
394,
6562,
3116,
1482,
15960,
5621,
3639,
276,
2038,
70,
18,
542,
812,
2932,
67,
3813,
3935,
3116... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
3067,
812,
1435,
288,
3639,
6562,
3116,
1482,
15960,
276,
2038,
70,
273,
394,
6562,
3116,
1482,
15960,
5621,
3639,
276,
2038,
70,
18,
542,
812,
2932,
67,
3813,
3935,
3116... |
String[] ext = {"html", "htm"}; sbFileFilter saveFileFilter = new sbFileFilter(ext, "HTML"); fileChooser.setFileFilter(saveFileFilter); fileChooser.setSelectedFile(new File(myRecipe.getName() + ".html")); int returnVal = fileChooser.showSaveDialog(jMenuBar1); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = fileChooser.getSelectedFile(); try { saveAsHTML(file, "recipeToHtml.xslt", null); } catch (Exception e) { showError(e); } } else { Debug.print("Save command cancelled by user.\n"); } } | saveAs(); } | public void actionPerformed(ActionEvent evt) { // Show save dialog; this method does // not return until the dialog is closed String[] ext = {"html", "htm"}; sbFileFilter saveFileFilter = new sbFileFilter(ext, "HTML"); fileChooser.setFileFilter(saveFileFilter); fileChooser.setSelectedFile(new File(myRecipe.getName() + ".html")); int returnVal = fileChooser.showSaveDialog(jMenuBar1); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = fileChooser.getSelectedFile(); //This is where a real application would save the file. try { saveAsHTML(file, "recipeToHtml.xslt", null); } catch (Exception e) { showError(e); } } else { Debug.print("Save command cancelled by user.\n"); } } | 51683 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51683/595e2c465e03931b6041138c6055378752eb9d98/StrangeSwing.java/clean/src/ca/strangebrew/ui/swing/StrangeSwing.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
20982,
202,
482,
918,
26100,
12,
1803,
1133,
6324,
13,
288,
6862,
6862,
202,
759,
9674,
1923,
6176,
31,
333,
707,
1552,
6862,
6862,
202,
759,
486,
327,
3180,
326,
6176,
353,
4375,
6862,
25083,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
20982,
202,
482,
918,
26100,
12,
1803,
1133,
6324,
13,
288,
6862,
6862,
202,
759,
9674,
1923,
6176,
31,
333,
707,
1552,
6862,
6862,
202,
759,
486,
327,
3180,
326,
6176,
353,
4375,
6862,
25083,... |
initializeShortCutMenu(category, (WizardCollectionElement) children[i], activeIds); | initializeShortCutMenu(category, children[i], activeIds); | private void initializeShortCutMenu(ShortcutMenu menu, WizardCollectionElement element, List activeIds) { ShortcutMenu category = new ShortcutMenu(menu, element.getId(), element .getLabel(element)); Object[] wizards = element.getWizards(); for (int i = 0; i < wizards.length; i++) { WorkbenchWizardElement wizard = (WorkbenchWizardElement) wizards[i]; category.addItem(wizard); if (activeIds.contains(wizard.getID())) category.addCheckedItem(wizard); } // @issue should not pass in null Object[] children = element.getChildren(null); for (int i = 0; i < children.length; i++) { initializeShortCutMenu(category, (WizardCollectionElement) children[i], activeIds); } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/3d694fa5580f66413fa910c2e54a03aaef1cec34/CustomizePerspectiveDialog.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CustomizePerspectiveDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4046,
4897,
15812,
4599,
12,
15576,
4599,
3824,
16,
5411,
678,
13412,
2532,
1046,
930,
16,
987,
2695,
2673,
13,
288,
3639,
7925,
5150,
4599,
3150,
273,
394,
7925,
5150,
4599,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4046,
4897,
15812,
4599,
12,
15576,
4599,
3824,
16,
5411,
678,
13412,
2532,
1046,
930,
16,
987,
2695,
2673,
13,
288,
3639,
7925,
5150,
4599,
3150,
273,
394,
7925,
5150,
4599,
1... |
protected abstract String getTaskId(); | protected String getTaskId() { return page.getTaskId(); } | protected abstract String getTaskId(); | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/9f7b425ebe40b57391edde8836bf0743b3191033/AbstractAddExistingTaskWizard.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/wizards/AbstractAddExistingTaskWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8770,
514,
11478,
548,
5621,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8770,
514,
11478,
548,
5621,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
case ( LineStyle.DASH_DOTTED ) : | case ( LineStyle.DASH_DOTTED ) : | public void drawArea( AreaRenderEvent are ) throws ChartException { // CHECK IF THE LINE ATTRIBUTES ARE CORRECTLY DEFINED final LineAttributes lia = are.getOutline( ); if ( !validateLineAttributes( are.getSource( ), lia ) ) { return; } // SETUP THE FOREGROUND COLOR (DARKER BACKGROUND IF DEFINED AS NULL) final Color cFG = (Color) validateEdgeColor( lia.getColor( ), are.getBackground( ), _ids ); if ( cFG == null ) // IF UNDEFINED, EXIT { return; } // BUILD THE GENERAL PATH STRUCTURE final Path gp = new Path( ( (SwtDisplayServer) _ids ).getDevice( ) ); PrimitiveRenderEvent pre; for ( int i = 0; i < are.getElementCount( ); i++ ) { pre = are.getElement( i ); if ( pre instanceof ArcRenderEvent ) { final ArcRenderEvent acre = (ArcRenderEvent) pre; gp.addArc( (float) acre.getTopLeft( ).getX( ), (float) acre.getTopLeft( ).getY( ), (float) acre.getWidth( ), (float) acre.getHeight( ), (float) acre.getStartAngle( ), (float) acre.getAngleExtent( ) ); } else if ( pre instanceof LineRenderEvent ) { final LineRenderEvent lre = (LineRenderEvent) pre; gp.moveTo( (float) lre.getStart( ).getX( ), (float) lre.getStart( ).getY( ) ); gp.lineTo( (float) lre.getEnd( ).getX( ), (float) lre.getEnd( ) .getY( ) ); } } // DRAW THE PATH final int iOldLineStyle = _gc.getLineStyle( ); final int iOldLineWidth = _gc.getLineWidth( ); int iLineStyle = SWT.LINE_SOLID; switch ( lia.getStyle( ).getValue( ) ) { case ( LineStyle.DOTTED ) : iLineStyle = SWT.LINE_DOT; break; case ( LineStyle.DASH_DOTTED ) : iLineStyle = SWT.LINE_DASHDOT; break; case ( LineStyle.DASHED ) : iLineStyle = SWT.LINE_DASH; break; } _gc.setLineStyle( iLineStyle ); _gc.setLineWidth( lia.getThickness( ) ); _gc.setForeground( cFG ); R31Enhance.setAlpha( _gc, lia.getColor( ) ); _gc.drawPath( gp ); // Restore state _gc.setLineStyle( iOldLineStyle ); _gc.setLineWidth( iOldLineWidth ); // Free resource gp.dispose( ); cFG.dispose( ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/1afc1bd11b6e06b273b86fba94ff7ef3fdc3b764/SwtRendererImpl.java/buggy/chart/org.eclipse.birt.chart.device.swt/src/org/eclipse/birt/chart/device/swt/SwtRendererImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3724,
5484,
12,
16668,
3420,
1133,
854,
262,
1216,
14804,
503,
202,
95,
202,
202,
759,
14565,
11083,
12786,
14340,
14043,
18744,
432,
862,
28359,
4512,
7076,
2030,
7263,
2056... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3724,
5484,
12,
16668,
3420,
1133,
854,
262,
1216,
14804,
503,
202,
95,
202,
202,
759,
14565,
11083,
12786,
14340,
14043,
18744,
432,
862,
28359,
4512,
7076,
2030,
7263,
2056... |
boolean eof = false; while (buffer.hasRemaining()) { int bytesRead = ((ReadableByteChannel) channel).read(buffer); if (bytesRead < 0) { eof = true; break; | int bytes_read = 0; do { bytes_read = ((ReadableByteChannel) channel).read(buffer); if (bytes_read < 0) { throw new EOFException(); | public String sysread(int length) throws EOFException, BadDescriptorException, IOException { checkReadable(); checkBuffered(); ByteBuffer buffer = ByteBuffer.allocate(length); boolean eof = false; while (buffer.hasRemaining()) { int bytesRead = ((ReadableByteChannel) channel).read(buffer); if (bytesRead < 0) { eof = true; break; } if (bytesRead == 0) { // only should happen for nonblocking IO...break and allow the next call to try again break; } } if (buffer.position() == 0 && eof == true) { throw new EOFException(); } byte[] ret; if (buffer.hasRemaining()) { buffer.flip(); ret = new byte[buffer.remaining()]; buffer.get(ret); } else { ret = buffer.array(); } return RubyString.bytesToString(ret); } | 45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/404fdac0a79f1b57c3fb97914fbafb91618ca119/IOHandlerNio.java/clean/src/org/jruby/util/IOHandlerNio.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2589,
896,
12,
474,
769,
13,
1216,
30051,
16,
6107,
3187,
503,
16,
1860,
288,
3639,
866,
14151,
5621,
3639,
866,
17947,
5621,
202,
3639,
7400,
1613,
273,
7400,
18,
16247,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2589,
896,
12,
474,
769,
13,
1216,
30051,
16,
6107,
3187,
503,
16,
1860,
288,
3639,
866,
14151,
5621,
3639,
866,
17947,
5621,
202,
3639,
7400,
1613,
273,
7400,
18,
16247,
12,
... |
if (node.getType() == Constants.NODE_BLOCK_PASS) { | if (node.getType() == Constants.NODE_ARRAY && node.getNextNode() == null) { return node.getHeadNode(); } else if (node.getType() == Constants.NODE_BLOCK_PASS) { | public Node ret_args(Node node) { if (node != null) { if (node.getType() == Constants.NODE_BLOCK_PASS) { rb_compile_error("block argument should not be given"); } } return node; } | 46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/fe5b7835d80b52a0683d503660a7f722b7af69b1/ParserHelper.java/clean/org/jruby/parser/ParserHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2029,
325,
67,
1968,
12,
907,
756,
13,
288,
3639,
309,
261,
2159,
480,
446,
13,
288,
5411,
309,
261,
2159,
18,
588,
559,
1435,
422,
5245,
18,
8744,
67,
8552,
597,
756,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2029,
325,
67,
1968,
12,
907,
756,
13,
288,
3639,
309,
261,
2159,
480,
446,
13,
288,
5411,
309,
261,
2159,
18,
588,
559,
1435,
422,
5245,
18,
8744,
67,
8552,
597,
756,
18,
588,
... |
while (it.hasNext() && !keyfound) { key = (String)it.next(); if (key.startsWith(rc.OID)) keyfound = true; | while (question.sequenceHasMore()) { question.startSequence(); rc.lOID = question.fetchOID(); rc.OID = (rc.lOID.length == 0)?".":""; for (int i = 0; i < rc.lOID.length ; i++) rc.OID += (i==0?"":".") + rc.lOID[i]; question.fetchNull(); question.endSequence(); replyAddOID(reply, rc); | public void run() { try { socket = new DatagramSocket(port, InetAddress.getByName("localhost")); } catch (IOException e) { e.printStackTrace(); return ; } // make smaller.... 0484 enough? byte[] buf = new byte[65535]; DatagramPacket packet = new DatagramPacket(buf, buf.length); while (socket.isBound()) { try { socket.receive(packet); RequestContainer rc = new RequestContainer(); parseRequest(buf, rc); int replylength = 0; boolean keyfound = false; //DataHandler dh = null; Iterator it = alldata.keySet().iterator(); String key = ""; if (rc.OID.length() == 0) rc.OID = ""; while (it.hasNext() && !keyfound) { key = (String)it.next(); //System.err.println("is '"+ rc.OID + "' in: " + key); if (key.startsWith(rc.OID)) keyfound = true; } // keyfound /\ (equal -> hasnext) //System.err.println("("+keyfound+" && (!"+key.equals(rc.OID)+" || "+it.hasNext()+"))"); if (keyfound && (!key.equals(rc.OID) || it.hasNext())) { key = key.equals(rc.OID)?(String)it.next():key; Object df = alldata.get(key); //Object key = null; Object data = null; //dh = (DataHandler)alldata.get(key); //rc.lOID = (long[])dh.lOID.clone(); if (df instanceof DataFetcher) { data = ((DataFetcher)df).getSNMPData(); } else if (df instanceof MultiplexedDataFetcher) { data = ((MultiplexedDataFetcher)df).getSNMPData(key); if (data == null) data = ((MultiplexedDataFetcher)df).getSNMPData(".1.3."+key); } else data = new Integer(0); rc.lOID = splitToLong(key); //System.err.println(key); //for (int i = 0; i < rc.lOID.length ; i++) // System.err.print("." + rc.lOID[i]); replylength = makeIntReply(buf, rc, data); } else { if (rc.lOID.length > 0) rc.lOID[0] = 100; else { rc.lOID = new long[1]; rc.lOID[0] = 0; } replylength = makeIntReply(buf, rc, new Integer(1)); } // send the response to the client at "address" and "port" InetAddress address = packet.getAddress(); int port = packet.getPort(); packet = new DatagramPacket(buf, replylength, address, port); socket.send(packet); } catch (IOException e) { e.printStackTrace(); break; } catch (BadFormatException e) { e.printStackTrace(); //System.err.println(e.toString()); } catch (ArrayIndexOutOfBoundsException e) { e.printStackTrace(); // not much to do.. ignore the request and it'll time out } } socket.close(); } | 51738 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51738/dc41050349099e4bc34e8b2967ee63de226b514c/SNMPAgent.java/clean/src/snmplib/SNMPAgent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
377,
202,
698,
288,
377,
202,
202,
7814,
273,
394,
6168,
17049,
4534,
12,
655,
16,
14218,
18,
588,
5911,
2932,
13014,
7923,
1769,
377,
202,
97,
1044,
261,
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,
918,
1086,
1435,
288,
377,
202,
698,
288,
377,
202,
202,
7814,
273,
394,
6168,
17049,
4534,
12,
655,
16,
14218,
18,
588,
5911,
2932,
13014,
7923,
1769,
377,
202,
97,
1044,
261,
14... |
_context.messageRegistry().registerPending(outM); | getContext().messageRegistry().registerPending(outM); | private void send() { if (_sent) { if (_log.shouldLog(Log.WARN)) _log.warn("Not resending!", new Exception("blah")); return; } _sent = true; Hash to = _router.getIdentity().getHash(); Hash us = _context.router().getRouterInfo().getIdentity().getHash(); if (us.equals(to)) { if (_selector != null) { OutNetMessage outM = new OutNetMessage(_context); outM.setExpiration(_expiration); outM.setMessage(_message); outM.setOnFailedReplyJob(_onFail); outM.setOnFailedSendJob(_onFail); outM.setOnReplyJob(_onSuccess); outM.setOnSendJob(_onSend); outM.setPriority(_priority); outM.setReplySelector(_selector); outM.setTarget(_router); _context.messageRegistry().registerPending(outM); } if (_onSend != null) _context.jobQueue().addJob(_onSend); InNetMessage msg = new InNetMessage(_context); msg.setFromRouter(_router.getIdentity()); msg.setMessage(_message); _context.inNetMessagePool().add(msg); if (_log.shouldLog(Log.DEBUG)) _log.debug("Adding " + _message.getClass().getName() + " to inbound message pool as it was destined for ourselves"); //_log.debug("debug", _createdBy); } else { OutNetMessage msg = new OutNetMessage(_context); msg.setExpiration(_expiration); msg.setMessage(_message); msg.setOnFailedReplyJob(_onFail); msg.setOnFailedSendJob(_onFail); msg.setOnReplyJob(_onSuccess); msg.setOnSendJob(_onSend); msg.setPriority(_priority); msg.setReplySelector(_selector); msg.setTarget(_router); _context.outNetMessagePool().add(msg); if (_log.shouldLog(Log.DEBUG)) _log.debug("Adding " + _message.getClass().getName() + " to outbound message pool targeting " + _router.getIdentity().getHash().toBase64()); //_log.debug("Message pooled: " + _message); } } | 27437 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27437/e737e5c9507ed0d463dc9e45a8f63657f466b177/SendMessageDirectJob.java/clean/router/java/src/net/i2p/router/message/SendMessageDirectJob.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1366,
1435,
288,
3639,
309,
261,
67,
7569,
13,
288,
2398,
309,
261,
67,
1330,
18,
13139,
1343,
12,
1343,
18,
27999,
3719,
7734,
389,
1330,
18,
8935,
2932,
1248,
400,
2846,
5,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1366,
1435,
288,
3639,
309,
261,
67,
7569,
13,
288,
2398,
309,
261,
67,
1330,
18,
13139,
1343,
12,
1343,
18,
27999,
3719,
7734,
389,
1330,
18,
8935,
2932,
1248,
400,
2846,
5,... |
nestingOfWith = savedNestingOfWith; | private Node function(int functionType) throws IOException, ParserException { int syntheticType = functionType; int baseLineno = ts.getLineno(); // line number where source starts int functionSourceStart = decompiler.markFunctionStart(functionType); String name; Node memberExprNode = null; if (ts.matchToken(Token.NAME)) { name = ts.getString(); decompiler.addName(name); if (!ts.matchToken(Token.LP)) { if (compilerEnv.allowMemberExprAsFunctionName) { // Extension to ECMA: if 'function <name>' does not follow // by '(', assume <name> starts memberExpr Node memberExprHead = nf.createName(name); name = ""; memberExprNode = memberExprTail(false, memberExprHead); } mustMatchToken(Token.LP, "msg.no.paren.parms"); } } else if (ts.matchToken(Token.LP)) { // Anonymous function name = ""; } else { name = ""; if (compilerEnv.allowMemberExprAsFunctionName) { // Note that memberExpr can not start with '(' like // in function (1+2).toString(), because 'function (' already // processed as anonymous function memberExprNode = memberExpr(false); } mustMatchToken(Token.LP, "msg.no.paren.parms"); } if (memberExprNode != null) { syntheticType = FunctionNode.FUNCTION_EXPRESSION; } boolean nested = insideFunction(); FunctionNode fnNode = nf.createFunction(name); if (nested) { // Nested functions must check their 'this' value to insure // it is not an activation object: see 10.1.6 Activation Object fnNode.setCheckThis(); } if (nested || nestingOfWith > 0) { // 1. Nested functions are not affected by the dynamic scope flag // as dynamic scope is already a parent of their scope. // 2. Functions defined under the with statement also immune to // this setup, in which case dynamic scope is ignored in favor // of with object. fnNode.setIgnoreDynamicScope(); } int functionIndex = currentScriptOrFn.addFunction(fnNode); int functionSourceEnd; ScriptOrFnNode savedScriptOrFn = currentScriptOrFn; currentScriptOrFn = fnNode; int savedNestingOfWith = nestingOfWith; nestingOfWith = 0; Node body; String source; try { decompiler.addToken(Token.LP); if (!ts.matchToken(Token.RP)) { boolean first = true; do { if (!first) decompiler.addToken(Token.COMMA); first = false; mustMatchToken(Token.NAME, "msg.no.parm"); String s = ts.getString(); if (fnNode.hasParamOrVar(s)) { ts.reportCurrentLineWarning(Context.getMessage1( "msg.dup.parms", s)); } fnNode.addParam(s); decompiler.addName(s); } while (ts.matchToken(Token.COMMA)); mustMatchToken(Token.RP, "msg.no.paren.after.parms"); } decompiler.addToken(Token.RP); mustMatchToken(Token.LC, "msg.no.brace.body"); decompiler.addEOL(Token.LC); body = parseFunctionBody(); mustMatchToken(Token.RC, "msg.no.brace.after.body"); decompiler.addToken(Token.RC); functionSourceEnd = decompiler.markFunctionEnd(functionSourceStart); if (functionType != FunctionNode.FUNCTION_EXPRESSION) { checkWellTerminatedFunction(); // Add EOL only if function is not part of expression // since it gets SEMI + EOL from Statement in that case decompiler.addToken(Token.EOL); } } finally { currentScriptOrFn = savedScriptOrFn; nestingOfWith = savedNestingOfWith; } fnNode.setEncodedSourceBounds(functionSourceStart, functionSourceEnd); fnNode.setSourceName(ts.getSourceName()); fnNode.setBaseLineno(baseLineno); fnNode.setEndLineno(ts.getLineno()); Node pn = nf.initFunction(fnNode, functionIndex, body, syntheticType); if (memberExprNode != null) { pn = nf.initFunction(fnNode, functionIndex, body, syntheticType); pn = nf.createAssignment(memberExprNode, pn); if (functionType != FunctionNode.FUNCTION_EXPRESSION) { // XXX check JScript behavior: should it be createExprStatement? pn = nf.createExprStatementNoReturn(pn, baseLineno); } } return pn; } | 12564 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12564/78e835470e0a90ae1ee62618c62f364ed850bede/Parser.java/clean/src/org/mozilla/javascript/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
2029,
445,
12,
474,
445,
559,
13,
3639,
1216,
1860,
16,
27990,
565,
288,
3639,
509,
25535,
559,
273,
445,
559,
31,
3639,
509,
1026,
48,
267,
5764,
273,
3742,
18,
588,
48,
267,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
2029,
445,
12,
474,
445,
559,
13,
3639,
1216,
1860,
16,
27990,
565,
288,
3639,
509,
25535,
559,
273,
445,
559,
31,
3639,
509,
1026,
48,
267,
5764,
273,
3742,
18,
588,
48,
267,
5... | |
conn.commit(); conn.close(); | conn.commit(); conn.close(); | private void _removeSequence(String id) throws BioException, ChangeVetoException { Sequence seq = (Sequence) sequencesByName.get(id); if (seq != null) { seq = null; // Don't want to be holding the reference ourselves! try { Thread.sleep(100L); System.gc(); } catch (Exception ex) { ex.printStackTrace(); } seq = (Sequence) sequencesByName.get(id); if (seq != null) { throw new BioException("There are still references to sequence with ID " + id + " from this database."); } } Connection conn = null; try { conn = dataSource.getConnection(); conn.setAutoCommit(false); PreparedStatement get_sequence = conn.prepareStatement("select bioentry.bioentry_id " + "from bioentry, biodatabase " + "where bioentry.accession = ? and biodatabase.biodatabase_id = ?" ); get_sequence.setString(1, id); get_sequence.setInt(2, dbid); ResultSet rs = get_sequence.executeQuery(); boolean exists; if ((exists = rs.next())) { // For MySQL4 (default is to use InnoDB tables), delete is via a CASCADE // so only have to delete from bioentry to get all references to that // bioentry deleted DBHelper.DeleteStyle dstyle = getDBHelper().getDeleteStyle(); int bioentry_id = rs.getInt(1); if (dstyle != DBHelper.DELETE_MYSQL4) { PreparedStatement delete_reference = conn.prepareStatement("delete from bioentry_reference where bioentry_id = ?"); delete_reference.setInt(1, bioentry_id); delete_reference.executeUpdate(); delete_reference.close(); String commentTableName = getCommentTableName(); if (commentTableName != null) { PreparedStatement delete_comment = conn.prepareStatement("delete from " + commentTableName + " where bioentry_id = ?"); delete_comment.setInt(1, bioentry_id); delete_comment.executeUpdate(); delete_comment.close(); } PreparedStatement delete_qv = conn.prepareStatement("delete from bioentry_qualifier_value where bioentry_id = ?"); delete_qv.setInt(1, bioentry_id); delete_qv.executeUpdate(); delete_qv.close(); ArrayList generic_ids = null; // default delete style will cache seqfeature_id's that need to be deleted PreparedStatement delete_locs; // MySQL4 part to be removed if (dstyle == DBHelper.DELETE_MYSQL4) { delete_locs = conn.prepareStatement("delete from location" + " using location, seqfeature" + " where location.seqfeature_id = seqfeature.seqfeature_id and" + " seqfeature.bioentry_id = ?"); delete_locs.setInt(1, bioentry_id); delete_locs.executeUpdate(); delete_locs.close(); } else if (dstyle == DBHelper.DELETE_POSTGRESQL) { delete_locs = conn.prepareStatement("delete from location" + " where location.seqfeature_id = seqfeature.seqfeature_id and" + " seqfeature.bioentry_id = ?"); delete_locs.setInt(1, bioentry_id); delete_locs.executeUpdate(); delete_locs.close(); } else { delete_locs = conn.prepareStatement("delete from location where seqfeature_id = ?"); PreparedStatement get_seqfeats = conn.prepareStatement("select seqfeature_id" + " from seqfeature" + " where bioentry_id = ?" ); get_seqfeats.setInt(1, bioentry_id); ResultSet sfids = get_seqfeats.executeQuery(); generic_ids = new ArrayList(); while (sfids.next()) { int sfid = sfids.getInt(1); generic_ids.add(new Integer(sfid)); delete_locs.setInt(1, sfid); delete_locs.executeUpdate(); } sfids.close(); get_seqfeats.close(); } delete_locs.close(); PreparedStatement delete_fqv; // MySQL4 part to be removed if (dstyle == DBHelper.DELETE_MYSQL4) { delete_fqv = conn.prepareStatement("delete from seqfeature_qualifier_value" + " using seqfeature_qualifier_value, seqfeature" + " where seqfeature_qualifier_value.seqfeature_id = seqfeature.seqfeature_id" + " and seqfeature.bioentry_id = ?"); delete_fqv.setInt(1, bioentry_id); delete_fqv.executeUpdate(); } else if (dstyle == DBHelper.DELETE_POSTGRESQL) { delete_fqv = conn.prepareStatement("delete from seqfeature_qualifier_value" + " where seqfeature_qualifier_value.seqfeature_id = seqfeature.seqfeature_id" + " and seqfeature.bioentry_id = ?"); delete_fqv.setInt(1, bioentry_id); delete_fqv.executeUpdate(); } else { delete_fqv = conn.prepareStatement("delete from seqfeature_qualifier_value" + " where seqfeature_qualifier_value.seqfeature_id = ?"); for (int i = 0; i < generic_ids.size(); i++) { int sfid = ((Integer) generic_ids.get(i)).intValue(); delete_fqv.setInt(1, sfid); delete_fqv.executeUpdate(); } } delete_fqv.close(); PreparedStatement delete_rel; // MySQL4 part to be removed if (dstyle == DBHelper.DELETE_MYSQL4) { delete_rel = conn.prepareStatement("delete from seqfeature_relationship" + " using seqfeature_relationship, seqfeature" + " where object_seqfeature_id = seqfeature.seqfeature_id" + " and seqfeature.bioentry_id = ?"); delete_rel.setInt(1, bioentry_id); delete_rel.executeUpdate(); } else if (dstyle == DBHelper.DELETE_POSTGRESQL) { delete_rel = conn.prepareStatement("delete from seqfeature_relationship" + " where object_seqfeature_id = seqfeature.seqfeature_id" + " and seqfeature.bioentry_id = ?"); delete_rel.setInt(1, bioentry_id); delete_rel.executeUpdate(); } else { delete_rel = conn.prepareStatement("delete from seqfeature_relationship" + " where object_seqfeature_id = ?"); for (int i = 0; i < generic_ids.size(); i++) { int sfid = ((Integer) generic_ids.get(i)).intValue(); delete_rel.setInt(1, sfid); delete_rel.executeUpdate(); } } delete_rel.close(); PreparedStatement delete_features = conn.prepareStatement("delete from seqfeature " + " where bioentry_id = ?"); delete_features.setInt(1, bioentry_id); delete_features.executeUpdate(); delete_features.close(); PreparedStatement delete_biosequence = conn.prepareStatement("delete from biosequence where bioentry_id = ?"); delete_biosequence.setInt(1, bioentry_id); delete_biosequence.executeUpdate(); delete_biosequence.close(); } // End of if for non-MYSQL4 deletion PreparedStatement delete_entry = conn.prepareStatement("delete from bioentry where bioentry_id = ?"); delete_entry.setInt(1, bioentry_id); int status = delete_entry.executeUpdate(); if (status < 1) { System.out.println("Bioentry (ID " + bioentry_id + ") failed to delete!!"); } delete_entry.close(); } rs.close(); get_sequence.close(); conn.commit(); conn.close(); if (!exists) { throw new IllegalIDException("Sequence " + id + " didn't exist"); } } catch (SQLException ex) { boolean rolledback = false; if (conn != null) { try { conn.rollback(); rolledback = true; } catch (SQLException ex2) {} } throw new BioException("Error removing from BioSQL tables" + (rolledback ? " (rolled back successfully)" : ""), ex); } } | 50397 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50397/d463061dfe03b5b4235ccc0f856e9cb3fa504c5d/BioSQLSequenceDB.java/buggy/src/org/biojava/bio/seq/db/biosql/BioSQLSequenceDB.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
389,
4479,
4021,
12,
780,
612,
13,
3639,
1216,
21209,
503,
16,
7576,
58,
11453,
503,
565,
288,
3639,
8370,
3833,
273,
261,
4021,
13,
8463,
5911,
18,
588,
12,
350,
1769,
3639,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
389,
4479,
4021,
12,
780,
612,
13,
3639,
1216,
21209,
503,
16,
7576,
58,
11453,
503,
565,
288,
3639,
8370,
3833,
273,
261,
4021,
13,
8463,
5911,
18,
588,
12,
350,
1769,
3639,... |
Commandline cl = createLabelCommandLine( (PerforceScmProviderRepository) repo, files.getBasedir(), files, tag ); | Commandline cl = createLabelsyncCommandLine( (PerforceScmProviderRepository) repo, files.getBasedir(), files, tag ); | private void syncLabel( ScmProviderRepository repo, ScmFileSet files, String tag, PerforceTagConsumer consumer ) { Commandline cl = createLabelCommandLine( (PerforceScmProviderRepository) repo, files.getBasedir(), files, tag ); try { Process proc = cl.execute(); BufferedReader br = new BufferedReader( new InputStreamReader( proc.getInputStream() ) ); String line = null; while ( ( line = br.readLine() ) != null ) { consumer.consumeLine( line ); } } catch ( CommandLineException e ) { e.printStackTrace(); } catch ( IOException e ) { e.printStackTrace(); } } | 48502 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48502/48fb7916e46e029bd6c197abc87ec050dd2f2a4c/PerforceTagCommand.java/clean/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/tag/PerforceTagCommand.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3792,
2224,
12,
2850,
81,
2249,
3305,
3538,
16,
2850,
81,
812,
694,
1390,
16,
514,
1047,
16,
5722,
5734,
1805,
5869,
4765,
262,
565,
288,
3639,
3498,
1369,
927,
273,
752,
588... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3792,
2224,
12,
2850,
81,
2249,
3305,
3538,
16,
2850,
81,
812,
694,
1390,
16,
514,
1047,
16,
5722,
5734,
1805,
5869,
4765,
262,
565,
288,
3639,
3498,
1369,
927,
273,
752,
588... |
newVisible.y -= (visible.height - newVisible.height); | newVisible.y -= visible.height - newVisible.height; | public void actionPerformed(ActionEvent e) { String command = (String) getValue(Action.NAME); boolean extendSelection = command.equals("scrollUpExtendSelection") || command.equals("scrollDownExtendSelection"); boolean changeSelection = command.equals("scrollUpChangeSelection") || command.equals("scrollDownChangeSelection"); // Disable change lead, unless we are in discontinuous mode. if (!extendSelection && !changeSelection && tree.getSelectionModel().getSelectionMode() != TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION) { changeSelection = true; } int rowCount = getRowCount(tree); if (rowCount > 0 && treeSelectionModel != null) { Dimension maxSize = tree.getSize(); TreePath lead = tree.getLeadSelectionPath(); TreePath newPath = null; Rectangle visible = tree.getVisibleRect(); if (direction == -1) // The RI handles -1 as up. { newPath = getClosestPathForLocation(tree, visible.x, visible.y); if (newPath.equals(lead)) // Corner case, adjust one page up. { visible.y = Math.max(0, visible.y - visible.height); newPath = getClosestPathForLocation(tree, visible.x, visible.y); } } else // +1 is down. { visible.y = Math.min(maxSize.height, visible.y + visible.height - 1); newPath = getClosestPathForLocation(tree, visible.x, visible.y); if (newPath.equals(lead)) // Corner case, adjust one page down. { visible.y = Math.min(maxSize.height, visible.y + visible.height - 1); newPath = getClosestPathForLocation(tree, visible.x, visible.y); } } // Determine new visible rect. Rectangle newVisible = getPathBounds(tree, newPath); newVisible.x = visible.x; newVisible.width = visible.width; if (direction == -1) { newVisible.height = visible.height; } else { newVisible.y -= (visible.height - newVisible.height); newVisible.height = visible.height; } if (extendSelection) { // Extend selection. TreePath anchorPath = tree.getAnchorSelectionPath(); if (anchorPath == null) { tree.setSelectionPath(newPath); } else { int newIndex = getRowForPath(tree, newPath); int anchorIndex = getRowForPath(tree, anchorPath); tree.setSelectionInterval(Math.min(anchorIndex, newIndex), Math.max(anchorIndex, newIndex)); tree.setAnchorSelectionPath(anchorPath); tree.setLeadSelectionPath(newPath); } } else if (changeSelection) { tree.setSelectionPath(newPath); } else // Change lead. { tree.setLeadSelectionPath(newPath); } tree.scrollRectToVisible(newVisible); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicTreeUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
565,
288,
1377,
514,
1296,
273,
261,
780,
13,
2366,
12,
1803,
18,
1985,
1769,
1377,
1250,
2133,
6233,
273,
1296,
18,
14963,
2932,
12033,
1211,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26100,
12,
1803,
1133,
425,
13,
565,
288,
1377,
514,
1296,
273,
261,
780,
13,
2366,
12,
1803,
18,
1985,
1769,
1377,
1250,
2133,
6233,
273,
1296,
18,
14963,
2932,
12033,
1211,
... |
InterMineObject refObj = (InterMineObject) TypeUtil.getFieldProxy(obj, fieldName); | InterMineObject refObj; try { refObj = (InterMineObject) TypeUtil.getFieldProxy(obj, fieldName); } catch (IllegalAccessException e) { throw new RuntimeException("failed to get field proxy for field name: " + fieldName + " in " + obj, e); } | private static Set createPKQueriesForClass(Model model, InterMineObject obj, Source source, IntToIntMap idMap, boolean queryNulls, ClassDescriptor cld) throws Exception { Set primaryKeys; if (source == null) { primaryKeys = new HashSet(PrimaryKeyUtil.getPrimaryKeys(cld).values()); } else { primaryKeys = DataLoaderHelper.getPrimaryKeys(cld, source); } Set returnSet = new LinkedHashSet(); Iterator pkSetIter = primaryKeys.iterator(); while (pkSetIter.hasNext()) { PrimaryKey pk = (PrimaryKey) pkSetIter.next(); if (!queryNulls && !objectPrimaryKeyNotNull(model, obj, cld, pk, source)) { continue; } Query query = new Query(); query.setDistinct(false); QueryClass qc = new QueryClass(cld.getType()); query.addFrom(qc); query.addToSelect(qc); ConstraintSet cs = new ConstraintSet(ConstraintOp.AND); Iterator pkIter = pk.getFieldNames().iterator(); PK: while (pkIter.hasNext()) { String fieldName = (String) pkIter.next(); FieldDescriptor fd = cld.getFieldDescriptorByName(fieldName); if (fd instanceof AttributeDescriptor) { Object value = TypeUtil.getFieldValue(obj, fieldName); if (value == null) { cs.addConstraint(new SimpleConstraint(new QueryField(qc, fieldName), ConstraintOp.IS_NULL)); } else { cs.addConstraint(new SimpleConstraint(new QueryField(qc, fieldName), ConstraintOp.EQUALS, new QueryValue(value))); } } else if (fd instanceof CollectionDescriptor) { throw new MetaDataException("A collection cannot be part of" + " a primary key"); } else if (fd instanceof ReferenceDescriptor) { InterMineObject refObj = (InterMineObject) TypeUtil.getFieldProxy(obj, fieldName); if (refObj == null) { QueryObjectReference queryObjectReference = new QueryObjectReference(qc, fieldName); cs.addConstraint(new ContainsConstraint(queryObjectReference, ConstraintOp.IS_NULL)); continue PK; } Integer destId = null; if (refObj.getId() != null) { destId = idMap.get(refObj.getId()); } if (destId == null) { if (refObj instanceof ProxyReference) { refObj = ((ProxyReference) refObj).getObject(); } Query refSubQuery = createPKQuery(model, refObj, source, idMap, queryNulls); ClassDescriptor referencedClassDescriptor = ((ReferenceDescriptor) fd).getReferencedClassDescriptor(); QueryClass qc2 = new QueryClass(referencedClassDescriptor.getType()); query.addFrom(qc2); QueryObjectReference fieldQOF = new QueryObjectReference(qc, fieldName); cs.addConstraint(new ContainsConstraint(fieldQOF, ConstraintOp.CONTAINS, qc2)); cs.addConstraint(new SubqueryConstraint(qc2, ConstraintOp.IN, refSubQuery)); } else { InterMineObject destObj = (InterMineObject) DynamicUtil.createObject(Collections.singleton(InterMineObject.class)); destObj.setId(destId); cs.addConstraint(new ContainsConstraint(new QueryObjectReference(qc, fieldName), ConstraintOp.CONTAINS, destObj)); } } } query.setConstraint(cs); returnSet.add(query); } return returnSet; } | 29158 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/29158/330b34ed302a894022fab039dbf5f2c820e912bf/DataLoaderHelper.java/clean/intermine/integrate/main/src/org/intermine/dataloader/DataLoaderHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1000,
752,
8784,
9592,
22581,
12,
1488,
938,
16,
5294,
49,
558,
921,
1081,
16,
4998,
1084,
16,
4766,
9079,
3094,
17864,
863,
612,
863,
16,
1250,
843,
31326,
16,
4766,
9079,
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,
760,
1000,
752,
8784,
9592,
22581,
12,
1488,
938,
16,
5294,
49,
558,
921,
1081,
16,
4998,
1084,
16,
4766,
9079,
3094,
17864,
863,
612,
863,
16,
1250,
843,
31326,
16,
4766,
9079,
2... |
FetchResult res = runMetadata(dm, recursionLevel, key, metaStrings, metadata, container, thisKey, true); | FetchResult res = runMetadata(dm, recursionLevel, key, metaStrings, metadata, container, thisKey, true, localOnly); | private FetchResult runMetadata(ClientMetadata dm, int recursionLevel, ClientKey key, LinkedList metaStrings, Metadata metadata, ArchiveHandler container, FreenetURI thisKey, boolean dontEnterImplicitArchives) throws MetadataParseException, FetchException, ArchiveFailureException, ArchiveRestartException { if(metadata.isSimpleManifest()) { String name = (String) metaStrings.removeFirst(); // Since metadata is a document, we just replace metadata here if(name == null) { metadata = metadata.getDefaultDocument(); } else { metadata = metadata.getDocument(name); thisKey = thisKey.pushMetaString(name); } return runMetadata(dm, recursionLevel, key, metaStrings, metadata, container, thisKey, dontEnterImplicitArchives); } else if(metadata.isArchiveManifest()) { container = ctx.archiveManager.makeHandler(thisKey, metadata.getArchiveType()); Bucket metadataBucket = container.getMetadata(archiveContext, ctx, dm, recursionLevel, true); try { metadata = Metadata.construct(metadataBucket); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR); } return runMetadata(dm, recursionLevel+1, key, metaStrings, metadata, container, thisKey, dontEnterImplicitArchives); } else if(metadata.isArchiveInternalRedirect()) { if(container == null) throw new FetchException(FetchException.NOT_IN_ARCHIVE); else { /* Implicit archive handling: * Sooner or later we reach a SimpleFileRedirect to data, a Splitfile to data, * or an ArchiveInternalRedirect to data. * * In this case, if it is an archive type, if implicit archive handling is enabled, and if * we have more meta-strings, we can try to enter it. */ if((!dontEnterImplicitArchives) && ArchiveManager.isUsableArchiveType(dm.getMIMEType()) && (!metaStrings.isEmpty())) { // Possible implicit archive inside archive? container = ctx.archiveManager.makeHandler(thisKey, ArchiveManager.getArchiveType(dm.getMIMEType())); Bucket metadataBucket = container.getMetadata(archiveContext, ctx, dm, recursionLevel, true); try { metadata = Metadata.construct(metadataBucket); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR); } return runMetadata(dm, recursionLevel+1, key, metaStrings, metadata, container, thisKey, dontEnterImplicitArchives); } Bucket result = container.get(metadata.getZIPInternalName(), archiveContext, ctx, dm, recursionLevel, true); dm.mergeNoOverwrite(metadata.getClientMetadata()); return new FetchResult(dm, result); } } else if(metadata.isMultiLevelMetadata()) { // Doesn't have to be a splitfile; could be from a ZIP or a plain file. metadata.setSimpleRedirect(); FetchResult res = runMetadata(dm, recursionLevel, key, metaStrings, metadata, container, thisKey, true); try { metadata = Metadata.construct(res.data); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR); } return runMetadata(dm, recursionLevel, key, metaStrings, metadata, container, thisKey, dontEnterImplicitArchives); } else if(metadata.isSingleFileRedirect()) { FreenetURI uri = metadata.getSingleTarget(); dm.mergeNoOverwrite(metadata.getClientMetadata()); if((!dontEnterImplicitArchives) && ArchiveManager.isUsableArchiveType(dm.getMIMEType()) && (!metaStrings.isEmpty())) { ClientKey target; try { target = ClientKey.getBaseKey(uri); } catch (MalformedURLException e1) { throw new FetchException(FetchException.INVALID_URI, "Invalid URI: "+uri); } if(!(target.isMetadata())) { // Target *is not* metadata. // Therefore target is a usable archive. // We might not have to fetch it. container = ctx.archiveManager.makeHandler(uri, ArchiveManager.getArchiveType(dm.getMIMEType())); Bucket metadataBucket = container.getMetadata(archiveContext, ctx, dm, recursionLevel, true); try { metadata = Metadata.construct(metadataBucket); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR); } return runMetadata(dm, recursionLevel+1, key, metaStrings, metadata, container, thisKey, dontEnterImplicitArchives); } } FetchResult fr = realRun(dm, recursionLevel, uri, dontEnterImplicitArchives); if(metadata.compressed) { Compressor codec = Compressor.getCompressionAlgorithmByMetadataID(metadata.compressionCodec); Bucket data = fr.data; Bucket output; try { long maxLen = ctx.maxTempLength; if(maxLen < 0) maxLen = Long.MAX_VALUE; output = codec.decompress(data, ctx.bucketFactory, maxLen); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR, e); } catch (CompressionOutputSizeException e) { throw new FetchException(FetchException.TOO_BIG); } return new FetchResult(fr, output); } return fr; } else if(metadata.isSplitfile()) { // Straight data splitfile. // Might be used by parents for something else, in which case they will set dontEnterImplicitArchives. dm.mergeNoOverwrite(metadata.getClientMetadata()); // even splitfiles can have mime types! if((!dontEnterImplicitArchives) && ArchiveManager.isUsableArchiveType(dm.getMIMEType()) && (!metaStrings.isEmpty())) { // We know target is not metadata. container = ctx.archiveManager.makeHandler(thisKey, ArchiveManager.getArchiveType(dm.getMIMEType())); Bucket metadataBucket = container.getMetadata(archiveContext, ctx, dm, recursionLevel, true); try { metadata = Metadata.construct(metadataBucket); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR, e); } return runMetadata(dm, recursionLevel+1, key, metaStrings, metadata, container, thisKey, dontEnterImplicitArchives); } FetcherContext newCtx; if(metadata.splitUseLengths) newCtx = new FetcherContext(ctx, FetcherContext.SPLITFILE_USE_LENGTHS_MASK); else newCtx = new FetcherContext(ctx, FetcherContext.SPLITFILE_DEFAULT_MASK); SplitFetcher sf = new SplitFetcher(metadata, archiveContext, newCtx, recursionLevel); Bucket sfResult = sf.fetch(); // will throw in event of error if(metadata.compressed) { Compressor codec = Compressor.getCompressionAlgorithmByMetadataID(metadata.compressionCodec); try { long maxLen = ctx.maxTempLength; if(maxLen < 0) maxLen = Long.MAX_VALUE; sfResult = codec.decompress(sfResult, ctx.bucketFactory, maxLen); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR, e); } catch (CompressionOutputSizeException e) { throw new FetchException(FetchException.TOO_BIG); } } return new FetchResult(dm, sfResult); } else { Logger.error(this, "Don't know what to do with metadata: "+metadata); throw new FetchException(FetchException.UNKNOWN_METADATA); } } | 56348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56348/308b196ee77f38c4a2c6b11b7182c054b6b5e3e6/Fetcher.java/buggy/src/freenet/client/Fetcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
8065,
1253,
1086,
2277,
12,
1227,
2277,
9113,
16,
509,
13917,
2355,
16,
2445,
653,
498,
16,
10688,
2191,
7957,
16,
1875,
202,
2277,
1982,
16,
13124,
1503,
1478,
16,
478,
2842,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8065,
1253,
1086,
2277,
12,
1227,
2277,
9113,
16,
509,
13917,
2355,
16,
2445,
653,
498,
16,
10688,
2191,
7957,
16,
1875,
202,
2277,
1982,
16,
13124,
1503,
1478,
16,
478,
2842,
... |
getCurrentProcessor().processingInstruction (this, target, data); | getCurrentProcessor().processingInstruction(this, target, data); | public void processingInstruction (String target, String data) throws SAXException { if(!m_shouldProcess) return; flushCharacters(); getCurrentProcessor().processingInstruction (this, target, data); } | 2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/6fbfc5b396871b2ddb731ea98fccffe88307b5d3/StylesheetHandler.java/clean/src/org/apache/xalan/processor/StylesheetHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
4929,
11983,
261,
780,
1018,
16,
514,
501,
13,
565,
1216,
14366,
225,
288,
565,
309,
12,
5,
81,
67,
13139,
2227,
13,
1377,
327,
31,
565,
3663,
11600,
5621,
565,
5175,
5164,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
4929,
11983,
261,
780,
1018,
16,
514,
501,
13,
565,
1216,
14366,
225,
288,
565,
309,
12,
5,
81,
67,
13139,
2227,
13,
1377,
327,
31,
565,
3663,
11600,
5621,
565,
5175,
5164,
... |
} | } else if (element instanceof AbstractTaskContainer && view != null && !Arrays.asList(view.getViewer().getExpandedElements()).contains(element)) { AbstractTaskContainer container = (AbstractTaskContainer)element; for (ITask task : container.getChildren()) { if (task instanceof AbstractRepositoryTask) { AbstractRepositoryTask containedRepositoryTask = (AbstractRepositoryTask)task; if (containedRepositoryTask.getSyncState() == RepositoryTaskSyncState.INCOMING) { return TaskListImages.getImage(TaskListImages.STATUS_NORMAL_INCOMING); } } } } | public Image getColumnImage(Object element, int columnIndex) { if (!(element instanceof ITaskListElement)) { return null; } if (columnIndex == 0) { if (element instanceof AbstractTaskContainer) { return super.getImage(element); } else { ITask task = TaskElementLabelProvider.getCorrespondingTask((ITaskListElement)element); if (task != null) { if (task.isActive()) { return TaskListImages.getImage(TaskListImages.TASK_ACTIVE); } else { if (MylarPlugin.getContextManager().hasContext(task.getHandleIdentifier())) { return TaskListImages.getImage(TaskListImages.TASK_INACTIVE_CONTEXT); } else { return TaskListImages.getImage(TaskListImages.TASK_INACTIVE); } } } else { return TaskListImages.getImage(TaskListImages.TASK_INACTIVE); } } } else if (columnIndex == 1) { if (element instanceof AbstractTaskContainer || element instanceof AbstractRepositoryQuery) { return null; } return super.getImage(element); } else if (columnIndex == 2) { if (element instanceof ITaskListElement && !(element instanceof AbstractTaskContainer)) { ITaskListElement taskElement = (ITaskListElement) element; return TaskUiUtil.getImageForPriority(PriorityLevel.fromString(taskElement.getPriority())); } } else if (columnIndex == 3) { AbstractRepositoryTask repositoryTask = null; if (element instanceof AbstractQueryHit) { repositoryTask = ((AbstractQueryHit)element).getCorrespondingTask(); } else if (element instanceof AbstractRepositoryTask) { repositoryTask = (AbstractRepositoryTask)element; } if (repositoryTask != null) { if (repositoryTask.getSyncState() == RepositoryTaskSyncState.OUTGOING) { return TaskListImages.getImage(TaskListImages.STATUS_NORMAL_OUTGOING); } else if (repositoryTask.getSyncState() == RepositoryTaskSyncState.INCOMING) { return TaskListImages.getImage(TaskListImages.STATUS_NORMAL_INCOMING); } else if (repositoryTask.getSyncState() == RepositoryTaskSyncState.CONFLICT) { return TaskListImages.getImage(TaskListImages.STATUS_NORMAL_CONFLICT); } } else if (element instanceof AbstractQueryHit){ return TaskListImages.getImage(TaskListImages.STATUS_NORMAL_INCOMING); } } return null; } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/29445a4c56c081c6ab878541ba7b32aa29d7cdb2/TaskListTableLabelProvider.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/views/TaskListTableLabelProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3421,
6716,
2040,
12,
921,
930,
16,
509,
14882,
13,
288,
202,
202,
430,
16051,
12,
2956,
1276,
467,
2174,
682,
1046,
3719,
288,
1082,
202,
2463,
446,
31,
202,
202,
97,
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,
3421,
6716,
2040,
12,
921,
930,
16,
509,
14882,
13,
288,
202,
202,
430,
16051,
12,
2956,
1276,
467,
2174,
682,
1046,
3719,
288,
1082,
202,
2463,
446,
31,
202,
202,
97,
202,
... |
public void testSecondLineProblem() { try { BraceReduction rm = doc._reduced; doc.insertString(0, "\n", null); doc.indentLine(); assertEquals("0.1", "\n", doc.getText(0, doc.getLength())); } catch( javax.swing.text.BadLocationException e) { System.out.println(e.toString()); } } | public void testSecondLineProblem() throws BadLocationException { BraceReduction rm = doc._reduced; doc.insertString(0, "\n", null); doc.indentLine(); assertEquals("0.1", "\n", doc.getText(0, doc.getLength())); } | public void testSecondLineProblem() { try { // just paren BraceReduction rm = doc._reduced; doc.insertString(0, "\n", null); doc.indentLine(); assertEquals("0.1", "\n", doc.getText(0, doc.getLength())); } catch( javax.swing.text.BadLocationException e) { System.out.println(e.toString()); } } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/62cd56918db49abf5170cd3da7ff92f86724ef97/IndentTest.java/clean/drjava/src/edu/rice/cs/drjava/IndentTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
1842,
8211,
1670,
13719,
1435,
202,
202,
95,
1082,
202,
698,
288,
9506,
202,
759,
2537,
22146,
9506,
202,
21965,
3715,
4062,
6692,
273,
997,
6315,
1118,
26372,
31,
9506,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
1842,
8211,
1670,
13719,
1435,
202,
202,
95,
1082,
202,
698,
288,
9506,
202,
759,
2537,
22146,
9506,
202,
21965,
3715,
4062,
6692,
273,
997,
6315,
1118,
26372,
31,
9506,
2... |
{ if (group == null || p == null) return false; try { EntityIdentifier ei = p.getEntityIdentifier(); IGroupMember groupMember = GroupService.getGroupMember(ei); return groupMember.isMemberOf(group); } catch (GroupsException e) { throw new RuntimeException("Unable to determine if user " + p.getFullName() + " is in group " + groupName + ".", e); } } | { if (groupKey == null || p == null) return false; IEntityGroup group = getGroup(groupKey); EntityIdentifier ei = p.getEntityIdentifier(); try { IGroupMember groupMember = GroupService.getGroupMember(ei); boolean isMember =false; if (evaluatorMode == MEMBER_OF_MODE) { isMember = groupMember.isMemberOf(group); } else { isMember = groupMember.isDeepMemberOf(group); } return isMember; } catch (GroupsException e) { throw new RuntimeException("Unable to determine if user " + p.getFullName() + " is in group " + groupName + ".", e); } } | public boolean isApplicable(IPerson p) { if (group == null || p == null) return false; try { EntityIdentifier ei = p.getEntityIdentifier(); IGroupMember groupMember = GroupService.getGroupMember(ei); return groupMember.isMemberOf(group); } catch (GroupsException e) { throw new RuntimeException("Unable to determine if user " + p.getFullName() + " is in group " + groupName + ".", e); } } | 24959 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24959/db95226861b2abe888f9ade2726c9e910a7e661b/GroupMembershipEvaluator.java/buggy/source/org/jasig/portal/layout/dlm/providers/GroupMembershipEvaluator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
353,
27873,
12,
2579,
3565,
293,
13,
565,
288,
3639,
309,
261,
1655,
422,
446,
747,
293,
422,
446,
13,
5411,
327,
629,
31,
3639,
775,
3639,
288,
5411,
3887,
3004,
13247,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
353,
27873,
12,
2579,
3565,
293,
13,
565,
288,
3639,
309,
261,
1655,
422,
446,
747,
293,
422,
446,
13,
5411,
327,
629,
31,
3639,
775,
3639,
288,
5411,
3887,
3004,
13247,
273... |
TableGroupHandle tableGroups = (TableGroupHandle) groupIter.previous( ); | TableGroupHandle tableGroups = (TableGroupHandle) groupIter .previous( ); | public List getChildren( ) { List children = new ArrayList( ); SlotHandle header = getTableHandle( ).getHeader( ); for ( Iterator headerIter = header.iterator( ); headerIter.hasNext( ); ) { children.addAll( ( (RowHandle) headerIter.next( ) ).getCells( ) .getContents( ) ); } SlotHandle group = getTableHandle( ).getGroups( ); for ( Iterator groupIter = group.iterator( ); groupIter.hasNext( ); ) { TableGroupHandle tableGroups = (TableGroupHandle) groupIter.next( ); SlotHandle groupHeaders = tableGroups.getHeader( ); for ( Iterator groupHeaderIter = groupHeaders.iterator( ); groupHeaderIter.hasNext( ); ) { children.addAll( ( (RowHandle) groupHeaderIter.next( ) ).getCells( ) .getContents( ) ); } } SlotHandle detail = getTableHandle( ).getDetail( ); for ( Iterator detailIter = detail.iterator( ); detailIter.hasNext( ); ) { children.addAll( ( (RowHandle) detailIter.next( ) ).getCells( ) .getContents( ) ); } for ( ListIterator groupIter = group.getContents( ) .listIterator( group.getCount( ) ); groupIter.hasPrevious( ); ) { TableGroupHandle tableGroups = (TableGroupHandle) groupIter.previous( ); SlotHandle groupFooters = tableGroups.getFooter( ); for ( Iterator groupFooterIter = groupFooters.iterator( ); groupFooterIter.hasNext( ); ) { children.addAll( ( (RowHandle) groupFooterIter.next( ) ).getCells( ) .getContents( ) ); } } SlotHandle footer = getTableHandle( ).getFooter( ); for ( Iterator footerIter = footer.iterator( ); footerIter.hasNext( ); ) { children.addAll( ( (RowHandle) footerIter.next( ) ).getCells( ) .getContents( ) ); } removePhantomCells( children ); return children; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/f20dffa9abb940a955b0a18cf6914d4f48216b6c/TableHandleAdapter.java/buggy/UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/core/model/schematic/TableHandleAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
10268,
12,
262,
202,
95,
202,
202,
682,
2325,
273,
394,
2407,
12,
11272,
202,
202,
8764,
3259,
1446,
273,
5638,
3259,
12,
262,
18,
588,
1864,
12,
11272,
202,
202,
1884,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
10268,
12,
262,
202,
95,
202,
202,
682,
2325,
273,
394,
2407,
12,
11272,
202,
202,
8764,
3259,
1446,
273,
5638,
3259,
12,
262,
18,
588,
1864,
12,
11272,
202,
202,
1884,
... |
public synchronized void drawImageBuffer(Graphics2D gg2d) { /** * @todo this is a hack and should be fixed at the root of the problem */ if (gg2d == null) {// System.out.println(" we got a null graphic object "); return; } synchronized (lock) { gg2d.drawImage(bi,null,0,0); // tell waiting threads to wake up lock.notify(); } } | 4212 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4212/2e0a1e5f6033c1b3ae3ded28c3fd2648fe18754f/GuiGraphicBuffer.java/buggy/src/org/tn5250j/GuiGraphicBuffer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
22043,
6459,
9446,
2040,
1892,
12,
17558,
22,
40,
14253,
22,
72,
15329,
19,
14465,
36,
88,
369,
10370,
19179,
9795,
484,
464,
13139,
2196,
12429,
270,
1136,
1632,
792,
5787,
18968,
5549,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
22043,
6459,
9446,
2040,
1892,
12,
17558,
22,
40,
14253,
22,
72,
15329,
19,
14465,
36,
88,
369,
10370,
19179,
9795,
484,
464,
13139,
2196,
12429,
270,
1136,
1632,
792,
5787,
18968,
5549,
... | ||
buffer.append(" public String toString()\n" + " {\n" + " return new ToStringBuilder(this"); | buffer.append(" public String toString()\n {\n return new ToStringBuilder(this"); | protected String createMethod(IType type) throws JavaModelException { StringBuffer buffer = new StringBuffer(); buffer.append(getJavadoc()); buffer.append(" public String toString()\n" + " {\n" + " return new ToStringBuilder(this"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ if (CCPluginPreferences.getPreferences().useCustomToStringStyle()) { buffer.append(", " + CCPluginPreferences.getPreferences().getToStringStyleClassAndConstant()); //$NON-NLS-1$ } buffer.append(")\n"); //$NON-NLS-1$ if (CCPluginPreferences.getPreferences().appendSuperToToString()) { buffer.append(".appendSuper(super.toString())\n"); //$NON-NLS-1$ } if (CCPluginPreferences.getPreferences().useJavabeanToString()) { buffer.append(buildAppenderListFromBean(type)); } else { buffer.append(buildAppenderList(type)); } buffer.append(".toString();\n}"); //$NON-NLS-1$ return buffer.toString(); } | 15454 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15454/1fb77b6c21a4e52358096b3bfab08839a81da7e2/ToStringGenerator.java/buggy/commonclipse/src/main/net/sf/commonclipse/ToStringGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
752,
1305,
12,
45,
559,
618,
13,
1216,
5110,
1488,
503,
565,
288,
3639,
6674,
1613,
273,
394,
6674,
5621,
3639,
1613,
18,
6923,
12,
588,
24060,
10663,
3639,
1613,
18,
6923,
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,
4750,
514,
752,
1305,
12,
45,
559,
618,
13,
1216,
5110,
1488,
503,
565,
288,
3639,
6674,
1613,
273,
394,
6674,
5621,
3639,
1613,
18,
6923,
12,
588,
24060,
10663,
3639,
1613,
18,
6923,
2... |
return null; | if ( input instanceof EditorInputDelegate ) { if ( ((EditorInputDelegate)input).getDelegate() == null ) return CDebugEditor.EDITOR_ID; return getEditorId( ((EditorInputDelegate)input).getDelegate(), element ); } String id = null; if ( input != null ) { IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry(); IEditorDescriptor descriptor = registry.getDefaultEditor( input.getName() ); id = (descriptor != null) ? descriptor.getId() : CUIPlugin.EDITOR_ID; } if ( CUIPlugin.EDITOR_ID.equals( id ) ) { return CDebugEditor.EDITOR_ID; } return id; | public String getEditorId( IEditorInput input, Object element ) { // TODO Auto-generated method stub return null; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/4fe2f1e7d8918c1523fe6d9bda577c522ea51134/CDebugModelPresentation.java/clean/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
336,
6946,
548,
12,
467,
6946,
1210,
810,
16,
1033,
930,
262,
288,
202,
202,
759,
2660,
8064,
17,
11168,
707,
7168,
202,
202,
2463,
446,
31,
202,
97,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
336,
6946,
548,
12,
467,
6946,
1210,
810,
16,
1033,
930,
262,
288,
202,
202,
759,
2660,
8064,
17,
11168,
707,
7168,
202,
202,
2463,
446,
31,
202,
97,
2,
-100,
-100,
-10... |
ArtifactRepositoryMetadata localMetadata = null; | ArtifactMetadata localMetadata = null; | protected String resolveVersion( Artifact artifact, ArtifactRepository localRepository, List remoteRepositories ) throws ArtifactMetadataRetrievalException { // TODO: can we improve on this? ArtifactMetadata metadata = new ArtifactRepositoryMetadata( artifact ); repositoryMetadataManager.resolve( metadata, remoteRepositories, localRepository );/* // TODO: can this go directly into the manager? At least share with DefaultPluginMappingManager // TODO: use this, cache the output, select from that list instead of the next set Versioning versioning = new Versioning(); for ( Iterator i = remoteRepositories.iterator(); i.hasNext(); ) { ArtifactRepository repository = (ArtifactRepository) i.next(); mergeVersioning( versioning, loadVersioningInformation( metadata, repository, localRepository ) ); } mergeVersioning( versioning, loadVersioningInformation( metadata, localRepository, localRepository ) ); String version = selectVersion( versioning, artifact.getVersion() );*/ ArtifactRepositoryMetadata localMetadata = null; for ( Iterator i = remoteRepositories.iterator(); i.hasNext(); ) { ArtifactRepository repository = (ArtifactRepository) i.next(); localMetadata = loadVersioningInformation( metadata, repository, localRepository, artifact ); if ( localMetadata != null ) { artifact.setRepository( repository ); // TODO: merge instead (see above) break; } } ArtifactRepositoryMetadata m = loadVersioningInformation( metadata, localRepository, localRepository, artifact ); if ( m != null ) { localMetadata = m; // TODO: figure out way to avoid duplicated message if ( getLogger().isDebugEnabled() /*&& !alreadyResolved*/ ) { // Locally installed file is newer, don't use the resolved version getLogger().debug( artifact.getArtifactId() + ": using locally installed snapshot" ); } } String version = null; if ( localMetadata != null ) { version = constructVersion( localMetadata ); } if ( version == null ) { version = resolveLegacyVersion( artifact, localRepository, remoteRepositories ); if ( version == null ) { version = artifact.getVersion(); } } // TODO: also do this logging for other metadata? if ( getLogger().isDebugEnabled() ) { if ( version != null && !version.equals( artifact.getBaseVersion() ) ) { String message = artifact.getArtifactId() + ": resolved to version " + version; if ( artifact.getRepository() != null ) { message += " from repository " + artifact.getRepository().getId(); } else { message += " from local repository"; } getLogger().debug( message ); } } return version; } | 11530 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11530/cb2370199b6cf0c1c62bf36d568ac386780ff12f/AbstractVersionTransformation.java/clean/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/AbstractVersionTransformation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
2245,
1444,
12,
14022,
6462,
16,
14022,
3305,
1191,
3305,
16,
987,
2632,
18429,
262,
3639,
1216,
14022,
2277,
27356,
503,
565,
288,
3639,
368,
2660,
30,
848,
732,
21171,
603,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
2245,
1444,
12,
14022,
6462,
16,
14022,
3305,
1191,
3305,
16,
987,
2632,
18429,
262,
3639,
1216,
14022,
2277,
27356,
503,
565,
288,
3639,
368,
2660,
30,
848,
732,
21171,
603,
3... |
Keymap keymap = editorPane.getKeymap(); | public RuleEditor(File inFileName,OperatorNode inNode) throws IOException { super(inNode.getUniqueName(),true,true,true,true); setType(RULE_EDITOR); // Initalize my member variables associatedNode = inNode; fileName = inFileName.getPath(); getData(inFileName); editorPane.setFont(new Font("Monospaced",Font.PLAIN,12)); setBounds(0,0,250,100); initMenuBar(); initLayout(); //editorPane.setLineWrap(false); addVetoableChangeListener(new CloseListener()); // Retile the internal frames after closing a window setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); addInternalFrameListener( new InternalFrameAdapter() { public void internalFrameClosing(InternalFrameEvent e) { if (change) { int answer = JOptionPane.showConfirmDialog(null,"Save Changes to " + fileName + "?", "Unsaved Changes",JOptionPane.YES_NO_CANCEL_OPTION); if (answer == JOptionPane.CANCEL_OPTION) { return; } else if (answer == JOptionPane.YES_OPTION) { try { write(); } catch(IOException ioe) { ioe.printStackTrace(); } } } dispose(); MainFrame mf = MainFrame.getMainFrame(); if(Preferences.getInstance().isAutoTilingEnabled()) { mf.getDesktopPane().performTileAction(); } mf.selectNewInternalFrame(); } }); registerDocumentListeners(); backupThread = new BackupThread(); backupThread.start(); if(edu.umich.visualsoar.misc.Preferences.getInstance().isAutoSoarCompleteEnabled()) { KeyStroke dot = KeyStroke.getKeyStroke('.'); Keymap keymap = editorPane.getKeymap(); keymap.addActionForKeyStroke(dot, autoSoarCompleteAction); editorPane.setKeymap(keymap); } editorPane.addCaretListener( new CaretListener() { public void caretUpdate(CaretEvent e) { int offset = e.getDot(); try { lineNumberLabel.setText("Line: " + (1+editorPane.getLineOfOffset(offset))); //editorPane.requestFocus(); //Remove any highlights if (lastHighlight != null) { highlighter.removeAllHighlights(); lastHighlight = null; } } catch(BadLocationException ble) { ble.printStackTrace(); } } }); adjustKeymap(); }//RuleEditor ctor | 47007 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47007/9f4d4108ec9fefbbeac2bb6fd715e05e874d8504/RuleEditor.java/clean/OldSoar/trunk/visualsoar/Source/edu/umich/visualsoar/ruleeditor/RuleEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6781,
6946,
12,
812,
316,
4771,
16,
5592,
907,
316,
907,
13,
1216,
1860,
377,
288,
3639,
2240,
12,
267,
907,
18,
588,
6303,
461,
9334,
3767,
16,
3767,
16,
3767,
16,
3767,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6781,
6946,
12,
812,
316,
4771,
16,
5592,
907,
316,
907,
13,
1216,
1860,
377,
288,
3639,
2240,
12,
267,
907,
18,
588,
6303,
461,
9334,
3767,
16,
3767,
16,
3767,
16,
3767,
1769,
... | |
MainFrame.getInstance().dispose(); | if (MainFrame.getInstance() != null) { MainFrame.getInstance().dispose(); } | public static void askToExit() { if (MainConfiguration.PROPS.getBoolean("gui.asktoexit")) { //$NON-NLS-1$ int i = JOptionPane.showConfirmDialog(null, Messages.getString("Util.19"), //$NON-NLS-1$ Messages.getString("Util.20"), JOptionPane.YES_NO_OPTION); //$NON-NLS-2$ if (i != JOptionPane.YES_OPTION) { return; } } MainFrame.getInstance().dispose(); System.exit(0); } | 54388 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54388/e5751a50a2ed176c08637aad9dbe672a7540336f/Util.java/buggy/framework/src/org/schwering/evi/util/Util.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
6827,
774,
6767,
1435,
288,
202,
202,
430,
261,
6376,
1750,
18,
3373,
5857,
18,
588,
5507,
2932,
20292,
18,
835,
869,
8593,
6,
3719,
288,
4329,
3993,
17,
5106,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6827,
774,
6767,
1435,
288,
202,
202,
430,
261,
6376,
1750,
18,
3373,
5857,
18,
588,
5507,
2932,
20292,
18,
835,
869,
8593,
6,
3719,
288,
4329,
3993,
17,
5106,
17,
... |
{} catch (ClassNotFoundException ex) {} | { } catch (ClassNotFoundException ex) { } | public void testCisResorcinol() throws Exception { HydrogenPlacer hydrogenPlacer = new HydrogenPlacer(); SmilesGenerator sg = new SmilesGenerator(); Molecule mol1 = new Molecule(); mol1.addAtom(new Atom("O", new Point2d(3, 1))); // 1 mol1.addAtom(new Atom("H", new Point2d(2, 0))); // 2 mol1.addAtom(new Atom("C", new Point2d(2, 1))); // 3 mol1.addAtom(new Atom("C", new Point2d(1, 1))); // 4 mol1.addAtom(new Atom("C", new Point2d(1, 4))); // 5 mol1.addAtom(new Atom("C", new Point2d(1, 5))); // 6 mol1.addAtom(new Atom("C", new Point2d(1, 2))); // 7 mol1.addAtom(new Atom("C", new Point2d(2, 2))); // 1 mol1.addAtom(new Atom("O", new Point2d(3, 2))); // 2 mol1.addAtom(new Atom("H", new Point2d(2, 3))); // 3 mol1.addBond(0, 2, 1, CDKConstants.STEREO_BOND_DOWN); // 1 mol1.addBond(1, 2, 1, CDKConstants.STEREO_BOND_UP); // 2 mol1.addBond(2, 3, 1); // 3 mol1.addBond(3, 4, 1); // 4 mol1.addBond(4, 5, 1); // 5 mol1.addBond(5, 6, 1); // 6 mol1.addBond(6, 7, 1); // 3 mol1.addBond(7, 8, 1, CDKConstants.STEREO_BOND_UP); // 4 mol1.addBond(7, 9, 1, CDKConstants.STEREO_BOND_DOWN); // 5 mol1.addBond(7, 2, 1); // 6 try { new HydrogenAdder().addHydrogensToSatisfyValency(mol1); hydrogenPlacer.placeHydrogens2D(mol1, 1.0); IsotopeFactory ifac = IsotopeFactory.getInstance(); ifac.configureAtoms(mol1); } catch (IOException ex) {} catch (ClassNotFoundException ex) {} String smiles1 = null; if (standAlone) { display(mol1); } try { smiles1 = sg.createSMILES(mol1, true, new boolean[mol1.getBondCount()]); } catch (Exception exc) { System.out.println(exc); if (!standAlone) { fail(); } } if (standAlone) { System.err.println("SMILES 1: " + smiles1); } assertNotNull(smiles1); assertTrue(smiles1.equals("[H]O[C@]1(C([H])([H])C([H])([H])C([H])([H])C([H])([H])[C@]1(O[H])([H]))([H])")); mol1 = (Molecule) AtomContainerManipulator.removeHydrogens(mol1); try { smiles1 = sg.createSMILES(mol1); } catch (Exception exc) { System.out.println(exc); if (!standAlone) { fail(); } } if (standAlone) { System.err.println("SMILES 1: " + smiles1); } assertNotNull(smiles1); assertTrue(smiles1.equals("OC1CCCCC1(O)")); } | 45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/59606b04fc4a28c30470c452644c11af7cf211fa/SmilesGeneratorTest.java/buggy/src/org/openscience/cdk/test/smiles/SmilesGeneratorTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
39,
291,
607,
280,
71,
267,
355,
1435,
1216,
1185,
202,
95,
202,
202,
17507,
24096,
1749,
10598,
4855,
24096,
1749,
10598,
273,
394,
14881,
24096,
1749,
10598,
5621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
39,
291,
607,
280,
71,
267,
355,
1435,
1216,
1185,
202,
95,
202,
202,
17507,
24096,
1749,
10598,
4855,
24096,
1749,
10598,
273,
394,
14881,
24096,
1749,
10598,
5621,
... |
log.error("Cannot read serialized project: " + serializedProjectFile.getAbsolutePath()); | log.warn("Cannot read serialized project: " + serializedProjectFile.getAbsolutePath()); | public Project readProject(String fileName) { File serializedProjectFile = new File(fileName); log.debug("Reading serialized project from: " + serializedProjectFile.getAbsolutePath()); if (!serializedProjectFile.exists() || !serializedProjectFile.canRead()) { log.error("Cannot read serialized project: " + serializedProjectFile.getAbsolutePath()); } else { try { ObjectInputStream s = new ObjectInputStream(new FileInputStream(serializedProjectFile)); Project project = (Project) s.readObject(); return project; } catch (Exception e) { log.error("Error deserializing project.", e); } } return new Project(); } | 55334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55334/cf8bdb14d59ffc7bba2335627d25f68867c5a366/Main.java/buggy/main/src/net/sourceforge/cruisecontrol/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5420,
855,
4109,
12,
780,
3968,
13,
288,
3639,
1387,
5343,
4109,
812,
273,
394,
1387,
12,
17812,
1769,
3639,
613,
18,
4148,
2932,
15714,
5343,
1984,
628,
30,
315,
397,
5343,
4109,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5420,
855,
4109,
12,
780,
3968,
13,
288,
3639,
1387,
5343,
4109,
812,
273,
394,
1387,
12,
17812,
1769,
3639,
613,
18,
4148,
2932,
15714,
5343,
1984,
628,
30,
315,
397,
5343,
4109,
... |
build.setText("Something with special characters: "); | build.setText("Something with special characters: \\u00c6\\u00d8\\u00c5"); | public void testXMLEncoding() throws CruiseControlException, IOException, JDOMException { String[] encodings = { "UTF-8", "ISO-8859-1", null }; SAXBuilder builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser"); //XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat()); XMLOutputter outputter = new XMLOutputter(" ", true); outputter.setTrimAllWhite(true); for (int i = 0; i < encodings.length; i++) { Log log = new Log("testXMLEncoding"); if (encodings[i] != null) { log.setLogXmlEncoding(encodings[i]); } // Add a minimal buildLog log.addContent(getBuildLogInfo()); Element build = new Element("build"); log.addContent(build); log.addContent(new Element("modifications")); // Add 8-bit characters build.setText("Something with special characters: "); // Write and read the file log.writeLogFile(new Date()); File logFile = log.getLastLogFile(); filesToClear.add(logFile); Element actualContent = builder.build(logFile).getRootElement(); // content.toString() only returns the root element but not the // children: [Element: <cruisecontrol/>] // Use an XMLOutputter (that trims whitespace) instead. String expected = outputter.outputString(log.getContent()); String actual = outputter.outputString(actualContent); assertEquals(expected, actual); } } | 55334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55334/5c6a7ec380212f426380e4a32a0fc613657c1166/LogTest.java/buggy/main/test/net/sourceforge/cruisecontrol/LogTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4201,
4705,
1435,
5411,
1216,
385,
8653,
784,
3367,
503,
16,
1860,
16,
804,
8168,
503,
288,
3639,
514,
8526,
24118,
273,
288,
315,
5159,
17,
28,
3113,
315,
12609,
17,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4201,
4705,
1435,
5411,
1216,
385,
8653,
784,
3367,
503,
16,
1860,
16,
804,
8168,
503,
288,
3639,
514,
8526,
24118,
273,
288,
315,
5159,
17,
28,
3113,
315,
12609,
17,
1... |
public void addMember(JMember jMember) throws IllegalArgumentException { | public void addMember(final JMember jMember) { | public void addMember(JMember jMember) throws IllegalArgumentException { if (jMember == null) { throw new IllegalArgumentException("argument 'jMember' may not be null."); } if (jMember instanceof JField) { addField((JField)jMember); } else { throw new IllegalArgumentException("invalid member for JInterface: " + jMember.toString()); } } //-- addMember | 57307 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57307/639ed93115321ad51c2450f306c4d50d146ede46/JInterface.java/buggy/src/main/java/org/exolab/javasource/JInterface.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
4419,
12,
46,
4419,
525,
4419,
13,
3639,
1216,
2754,
565,
288,
3639,
309,
261,
78,
4419,
422,
446,
13,
288,
5411,
604,
394,
2754,
2932,
3446,
296,
78,
4419,
11,
2026,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
4419,
12,
46,
4419,
525,
4419,
13,
3639,
1216,
2754,
565,
288,
3639,
309,
261,
78,
4419,
422,
446,
13,
288,
5411,
604,
394,
2754,
2932,
3446,
296,
78,
4419,
11,
2026,
... |
public org.quickfix.field.Symbol getSymbol() throws FieldNotFound { org.quickfix.field.Symbol value = new org.quickfix.field.Symbol(); | public quickfix.field.Symbol getSymbol() throws FieldNotFound { quickfix.field.Symbol value = new quickfix.field.Symbol(); | public org.quickfix.field.Symbol getSymbol() throws FieldNotFound { org.quickfix.field.Symbol value = new org.quickfix.field.Symbol(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/Quote.java/buggy/src/java/src/quickfix/fix41/Quote.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
5335,
18712,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
5335,
460,
273,
394,
2358,
18,
19525,
904,
18,
1518,
18,
533... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
5335,
18712,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
5335,
460,
273,
394,
2358,
18,
19525,
904,
18,
1518,
18,
533... |
else if ( canAddtoReport( selected ) ) | else | public void buildContextMenu( IMenuManager menu ) { if ( Policy.TRACING_MENU_SHOW ) { System.out.println( "Menu(for Views) >> Shows for library" ); //$NON-NLS-1$ } menu.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS ) ); IStructuredSelection selection = (IStructuredSelection) getViewer( ).getSelection( ); if ( selection != null && selection.getFirstElement( ) != null ) { Object selected = selection.getFirstElement( ); refreshExplorerAction.setSelectedElement( selected ); menu.add( refreshExplorerAction ); menu.add( new Separator( ) ); if ( selected instanceof File ) { if ( ( (File) selected ).isDirectory( ) ) { addLibraryAction.setFolder( (File) selected ); menu.add( addLibraryAction ); } else { addLibraryAction.setFolder( ( (File) selected ).getParentFile( ) ); menu.add( addLibraryAction ); if ( useLibraryAction.isEnabled( ) ) { menu.add( useLibraryAction ); } } } else if ( canAddtoReport( selected ) ) { if ( selection.size( ) == 1 ) { AddElementtoReport addElementAction = new AddElementtoReport( (StructuredViewer) getViewer( ) ); addElementAction.setSelectedElement( selected ); menu.add( addElementAction ); } } } else { refreshExplorerAction.setSelectedElement( null ); menu.add( refreshExplorerAction ); addLibraryAction.setFolder( null ); menu.add( addLibraryAction ); } if ( deleteLibraryAction.isEnabled( ) ) menu.add( deleteLibraryAction ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/01d3e223c033017db804ca07b300d653a2166458/LibraryExplorerContextMenuProvider.java/clean/UI/org.eclipse.birt.report.designer.ui.lib.explorer/src/org/eclipse/birt/report/designer/ui/lib/explorer/LibraryExplorerContextMenuProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1361,
27315,
12,
467,
4599,
1318,
3824,
262,
202,
95,
202,
202,
430,
261,
7436,
18,
4349,
2226,
1360,
67,
29227,
67,
16677,
262,
202,
202,
95,
1082,
202,
3163,
18,
659,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1361,
27315,
12,
467,
4599,
1318,
3824,
262,
202,
95,
202,
202,
430,
261,
7436,
18,
4349,
2226,
1360,
67,
29227,
67,
16677,
262,
202,
202,
95,
1082,
202,
3163,
18,
659,
... |
labelProvider = new DelegateCommonLabelProvider( | labelProvider = new SafeDelegateCommonLabelProvider( | public ICommonLabelProvider getLabelProvider() { if (labelProvider != null || labelProviderInitializationFailed) return labelProvider; synchronized (this) { try { if (labelProvider == null) { ILabelProvider tempLabelProvider = descriptor .createLabelProvider(); if (tempLabelProvider instanceof ICommonLabelProvider) { labelProvider = (ICommonLabelProvider) tempLabelProvider; if (getContentProvider() instanceof NavigatorContentProvider) labelProvider .init( getStateModel(), ((NavigatorContentProvider) getContentProvider()) .getDelegateContentProvider()); else labelProvider.init(getStateModel(), SkeletonTreeContentProvider.INSTANCE); } else { labelProvider = new DelegateCommonLabelProvider( tempLabelProvider); } } } catch (CoreException e) { labelProviderInitializationFailed = true; e.printStackTrace(); } catch (RuntimeException e) { labelProviderInitializationFailed = true; e.printStackTrace(); } if (labelProviderInitializationFailed) labelProvider = SkeletonLabelProvider.INSTANCE; } return labelProvider; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/c93d807ed962723d90daba76fc2003e2c1801cbc/NavigatorContentExtension.java/buggy/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentExtension.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
6517,
2224,
2249,
11237,
2249,
1435,
288,
202,
202,
430,
261,
1925,
2249,
480,
446,
747,
1433,
2249,
17701,
2925,
13,
1082,
202,
2463,
1433,
2249,
31,
202,
202,
22043,
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,
467,
6517,
2224,
2249,
11237,
2249,
1435,
288,
202,
202,
430,
261,
1925,
2249,
480,
446,
747,
1433,
2249,
17701,
2925,
13,
1082,
202,
2463,
1433,
2249,
31,
202,
202,
22043,
261,... |
IConfigurationElement[] elements = definingElement.getChildren(CHILD_ENABLEMENT); if (elements.length == 0) { String className = definingElement.getAttribute(ATT_OBJECT_CLASS); if (className == null) return null; enablement = new ActionExpression(ATT_OBJECT_CLASS, className); } else enablement = new ActionExpression(elements[0]); | initializeEnablement(); | public ActionExpression getEnablement() { if (!hasReadEnablement) { hasReadEnablement = true; IConfigurationElement[] elements = definingElement.getChildren(CHILD_ENABLEMENT); if (elements.length == 0) { String className = definingElement.getAttribute(ATT_OBJECT_CLASS); if (className == null) return null; enablement = new ActionExpression(ATT_OBJECT_CLASS, className); } else enablement = new ActionExpression(elements[0]); } return enablement; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/e4870ae566720c9a538c7ef68573b301746e6c42/DecoratorDefinition.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecoratorDefinition.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4382,
2300,
336,
8317,
475,
1435,
288,
377,
202,
430,
16051,
5332,
1994,
8317,
475,
13,
288,
377,
202,
202,
5332,
1994,
8317,
475,
273,
638,
31,
377,
202,
202,
45,
1750,
1046,
852... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4382,
2300,
336,
8317,
475,
1435,
288,
377,
202,
430,
16051,
5332,
1994,
8317,
475,
13,
288,
377,
202,
202,
5332,
1994,
8317,
475,
273,
638,
31,
377,
202,
202,
45,
1750,
1046,
852... |
_nonEscapingElements = nonEscapingElements; | _nonEscapingElements = nonEscapingElements; | public void setNonEscapingElements( String[] nonEscapingElements ) { _nonEscapingElements = nonEscapingElements; } | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/af047e33ee4283cd437ffa6760ccff3d3d2bf9ea/OutputFormat.java/buggy/src/org/apache/xml/serialize/OutputFormat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
3989,
6412,
24447,
3471,
12,
514,
8526,
1661,
6412,
24447,
3471,
262,
565,
288,
202,
67,
5836,
6412,
24447,
3471,
273,
1661,
6412,
24447,
3471,
31,
565,
289,
2,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
3989,
6412,
24447,
3471,
12,
514,
8526,
1661,
6412,
24447,
3471,
262,
565,
288,
202,
67,
5836,
6412,
24447,
3471,
273,
1661,
6412,
24447,
3471,
31,
565,
289,
2,
-100,
-100... |
if (deltaBuilder != null){ if ((deltaBuilder.delta != null) && (deltaBuilder.delta.getAffectedChildren().length > 0)) { addReconcileDelta(workingCopy, deltaBuilder.delta); } } | protected void executeOperation() throws CModelException { if (fMonitor != null){ if (fMonitor.isCanceled()) return; fMonitor.beginTask("element.reconciling", 10); //$NON-NLS-1$ } WorkingCopy workingCopy = getWorkingCopy(); boolean wasConsistent = workingCopy.isConsistent(); CElementDeltaBuilder deltaBuilder = null; try { // create the delta builder (this remembers the current content of the cu) if (!wasConsistent){ deltaBuilder = new CElementDeltaBuilder(workingCopy); // update the element infos with the content of the working copy workingCopy.makeConsistent(fMonitor); deltaBuilder.buildDeltas(); } if (fMonitor != null) fMonitor.worked(2); // force problem detection? - if structure was consistent if (forceProblemDetection && wasConsistent){ if (fMonitor != null && fMonitor.isCanceled()) return; } // register the deltas if (deltaBuilder != null){ if ((deltaBuilder.delta != null) && (deltaBuilder.delta.getAffectedChildren().length > 0)) { addReconcileDelta(workingCopy, deltaBuilder.delta); } } } finally { if (fMonitor != null) fMonitor.done(); } } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/a443caeb08f5ebfeb103b91f9ece5f9775887585/ReconcileWorkingCopyOperation.java/buggy/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ReconcileWorkingCopyOperation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
225,
309,
261,
9878,
1263,
480,
446,
15329,
309,
14015,
9878,
1263,
18,
9878,
480,
446,
13,
597,
261,
9878,
1263,
18,
9878,
18,
588,
23775,
4212,
7675,
2469,
405,
374,
3719,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
225,
309,
261,
9878,
1263,
480,
446,
15329,
309,
14015,
9878,
1263,
18,
9878,
480,
446,
13,
597,
261,
9878,
1263,
18,
9878,
18,
588,
23775,
4212,
7675,
2469,
405,
374,
3719,
... | |
java.sql.Statement statement, PG_Stream pg_stream, org.postgresql.Connection connection) throws SQLException { this.sql = sql; this.statement = statement; this.pg_stream = pg_stream; this.connection = connection; | java.sql.Statement statement, PG_Stream pg_stream, org.postgresql.Connection connection) throws SQLException { this.sql = sql; this.statement = statement; this.pg_stream = pg_stream; this.connection = connection; | public QueryExecutor(String sql, java.sql.Statement statement, PG_Stream pg_stream, org.postgresql.Connection connection) throws SQLException { this.sql = sql; this.statement = statement; this.pg_stream = pg_stream; this.connection = connection; if (statement != null) maxRows = statement.getMaxRows(); else maxRows = 0; } | 11803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11803/ef7d7910745cf2812007668138eaaf0a8e1d8d99/QueryExecutor.java/clean/src/interfaces/jdbc/org/postgresql/core/QueryExecutor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2770,
6325,
12,
780,
1847,
16,
6862,
1082,
2252,
18,
4669,
18,
3406,
3021,
16,
6862,
1082,
22116,
67,
1228,
7184,
67,
3256,
16,
6862,
1082,
2358,
18,
2767,
24330,
18,
1952,
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,
225,
202,
482,
2770,
6325,
12,
780,
1847,
16,
6862,
1082,
2252,
18,
4669,
18,
3406,
3021,
16,
6862,
1082,
22116,
67,
1228,
7184,
67,
3256,
16,
6862,
1082,
2358,
18,
2767,
24330,
18,
1952,
14... |
public void absolute(final int localPointer) throws IndexOutOfBoundsException { | public void absolute(final int localPointer) { | public void absolute(final int localPointer) throws IndexOutOfBoundsException { if (localPointer < 0 || localPointer > rows.size() - 1) { throw new IndexOutOfBoundsException("INVALID POINTER LOCATION: " + localPointer); } pointer = localPointer; } | 8836 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8836/2b8ef98f79005d5153308554ad3f4288ab18ead6/DataSet.java/clean/PZFileReader/src/main/java/com/pz/reader/DataSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4967,
12,
6385,
509,
1191,
4926,
13,
288,
3639,
309,
261,
3729,
4926,
411,
374,
747,
1191,
4926,
405,
2595,
18,
1467,
1435,
300,
404,
13,
288,
5411,
604,
394,
17768,
2932,
93... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4967,
12,
6385,
509,
1191,
4926,
13,
288,
3639,
309,
261,
3729,
4926,
411,
374,
747,
1191,
4926,
405,
2595,
18,
1467,
1435,
300,
404,
13,
288,
5411,
604,
394,
17768,
2932,
93... |
checkQueryNodes(msg, (QueryClass) qf1.getFromElement(), (QueryClass) qf2.getFromElement(), q1, q2); | FromElement fe1 = qf1.getFromElement(); FromElement fe2 = qf2.getFromElement(); if (fe1 instanceof QueryClass) { if (fe2 instanceof QueryClass) { checkQueryNodes(msg, (QueryClass) fe1, (QueryClass) fe2, q1, q2); } else { fail(msg + ": field member of QueryClass does not match field member of subquery"); } } else { if (fe2 instanceof QueryClass) { fail(msg + ": field member of subquery does not match field member of QueryClass"); } else { String alias1 = (String) q1.getAliases().get(fe1); String alias2 = (String) q2.getAliases().get(fe2); assertNotNull(msg + ": alias1 is null - " + q1.getAliases() + ", " + fe1, alias1); assertNotNull(msg + ": alias2 is null - " + q2.getAliases() + ", " + fe2, alias2); assertEquals(msg + ": field members of different subquery aliases", q1.getAliases().get(fe1), q2.getAliases().get(fe2)); } } | protected void checkQueryNodes(String msg, QueryNode qn1, QueryNode qn2, Query q1, Query q2) { if ((qn1 == null) && (qn2 == null)) { return; } assertNotNull(msg + ": first QueryNode is null, second isn't", qn1); assertNotNull(msg + ": first QueryNode is not null, second is", qn2); assertEquals(msg + ": QueryNodes are not the same class", qn1.getClass(), qn2.getClass()); if (qn1 instanceof QueryClass) { QueryClass qc1 = (QueryClass) qn1; QueryClass qc2 = (QueryClass) qn2; assertEquals(msg + ": QueryClasses do not refer to the same class", qc1.getType(), qc2.getType()); assertEquals(msg + ": QueryClasses do not have the same alias", q1.getAliases().get(qc1), q2.getAliases().get(qc2)); } else if (qn1 instanceof QueryField) { QueryField qf1 = (QueryField) qn1; QueryField qf2 = (QueryField) qn2; checkQueryNodes(msg, (QueryClass) qf1.getFromElement(), (QueryClass) qf2.getFromElement(), q1, q2); assertEquals(msg + ": QueryField fieldnames are not equal", qf1.getFieldName(), qf2.getFieldName()); } else if (qn1 instanceof QueryValue) { QueryValue qv1 = (QueryValue) qn1; QueryValue qv2 = (QueryValue) qn2; assertEquals(msg + ": QueryValues are not equal", qv1.getValue(), qv2.getValue()); } else if (qn1 instanceof QueryFunction) { QueryFunction qf1 = (QueryFunction) qn1; QueryFunction qf2 = (QueryFunction) qn2; checkQueryNodes(msg + "parameters are not equal", qf1.getParam(), qf1.getParam(), q1, q2); assertEquals(msg + ": functions are not the same", qf1.getOperation(), qf2.getOperation()); } else if (qn1 instanceof QueryExpression) { QueryExpression qe1 = (QueryExpression) qn1; QueryExpression qe2 = (QueryExpression) qn2; assertEquals(msg + ": type of QueryExpressions are not the same", qe1.getType(), qe2.getType()); checkQueryNodes(msg + "first QueryEvaluables are not equal", qe1.getArg1(), qe1.getArg1(), q1, q2); checkQueryNodes(msg + "second QueryEvaluables are not equal", qe1.getArg2(), qe1.getArg2(), q1, q2); checkQueryNodes(msg + "third QueryEvaluables are not equal", qe1.getArg3(), qe1.getArg3(), q1, q2); } } | 7196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7196/1bf1bb33e46ab55ef768222c8d9f06d4c2742a10/QueryTestCase.java/buggy/intermine/src/test/org/intermine/objectstore/query/QueryTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
866,
1138,
3205,
12,
780,
1234,
16,
2770,
907,
31054,
21,
16,
2770,
907,
31054,
22,
16,
2770,
1043,
21,
16,
2770,
1043,
22,
13,
288,
3639,
309,
14015,
15785,
21,
422,
446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
866,
1138,
3205,
12,
780,
1234,
16,
2770,
907,
31054,
21,
16,
2770,
907,
31054,
22,
16,
2770,
1043,
21,
16,
2770,
1043,
22,
13,
288,
3639,
309,
14015,
15785,
21,
422,
446,
... |
boolean processSharedLibUnloadedEvent(MISharedLibUnloadedEvent unLoaded) { Session session = (Session)getSession(); MISession miSession = unLoaded.getMISession(); Target target = session.getTarget(miSession); // We do not nee to do fancy checking we can jsut delete all // the expression variable and let the recreate them by reevaluating. ExpressionManager expMgr = session.getExpressionManager(); try { expMgr.deleteAllVariables(target); } catch (CDIException e) { } // Do this only for global variable for now. // we nee to look at the address of the variable // and see if they are in the range of the library if yes // destroy them SharedLibraryManager sharedMgr = session.getSharedLibraryManager(); SharedLibrary lib = sharedMgr.getSharedLibrary(target, unLoaded.getName()); if (lib != null) { BigInteger startAddress = lib.getStartAddress(); BigInteger endAddress = lib.getEndAddress(); try { Thread thread = (Thread)target.getCurrentThread(); StackFrame frame = thread.getCurrentStackFrame(); VariableManager varMgr = session.getVariableManager(); Variable[] vars = varMgr.getVariables(target); for (int i = 0; i < vars.length; i++) { if (vars[i] instanceof GlobalVariable) { try { ICDIValue value = vars[i].getValue(); String result = null; if (value instanceof PointerValue || value instanceof ReferenceValue || value instanceof FunctionValue) { result = target.evaluateExpressionToString(frame, vars[i].getFullName()); //$NON-NLS-1$ } else { result = target.evaluateExpressionToString(frame, "&" + vars[i].getFullName()); //$NON-NLS-1$ } if (result != null && result.length() > 0) { BigInteger address = MIFormat.decodeAdress(result); int op = address.compareTo(startAddress); if (op == 0 || op == 1) { op = address.compareTo(endAddress); if (op == 0 || op == -1) { varMgr.destroyVariable(vars[i]); } } } } catch (CDIException e) { // } } } } catch (CDIException e) { // ignore it. ??? } } return false; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/8291a5e66d0cd3be70011e0c75d21a55e150eefb/EventManager.java/buggy/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6494,
1207,
7887,
5664,
984,
4230,
1133,
12,
7492,
7887,
5664,
984,
4230,
1133,
640,
8835,
13,
288,
202,
202,
2157,
1339,
273,
261,
2157,
13,
588,
2157,
5621,
202,
202,
7492,
2157,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6494,
1207,
7887,
5664,
984,
4230,
1133,
12,
7492,
7887,
5664,
984,
4230,
1133,
640,
8835,
13,
288,
202,
202,
2157,
1339,
273,
261,
2157,
13,
588,
2157,
5621,
202,
202,
7492,
2157,
... | ||
if (Grouper.naming().grant(s, g, m, "STEM") == true) { | if (Grouper.naming().grant(roots, g, m, "STEM") == true) { | protected static boolean groupAdd(GrouperSession s, GrouperGroup g) { boolean rv = false; Session session = GrouperBackend._init(); GrouperAttribute stem = (GrouperAttribute) g.attribute("stem"); if (GrouperBackend._stemLookup(s, session, (String) stem.value())) { try { Transaction t = session.beginTransaction(); // The Group object session.save(g); // The Group schema GrouperSchema schema = new GrouperSchema( g.key(), g.type() ); session.save(schema); // The Group attributes Map attributes = g.attributes(); Iterator iter = attributes.keySet().iterator(); while (iter.hasNext()) { // FIXME WTF? GrouperAttribute attr = (GrouperAttribute) attributes.get( iter.next() ); // TODO Error checking, anyone? GrouperBackend._attrAdd( session, g.key(), attr.field(), attr.value() ); } /* * I need to commit the group to the groups registry before * granting the ADMIN privs as the act of granting, especially if * using the default access privilege implementation, may need to * load the group from the groups registry. If it hasn't been * committed, that will obviously fail and Java will go BOOM! * * Of course, this may make rolling back even the granting fails * even more interesting. */ t.commit(); // And grant ADMIN privilege to the list creator Grouper.log().backend("Converting subject " + s); GrouperMember m = GrouperMember.load( s.subject() ); boolean granted = false; if (m != null) { // FIXME Bah Grouper.log().backend("Converted to member " + m); // NS_TYPE groups get `STEM', not `ADMIN' if (g.type().equals(Grouper.NS_TYPE)) { if (Grouper.naming().grant(s, g, m, "STEM") == true) { Grouper.log().backend("Granted STEM to " + m); t.commit(); // XXX Is this commit necessary? granted = true; rv = true; } else { Grouper.log().backend("Unable to grant STEM to " + m); } } else { // For all other group types default to `ADMIN' if (Grouper.access().grant(s, g, m, Grouper.PRIV_ADMIN)) { Grouper.log().backend("Granted ADMIN to " + m); t.commit(); // XXX Is this commit necessary? granted = true; rv = true; } else { Grouper.log().backend("Unable to grant ADMIN to " + m); } } } else { Grouper.log().backend("Unable to convert to member"); } if (granted == false) { /* * TODO Rollback? Exception? The rollback would also need to * rollback the granting of the ADMIN privilege. Or at * least try to. */ System.err.println("Unable to create group " + g); System.exit(1); } } catch (Exception e) { // TODO We probably need a rollback in here in case of failure // above. System.err.println(e); System.exit(1); } } else { System.err.println("STEM " + stem.value() + " DOES NOT EXIST!"); Grouper.log().event( "Unable to add group as stem=`" + stem.value() + "' does not exist." ); } GrouperBackend._hibernateSessionClose(session); return rv; } | 5235 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5235/18ab8b4d7176ebf7fef0147158a064f94ca707e5/GrouperBackend.java/clean/grouper/java/src/edu/internet2/middleware/grouper/GrouperBackend.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
760,
1250,
1041,
986,
12,
1114,
264,
2157,
272,
16,
3756,
264,
1114,
314,
13,
288,
565,
1250,
5633,
1377,
273,
629,
31,
565,
3877,
1339,
273,
3756,
264,
7172,
6315,
2738,
5621,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
760,
1250,
1041,
986,
12,
1114,
264,
2157,
272,
16,
3756,
264,
1114,
314,
13,
288,
565,
1250,
5633,
1377,
273,
629,
31,
565,
3877,
1339,
273,
3756,
264,
7172,
6315,
2738,
5621,
56... |
ConfigurationContextFactory.createConfigurationContextFromFileSystem("target/test-resources/integrationRepo",null); | ConfigurationContextFactory.createConfigurationContextFromFileSystem("target/test-resources/integrationRepo", null); | public void testhandleArrayList() throws AxisFault { configureSystem("handleArrayList"); Options options = new Options(); options.setTo(targetEPR); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem("target/test-resources/integrationRepo",null); RPCServiceClient sender = new RPCServiceClient(configContext, null); sender.setOptions(options); OMElement elem = sender.sendReceive(getpayLoad()); assertEquals(elem.getFirstElement().getText(), "abcdefghiklm10"); } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/50920db14c45d59089b0a4f3c9050a30713f9522/RPCCallTest.java/buggy/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4110,
19558,
1435,
1216,
15509,
7083,
288,
3639,
5068,
3163,
2932,
4110,
19558,
8863,
3639,
5087,
702,
273,
394,
5087,
5621,
3639,
702,
18,
542,
774,
12,
3299,
41,
8025,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4110,
19558,
1435,
1216,
15509,
7083,
288,
3639,
5068,
3163,
2932,
4110,
19558,
8863,
3639,
5087,
702,
273,
394,
5087,
5621,
3639,
702,
18,
542,
774,
12,
3299,
41,
8025,
... |
reportsEntry, ReportsEntryHBMUtil.getInstance()); com.ext.portlet.reports.model.ReportsEntry[] array = new com.ext.portlet.reports.model.ReportsEntry[3]; array[0] = (com.ext.portlet.reports.model.ReportsEntry) objArray[0]; array[1] = (com.ext.portlet.reports.model.ReportsEntry) objArray[1]; array[2] = (com.ext.portlet.reports.model.ReportsEntry) objArray[2]; | reportsEntry); ReportsEntry[] array = new ReportsEntry[3]; array[0] = (ReportsEntry) objArray[0]; array[1] = (ReportsEntry) objArray[1]; array[2] = (ReportsEntry) objArray[2]; | public com.ext.portlet.reports.model.ReportsEntry[] findByUserId_PrevAndNext( String entryId, String userId, OrderByComparator obc) throws NoSuchEntryException, SystemException { com.ext.portlet.reports.model.ReportsEntry reportsEntry = findByPrimaryKey(entryId); int count = countByUserId(userId); Session session = null; try { session = openSession(); StringBuffer query = new StringBuffer(); query.append( "FROM ReportsEntry IN CLASS com.ext.portlet.reports.service.persistence.ReportsEntryHBM WHERE "); if (userId == null) { query.append("userId is null"); } else { query.append("userId = ?"); } query.append(" "); if (obc != null) { query.append("ORDER BY " + obc.getOrderBy()); } else { query.append("ORDER BY "); query.append("name ASC"); } Query q = session.createQuery(query.toString()); int queryPos = 0; if (userId != null) { q.setString(queryPos++, userId); } Object[] objArray = QueryUtil.getPrevAndNext(q, count, obc, reportsEntry, ReportsEntryHBMUtil.getInstance()); com.ext.portlet.reports.model.ReportsEntry[] array = new com.ext.portlet.reports.model.ReportsEntry[3]; array[0] = (com.ext.portlet.reports.model.ReportsEntry) objArray[0]; array[1] = (com.ext.portlet.reports.model.ReportsEntry) objArray[1]; array[2] = (com.ext.portlet.reports.model.ReportsEntry) objArray[2]; return array; } catch (HibernateException he) { throw new SystemException(he); } finally { closeSession(session); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/5131f2a6018784d83d566a6e657e02bb5cd77488/ReportsEntryPersistence.java/clean/tools/ext_tmpl/ext-ejb/src/com/ext/portlet/reports/service/persistence/ReportsEntryPersistence.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
532,
18,
408,
18,
655,
1810,
18,
20195,
18,
2284,
18,
18631,
1622,
8526,
6224,
10502,
67,
24657,
12,
3639,
514,
1241,
548,
16,
514,
6249,
16,
13977,
3768,
71,
13,
3639,
1216,
5823... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
532,
18,
408,
18,
655,
1810,
18,
20195,
18,
2284,
18,
18631,
1622,
8526,
6224,
10502,
67,
24657,
12,
3639,
514,
1241,
548,
16,
514,
6249,
16,
13977,
3768,
71,
13,
3639,
1216,
5823... |
public void mFLOAT() throws RecognitionException { int FLOAT_StartIndex = input.index(); try { int type = FLOAT; int start = getCharIndex(); int line = getLine(); int charPosition = getCharPositionInLine(); int channel = Token.DEFAULT_CHANNEL; if ( backtracking>0 && alreadyParsedRule(input, 47) ) { return ; } // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:911:17: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )+ ) // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:911:17: ( '0' .. '9' )+ '.' ( '0' .. '9' )+ { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:911:17: ( '0' .. '9' )+ int cnt5=0; loop5: do { int alt5=2; int LA5_0 = input.LA(1); if ( (LA5_0>='0' && LA5_0<='9') ) { alt5=1; } switch (alt5) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:911:18: '0' .. '9' { matchRange('0','9'); if (failed) return ; } break; default : if ( cnt5 >= 1 ) break loop5; if (backtracking>0) {failed=true; return ;} EarlyExitException eee = new EarlyExitException(5, input); throw eee; } cnt5++; } while (true); match('.'); if (failed) return ; // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:911:33: ( '0' .. '9' )+ int cnt6=0; loop6: do { int alt6=2; int LA6_0 = input.LA(1); if ( (LA6_0>='0' && LA6_0<='9') ) { alt6=1; } switch (alt6) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:911:34: '0' .. '9' { matchRange('0','9'); if (failed) return ; } break; default : if ( cnt6 >= 1 ) break loop6; if (backtracking>0) {failed=true; return ;} EarlyExitException eee = new EarlyExitException(6, input); throw eee; } cnt6++; } while (true); } if ( token==null ) {emit(type,line,charPosition,channel,start,getCharIndex()-1);} } finally { if ( backtracking>0 ) { memoize(input, 47, FLOAT_StartIndex); } } } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/f57cd683a66080d941264e3f98974908a6a489a0/RuleParserLexer.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParserLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
312,
15640,
1435,
1216,
9539,
288,
3639,
509,
15483,
67,
16792,
273,
810,
18,
1615,
5621,
3639,
775,
288,
5411,
509,
618,
273,
15483,
31,
5411,
509,
787,
273,
23577,
1016,
5621... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
312,
15640,
1435,
1216,
9539,
288,
3639,
509,
15483,
67,
16792,
273,
810,
18,
1615,
5621,
3639,
775,
288,
5411,
509,
618,
273,
15483,
31,
5411,
509,
787,
273,
23577,
1016,
5621... | ||
if(option != null && holder != null){ | if(contextInfo != null){ | public void widgetSelected(SelectionEvent ev) { /* Before opening the browse dialog we try to convert the current * path text to a valid workspace resource, so we can set it * as initial selection in the dialog. * * First we remove all double-quotes. Then the build macro provider * will resolve all macros/variables (like workspace_loc, ...). * * If the workspace location path is a prefix of our resolved path, * we will remove that part and finally get a full path relative to the * workspace. We can use that path to set the initially selected resource. */ String currentPathText; IPath path; IResource resource = null; currentPathText = getText().getText(); if(option != null && holder != null){ try { currentPathText = ManagedBuildManager.getBuildMacroProvider(). resolveValue( currentPathText, "", //$NON-NLS-1$ " ", //$NON-NLS-1$ IBuildMacroProvider.CONTEXT_OPTION, new OptionContextData(option, holder)); } catch (BuildMacroException e) { } } /* Remove double quotes */ currentPathText = currentPathText.replaceAll("\"", ""); //$NON-NLS-1$ //$NON-NLS-2$ /* Resolve variables */ IStringVariableManager variableManager = VariablesPlugin.getDefault().getStringVariableManager();/* try { currentPathText = variableManager.performStringSubstitution( currentPathText, false); } catch (CoreException e) {}*/ /* Remove workspace location prefix (if any) */ path = new Path(currentPathText); IPath workspacePath = ResourcesPlugin.getWorkspace().getRoot().getLocation(); if (workspacePath.isPrefixOf(path)) { path = path.removeFirstSegments(workspacePath.segmentCount()); path = path.setDevice(null); } /* Get resource for path. We use fProject if path is invalid.*/ if (!path.toString().trim().equals("")) { //$NON-NLS-1$ resource = ResourcesPlugin.getWorkspace().getRoot().findMember(path); } if (resource == null){ if(holder instanceof ITool){ IBuildObject bo = ((ITool)holder).getParent(); if(bo instanceof IResourceConfiguration){ resource = ((IResourceConfiguration)bo).getParent().getOwner(); } else if(bo instanceof IToolChain){ resource = ((IToolChain)bo).getParent().getOwner(); } } else if(holder instanceof IToolChain){ resource = ((IToolChain)holder).getParent().getOwner(); } } /* Create workspace folder/file selection dialog and * set initial selection */ ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider()); dialog.setInitialSelection(resource); dialog.setInput(ResourcesPlugin.getWorkspace().getRoot()); dialog.setSorter(new ResourceSorter(ResourceSorter.NAME)); if (type == IOption.BROWSE_DIR) { if (!(resource instanceof IContainer)) resource = null; Class[] filteredResources = {IContainer.class, IProject.class}; dialog.addFilter(new TypedViewerFilter(filteredResources)); dialog.setTitle(WORKSPACE_DIR_DIALOG_TITLE); dialog.setMessage(WORKSPACE_DIR_DIALOG_MSG); } else { dialog.setValidator(new ISelectionStatusValidator() { public IStatus validate(Object[] selection) { if (selection != null) if (selection.length > 0) if (!(selection[0] instanceof IFile)) return new StatusInfo(IStatus.ERROR, WORKSPACE_FILE_DIALOG_ERR); return new StatusInfo(); } }); dialog.setTitle(WORKSPACE_FILE_DIALOG_TITLE); dialog.setMessage(WORKSPACE_FILE_DIALOG_MSG); } /* Open dialog and process result. If a resource has * been selected we create an absolute file system * path for it based on the workspace_loc variable */ if (dialog.open() == Window.OK) { fSetByBrowseDialog = true; resource = (IResource) dialog.getFirstResult(); if (resource != null) { getText().setText(variableManager.generateVariableExpression(WORKSPACELOC_VAR, resource.getFullPath().toOSString())); } } } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/20a29763988ce97d6fdec77f5b733db5be459cf7/FileListControl.java/buggy/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4405,
202,
482,
918,
3604,
7416,
12,
6233,
1133,
2113,
13,
288,
25083,
202,
20308,
11672,
10890,
326,
21670,
6176,
732,
775,
358,
1765,
326,
783,
6862,
1082,
380,
589,
977,
358,
279,
923,
6003... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4405,
202,
482,
918,
3604,
7416,
12,
6233,
1133,
2113,
13,
288,
25083,
202,
20308,
11672,
10890,
326,
21670,
6176,
732,
775,
358,
1765,
326,
783,
6862,
1082,
380,
589,
977,
358,
279,
923,
6003... |
public NotDescr lhs_not() throws RecognitionException { NotDescr d = null; Token loc=null; BaseDescr column = null; d = null; try { // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1232:4: (loc= 'not' ( ( '(' lhs_column ')' )=> '(' column= lhs_column ')' | column= lhs_column ) ) // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1232:4: loc= 'not' ( ( '(' lhs_column ')' )=> '(' column= lhs_column ')' | column= lhs_column ) { loc=(Token)input.LT(1); match(input,71,FOLLOW_71_in_lhs_not3046); if (failed) return d; // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1232:14: ( ( '(' lhs_column ')' )=> '(' column= lhs_column ')' | column= lhs_column ) int alt46=2; int LA46_0 = input.LA(1); if ( (LA46_0==LEFT_PAREN) ) { alt46=1; } else if ( (LA46_0==ID) ) { alt46=2; } else { if (backtracking>0) {failed=true; return d;} NoViableAltException nvae = new NoViableAltException("1232:14: ( ( '(' lhs_column ')' )=> '(' column= lhs_column ')' | column= lhs_column )", 46, 0, input); throw nvae; } switch (alt46) { case 1 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1232:15: ( '(' lhs_column ')' )=> '(' column= lhs_column ')' { match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_not3049); if (failed) return d; pushFollow(FOLLOW_lhs_column_in_lhs_not3053); column=lhs_column(); _fsp--; if (failed) return d; match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_not3056); if (failed) return d; } break; case 2 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1232:44: column= lhs_column { pushFollow(FOLLOW_lhs_column_in_lhs_not3062); column=lhs_column(); _fsp--; if (failed) return d; } break; } if ( backtracking==0 ) { d = new NotDescr( (ColumnDescr) column ); d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() ); } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return d; } | 5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/158de3e3177d9b48d45fb4c3fae8404e0f01f690/DRLParser.java/clean/drools-compiler/src/main/java/org/drools/lang/DRLParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2288,
16198,
8499,
67,
902,
1435,
1216,
9539,
288,
6647,
2288,
16198,
302,
273,
446,
31,
3639,
3155,
1515,
33,
2011,
31,
3639,
3360,
16198,
1057,
273,
446,
31,
1171,
202,
202,
72,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2288,
16198,
8499,
67,
902,
1435,
1216,
9539,
288,
6647,
2288,
16198,
302,
273,
446,
31,
3639,
3155,
1515,
33,
2011,
31,
3639,
3360,
16198,
1057,
273,
446,
31,
1171,
202,
202,
72,
... | ||
if (r0 == null || r1 == null) return; if (color == null) g.setColor(c.getSelectionColor()); else g.setColor(color); if (r0.y == r1.y) { r0.width = r1.x - r0.x; paintHighlight(g, r0); return; } r0.width = rect.x + rect.width - r0.x; paintHighlight(g, r0); r0.y += r0.height; r0.x = rect.x; r0.width = rect.width; while (r0.y < r1.y) { paintHighlight(g, r0); r0.y += r0.height; } r0.width = r1.x + r1.width - 1; paintHighlight(g, r0); | Rectangle l0 = ui.modelToView(t, p0, null); Rectangle l1 = ui.modelToView(t, p1, null); if (l0.y == l1.y) paintHighlight(g, l0.union(l1)); else { l0.width = rect.width - l0.x; paintHighlight(g, l0); int posBelow = Utilities.getPositionBelow(t, p0, l0.x); int p1RowStart = Utilities.getRowStart(t, p1); if (posBelow != -1 && posBelow != p0 && Utilities.getRowStart(t, posBelow) != p1RowStart) { Rectangle grow = ui.modelToView(t, posBelow); grow.x = rect.x; grow.width = rect.width; int nextPosBelow = posBelow; while (nextPosBelow != -1 && Utilities.getRowStart(t, nextPosBelow) != p1RowStart) { posBelow = nextPosBelow; nextPosBelow = Utilities.getPositionBelow(t, posBelow, l0.x); if (nextPosBelow == posBelow) break; } Rectangle end = ui.modelToView(t, posBelow); grow.height = end.y + end.height - grow.y; paintHighlight(g, grow); } l1.width = l1.x + l1.width - rect.x; l1.x = rect.x; paintHighlight(g, l1); } } catch (BadLocationException ex) { AssertionError err = new AssertionError("Unexpected bad location exception"); err.initCause(ex); throw err; } | public void paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent c) { Rectangle r0 = null; Rectangle r1 = null; Rectangle rect = bounds.getBounds(); try { r0 = c.modelToView(p0); r1 = c.modelToView(p1); } catch (BadLocationException e) { // This should never occur. return; } if (r0 == null || r1 == null) return; if (color == null) g.setColor(c.getSelectionColor()); else g.setColor(color); // Check if only one line to highlight. if (r0.y == r1.y) { r0.width = r1.x - r0.x; paintHighlight(g, r0); return; } // First line, from p0 to end-of-line. r0.width = rect.x + rect.width - r0.x; paintHighlight(g, r0); // FIXME: All the full lines in between, if any (assumes that all lines // have the same height -- not a good assumption with JEditorPane/JTextPane). r0.y += r0.height; r0.x = rect.x; r0.width = rect.width; while (r0.y < r1.y) { paintHighlight(g, r0); r0.y += r0.height; } // Last line, from beginning-of-line to p1. // The "-1" is neccessary else we would paint one pixel column more // than in the case where the selection is only on one line. r0.width = r1.x + r1.width - 1; paintHighlight(g, r0); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/2fe995482ddd93e201e63c55d9ab773c376aa6f3/DefaultHighlighter.java/clean/core/src/classpath/javax/javax/swing/text/DefaultHighlighter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
12574,
12,
17558,
314,
16,
509,
293,
20,
16,
509,
293,
21,
16,
12383,
4972,
16,
1082,
1377,
804,
1528,
1841,
276,
13,
565,
288,
1377,
13264,
436,
20,
273,
446,
31,
1377,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
12574,
12,
17558,
314,
16,
509,
293,
20,
16,
509,
293,
21,
16,
12383,
4972,
16,
1082,
1377,
804,
1528,
1841,
276,
13,
565,
288,
1377,
13264,
436,
20,
273,
446,
31,
1377,
13... |
} catch (RunnerException e) { message("Error during upload."); | } catch (Exception e) { | public void run() { try { //boolean success = sketch.isLibrary() ? //sketch.exportLibrary() : sketch.exportApplet(); boolean success = sketch.exportApplet(new Target( System.getProperty("user.dir") + File.separator + "lib" + File.separator + "targets", Preferences.get("build.target"))); if (success) { message("Done uploading."); } else { // error message will already be visible } } catch (RunnerException e) { message("Error during upload."); //e.printStackTrace(); error(e); } catch (Exception e) { e.printStackTrace(); } buttons.clear(); }}); | 46692 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46692/b8923cfeee58eb44e10777e724bb177e6a77b146/Editor.java/buggy/app/Editor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1086,
1435,
288,
1850,
775,
288,
5411,
368,
6494,
2216,
273,
18534,
18,
291,
9313,
1435,
692,
5411,
368,
7771,
1593,
18,
6530,
9313,
1435,
294,
18534,
18,
6530,
23696,
5621,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1086,
1435,
288,
1850,
775,
288,
5411,
368,
6494,
2216,
273,
18534,
18,
291,
9313,
1435,
692,
5411,
368,
7771,
1593,
18,
6530,
9313,
1435,
294,
18534,
18,
6530,
23696,
5621,
54... |
if(FileUtil.isLocalResource(uri)) { try { this.in = new BufferedInputStream(new FileInputStream(new File(uri))); this.source = IImage.FILE_IMAGE; } catch (FileNotFoundException e) { logger.log(Level.SEVERE, e.getMessage(), e); } } else | if( !FileUtil.isLocalResource( uri ) ) | public Image(String uri) { if( uri == null || uri.length( ) == 0 ) { return; } id = uri; if(FileUtil.isLocalResource(uri)) { try { this.in = new BufferedInputStream(new FileInputStream(new File(uri))); this.source = IImage.FILE_IMAGE; } catch (FileNotFoundException e) { logger.log(Level.SEVERE, e.getMessage(), e); } } else { this.source = IImage.URL_IMAGE; } } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/e29ffc4317fc1dab71e811072bd49e7d35a106d8/Image.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/Image.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3421,
12,
780,
2003,
13,
202,
95,
202,
202,
430,
12,
2003,
422,
446,
747,
2003,
18,
2469,
12,
262,
422,
374,
262,
202,
202,
95,
1082,
202,
2463,
31,
202,
202,
97,
9506,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3421,
12,
780,
2003,
13,
202,
95,
202,
202,
430,
12,
2003,
422,
446,
747,
2003,
18,
2469,
12,
262,
422,
374,
262,
202,
202,
95,
1082,
202,
2463,
31,
202,
202,
97,
9506,
20... |
} | } | public final String getName(int ordinal) { Util.assertPrecondition(isImmutable()); final Value value = ordinalToValueMap[ordinal - min]; if (value == null) { return null; } else { return value.getName(); } } | 4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/b5b5168edc3af09cb74945a80b0c36e6630ed502/EnumeratedValues.java/clean/src/main/mondrian/olap/EnumeratedValues.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
514,
1723,
12,
474,
12675,
13,
202,
95,
202,
202,
1304,
18,
11231,
1386,
4175,
12,
291,
16014,
10663,
3639,
727,
1445,
460,
273,
12675,
774,
26795,
63,
517,
1490,
300,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
514,
1723,
12,
474,
12675,
13,
202,
95,
202,
202,
1304,
18,
11231,
1386,
4175,
12,
291,
16014,
10663,
3639,
727,
1445,
460,
273,
12675,
774,
26795,
63,
517,
1490,
300,
11... |
getClassInfo(className).addRelation(sc.toString()); | getClassInfo(className).addRelation(sc.toString(), RelationType.EXTENDS, RelationDirection.OUT); getClassInfo(sc.toString()).addRelation(className, RelationType.EXTENDS, RelationDirection.IN); | public void printRelations(ClassDoc c) { Options opt = optionProvider.getOptionsFor(c); if (hidden(c) || c.name().equals("")) // avoid phantom classes, they may pop up when the source uses annotations return; String className = c.toString(); String cs = getNodeName(c); // Print generalization (through the Java superclass) Type s = c.superclassType(); if (s != null && !s.toString().equals("java.lang.Object") && !c.isEnum() && !hidden(s.asClassDoc())) { ClassDoc sc = s.asClassDoc(); w.println("\t//" + c + " extends " + s + "\n" + "\t" + getNodeName(sc) + ":p -> " + cs + ":p [dir=back,arrowtail=empty];"); getClassInfo(className).addRelation(sc.toString()); } // Print generalizations (through @extends tags) for (Tag tag : c.tags("extends")) if (!hidden(tag.text())) { w.println("\t//" + c + " extends " + tag.text() + "\n" + "\t" + getNodeName(tag.text()) + ":p -> " + cs + ":p [dir=back,arrowtail=empty];"); getClassInfo(className).addRelation(tag.text()); } // Print realizations (Java interfaces) for (Type iface : c.interfaceTypes()) { ClassDoc ic = iface.asClassDoc(); if (!hidden(ic)) { w.println("\t//" + c + " implements " + ic + "\n\t" + getNodeName(ic) + ":p -> " + cs + ":p [dir=back,arrowtail=empty,style=dashed];" ); getClassInfo(className).addRelation(ic.toString()); } } // Print other associations relation(opt, "assoc", c, cs); relation(opt, "navassoc", c, cs); relation(opt, "has", c, cs); relation(opt, "composed", c, cs); relation(opt, "depend", c, cs); } | 47201 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47201/b5837d284079e80770310e488e8ff9b77eeba4f9/ClassGraph.java/clean/src/gr/spinellis/umlgraph/doclet/ClassGraph.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1172,
10666,
12,
797,
1759,
276,
13,
288,
202,
1320,
2153,
273,
1456,
2249,
18,
588,
1320,
1290,
12,
71,
1769,
202,
430,
261,
6345,
12,
71,
13,
747,
276,
18,
529,
7675,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1172,
10666,
12,
797,
1759,
276,
13,
288,
202,
1320,
2153,
273,
1456,
2249,
18,
588,
1320,
1290,
12,
71,
1769,
202,
430,
261,
6345,
12,
71,
13,
747,
276,
18,
529,
7675,
149... |
DocumentListener documentListener = new DocumentListener(){ | KeyListener keylName=new KeyListener() { | private void create() { panel = new JPanel(); /*errorLabel = new JLabel(); errorLabel.setForeground(Color.RED); errorLabel.setVisible(false);*/ okButton = new JButton(language.getText("apply")); okButton.setEnabled(false); cancelButton=new JButton(language.getText("cancel")); cancelButton.setEnabled( false); name = new JTextField(model.getIClass().getName()); nbPerson = new JLabel(""+model.getIClass().getNbPerson()); //nbPerson = new JTextField(""+((ClassTreeNode)tree.getSelectionPath().getLastPathComponent()).getIClass().getNbPerson()); nbPerson.setEnabled(false); nbGroup = new JLabel(""+model.getIClass().getNbGroup()); //nbGroup = new JTextField(""+((ClassTreeNode)tree.getSelectionPath().getLastPathComponent()).getIClass().getNbGroup()); nbGroup.setEnabled(false); DocumentListener documentListener = new DocumentListener(){ public void insertUpdate(DocumentEvent arg0) { okButton.setEnabled(true); cancelButton.setEnabled(true); } public void removeUpdate(DocumentEvent arg0) { insertUpdate(arg0); } public void changedUpdate(DocumentEvent arg0) {} }; name.getDocument().addDocumentListener(documentListener); //Mise en place des actions des boutons okButton.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent arg0) { try { model.setValue(name.getText()); okButton.setEnabled(false); cancelButton.setEnabled(false); } catch (RemoteException e) { JOptionPane.showMessageDialog(null,e.getMessage(),"Modification impossible",JOptionPane.ERROR_MESSAGE); } } }); cancelButton.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent arg0) { name.setText(model.getIClass().getName()); //nbPerson.setText(""+((GroupTreeNode)tree.getSelectionPath().getLastPathComponent()).getGroup().getNbPerson()); okButton.setEnabled(false); cancelButton.setEnabled(false); } }); FormLayout layout = new FormLayout("50px, pref, 10px, 50dlu,36px,30dlu,20px,pref,30px,pref","70px, pref, 20px, pref,20px,pref,30px,pref"); //Collone 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 //layout.setRowGroups(new int[][]{{1, 3, 5}}); panel.setLayout(layout); CellConstraints cc = new CellConstraints(); panel.add(new JLabel(language.getText("formName")+":"), cc.xy (2, 2)); panel.add(name, cc.xyw(4, 2, 2)); panel.add(new JLabel(language.getText("nbGroup")+":"), cc.xyw (4, 4,3)); panel.add(nbGroup, cc.xy (6, 4)); panel.add(new JLabel(language.getText("nbPerson")+":"), cc.xyw (4, 6,3)); panel.add(nbPerson, cc.xy (6, 6)); panel.add(okButton, cc.xy (8, 8)); panel.add(cancelButton,cc.xy (10, 8)); panel.validate(); panel.repaint(); } | 13357 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13357/0e18e9cb258af39050497645c17465bdb62e1ca3/ClassView.java/clean/current/src/fr/umlv/ir3/flexitime/richClient/gui/panel/management/ClassView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
1435,
202,
95,
202,
202,
13916,
273,
394,
24048,
5621,
202,
202,
20308,
1636,
2224,
273,
394,
21403,
5621,
202,
202,
1636,
2224,
18,
542,
23206,
12,
2957,
18,
5879,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1435,
202,
95,
202,
202,
13916,
273,
394,
24048,
5621,
202,
202,
20308,
1636,
2224,
273,
394,
21403,
5621,
202,
202,
1636,
2224,
18,
542,
23206,
12,
2957,
18,
5879,
... |
public static int shiftForwardUntil(CharSequence buffer, int offset, String chars) { while (true) { if (offset >= buffer.length()) break; char c = buffer.charAt(offset); int i; for (i = 0; i < chars.length(); i++) { if (c == chars.charAt(i)) break; } if (i < chars.length()) break; offset++; } return offset; | public static int shiftForwardUntil(char[] buffer, int offset, String chars) { return shiftForwardUntil(new CharArrayCharSequence(buffer), offset, chars); | public static int shiftForwardUntil(CharSequence buffer, int offset, String chars) { while (true) { if (offset >= buffer.length()) break; char c = buffer.charAt(offset); int i; for (i = 0; i < chars.length(); i++) { if (c == chars.charAt(i)) break; } if (i < chars.length()) break; offset++; } return offset; } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/9af33c515acae630bb8a1ebe7983db3d5ce95f46/CharArrayUtil.java/buggy/util/src/com/intellij/util/text/CharArrayUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
509,
4654,
8514,
9716,
12,
2156,
4021,
1613,
16,
509,
1384,
16,
514,
5230,
13,
288,
565,
1323,
261,
3767,
13,
288,
1377,
309,
261,
3348,
1545,
1613,
18,
2469,
10756,
898,
31,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
509,
4654,
8514,
9716,
12,
2156,
4021,
1613,
16,
509,
1384,
16,
514,
5230,
13,
288,
565,
1323,
261,
3767,
13,
288,
1377,
309,
261,
3348,
1545,
1613,
18,
2469,
10756,
898,
31,... |
public MetaClass makeMetaClass(RubyClass type) { MetaClass metaClass = type.newSingletonClass(); setMetaClass(metaClass); | public MetaClass makeMetaClass(RubyClass type, RubyModule parentModule) { MetaClass metaClass = type.newSingletonClass(parentModule); if (!isNil()) { setMetaClass(metaClass); } | public MetaClass makeMetaClass(RubyClass type) { MetaClass metaClass = type.newSingletonClass(); setMetaClass(metaClass); metaClass.attachToObject(this); return metaClass; } | 52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/32d84ae899fd3c367ef3800d0984b69f53209031/RubyObject.java/buggy/src/org/jruby/RubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6565,
797,
1221,
2781,
797,
12,
54,
10340,
797,
618,
13,
288,
3639,
6565,
797,
2191,
797,
273,
618,
18,
2704,
19571,
797,
5621,
3639,
29234,
797,
12,
3901,
797,
1769,
3639,
2191,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6565,
797,
1221,
2781,
797,
12,
54,
10340,
797,
618,
13,
288,
3639,
6565,
797,
2191,
797,
273,
618,
18,
2704,
19571,
797,
5621,
3639,
29234,
797,
12,
3901,
797,
1769,
3639,
2191,
... |
add(new JLabel(" Extended Addressing: ")); add(addMode.getRep("checkbox")); | if (addMode != null) { add(new JLabel(" Extended Addressing: ")); add(addMode.getRep("checkbox")); } | public DccAddressPanel(VariableTableModel mod) { variableModel = mod; setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); add(new JLabel("DCC Address: ")); val.setToolTipText("This field shows the DCC address currently in use. CV1 provides the short address; CV17 & 18 provide the long address"); add(val); // arrange for the field to be updated when any of the variables change java.beans.PropertyChangeListener dccNews = new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent e) { updateDccAddress(); } }; // connect to variables primaryAddr = variableModel.findVar("Primary Address"); if (primaryAddr==null) log.error("DCC Address monitor did not find a Primary Address variable"); else primaryAddr.addPropertyChangeListener(dccNews); extendAddr = variableModel.findVar("Extended Address"); if (extendAddr==null) log.warn("DCC Address monitor did not find an Extended Address variable"); else extendAddr.addPropertyChangeListener(dccNews); addMode = (EnumVariableValue)variableModel.findVar("Address Format"); if (addMode==null) log.warn("DCC Address monitor didnt find an Address Format variable"); else addMode.addPropertyChangeListener(dccNews); // show the selection add(new JLabel(" Extended Addressing: ")); add(addMode.getRep("checkbox")); // update initial contents & color if (addMode == null || extendAddr == null || addMode.getIntValue()==0) { // short address val.setBackground(primaryAddr.getValue().getBackground()); val.setDocument( ((JTextField)primaryAddr.getValue()).getDocument()); } else { // long address val.setBackground(extendAddr.getValue().getBackground()); val.setDocument( ((JTextField)extendAddr.getValue()).getDocument()); } // start listening for changes to this value val.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (addMode == null || extendAddr == null || !addMode.getValueString().equals("1")) { // short address mode ((DecVariableValue)primaryAddr).updatedTextField(); val.setBackground(primaryAddr.getValue().getBackground()); if (log.isDebugEnabled()) log.debug("set color: "+primaryAddr.getValue().getBackground()); } else { // long address ((LongAddrVariableValue)extendAddr).updatedTextField(); val.setBackground(extendAddr.getValue().getBackground()); if (log.isDebugEnabled()) log.debug("set color: "+extendAddr.getValue().getBackground()); } } }); val.addFocusListener(new FocusListener() { public void focusGained(FocusEvent e) { if (log.isDebugEnabled()) log.debug("focusGained"); enterField(); } public void focusLost(FocusEvent e) { if (log.isDebugEnabled()) log.debug("focusLost"); exitField(); } }); } | 213 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/213/acb9bb424efbdc16d1e97dab7e63c9f5b5eca257/DccAddressPanel.java/buggy/jmrit/symbolicprog/DccAddressPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
463,
952,
1887,
5537,
12,
3092,
1388,
1488,
681,
13,
288,
202,
202,
6105,
1488,
273,
681,
31,
9506,
202,
542,
3744,
12,
2704,
8549,
3744,
12,
2211,
16,
8549,
3744,
18,
60,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
463,
952,
1887,
5537,
12,
3092,
1388,
1488,
681,
13,
288,
202,
202,
6105,
1488,
273,
681,
31,
9506,
202,
542,
3744,
12,
2704,
8549,
3744,
12,
2211,
16,
8549,
3744,
18,
60,
6... |
if (state) grayCheckHierarchy(parent); else ungrayCheckHierarchy(parent); | if (state) { grayCheckHierarchy(parent); } else { ungrayCheckHierarchy(parent); } | protected void treeItemChecked(Object treeElement, boolean state) { // recursively adjust all child tree elements appropriately setTreeChecked(treeElement, state); Object parent = treeContentProvider.getParent(treeElement); if (parent == null) return; // now update upwards in the tree hierarchy if (state) grayCheckHierarchy(parent); else ungrayCheckHierarchy(parent); //Update the hierarchy but do not white select the parent grayUpdateHierarchy(parent); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/ResourceTreeAndListGroup.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceTreeAndListGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
2151,
1180,
11454,
12,
921,
2151,
1046,
16,
1250,
919,
13,
288,
3639,
368,
8536,
5765,
777,
1151,
2151,
2186,
21419,
3639,
444,
2471,
11454,
12,
3413,
1046,
16,
919,
1769,
3639... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
2151,
1180,
11454,
12,
921,
2151,
1046,
16,
1250,
919,
13,
288,
3639,
368,
8536,
5765,
777,
1151,
2151,
2186,
21419,
3639,
444,
2471,
11454,
12,
3413,
1046,
16,
919,
1769,
3639... |
public void visitColon2Node(Node iVisited) { visit(iVisited); leave(iVisited); } | public void visitColon2Node(Node iVisited) { visit(iVisited); leave(iVisited); } | public void visitColon2Node(Node iVisited) { visit(iVisited); leave(iVisited); } | 45827 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45827/d31a76ee29d5978a9bec41e3ac9134cee024bcab/NodeVisitorAdapter.java/clean/org/jruby/nodes/NodeVisitorAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
19636,
22,
907,
12,
907,
277,
30019,
13,
202,
95,
202,
202,
11658,
12,
77,
30019,
1769,
202,
202,
19574,
12,
77,
30019,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
19636,
22,
907,
12,
907,
277,
30019,
13,
202,
95,
202,
202,
11658,
12,
77,
30019,
1769,
202,
202,
19574,
12,
77,
30019,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
... |
table.put(id,new WeakReference<T>(cl)); reverse.put(cl,id); | table.put(id,t); reverse.put(t,id); | public synchronized int intern(T cl) { if(cl==null) return 0; // bootstrap classloader Integer id = reverse.get(cl); if(id==null) { id = iota++; table.put(id,new WeakReference<T>(cl)); reverse.put(cl,id); } return id; } | 33400 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/33400/254d101c656814c8c34d9b7b3935d70123e0ecf1/ExportTable.java/buggy/src/main/java/hudson/remoting/ExportTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
509,
8216,
12,
56,
927,
13,
288,
3639,
309,
12,
830,
631,
2011,
13,
565,
327,
374,
31,
282,
368,
7065,
20595,
3639,
2144,
612,
273,
4219,
18,
588,
12,
830,
1769,
3639,
309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
509,
8216,
12,
56,
927,
13,
288,
3639,
309,
12,
830,
631,
2011,
13,
565,
327,
374,
31,
282,
368,
7065,
20595,
3639,
2144,
612,
273,
4219,
18,
588,
12,
830,
1769,
3639,
309... |
return Collections.EMPTY_LIST; | return EMPTY_LIST; | public List childNodes() { return Collections.EMPTY_LIST; } | 1060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1060/b1293eda8454686e846e2a9837b348e2983bb423/Colon3Node.java/clean/src/org/jruby/ast/Colon3Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
10582,
1435,
288,
3639,
327,
8984,
67,
7085,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
10582,
1435,
288,
3639,
327,
8984,
67,
7085,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
buf.append(sep.getValue()); | buf.append(sep.toString()); | public RubyString join(RubyString sep) { StringBuffer buf = new StringBuffer(); int length = getLength(); if (length == 0) { getRuntime().newString(""); } boolean taint = isTaint() || sep.isTaint(); RubyString str; IRubyObject tmp = null; for (long i = 0; i < length; i++) { tmp = entry(i); taint |= tmp.isTaint(); if (tmp instanceof RubyString) { // do nothing } else if (tmp instanceof RubyArray) { tmp = ((RubyArray) tmp).join(sep); } else { tmp = RubyString.objAsString(tmp); } if (i > 0 && !sep.isNil()) { buf.append(sep.getValue()); } buf.append(((RubyString)tmp).getValue()); } str = RubyString.newString(getRuntime(), buf.toString()); str.setTaint(taint); return str; } | 1060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1060/9f2efc63a858fa0507245b207025eab027840a04/RubyArray.java/buggy/src/org/jruby/RubyArray.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
780,
1233,
12,
54,
10340,
780,
5478,
13,
288,
3639,
6674,
1681,
273,
394,
6674,
5621,
3639,
509,
769,
273,
9888,
5621,
3639,
309,
261,
2469,
422,
374,
13,
288,
5411,
18814,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
780,
1233,
12,
54,
10340,
780,
5478,
13,
288,
3639,
6674,
1681,
273,
394,
6674,
5621,
3639,
509,
769,
273,
9888,
5621,
3639,
309,
261,
2469,
422,
374,
13,
288,
5411,
18814,
... |
smearTerm = (float) unigramSmearTerm[wordID]; | smearTerm = unigramSmearTerm[wordID]; | public float getSmear(WordSequence wordSequence) { float smearTerm = 1.0f; if (fullSmear) { smearCount++; int length = wordSequence.size(); if (length == 1) { int wordID = getWordID(wordSequence.getWord(0)); smearTerm = (float) unigramSmearTerm[wordID]; } else if (length >= 2) { int size = wordSequence.size(); int wordID1 = getWordID(wordSequence.getWord(size - 2)); int wordID2 = getWordID(wordSequence.getWord(size - 1)); Float st = getSmearTerm(wordID1, wordID2); if (st == null) { smearTerm = (float) unigramSmearTerm[wordID2]; } else { smearTerm = st.floatValue(); smearBigramHit++; } } if (smearCount % 100000 == 0) { System.out.println("Smear hit: " + smearBigramHit + " tot: " + smearCount); } } if (fullSmear && logger.isLoggable(Level.FINE)) { logger.fine("SmearTerm: " + smearTerm); } return smearTerm; } | 8350 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8350/5260440040976f842c028c8f42eddeb7ec697f78/LargeTrigramModel.java/buggy/src/sphinx4/edu/cmu/sphinx/linguist/language/ngram/large/LargeTrigramModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1431,
1322,
81,
2091,
12,
3944,
4021,
2076,
4021,
13,
288,
3639,
1431,
3029,
2091,
4065,
273,
404,
18,
20,
74,
31,
3639,
309,
261,
2854,
9552,
2091,
13,
288,
5411,
3029,
2091,
138... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1431,
1322,
81,
2091,
12,
3944,
4021,
2076,
4021,
13,
288,
3639,
1431,
3029,
2091,
4065,
273,
404,
18,
20,
74,
31,
3639,
309,
261,
2854,
9552,
2091,
13,
288,
5411,
3029,
2091,
138... |
fWorkspaceDirButton = createRadioButton(workingDirComp, LaunchUIPlugin.getResourceString("WorkingDirectoryBlock.Works&pace")); | fWorkspaceDirButton = createRadioButton(workingDirComp, LaunchMessages.getString("WorkingDirectoryBlock.Works&pace")); | public void createControl(Composite parent) { Composite workingDirComp = new Composite(parent, SWT.NONE);// WorkbenchHelp.setHelp(workingDirComp, IJavaDebugHelpContextIds.WORKING_DIRECTORY_BLOCK);; GridLayout workingDirLayout = new GridLayout(); workingDirLayout.numColumns = 3; workingDirLayout.marginHeight = 0; workingDirLayout.marginWidth = 0; workingDirComp.setLayout(workingDirLayout); GridData gd = new GridData(GridData.FILL_HORIZONTAL); workingDirComp.setLayoutData(gd); setControl(workingDirComp); fWorkingDirLabel = new Label(workingDirComp, SWT.NONE); fWorkingDirLabel.setText(LaunchUIPlugin.getResourceString("WorkingDirectoryBlock.Wor&king_directory")); //$NON-NLS-1$ gd = new GridData(); gd.horizontalSpan = 3; fWorkingDirLabel.setLayoutData(gd); fUseDefaultWorkingDirButton = new Button(workingDirComp,SWT.CHECK); fUseDefaultWorkingDirButton.setText(LaunchUIPlugin.getResourceString("WorkingDirectoryBlock.Use_de&fault_working_directory")); //$NON-NLS-1$ gd = new GridData(); gd.horizontalSpan = 3; fUseDefaultWorkingDirButton.setLayoutData(gd); fUseDefaultWorkingDirButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent evt) { handleUseDefaultWorkingDirButtonSelected(); } }); fLocalDirButton = createRadioButton(workingDirComp, LaunchUIPlugin.getResourceString("WorkingDirectoryBlock.&Local_directory")); //$NON-NLS-1$ fLocalDirButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent evt) { handleLocationButtonSelected(); } }); fWorkingDirText = new Text(workingDirComp, SWT.SINGLE | SWT.BORDER); gd = new GridData(GridData.FILL_HORIZONTAL); fWorkingDirText.setLayoutData(gd); fWorkingDirText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent evt) { updateLaunchConfigurationDialog(); } }); fWorkingDirBrowseButton = createPushButton(workingDirComp, LaunchUIPlugin.getResourceString("Launch.common.Browse_1"), null); //$NON-NLS-1$ fWorkingDirBrowseButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent evt) { handleWorkingDirBrowseButtonSelected(); } }); fWorkspaceDirButton = createRadioButton(workingDirComp, LaunchUIPlugin.getResourceString("WorkingDirectoryBlock.Works&pace")); //$NON-NLS-1$ fWorkspaceDirButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent evt) { handleLocationButtonSelected(); } }); fWorkspaceDirText = new Text(workingDirComp, SWT.SINGLE | SWT.BORDER); gd = new GridData(GridData.FILL_HORIZONTAL); fWorkspaceDirText.setLayoutData(gd); fWorkspaceDirText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent evt) { updateLaunchConfigurationDialog(); } }); fWorkspaceDirBrowseButton = createPushButton(workingDirComp, LaunchUIPlugin.getResourceString("Launch.common.Browse_2"), null); //$NON-NLS-1$ fWorkspaceDirBrowseButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent evt) { handleWorkspaceDirBrowseButtonSelected(); } }); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/a192c2f172621fd921dbaebb14ee66fcee4f8f12/WorkingDirectoryBlock.java/buggy/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
752,
3367,
12,
9400,
982,
13,
288,
6862,
9506,
202,
9400,
5960,
1621,
2945,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
9826,
1769,
759,
202,
202,
2421,
22144,
6696,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
752,
3367,
12,
9400,
982,
13,
288,
6862,
9506,
202,
9400,
5960,
1621,
2945,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
9826,
1769,
759,
202,
202,
2421,
22144,
6696,
18... |
String url = workString.substring(index, (end - index + 1)); | String url = string.substring(index, end + 1); | public static String autoLink(String string) { if (string == null || string.length() == 0) { return string; } String workString = new String(string); int index = -1; StringBuffer buffer = new StringBuffer(); // First check for email addresses. while ((index = workString.indexOf("@")) != -1) { int start = 0; int end = workString.length() - 1; // scan backwards... for (int j = index; j >= 0; j--) { if (Character.isWhitespace(workString.charAt(j))) { start = j + 1; break; } } // scan forwards... for (int j = index; j <= end; j++) { if (Character.isWhitespace(workString.charAt(j))) { end = j - 1; break; } } String email = workString.substring(start, (end - start + 1)); buffer.append(workString.substring(0, start)).append("<a href=\"mailto:").append(email + "\">").append( email).append("</a>"); if (end == workString.length()) { workString = ""; } else { workString = workString.substring(end + 1); } } workString = buffer.toString() + workString; buffer = new StringBuffer(); // Now check for urls... while ((index = workString.indexOf(URL_HTTP)) != -1) { int end = workString.length() - 1; // scan forwards... for (int j = index; j <= end; j++) { if (Character.isWhitespace(workString.charAt(j))) { end = j - 1; break; } } String url = workString.substring(index, (end - index + 1)); buffer .append(workString.substring(0, index)) .append("<a href=\"") .append(url) .append("\">") .append(url) .append("</a>"); if (end == workString.length()) { workString = ""; } else { workString = workString.substring(end + 1); } } buffer.append(workString); return buffer.toString(); } | 10316 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10316/b05bf34c801db173f91a15a9326e32bd5028d91f/LinkUtil.java/buggy/displaytag/src/main/java/org/displaytag/util/LinkUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
3656,
2098,
12,
780,
533,
13,
565,
288,
3639,
309,
261,
1080,
422,
446,
747,
533,
18,
2469,
1435,
422,
374,
13,
3639,
288,
5411,
327,
533,
31,
3639,
289,
3639,
514,
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,
514,
3656,
2098,
12,
780,
533,
13,
565,
288,
3639,
309,
261,
1080,
422,
446,
747,
533,
18,
2469,
1435,
422,
374,
13,
3639,
288,
5411,
327,
533,
31,
3639,
289,
3639,
514,
14... |
public VM_PendingRETInfo(VM_PendingRETInfo copyfrom) { this.JSRSubStartByteIndex = copyfrom.JSRSubStartByteIndex; this.JSRBBNum = copyfrom.JSRBBNum; this.returnAddressLocation = copyfrom.returnAddressLocation; this.JSRNextBBNum = copyfrom.JSRNextBBNum; this.updatedOnce = copyfrom.updatedOnce; | public VM_PendingRETInfo(int JSRSubStartByteIndex, int JSRBBNum, int returnAddressLocation, short JSRNextBBNum) { this.JSRSubStartByteIndex = JSRSubStartByteIndex; this.JSRBBNum = JSRBBNum; this.returnAddressLocation = returnAddressLocation; this.JSRNextBBNum = JSRNextBBNum; updatedOnce = false; | public VM_PendingRETInfo(VM_PendingRETInfo copyfrom) { this.JSRSubStartByteIndex = copyfrom.JSRSubStartByteIndex; this.JSRBBNum = copyfrom.JSRBBNum; this.returnAddressLocation = copyfrom.returnAddressLocation; this.JSRNextBBNum = copyfrom.JSRNextBBNum; this.updatedOnce = copyfrom.updatedOnce; } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/40e21dc6ed844793c7ae07ad49c4ba40eadcacf4/VM_PendingRETInfo.java/clean/rvm/src/vm/compilers/baseline/GCMap/VM_PendingRETInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
8251,
67,
8579,
10238,
966,
12,
7397,
67,
8579,
10238,
966,
1610,
2080,
13,
288,
565,
333,
18,
6479,
54,
1676,
1685,
3216,
1016,
225,
273,
1610,
2080,
18,
6479,
54,
1676,
1685,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8251,
67,
8579,
10238,
966,
12,
7397,
67,
8579,
10238,
966,
1610,
2080,
13,
288,
565,
333,
18,
6479,
54,
1676,
1685,
3216,
1016,
225,
273,
1610,
2080,
18,
6479,
54,
1676,
1685,
32... |
/* FULL path processing (references..) */ xpp.clear(); xpp.initialize(fullPath); lelement = xpp.getElement(-1); String eRefs = xpp.findAttributeValue(lelement, LDMLConstants.REFERENCES); | private void populateFrom(CLDRDBSource src, CheckCLDR checkCldr, CLDRFile engFile) { XPathParts xpp = new XPathParts(null,null); System.out.println("[] initting from pod " + locale + " with prefix " + xpathPrefix); CLDRFile aFile = new CLDRFile(src, true); Map options = new TreeMap();// options.put("CheckCoverage.requiredLevel","modern"); // TODO: fix XPathParts pathParts = new XPathParts(null, null); XPathParts fullPathParts = new XPathParts(null, null); // todo: move this to static// Pattern typeReplacementPattern = Pattern.compile("@type="); Pattern typeReplacementPattern = Pattern.compile("\\[@(?:type|key)=['\"]([^'\"]*)['\"]\\]"); Pattern keyTypeSwapPattern = Pattern.compile("([^/]*)/(.*)"); Pattern noisePattern = Pattern.compile( // 'noise' to be removed "^/|"+ "Formats/currencyFormatLength/currencyFormat|"+ "Formats/currencySpacing|"+ "Formats/percentFormatLength/percentFormat|"+ "Formats/decimalFormatLength/decimalFormat|"+ "Formats/scientificFormatLength/scientificFormat|"+ "dateTimes/dateTimeLength/|"+ "/timeFormats/timeFormatLength|"+ "s/quarterContext|"+ "/dateFormats/dateFormatLength|"+ "/pattern|"+ "/monthContext|"+ "/dayContext|"+ "/dayWidth|"+ "day/|"+ "Format|"+ "s/field|"+ "\\[@draft=\"true\"\\]|"+ // ??? "\\[@alt=\"[^\"]*\"\\]|"+ // ??? "/displayName$|" + // for currency "/standard" ); Pattern mostPattern = Pattern.compile("^//ldml/localeDisplayNames.*|"+ "^//ldml/characters/exemplarCharacters.*|"+ "^//ldml/numbers.*|"+ "^//ldml/dates.*|"+ "^//ldml/identity.*"); /** TODO: this needs to be generalized.. **/ String exclude = null; boolean excludeCurrencies = false; boolean excludeCalendars = false; boolean excludeLDN = false; boolean excludeGrego = false; boolean excludeTimeZones = false; boolean useShorten = false; // 'shorten' xpaths instead of extracting type boolean confirmOnly = false; boolean keyTypeSwap = false; boolean hackCurrencyDisplay = false; boolean excludeMost = false; String removePrefix = null; if(xpathPrefix.equals("//ldml")) { excludeMost = true; useShorten = true; removePrefix="//ldml/"; }else if(xpathPrefix.startsWith("//ldml/numbers")) { if(-1 == xpathPrefix.indexOf("currencies")) { excludeCurrencies=true; // = "//ldml/numbers/currencies"; removePrefix = "//ldml/numbers/"; useShorten = true; } else { removePrefix = "//ldml/numbers/currencies/currency"; useShorten = true; hackCurrencyDisplay = true; } } else if(xpathPrefix.startsWith("//ldml/dates")) { useShorten = true; if(xpathPrefix.startsWith("//ldml/dates/timeZoneNames")) { removePrefix = "//ldml/dates/timeZoneNames/zone"; excludeTimeZones = false; } else { removePrefix = "//ldml/dates/calendars/calendar"; excludeTimeZones = true; if(xpathPrefix.indexOf("gregorian")==-1) { excludeGrego = true; // nongreg } else { removePrefix = "//ldml/dates/calendars/calendar/gregorian/"; } } } else if(xpathPrefix.startsWith("//ldml/localeDisplayNames/types")) { useShorten = true; removePrefix = "//ldml/localeDisplayNames/types/type"; keyTypeSwap = true; //these come in reverse order (type/key) i.e. buddhist/celander, pinyin/collation. Reverse this for sorting... }/* checkCldr.check(path, fullPath, value, pathParts, fullPathParts, checkCldrResult); for (Iterator it3 = checkCldrResult.iterator(); it3.hasNext();) { CheckCLDR.CheckStatus status = (CheckCLDR.CheckStatus) it3.next(); if (!status.getType().equals(status.exampleType)) { ctx.println(status.toString() + "\t" + value + "\t" + fullPath);*/ List checkCldrResult = new ArrayList(); for(Iterator it = aFile.iterator(xpathPrefix);it.hasNext();) { String xpath = (String)it.next(); if(excludeMost && mostPattern.matcher(xpath).matches()) { continue; } else if(excludeCurrencies && (xpath.startsWith("//ldml/numbers/currencies/currency"))) { continue; } else if(excludeCalendars && (xpath.startsWith("//ldml/dates/calendars"))) { continue; } else if(excludeTimeZones && (xpath.startsWith("//ldml/dates/timeZoneNames"))) { continue; } else if(!excludeCalendars && excludeGrego && (xpath.startsWith(SurveyMain.GREGO_XPATH))) { continue; } boolean mixedType = false; String type; String lastType = src.xpt.typeFromPathToTinyXpath(xpath, xpp); // last type in the list String displaySuffixXpath; String peaSuffixXpath = null; // if non null: write to suffixXpath String fullSuffixXpath = xpath.substring(xpathPrefix.length(),xpath.length()); if((removePrefix == null)||!xpath.startsWith(removePrefix)) { displaySuffixXpath = fullSuffixXpath; } else { displaySuffixXpath = xpath.substring(removePrefix.length(),xpath.length()); } if(useShorten == false) { type = lastType; if(type == null) { peaSuffixXpath = displaySuffixXpath; // Mixed pea if(xpath.startsWith("//ldml/characters")) { type = "standard"; } else { type = displaySuffixXpath; mixedType = true; } } } else { // shorten peaSuffixXpath = displaySuffixXpath; // always mixed pea if we get here Matcher m = typeReplacementPattern.matcher(displaySuffixXpath); type = m.replaceAll("/$1"); Matcher n = noisePattern.matcher(type); type = n.replaceAll(""); if(keyTypeSwap) { // see above Matcher o = keyTypeSwapPattern.matcher(type); type = o.replaceAll("$2/$1"); }// type = suffixXpath; // just see where this gets us } String value = aFile.getStringValue(xpath); if(xpath.indexOf("default[@type")!=-1) { peaSuffixXpath = displaySuffixXpath;// type = type.substring(0,type.indexOf('@')) + " (default)"; int n = type.lastIndexOf('/'); if(n==-1) { type = "(default type)"; } else { type = type.substring(0,n); // blahblah/default/foo -> blahblah/default ('foo' is lastType and will show up as the value) } value = lastType; confirmOnly = true; // can't acccept new data for this. } if(value == null) {// throw new InternalError("Value of " + xpath + " is null."); System.err.println("Value of " + xpath + " is null."); value = "(NOTHING)"; } String fullPath = aFile.getFullXPath(xpath);// System.out.println("* T=" + type + ", X= " + xpath); String alt = src.xpt.altFromPathToTinyXpath(xpath, xpp); xpp.clear(); xpp.initialize(xpath); String lelement = xpp.getElement(-1); /* all of these are always at the end */ String eAlt = xpp.findAttributeValue(lelement,LDMLConstants.ALT); String eDraft = xpp.findAttributeValue(lelement,LDMLConstants.DRAFT); String typeAndProposed[] = LDMLUtilities.parseAlt(alt); String altProposed = typeAndProposed[1]; String altType = typeAndProposed[0]; Pea p = getPea(type, altType); Pea superP = getPea(type); peaSuffixXpath = fullSuffixXpath; // for now... if(peaSuffixXpath!=null) { p.xpathSuffix = peaSuffixXpath; superP.xpathSuffix = peaSuffixXpath; } p.confirmOnly = superP.confirmOnly = confirmOnly; if(altProposed == null) { // just work on the supers if(superP.displayName == null) { if(xpathPrefix.startsWith("//ldml/localeDisplayNames/")) { superP.displayName = engFile.getStringValue(xpath(superP)); // isn't this what it's for? /* if(mixedType == false) { superP.displayName = engFile.getStringValue(xpathPrefix+"[@type=\""+type+"\"]"); } else { superP.displayName = engFile.getStringValue(xpathPrefix); } */ } } if(superP.displayName == null) { if(!xpath.startsWith("//ldml/characters") && !useShorten) { superP.displayName = "'"+type+"'"; } } if((superP.displayName == null)&& hackCurrencyDisplay) { int slashDex = type.indexOf('/'); String cType = type; if(slashDex!=-1) { cType = type.substring(0,slashDex); } superP.displayName = engFile.getStringValue(SurveyMain.CURRENCYTYPE+cType+"']/displayName"); if((superP.displayName != null)&&(type.indexOf("symbol")!=-1)) { superP.displayName = superP.displayName + " (symbol)"; } } if(superP.displayName == null) { canName = false; // disable 'view by name' if not all have names. } } // If it is draft and not proposed.. make it proposed-draft if( ((eDraft!=null)&&(!eDraft.equals("false"))) && (altProposed == null) ) { altProposed = SurveyMain.PROPOSED_DRAFT; } // Inherit display names. if((superP != p) && (p.displayName == null)) { p.displayName = superP.displayName; } String sourceLocale = aFile.getSourceLocaleID(xpath); boolean isInherited = !(sourceLocale.equals(locale)); if(altProposed == null) { if(!isInherited) { superP.hasInherited=false; p.hasInherited=false; } else { p.hasInherited = true; p.inheritFrom = sourceLocale; } } else { p.hasProps = true; superP.hasProps = true; } String setInheritFrom = (isInherited)?sourceLocale:null; // no inherit if it's current. boolean isCodeFallback = (setInheritFrom!=null)&& (setInheritFrom.equals(XMLSource.CODE_FALLBACK_ID)); // don't flag errors from code fallback. if((checkCldr != null)&&(altProposed == null)) { checkCldr.check(xpath, fullPath, value, options, checkCldrResult); } if(checkCldrResult.isEmpty()) { p.addItem( value, altProposed, null).inheritFrom=setInheritFrom; } else { p.addItem( value, altProposed, checkCldrResult).inheritFrom=setInheritFrom; // only consider non-example tests as notable. boolean weHaveTests = false; for (Iterator it3 = checkCldrResult.iterator(); it3.hasNext();) { CheckCLDR.CheckStatus status = (CheckCLDR.CheckStatus) it3.next(); if(!status.getType().equals(status.exampleType) && !(isCodeFallback && (status.getCause() instanceof org.unicode.cldr.test.CheckForExemplars))) { // skip codefallback exemplar complaints (i.e. 'JPY' isn't in exemplars).. they'll show up in missing weHaveTests = true; } } if(weHaveTests) { p.hasTests = true; superP.hasTests = true; } // set the parent checkCldrResult = new ArrayList(); // can't reuse it if nonempty } } // aFile.close(); } | 27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/6c2a3de3ff12b994439a3c4d0855709a5700fd85/DataPod.java/buggy/tools/java/org/unicode/cldr/web/DataPod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1748,
18153,
589,
4929,
261,
14353,
838,
13,
1195,
619,
11858,
18,
8507,
5621,
619,
11858,
18,
11160,
12,
2854,
743,
1769,
328,
2956,
273,
619,
11858,
18,
21336,
19236,
21,
1769,
514,
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,
225,
1748,
18153,
589,
4929,
261,
14353,
838,
13,
1195,
619,
11858,
18,
8507,
5621,
619,
11858,
18,
11160,
12,
2854,
743,
1769,
328,
2956,
273,
619,
11858,
18,
21336,
19236,
21,
1769,
514,
425... | |
return (String) XMLTypeFactory.eINSTANCE.createFromString( XMLTypePackage.eINSTANCE.getString( ), | return (String) XMLTypeFactory.eINSTANCE.createFromString( XMLTypePackage.Literals.STRING, | public String createIDFromString( EDataType eDataType, String initialValue ) { return (String) XMLTypeFactory.eINSTANCE.createFromString( XMLTypePackage.eINSTANCE.getString( ), initialValue ); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/036e8c78765730b146e5854b9d6c397a296fed86/AttributeFactoryImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/impl/AttributeFactoryImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
752,
734,
9193,
12,
20807,
11479,
16,
514,
11837,
262,
202,
95,
202,
202,
2463,
261,
780,
13,
3167,
559,
1733,
18,
73,
13341,
18,
2640,
9193,
12,
3167,
559,
2261,
18,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
752,
734,
9193,
12,
20807,
11479,
16,
514,
11837,
262,
202,
95,
202,
202,
2463,
261,
780,
13,
3167,
559,
1733,
18,
73,
13341,
18,
2640,
9193,
12,
3167,
559,
2261,
18,
7... |
cityTotal = 0; | this.cityTotal = 0; | public final String finishRow() { int listindex = ((List) getDecoratedObject()).indexOf(this.getCurrentRowObject()); ReportableListObject reportableObject = (ReportableListObject) this.getCurrentRowObject(); String nextCity = ""; cityTotal += reportableObject.getAmount(); grandTotal += reportableObject.getAmount(); if (listindex == ((List) getDecoratedObject()).size() - 1) { nextCity = "XXXXXX"; // Last row hack, it's only a demo folks... } else { nextCity = ((ReportableListObject) ((List) getDecoratedObject()).get(listindex + 1)).getCity(); } StringBuffer buffer = new StringBuffer(1000); // City subtotals... if (!nextCity.equals(reportableObject.getCity())) { buffer.append("\n<tr>\n<td> </td><td> </td><td><hr noshade size=\"1\"></td>"); buffer.append("\n<td> </td></tr>"); buffer.append("\n<tr><td> </td>"); buffer.append("\n<td align=\"right\"><b>" + reportableObject.getCity() + " Total:</b></td>\n<td><b>"); buffer.append(cityTotal); buffer.append("</b></td>\n<td> </td>\n</tr>"); buffer.append("\n<tr>\n<td colspan=\"4\"> \n</td>\n</tr>"); cityTotal = 0; } // Grand totals... if (getViewIndex() == ((List) getDecoratedObject()).size() - 1) { buffer.append("<tr><td colspan=\"4\"><hr noshade size=\"1\"></td></tr>"); buffer.append("<tr><td> </td>"); buffer.append("<td align=\"right\"><b>Grand Total:</b></td><td><b>"); buffer.append(grandTotal); buffer.append("</b></td><td> </td></tr>"); } return buffer.toString(); } | 7284 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7284/ed5033a65d1a925fc3c1ad3ffe7210f23cf10cb0/TotalWrapper.java/clean/displaytag/src/main/java/org/displaytag/sample/TotalWrapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
514,
4076,
1999,
1435,
565,
288,
3639,
509,
666,
1615,
273,
14015,
682,
13,
336,
7859,
690,
921,
1435,
2934,
31806,
12,
2211,
18,
588,
3935,
1999,
921,
10663,
3639,
8706,
429,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
514,
4076,
1999,
1435,
565,
288,
3639,
509,
666,
1615,
273,
14015,
682,
13,
336,
7859,
690,
921,
1435,
2934,
31806,
12,
2211,
18,
588,
3935,
1999,
921,
10663,
3639,
8706,
429,
... |
public FigEdge getFigEdgeFor(GraphModel gm, Layer lay, Object edge, Map styleAttributes) { if (Model.getFacade().isALink(edge)) { Object stimulus = Model.getFacade().getStimuli(edge).iterator().next(); Object action = Model.getFacade().getDispatchAction(stimulus); if (Model.getFacade().isACallAction(action)) { return new FigCallActionLink(edge); } else if (Model.getFacade().isAReturnAction(action)) { return new FigReturnActionLink(edge); } else if (Model.getFacade().isADestroyAction(edge)) { return new FigDestroyActionLink(edge); } else if (Model.getFacade().isACreateAction(edge)) { return new FigCreateActionLink(edge); } } LOG.debug("SequenceDiagramRenderer getFigEdgeFor"); return null; | public FigEdge getFigEdgeFor(GraphModel gm, Layer lay, Object edge, Map styleAttributes) { return getFigEdgeFor( edge, styleAttributes); | public FigEdge getFigEdgeFor(GraphModel gm, Layer lay, Object edge, Map styleAttributes) { if (Model.getFacade().isALink(edge)) { Object stimulus = Model.getFacade().getStimuli(edge).iterator().next(); Object action = Model.getFacade().getDispatchAction(stimulus); if (Model.getFacade().isACallAction(action)) { return new FigCallActionLink(edge); } else if (Model.getFacade().isAReturnAction(action)) { return new FigReturnActionLink(edge); } else if (Model.getFacade().isADestroyAction(edge)) { return new FigDestroyActionLink(edge); } else if (Model.getFacade().isACreateAction(edge)) { return new FigCreateActionLink(edge); } } // TODO: Something here. LOG.debug("SequenceDiagramRenderer getFigEdgeFor"); return null; } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/14c1a90832901151373e2eb7e45cc1d41b38acca/SequenceDiagramRenderer.java/buggy/src_new/org/argouml/uml/diagram/sequence/ui/SequenceDiagramRenderer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
478,
360,
6098,
2812,
360,
6098,
1290,
12,
4137,
1488,
14125,
16,
12112,
328,
528,
16,
6862,
1033,
3591,
16,
1635,
2154,
2498,
13,
288,
3639,
309,
261,
1488,
18,
588,
12467,
7675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
478,
360,
6098,
2812,
360,
6098,
1290,
12,
4137,
1488,
14125,
16,
12112,
328,
528,
16,
6862,
1033,
3591,
16,
1635,
2154,
2498,
13,
288,
3639,
309,
261,
1488,
18,
588,
12467,
7675,
... |
Date now = new Date(); | java.util.Date now = new java.util.Date(); | public boolean isActive() { Date now = new Date(); return (activatedDatetime == null || activatedDatetime.before( now )) && !isArchivedAtTime( now ); } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/671372d8a7c3cefbd034e382b73e3e9a9681cd19/DocumentDomainObject.java/clean/server/src/imcode/server/document/DocumentDomainObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
15083,
1435,
288,
3639,
2252,
18,
1367,
18,
1626,
2037,
273,
394,
2252,
18,
1367,
18,
1626,
5621,
3639,
327,
261,
18836,
16103,
422,
446,
747,
14892,
16103,
18,
5771,
12,
2037... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
15083,
1435,
288,
3639,
2252,
18,
1367,
18,
1626,
2037,
273,
394,
2252,
18,
1367,
18,
1626,
5621,
3639,
327,
261,
18836,
16103,
422,
446,
747,
14892,
16103,
18,
5771,
12,
2037... |
Set<Method> getMethodSet(String memberName) { | final Set<Method> getMethodSet(String memberName) { | Set<Method> getMethodSet(String memberName) { Set<Method> methodSet = fullNameToMethods.get(memberName); if (methodSet == null) { methodSet = nameToMethods.get(memberName); } if (methodSet == null) { methodSet = new HashSet<Method>(); } return methodSet; } | 13291 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13291/615094576784f8eacf0891411a5b25d98778892b/ParentToMethods.java/clean/src/org/jedit/ruby/cache/ParentToMethods.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
727,
1000,
32,
1305,
34,
6272,
694,
12,
780,
3140,
461,
13,
288,
3639,
1000,
32,
1305,
34,
707,
694,
273,
12424,
774,
4712,
18,
588,
12,
5990,
461,
1769,
3639,
309,
261,
2039,
694,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
727,
1000,
32,
1305,
34,
6272,
694,
12,
780,
3140,
461,
13,
288,
3639,
1000,
32,
1305,
34,
707,
694,
273,
12424,
774,
4712,
18,
588,
12,
5990,
461,
1769,
3639,
309,
261,
2039,
694,
42... |
RubyModule rbClass = getRubyClass(); while (rbClass != null) { if (rbClass == rbModule || rbClass.getMethods() == rbModule.getMethods()) { return getRuby().getTrue(); } rbClass = rbClass.getSuperClass(); } return getRuby().getFalse(); } | RubyModule rbClass = getRubyClass(); while (rbClass != null) { if (rbClass == rbModule || rbClass.getMethods() == rbModule.getMethods()) { return getRuby().getTrue(); } rbClass = rbClass.getSuperClass(); } return getRuby().getFalse(); } | public RubyBoolean m_kind_of(RubyModule rbModule) { RubyModule rbClass = getRubyClass(); while (rbClass != null) { if (rbClass == rbModule || rbClass.getMethods() == rbModule.getMethods()) { return getRuby().getTrue(); } rbClass = rbClass.getSuperClass(); } return getRuby().getFalse(); } | 50993 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50993/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObject.java/buggy/org/jruby/RubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
5507,
312,
67,
9224,
67,
792,
12,
54,
10340,
3120,
7138,
3120,
13,
288,
202,
202,
54,
10340,
3120,
7138,
797,
273,
4170,
10340,
797,
5621,
202,
202,
17523,
261,
6731,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
5507,
312,
67,
9224,
67,
792,
12,
54,
10340,
3120,
7138,
3120,
13,
288,
202,
202,
54,
10340,
3120,
7138,
797,
273,
4170,
10340,
797,
5621,
202,
202,
17523,
261,
6731,
7... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.