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 |
|---|---|---|---|---|---|---|
if (overloadedMethods.size() < 2) Context.codeBug(); methods = new Method[overloadedMethods.size()]; overloadedMethods.toArray(methods); | int N = overloadedMethods.size(); if (N < 2) Context.codeBug(); methods = new MemberBox[N]; for (int i = 0; i != N; ++i) { Method method = (Method)overloadedMethods.get(i); methods[i] = new MemberBox(method); } | private static void initNativeMethods(Hashtable ht, Scriptable scope) { Enumeration e = ht.keys(); while (e.hasMoreElements()) { String name = (String)e.nextElement(); Method[] methods; Object value = ht.get(name); if (value instanceof Method) { methods = new Method[1]; methods[0] = (Method)value; } else { ObjArray overloadedMethods = (ObjArray)value; if (overloadedMethods.size() < 2) Context.codeBug(); methods = new Method[overloadedMethods.size()]; overloadedMethods.toArray(methods); } NativeJavaMethod fun = new NativeJavaMethod(methods); if (scope != null) { fun.setPrototype(ScriptableObject.getFunctionPrototype(scope)); } ht.put(name, fun); } } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/004397fe5ef540e453f60552849d0320b106ace4/JavaMembers.java/clean/js/rhino/src/org/mozilla/javascript/JavaMembers.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
1208,
9220,
4712,
12,
5582,
14544,
14049,
16,
22780,
2146,
13,
565,
288,
3639,
13864,
425,
273,
14049,
18,
2452,
5621,
3639,
1323,
261,
73,
18,
5332,
7417,
3471,
10756,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
1208,
9220,
4712,
12,
5582,
14544,
14049,
16,
22780,
2146,
13,
565,
288,
3639,
13864,
425,
273,
14049,
18,
2452,
5621,
3639,
1323,
261,
73,
18,
5332,
7417,
3471,
10756,
28... |
MainFrame.getInstance().scrollToTime(scrollTime); } | MainFrame.getInstance().scrollToTime(scrollTime); } | public void actionPerformed(ActionEvent e) { MainFrame.getInstance().scrollToTime(scrollTime); } | 9266 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9266/82613e27f32a4b89f61783e56b109e05d99cb088/DefaultToolBarModel.java/clean/tvbrowser/src/tvbrowser/ui/mainframe/toolbar/DefaultToolBarModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
1850,
12740,
3219,
18,
588,
1442,
7675,
12033,
774,
950,
12,
12033,
950,
1769,
3639,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
1850,
12740,
3219,
18,
588,
1442,
7675,
12033,
774,
950,
12,
12033,
950,
1769,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if (canEdit()) { _editing = true; setValueForBinding(Boolean.TRUE, "editing"); WOActionResults results = (WOActionResults) valueForBinding("editAction"); } return null; } | if (canEdit()) { _editing = true; setValueForBinding(Boolean.TRUE, "editing"); WOActionResults results = (WOActionResults) valueForBinding("editAction"); } return null; } | public WOActionResults startEditing() { if (canEdit()) { _editing = true; setValueForBinding(Boolean.TRUE, "editing"); WOActionResults results = (WOActionResults) valueForBinding("editAction"); } // ignore results return null; } | 46145 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46145/18cd1e043ec46b2050d90832a89d9f0a7a16da82/AjaxInPlace.java/buggy/Ajax/Ajax/Sources/er/ajax/AjaxInPlace.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
678,
51,
1803,
3447,
787,
28029,
1435,
288,
202,
225,
309,
261,
4169,
4666,
10756,
288,
202,
565,
389,
4619,
310,
273,
638,
31,
202,
565,
5524,
1290,
5250,
12,
5507,
18,
18724,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
678,
51,
1803,
3447,
787,
28029,
1435,
288,
202,
225,
309,
261,
4169,
4666,
10756,
288,
202,
565,
389,
4619,
310,
273,
638,
31,
202,
565,
5524,
1290,
5250,
12,
5507,
18,
18724,
16... |
for (int i = 0; i < nrargs; i++) { | for (int i = 0; i < nrargs; i++) { | public Object incomingMessageCall(UnicastConnection conn, int method, long hash) throws Exception {//System.out.println("method = " + method + ", hash = " + hash); // If method is -1 then this is JDK 1.2 RMI - so use the hash // to locate the method if (method == -1) { Method meth = (Method)methods.get(new Long (hash));//System.out.println("class = " + myself.getClass() + ", meth = " + meth); if (meth == null) { throw new NoSuchMethodException(); } ObjectInputStream in = conn.getObjectInputStream(); int nrargs = meth.getParameterTypes().length; Object[] args = new Object[nrargs]; for (int i = 0; i < nrargs; i++) { /** * For debugging purposes - we don't handle CodeBases * quite right so we don't always find the stubs. This * lets us know that. */ try { // need to handle primitive types args[i] = ((RMIObjectInputStream)in).readValue(meth.getParameterTypes()[i]); } catch (Exception t) { t.printStackTrace(); throw t; } } //We must reinterpret the exception thrown by meth.invoke() //return (meth.invoke(myself, args)); Object ret = null; try{ ret = meth.invoke(myself, args); }catch(InvocationTargetException e){ Throwable cause = e.getTargetException(); if (cause instanceof Exception) { throw (Exception)cause; } else if (cause instanceof Error) { throw (Error)cause; } else { throw new Error("The remote method threw a java.lang.Throwable that is neither java.lang.Exception nor java.lang.Error.", e); } } return ret; } // Otherwise this is JDK 1.1 style RMI - we find the skeleton // and invoke it using the method number. We wrap up our // connection system in a UnicastRemoteCall so it appears in a // way the Skeleton can handle. else { if (skel == null) { throw new NoSuchMethodException(); } UnicastRemoteCall call = new UnicastRemoteCall(conn); skel.dispatch(myself, call, method, hash); if (!call.isReturnValue()) return RMIVoidValue.INSTANCE; else return (call.returnValue()); }} | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/UnicastServerRef.java/clean/core/src/classpath/gnu/gnu/java/rmi/server/UnicastServerRef.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1033,
6935,
1079,
1477,
12,
984,
12544,
1952,
1487,
16,
509,
707,
16,
1525,
1651,
13,
1216,
1185,
288,
759,
3163,
18,
659,
18,
8222,
2932,
2039,
273,
315,
397,
707,
397,
3104,
1651,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1033,
6935,
1079,
1477,
12,
984,
12544,
1952,
1487,
16,
509,
707,
16,
1525,
1651,
13,
1216,
1185,
288,
759,
3163,
18,
659,
18,
8222,
2932,
2039,
273,
315,
397,
707,
397,
3104,
1651,
27... |
assertEquals(2, stmt.executeUpdate("DELETE FROM testtime")); | assertEquals(8, stmt.executeUpdate("DELETE FROM testtime")); | public void testGetTime() { try { Statement stmt = con.createStatement(); assertEquals(1, stmt.executeUpdate(TestUtil.insertSQL("testtime", "'01:02:03'"))); assertEquals(1, stmt.executeUpdate(TestUtil.insertSQL("testtime", "'23:59:59'"))); // Fall through helper timeTest(); assertEquals(2, stmt.executeUpdate("DELETE FROM testtime")); stmt.close(); } catch (Exception ex) { fail(ex.getMessage()); } } | 2413 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2413/c263603ac36abe8a479be5937fab834c0571b428/TimeTest.java/clean/org/postgresql/test/jdbc2/TimeTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
967,
950,
1435,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
3406,
3480,
273,
356,
18,
2640,
3406,
5621,
1082,
202,
11231,
8867,
12,
21,
16,
3480,
18,
8837,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
967,
950,
1435,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
3406,
3480,
273,
356,
18,
2640,
3406,
5621,
1082,
202,
11231,
8867,
12,
21,
16,
3480,
18,
8837,
1... |
final JabberId invitedBy) throws SmackException; | final JabberId invitedBy); | public void declineInvitation(final EMail invitedAs, final JabberId invitedBy) throws SmackException; | 53635 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53635/59912ed4acd00800021648aeb640b3a3f6542eae/XMPPSession.java/buggy/client-model/src/main/java/com/thinkparity/ophelia/model/util/xmpp/XMPPSession.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3496,
558,
19896,
12,
6385,
512,
6759,
2198,
16261,
1463,
16,
5411,
727,
804,
378,
744,
548,
2198,
16261,
858,
13,
1216,
9425,
484,
503,
31,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3496,
558,
19896,
12,
6385,
512,
6759,
2198,
16261,
1463,
16,
5411,
727,
804,
378,
744,
548,
2198,
16261,
858,
13,
1216,
9425,
484,
503,
31,
2,
-100,
-100,
-100,
-100,
-100,
... |
if (line < 0) locationText.setText(""); else locationText.setText(NLS.bind(BookmarkMessages.LineIndicator_text, String.valueOf(line))); | if (line < 0) { locationText.setText(""); } else { locationText.setText(NLS.bind(BookmarkMessages.LineIndicator_text, String.valueOf(line))); } | private void updateDialogFromMarker() { if (marker == null) { updateDialogForNewMarker(); return; } descriptionText.setText(MarkerUtil.getMessage(marker)); if (creationTime != null) creationTime.setText(MarkerUtil.getCreationTime(marker)); if (resourceText != null) resourceText.setText(MarkerUtil.getResourceName(marker)); if (folderText != null) folderText.setText(MarkerUtil.getContainerName(marker)); if (locationText != null) { int line = MarkerUtil.getLineNumber(marker); if (line < 0) locationText.setText(""); //$NON-NLS-1$ else locationText.setText(NLS.bind(BookmarkMessages.LineIndicator_text, String.valueOf(line))); } descriptionText.selectAll(); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/BookmarkPropertiesDialog.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/BookmarkPropertiesDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
6353,
1265,
7078,
1435,
288,
3639,
309,
261,
11145,
422,
446,
13,
288,
5411,
1089,
6353,
1290,
1908,
7078,
5621,
5411,
327,
31,
3639,
289,
3639,
2477,
1528,
18,
542,
1528... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
6353,
1265,
7078,
1435,
288,
3639,
309,
261,
11145,
422,
446,
13,
288,
5411,
1089,
6353,
1290,
1908,
7078,
5621,
5411,
327,
31,
3639,
289,
3639,
2477,
1528,
18,
542,
1528... |
public void documentLoaded() { | public void documentLoaded () { | public void documentLoaded() { view.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } | 53937 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53937/9a4ed9a276ff3906598aa1c6aa55aeb8a2745a6e/BrowserPanel.java/clean/demos/browser/src/java/org/xhtmlrenderer/demo/browser/BrowserPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1668,
8835,
1832,
288,
3639,
1476,
18,
542,
6688,
12,
2704,
13949,
12,
6688,
18,
5280,
67,
7509,
55,
916,
10019,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1668,
8835,
1832,
288,
3639,
1476,
18,
542,
6688,
12,
2704,
13949,
12,
6688,
18,
5280,
67,
7509,
55,
916,
10019,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
fStringPool.addSymbol("ref"), fStringPool.addString(elementRefName), | fStringPool.addSymbol("minOccurs"), fStringPool.addString("0"), | public void elementDecl(QName elementDecl, XMLContentSpec contentSpec) throws Exception { if (DEBUG_ATTLIST_DECL) { String contentModel = contentSpec.toString(); System.out.println("elementDecl(" + fStringPool.toString(elementDecl.rawname) + ", " + contentModel + ")"); } // // Create element declaration // /*REVISIT Grammar Access if (fGrammarAccess) { if (fDeferredDocumentImpl != null) { // // Build element // // get element declaration; create if necessary int schemaIndex = getLastChildElement(fDocumentTypeIndex, "schema"); String elementName = fStringPool.toString(elementDecl.rawname); int elementIndex = getLastChildElement(schemaIndex, "element", "name", elementName); if (elementIndex == -1) { int handle = fAttrList.startAttrList(); fAttrList.addAttr( fStringPool.addSymbol("name"), fStringPool.addString(elementName), fStringPool.addSymbol("NMTOKEN"), true, false); // search fAttrList.addAttr( fStringPool.addSymbol("minOccurs"), // name fStringPool.addString("1"), // value fStringPool.addSymbol("NMTOKEN"), // type false, // specified false); // search fAttrList.addAttr( fStringPool.addSymbol("nullable"), // name fStringPool.addString("false"), // value fStringPool.addSymbol("ENUMERATION"), // type false, // specified false); // search fAttrList.addAttr( fStringPool.addSymbol("abstract"), // name fStringPool.addString("false"), // value fStringPool.addSymbol("ENUMERATION"), // type false, // specified false); // search fAttrList.addAttr( fStringPool.addSymbol("final"), // name fStringPool.addString("false"), // value fStringPool.addSymbol("ENUMERATION"), // type false, // specified false); // search fAttrList.endAttrList(); elementIndex = fDeferredDocumentImpl.createElement(fStringPool.addSymbol("element"), fAttrList, handle); fDeferredDocumentImpl.appendChild(schemaIndex, elementIndex); } // // Build content model // // <!ELEMENT name (#PCDATA)> int contentType = contentSpec.getType(); String contentTypeName = fStringPool.toString(contentType); XMLContentSpec.Node node = new XMLContentSpec.Node(); int contentSpecHandle = contentSpec.getHandle(); if (contentSpecHandle != -1) { contentSpec.getNode(contentSpecHandle, node); } // (#PCDATA) if (contentTypeName.equals("MIXED") && node.type == 0) { int attrNameIndex = fStringPool.addSymbol("type"); int attrValueIndex = fStringPool.addString("string"); boolean attrSpecified = true; int attrIndex = fDeferredDocumentImpl.createAttribute(attrNameIndex, attrValueIndex, attrSpecified); fDeferredDocumentImpl.setAttributeNode(elementIndex, attrIndex); } // other content models else { // get type element; create if necessary int typeIndex = getLastChildElement(elementIndex, "type"); if (typeIndex == -1) { typeIndex = fDeferredDocumentImpl.createElement(fStringPool.addSymbol("type"), null, -1); // REVISIT: Check for type redeclaration? -Ac fDeferredDocumentImpl.insertBefore(elementIndex, typeIndex, getLastChildElement(elementIndex)); } // <!ELEMENT name EMPTY> if (contentTypeName.equals("EMPTY")) { int attributeIndex = fDeferredDocumentImpl.createAttribute(fStringPool.addSymbol("content"), fStringPool.addString("empty"), true); fDeferredDocumentImpl.setAttributeNode(typeIndex, attributeIndex); } // <!ELEMENT name ANY> else if (contentTypeName.equals("ANY")) { int anyIndex = fDeferredDocumentImpl.createElement(fStringPool.addSymbol("any"), null, -1); fDeferredDocumentImpl.insertBefore(typeIndex, anyIndex, getLastChildElement(typeIndex)); } // <!ELEMENT name (a,b,...)> or <!ELEMENT name (a|b|...)> else if (contentTypeName.equals("CHILDREN")) { int attributeIndex = fDeferredDocumentImpl.createAttribute(fStringPool.addSymbol("content"), fStringPool.addString("elementOnly"), true); fDeferredDocumentImpl.setAttributeNode(typeIndex, attributeIndex); //attributeIndex = fDeferredDocumentImpl.createAttribute(fStringPool.addSymbol("order"), fStringPool.addString("seq"), false); //fDeferredDocumentImpl.setAttributeNode(typeIndex, attributeIndex); int contentSpecIndex = contentSpec.getHandle(); contentSpec.getNode(contentSpecIndex, node); Element model = createContentModel(contentSpec, node); int modelIndex = createDeferredContentModel(model); int firstChildIndex = getLastChildElement(typeIndex); fDeferredDocumentImpl.insertBefore(typeIndex, modelIndex, firstChildIndex); } // <!ELEMENT name (#PCDATA|a|...)*> else { // REVISIT: Any chance of getting other than MIXED? -Ac // set content type int attrIndex = fDeferredDocumentImpl.createAttribute(fStringPool.addSymbol("content"), fStringPool.addString("mixed"), true); fDeferredDocumentImpl.setAttributeNode(typeIndex, attrIndex); // skip '*' node contentSpec.getNode(node.value, node); // add leaves (on descent) do { int index = node.value; int handle = fAttrList.startAttrList(); contentSpec.getNode(node.otherValue, node); String elementRefName = fStringPool.toString(node.value); fAttrList.addAttr( fStringPool.addSymbol("ref"), fStringPool.addString(elementRefName), fStringPool.addSymbol("NMTOKEN"), true, false); // search fAttrList.endAttrList(); int elementRefIndex = fDeferredDocumentImpl.createElement(fStringPool.addSymbol("element"), fAttrList, handle); fDeferredDocumentImpl.insertBefore(typeIndex, elementRefIndex, getLastChildElement(typeIndex, "element")); contentSpec.getNode(index, node); } while (node.type != XMLContentSpec.CONTENTSPECNODE_LEAF); } } } // if defer-node-expansion else if (fDocumentImpl != null) { // // Build element // // get element declaration; create if necessary Element schema = XUtil.getFirstChildElement(fDocumentType, "schema"); String elementName = fStringPool.toString(elementDecl.rawname); Element element = XUtil.getFirstChildElement(schema, "element", "name", elementName); if (element == null) { element = fDocument.createElement("element"); element.setAttribute("name", elementName); element.setAttribute("minOccurs", "1"); ((AttrImpl)element.getAttributeNode("minOccurs")).setSpecified(false); element.setAttribute("nullable", "false"); ((AttrImpl)element.getAttributeNode("nullable")).setSpecified(false); element.setAttribute("abstract", "false"); ((AttrImpl)element.getAttributeNode("abstract")).setSpecified(false); element.setAttribute("final", "false"); ((AttrImpl)element.getAttributeNode("final")).setSpecified(false); schema.appendChild(element); } // // Build content model // // <!ELEMENT name (#PCDATA)> int contentType = contentSpec.getType(); String contentTypeName = fStringPool.toString(contentType); XMLContentSpec.Node node = new XMLContentSpec.Node(); int contentSpecHandle = contentSpec.getHandle(); if (contentSpecHandle != -1) { contentSpec.getNode(contentSpecHandle, node); } // (#PCDATA) if (contentTypeName.equals("MIXED") && node.type == 0) { element.setAttribute("type", "string"); } // other content models else { // get type element; create if necessary Element type = XUtil.getFirstChildElement(element, "type"); if (type == null) { type = fDocumentImpl.createElement("type"); // REVISIT: Check for type redeclaration? -Ac element.insertBefore(type, XUtil.getFirstChildElement(element)); } // <!ELEMENT name EMPTY> if (contentTypeName.equals("EMPTY")) { type.setAttribute("content", "empty"); } // <!ELEMENT name ANY> else if (contentTypeName.equals("ANY")) { Element any = fDocumentImpl.createElement("any"); type.insertBefore(any, XUtil.getFirstChildElement(type)); } // <!ELEMENT name (a,b,...)> or <!ELEMENT name (a|b|...)> else if (contentTypeName.equals("CHILDREN")) { type.setAttribute("content", "elementOnly"); //((AttrImpl)type.getAttributeNode("content")).setSpecified(false); //type.setAttribute("order", "seq"); //((AttrImpl)type.getAttributeNode("order")).setSpecified(false); int contentSpecIndex = contentSpec.getHandle(); contentSpec.getNode(contentSpecIndex, node); Element model = createContentModel(contentSpec, node); Node fragment = fDocument.createDocumentFragment(); XUtil.copyInto(model, fragment); Element firstChild = XUtil.getFirstChildElement(type); type.insertBefore(fragment, firstChild); } // <!ELEMENT name (#PCDATA|a|...)*> else { // REVISIT: Any chance of getting other than MIXED? -Ac // set content type type.setAttribute("content", "mixed"); // skip '*' node contentSpec.getNode(node.value, node); // add leaves (on descent) do { int index = node.value; int handle = fAttrList.startAttrList(); contentSpec.getNode(node.otherValue, node); String elementRefName = fStringPool.toString(node.value); Element elementRef = fDocumentImpl.createElement("element"); elementRef.setAttribute("ref", elementRefName); type.insertBefore(elementRef, XUtil.getFirstChildElement(type, "element")); contentSpec.getNode(index, node); } while (node.type != XMLContentSpec.CONTENTSPECNODE_LEAF); } } } // if NOT defer-node-expansion } // if grammar-access */ } // elementDecl(int,String) | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/3bbd83a7bcddbc34357f71fe08eace8d74b9bc8f/DOMParser.java/buggy/src/org/apache/xerces/parsers/DOMParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
930,
3456,
12,
13688,
930,
3456,
16,
3167,
1350,
1990,
29617,
13,
3639,
1216,
1185,
288,
3639,
309,
261,
9394,
67,
789,
56,
7085,
67,
23956,
13,
288,
5411,
514,
913,
1488,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
930,
3456,
12,
13688,
930,
3456,
16,
3167,
1350,
1990,
29617,
13,
3639,
1216,
1185,
288,
3639,
309,
261,
9394,
67,
789,
56,
7085,
67,
23956,
13,
288,
5411,
514,
913,
1488,
27... |
case 'a': { | case 'a' : { | protected static String getConfig() throws IOException { System.out.println(StringMessageUtils.getBoilerPlate("Welcome to the Mule Loan Broker example")); int response = 0; String provider = "axis"; while (response != 'a' && /* response != 'g' && */ response != 'x') { // System.out.println("\nWhich SOAP stack would you like to use: [a]xis, [g]lue or [x]fire?"); System.out.println("\nWhich SOAP stack would you like to use: [a]xis or [x]fire?"); response = readCharacter(); switch (response) { case 'a': { provider = "axis"; break; } // TODO re-enable glue when the locahost/IP issue is fixed// case 'g':// {// provider = "glue";// break;// } case 'x': { provider = "xfire"; break; } } } response = 0; while (response != 'a' && response != 's') { System.out.println("\nWould you like to run the [s]ynchronous or [a]synchronous version?"); response = readCharacter(); switch (response) { case 'a': { System.out.println("Loading Asynchronous Loan Broker"); synchronous = false; break; } case 's': { System.out.println("Loading Synchronous Loan Broker"); synchronous = true; break; } } } String config = "loan-broker-" + provider + "-" + (synchronous ? "sync" : "async") + "-config.xml"; return config; } | 28323 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28323/7dd5b9c32e39e9e8c7c76977e5fbe72bf48c91e5/LoanConsumer.java/clean/samples/loanbroker/src/java/org/mule/samples/loanbroker/LoanConsumer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
760,
514,
4367,
1435,
1216,
1860,
288,
3639,
2332,
18,
659,
18,
8222,
12,
780,
1079,
1989,
18,
588,
13809,
2895,
1749,
340,
2932,
59,
16312,
358,
326,
490,
725,
3176,
304,
20438,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
514,
4367,
1435,
1216,
1860,
288,
3639,
2332,
18,
659,
18,
8222,
12,
780,
1079,
1989,
18,
588,
13809,
2895,
1749,
340,
2932,
59,
16312,
358,
326,
490,
725,
3176,
304,
20438,
... |
pm.toXML(sw,p); | pm.toXML(sw, p); | public static void main(String[] args) { try { org.apache.log4j.BasicConfigurator.configure(); PolicyXMLServiceImpl pm = new PolicyXMLServiceImpl(); //bootstrap Policy p = pm.fromXML(TEST_POLICY); long start = 0; long totalw = 0; long totalr = 0; for (int i = 0; i < 2000; i++) { StringWriter sw = new StringWriter(); start = System.currentTimeMillis(); pm.toXML(sw,p); totalw += System.currentTimeMillis() - start; StringReader sr = new StringReader(sw.toString()); start = System.currentTimeMillis(); p = pm.fromXML(sr); totalr += System.currentTimeMillis() - start; } System.out.println("Total read = " + totalr); System.out.println("Mean per read = " + (totalr / 2000)); System.out.println("Total write = " + totalw); System.out.println("Mean per write = " + (totalw / 2000)); } catch (Exception ex) { ex.printStackTrace(); } }//main | 21908 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/21908/ebec1c4bab9924714bd306e04d29ab123f55b4de/PolicyXMLServiceImpl.java/buggy/src/java/net/coalevo/security/impl/PolicyXMLServiceImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
565,
775,
288,
1377,
2358,
18,
19211,
18,
1330,
24,
78,
18,
8252,
17182,
18,
14895,
5621,
1377,
7436,
4201,
1179,
2828,
7430,
273,
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,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
565,
775,
288,
1377,
2358,
18,
19211,
18,
1330,
24,
78,
18,
8252,
17182,
18,
14895,
5621,
1377,
7436,
4201,
1179,
2828,
7430,
273,
394... |
if (jj_scan_token(15)) { jj_scanpos = xsp; | final private boolean jj_3R_18() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(15)) { jj_scanpos = xsp; if (jj_3R_23()) { jj_scanpos = xsp; if (jj_scan_token(0)) return true; } } return false; } | 50818 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50818/0faf643f0efa6f2ad848fed686443d8e4c4ad978/NutchAnalysis.java/buggy/src/java/org/apache/nutch/analysis/NutchAnalysis.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
2643,
1435,
288,
565,
3155,
619,
1752,
31,
565,
619,
1752,
273,
10684,
67,
9871,
917,
31,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
3600,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
2643,
1435,
288,
565,
3155,
619,
1752,
31,
565,
619,
1752,
273,
10684,
67,
9871,
917,
31,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
3600,
... | |
Logger.normal(this, "Updating handshake IPs for peer '"+getPeer()+"' named '"+myName+"' ("+ignoreHostnames+")"); | Logger.minor(this, "Updating handshake IPs for peer '"+getPeer()+"' named '"+myName+"' ("+ignoreHostnames+")"); | public void maybeUpdateHandshakeIPs(boolean ignoreHostnames) { long now = System.currentTimeMillis(); if((now - lastAttemptedHandshakeIPUpdateTime) < (5*60*1000)) return; // 5 minutes // We want to come back right away for DNS requesting if this is our first time through if(!ignoreHostnames) lastAttemptedHandshakeIPUpdateTime = now; Logger.normal(this, "Updating handshake IPs for peer '"+getPeer()+"' named '"+myName+"' ("+ignoreHostnames+")"); Peer[] localHandshakeIPs; Peer[] p = null; Peer[] myNominalPeer; // Don't synchronize while doing lookups which may take a long time! synchronized(this) { myNominalPeer = (Peer[]) nominalPeer.toArray(new Peer[nominalPeer.size()]); } if(myNominalPeer.length == 0) { if(detectedPeer == null) { localHandshakeIPs = null; synchronized(this) { handshakeIPs = localHandshakeIPs; } Logger.normal(this, "1: maybeUpdateHandshakeIPs got a result of: "+handshakeIPsToString()); return; } localHandshakeIPs = new Peer[] { detectedPeer }; for(int i=0;i<localHandshakeIPs.length;i++) { if(ignoreHostnames) { // Don't do a DNS request on the first cycle through PeerNodes by DNSRequest // upon startup (I suspect the following won't do anything, but just in case) localHandshakeIPs[i].getAddress(false); } else { // Actually do the DNS request for the member Peer of localHandshakeIPs localHandshakeIPs[i].getHandshakeAddress(); } } synchronized(this) { handshakeIPs = localHandshakeIPs; } Logger.normal(this, "2: maybeUpdateHandshakeIPs got a result of: "+handshakeIPsToString()); return; } if( detectedPeer != null && ! nominalPeer.contains(detectedPeer)){ p= new Peer[1+nominalPeer.size()]; p[0]=detectedPeer; for(int i=1;i<nominalPeer.size()+1;i++) p[i]=(Peer) nominalPeer.get(i-1); }else{ p = (Peer[]) nominalPeer.toArray(new Peer[nominalPeer.size()]); } // Hack for two nodes on the same IP that can't talk over inet for routing reasons FreenetInetAddress localhost = node.fLocalhostAddress; FreenetInetAddress nodeAddr = node.getPrimaryIPAddress(); Peer extra = null; for(int i=0;i<p.length;i++) { FreenetInetAddress a = p[i].getFreenetAddress(); if(a.equals(nodeAddr)) { extra = new Peer(localhost, p[i].getPort()); } } if(extra != null) { Peer[] newPeers = new Peer[p.length+1]; System.arraycopy(p, 0, newPeers, 0, p.length); newPeers[p.length] = extra; p = newPeers; } localHandshakeIPs = p; for(int i=0;i<localHandshakeIPs.length;i++) { // Actually do the DNS request for the member Peer of localHandshakeIPs localHandshakeIPs[i].getHandshakeAddress(); } synchronized(this) { handshakeIPs = localHandshakeIPs; } Logger.normal(this, "3: maybeUpdateHandshakeIPs got a result of: "+handshakeIPsToString()); return; } | 52909 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52909/eeca3bcf6e867de2577f41461470a78057554d0b/PeerNode.java/buggy/src/freenet/node/PeerNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
6944,
1891,
14545,
18246,
12,
6494,
2305,
2594,
1973,
13,
288,
377,
202,
5748,
2037,
273,
2332,
18,
2972,
28512,
5621,
377,
202,
430,
12443,
3338,
300,
1142,
28788,
14545,
2579,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6944,
1891,
14545,
18246,
12,
6494,
2305,
2594,
1973,
13,
288,
377,
202,
5748,
2037,
273,
2332,
18,
2972,
28512,
5621,
377,
202,
430,
12443,
3338,
300,
1142,
28788,
14545,
2579,
... |
/* This causes an error when using patterns for elements that do not exist in the DOM (translet types which do not correspond to a DOM type are mapped to the DOM.ELEMENT type). */ | /* This causes an error when using patterns for elements that do not exist in the DOM (translet types which do not correspond to a DOM type are mapped to the DOM.ELEMENT type). */ | public NodeIterator getTypedAxisIterator(int axis, int type) { NodeIterator iterator = null; /* This causes an error when using patterns for elements that do not exist in the DOM (translet types which do not correspond to a DOM type are mapped to the DOM.ELEMENT type). */ if (type == NO_TYPE) { return(EMPTYITERATOR); } else if (type == ELEMENT) { iterator = new FilterIterator(getAxisIterator(axis), getElementFilter()); } else { switch (axis) { case Axis.SELF: iterator = new TypedSingletonIterator(type); break; case Axis.CHILD: iterator = new TypedChildrenIterator(type); break; case Axis.PARENT: return(new ParentIterator().setNodeType(type)); case Axis.ANCESTOR: return(new TypedAncestorIterator(type)); case Axis.ANCESTORORSELF: return((new TypedAncestorIterator(type)).includeSelf()); case Axis.ATTRIBUTE: return(new TypedAttributeIterator(type)); case Axis.DESCENDANT: iterator = new TypedDescendantIterator(type); break; case Axis.DESCENDANTORSELF: iterator = (new TypedDescendantIterator(type)).includeSelf(); break; case Axis.FOLLOWING: iterator = new TypedFollowingIterator(type); break; case Axis.PRECEDING: iterator = new TypedPrecedingIterator(type); break; case Axis.FOLLOWINGSIBLING: iterator = new TypedFollowingSiblingIterator(type); break; case Axis.PRECEDINGSIBLING: iterator = new TypedPrecedingSiblingIterator(type); break; default: BasisLibrary.runTimeError("Error: typed iterator for axis " + Axis.names[axis]+"not implemented"); } } return(iterator); } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/264066e4e3d606d5167a1f5680c45669efd7e5c9/DOMImpl.java/clean/src/org/apache/xalan/xsltc/dom/DOMImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2029,
3198,
3181,
6140,
6558,
3198,
12,
474,
2654,
16,
509,
618,
13,
288,
202,
907,
3198,
2775,
273,
446,
31,
202,
20308,
1220,
14119,
392,
555,
1347,
1450,
6884,
364,
2186,
716,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3198,
3181,
6140,
6558,
3198,
12,
474,
2654,
16,
509,
618,
13,
288,
202,
907,
3198,
2775,
273,
446,
31,
202,
20308,
1220,
14119,
392,
555,
1347,
1450,
6884,
364,
2186,
716,
... |
jjtree.openNodeScope(jjtn000); Token t; try { jj_consume_token(DOCTYPE_DECL_START); jj_consume_token(WHITESPACES); t = jj_consume_token(NAME); jjtn000.setName(t.image); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case WHITESPACES: jj_consume_token(WHITESPACES); break; default: jj_la1[25] = jj_gen; ; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case PUBLIC: case SYSTEM: DoctypeExternalId(); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case WHITESPACES: jj_consume_token(WHITESPACES); break; default: jj_la1[26] = jj_gen; ; } break; default: jj_la1[27] = jj_gen; ; } jj_consume_token(DOCTYPE_DECL_END); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { { if (true) throw (RuntimeException) jjte000; } } if (jjte000 instanceof ParseException) { { if (true) throw (ParseException) jjte000; } } { if (true) throw (Error) jjte000; } } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } | jjtree.openNodeScope(jjtn000);Token t; try { jj_consume_token(DOCTYPE_DECL_START); jj_consume_token(WHITESPACES); t = jj_consume_token(NAME); jjtn000.setName(t.image); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WHITESPACES: jj_consume_token(WHITESPACES); break; default: jj_la1[25] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PUBLIC: case SYSTEM: DoctypeExternalId(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WHITESPACES: jj_consume_token(WHITESPACES); break; default: jj_la1[26] = jj_gen; ; | final public void DoctypeDeclaration() throws ParseException { /*@bgen(jjtree) DoctypeDeclaration */ ASTDoctypeDeclaration jjtn000 = new ASTDoctypeDeclaration(this, JJTDOCTYPEDECLARATION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); Token t; try { jj_consume_token(DOCTYPE_DECL_START); jj_consume_token(WHITESPACES); t = jj_consume_token(NAME); jjtn000.setName(t.image); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case WHITESPACES: jj_consume_token(WHITESPACES); break; default: jj_la1[25] = jj_gen; ; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case PUBLIC: case SYSTEM: DoctypeExternalId(); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case WHITESPACES: jj_consume_token(WHITESPACES); break; default: jj_la1[26] = jj_gen; ; } break; default: jj_la1[27] = jj_gen; ; } jj_consume_token(DOCTYPE_DECL_END); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { { if (true) throw (RuntimeException) jjte000; } } if (jjte000 instanceof ParseException) { { if (true) throw (ParseException) jjte000; } } { if (true) throw (Error) jjte000; } } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/bad9201cffeb6c6da295101be65bfa4924caa39e/JspParser.java/buggy/pmd/src/net/sourceforge/pmd/jsp/ast/JspParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
727,
1071,
918,
2256,
12387,
6094,
1435,
1216,
10616,
288,
3639,
1748,
36,
70,
4507,
12,
78,
78,
3413,
13,
2256,
12387,
6094,
1195,
3639,
9183,
3244,
12387,
6094,
10684,
5088,
3784,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
727,
1071,
918,
2256,
12387,
6094,
1435,
1216,
10616,
288,
3639,
1748,
36,
70,
4507,
12,
78,
78,
3413,
13,
2256,
12387,
6094,
1195,
3639,
9183,
3244,
12387,
6094,
10684,
5088,
3784,
273,
... |
assertEquals("Qualifier not set correctly for pushActionOption\n", TESTQUALIFIER, qualifier); | assertEquals("Qualifier not set correctly for pushActionOption\n", TESTQUALIFIER, qualifier); | private static void pushActionOptionTest(DatasetView d, FilterPage fp, FilterGroup fg, FilterCollection fc, FilterDescription f, Option option) { String testIName = "pushActionOption"; String IName = option.getInternalName(); String testDName = "A TEST OPTION WITH PUSHACTION"; String DName = option.getDisplayName(); String Desc = option.getDescription(); String Type = option.getType(); String testField = "pushActionOption_id"; String Field = option.getField(); String qualifier = option.getQualifier(); String legal_qualifiers = option.getLegalQualifiers(); String testTableConstraint = "gene_main"; String TableConstraint = option.getTableConstraint(); assertEquals("Internal Name not correctly set for pushActionOption\n", testIName, IName); assertEquals("Display Name not correctly set for pushActionOption\n", testDName, DName); assertEquals("Description not correctly set for pushActionOption\n", TESTDESC, Desc); assertEquals("Type not set correctly for pushActionOption\n", TESTTYPE, Type); assertEquals("FieldName not set correctly for pushActionOption\n", testField, Field); assertEquals("Qualifier not set correctly for pushActionOption\n", TESTQUALIFIER, qualifier); assertEquals("Legal Qualifiers not set correctly for pushActionOption\n", TESTLEGALQUALIFIERS, legal_qualifiers); assertEquals("TableConstraint not set correctly for pushActionOption\n", testTableConstraint, TableConstraint); assertTrue("pushActionOption should be Selectable\n", option.isSelectable()); // contains/get for FilterCollection-FilterDescription boolean containsTest = fc.containsFilterDescription(IName); assertTrue("FilterCollection should contain pushActionOption FilterDescription, but doesnt\n", containsTest); String testGetByName = null; if (containsTest) { testGetByName = ((FilterDescription) fc.getFilterDescriptionByInternalName(IName)).getInternalName(); assertEquals("getFilterDescriptionByInternalName InternalName incorrect\n", f.getInternalName(), testGetByName); } // contains/get for FilterPage-FilterDescription (Tests all lower groups getByName as well containsTest = fp.containsFilterDescription(IName); assertTrue("FilterPage should contain pushActionOption FilterDescription, but doesnt\n", containsTest); if (containsTest) { testGetByName = ((FilterDescription) fp.getFilterDescriptionByInternalName(IName)).getInternalName(); assertEquals("getFilterDescriptionByInternalName InternalName incorrect\n", f.getInternalName(), testGetByName); } //test supports, getFilterDescriptionByFieldNameTableConstraint functionality assertTrue("DatasetView should support field and tableConstraint for " + IName + "\n", d.supportsFilterDescription(Field, TableConstraint)); FilterDescription g = d.getFilterDescriptionByFieldNameTableConstraint(Field, TableConstraint); assertTrue("FilterPage should support field and tableConstraint for " + IName + "\n", fp.supports(Field, TableConstraint)); FilterDescription h = fp.getFilterDescriptionByFieldNameTableConstraint(Field, TableConstraint); assertTrue("FilterGroup should support field and tableConstraint for " + IName + "\n", fg.supports(Field, TableConstraint)); FilterDescription i = fg.getFilterDescriptionByFieldNameTableConstraint(Field, TableConstraint); assertTrue("FilterCollection should support field and tableConstraint for " + IName + "\n", fc.supports(Field, TableConstraint)); FilterDescription j = fc.getFilterDescriptionByFieldNameTableConstraint(Field, TableConstraint); assertTrue("FilterDescripton should support field and tableConstraint for " + IName + "\n", f.supports(Field, TableConstraint)); assertEquals("DatasetView returned wrong supporting FilterDescription for FieldName TableConstraint\n", f, g); assertEquals("FilterPage returned wrong supporting FilterDescription for FieldName TableConstraint\n", f, h); assertEquals("FilterGroup returned wrong supporting FilterDescription for FieldName TableConstraint\n", f, i); assertEquals("FilterCollection returned wrong supporting FilterDescription for FieldName TableConstraint\n", f, j); PushAction[] pos = option.getPushActions(); assertEquals("pushActionOption should have one PushAction\n", 1, pos.length); PushActionValueTest(d, option, pos[0]); } | 2000 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2000/16a9b4a2f910dae8967a02428e2bfad83cc46e96/DatasetViewXMLUtilsTest.java/buggy/src/java/org/ensembl/mart/lib/config/test/DatasetViewXMLUtilsTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
918,
1817,
1803,
1895,
4709,
12,
10656,
1767,
302,
16,
4008,
1964,
4253,
16,
4008,
1114,
10186,
16,
4008,
2532,
8036,
16,
4008,
3291,
284,
16,
2698,
1456,
13,
288,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
918,
1817,
1803,
1895,
4709,
12,
10656,
1767,
302,
16,
4008,
1964,
4253,
16,
4008,
1114,
10186,
16,
4008,
2532,
8036,
16,
4008,
3291,
284,
16,
2698,
1456,
13,
288,
202,
... |
else { rsvc = null; | finally { ThreadErrorState.clearState(); | public void requestComplete(RequestSubmittedValueCache rsvc) { TargettedMessageList errors = ThreadErrorState.getErrorState().errors; TokenRequestState trs = new TokenRequestState(); if (errors.size() > 0) { fixupErrors(errors, rsvc); } else { // unless there were errors, the rsvc does not need to be stored. rsvc = null; } trs.rsvc = rsvc; trs.errors = errors; ThreadErrorState.clearState(); tsholder.putTokenState(trs); } | 29 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/29/fda1fa0e807536691d67b176f8eb2cfa74211a27/RequestStateEntry.java/buggy/rsf-core/core/src/uk/org/ponder/rsf/state/RequestStateEntry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
590,
6322,
12,
691,
28882,
620,
1649,
3597,
4227,
13,
288,
565,
5916,
2344,
1079,
682,
1334,
273,
4884,
668,
1119,
18,
588,
668,
1119,
7675,
4324,
31,
565,
3155,
691,
1119,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
590,
6322,
12,
691,
28882,
620,
1649,
3597,
4227,
13,
288,
565,
5916,
2344,
1079,
682,
1334,
273,
4884,
668,
1119,
18,
588,
668,
1119,
7675,
4324,
31,
565,
3155,
691,
1119,
4... |
iface.setMonitoredServices(new LinkedHashSet()); | protected void setMonitoredServices(OnmsIpInterface iface) { // we don't do anything by default! } | 47678 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47678/600027a3ade97dc3a449702132515af836849e9e/IpInterfaceMapper.java/clean/opennms-dao/src/main/java/org/opennms/netmgt/dao/jdbc/ipif/IpInterfaceMapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
31479,
18,
542,
11415,
20425,
5676,
12,
2704,
19523,
10663,
918,
31479,
18,
542,
11415,
20425,
5676,
12,
2704,
19523,
10663,
444,
11415,
20425,
5676,
12,
1398,
959,
5273,
1358,
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,
225,
202,
1117,
31479,
18,
542,
11415,
20425,
5676,
12,
2704,
19523,
10663,
918,
31479,
18,
542,
11415,
20425,
5676,
12,
2704,
19523,
10663,
444,
11415,
20425,
5676,
12,
1398,
959,
5273,
1358,
3... | |
m_variants = new LinkedList(); m_variants.add(new BigInteger(Integer.toString(Integer.MIN_VALUE))); m_variants.add(new BigInteger(Integer.toString(Integer.MIN_VALUE + 1))); m_variants.add(BigInteger.ZERO); m_variants.add(new BigInteger(Integer.toString(Integer.MAX_VALUE - 1))); m_variants.add(new BigInteger(Integer.toString(Integer.MAX_VALUE))); | m_variants = new LinkedList(); m_variants.add(new BigInteger(Integer.toString(Integer.MIN_VALUE))); m_variants.add(new BigInteger(Integer.toString(Integer.MIN_VALUE + 1))); m_variants.add(BigInteger.ZERO); m_variants.add(new BigInteger(Integer.toString(Integer.MAX_VALUE - 1))); m_variants.add(new BigInteger(Integer.toString(Integer.MAX_VALUE))); | void makeVariants() { m_variants = new LinkedList(); m_variants.add(new BigInteger(Integer.toString(Integer.MIN_VALUE))); m_variants.add(new BigInteger(Integer.toString(Integer.MIN_VALUE + 1))); m_variants.add(BigInteger.ZERO); m_variants.add(new BigInteger(Integer.toString(Integer.MAX_VALUE - 1))); m_variants.add(new BigInteger(Integer.toString(Integer.MAX_VALUE))); } | 12196 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12196/cb1364ac6f640a6ad163932b5427367d994b50b6/DataObjectManipulator.java/clean/archive/packaging/test/src/com/arsdigita/persistence/DataObjectManipulator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
918,
1221,
21165,
1435,
288,
10792,
312,
67,
15886,
273,
394,
10688,
5621,
10792,
312,
67,
15886,
18,
1289,
12,
2704,
10246,
12,
4522,
18,
10492,
12,
4522,
18,
6236,
67,
4051,
3719,
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,
1171,
918,
1221,
21165,
1435,
288,
10792,
312,
67,
15886,
273,
394,
10688,
5621,
10792,
312,
67,
15886,
18,
1289,
12,
2704,
10246,
12,
4522,
18,
10492,
12,
4522,
18,
6236,
67,
4051,
3719,
1769... |
if (createAllOrders) { | if (createAllOrdersFlag) { | protected List constructQueries(String path, boolean createAllOrders) throws ClassNotFoundException, IllegalArgumentException { List queries = new ArrayList(); // expand '+' to all subclasses in path Set paths = PathQueryUtil.expandPath(os.getModel(), path); Iterator pathIter = paths.iterator(); while (pathIter.hasNext()) { String nextPath = (String) pathIter.next(); Query q = PathQueryUtil.constructQuery(os.getModel(), nextPath); if (createAllOrders) { queries.addAll(getOrderedQueries(q)); } else { queries.add(q); } } return queries; } | 29158 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/29158/9b356f337c17b77d9678970dc25016d4740ebc74/PrecomputeTask.java/buggy/intermine/objectstore/main/src/org/intermine/task/PrecomputeTask.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
987,
4872,
9592,
12,
780,
589,
16,
1250,
752,
1595,
16528,
13,
3639,
1216,
10403,
16,
2754,
288,
3639,
987,
6218,
273,
394,
2407,
5621,
3639,
368,
4542,
10058,
358,
777,
15320,
316,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
4872,
9592,
12,
780,
589,
16,
1250,
752,
1595,
16528,
13,
3639,
1216,
10403,
16,
2754,
288,
3639,
987,
6218,
273,
394,
2407,
5621,
3639,
368,
4542,
10058,
358,
777,
15320,
316,... |
pageContext.forward("/test/org/apache/struts/taglib/bean/TestWriteTag.jsp"); | runMyTest("testWriteTagNameFormat", ""); | public void testWriteTagNameFormat() throws IOException, ServletException{ request.setAttribute("runTest", "testWriteTagNameFormat"); pageContext.setAttribute(REQUEST_KEY,TEST_INTEGER_VAL,PageContext.REQUEST_SCOPE); pageContext.forward("/test/org/apache/struts/taglib/bean/TestWriteTag.jsp"); } | 54704 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54704/8979b834164df35ca23bba9b3c89a35d6e69ad79/TestWriteTag.java/buggy/src/test/org/apache/struts/taglib/bean/TestWriteTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
3067,
8520,
1630,
1435,
1216,
1860,
16,
16517,
95,
202,
202,
2293,
18,
542,
1499,
2932,
2681,
4709,
3113,
315,
3813,
3067,
8520,
1630,
8863,
202,
202,
2433,
1042,
18,
542... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8520,
1630,
1435,
1216,
1860,
16,
16517,
95,
202,
202,
2293,
18,
542,
1499,
2932,
2681,
4709,
3113,
315,
3813,
3067,
8520,
1630,
8863,
202,
202,
2433,
1042,
18,
542... |
public String getOutputCenterFile() { | public File getOutputCenterFile() { | public String getOutputCenterFile() { return m_OutputCenterFile; } | 4179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4179/a69b2abf668082a9b5ae27956ab7bf1bbac7a793/XMeans.java/buggy/trunk/weka/clusterers/XMeans.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1387,
11062,
8449,
812,
1435,
288,
565,
327,
312,
67,
1447,
8449,
812,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1387,
11062,
8449,
812,
1435,
288,
565,
327,
312,
67,
1447,
8449,
812,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
IASTSimpleDeclaration def = (IASTSimpleDeclaration) tu.getDeclarations()[0]; IFunction f = (IFunction) def.getDeclarators()[0].getName() .resolveBinding(); | IASTSimpleDeclaration def = (IASTSimpleDeclaration) tu .getDeclarations()[0]; IFunction f = (IFunction) def.getDeclarators()[0].getName() .resolveBinding(); | public void testArrayTypeToQualifiedPointerTypeParm() throws Exception { IASTTranslationUnit tu = parse( "void f(int parm[const 3]);", ParserLanguage.C); //$NON-NLS-1$ IASTSimpleDeclaration def = (IASTSimpleDeclaration) tu.getDeclarations()[0]; IFunction f = (IFunction) def.getDeclarators()[0].getName() .resolveBinding(); IFunctionType ft = f.getType(); assertTrue(ft.getParameterTypes()[0] instanceof IPointerType); assertTrue(((IPointerType) ft.getParameterTypes()[0]).isConst()); // test tu.getDeclarations(IBinding) IASTName name_parm = ((IASTStandardFunctionDeclarator) def .getDeclarators()[0]).getParameters()[0].getDeclarator().getName(); IASTName[] decls = tu.getDeclarations(name_parm.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], name_parm); } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/98145350e052e39e57313251e0f805a20472a08d/AST2Tests.java/clean/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1842,
27182,
774,
8708,
4926,
559,
27144,
1435,
1216,
1185,
288,
1377,
467,
9053,
6717,
2802,
28325,
273,
1109,
12,
5411,
315,
6459,
284,
12,
474,
19924,
63,
10248,
890,
19226,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
27182,
774,
8708,
4926,
559,
27144,
1435,
1216,
1185,
288,
1377,
467,
9053,
6717,
2802,
28325,
273,
1109,
12,
5411,
315,
6459,
284,
12,
474,
19924,
63,
10248,
890,
19226,
... |
System.out.println("Can't write random sentences to " + path + " " | logger.severe("Can't write random sentences to " + path + " " | public void dumpRandomSentences(String path, int count) { try { Set set = new HashSet(); PrintWriter out = new PrintWriter(new FileOutputStream(path)); for (int i = 0; i < count; i++) { String s = getRandomSentence(); if (!set.contains(s)) { set.add(s); out.println(s); } } out.close(); } catch (IOException ioe) { System.out.println("Can't write random sentences to " + path + " " + ioe); } } | 8350 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8350/be7b77537f3bfdc7f00ac9569e5ff048e7d1a55f/Grammar.java/buggy/edu/cmu/sphinx/linguist/language/grammar/Grammar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4657,
8529,
7828,
2369,
12,
780,
589,
16,
509,
1056,
13,
288,
3639,
775,
288,
5411,
1000,
444,
273,
394,
6847,
5621,
5411,
14071,
596,
273,
394,
14071,
12,
2704,
12942,
12,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4657,
8529,
7828,
2369,
12,
780,
589,
16,
509,
1056,
13,
288,
3639,
775,
288,
5411,
1000,
444,
273,
394,
6847,
5621,
5411,
14071,
596,
273,
394,
14071,
12,
2704,
12942,
12,
8... |
final String mnemonic = readOptionalFromRegistry(locationElement, | final String mnemonic = readOptional(locationElement, | private static final SLocation[] readLocationElementsFromRegistry( final IConfigurationElement parentElement, final String id, final List warningsToLog) { // Check to see if we have an activeWhen expression. final IConfigurationElement[] locationElements = parentElement .getChildren(ELEMENT_LOCATION); if (locationElements.length < 1) { return null; } // Convert the location elements in an SLocation array. final Collection locations = new ArrayList(locationElements.length); for (int i = 0; i < locationElements.length; i++) { final IConfigurationElement locationElement = locationElements[i]; // Read the mnemonic. final String mnemonic = readOptionalFromRegistry(locationElement, ATTRIBUTE_MNEMONIC); final char mnemonicChar; if (mnemonic == null) { mnemonicChar = SLocation.MNEMONIC_NONE; } else if (mnemonic.length() != 1) { addWarning(warningsToLog, "The mnemonic should only be one character", //$NON-NLS-1$ parentElement.getNamespace(), id, "mnemonic", //$NON-NLS-1$ mnemonic); mnemonicChar = SLocation.MNEMONIC_NONE; } else { mnemonicChar = mnemonic.charAt(0); } // Read the image style. final String imageStyle = readOptionalFromRegistry(locationElement, ATTRIBUTE_IMAGE_STYLE); // Read the position and the relativeTo attributes. final SOrder[] orderings = readOrderingsFromRegistry( locationElement, id, warningsToLog); // Read the menu location information. final LocationElement menuLocation = readMenuLocationFromRegistry( locationElement, warningsToLog, id); if (menuLocation == null) { continue; } final SLocation location = new SLocation(mnemonicChar, imageStyle, orderings, menuLocation); locations.add(location); } return (SLocation[]) locations.toArray(new SLocation[locations.size()]); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/539b29bd9f4ed0020b6fce0d726b8d740d87469d/MenuPersistence.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/MenuPersistence.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
727,
348,
2735,
8526,
855,
2735,
3471,
1265,
4243,
12,
1082,
202,
6385,
467,
1750,
1046,
30363,
16,
727,
514,
612,
16,
1082,
202,
6385,
987,
5599,
774,
1343,
13,
288,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
727,
348,
2735,
8526,
855,
2735,
3471,
1265,
4243,
12,
1082,
202,
6385,
467,
1750,
1046,
30363,
16,
727,
514,
612,
16,
1082,
202,
6385,
987,
5599,
774,
1343,
13,
288,
20... |
highlightPossibleRecruits(); | if (client.getPlayerName().equals(activePlayerName)) { highlightPossibleRecruits(); } | public void setupMusterMenu() { unselectAllHexes(); requestFocus(); masterFrame.setTitle(game.getActivePlayerName() + " Turn " + game.getTurnNumber() + " : Muster Recruits "); phaseMenu.removeAll(); JMenuItem mi; mi = phaseMenu.add(undoLastRecruitAction); mi.setMnemonic(KeyEvent.VK_U); mi.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_U, 0)); mi = phaseMenu.add(undoAllRecruitsAction); mi.setMnemonic(KeyEvent.VK_A); mi.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A, 0)); mi = phaseMenu.add(doneWithTurnAction); mi.setMnemonic(KeyEvent.VK_D); mi.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_D, 0)); phaseMenu.addSeparator(); mi = phaseMenu.add(withdrawFromGameAction); mi.setMnemonic(KeyEvent.VK_W); highlightPossibleRecruits(); } | 51862 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51862/5e69df65648ef05d9048794b8368383e131bba86/MasterBoard.java/clean/Colossus/MasterBoard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3875,
49,
1722,
4599,
1435,
565,
288,
3639,
640,
4025,
1595,
7037,
281,
5621,
3639,
590,
9233,
5621,
3639,
4171,
3219,
18,
542,
4247,
12,
13957,
18,
588,
3896,
12148,
461,
1435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3875,
49,
1722,
4599,
1435,
565,
288,
3639,
640,
4025,
1595,
7037,
281,
5621,
3639,
590,
9233,
5621,
3639,
4171,
3219,
18,
542,
4247,
12,
13957,
18,
588,
3896,
12148,
461,
1435... |
public void rule_attributes(RuleDescr rule) throws RecognitionException { AttributeDescr a = null; try { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:447:25: ( ( 'attributes' )? ( ':' )? opt_eol ( ( ',' )? a= rule_attribute opt_eol )* ) // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:447:25: ( 'attributes' )? ( ':' )? opt_eol ( ( ',' )? a= rule_attribute opt_eol )* { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:447:25: ( 'attributes' )? int alt27=2; int LA27_0 = input.LA(1); if ( LA27_0==34 ) { alt27=1; } else if ( LA27_0==EOL||LA27_0==15||LA27_0==24||LA27_0==29||(LA27_0>=31 && LA27_0<=33)||(LA27_0>=35 && LA27_0<=40) ) { alt27=2; } else { NoViableAltException nvae = new NoViableAltException("447:25: ( \'attributes\' )?", 27, 0, input); throw nvae; } switch (alt27) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:447:25: 'attributes' { match(input,34,FOLLOW_34_in_rule_attributes802); } break; } // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:447:39: ( ':' )? int alt28=2; int LA28_0 = input.LA(1); if ( LA28_0==32 ) { alt28=1; } else if ( LA28_0==EOL||LA28_0==15||LA28_0==24||LA28_0==29||LA28_0==31||LA28_0==33||(LA28_0>=35 && LA28_0<=40) ) { alt28=2; } else { NoViableAltException nvae = new NoViableAltException("447:39: ( \':\' )?", 28, 0, input); throw nvae; } switch (alt28) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:447:39: ':' { match(input,32,FOLLOW_32_in_rule_attributes805); } break; } following.push(FOLLOW_opt_eol_in_rule_attributes808); opt_eol(); following.pop(); // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:448:25: ( ( ',' )? a= rule_attribute opt_eol )* loop30: do { int alt30=2; int LA30_0 = input.LA(1); if ( LA30_0==24||(LA30_0>=35 && LA30_0<=40) ) { alt30=1; } switch (alt30) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:448:33: ( ',' )? a= rule_attribute opt_eol { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:448:33: ( ',' )? int alt29=2; int LA29_0 = input.LA(1); if ( LA29_0==24 ) { alt29=1; } else if ( (LA29_0>=35 && LA29_0<=40) ) { alt29=2; } else { NoViableAltException nvae = new NoViableAltException("448:33: ( \',\' )?", 29, 0, input); throw nvae; } switch (alt29) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:448:33: ',' { match(input,24,FOLLOW_24_in_rule_attributes815); } break; } following.push(FOLLOW_rule_attribute_in_rule_attributes820); a=rule_attribute(); following.pop(); following.push(FOLLOW_opt_eol_in_rule_attributes822); opt_eol(); following.pop(); rule.addAttribute( a ); } break; default : break loop30; } } while (true); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/fb2f51ad0fb80e03d0cc7f4644cb7a7e17027618/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1720,
67,
4350,
12,
2175,
16198,
1720,
13,
1216,
9539,
288,
6647,
3601,
16198,
279,
273,
446,
31,
3639,
775,
288,
5411,
368,
342,
8712,
19,
81,
1354,
69,
292,
19,
13582,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1720,
67,
4350,
12,
2175,
16198,
1720,
13,
1216,
9539,
288,
6647,
3601,
16198,
279,
273,
446,
31,
3639,
775,
288,
5411,
368,
342,
8712,
19,
81,
1354,
69,
292,
19,
13582,
19,
... | ||
mBadFeature = false; features.startFeature(featureLine.substring(0, 15).trim()); features.featureData(featureLine.substring(16)); | String featureLine = value.toString(); if((key.equals("FT")) && (featureLine.charAt(0) != ' ')) { mBadFeature = false; features.startFeature(featureLine.substring(0, 15).trim()); features.featureData(featureLine.substring(16)); } | public void addSequenceProperty(Object key, Object value) throws ParseException { try { if (mBadFeature) { // If this feature is bad in some way, ignore it. String featureLine = value.toString(); if((key.equals("FT")) && (featureLine.charAt(0) != ' ')) { // If the offending feature is past, start reading data again mBadFeature = false; features.startFeature(featureLine.substring(0, 15).trim()); features.featureData(featureLine.substring(16)); } } else { // Tidy up any end-of-block jobbies if (features.inFeature() && !key.equals("FT")) { features.endFeature(); } if (key.equals("FT")) { String featureLine = value.toString(); if (featureLine.charAt(0) != ' ') { // This is a featuretype field if (features.inFeature()) { features.endFeature(); } features.startFeature(featureLine.substring(0, 15).trim()); } features.featureData(featureLine.substring(16)); } else { getDelegate().addSequenceProperty(key, value); if (key.equals("AC")) { String acc = value.toString(); StringTokenizer toke = new StringTokenizer(acc, "; "); while (toke.hasMoreTokens()) { accessions.add(toke.nextToken()); } } } } } catch (BioException ex) { // If an exception is thrown, read past the offending feature mBadFeature = true; System.err.println(ex); } } | 50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/71709a111ecea4163265050931356a599ad5fda0/EmblProcessor.java/buggy/src/org/biojava/bio/seq/io/EmblProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
4021,
1396,
12,
921,
498,
16,
1033,
460,
13,
1216,
10616,
565,
288,
202,
698,
202,
95,
202,
565,
309,
261,
81,
6434,
4595,
13,
202,
565,
288,
202,
202,
759,
971,
333,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4021,
1396,
12,
921,
498,
16,
1033,
460,
13,
1216,
10616,
565,
288,
202,
698,
202,
95,
202,
565,
309,
261,
81,
6434,
4595,
13,
202,
565,
288,
202,
202,
759,
971,
333,
... |
trueHigh = (((inHigh[trailingIdx1]) > (inClose[trailingIdx1-1])) ? (inHigh[trailingIdx1]) : (inClose[trailingIdx1-1])) ; trueLow = (((inLow[trailingIdx1]) < (inClose[trailingIdx1-1])) ? (inLow[trailingIdx1]) : (inClose[trailingIdx1-1])) ; closeMinusTrueLow = inClose[trailingIdx1] - trueLow; trueRange = trueHigh - trueLow; | { tempLT = inLow[trailingIdx1]; tempHT = inHigh[trailingIdx1]; tempCY = inClose[trailingIdx1-1]; trueLow = (((tempLT) < (tempCY)) ? (tempLT) : (tempCY)) ; closeMinusTrueLow = inClose[trailingIdx1] - trueLow; trueRange = tempHT - tempLT; tempDouble = Math.abs ( tempCY - tempHT ); if( tempDouble > trueRange ) trueRange = tempDouble; tempDouble = Math.abs ( tempCY - tempLT ); if( tempDouble > trueRange ) trueRange = tempDouble; } ; | public TA_RetCode ULTOSC( int startIdx, int endIdx, double inHigh[], double inLow[], double inClose[], int optInTimePeriod1, int optInTimePeriod2, int optInTimePeriod3, MInteger outBegIdx, MInteger outNbElement, double outReal[] ) { double a1Total, a2Total, a3Total; double b1Total, b2Total, b3Total; double trueHigh, trueLow, trueRange, closeMinusTrueLow; double tempDouble; int lookbackTotal; int longestPeriod, longestIndex; int i,j,today,outIdx; int trailingIdx1, trailingIdx2, trailingIdx3; int []usedFlag = new int[3] ; int []periods = new int[3] ; int []sortedPeriods = new int[3] ; if( startIdx < 0 ) return TA_RetCode. TA_OUT_OF_RANGE_START_INDEX; if( (endIdx < 0) || (endIdx < startIdx)) return TA_RetCode. TA_OUT_OF_RANGE_END_INDEX; if( (int)optInTimePeriod1 == ( Integer.MIN_VALUE ) ) optInTimePeriod1 = 7; else if( ((int)optInTimePeriod1 < 1) || ((int)optInTimePeriod1 > 100000) ) return TA_RetCode. TA_BAD_PARAM; if( (int)optInTimePeriod2 == ( Integer.MIN_VALUE ) ) optInTimePeriod2 = 14; else if( ((int)optInTimePeriod2 < 1) || ((int)optInTimePeriod2 > 100000) ) return TA_RetCode. TA_BAD_PARAM; if( (int)optInTimePeriod3 == ( Integer.MIN_VALUE ) ) optInTimePeriod3 = 28; else if( ((int)optInTimePeriod3 < 1) || ((int)optInTimePeriod3 > 100000) ) return TA_RetCode. TA_BAD_PARAM; outBegIdx.value = 0 ; outNbElement.value = 0 ; periods[0] = optInTimePeriod1; periods[1] = optInTimePeriod2; periods[2] = optInTimePeriod3; usedFlag[0] = 0; usedFlag[1] = 0; usedFlag[2] = 0; for ( i = 0; i < 3; ++i ) { longestPeriod = 0; longestIndex = 0; for ( j = 0; j < 3; ++j ) { if ( (usedFlag[j] == 0) && (periods[j] > longestPeriod) ) { longestPeriod = periods[j]; longestIndex = j; } } usedFlag[longestIndex] = 1; sortedPeriods[i] = longestPeriod; } optInTimePeriod1 = sortedPeriods[0]; optInTimePeriod2 = sortedPeriods[1]; optInTimePeriod3 = sortedPeriods[2]; lookbackTotal = ULTOSC_Lookback ( optInTimePeriod1, optInTimePeriod2, optInTimePeriod3 ); if( startIdx < lookbackTotal ) startIdx = lookbackTotal; if( startIdx > endIdx ) return TA_RetCode. TA_SUCCESS; a1Total = 0; b1Total = 0; for ( i = startIdx-optInTimePeriod1; i < startIdx; ++i ) { trueHigh = (((inHigh[i]) > (inClose[i-1])) ? (inHigh[i]) : (inClose[i-1])) ; trueLow = (((inLow[i]) < (inClose[i-1])) ? (inLow[i]) : (inClose[i-1])) ; closeMinusTrueLow = inClose[i] - trueLow; trueRange = trueHigh - trueLow; a1Total += closeMinusTrueLow; b1Total += trueRange; } a2Total = 0; b2Total = 0; for ( i = startIdx-optInTimePeriod2; i < startIdx; ++i ) { trueHigh = (((inHigh[i]) > (inClose[i-1])) ? (inHigh[i]) : (inClose[i-1])) ; trueLow = (((inLow[i]) < (inClose[i-1])) ? (inLow[i]) : (inClose[i-1])) ; closeMinusTrueLow = inClose[i] - trueLow; trueRange = trueHigh - trueLow; a2Total += closeMinusTrueLow; b2Total += trueRange; } a3Total = 0; b3Total = 0; for ( i = startIdx-optInTimePeriod3; i < startIdx; ++i ) { trueHigh = (((inHigh[i]) > (inClose[i-1])) ? (inHigh[i]) : (inClose[i-1])) ; trueLow = (((inLow[i]) < (inClose[i-1])) ? (inLow[i]) : (inClose[i-1])) ; closeMinusTrueLow = inClose[i] - trueLow; trueRange = trueHigh - trueLow; a3Total += closeMinusTrueLow; b3Total += trueRange; } today = startIdx; outIdx = 0; trailingIdx1 = today - optInTimePeriod1; trailingIdx2 = today - optInTimePeriod2; trailingIdx3 = today - optInTimePeriod3; while( today <= endIdx ) { trueHigh = (((inHigh[today]) > (inClose[today-1])) ? (inHigh[today]) : (inClose[today-1])) ; trueLow = (((inLow[today]) < (inClose[today-1])) ? (inLow[today]) : (inClose[today-1])) ; closeMinusTrueLow = inClose[today] - trueLow; trueRange = trueHigh - trueLow; a1Total += closeMinusTrueLow; a2Total += closeMinusTrueLow; a3Total += closeMinusTrueLow; b1Total += trueRange; b2Total += trueRange; b3Total += trueRange; trueHigh = (((inHigh[trailingIdx1]) > (inClose[trailingIdx1-1])) ? (inHigh[trailingIdx1]) : (inClose[trailingIdx1-1])) ; trueLow = (((inLow[trailingIdx1]) < (inClose[trailingIdx1-1])) ? (inLow[trailingIdx1]) : (inClose[trailingIdx1-1])) ; closeMinusTrueLow = inClose[trailingIdx1] - trueLow; trueRange = trueHigh - trueLow; a1Total -= closeMinusTrueLow; b1Total -= trueRange; trueHigh = (((inHigh[trailingIdx2]) > (inClose[trailingIdx2-1])) ? (inHigh[trailingIdx2]) : (inClose[trailingIdx2-1])) ; trueLow = (((inLow[trailingIdx2]) < (inClose[trailingIdx2-1])) ? (inLow[trailingIdx2]) : (inClose[trailingIdx2-1])) ; closeMinusTrueLow = inClose[trailingIdx2] - trueLow; trueRange = trueHigh - trueLow; a2Total -= closeMinusTrueLow; b2Total -= trueRange; trueHigh = (((inHigh[trailingIdx3]) > (inClose[trailingIdx3-1])) ? (inHigh[trailingIdx3]) : (inClose[trailingIdx3-1])) ; trueLow = (((inLow[trailingIdx3]) < (inClose[trailingIdx3-1])) ? (inLow[trailingIdx3]) : (inClose[trailingIdx3-1])) ; closeMinusTrueLow = inClose[trailingIdx3] - trueLow; trueRange = trueHigh - trueLow; a3Total -= closeMinusTrueLow; b3Total -= trueRange; tempDouble = 0.0; if( ! (((-0.00000001)<b1Total)&&(b1Total<0.00000001)) ) tempDouble += 4.0*a1Total/b1Total; if( ! (((-0.00000001)<b2Total)&&(b2Total<0.00000001)) ) tempDouble += 2.0*a2Total/b2Total; if( ! (((-0.00000001)<b3Total)&&(b3Total<0.00000001)) ) tempDouble += a3Total/b3Total; outReal[outIdx] = 100.0 * (tempDouble / 7.0); outIdx++; today++; trailingIdx1++; trailingIdx2++; trailingIdx3++; } outNbElement.value = outIdx; outBegIdx.value = startIdx; return TA_RetCode. TA_SUCCESS; } | 51465 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51465/8de32c6efff0e4e98bbddb5ebdec14d840720a03/Core.java/buggy/trunk/ta-lib/java/src/TA/Lib/Core.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
399,
37,
67,
7055,
1085,
587,
48,
4296,
2312,
12,
509,
27108,
16,
1377,
509,
679,
4223,
16,
1377,
1645,
316,
8573,
63,
6487,
1377,
1645,
316,
10520,
63,
6487,
1377,
1645,
316,
460... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
399,
37,
67,
7055,
1085,
587,
48,
4296,
2312,
12,
509,
27108,
16,
1377,
509,
679,
4223,
16,
1377,
1645,
316,
8573,
63,
6487,
1377,
1645,
316,
10520,
63,
6487,
1377,
1645,
316,
460... |
filter.add( new IncludesArtifactFilter( moduleSet.getIncludes() ) ); | filter.add( new AssemblyIncludesArtifactFilter( moduleSet.getIncludes() ) ); | private void processModules( Archiver archiver, List moduleSets, boolean includeBaseDirectory ) throws IOException, ArchiverException, XmlPullParserException, MojoExecutionException { System.out.println( "Got " + moduleSets.size() + " module sets" ); for ( Iterator i = moduleSets.iterator(); i.hasNext(); ) { ModuleSet moduleSet = (ModuleSet) i.next(); AndArtifactFilter filter = new AndArtifactFilter(); if ( !moduleSet.getIncludes().isEmpty() ) { filter.add( new IncludesArtifactFilter( moduleSet.getIncludes() ) ); } if ( !moduleSet.getExcludes().isEmpty() ) { filter.add( new ExcludesArtifactFilter( moduleSet.getExcludes() ) ); } Set set = getModulesFromReactor( getExecutedProject() ); List moduleFileSets = new ArrayList(); for ( Iterator j = set.iterator(); j.hasNext(); ) { MavenProject reactorProject = (MavenProject) j.next(); System.out.println( "Processing module: " + reactorProject.getId() ); Artifact artifact = reactorProject.getArtifact(); if ( filter.include( artifact ) && artifact.getFile() != null ) { String name = artifact.getFile().getName(); ModuleSources sources = moduleSet.getSources(); if ( sources != null ) { String output = sources.getOutputDirectory(); output = getOutputDirectory( output, includeBaseDirectory ); FileSet moduleFileSet = new FileSet(); moduleFileSet.setDirectory( reactorProject.getBasedir().getAbsolutePath() ); moduleFileSet.setOutputDirectory( output ); List excludesList = new ArrayList(); excludesList.add( PathUtils.toRelative( reactorProject.getBasedir(), reactorProject.getBuild().getDirectory() ) + "/**" ); excludesList.add( PathUtils.toRelative( reactorProject.getBasedir(), reactorProject.getBuild().getOutputDirectory() ) + "/**" ); excludesList.add( PathUtils.toRelative( reactorProject.getBasedir(), reactorProject.getBuild().getTestOutputDirectory() ) + "/**" ); excludesList.add( PathUtils.toRelative( reactorProject.getBasedir(), reactorProject.getReporting().getOutputDirectory() ) + "/**" ); moduleFileSet.setExcludes( excludesList ); moduleFileSets.add( moduleFileSet ); } ModuleBinaries binaries = moduleSet.getBinaries(); if ( binaries != null ) { String output = binaries.getOutputDirectory(); output = getOutputDirectory( output, includeBaseDirectory ); archiver.setDefaultDirectoryMode( Integer.parseInt( binaries.getDirectoryMode(), 8 ) ); archiver.setDefaultFileMode( Integer.parseInt( binaries.getFileMode(), 8 ) ); getLog().debug( "ModuleSet[" + output + "]" + " dir perms: " + Integer.toString( archiver.getDefaultDirectoryMode(), 8 ) + " file perms: " + Integer.toString( archiver.getDefaultFileMode(), 8 ) ); if ( binaries.isUnpack() ) { // TODO: something like zipfileset in plexus-archiver // archiver.addJar( ) // TODO refactor into the AbstractUnpackMojo File tempLocation = new File( workDirectory, name.substring( 0, name.lastIndexOf( '.' ) ) ); boolean process = false; if ( !tempLocation.exists() ) { tempLocation.mkdirs(); process = true; } else if ( artifact.getFile().lastModified() > tempLocation.lastModified() ) { process = true; } if ( process ) { try { unpack( artifact.getFile(), tempLocation ); if ( binaries.isIncludeDependencies() ) { Set artifactSet = reactorProject.getArtifacts(); for ( Iterator artifacts = artifactSet.iterator(); artifacts.hasNext(); ) { Artifact dependencyArtifact = (Artifact) artifacts.next(); unpack( dependencyArtifact.getFile(), tempLocation ); } } /* * If the assembly is 'jar-with-dependencies', remove the security files in all dependencies * that will prevent the uberjar to execute. Please see MASSEMBLY-64 for details. */ if ( archiver instanceof JarArchiver ) { String[] securityFiles = { "*.RSA", "*.DSA", "*.SF", "*.rsa", "*.dsa", "*.sf" }; org.apache.maven.shared.model.fileset.FileSet securityFileSet = new org.apache.maven.shared.model.fileset.FileSet(); securityFileSet.setDirectory(tempLocation.getAbsolutePath() + "/META-INF/" ); for ( int sfsi = 0; sfsi < securityFiles.length; sfsi++ ) { securityFileSet.addInclude( securityFiles[sfsi] ); } FileSetManager fsm = new FileSetManager( getLog() ); try { fsm.delete( securityFileSet ); } catch ( IOException e ) { throw new MojoExecutionException("Failed to delete security files: " + e.getMessage(), e); } } } catch ( NoSuchArchiverException e ) { throw new MojoExecutionException( "Unable to obtain unarchiver for file '" + artifact.getFile() + "'" ); } } addDirectory( archiver, tempLocation, output, null, FileUtils.getDefaultExcludesAsList() ); } else { String outputFileNameMapping = binaries.getOutputFileNameMapping(); addArtifactToArchive( archiver, artifact, output, outputFileNameMapping ); if ( binaries.isIncludeDependencies() ) { Set artifactSet = reactorProject.getArtifacts(); for ( Iterator artifacts = artifactSet.iterator(); artifacts.hasNext(); ) { Artifact dependencyArtifact = (Artifact) artifacts.next(); addArtifactToArchive( archiver, dependencyArtifact, output, outputFileNameMapping ); } } } } } else { // would be better to have a way to find out when a specified include or exclude // is never triggered and warn() it. getLog().debug( "artifact: " + artifact + " not included" ); } if ( !moduleFileSets.isEmpty() ) { processFileSets( archiver, moduleFileSets, includeBaseDirectory ); // TODO: includes and excludes } } } } | 51807 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51807/685da2c10f170af1178d8855c6d3100dfdda0bb3/AbstractAssemblyMojo.java/buggy/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
7782,
12,
16959,
1667,
6637,
1667,
16,
987,
1605,
2785,
16,
1250,
2341,
2171,
2853,
262,
3639,
1216,
1860,
16,
16959,
1667,
503,
16,
5714,
9629,
25746,
16,
18780,
565,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7782,
12,
16959,
1667,
6637,
1667,
16,
987,
1605,
2785,
16,
1250,
2341,
2171,
2853,
262,
3639,
1216,
1860,
16,
16959,
1667,
503,
16,
5714,
9629,
25746,
16,
18780,
565,
28... |
return uskCreate(parent, cb, clientMetadata, (USK)key, uri.listMetaStrings(), ctx, actx, maxRetries, recursionLevel, dontTellClientGet, token, isEssential, returnBucket); | return uskCreate(parent, cb, clientMetadata, (USK)key, uri.listMetaStrings(), ctx, actx, maxRetries, recursionLevel, dontTellClientGet, token, isEssential, returnBucket, isFinal); | public static ClientGetState create(BaseClientGetter parent, GetCompletionCallback cb, ClientMetadata clientMetadata, FreenetURI uri, FetcherContext ctx, ArchiveContext actx, int maxRetries, int recursionLevel, boolean dontTellClientGet, Object token, boolean isEssential, Bucket returnBucket) throws MalformedURLException, FetchException { BaseClientKey key = BaseClientKey.getBaseKey(uri); if(key instanceof ClientKey) return new SingleFileFetcher(parent, cb, clientMetadata, (ClientKey)key, uri.listMetaStrings(), uri, 0, ctx, actx, maxRetries, recursionLevel, dontTellClientGet, token, isEssential, returnBucket, true); else { return uskCreate(parent, cb, clientMetadata, (USK)key, uri.listMetaStrings(), ctx, actx, maxRetries, recursionLevel, dontTellClientGet, token, isEssential, returnBucket); } } | 46035 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46035/411123871e7f2463f679f4d6396979200e173712/SingleFileFetcher.java/clean/src/freenet/client/async/SingleFileFetcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
2445,
967,
1119,
752,
12,
2171,
1227,
8461,
982,
16,
968,
11238,
2428,
2875,
16,
2445,
2277,
1004,
2277,
16,
478,
2842,
278,
3098,
2003,
16,
8065,
264,
1042,
1103,
16,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
2445,
967,
1119,
752,
12,
2171,
1227,
8461,
982,
16,
968,
11238,
2428,
2875,
16,
2445,
2277,
1004,
2277,
16,
478,
2842,
278,
3098,
2003,
16,
8065,
264,
1042,
1103,
16,
13... |
StubSequence sequence = new StubSequence(stubs); | StubSequence sequence = new StubSequence(stubs); | public void testInvokesStubsInOrder() throws Throwable { MockStub[] stubs = new MockStub[4]; for (int i = 0; i < stubs.length; i++) { stubs[i] = new MockStub(); stubs[i].invokeResult = "RESULT-" + i; } StubSequence sequence = new StubSequence(stubs); for (int current = 0; current < stubs.length; current++) { reset(stubs); stubs[current].invokeInvocation.setExpected(invocation); assertEquals("should be result of stubs[" + current + "]", stubs[current].invokeResult, sequence.invoke(invocation)); stubs[current].verify(); } } | 2796 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2796/a917aff361c58c31c5dce12a5e8052df6803dbe1/StubSequenceTest.java/buggy/jmock/core/src/test/jmock/core/stub/StubSequenceTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
20749,
11974,
87,
382,
2448,
1435,
1216,
4206,
288,
202,
202,
9865,
11974,
8526,
7168,
87,
273,
394,
7867,
11974,
63,
24,
15533,
202,
202,
1884,
261,
474,
277,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
20749,
11974,
87,
382,
2448,
1435,
1216,
4206,
288,
202,
202,
9865,
11974,
8526,
7168,
87,
273,
394,
7867,
11974,
63,
24,
15533,
202,
202,
1884,
261,
474,
277,
273,
... |
if (newOwner == oldOwner) { return; } | protected void updateListeners(Object newOwner) { Object oldOwner = getOwner(); if (newOwner == oldOwner) { return; } if (oldOwner != null) { removeAllElementListeners(); } if (newOwner != null) { addElementListener(newOwner, new String[] { "name", "stereotype", "base", }); Iterator it = Model.getFacade().getBases(newOwner).iterator(); while (it.hasNext()) { Object base = it.next(); addElementListener(base, "name"); } } } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/ef5907cb8337eea4ef7f959d6c79b43a7787114b/FigClassifierRole.java/buggy/src_new/org/argouml/uml/diagram/sequence/ui/FigClassifierRole.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1089,
5583,
12,
921,
394,
5541,
13,
288,
3639,
1033,
1592,
5541,
273,
13782,
5621,
3639,
309,
261,
2704,
5541,
422,
1592,
5541,
13,
288,
5411,
327,
31,
3639,
289,
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,
4750,
918,
1089,
5583,
12,
921,
394,
5541,
13,
288,
3639,
1033,
1592,
5541,
273,
13782,
5621,
3639,
309,
261,
2704,
5541,
422,
1592,
5541,
13,
288,
5411,
327,
31,
3639,
289,
3639,
309,
... | |
if (!ref.uses(EAX)) { requestRegister(EAX, ref); ref.loadTo(eContext, EAX); } | if (!ref.uses(EAX)) { requestRegister(EAX, ref); ref.loadTo(eContext, EAX); } | public final void visit_athrow() { final RefItem ref = vstack.popRef(); // Exception must be in EAX if (!ref.uses(EAX)) { requestRegister(EAX, ref); ref.loadTo(eContext, EAX); } helper.writeJumpTableCALL(X86JumpTable.VM_ATHROW_OFS); ref.release(eContext); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/55b12818040bb69b51502c4cd0f42118d2046977/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
918,
3757,
67,
421,
492,
1435,
288,
3639,
727,
3941,
1180,
1278,
273,
19510,
18,
5120,
1957,
5621,
3639,
368,
1185,
1297,
506,
316,
512,
2501,
3639,
309,
16051,
1734,
18,
6117,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
3757,
67,
421,
492,
1435,
288,
3639,
727,
3941,
1180,
1278,
273,
19510,
18,
5120,
1957,
5621,
3639,
368,
1185,
1297,
506,
316,
512,
2501,
3639,
309,
16051,
1734,
18,
6117,... |
return 0; | return super.methodArity(methodId); | public int methodArity(int methodId, IdFunction function) { switch (methodId) { case Id_constructor: case Id_toString: case Id_toLocaleString: case Id_toFixed: case Id_toExponential: case Id_toPrecision: return 1; } return 0; } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/bd685b66b27ece754b26c9606fd2a85effa1567d/NativeNumber.java/buggy/js/rhino/src/org/mozilla/javascript/NativeNumber.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
707,
686,
560,
12,
474,
707,
548,
16,
3124,
2083,
445,
13,
288,
3639,
1620,
261,
2039,
548,
13,
288,
3639,
648,
3124,
67,
12316,
30,
3639,
648,
3124,
67,
10492,
30,
3639,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
707,
686,
560,
12,
474,
707,
548,
16,
3124,
2083,
445,
13,
288,
3639,
1620,
261,
2039,
548,
13,
288,
3639,
648,
3124,
67,
12316,
30,
3639,
648,
3124,
67,
10492,
30,
3639,
6... |
{ delete(true); } | { delete(true); } | public void delete() { delete(true); } | 11042 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11042/42f15ce06e127523723133285c793cb25214f02b/ReminderTransfer.java/buggy/trunk/JPAS/src/org/jpas/model/ReminderTransfer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1430,
1435,
202,
95,
202,
565,
1430,
12,
3767,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1430,
1435,
202,
95,
202,
565,
1430,
12,
3767,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
rcvdValue = value; | rcvdValue = value; | public void programmingOpReply(int value, int status) { rcvdValue = value; rcvdStatus = status; rcvdInvoked++; } | 2652 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2652/9803e109b150fd88cfc7c7bfa7f684113ad7470c/NceProgrammerTest.java/clean/test/jmri/jmrix/nce/NceProgrammerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
5402,
11987,
3817,
7817,
12,
474,
460,
16,
509,
1267,
13,
288,
1082,
202,
1310,
16115,
620,
273,
460,
31,
1875,
202,
1310,
16115,
1482,
273,
1267,
31,
1082,
202,
1310,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3196,
202,
482,
918,
5402,
11987,
3817,
7817,
12,
474,
460,
16,
509,
1267,
13,
288,
1082,
202,
1310,
16115,
620,
273,
460,
31,
1875,
202,
1310,
16115,
1482,
273,
1267,
31,
1082,
202,
1310,
1... |
pset.put(cmd.id, ONE); | pset.put(cmd.indexedId, ONE); | protected synchronized int overwriteBoth(AddUpdateCommand cmd) throws IOException { if (cmd.id==null) { cmd.id=getId(cmd.doc); } synchronized (this) { pset.put(cmd.id, ONE); doAdd(cmd.doc); } return 1; } | 50125 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50125/c5118151102a36851ac5430332617c2ca389c6d2/DirectUpdateHandler2.java/buggy/src/java/org/apache/solr/update/DirectUpdateHandler2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
3852,
509,
6156,
20240,
12,
986,
1891,
2189,
1797,
13,
1216,
1860,
288,
565,
309,
261,
4172,
18,
350,
631,
2011,
13,
288,
1377,
1797,
18,
350,
33,
26321,
12,
4172,
18,
2434,
1769,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
3852,
509,
6156,
20240,
12,
986,
1891,
2189,
1797,
13,
1216,
1860,
288,
565,
309,
261,
4172,
18,
350,
631,
2011,
13,
288,
1377,
1797,
18,
350,
33,
26321,
12,
4172,
18,
2434,
1769,... |
if (tpHead.getDirection() == tail.getDirection()) { | int headDir = tpHead.getDirection(); if (headDir == 0 || headDir == tail.getDirection()) { | public void append(TrainPath tp) { IntLine tpHead = (IntLine) tp.segments.getFirst(); IntLine tail = (IntLine) segments.getLast(); if (tpHead.x2 != tail.x1 || tpHead.y2 != tail.y1) throw new IllegalArgumentException(); if (tpHead.getDirection() == tail.getDirection()) { tail.append(tpHead); } else { segments.add(tpHead); } ListIterator i = tp.segments.listIterator(1); while (i.hasNext()) { segments.add(i.next()); } length += tp.getLength(); } | 9170 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9170/9992c1138a1a9bac02f618abb99fd38d4d34eae4/TrainPath.java/clean/railz/src/jfreerails/world/train/TrainPath.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
714,
12,
23419,
743,
8071,
13,
288,
202,
1702,
1670,
8071,
1414,
273,
261,
1702,
1670,
13,
8071,
18,
12838,
18,
588,
3759,
5621,
202,
1702,
1670,
5798,
273,
261,
1702,
1670,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
714,
12,
23419,
743,
8071,
13,
288,
202,
1702,
1670,
8071,
1414,
273,
261,
1702,
1670,
13,
8071,
18,
12838,
18,
588,
3759,
5621,
202,
1702,
1670,
5798,
273,
261,
1702,
1670,
... |
public void testMemberWithNullKey() { Result result = runQuery( "select {[Measures].[Unit Sales]} on columns," + nl + "{[Store Size in SQFT].members} on rows" + nl + "from Sales"); String resultString = toString(result); resultString = Pattern.compile("\\.0\\]").matcher(resultString).replaceAll("]"); // Try to detect whether nulls are sorted high, such as Postgres and Oracle. // In practice, the different JDBC drivers do not report correctly in all // instances. RolapConnection conn = (RolapConnection) getConnection(); boolean nullsSortHigh = false; // This did not seem to work consistently across drivers, so don't use it // boolean nullsSortedAtEnd = false; try { DatabaseMetaData dbMetadata = conn.getDataSource().getConnection().getMetaData(); nullsSortHigh = dbMetadata.nullsAreSortedHigh(); // nullsSortedAtEnd = dbMetadata.nullsAreSortedAtEnd(); } catch (SQLException e) { fail("Failed to get DatabaseMetaData to check nulls sort order"); return; } // Oracle apparently does not report the correct metadata for its handling // of sorting nulls, so we have a specific case (yuck!) String jdbc_url = conn.getConnectInfo().get("Jdbc"); if (jdbc_url.toLowerCase().indexOf("oracle") >= 0 ) { nullsSortHigh = true; } int row = 0; final String expected = "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs]}" + nl + // null is at the start in order under DBMSs that sort null low (!nullsSortHigh ? "{[Store Size in SQFT].[All Store Size in SQFTs].[null]}" + nl : "") + "{[Store Size in SQFT].[All Store Size in SQFTs].[20319]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[21215]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[22478]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[23112]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[23593]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[23598]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[23688]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[23759]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[24597]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[27694]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[28206]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[30268]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[30584]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[30797]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[33858]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[34452]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[34791]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[36509]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[38382]}" + nl + "{[Store Size in SQFT].[All Store Size in SQFTs].[39696]}" + nl + // null is at the end in order for DBMSs that sort nulls high (nullsSortHigh ? "{[Store Size in SQFT].[All Store Size in SQFTs].[null]}" + nl : "") + "Row #" + row++ + ": 266,773" + nl + (!nullsSortHigh ? "Row #" + row++ + ": 39,329" + nl : "" ) + "Row #" + row++ + ": 26,079" + nl + "Row #" + row++ + ": 25,011" + nl + "Row #" + row++ + ": 2,117" + nl + "Row #" + row++ + ": (null)" + nl + "Row #" + row++ + ": (null)" + nl + "Row #" + row++ + ": 25,663" + nl + "Row #" + row++ + ": 21,333" + nl + "Row #" + row++ + ": (null)" + nl + "Row #" + row++ + ": (null)" + nl + "Row #" + row++ + ": 41,580" + nl + "Row #" + row++ + ": 2,237" + nl + "Row #" + row++ + ": 23,591" + nl + "Row #" + row++ + ": (null)" + nl + "Row #" + row++ + ": (null)" + nl + "Row #" + row++ + ": 35,257" + nl + "Row #" + row++ + ": (null)" + nl + "Row #" + row++ + ": (null)" + nl + "Row #" + row++ + ": (null)" + nl + "Row #" + row++ + ": (null)" + nl + "Row #" + row++ + ": 24,576" + nl + (nullsSortHigh ? "Row #" + row++ + ": 39,329" + nl : "" ); assertEquals(expected, resultString); } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/b5b5168edc3af09cb74945a80b0c36e6630ed502/BasicQueryTest.java/clean/testsrc/main/mondrian/test/BasicQueryTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
4419,
1190,
2041,
653,
1435,
288,
202,
202,
1253,
563,
273,
1086,
1138,
12,
9506,
202,
6,
4025,
288,
63,
23177,
1823,
8009,
63,
2802,
25996,
18322,
603,
2168,
10837,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4419,
1190,
2041,
653,
1435,
288,
202,
202,
1253,
563,
273,
1086,
1138,
12,
9506,
202,
6,
4025,
288,
63,
23177,
1823,
8009,
63,
2802,
25996,
18322,
603,
2168,
10837,
... | ||
throw new FieldException(SessionRejectReason.INVALID_MSGTYPE, MsgType.FIELD); | throw new FieldException(SessionRejectReason.INVALID_MSGTYPE); | private void checkMsgType(String msgType) { if (!isMsgType(msgType)) { throw new FieldException(SessionRejectReason.INVALID_MSGTYPE, MsgType.FIELD); } } | 6791 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6791/9bd0995bd3a40a04445d4102f2b6117e805cbc6e/DataDictionary.java/clean/src/quickfix/DataDictionary.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
866,
3332,
559,
12,
780,
1234,
559,
13,
288,
3639,
309,
16051,
291,
3332,
559,
12,
3576,
559,
3719,
288,
2868,
604,
394,
2286,
503,
12,
2157,
21705,
8385,
18,
9347,
67,
11210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
866,
3332,
559,
12,
780,
1234,
559,
13,
288,
3639,
309,
16051,
291,
3332,
559,
12,
3576,
559,
3719,
288,
2868,
604,
394,
2286,
503,
12,
2157,
21705,
8385,
18,
9347,
67,
11210... |
throw new IllegalArgumentException(new Message(Messages.EVENT_TYPE_X_NOT_RECOGNISED, notification.getClass() .getName()).getMessage()); | logger.error(new NotificationException(new Message(Messages.EVENT_TYPE_X_NOT_RECOGNISED, notification.getClass() .getName()))); return; | protected void notifyListeners(UMOServerNotification notification) { TreeMap listeners; String subscription = null; Class listenerClass = null; // determine the listewner class type for the current notification Map.Entry entry = null; for (Iterator iterator = eventsMap.entrySet().iterator(); iterator.hasNext();) { entry = (Map.Entry) iterator.next(); Class eventClass = (Class) entry.getValue(); if (eventClass.isAssignableFrom(notification.getClass())) { listenerClass = (Class) entry.getKey(); break; } } if (listenerClass == null) { throw new IllegalArgumentException(new Message(Messages.EVENT_TYPE_X_NOT_RECOGNISED, notification.getClass() .getName()).getMessage()); } listeners = getListeners(listenerClass); UMOServerNotificationListener l; synchronized (listeners) { for (Iterator iterator = listeners.keySet().iterator(); iterator.hasNext();) { l = (UMOServerNotificationListener) iterator.next(); subscription = (String) listeners.get(l); if (subscription == null) { subscription = NULL_SUBSCRIPTION; } // If the listener has a resource id associated with it, make // sure the notification // is only fired if the notification resource id and listener resource // id match if (NULL_SUBSCRIPTION.equals(subscription) || new WildcardFilter(subscription).accept(notification.getResourceIdentifier())) { l.onNotification(notification); } else { logger.trace("Resource id '" + subscription + "' for listener " + l.getClass().getName() + " does not match Resource id '" + notification.getResourceIdentifier() + "' for notificationication, not firing notificationication for this listener"); } } } } | 28323 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28323/bc5e72512e472e5267081176f8ca34b64d2ee0cb/ServerNotificationManager.java/clean/mule/src/java/org/mule/impl/internal/notifications/ServerNotificationManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
5066,
5583,
12,
2799,
51,
2081,
4386,
3851,
13,
565,
288,
3639,
16381,
4679,
31,
3639,
514,
4915,
273,
446,
31,
3639,
1659,
2991,
797,
273,
446,
31,
3639,
368,
4199,
326,
666... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5066,
5583,
12,
2799,
51,
2081,
4386,
3851,
13,
565,
288,
3639,
16381,
4679,
31,
3639,
514,
4915,
273,
446,
31,
3639,
1659,
2991,
797,
273,
446,
31,
3639,
368,
4199,
326,
666... |
} | public static boolean present( PageContext pageContext, String bundle, String locale, String key) throws JspException { MessageResources resources = null; // Look up the requested MessageResources if (bundle == null) { bundle = Globals.MESSAGES_KEY; resources = (MessageResources) pageContext.getAttribute(bundle); } if (resources == null) { resources = (MessageResources) pageContext.getAttribute(bundle, PageContext.APPLICATION_SCOPE); } if (resources == null) { JspException e = new JspException(messages.getMessage("message.bundle", bundle)); saveException(pageContext, e); throw e; } // Look up the requested Locale if (locale == null) locale = Globals.LOCALE_KEY; Locale userLocale = (Locale) pageContext.getAttribute(locale, PageContext.SESSION_SCOPE); if (userLocale == null) userLocale = defaultLocale; // Return the requested message presence indicator return (resources.isPresent(userLocale, key)); } | 2722 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2722/f89793f3ad32b2f6a4a39ee6bef6e90b929d5bf8/RequestUtils.java/buggy/src/share/org/apache/struts/util/RequestUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
289,
225,
289,
225,
289,
225,
289,
225,
1071,
97,
225,
760,
97,
225,
1250,
97,
225,
3430,
12,
97,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
3460,
1042,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
289,
225,
289,
225,
289,
225,
289,
225,
1071,
97,
225,
760,
97,
225,
1250,
97,
225,
3430,
12,
97,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
3460,
1042,
9... | |
execute("Collection.new", "viewObject=xava_view_section2_details"); | execute("Collection.new", "viewObject=xava_view_section2_details_details"); | public void testAggregateInCollectionWithNotHiddenKey() throws Exception { assertListNotEmpty(); execute("Mode.detailAndFirst"); execute("Sections.change", "activeSection=2"); execute("Collection.new", "viewObject=xava_view_section2_details"); setValue("details.number", "66"); setValue("details.description", "JUNIT DELIVERY DETAIL"); execute("Collection.save", "viewObject=xava_view_section2_details"); assertNoErrors(); execute("Collection.edit", "row=0,viewObject=xava_view_section2_details"); assertValue("details.number", "66"); execute("Collection.remove", "viewObject=xava_view_section2_details"); assertNoErrors(); } | 14127 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14127/79a6fc4264f42ba2a8268a925f835c46227be848/DeliveriesTest.java/clean/OpenXavaTest/src/org/openxava/test/tests/DeliveriesTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
11490,
382,
2532,
1190,
1248,
9345,
653,
1435,
1216,
1185,
288,
202,
202,
11231,
682,
18431,
5621,
202,
202,
8837,
2932,
2309,
18,
8992,
1876,
3759,
8863,
202,
202,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
11490,
382,
2532,
1190,
1248,
9345,
653,
1435,
1216,
1185,
288,
202,
202,
11231,
682,
18431,
5621,
202,
202,
8837,
2932,
2309,
18,
8992,
1876,
3759,
8863,
202,
202,
8... |
public org.quickfix.field.SecurityDesc getSecurityDesc() throws FieldNotFound { org.quickfix.field.SecurityDesc value = new org.quickfix.field.SecurityDesc(); | public quickfix.field.SecurityDesc getSecurityDesc() throws FieldNotFound { quickfix.field.SecurityDesc value = new quickfix.field.SecurityDesc(); | public org.quickfix.field.SecurityDesc getSecurityDesc() throws FieldNotFound { org.quickfix.field.SecurityDesc value = new org.quickfix.field.SecurityDesc(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/PositionMaintenanceReport.java/buggy/src/java/src/quickfix/fix44/PositionMaintenanceReport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
4217,
19288,
4217,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
4217,
460,
273,
394,
2358,
18,
19525,
904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
4217,
19288,
4217,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
4217,
460,
273,
394,
2358,
18,
19525,
904,
... |
public InPort (InputStream in, String name) | public InPort (InputStream in) | public InPort (InputStream in, String name) { super (in); this.name = name; } | 41089 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41089/9292b56fb80c5b537c1272965997a5d4cc8bad83/InPort.java/buggy/kawa/lang/InPort.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
657,
2617,
261,
4348,
316,
13,
225,
288,
565,
2240,
261,
267,
1769,
565,
333,
18,
529,
273,
508,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
657,
2617,
261,
4348,
316,
13,
225,
288,
565,
2240,
261,
267,
1769,
565,
333,
18,
529,
273,
508,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
public void testSetSubjectPublicKey2() { PublicKey pkey1; PublicKey pkey2; try { pkey1 = new TestKeyPair("RSA").getPublic(); pkey2 = new TestKeyPair("DSA").getPublic(); } catch (Exception e) { e.printStackTrace(); fail("Unexpected Exception was thrown: " + e.getMessage()); return; } | public void testSetSubjectPublicKey2() throws Exception { PublicKey pkey1 = new TestKeyPair("RSA").getPublic(); PublicKey pkey2 = new TestKeyPair("DSA").getPublic(); | public void testSetSubjectPublicKey2() { PublicKey pkey1; PublicKey pkey2; try { pkey1 = new TestKeyPair("RSA").getPublic(); pkey2 = new TestKeyPair("DSA").getPublic(); } catch (Exception e) { e.printStackTrace(); fail("Unexpected Exception was thrown: " + e.getMessage()); return; } byte[] encoding1 = pkey1.getEncoded(); byte[] encoding2 = pkey2.getEncoded(); TestCert cert_1 = new TestCert(pkey1); TestCert cert_2 = new TestCert(pkey2); X509CertSelector selector = new X509CertSelector(); try { selector.setSubjectPublicKey((byte[]) null); } catch (IOException e) { e.printStackTrace(); fail("Unexpected IOException was thrown."); } assertTrue("Any certificate should match in the case of null " + "subjectPublicKey criteria.", selector.match(cert_1) && selector.match(cert_2)); try { selector.setSubjectPublicKey(encoding1); } catch (IOException e) { e.printStackTrace(); fail("Unexpected IOException was thrown."); } assertTrue("The certificate should match the selection criteria.", selector.match(cert_1)); encoding1[0] ++; assertTrue("The certificate should match the selection criteria.", selector.match(cert_1)); assertFalse("The certificate should not match the selection criteria.", selector.match(cert_2)); try { selector.setSubjectPublicKey(encoding2); } catch (IOException e) { e.printStackTrace(); fail("Unexpected IOException was thrown."); } assertTrue("The certificate should match the selection criteria.", selector.match(cert_2)); } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/bbf4106d4d1bee0ed681ee23a622a2af396bd288/X509CertSelectorTest.java/buggy/modules/security/src/test/impl/java.injected/java/security/cert/X509CertSelectorTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
694,
6638,
9632,
22,
1435,
288,
3639,
11951,
19291,
21,
31,
3639,
11951,
19291,
22,
31,
3639,
775,
288,
5411,
19291,
21,
273,
394,
7766,
15099,
2932,
15248,
20387,
588,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
694,
6638,
9632,
22,
1435,
288,
3639,
11951,
19291,
21,
31,
3639,
11951,
19291,
22,
31,
3639,
775,
288,
5411,
19291,
21,
273,
394,
7766,
15099,
2932,
15248,
20387,
588,
4... |
recv.getRuntime().getCurrentContext().yield(((IRubyObject) iter.next())); | recv.getRuntime().getCurrentContext().yield(obj); | public static IRubyObject each_object(IRubyObject recv, IRubyObject[] args) { RubyModule rubyClass; if (args.length == 0) { rubyClass = recv.getRuntime().getObject(); } else { rubyClass = (RubyModule) args[0]; } int count = 0; Iterator iter = recv.getRuntime().getObjectSpace().iterator(rubyClass); while (iter.hasNext()) { count++; recv.getRuntime().getCurrentContext().yield(((IRubyObject) iter.next())); } return recv.getRuntime().newFixnum(count); } | 46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/448643c70dc9b78a7d89a851b9202699d07cfbb3/RubyObjectSpace.java/buggy/src/org/jruby/RubyObjectSpace.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
15908,
10340,
921,
1517,
67,
1612,
12,
7937,
10340,
921,
10665,
16,
15908,
10340,
921,
8526,
833,
13,
288,
3639,
19817,
3120,
22155,
797,
31,
3639,
309,
261,
1968,
18,
2469,
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,
1071,
760,
15908,
10340,
921,
1517,
67,
1612,
12,
7937,
10340,
921,
10665,
16,
15908,
10340,
921,
8526,
833,
13,
288,
3639,
19817,
3120,
22155,
797,
31,
3639,
309,
261,
1968,
18,
2469,
42... |
if ( isAxisLabelStaggered( ) && i % 2 == 1 ) | if ( isAxisLabelStaggered( ) && baTickLabelStaggered[i] ) | public final boolean checkFit( IDisplayServer xs, Label la, int iLabelLocation ) throws ChartException { if ( iType == TEXT || bCategoryScale ) // !MUST IGNORE the label visibility here.Don't check it! // || !la.isSetVisible( ) // || ( la.isSetVisible( ) && !la.isVisible( ) ) ) { return true; } final double dAngleInDegrees = la.getCaption( ) .getFont( ) .getRotation( ); double x = 0, y = 0; int iPointToCheck = 0; if ( iLabelLocation == ABOVE || iLabelLocation == BELOW ) { iPointToCheck = ( dAngleInDegrees < 0 && dAngleInDegrees > -90 ) ? 3 : 0; } else if ( iLabelLocation == LEFT || iLabelLocation == RIGHT ) { iPointToCheck = ( dAngleInDegrees < 0 && dAngleInDegrees > -90 ) ? 2 : 3; } double[] da = daTickCoordinates; RotatedRectangle rrPrev = null, rrPrev2 = null, rr; if ( ( iType & ( NUMERICAL | LINEAR ) ) == ( NUMERICAL | LINEAR ) ) { double dAxisValue = asDouble( getMinimum( ) ).doubleValue( ); final double dAxisStep = asDouble( getStep( ) ).doubleValue( ); String sText; DecimalFormat df = null; if ( fs == null ) // CREATE IF FORMAT SPECIFIER IS UNDEFINED { df = new DecimalFormat( getNumericPattern( ) ); } final NumberDataElement nde = NumberDataElementImpl.create( 0 ); for ( int i = 0; i < da.length; i++ ) { nde.setValue( dAxisValue ); try { sText = ValueFormatter.format( nde, fs, rtc.getLocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = NULL_STRING; } if ( iLabelLocation == ABOVE || iLabelLocation == BELOW ) { x = da[i]; } else if ( iLabelLocation == LEFT || iLabelLocation == RIGHT ) { y = da[i]; } la.getCaption( ).setValue( sText ); try { rr = computePolygon( xs, iLabelLocation, la, x, y ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, uiex ); } Point p = rr.getPoint( iPointToCheck ); if ( isAxisLabelStaggered( ) && i % 2 == 1 ) { if ( rrPrev2 != null && ( rrPrev2.contains( p ) || rrPrev2.getPoint( iPointToCheck ) .equals( p ) || ChartUtil.intersects( rr, rrPrev2 ) ) ) { return false; } rrPrev2 = rr; } else { if ( rrPrev != null && ( rrPrev.contains( p ) || rrPrev.getPoint( iPointToCheck ) .equals( p ) || ChartUtil.intersects( rr, rrPrev ) ) ) { return false; } rrPrev = rr; } dAxisValue += dAxisStep; } } else if ( ( iType & ( NUMERICAL | LOGARITHMIC ) ) == ( NUMERICAL | LOGARITHMIC ) ) { double dAxisValue = asDouble( getMinimum( ) ).doubleValue( ); final double dAxisStep = asDouble( getStep( ) ).doubleValue( ); String sText; NumberDataElement nde = NumberDataElementImpl.create( 0 ); DecimalFormat df = null; for ( int i = 0; i < da.length; i++ ) { nde.setValue( dAxisValue ); if ( fs == null ) { df = new DecimalFormat( getNumericPattern( dAxisValue ) ); } try { sText = ValueFormatter.format( nde, fs, rtc.getLocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = NULL_STRING; } if ( iLabelLocation == ABOVE || iLabelLocation == BELOW ) { x = da[i]; } else if ( iLabelLocation == LEFT || iLabelLocation == RIGHT ) { y = da[i]; } la.getCaption( ).setValue( sText ); try { rr = computePolygon( xs, iLabelLocation, la, x, y ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, uiex ); } Point p = rr.getPoint( iPointToCheck ); if ( isAxisLabelStaggered( ) && i % 2 == 1 ) { if ( rrPrev2 != null && ( rrPrev2.contains( p ) || rrPrev2.getPoint( iPointToCheck ) .equals( p ) || ChartUtil.intersects( rr, rrPrev2 ) ) ) { return false; } rrPrev2 = rr; } else { if ( rrPrev != null && ( rrPrev.contains( p ) || rrPrev.getPoint( iPointToCheck ) .equals( p ) ) ) { return false; } rrPrev = rr; } dAxisValue *= dAxisStep; } } else if ( iType == DATE_TIME ) { CDateTime cdt, cdtAxisValue = asDateTime( oMinimum ); final int iUnit = asInteger( oUnit ); final int iStep = asInteger( oStep ); final SimpleDateFormat sdf = new SimpleDateFormat( CDateTime.getPreferredFormat( iUnit ) ); String sText; cdt = cdtAxisValue; for ( int i = 0; i < da.length; i++ ) { sText = sdf.format( cdt.getTime( ) ); if ( iLabelLocation == ABOVE || iLabelLocation == BELOW ) x = da[i]; else if ( iLabelLocation == LEFT || iLabelLocation == RIGHT ) y = da[i]; la.getCaption( ).setValue( sText ); try { rr = computePolygon( xs, iLabelLocation, la, x, y ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, uiex ); } Point p = rr.getPoint( iPointToCheck ); if ( isAxisLabelStaggered( ) && i % 2 == 1 ) { if ( rrPrev2 != null && ( rrPrev2.contains( p ) || rrPrev2.getPoint( iPointToCheck ) .equals( p ) || ChartUtil.intersects( rr, rrPrev2 ) ) ) { return false; } rrPrev2 = rr; } else { if ( rrPrev != null && ( rrPrev.contains( p ) || rrPrev.getPoint( iPointToCheck ) .equals( p ) ) ) { return false; } rrPrev = rr; } cdt = cdtAxisValue.forward( iUnit, iStep * ( i + 1 ) ); // ALWAYS // W.R.T // START // VALUE } } return true; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/1ce2bcb039093efc0da6510f1a87d8b14eabd207/AutoScale.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/withaxes/AutoScale.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
1250,
866,
14219,
12,
1599,
291,
1601,
2081,
9280,
16,
5287,
7125,
16,
1082,
202,
474,
277,
2224,
2735,
262,
1216,
14804,
503,
202,
95,
202,
202,
430,
261,
277,
559,
422,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
866,
14219,
12,
1599,
291,
1601,
2081,
9280,
16,
5287,
7125,
16,
1082,
202,
474,
277,
2224,
2735,
262,
1216,
14804,
503,
202,
95,
202,
202,
430,
261,
277,
559,
422,... |
Class[] parameterTypes; Method m = null; if (arity.isFixed()) { parameterTypes = new Class[arity.getValue()]; Arrays.fill(parameterTypes, IRubyObject.class); } else { parameterTypes = new Class[1]; parameterTypes[0] = IRubyObject[].class; } try { m = type.getMethod(name, parameterTypes); } catch (NoSuchMethodException e) { assert false : e; } catch (SecurityException e) { assert false : e; } this.method = m; | loadMethod(); | public ReflectionCallback(Class type, String name, Arity arity) { super(type, name, arity); assert type != null; assert name != null; assert arity != null; Class[] parameterTypes; Method m = null; if (arity.isFixed()) { parameterTypes = new Class[arity.getValue()]; Arrays.fill(parameterTypes, IRubyObject.class); } else { parameterTypes = new Class[1]; parameterTypes[0] = IRubyObject[].class; } try { m = type.getMethod(name, parameterTypes); } catch (NoSuchMethodException e) { assert false : e; } catch (SecurityException e) { assert false : e; } this.method = m; } | 1060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1060/803c66ee682936beecc8a43fe2cfc90fe5645b22/ReflectionCallback.java/clean/src/org/jruby/runtime/callback/ReflectionCallback.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5685,
2428,
12,
797,
618,
16,
514,
508,
16,
1201,
560,
19353,
13,
288,
3639,
2240,
12,
723,
16,
508,
16,
19353,
1769,
3639,
1815,
618,
480,
446,
31,
3639,
1815,
508,
480,
446,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5685,
2428,
12,
797,
618,
16,
514,
508,
16,
1201,
560,
19353,
13,
288,
3639,
2240,
12,
723,
16,
508,
16,
19353,
1769,
3639,
1815,
618,
480,
446,
31,
3639,
1815,
508,
480,
446,
3... |
if (debug) System.out.println("PictReader.drivePictDecoder"); | if (debug) debug("drivePictDecoder"); | private boolean drivePictDecoder(int opcode) throws FormatException { if (debug) System.out.println("PictReader.drivePictDecoder"); switch (opcode) { case PICT_BITSRGN: // rowBytes must be < 8 case PICT_PACKBITSRGN: // rowBytes must be < 8 case PICT_BITSRECT: // rowBytes must be < 8 case PICT_PACKBITSRECT: case PICT_9A: handlePackBits(opcode); break; case PICT_CLIP_RGN: int x = DataTools.bytesToInt(bytes, pt, 2, little); pt += x; break; case PICT_LONGCOMMENT: pt += 2; x = DataTools.bytesToInt(bytes, pt, 2, little); pt += x + 2; break; case PICT_END: // end of PICT state |= IMAGEAVAIL; return false; } return (pt < bytes.length); } | 55415 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55415/2c680a5618955854e02d652bc68024b9a011950a/PictReader.java/clean/loci/formats/in/PictReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1250,
14316,
52,
933,
7975,
12,
474,
11396,
13,
1216,
4077,
503,
288,
565,
309,
261,
4148,
13,
1198,
2932,
25431,
52,
933,
7975,
8863,
565,
1620,
261,
556,
710,
13,
288,
1377,
648... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1250,
14316,
52,
933,
7975,
12,
474,
11396,
13,
1216,
4077,
503,
288,
565,
309,
261,
4148,
13,
1198,
2932,
25431,
52,
933,
7975,
8863,
565,
1620,
261,
556,
710,
13,
288,
1377,
648... |
writer.openTag( HTMLTags.TAG_BODY ); if ( bodyStyle != null ) { writer .attribute( HTMLTags.ATTR_CLASS, bodyStyle .getName( ) ); } | writer.attribute( HTMLTags.ATTR_CLASS, bodyStyle.getName( ) ); | public void startBody( ) { logger.log( Level.FINE, "[HTMLReportEmitter] Start body." ); //$NON-NLS-1$ if ( report != null ) { IStyle bodyStyle = report.getBodyStyle( ); if ( !isEmbeddable ) { writer.openTag( HTMLTags.TAG_BODY ); if ( bodyStyle != null ) { writer .attribute( HTMLTags.ATTR_CLASS, bodyStyle .getName( ) ); } } else { writer.openTag( HTMLTags.TAG_DIV ); if ( bodyStyle != null ) { StringBuffer styleBuffer = new StringBuffer( ); AttributeBuilder.buildStyle( styleBuffer, bodyStyle, this ); writer.attribute( HTMLTags.ATTR_STYLE, styleBuffer .toString( ) ); } } } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/fc21518a7d419f8e46d0e17d3dc145b5a13505b0/HTMLReportEmitter.java/clean/engine/org.eclipse.birt.report.engine.emitter.html/src/org/eclipse/birt/report/engine/emitter/html/HTMLReportEmitter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
787,
2250,
12,
262,
202,
95,
202,
202,
4901,
18,
1330,
12,
4557,
18,
42,
3740,
16,
5158,
4870,
4820,
13476,
65,
3603,
1417,
1199,
11272,
4329,
3993,
17,
5106,
17,
21,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
787,
2250,
12,
262,
202,
95,
202,
202,
4901,
18,
1330,
12,
4557,
18,
42,
3740,
16,
5158,
4870,
4820,
13476,
65,
3603,
1417,
1199,
11272,
4329,
3993,
17,
5106,
17,
21,
8... |
public static int resetGCBitsForCopy(VM_Address fromObj, int forwardingPtr, | final public static int resetGCBitsForCopy(VM_Address fromObj, int forwardingPtr, | public static int resetGCBitsForCopy(VM_Address fromObj, int forwardingPtr, int bytes) { return (forwardingPtr & ~HybridHeader.GC_BITS_MASK) | msCollector.getInitialHeaderValue(bytes); } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/94b7f2758d20d0b18a9fe0f2a98fc5fcde7a9fce/Plan.java/buggy/rvm/src/vm/memoryManagers/JMTk/plan/genHybrid/Plan.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
509,
2715,
15396,
6495,
1290,
2951,
12,
7397,
67,
1887,
628,
2675,
16,
509,
20635,
5263,
16,
6862,
4202,
509,
1731,
13,
288,
565,
327,
261,
11565,
310,
5263,
473,
4871,
17507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2715,
15396,
6495,
1290,
2951,
12,
7397,
67,
1887,
628,
2675,
16,
509,
20635,
5263,
16,
6862,
4202,
509,
1731,
13,
288,
565,
327,
261,
11565,
310,
5263,
473,
4871,
17507,
... |
} if (maxLen > 20) | } } if (maxLen > 20) { | private void sendMTFValues() throws IOException { char len[][] = new char[N_GROUPS][MAX_ALPHA_SIZE]; int v, t, i, j, gs, ge, totc, bt, bc, iter; int nSelectors = 0, alphaSize, minLen, maxLen, selCtr; int nGroups, nBytes; alphaSize = nInUse + 2; for (t = 0; t < N_GROUPS; t++) for (v = 0; v < alphaSize; v++) len[t][v] = (char)GREATER_ICOST; /* Decide how many coding tables to use */ if (nMTF <= 0) panic(); if (nMTF < 200) nGroups = 2; else if (nMTF < 600) nGroups = 3; else if (nMTF < 1200) nGroups = 4; else if (nMTF < 2400) nGroups = 5; else nGroups = 6; /* Generate an initial set of coding tables */ { int nPart, remF, tFreq, aFreq; nPart = nGroups; remF = nMTF; gs = 0; while (nPart > 0) { tFreq = remF / nPart; ge = gs-1; aFreq = 0; while (aFreq < tFreq && ge < alphaSize-1) { ge++; aFreq += mtfFreq[ge]; } if (ge > gs && nPart != nGroups && nPart != 1 && ((nGroups-nPart) % 2 == 1)) { aFreq -= mtfFreq[ge]; ge--; } for (v = 0; v < alphaSize; v++) if (v >= gs && v <= ge) len[nPart-1][v] = (char)LESSER_ICOST; else len[nPart-1][v] = (char)GREATER_ICOST; nPart--; gs = ge+1; remF -= aFreq; } } int rfreq[][] = new int[N_GROUPS][MAX_ALPHA_SIZE]; int fave[] = new int[N_GROUPS]; short cost[] = new short[N_GROUPS]; /* Iterate up to N_ITERS times to improve the tables. */ for (iter = 0; iter < N_ITERS; iter++) { for (t = 0; t < nGroups; t++) fave[t] = 0; for (t = 0; t < nGroups; t++) for (v = 0; v < alphaSize; v++) rfreq[t][v] = 0; nSelectors = 0; totc = 0; gs = 0; while (true) { /* Set group start & end marks. */ if (gs >= nMTF) break; ge = gs + G_SIZE - 1; if (ge >= nMTF) ge = nMTF-1; /* Calculate the cost of this group as coded by each of the coding tables. */ for (t = 0; t < nGroups; t++) cost[t] = 0; if (nGroups == 6) { short cost0, cost1, cost2, cost3, cost4, cost5; cost0 = cost1 = cost2 = cost3 = cost4 = cost5 = 0; for (i = gs; i <= ge; i++) { short icv = szptr[i]; cost0 += len[0][icv]; cost1 += len[1][icv]; cost2 += len[2][icv]; cost3 += len[3][icv]; cost4 += len[4][icv]; cost5 += len[5][icv]; } cost[0] = cost0; cost[1] = cost1; cost[2] = cost2; cost[3] = cost3; cost[4] = cost4; cost[5] = cost5; } else { for (i = gs; i <= ge; i++) { short icv = szptr[i]; for (t = 0; t < nGroups; t++) cost[t] += len[t][icv]; } } /* Find the coding table which is best for this group, and record its identity in the selector table. */ bc = 999999999; bt = -1; for (t = 0; t < nGroups; t++) if (cost[t] < bc) { bc = cost[t]; bt = t; }; totc += bc; fave[bt]++; selector[nSelectors] = (char)bt; nSelectors++; /* Increment the symbol frequencies for the selected table. */ for (i = gs; i <= ge; i++) rfreq[bt][szptr[i]]++; gs = ge+1; } /* Recompute the tables based on the accumulated frequencies. */ for (t = 0; t < nGroups; t++) hbMakeCodeLengths(len[t], rfreq[t], alphaSize, 20); } rfreq = null; fave = null; cost = null; if (!(nGroups < 8)) panic(); if (!(nSelectors < 32768 && nSelectors <= (2 + (900000 / G_SIZE)))) panic(); /* Compute MTF values for the selectors. */ { char pos[] = new char[N_GROUPS]; char ll_i, tmp2, tmp; for (i = 0; i < nGroups; i++) pos[i] = (char)i; for (i = 0; i < nSelectors; i++) { ll_i = selector[i]; j = 0; tmp = pos[j]; while ( ll_i != tmp ) { j++; tmp2 = tmp; tmp = pos[j]; pos[j] = tmp2; } pos[0] = tmp; selectorMtf[i] = (char)j; } } int code[][] = new int[N_GROUPS][MAX_ALPHA_SIZE]; /* Assign actual codes for the tables. */ for (t = 0; t < nGroups; t++) { minLen = 32; maxLen = 0; for (i = 0; i < alphaSize; i++) { if (len[t][i] > maxLen) maxLen = len[t][i]; if (len[t][i] < minLen) minLen = len[t][i]; } if (maxLen > 20) panic(); if (minLen < 1) panic(); hbAssignCodes(code[t], len[t], minLen, maxLen, alphaSize); } /* Transmit the mapping table. */ { boolean inUse16[] = new boolean[16]; for (i = 0; i < 16; i++) { inUse16[i] = false; for (j = 0; j < 16; j++) if (inUse[i * 16 + j]) inUse16[i] = true; } nBytes = bytesOut; for (i = 0; i < 16; i++) if (inUse16[i]) bsW(1,1); else bsW(1,0); for (i = 0; i < 16; i++) if (inUse16[i]) for (j = 0; j < 16; j++) if (inUse[i * 16 + j]) bsW(1,1); else bsW(1,0); } /* Now the selectors. */ nBytes = bytesOut; bsW ( 3, nGroups ); bsW ( 15, nSelectors ); for (i = 0; i < nSelectors; i++) { for (j = 0; j < selectorMtf[i]; j++) bsW(1,1); bsW(1,0); } /* Now the coding tables. */ nBytes = bytesOut; for (t = 0; t < nGroups; t++) { int curr = len[t][0]; bsW(5, curr); for (i = 0; i < alphaSize; i++) { while (curr < len[t][i]) { bsW(2,2); curr++; /* 10 */ } while (curr > len[t][i]) { bsW(2,3); curr--; /* 11 */ } bsW ( 1, 0 ); } } /* And finally, the block data proper */ nBytes = bytesOut; selCtr = 0; gs = 0; while (true) { if (gs >= nMTF) break; ge = gs + G_SIZE - 1; if (ge >= nMTF) ge = nMTF-1; for (i = gs; i <= ge; i++) { bsW(len [selector[selCtr]] [szptr[i]], code [selector[selCtr]] [szptr[i]] ); } gs = ge+1; selCtr++; } if (!(selCtr == nSelectors)) panic(); } | 506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/7a4e9ca2278d5e22a3492abb964312150d0286b9/CBZip2OutputStream.java/clean/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1366,
6152,
42,
1972,
1435,
1216,
1860,
288,
3639,
1149,
562,
63,
6362,
65,
273,
394,
1149,
63,
50,
67,
28977,
6362,
6694,
67,
26313,
67,
4574,
15533,
3639,
509,
331,
16,
268... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6152,
42,
1972,
1435,
1216,
1860,
288,
3639,
1149,
562,
63,
6362,
65,
273,
394,
1149,
63,
50,
67,
28977,
6362,
6694,
67,
26313,
67,
4574,
15533,
3639,
509,
331,
16,
268... |
for (DetailAST node = (DetailAST) aTree.getFirstChild(); node != null; node = (DetailAST) node.getNextSibling()) | for (DetailAST node = (DetailAST) aTree.getFirstChild(); node != null; node = (DetailAST) node.getNextSibling()) | protected void findSubtreeLines(LineSet aLines, DetailAST aTree, boolean aAllowNesting) { // find line for this node // TODO: getLineNo should probably not return < 0, but it is for // the interface methods... I should ask about this if (getIndentCheck().getHandlerFactory().isHandledType(aTree.getType()) || aTree.getLineNo() < 0) { return; } // TODO: the problem with this is that not all tree tokens actually // have the right column number -- I should get a list of these // and verify that checking nesting this way won't cause problems// if (allowNesting && tree.getColumnNo() != getLineStart(tree)) {// return;// } Integer lineNum = new Integer(aTree.getLineNo()); Integer colNum = aLines.getStartColumn(lineNum); int thisLineColumn = expandedTabsColumnNo(aTree); if (colNum == null) { aLines.addLineAndCol(lineNum, thisLineColumn); } else { if (expandedTabsColumnNo(aTree) < colNum.intValue()) { aLines.addLineAndCol(lineNum, thisLineColumn); } } // check children for (DetailAST node = (DetailAST) aTree.getFirstChild(); node != null; node = (DetailAST) node.getNextSibling()) { findSubtreeLines(aLines, node, aAllowNesting); } } | 50482 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50482/3b4c5f5b9f6c9e1d500b320963e15436dc497f2f/ExpressionHandler.java/buggy/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/indentation/ExpressionHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1104,
18615,
5763,
12,
1670,
694,
279,
5763,
16,
27931,
9053,
279,
2471,
16,
540,
1250,
279,
7009,
50,
10100,
13,
377,
288,
3639,
368,
1104,
980,
364,
333,
756,
3639,
368,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1104,
18615,
5763,
12,
1670,
694,
279,
5763,
16,
27931,
9053,
279,
2471,
16,
540,
1250,
279,
7009,
50,
10100,
13,
377,
288,
3639,
368,
1104,
980,
364,
333,
756,
3639,
368,
26... |
.getPluginId(), MSLStatusCodes.OK, ResourceManager .getI18NString("operation.ok"), | .getPluginId(), MSLStatusCodes.OK, EMFCoreMessages.operation_ok, | public Object run() { try { readOp.run(monitor); readOp.setResult(new Status(IStatus.OK, MSLPlugin .getPluginId(), MSLStatusCodes.OK, ResourceManager .getI18NString("operation.ok"), //$NON-NLS-1$ null)); } catch (Exception e) { readOp.setResult(new Status(IStatus.ERROR, MSLPlugin .getPluginId(), MSLStatusCodes.OPERATION_FAILED, ResourceManager.getI18NString("operation.failed"), //$NON-NLS-1$ e)); pendingException[0] = e; } return null; } | 1758 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1758/cfbbc380135d56e72a92fb10b8d52c0cf04e3554/MSLEditingDomain.java/buggy/org.eclipse.gmf.runtime/plugins/org.eclipse.gmf.runtime.emf.core/src/org/eclipse/gmf/runtime/emf/core/internal/domain/MSLEditingDomain.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
1033,
1086,
1435,
288,
9506,
202,
698,
288,
6862,
202,
896,
3817,
18,
2681,
12,
10259,
1769,
6862,
202,
896,
3817,
18,
542,
1253,
12,
2704,
2685,
12,
45,
1482,
18,
3141,
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,
1875,
202,
482,
1033,
1086,
1435,
288,
9506,
202,
698,
288,
6862,
202,
896,
3817,
18,
2681,
12,
10259,
1769,
6862,
202,
896,
3817,
18,
542,
1253,
12,
2704,
2685,
12,
45,
1482,
18,
3141,
16,
... |
} else if(blockNo < checkBlocks.length) { if(checkBlocks[blockNo-dataBlocks.length] == null) { Logger.error(this, "Block already finished: "+blockNo); | } else if(blockNo < checkBlocks.length + dataBlocks.length) { blockNo -= dataBlocks.length; if(checkBlocks[blockNo] == null) { Logger.error(this, "Check block already finished: "+blockNo); | public synchronized void onFailure(FetchException e, ClientGetState state) { Integer token = (Integer) ((SingleFileFetcher)state).getToken(); int blockNo = token.intValue(); if(blockNo < dataBlocks.length) { if(dataBlocks[blockNo] == null) { Logger.error(this, "Block already finished: "+blockNo); return; } dataBlocks[blockNo] = null; } else if(blockNo < checkBlocks.length) { if(checkBlocks[blockNo-dataBlocks.length] == null) { Logger.error(this, "Block already finished: "+blockNo); return; } checkBlocks[blockNo-dataBlocks.length] = null; } else Logger.error(this, "Unrecognized block number: "+blockNo, new Exception("error")); // :( Logger.minor(this, "Permanently failed: "+state+" on "+this); if(e.isFatal()) fatallyFailedBlocks++; else failedBlocks++; // FIXME this may not be accurate across all the retries? if(e.errorCodes != null) errors.merge(e.errorCodes); else errors.inc(new Integer(e.mode), ((SingleFileFetcher)state).getRetryCount()); if(failedBlocks + fatallyFailedBlocks > (dataBlocks.length + checkBlocks.length - minFetched)) { fail(new FetchException(FetchException.SPLITFILE_ERROR, errors)); } } | 50287 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50287/f1e1ccfc4cacd0065808ad5458fabedc486f2ca2/SplitFileFetcherSegment.java/clean/src/freenet/client/async/SplitFileFetcherSegment.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
27748,
12,
5005,
503,
425,
16,
2445,
967,
1119,
919,
13,
288,
202,
202,
4522,
1147,
273,
261,
4522,
13,
14015,
5281,
812,
16855,
13,
2019,
2934,
588,
1345,
5621,
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,
3852,
918,
27748,
12,
5005,
503,
425,
16,
2445,
967,
1119,
919,
13,
288,
202,
202,
4522,
1147,
273,
261,
4522,
13,
14015,
5281,
812,
16855,
13,
2019,
2934,
588,
1345,
5621,
20... |
if (attributeName.equals(":")) error("XML Namespaces forbids names consisting of a single colon"); | if (attributeName.charAt(0) == ':' || attributeName.charAt(attributeName.length() - 1) == ':') error("not a QName", attributeName); | private void readAttribute(String elementName) throws IOException, XMLStreamException { //System.err.println("readAttribute"); // Read attribute name String attributeName = readNmtoken(true); String type = getAttributeType(elementName, attributeName); readEq(); // Read literal final int flags = LIT_ATTRIBUTE | LIT_ENTITY_REF; String value = (type == null || "CDATA".equals(type)) ? readLiteral(flags) : readLiteral(flags | LIT_NORMALIZE); // add attribute event Attribute attr = this.new Attribute(attributeName, type, true, value); if (namespaceAware) { if (attributeName.equals(":")) error("XML Namespaces forbids names consisting of a single colon"); else if (attributeName.equals("xmlns")) { LinkedHashMap ctx = (LinkedHashMap) namespaces.getFirst(); if (ctx.containsKey(XMLConstants.DEFAULT_NS_PREFIX)) error("duplicate default namespace"); } else if (attributeName.startsWith("xmlns:")) { LinkedHashMap ctx = (LinkedHashMap) namespaces.getFirst(); if (ctx.containsKey(attributeName.substring(6))) error("duplicate namespace", attributeName.substring(6)); } else if (attrs.contains(attr)) error("duplicate attribute", attributeName); } else if (attrs.contains(attr)) error("duplicate attribute", attributeName); if (namespaceAware) { if (!addNamespace(attr)) attrs.add(attr); } else attrs.add(attr); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/27e9978154ebcb2e4d9c4e05e11bf17d1b8e1ef5/XMLParser.java/buggy/core/src/classpath/gnu/gnu/xml/stream/XMLParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
855,
1499,
12,
780,
14453,
13,
565,
1216,
1860,
16,
21526,
225,
288,
565,
368,
3163,
18,
370,
18,
8222,
2932,
896,
1499,
8863,
565,
368,
2720,
1566,
508,
565,
514,
9734,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
855,
1499,
12,
780,
14453,
13,
565,
1216,
1860,
16,
21526,
225,
288,
565,
368,
3163,
18,
370,
18,
8222,
2932,
896,
1499,
8863,
565,
368,
2720,
1566,
508,
565,
514,
9734,
273,... |
{ throw new CachingException("Problem adding entity type " + type + " : " + ex.getMessage()); } | { throw new CachingException("Problem adding entity type " + type, ex); } | private void initializeEntityType(Class type) throws CachingException{ try { EntityTypes.addIfNecessary(type, "Added by ReferenceEntityCache"); } catch (Exception ex) { throw new CachingException("Problem adding entity type " + type + " : " + ex.getMessage()); }} | 1895 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1895/948a50c00c52659556ab3183d5ea2e316077d789/ReferenceEntityCache.java/buggy/source/org/jasig/portal/concurrency/caching/ReferenceEntityCache.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
4046,
22562,
12,
797,
618,
13,
1216,
23782,
21546,
95,
565,
775,
3639,
288,
3887,
2016,
18,
1289,
26034,
12,
723,
16,
315,
8602,
635,
6268,
1943,
1649,
8863,
289,
565,
1044,
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,
3238,
918,
4046,
22562,
12,
797,
618,
13,
1216,
23782,
21546,
95,
565,
775,
3639,
288,
3887,
2016,
18,
1289,
26034,
12,
723,
16,
315,
8602,
635,
6268,
1943,
1649,
8863,
289,
565,
1044,
261,
... |
case CLOSURE: return "closure"; | public static String name(int token) { if (printNames) { switch (token) { case ERROR: return "error"; case EOF: return "eof"; case EOL: return "eol"; case POPV: return "popv"; case ENTERWITH: return "enterwith"; case LEAVEWITH: return "leavewith"; case RETURN: return "return"; case GOTO: return "goto"; case IFEQ: return "ifeq"; case IFNE: return "ifne"; case SETNAME: return "setname"; case BITOR: return "bitor"; case BITXOR: return "bitxor"; case BITAND: return "bitand"; case EQ: return "eq"; case NE: return "ne"; case LT: return "lt"; case LE: return "le"; case GT: return "gt"; case GE: return "ge"; case LSH: return "lsh"; case RSH: return "rsh"; case URSH: return "ursh"; case ADD: return "add"; case SUB: return "sub"; case MUL: return "mul"; case DIV: return "div"; case MOD: return "mod"; case BITNOT: return "bitnot"; case NEG: return "neg"; case NEW: return "new"; case DELPROP: return "delprop"; case TYPEOF: return "typeof"; case NAMEINC: return "nameinc"; case PROPINC: return "propinc"; case ELEMINC: return "eleminc"; case NAMEDEC: return "namedec"; case PROPDEC: return "propdec"; case ELEMDEC: return "elemdec"; case GETPROP: return "getprop"; case SETPROP: return "setprop"; case GETELEM: return "getelem"; case SETELEM: return "setelem"; case CALL: return "call"; case NAME: return "name"; case NUMBER: return "number"; case STRING: return "string"; case ZERO: return "zero"; case ONE: return "one"; case NULL: return "null"; case THIS: return "this"; case FALSE: return "false"; case TRUE: return "true"; case SHEQ: return "sheq"; case SHNE: return "shne"; case CLOSURE: return "closure"; case REGEXP: return "object"; case POP: return "pop"; case POS: return "pos"; case VARINC: return "varinc"; case VARDEC: return "vardec"; case BINDNAME: return "bindname"; case THROW: return "throw"; case IN: return "in"; case INSTANCEOF: return "instanceof"; case GETTHIS: return "getthis"; case NEWTEMP: return "newtemp"; case USETEMP: return "usetemp"; case GETBASE: return "getbase"; case GETVAR: return "getvar"; case SETVAR: return "setvar"; case UNDEFINED: return "undefined"; case TRY: return "try"; case NEWSCOPE: return "newscope"; case TYPEOFNAME: return "typeofname"; case ENUMINIT: return "enuminit"; case ENUMNEXT: return "enumnext"; case THISFN: return "thisfn"; case SEMI: return "semi"; case LB: return "lb"; case RB: return "rb"; case LC: return "lc"; case RC: return "rc"; case LP: return "lp"; case RP: return "rp"; case COMMA: return "comma"; case ASSIGN: return "assign"; case HOOK: return "hook"; case COLON: return "colon"; case OR: return "or"; case AND: return "and"; case EQOP: return "eqop"; case RELOP: return "relop"; case SHOP: return "shop"; case UNARYOP: return "unaryop"; case INC: return "inc"; case DEC: return "dec"; case DOT: return "dot"; case PRIMARY: return "primary"; case FUNCTION: return "function"; case EXPORT: return "export"; case IMPORT: return "import"; case IF: return "if"; case ELSE: return "else"; case SWITCH: return "switch"; case CASE: return "case"; case DEFAULT: return "default"; case WHILE: return "while"; case DO: return "do"; case FOR: return "for"; case BREAK: return "break"; case CONTINUE: return "continue"; case VAR: return "var"; case WITH: return "with"; case CATCH: return "catch"; case FINALLY: return "finally"; case RESERVED: return "reserved"; case NOP: return "nop"; case NOT: return "not"; case PRE: return "pre"; case POST: return "post"; case VOID: return "void"; case BLOCK: return "block"; case ARRAYLIT: return "arraylit"; case OBJLIT: return "objlit"; case LABEL: return "label"; case TARGET: return "target"; case LOOP: return "loop"; case ENUMDONE: return "enumdone"; case EXPRSTMT: return "exprstmt"; case PARENT: return "parent"; case CONVERT: return "convert"; case JSR: return "jsr"; case NEWLOCAL: return "newlocal"; case USELOCAL: return "uselocal"; case SCRIPT: return "script"; } return "<unknown="+token+">"; } return ""; } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/e7e3848925d289272caa163d4d470f03f2eebac5/Token.java/buggy/src/org/mozilla/javascript/Token.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
508,
12,
474,
1147,
13,
565,
288,
3639,
309,
261,
1188,
1557,
13,
288,
5411,
1620,
261,
2316,
13,
288,
7734,
648,
5475,
30,
6647,
327,
315,
1636,
14432,
7734,
648,
6431,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
508,
12,
474,
1147,
13,
565,
288,
3639,
309,
261,
1188,
1557,
13,
288,
5411,
1620,
261,
2316,
13,
288,
7734,
648,
5475,
30,
6647,
327,
315,
1636,
14432,
7734,
648,
6431,... | |
imageBrowser.setSelectImageUrlCommand( new ImageBrowser.SelectImageCommand() { | imageBrowser.setSelectImageUrlCommand( new ImageBrowser.SelectImageUrlCommand() { | private void goToImageBrowser( final TextDocumentDomainObject document, final int imageIndex, final ImageDomainObject image, final HttpServletRequest request, final HttpServletResponse response ) throws IOException, ServletException { ImageBrowser imageBrowser = new ImageBrowser(); imageBrowser.setCancelCommand( new WebComponent.CancelCommand() { public void cancel( HttpServletRequest request, HttpServletResponse response ) throws IOException, ServletException { goToImageEditPage( document, imageIndex, image, request, response ); } } ); imageBrowser.setSelectImageUrlCommand( new ImageBrowser.SelectImageCommand() { public void selectImageUrl( String imageUrl, HttpServletRequest request, HttpServletResponse response ) throws IOException, ServletException { image.setUrl( imageUrl ); goToImageEditPage( document, imageIndex, image, request, response ); } } ); imageBrowser.forward( request, response ); } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/3563b6ead25362e9e533bac87c6b07f3daf86a2c/ChangeImage.java/clean/server/src/com/imcode/imcms/servlet/admin/ChangeImage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1960,
774,
2040,
9132,
12,
727,
3867,
2519,
3748,
921,
1668,
16,
727,
509,
1316,
1016,
16,
4766,
282,
727,
3421,
3748,
921,
1316,
16,
727,
9984,
590,
16,
4766,
282,
727,
1244... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1960,
774,
2040,
9132,
12,
727,
3867,
2519,
3748,
921,
1668,
16,
727,
509,
1316,
1016,
16,
4766,
282,
727,
3421,
3748,
921,
1316,
16,
727,
9984,
590,
16,
4766,
282,
727,
1244... |
return query.weight(this).explain(reader, doc); | return explain(query.weight(this), doc); | public Explanation explain(Query query, int doc) throws IOException { return query.weight(this).explain(reader, doc); } | 1514 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1514/e4bd7151061f409e2881de2fd0cde649af13e7c5/IndexSearcher.java/buggy/src/java/org/apache/lucene/search/IndexSearcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1312,
15854,
19765,
12,
1138,
843,
16,
509,
997,
13,
1216,
1860,
288,
565,
327,
19765,
12,
2271,
18,
4865,
12,
2211,
3631,
997,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1312,
15854,
19765,
12,
1138,
843,
16,
509,
997,
13,
1216,
1860,
288,
565,
327,
19765,
12,
2271,
18,
4865,
12,
2211,
3631,
997,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-1... |
break; | public void handleDebugEvents( ICDIEvent[] events ) { for( int i = 0; i < events.length; i++ ) { ICDIEvent event = events[i]; if ( event instanceof ICDIResumedEvent ) { if ( event.getSource() instanceof ICDITarget && getCDITarget().equals( event.getSource() ) ) { setChanged( false ); } break; } } super.handleDebugEvents( events ); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/8ce89a5cc0191d67768796ff25ad17cc33c47d49/CExpression.java/buggy/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CExpression.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
2829,
3783,
12,
26899,
2565,
1133,
8526,
2641,
262,
288,
202,
202,
1884,
12,
509,
277,
273,
374,
31,
277,
411,
2641,
18,
2469,
31,
277,
9904,
262,
288,
1082,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
2829,
3783,
12,
26899,
2565,
1133,
8526,
2641,
262,
288,
202,
202,
1884,
12,
509,
277,
273,
374,
31,
277,
411,
2641,
18,
2469,
31,
277,
9904,
262,
288,
1082,
202,
... | |
MylarTasklistPlugin.Report_Open_Mode mode = MylarTasklistPlugin.getDefault().getReportMode(); if (mode == MylarTasklistPlugin.Report_Open_Mode.EDITOR) { | MylarTasklistPlugin.ReportOpenMode mode = MylarTasklistPlugin.getDefault().getReportMode(); if (mode == MylarTasklistPlugin.ReportOpenMode.EDITOR) { | public void run() { MylarTasklistPlugin.Report_Open_Mode mode = MylarTasklistPlugin.getDefault().getReportMode(); if (mode == MylarTasklistPlugin.Report_Open_Mode.EDITOR) { try{ if(!isBugDownloaded()){ input.getBugTask().downloadReport(); input.setOfflineBug(input.getBugTask().getBugReport()); } // get the active workbench page IWorkbenchPage page = MylarTasklistPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage(); // if we couldn't get the page, get out of here if (page == null) return; // try to open an editor on the input bug //page.openEditor(input, IBugzillaConstants.EXISTING_BUG_EDITOR_ID); page.openEditor(input, "org.eclipse.mylar.bugzilla.ui.tasklist.bugzillaTaskEditor"); } catch (Exception ex) { MylarPlugin.log(ex, "couldn't open bugzilla task"); return; } } else if (mode == MylarTasklistPlugin.Report_Open_Mode.INTERNAL_BROWSER) { BugzillaUITools.openUrl(getBugUrl()); } } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/4745d35e1a310e1f91a58a69bec98686cc6c269a/BugzillaTask.java/clean/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTask.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4697,
202,
482,
918,
1086,
1435,
288,
6862,
25083,
202,
12062,
7901,
2174,
1098,
3773,
18,
4820,
67,
3678,
67,
2309,
1965,
273,
8005,
7901,
2174,
1098,
3773,
18,
588,
1868,
7675,
588,
4820,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4697,
202,
482,
918,
1086,
1435,
288,
6862,
25083,
202,
12062,
7901,
2174,
1098,
3773,
18,
4820,
67,
3678,
67,
2309,
1965,
273,
8005,
7901,
2174,
1098,
3773,
18,
588,
1868,
7675,
588,
4820,
23... |
tablecolumn[column_number].setWidth(strmax+20); | tablecolumn[column_number].setWidth(strmax+40); | private void editText(TableItem row, int rownr, int colnr, boolean select_text, char extra) { before_edit = getItemText(row); field_changed = false; if (columns[colnr-1].isReadOnly()) { return; } if (text!=null && !text.isDisposed()) text.dispose(); if (columns[colnr-1].getSelectionAdapter()!=null) { Event e = new Event(); e.widget=this; e.x = colnr; e.y = rownr; columns[colnr-1].getSelectionAdapter().widgetSelected(new SelectionEvent(e)); return; } text = new Text(table, SWT.NONE); props.setLook(text, Props.WIDGET_STYLE_TABLE); text.addTraverseListener(lsTraverse); text.addFocusListener(lsFocusText); String content = row.getText(colnr) + (extra!=0?""+extra:""); text.setText(content); if (lsMod!=null) text.addModifyListener(lsMod); text.addModifyListener(lsUndo); String tooltip = columns[colnr-1].getToolTip(); if (tooltip!=null) text.setToolTipText(tooltip); else text.setToolTipText(""); text.setSelection(content.length()); // last_carret_position = content.length(); text.addKeyListener(lsKeyText); // Make the column larger so we can still see the string we're entering... final int column_number = colnr; text.addModifyListener ( new ModifyListener() { public void modifyText(ModifyEvent me) { String str = text.getText(); int strmax = dummy_gc.textExtent(str, SWT.DRAW_TAB | SWT.DRAW_DELIMITER).x+5; int colmax = tablecolumn[column_number].getWidth(); if (strmax>colmax) { tablecolumn[column_number].setWidth(strmax+20); // On linux, this causes the text to select everything... // This is because the focus is lost and re-gained. Nothing we can do about it now. } } } ); int width = tablecolumn[colnr].getWidth(); int height = 30; editor.horizontalAlignment = SWT.LEFT; editor.grabHorizontal = true; if (select_text) text.selectAll(); // Open the text editor in the correct column of the selected row. editor.setEditor (text, row, colnr ); text.setFocus(); text.setSize(width, height); editor.layout(); } | 9547 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9547/2da274c3ab95467ef20dea6b23b670d5fa6394e5/TableView.java/clean/src/be/ibridge/kettle/core/widget/TableView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3874,
1528,
12,
1388,
1180,
1027,
16,
509,
1027,
11611,
16,
509,
645,
11611,
16,
1250,
2027,
67,
955,
16,
1149,
2870,
13,
202,
95,
202,
202,
5771,
67,
4619,
273,
8143,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3874,
1528,
12,
1388,
1180,
1027,
16,
509,
1027,
11611,
16,
509,
645,
11611,
16,
1250,
2027,
67,
955,
16,
1149,
2870,
13,
202,
95,
202,
202,
5771,
67,
4619,
273,
8143,
... |
Object v = (Object)this.valueForBinding("showRecordGroupHeadings"); if (ERXValueUtilities.booleanValue(v)) { _showRecordGroupHeadings = "true"; }else { _showRecordGroupHeadings = "false"; } | _showRecordGroupHeadings = booleanValueForBinding("showRecordGroupHeadings"); | public String showRecordGroupHeadings() { if (_showRecordGroupHeadings == null) { if (!this.hasBinding("showRecordGroupHeadings")) { _showRecordGroupHeadings = "true"; } else { Object v = (Object)this.valueForBinding("showRecordGroupHeadings"); if (ERXValueUtilities.booleanValue(v)) { _showRecordGroupHeadings = "true"; }else { _showRecordGroupHeadings = "false"; } } } return _showRecordGroupHeadings; } | 50512 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50512/9b2a0d1461b252ec2c44fbef420bfa6a4c72ef46/WRReport.java/buggy/DynaReporting/Frameworks/WRReporting/Sources/er/reporting/WRReport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2405,
2115,
1114,
1414,
899,
1435,
288,
3639,
309,
261,
67,
4500,
2115,
1114,
1414,
899,
422,
446,
13,
288,
5411,
309,
16051,
2211,
18,
5332,
5250,
2932,
4500,
2115,
1114,
1414... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2405,
2115,
1114,
1414,
899,
1435,
288,
3639,
309,
261,
67,
4500,
2115,
1114,
1414,
899,
422,
446,
13,
288,
5411,
309,
16051,
2211,
18,
5332,
5250,
2932,
4500,
2115,
1114,
1414... |
container.dispose(); | if (container != null) { container.dispose(); } | public void contextDestroyed(ServletContextEvent event) { ServletContext application = event.getServletContext(); ComponentManager container = (ComponentManager) application.getAttribute("DefaultComponentManager"); container.dispose(); } | 22725 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/22725/3e766d7e84caa9d3fc73b65a8523dcbcaad52580/ApplicationLifecycleListener.java/clean/src/java/com/opensymphony/webwork/lifecycle/ApplicationLifecycleListener.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
819,
28414,
12,
4745,
1042,
1133,
871,
13,
288,
3639,
22717,
2521,
273,
871,
18,
588,
4745,
1042,
5621,
3639,
5435,
1318,
1478,
273,
261,
1841,
1318,
13,
2521,
18,
588,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
819,
28414,
12,
4745,
1042,
1133,
871,
13,
288,
3639,
22717,
2521,
273,
871,
18,
588,
4745,
1042,
5621,
3639,
5435,
1318,
1478,
273,
261,
1841,
1318,
13,
2521,
18,
588,
1499,
... |
public StringBuilder objectRenderer(Object o, String index, Part p) throws MessagingException { StringBuilder buf=new StringBuilder(); try { if (o instanceof MimeMultipart) { MimeMultipart mm_i=(MimeMultipart) o; StringBuilder sb=decend(mm_i, index); buf.append(sb); } else if (o instanceof IMAPNestedMessage) { Object o_1=((Message) o).getContent(); if (o_1 instanceof String) { String s=(String) o_1; buf.append("<br>\n<hr>\n<br>\n"); Message m=new MimeMessage( Session.getInstance(new Properties()), new ByteArrayInputStream(s.getBytes())); buf.append(objectRenderer(m, index, m)); } else if (o_1 instanceof MimeMultipart) { buf.append(new RenderMessage().objectRenderer( (Message) o, index, (Message) o, this)); } } else { ObjectRender or=renderers.get(o.getClass()); if (or==null) { Set<Class> classes=renderers.keySet(); for (Class c : classes) { if (c.isAssignableFrom(o.getClass())) { or=renderers.get(c); break; } } } if (or==null) { buf.append(makeAttachmentBox(index, p)); } else { buf.append(or.objectRenderer(o, index, p, this)); } } } catch (IOException ioe) { throw new MessagingException("I/O error", ioe); } return buf; } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/b13c667b376deb4a8f2c235ffd847b57616d23c4/Renderer.java/clean/grendel/sources/grendel/renderer/Renderer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3225,
733,
6747,
12,
921,
320,
16,
514,
770,
16,
6393,
293,
13,
1171,
9079,
1216,
23794,
503,
225,
288,
565,
3225,
1681,
33,
2704,
3225,
5621,
565,
775,
288,
1377,
309,
261,
83,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3225,
733,
6747,
12,
921,
320,
16,
514,
770,
16,
6393,
293,
13,
1171,
9079,
1216,
23794,
503,
225,
288,
565,
3225,
1681,
33,
2704,
3225,
5621,
565,
775,
288,
1377,
309,
261,
83,
... | ||
return new Node(TokenStream.SWITCH, new Integer(lineno)); | return new Node(TokenStream.SWITCH, lineno); | public Object createSwitch(int lineno) { return new Node(TokenStream.SWITCH, new Integer(lineno)); } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/dfdc492a06d12db18bbb6e0ac0de6e19784f642d/IRFactory.java/buggy/js/rhino/src/org/mozilla/javascript/IRFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
752,
10200,
12,
474,
7586,
13,
288,
3639,
327,
394,
2029,
12,
1345,
1228,
18,
18746,
25588,
16,
7586,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
752,
10200,
12,
474,
7586,
13,
288,
3639,
327,
394,
2029,
12,
1345,
1228,
18,
18746,
25588,
16,
7586,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
lastAvceToken = lastAvceToken.substring( 0, lastAvceToken.length() - ".jar".length() ); avceTokenList.addLast( lastAvceToken ); } else if ( lastAvceToken.endsWith( ".zip" ) ) { type = "distribution-zip"; lastAvceToken = lastAvceToken.substring( 0, lastAvceToken.length() - ".zip".length() ); avceTokenList.addLast( lastAvceToken ); | classifier = "sources"; remainingFilename = remainingFilename.substring( 0, remainingFilename.length() - "-sources.jar".length() ); | private Artifact buildArtifact( File repositoryBase, String path, ArtifactRepository repository ) { StringTokenizer tokens = new StringTokenizer( path, "/\\" ); Artifact result = null; int numberOfTokens = tokens.countTokens(); if ( numberOfTokens != 3 ) { addKickedOutPath( path ); } else { String groupId = tokens.nextToken(); String type = tokens.nextToken(); if ( !type.endsWith( "s" ) ) { addKickedOutPath( path ); } else { type = type.substring( 0, type.length() - 1 ); // contains artifactId, version, classifier, and extension. String avceGlob = tokens.nextToken(); LinkedList avceTokenList = new LinkedList(); StringTokenizer avceTokenizer = new StringTokenizer( avceGlob, "-" ); while ( avceTokenizer.hasMoreTokens() ) { avceTokenList.addLast( avceTokenizer.nextToken() ); } String lastAvceToken = (String) avceTokenList.removeLast(); boolean valid = true; // TODO: share with other discoverer, use artifact handlers instead if ( lastAvceToken.endsWith( ".tar.gz" ) ) { type = "distribution-tgz"; lastAvceToken = lastAvceToken.substring( 0, lastAvceToken.length() - ".tar.gz".length() ); avceTokenList.addLast( lastAvceToken ); } else if ( lastAvceToken.endsWith( "sources.jar" ) ) { type = "java-source"; lastAvceToken = lastAvceToken.substring( 0, lastAvceToken.length() - ".jar".length() ); avceTokenList.addLast( lastAvceToken ); } else if ( lastAvceToken.endsWith( ".zip" ) ) { type = "distribution-zip"; lastAvceToken = lastAvceToken.substring( 0, lastAvceToken.length() - ".zip".length() ); avceTokenList.addLast( lastAvceToken ); } else { int extPos = lastAvceToken.lastIndexOf( '.' ); if ( extPos > 0 ) { String ext = lastAvceToken.substring( extPos + 1 ); if ( type.equals( ext ) ) { lastAvceToken = lastAvceToken.substring( 0, extPos ); avceTokenList.addLast( lastAvceToken ); } else { addKickedOutPath( path ); valid = false; } } else { // no extension addKickedOutPath( path ); valid = false; } } if ( valid ) { // let's discover the version, and whatever's leftover will be either // a classifier, or part of the artifactId, depending on position. // Since version is at the end, we have to move in from the back. Collections.reverse( avceTokenList ); // TODO: this is obscene - surely a better way? String validVersionParts = "([Dd][Ee][Vv][_.0-9]*)|" + "([Ss][Nn][Aa][Pp][Ss][Hh][Oo][Tt])|" + "([0-9][_.0-9a-zA-Z]*)|" + "([Gg]?[_.0-9ab]*([Pp][Rr][Ee]|[Rr][Cc]|[Gg]|[Mm])[_.0-9]*)|" + "([Aa][Ll][Pp][Hh][Aa][_.0-9]*)|" + "([Bb][Ee][Tt][Aa][_.0-9]*)|" + "([Rr][Cc][_.0-9]*)|" + "([Tt][Ee][Ss][Tt][_.0-9]*)|" + "([Dd][Ee][Bb][Uu][Gg][_.0-9]*)|" + "([Uu][Nn][Oo][Ff][Ff][Ii][Cc][Ii][Aa][Ll][_.0-9]*)|" + "([Cc][Uu][Rr][Rr][Ee][Nn][Tt])|" + "([Ll][Aa][Tt][Ee][Ss][Tt])|" + "([Ff][Cc][Ss])|" + "([Rr][Ee][Ll][Ee][Aa][Ss][Ee][_.0-9]*)|" + "([Nn][Ii][Gg][Hh][Tt][Ll][Yy])|" + "([AaBb][_.0-9]*)"; StringBuffer classifierBuffer = new StringBuffer(); StringBuffer versionBuffer = new StringBuffer(); boolean firstVersionTokenEncountered = false; boolean firstToken = true; int tokensIterated = 0; for ( Iterator it = avceTokenList.iterator(); it.hasNext(); ) { String token = (String) it.next(); boolean tokenIsVersionPart = token.matches( validVersionParts ); StringBuffer bufferToUpdate; // NOTE: logic in code is reversed, since we're peeling off the back // Any token after the last versionPart will be in the classifier. // Any token UP TO first non-versionPart is part of the version. if ( !tokenIsVersionPart ) { if ( firstVersionTokenEncountered ) { //noinspection BreakStatement break; } else { bufferToUpdate = classifierBuffer; } } else { firstVersionTokenEncountered = true; bufferToUpdate = versionBuffer; } if ( firstToken ) { firstToken = false; } else { bufferToUpdate.insert( 0, '-' ); } bufferToUpdate.insert( 0, token ); tokensIterated++; } getLogger().debug( "After parsing loop, state of buffers:\no Version Buffer: \'" + versionBuffer + "\'\no Classifier Buffer: \'" + classifierBuffer + "\'\no Number of Tokens Iterated: " + tokensIterated ); // Now, restore the proper ordering so we can build the artifactId. Collections.reverse( avceTokenList ); getLogger().debug( "Before repairing bad version and/or cleaning up used tokens, avce token list is:\n" + avceTokenList ); // if we didn't find a version, then punt. Use the last token // as the version, and set the classifier empty. if ( versionBuffer.length() < 1 ) { if ( avceTokenList.size() > 1 ) { int lastIdx = avceTokenList.size() - 1; versionBuffer.append( avceTokenList.get( lastIdx ) ); avceTokenList.remove( lastIdx ); } else { getLogger().debug( "Cannot parse version from artifact path: \'" + path + "\'." ); getLogger().debug( "artifact-version-classifier-extension remaining tokens is: \'" + avceTokenList + "\'" ); } classifierBuffer.setLength( 0 ); } else { getLogger().debug( "Removing " + tokensIterated + " tokens from avce token list." ); // if everything is kosher, then pop off all the classifier and // version tokens, leaving the naked artifact id in the list. avceTokenList = new LinkedList( avceTokenList.subList( 0, avceTokenList.size() - tokensIterated ) ); } getLogger().debug( "Now, remainder of avce token list is:\n" + avceTokenList ); StringBuffer artifactIdBuffer = new StringBuffer(); firstToken = true; for ( Iterator it = avceTokenList.iterator(); it.hasNext(); ) { String token = (String) it.next(); if ( firstToken ) { firstToken = false; } else { artifactIdBuffer.append( '-' ); } artifactIdBuffer.append( token ); } String artifactId = artifactIdBuffer.toString(); int lastVersionCharIdx = versionBuffer.length() - 1; if ( lastVersionCharIdx > -1 && versionBuffer.charAt( lastVersionCharIdx ) == '-' ) { versionBuffer.setLength( lastVersionCharIdx ); } String version = versionBuffer.toString(); if ( version.length() < 1 ) { addKickedOutPath( path ); } else { getLogger().debug( "Extracted artifact information from path:\n" + "groupId: \'" + groupId + "\'\n" + "artifactId: \'" + artifactId + "\'\n" + "type: \'" + type + "\'\n" + "version: \'" + version + "\'\n" + "classifier: \'" + classifierBuffer + "\'" ); if ( classifierBuffer.length() > 0 ) { getLogger().debug( "Creating artifact with classifier." ); result = artifactFactory.createArtifactWithClassifier( groupId, artifactId, version, type, classifierBuffer.toString() ); } else { result = artifactFactory.createArtifact( groupId, artifactId, version, Artifact.SCOPE_RUNTIME, type ); } result.setRepository( repository ); result.setFile( new File( repositoryBase, path ) ); } } } } return result; } | 28441 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28441/8ba07b951346c1164f86f40925cd01dee32bbbef/LegacyArtifactDiscoverer.java/clean/maven-repository-discovery/src/main/java/org/apache/maven/repository/discovery/LegacyArtifactDiscoverer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
14022,
1361,
7581,
12,
1387,
3352,
2171,
16,
514,
589,
16,
14022,
3305,
3352,
262,
565,
288,
3639,
16370,
2430,
273,
394,
16370,
12,
589,
16,
2206,
27576,
11272,
3639,
14022,
563,
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,
14022,
1361,
7581,
12,
1387,
3352,
2171,
16,
514,
589,
16,
14022,
3305,
3352,
262,
565,
288,
3639,
16370,
2430,
273,
394,
16370,
12,
589,
16,
2206,
27576,
11272,
3639,
14022,
563,
2... |
System.out.println ("invalid compilation spec: <packdepency> without name attribute"); | System.out.println( "invalid compilation spec: <packdepency> without name attribute"); | private CompilationJob collectJobsRecursive (XMLElement node, ArrayList classpath) throws Exception { Enumeration toplevel_tags = node.enumerateChildren (); ArrayList ourclasspath = (ArrayList)classpath.clone (); ArrayList files = new ArrayList(); while (toplevel_tags.hasMoreElements ()) { XMLElement child = (XMLElement)toplevel_tags.nextElement (); if (child.getName ().equals ("classpath")) { changeClassPath (ourclasspath, child); } else if (child.getName ().equals ("job")) { CompilationJob subjob = collectJobsRecursive (child, ourclasspath); if (subjob != null) this.jobs.add (subjob); } else if (child.getName().equals ("directory")) { String name = child.getAttribute ("name"); if (name != null) { // substitute variables String finalname = this.vs.substitute (name, "plain"); files.addAll (scanDirectory (new File (finalname))); } } else if (child.getName().equals ("file")) { String name = child.getAttribute ("name"); if (name != null) { // substitute variables String finalname = this.vs.substitute (name, "plain"); files.add (new File (finalname)); } } else if (child.getName().equals ("packdepency")) { String name = child.getAttribute ("name"); if (name == null) { System.out.println ("invalid compilation spec: <packdepency> without name attribute"); return null; } // check whether the wanted pack was selected for installation Iterator pack_it = this.idata.selectedPacks.iterator(); boolean found = false; while (pack_it.hasNext()) { com.izforge.izpack.Pack pack = (com.izforge.izpack.Pack)pack_it.next(); if (pack.name.equals (name)) { found = true; break; } } if (! found) { Debug.trace ("skipping job because pack " + name + " was not selected."); return null; } } } if (files.size() > 0) return new CompilationJob (this.handler, this.idata.langpack, (String)node.getAttribute ("name"), files, ourclasspath); return null; } | 58440 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58440/47db88bfea6b64e47a33aa3c937b2ce6e8640d56/CompileWorker.java/buggy/izpack-src/trunk/src/lib/com/izforge/izpack/installer/CompileWorker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
22416,
2278,
3274,
7276,
10483,
261,
15223,
756,
16,
2407,
10006,
13,
565,
1216,
1185,
225,
288,
565,
13864,
28999,
67,
4156,
273,
756,
18,
7924,
12600,
4212,
261,
1769,
565,
2407,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
22416,
2278,
3274,
7276,
10483,
261,
15223,
756,
16,
2407,
10006,
13,
565,
1216,
1185,
225,
288,
565,
13864,
28999,
67,
4156,
273,
756,
18,
7924,
12600,
4212,
261,
1769,
565,
2407,
... |
int curBits = lastAuthPart < rounds-1 ? EntropyBitsPerRound : (nonce.length * 8 - EntropyBitsPerRound * (rounds-1)); | int curBits = (receivedDelays.length * 8) - (EntropyBitsPerRound * lastAuthPart) % (receivedDelays.length * 8) >= EntropyBitsPerRound ? EntropyBitsPerRound : (receivedDelays.length * 8) - (EntropyBitsPerRound * lastAuthPart) % (receivedDelays.length * 8); | private boolean handleDongleCommunication(byte[] nonce, byte[] sentRfMessage, int rounds, byte[] receivedDelays, byte[] receivedRfMessage) throws DongleAuthenticationProtocolException, InternalApplicationException { // first check the parameters if (remoteRelateId < 0) throw new DongleAuthenticationProtocolException("Remote relate id must be >= 0."); if (nonce == null || nonce.length != NonceByteLength) throw new DongleAuthenticationProtocolException("Expecting random nonce with a length of " + NonceByteLength + " Bytes."); if (sentRfMessage == null || sentRfMessage.length != NonceByteLength) throw new DongleAuthenticationProtocolException("Expecting RF message with a length of " + NonceByteLength + " Bytes."); if (receivedRfMessage == null || receivedRfMessage.length != NonceByteLength) throw new DongleAuthenticationProtocolException("Received RF message will have " + NonceByteLength + " Bytes, expecting pre-allocated array."); if (rounds < 2) throw new DongleAuthenticationProtocolException("Need at least 2 rounds for the interlock protocol to be secure."); SerialConnector serialConn = SerialConnector.getSerialConnector(); // fetch our own relate id from the serial connector (which must be connected by now) if (! serialConn.isOperational()) throw new InternalApplicationException("Error: connection to dongle has not yet been established!"); int localRelateId = serialConn.getLocalRelateId(); if (localRelateId == -1) throw new InternalApplicationException("Error: local relate id is reported as -1, which is an error case!!"); // This message queue is used to receive events from the dongle. MessageQueue eventQueue = new MessageQueue(); serialConn.registerEventQueue(eventQueue); // start measuring the time for authentication noew long startTime = System.currentTimeMillis(); // construct the start-of-authentication message and sent it to the dongle if (!serialConn.startAuthenticationWith(remoteRelateId, nonce, sentRfMessage, rounds, EntropyBitsPerRound)) { logger.error("ERROR: could not send start-of-authentication packet to dongle"); raiseAuthenticationFailureEvent(new Integer(remoteRelateId), null, "Unable to send start-of-authentication packet to dongle."); return false; } raiseAuthenticationProgressEvent(new Integer(remoteRelateId), 2, AuthenticationStages + rounds, "Initiated authentication mode in dongle"); // and wait for the measurements and authentication data to be received int lastAuthPart = -1, lastCompletedRound = -1; BitSet receivedRoundsRF = new BitSet(rounds), receivedRoundsUS = new BitSet(rounds); int messageBitsPerRound = (sentRfMessage.length * 8) / rounds; if (sentRfMessage.length * 8 > messageBitsPerRound * rounds) messageBitsPerRound++; logger.info("Transmitting " + messageBitsPerRound + " bits of the RF message each round"); while (lastCompletedRound < rounds-1) { while (eventQueue.isEmpty()) eventQueue.waitForMessage(500); RelateEvent e = (RelateEvent) eventQueue.getMessage(); if (e == null) { logger.warn("Warning: got null message out of message queue! This should not happen."); continue; } if (e.getType() == RelateEvent.AUTHENTICATION_INFO && e.getDevice().getId() == remoteRelateId) { // sanity check if (e.round > rounds) { logger.warn("Ignoring received authentication part for round number " + e.round + ", only expected " + rounds + " rounds"); continue; } // check if we already got that round - only use the first packet so to ignore any ack-only packets if (receivedRoundsRF.get(e.round-1)) { logger.info("Ignoring received authentication part for round " + e.round + " since it was already received earlier."); continue; } receivedRoundsRF.set(e.round-1, true); // if it is the last round, it might have less bits int curBits = e.round < rounds ? messageBitsPerRound : (sentRfMessage.length * 8 - messageBitsPerRound * (rounds-1)); // authentication info event: just remember the bits received with it addPart(receivedRfMessage, e.authenticationPart, (e.round-1) * messageBitsPerRound, curBits); lastAuthPart = e.round-1; logger.info("Received authentication part from dongle " + remoteRelateId + ": round " + e.round + (e.ack ? " with" : " without") + " ack out of " + rounds + " (" + curBits + " bits): " + SerialConnector.byteArrayToHexString(e.authenticationPart)); } else if (e.getType() == RelateEvent.NEW_MEASUREMENT && e.getMeasurement().getRelatum() == localRelateId && e.getMeasurement().getId() == remoteRelateId) { if (e.getMeasurement().getTransducers() == 0) { logger.debug("Discarding invalid measurement in authentication mode: 0 valid transducers."); continue; } if (e.getMeasurement().getDistance() == 4094) { logger.debug("Discarding invalid measurement in authentication mode: reported by dongle"); continue; } // sanity check if (lastAuthPart >= rounds) { logger.warn("Ignoring received delayed measurement for round number " + (lastCompletedRound+1) + ", only expected " + rounds + " rounds"); continue; } // even more sanity... if (lastAuthPart < 0) { logger.info("Got measurement event before getting an authentication packet - ignoring"); continue; } // check if we already got that round - only use the first packet so to ignore any ack-only packets if (receivedRoundsUS.get(lastAuthPart)) { logger.info("Ignoring received delayed measurement for round " + (lastCompletedRound+1) + " since it was already received earlier."); continue; } receivedRoundsUS.set(lastAuthPart, true); // measurement event for the authentication partner: re-use the round from the authentication info event int delayedMeasurement = (int) e.getMeasurement().getDistance(); // still do a sanity check (within our accuracy range) if (delayedMeasurement - referenceMeasurement <= -(1 << EntropyBitsOffset)) { logger.debug("Discarding invalid measurement in authentication mode: smaller than reference"); continue; } // first extract the delay bits (since it is delayed, it is guaranteed to be longer than the reference) // WATCHME: at the moment we use only 3 bits, but that might change.... // if it's negative because of noise, we'll just get the 2's complement, so correct that byte delay = (byte) Math.abs((delayedMeasurement - referenceMeasurement) >> EntropyBitsOffset); // special case: a bit error can carry over if ((delayedMeasurement & 0x80) != 0) delay++; delay--; // if it is the last round, it might have less bits int curBits = lastAuthPart < rounds-1 ? EntropyBitsPerRound : (nonce.length * 8 - EntropyBitsPerRound * (rounds-1)); // and add to the receivedNonce for later comparison addPart(receivedDelays, new byte[] {delay}, lastAuthPart * EntropyBitsPerRound, curBits); lastCompletedRound = lastAuthPart; logger.info("Received delayed measurement to dongle " + remoteRelateId + ": " + delayedMeasurement + ", delay in mm=" + (delayedMeasurement-referenceMeasurement) + ", computed nonce part from delay: " + (delay /*& 0x07*/) + " " + SerialConnector.byteArrayToBinaryString(new byte[] {delay})); raiseAuthenticationProgressEvent(new Integer(remoteRelateId), 3 + lastCompletedRound+1, AuthenticationStages + rounds, "Got delayed measurement at round " + (lastCompletedRound+1)); } } // and stop measuring now logger.info("Dongle authentication protocol took " + (System.currentTimeMillis() - startTime) + " ms."); serialConn.unregisterEventQueue(eventQueue); // check if everything has been received correctly if (receivedRoundsRF.nextClearBit(0) < rounds) { logger.error("ERROR: Did not receive all required authentication parts from remote dongle, first missing is round " + (receivedRoundsRF.nextClearBit(0)+1)); logger.error(receivedRoundsRF); return false; } if (receivedRoundsUS.nextClearBit(0) < rounds) { logger.error("ERROR: Did not receive all required delayed measurements from remote dongle, first missing is round " + (receivedRoundsUS.nextClearBit(0)+1)); logger.error(receivedRoundsUS); return false; } return true; } | 14316 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14316/57f47e7a924ea95bd5737f721cae9fefb4477de3/DongleProtocolHandler.java/clean/src/org/eu/mayrhofer/authentication/DongleProtocolHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
1640,
40,
932,
298,
25219,
12,
7229,
8526,
7448,
16,
1160,
8526,
3271,
54,
74,
1079,
16,
1875,
202,
474,
21196,
16,
1160,
8526,
5079,
6763,
87,
16,
1160,
8526,
5079,
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,
225,
202,
1152,
1250,
1640,
40,
932,
298,
25219,
12,
7229,
8526,
7448,
16,
1160,
8526,
3271,
54,
74,
1079,
16,
1875,
202,
474,
21196,
16,
1160,
8526,
5079,
6763,
87,
16,
1160,
8526,
5079,
54... |
getApplicationInstance().getDefaultWindow().getContent().add(createComponentSamplerModalTestWindow()); } | contentColumn.removeAll(); } | public void actionPerformed(ActionEvent e) { getApplicationInstance().getDefaultWindow().getContent().add(createComponentSamplerModalTestWindow()); } | 45635 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45635/fd9bc16d551c9fcb879b732a7062c0bd86fa58b4/WindowPaneTest.java/buggy/src/testapp/interactive/java/nextapp/echo2/testapp/interactive/testscreen/WindowPaneTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
5397,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
13491,
9615,
1442,
7675,
588,
1868,
3829,
7675,
588,
1350,
7675,
1289,
12,
2640,
1841,
26243,
20191,
4709,
3829,
10663,
10792,
289,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5397,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
13491,
9615,
1442,
7675,
588,
1868,
3829,
7675,
588,
1350,
7675,
1289,
12,
2640,
1841,
26243,
20191,
4709,
3829,
10663,
10792,
289,
2,
-100,... |
TaskRepository repository = new TaskRepository(BugzillaCorePlugin.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_222_URL); RepositoryTaskData report = new RepositoryTaskData(attributeFactory, BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), bugid); BugzillaServerFacade.setupExistingBugAttributes(repository.getUrl(), report); factory.populateReport(report, repository.getUrl(), null, repository.getUserName(), repository.getPassword(), null); | setRepository(BugzillaCorePlugin.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_222_URL); RepositoryTaskData report = init(bugid); | public void testBugReportAPI() throws Exception { String bugid = "3"; TaskRepository repository = new TaskRepository(BugzillaCorePlugin.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_222_URL); RepositoryTaskData report = new RepositoryTaskData(attributeFactory, BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), bugid); BugzillaServerFacade.setupExistingBugAttributes(repository.getUrl(), report); factory.populateReport(report, repository.getUrl(), null, repository.getUserName(), repository.getPassword(), null); assertNotNull(report); assertTrue(report instanceof RepositoryTaskData); RepositoryTaskData bugReport = (RepositoryTaskData) report; assertEquals("search-match-test 2", bugReport.getSummary()); assertEquals("search-match-test 2", bugReport.getDescription()); assertEquals("TestProduct", bugReport.getProduct()); assertEquals("nhapke@cs.ubc.ca", bugReport.getAssignedTo()); // assertEquals("Other", // report.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue()); // assertEquals(37, report.getComments().size()); // assertEquals("Testing new 2.22 version capability", // report.getComments().get(0).getAttribute(BugzillaReportElement.THETEXT.getKeyString()).getValue()); // assertEquals(15, report.getAttachments().size()); // assertEquals("1", // report.getAttachments().get(0).getAttribute(BugzillaReportElement.ATTACHID.getKeyString()).getValue()); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/fc5f7c9fb68f9ce217976cd7477a47d3a7cdaf92/RepositoryReportFactoryTest.java/buggy/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
19865,
4820,
2557,
1435,
1216,
1185,
288,
202,
202,
780,
7934,
350,
273,
315,
23,
14432,
202,
202,
2174,
3305,
3352,
273,
394,
3837,
3305,
12,
19865,
15990,
4670,
377... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
19865,
4820,
2557,
1435,
1216,
1185,
288,
202,
202,
780,
7934,
350,
273,
315,
23,
14432,
202,
202,
2174,
3305,
3352,
273,
394,
3837,
3305,
12,
19865,
15990,
4670,
377... |
public static final ClassType tClass(ClassInfo clazzinfo) { int hash = clazzinfo.hashCode(); Iterator iter = classHash.iterateHashCode(hash); while (iter.hasNext()) { ClassInfoType type = (ClassInfoType) iter.next(); if (type.getClassInfo() == clazzinfo) return type; } ClassInfoType type = new ClassInfoType(clazzinfo); classHash.put(hash, type); return type; | public static final ClassType tClass(ClassPath classPath, String clazzname) { return tClass(classPath.getClassInfo(clazzname.replace('/','.'))); | public static final ClassType tClass(ClassInfo clazzinfo) { int hash = clazzinfo.hashCode(); Iterator iter = classHash.iterateHashCode(hash); while (iter.hasNext()) { ClassInfoType type = (ClassInfoType) iter.next(); if (type.getClassInfo() == clazzinfo) return type; } ClassInfoType type = new ClassInfoType(clazzinfo); classHash.put(hash, type); return type; } | 5628 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5628/04378f771d5c7b35149a2a31597d4bbdef17d2c7/Type.java/buggy/jode/jode/type/Type.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
727,
1659,
559,
268,
797,
12,
19455,
4003,
1376,
13,
288,
202,
474,
1651,
273,
4003,
1376,
18,
2816,
1085,
5621,
202,
3198,
1400,
273,
667,
2310,
18,
18793,
21952,
12,
2816,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
1659,
559,
268,
797,
12,
19455,
4003,
1376,
13,
288,
202,
474,
1651,
273,
4003,
1376,
18,
2816,
1085,
5621,
202,
3198,
1400,
273,
667,
2310,
18,
18793,
21952,
12,
2816,
... |
return sendCalendarMessage(lc, iidFolder.getId(), acct, mbox, dat, response); | return sendCalendarMessage(lc, iidFolder.getId(), acct, mbox, dat, response, false); | public Element handle(Element request, Map context) throws ServiceException { long startTime = sWatch.start(); try { ZimbraContext lc = getZimbraContext(context); Account acct = getRequestedAccount(lc); Mailbox mbox = getRequestedMailbox(lc); // <M> Element msgElem = request.getElement(MailService.E_MSG); // no existing Appt referenced -- this is a new create! String folderIdStr = msgElem.getAttribute(MailService.A_FOLDER, DEFAULT_FOLDER); ItemId iidFolder = new ItemId(folderIdStr, lc); sLog.info("<CreateAppointment folder=" + iidFolder.getId() + "> " + lc.toString()); CreateAppointmentInviteParser parser = new CreateAppointmentInviteParser(); CalSendData dat = handleMsgElement(lc, msgElem, acct, mbox, parser); Element response = lc.createElement(MailService.CREATE_APPOINTMENT_RESPONSE); return sendCalendarMessage(lc, iidFolder.getId(), acct, mbox, dat, response); } finally { sWatch.stop(startTime); } } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/6a66c6c0a79bd9468fe85fbefd83fc671354bbc6/CreateAppointment.java/clean/ZimbraServer/src/java/com/zimbra/cs/service/mail/CreateAppointment.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3010,
1640,
12,
1046,
590,
16,
1635,
819,
13,
1216,
16489,
288,
3639,
1525,
8657,
273,
272,
5234,
18,
1937,
5621,
3639,
775,
288,
5411,
2285,
381,
15397,
1042,
9109,
273,
23448,
381... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3010,
1640,
12,
1046,
590,
16,
1635,
819,
13,
1216,
16489,
288,
3639,
1525,
8657,
273,
272,
5234,
18,
1937,
5621,
3639,
775,
288,
5411,
2285,
381,
15397,
1042,
9109,
273,
23448,
381... |
} while ((getUpdateCount() != -1) && ((TdsConnection) getConnection()).returnLastUpdateCount()); | } | public int executeUpdate() throws SQLException { Tds tds = getTds(); if ( execute( tds ) ) { tds.skipToEnd(); releaseTds(); throw new SQLException( "executeUpdate can't return a result set" ); } else { int res; do { res = getUpdateCount(); // If we found a ResultSet, there's a problem. if( getMoreResults() ) { skipToEnd(); releaseTds(); throw new SQLException("executeUpdate can't return a result set"); } } while ((getUpdateCount() != -1) && ((TdsConnection) getConnection()).returnLastUpdateCount()); releaseTds(); return res==-1 ? 0 : res; } } | 439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/8076c09732efaded2611604bec6cfc5067bfa561/PreparedStatement_base.java/buggy/trunk/jtds/src/main/net/sourceforge/jtds/jdbc/PreparedStatement_base.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
17521,
1435,
1216,
6483,
565,
288,
3639,
399,
2377,
268,
2377,
273,
3181,
2377,
5621,
3639,
309,
261,
1836,
12,
268,
2377,
262,
262,
288,
5411,
268,
2377,
18,
7457,
774,
1638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
17521,
1435,
1216,
6483,
565,
288,
3639,
399,
2377,
268,
2377,
273,
3181,
2377,
5621,
3639,
309,
261,
1836,
12,
268,
2377,
262,
262,
288,
5411,
268,
2377,
18,
7457,
774,
1638,
... |
HTMLPrinter.insertPageProlog(desc, 0, HTMLPrinter.getJavaDocStyleSheerURL(), false); | HTMLPrinter.insertPageProlog(desc, 0, new RGB(255,255,255), TextUtil.getJavaDocStyleSheerURL()); | private void setPointDescriptionText(String text) { if (fPointDescBrowser != null) { StringBuffer desc = new StringBuffer(); HTMLPrinter.insertPageProlog(desc, 0, HTMLPrinter.getJavaDocStyleSheerURL(), false); desc.append(text); HTMLPrinter.addPageEpilog(desc); fPointDescBrowser.setText(desc.toString()); } else fPointDescription.setText(PDEHTMLHelper.stripTags(text)); } | 14404 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14404/b958c2fb50b83ae3ffe82f1019c659c2731a384d/PointSelectionPage.java/buggy/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/extension/PointSelectionPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
444,
2148,
3291,
1528,
12,
780,
977,
13,
288,
202,
202,
430,
261,
74,
2148,
4217,
9132,
480,
446,
13,
288,
1082,
202,
780,
1892,
3044,
273,
394,
6674,
5621,
1082,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
444,
2148,
3291,
1528,
12,
780,
977,
13,
288,
202,
202,
430,
261,
74,
2148,
4217,
9132,
480,
446,
13,
288,
1082,
202,
780,
1892,
3044,
273,
394,
6674,
5621,
1082,
202,
... |
buildStatus.getProperties().get(BuildStatus.MOST_RECENT_LOGFILE_KEY)); | properties.get(BuildStatus.MOST_RECENT_LOGFILE_KEY)); | public void testGetModifications() throws Exception { File tempDir = new File(System.getProperty("java.io.tmpdir")); buildStatus.setLogDir(tempDir.getAbsolutePath()); buildStatus.validate(); Calendar calendar = Calendar.getInstance(); Date today = calendar.getTime(); calendar.add(Calendar.DATE, -1); Date yesterday = calendar.getTime(); calendar.add(Calendar.DATE, -1); Date twoDaysAgo = calendar.getTime(); // Should be no modifications at this point List modifications = buildStatus.getModifications(twoDaysAgo, null); assertEquals("Wrong number of modifications", 0, modifications.size()); // Verify an unsuccessful build does not show up File yesterdayLog = new File(tempDir, Log.formatLogFileName(yesterday)); yesterdayLog.createNewFile(); try { modifications = buildStatus.getModifications(twoDaysAgo, null); assertEquals("Wrong number of modifications", 0, modifications.size()); } finally { yesterdayLog.delete(); } // Verify a successful build shows up File yesterdayLog2 = new File(tempDir, Log.formatLogFileName(yesterday, "good.1")); yesterdayLog2.createNewFile(); try { modifications = buildStatus.getModifications(twoDaysAgo, null); assertEquals("Wrong number of modifications", 1, modifications.size()); // Verify properties were set correctly assertEquals("Property was not set correctly", tempDir.getAbsolutePath(), buildStatus.getProperties().get(BuildStatus.MOST_RECENT_LOGDIR_KEY)); assertEquals("Property was not set correctly", yesterdayLog2.getName(), buildStatus.getProperties().get(BuildStatus.MOST_RECENT_LOGFILE_KEY)); assertEquals("Property was not set correctly", DateUtil.getFormattedTime(yesterday), buildStatus.getProperties().get(BuildStatus.MOST_RECENT_LOGTIME_KEY)); assertEquals("Property was not set correctly", "good.1", buildStatus.getProperties().get(BuildStatus.MOST_RECENT_LOGLABEL_KEY)); // Verify date range works modifications = buildStatus.getModifications(today, null); assertEquals("Wrong number of modifications", 0, modifications.size()); // Verify properties are set correctly when there are multiple modifications File todayLog = new File(tempDir, Log.formatLogFileName(today, "good.2")); todayLog.createNewFile(); try { modifications = buildStatus.getModifications(twoDaysAgo, null); assertEquals("Wrong number of modifications", 2, modifications.size()); // Verify properties were set correctly assertEquals("Property was not set correctly", tempDir.getAbsolutePath(), buildStatus.getProperties().get(BuildStatus.MOST_RECENT_LOGDIR_KEY)); assertEquals("Property was not set correctly", todayLog.getName(), buildStatus.getProperties().get(BuildStatus.MOST_RECENT_LOGFILE_KEY)); assertEquals("Property was not set correctly", DateUtil.getFormattedTime(today), buildStatus.getProperties().get(BuildStatus.MOST_RECENT_LOGTIME_KEY)); assertEquals("Property was not set correctly", "good.2", buildStatus.getProperties().get(BuildStatus.MOST_RECENT_LOGLABEL_KEY)); } finally { todayLog.delete(); } } finally { yesterdayLog2.delete(); } } | 52149 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52149/c879b70b24afa19e65b4d2d550b27f6e981821f1/BuildStatusTest.java/clean/main/test/net/sourceforge/cruisecontrol/sourcecontrols/BuildStatusTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
967,
28340,
1435,
1216,
1185,
288,
3639,
1387,
20719,
273,
394,
1387,
12,
3163,
18,
588,
1396,
2932,
6290,
18,
1594,
18,
5645,
1214,
7923,
1769,
3639,
1361,
1482,
18,
542... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
967,
28340,
1435,
1216,
1185,
288,
3639,
1387,
20719,
273,
394,
1387,
12,
3163,
18,
588,
1396,
2932,
6290,
18,
1594,
18,
5645,
1214,
7923,
1769,
3639,
1361,
1482,
18,
542... |
if (prefix != null) { length=prefix.length(); if(!xml11Version){ validNCName=XMLChar.isNCNameStart(prefix.charAt(0)); }else{ validNCName=XML11Char.isXML11NCNameStart(prefix.charAt(0)); } if (!validNCName) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "INVALID_CHARACTER_ERR", null); throw new DOMException(DOMException.INVALID_CHARACTER_ERR, msg); } validNCName = false; for (int i = 1; i < length; i++) { if(!xml11Version){ validNCName = XMLChar.isNCName(prefix.charAt(i)); }else{ validNCName = XML11Char.isXML11NCName(prefix.charAt(i)); } if (!validNCName) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "INVALID_CHARACTER_ERR", null); throw new DOMException( DOMException.INVALID_CHARACTER_ERR, msg); } } | if (!xml11Version) { validNCName = (prefix == null || XMLChar.isValidNCName(prefix)) && XMLChar.isValidNCName(local); | protected final void checkQName(String prefix, String local){ if (!errorChecking) { return; } int length; boolean validNCName = false; if (prefix != null) { length=prefix.length(); // check that prefix is NCName if(!xml11Version){ validNCName=XMLChar.isNCNameStart(prefix.charAt(0)); }else{ validNCName=XML11Char.isXML11NCNameStart(prefix.charAt(0)); } if (!validNCName) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "INVALID_CHARACTER_ERR", null); throw new DOMException(DOMException.INVALID_CHARACTER_ERR, msg); } validNCName = false; //reuse //TODO :: pass position of the invalid char in msg //otherwise it doesnot make sense to use this forloop. for (int i = 1; i < length; i++) { if(!xml11Version){ validNCName = XMLChar.isNCName(prefix.charAt(i)); }else{ validNCName = XML11Char.isXML11NCName(prefix.charAt(i)); } if (!validNCName) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "INVALID_CHARACTER_ERR", null); throw new DOMException( DOMException.INVALID_CHARACTER_ERR, msg); } } } length = local.length(); // check local part validNCName = false; if(!xml11Version) { validNCName = XMLChar.isNCNameStart(local.charAt(0)); }else{ validNCName = XML11Char.isXML11NCNameStart(local.charAt(0)); } if (!validNCName) { // REVISIT: add qname parameter to the message String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "INVALID_CHARACTER_ERR", null); throw new DOMException(DOMException.INVALID_CHARACTER_ERR, msg); } validNCName = false; //TODO :: pass position of the invalid char in msg //otherwise it doesnot make sense to use this forloop. for (int i = 1; i < length; i++) { if(!xml11Version){ validNCName = XMLChar.isNCName(local.charAt(i)); }else{ validNCName = XML11Char.isXML11NCName(local.charAt(i)); } if (!validNCName) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "INVALID_CHARACTER_ERR", null); throw new DOMException(DOMException.INVALID_CHARACTER_ERR, msg); } } } | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/6d70091dbf543d36fc92a367bd2c7dcdd75f4576/CoreDocumentImpl.java/buggy/src/org/apache/xerces/dom/CoreDocumentImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
727,
918,
866,
13688,
12,
780,
1633,
16,
565,
514,
1191,
15329,
3639,
309,
16051,
1636,
14294,
13,
288,
5411,
327,
31,
3639,
289,
3639,
509,
769,
31,
3639,
1250,
923,
10346,
461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
918,
866,
13688,
12,
780,
1633,
16,
565,
514,
1191,
15329,
3639,
309,
16051,
1636,
14294,
13,
288,
5411,
327,
31,
3639,
289,
3639,
509,
769,
31,
3639,
1250,
923,
10346,
461,
... |
else if (type == DOC_COMMENT) { | else if (type == JavaDocElementType.DOC_COMMENT) { | public static CompositeElement createCompositeElement(IElementType type) { //TODO: Replace whole method with type.createPsiElement(); CompositeElement element = null; if (type == TYPE_PARAMETER_LIST) { element = new TypeParameterListElement(); } else if (type == XML_TAG) { element = new XmlTagImpl(); } else if (type == HTML_TAG) { element = new HtmlTagImpl(); } else if (type == XML_TEXT) { element = new XmlTextImpl(); } else if (type == XML_PROCESSING_INSTRUCTION) { element = new XmlProcessingInstructionImpl(); } else if (type == TYPE_PARAMETER) { element = new TypeParameterElement(); } else if (type == EXTENDS_BOUND_LIST) { element = new TypeParameterExtendsBoundsListElement(); } else if (type == ERROR_ELEMENT) { element = new PsiErrorElementImpl(); } else if (type == JAVA_FILE) { element = new JavaFileElement(); } else if (type == PLAIN_TEXT_FILE) { element = new PlainTextFileElement(); } else if (type == JSP_FILE) { element = new JspFileElement(); } else if (type == XML_FILE) { element = new XmlFileElement(); } else if (type == HTML_FILE) { element = new HtmlFileElement(); } else if (type == CODE_FRAGMENT) { element = new CodeFragmentElement(); } else if (type == DUMMY_HOLDER) { element = new DummyHolderElement(); } else if (type == ASPECT_FILE) { element = new AspectFileElement(); } else if (type == DOC_COMMENT) { element = new PsiDocCommentImpl(); } else if (type == DOC_TAG) { element = new PsiDocTagImpl(); } else if (type == DOC_TAG_VALUE_TOKEN) { element = new PsiDocTagValueImpl(); } else if (type == DOC_METHOD_OR_FIELD_REF) { element = new PsiDocMethodOrFieldRef(); } else if (type == DOC_PARAMETER_REF) { element = new PsiDocParamRef(); } else if (type == DOC_INLINE_TAG) { element = new PsiInlineDocTagImpl(); } else if (type == CLASS) { element = new ClassElement(type); } else if (type == ANONYMOUS_CLASS) { element = new AnonymousClassElement(); } else if (type == ENUM_CONSTANT_INITIALIZER) { element = new EnumConstantInitializerElement(); } else if (type == FIELD) { element = new FieldElement(); } else if (type == ENUM_CONSTANT) { element = new EnumConstantElement(); } else if (type == METHOD) { element = new MethodElement(); } else if (type == LOCAL_VARIABLE) { element = new PsiLocalVariableImpl(); } else if (type == PARAMETER) { element = new ParameterElement(); } else if (type == PARAMETER_LIST) { element = new ParameterListElement(); } else if (type == CLASS_INITIALIZER) { element = new ClassInitializerElement(); } else if (type == PACKAGE_STATEMENT) { element = new PsiPackageStatementImpl(); } else if (type == IMPORT_LIST) { element = new ImportListElement(); } else if (type == IMPORT_STATEMENT) { element = new ImportStatementElement(); } else if (type == IMPORT_STATIC_STATEMENT) { element = new ImportStaticStatementElement(); } else if (type == IMPORT_STATIC_REFERENCE) { element = new PsiImportStaticReferenceElementImpl(); } else if (type == JAVA_CODE_REFERENCE) { element = new PsiJavaCodeReferenceElementImpl(); } else if (type == REFERENCE_PARAMETER_LIST) { element = new PsiReferenceParameterListImpl(); } else if (type == TYPE) { element = new PsiTypeElementImpl(); } else if (type == MODIFIER_LIST) { element = new ModifierListElement(); } else if (type == EXTENDS_LIST) { element = new ExtendsListElement(); } else if (type == IMPLEMENTS_LIST) { element = new ImplementsListElement(); } else if (type == THROWS_LIST) { element = new PsiThrowsListImpl(); } else if (type == EXPRESSION_LIST) { element = new PsiExpressionListImpl(); } else if (type == REFERENCE_EXPRESSION) { element = new PsiReferenceExpressionImpl(); } else if (type == LITERAL_EXPRESSION) { element = new PsiLiteralExpressionImpl(); } else if (type == THIS_EXPRESSION) { element = new PsiThisExpressionImpl(); } else if (type == SUPER_EXPRESSION) { element = new PsiSuperExpressionImpl(); } else if (type == PARENTH_EXPRESSION) { element = new PsiParenthesizedExpressionImpl(); } else if (type == METHOD_CALL_EXPRESSION) { element = new PsiMethodCallExpressionImpl(); } else if (type == TYPE_CAST_EXPRESSION) { element = new PsiTypeCastExpressionImpl(); } else if (type == PREFIX_EXPRESSION) { element = new PsiPrefixExpressionImpl(); } else if (type == POSTFIX_EXPRESSION) { element = new PsiPostfixExpressionImpl(); } else if (type == BINARY_EXPRESSION) { element = new PsiBinaryExpressionImpl(); } else if (type == CONDITIONAL_EXPRESSION) { element = new PsiConditionalExpressionImpl(); } else if (type == ASSIGNMENT_EXPRESSION) { element = new PsiAssignmentExpressionImpl(); } else if (type == NEW_EXPRESSION) { element = new PsiNewExpressionImpl(); } else if (type == ARRAY_ACCESS_EXPRESSION) { element = new PsiArrayAccessExpressionImpl(); } else if (type == ARRAY_INITIALIZER_EXPRESSION) { element = new PsiArrayInitializerExpressionImpl(); } else if (type == INSTANCE_OF_EXPRESSION) { element = new PsiInstanceOfExpressionImpl(); } else if (type == CLASS_OBJECT_ACCESS_EXPRESSION) { element = new PsiClassObjectAccessExpressionImpl(); } else if (type == EMPTY_EXPRESSION) { element = new PsiEmptyExpressionImpl(); } else if (type == EMPTY_STATEMENT) { element = new PsiEmptyStatementImpl(); } else if (type == BLOCK_STATEMENT) { element = new PsiBlockStatementImpl(); } else if (type == EXPRESSION_STATEMENT) { element = new PsiExpressionStatementImpl(); } else if (type == EXPRESSION_LIST_STATEMENT) { element = new PsiExpressionListStatementImpl(); } else if (type == DECLARATION_STATEMENT) { element = new PsiDeclarationStatementImpl(); } else if (type == IF_STATEMENT) { element = new PsiIfStatementImpl(); } else if (type == WHILE_STATEMENT) { element = new PsiWhileStatementImpl(); } else if (type == FOR_STATEMENT) { element = new PsiForStatementImpl(); } else if (type == FOREACH_STATEMENT) { element = new PsiForeachStatementImpl(); } else if (type == DO_WHILE_STATEMENT) { element = new PsiDoWhileStatementImpl(); } else if (type == SWITCH_STATEMENT) { element = new PsiSwitchStatementImpl(); } else if (type == SWITCH_LABEL_STATEMENT) { element = new PsiSwitchLabelStatementImpl(); } else if (type == BREAK_STATEMENT) { element = new PsiBreakStatementImpl(); } else if (type == CONTINUE_STATEMENT) { element = new PsiContinueStatementImpl(); } else if (type == RETURN_STATEMENT) { element = new PsiReturnStatementImpl(); } else if (type == THROW_STATEMENT) { element = new PsiThrowStatementImpl(); } else if (type == SYNCHRONIZED_STATEMENT) { element = new PsiSynchronizedStatementImpl(); } else if (type == ASSERT_STATEMENT) { element = new PsiAssertStatementImpl(); } else if (type == TRY_STATEMENT) { element = new PsiTryStatementImpl(); } else if (type == LABELED_STATEMENT) { element = new PsiLabeledStatementImpl(); } else if (type == CODE_BLOCK) { element = new PsiCodeBlockImpl(); } else if (type == CATCH_SECTION) { element = new PsiCatchSectionImpl(); } else if (type == JSP_DIRECTIVE) { element = new JspDirectiveImpl(); } else if (type == JSP_ACTION) { element = new JspActionImpl(); } else if (type == JSP_DIRECTIVE_ATTRIBUTE || type == JSP_ACTION_ATTRIBUTE) { element = new JspAttributeImpl(type); } else if (type == JSP_IMPORT_VALUE) { element = new JspImportValueImpl(); } else if (type == JSP_DECLARATION) { element = new JspDeclarationImpl(); } else if (type == JSP_EXPRESSION) { element = new JspExpressionImpl(); } else if (type == JSP_ACTION_ATTRIBUTE_VALUE) { element = new JspAttributeValueImpl(); } else if (type == JSP_TEMPLATE_STATEMENT) { element = new JspTemplateStatement(); } else if (type == JSP_TEMPLATE_DECLARATION) { element = new JspTemplateDeclaration(); } else if (type == JSP_FILE_REFERENCE) { element = new JspFileReferenceImpl(); } else if (type == XML_DOCUMENT) { element = new XmlDocumentImpl(); } else if (type == HTML_DOCUMENT) { element = new HtmlDocumentImpl(); } else if (type == XML_PROLOG) { element = new XmlPrologImpl(); } else if (type == XML_DECL) { element = new XmlDeclImpl(); } else if (type == XML_ATTRIBUTE) { element = new XmlAttributeImpl(); } else if (type == XML_ATTRIBUTE_VALUE) { element = new XmlAttributeValueImpl(); } else if (type == XML_COMMENT) { element = new XmlCommentImpl(); } else if (type == XML_DOCTYPE) { element = new XmlDoctypeImpl(); } else if (type == XML_MARKUP_DECL) { element = new XmlMarkupDeclImpl(); } else if (type == XML_ELEMENT_DECL) { element = new XmlElementDeclImpl(); } else if (type == XML_ENTITY_DECL) { element = new XmlEntityDeclImpl(); } else if (type == XML_ATTLIST_DECL) { element = new XmlAttlistDeclImpl(); } else if (type == XML_ATTRIBUTE_DECL) { element = new XmlAttributeDeclImpl(); } else if (type == XML_NOTATION_DECL) { element = new XmlNotationDeclImpl(); } else if (type == XML_ELEMENT_CONTENT_SPEC) { element = new XmlElementContentSpecImpl(); } else if (type == XML_ENTITY_REF) { element = new XmlEntityRefImpl(); } else if (type == XML_ENUMERATED_TYPE) { element = new XmlEnumeratedTypeImpl(); } else if (type == XML_PROCESSING_INSTRUCTION) { element = new XmlProcessingInstructionImpl(); } else if (type == ANNOTATION_METHOD) { element = new AnnotationMethodElement(); } else if (type == ANNOTATION) { element = new PsiAnnotationImpl(); } else if (type == ANNOTATION_ARRAY_INITIALIZER) { element = new PsiArrayInitializerMemberValueImpl(); } else if (type == NAME_VALUE_PAIR) { element = new PsiNameValuePairImpl(); } else if (type == ANNOTATION_PARAMETER_LIST) { element = new PsiAnnotationParameterListImpl(); } else { if (type instanceof IAspectElementType) { element = com.intellij.aspects.psi.gen.impl.Factory.createCompositeElement(type); } else { for (int size = ourElementFactories.size(), i = 0; i < size; i++) { TreeElementFactory elementFactory = ourElementFactories.get(i); if (elementFactory.isMyElementType(type)) { element = elementFactory.createCompositeElement(type); } } if (element == null) { //LOG.assertTrue(false, "Unknown composite element type:" + BitSetUtil.toString(ElementType.class, type)); element = new CompositePsiElement(type){}; } } } LOG.assertTrue(element.getElementType() == type, "Type created: " + element.getElementType() + " wanted: " + type); return element; } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/7cc49f57fd75f032b80560ecde54c4a99bda9ac7/Factory.java/buggy/source/com/intellij/psi/impl/source/tree/Factory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
14728,
1046,
752,
9400,
1046,
12,
45,
17481,
618,
13,
288,
565,
368,
6241,
30,
6910,
7339,
707,
598,
618,
18,
2640,
52,
7722,
1046,
5621,
565,
14728,
1046,
930,
273,
446,
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,
14728,
1046,
752,
9400,
1046,
12,
45,
17481,
618,
13,
288,
565,
368,
6241,
30,
6910,
7339,
707,
598,
618,
18,
2640,
52,
7722,
1046,
5621,
565,
14728,
1046,
930,
273,
446,
31,... |
void dump ( PrintStream o ); | void dump ( ); | void dump ( PrintStream o ); | 3520 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3520/8dfef03744bcebfc9c73417b5624b3291a61e7b1/DomImpl.java/clean/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2/DomImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
918,
282,
4657,
261,
21677,
320,
11272,
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,
540,
918,
282,
4657,
261,
21677,
320,
11272,
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... |
manifest = getManifest(manifestFile); | manifest = getManifest( manifestFile ); | private Manifest createManifest() throws ArchiverException { try { Manifest finalManifest = Manifest.getDefaultManifest(); if (manifest == null) { if (manifestFile != null) { // if we haven't got the manifest yet, attempt to // get it now and have manifest be the final merge manifest = getManifest(manifestFile); } } /* * Precedence: manifestFile wins over inline manifest, * over manifests read from the filesets over the original * manifest. * * merge with null argument is a no-op */ if (isInUpdateMode()) { finalManifest.merge(originalManifest); } finalManifest.merge(filesetManifest); finalManifest.merge(configuredManifest); finalManifest.merge(manifest, !mergeManifestsMain); return finalManifest; } catch (ManifestException e) { getLogger().error("Manifest is invalid: " + e.getMessage()); throw new ArchiverException("Invalid Manifest", e); } } | 55907 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55907/4da7a225ba9c01ca94805923e06e3fb2d46bf201/JarArchiver.java/clean/plexus-archiver/src/main/java/org/codehaus/plexus/archiver/jar/JarArchiver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
15443,
752,
9121,
1435,
3639,
1216,
16959,
1667,
503,
288,
3639,
775,
288,
5411,
15443,
727,
9121,
273,
15443,
18,
588,
1868,
9121,
5621,
5411,
309,
261,
14357,
422,
446,
13,
288,
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,
377,
3238,
15443,
752,
9121,
1435,
3639,
1216,
16959,
1667,
503,
288,
3639,
775,
288,
5411,
15443,
727,
9121,
273,
15443,
18,
588,
1868,
9121,
5621,
5411,
309,
261,
14357,
422,
446,
13,
288,
7... |
{ | { | public JMenuItem getToolsMenuItem(final BPackage pckg) { JMenuItem jmi = new JMenuItem(new AbstractAction() { public void actionPerformed(ActionEvent evt) { new Thread(new Runnable() { public void run() { try { ArrayList<String> classes = new ArrayList<String>(); for (BPackage bp : pckg.getProject().getPackages()) for (BClass bc : bp.getClasses()) classes.add(bc.getClassFile().getAbsolutePath()); String[] classesArray = new String[classes.size()]; classesArray = classes.toArray(classesArray); final SortedBugCollection bugs = RunFindbugs.getBugs(classesArray); SwingUtilities.invokeLater(new Runnable() { public void run() { new ResultsFrame(bugs).setVisible(true); } }); } catch (Exception e) { Log.recordBug(e); } } }).start(); } }); jmi.setText("Run FindBugs"); return jmi; } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/2885faa685b24cf3a7cdfaec354c7ab03270259d/RegularMenuBuilder.java/clean/bluej/src/edu/umd/cs/findbugs/bluej/RegularMenuBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
804,
12958,
336,
10348,
12958,
12,
6385,
605,
2261,
293,
363,
75,
13,
202,
95,
202,
202,
46,
12958,
525,
9197,
273,
394,
804,
12958,
12,
2704,
4115,
1803,
1435,
202,
202,
95,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
804,
12958,
336,
10348,
12958,
12,
6385,
605,
2261,
293,
363,
75,
13,
202,
95,
202,
202,
46,
12958,
525,
9197,
273,
394,
804,
12958,
12,
2704,
4115,
1803,
1435,
202,
202,
95,
... |
/*"golden_armor",*/ "fire_sword", "golden_shield", "golden_legs", | "golden_armor", "fire_sword", /* "golden_shield", */"golden_legs", | protected void createDialog() { add(ConversationStates.IDLE, SpeakerNPC.GREETING_MESSAGES, null, ConversationStates.IDLE, null, new SpeakerNPC.ChatAction() { public void fire(Player player, String text, SpeakerNPC engine) { if (!player.hasQuest("seven_cherubs")) { player.setQuest("seven_cherubs", ""); } // Visited cherubs are store in the quest-name "seven_cherubs". // Please note that there is an additional empty entry in the beginning. String npcDoneText = player .getQuest("seven_cherubs"); String[] done = npcDoneText.split(";"); List<String> list = Arrays.asList(done); int left = 7 - list.size(); if (!list.contains(engine.getName())) { player.setQuest("seven_cherubs", npcDoneText + ";" + engine.getName()); player.setHP(player.getBaseHP()); player.healPoison(); if (left > 0) { engine.say("Only need to find " + (7 - list.size()) + " more. Farewell."); player.addXP((7 - left + 1) * 200); } else { engine.say("Thou have proven yourself brave enough to wear this present!"); /* Proposal by Daniel Herding (mort): * once we have enough quests, we shouldn't * have this randomization anymore. There * should be one hard quest for each of the * golden items. * I commented out the golden armor here * because you already get that from the * CloaksForBario quest. Once enough quests * exist, this quest should always give you * golden boots (because you have to walk much * to fulfil it). */ String[] items = { "golden_boots", /*"golden_armor",*/ "fire_sword", "golden_shield", "golden_legs", "golden_helmet" }; Item item = world .getRuleManager() .getEntityManager() .getItem(items[Rand.rand(items.length)]); if (!player.equip(item)) { StendhalRPZone zone = (StendhalRPZone) world .getRPZone(player.getID()); zone.assignRPObjectID(item); item.setx(player.getx()); item.sety(player.gety()); zone.add(item); } player.addXP(2000); } } else { if (left > -1) { engine.say("Find the rest of us to get the reward"); } else { engine.say("You found all of us and got the reward."); } } world.modify(player); } }); addGoodbye(); } | 4438 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4438/0513fe03abb830f87b4a5f78b98492b9684abf60/SevenCherubs.java/buggy/src/games/stendhal/server/maps/quests/SevenCherubs.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1117,
918,
752,
6353,
1435,
288,
1082,
202,
1289,
12,
15717,
7629,
18,
734,
900,
16,
9506,
202,
55,
347,
6388,
50,
3513,
18,
43,
862,
1584,
1360,
67,
26195,
16,
9506,
202,
2011,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1117,
918,
752,
6353,
1435,
288,
1082,
202,
1289,
12,
15717,
7629,
18,
734,
900,
16,
9506,
202,
55,
347,
6388,
50,
3513,
18,
43,
862,
1584,
1360,
67,
26195,
16,
9506,
202,
2011,
... |
public void testValidate() { | public void testValidate() throws IOException { | public void testValidate() { FileSystem fs = new FileSystem(); try { fs.validate(); fail("FileSystem should throw exceptions when required attributes are not set."); } catch (CruiseControlException e) { assertEquals("'folder' is a required attribute for FileSystem", e.getMessage()); } fs.setFolder("folder"); try { fs.validate(); assertTrue(true); } catch (CruiseControlException e) { fail("FileSystem should not throw exceptions when required attributes are set."); } } | 52149 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52149/881c64a6f80d748e51e746638d024bd322db3569/FileSystemTest.java/clean/main/test/net/sourceforge/cruisecontrol/sourcecontrols/FileSystemTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4270,
1435,
1216,
1860,
288,
3639,
10931,
2662,
273,
394,
10931,
5621,
3639,
775,
288,
5411,
2662,
18,
5662,
5621,
5411,
2321,
2932,
11785,
1410,
604,
4798,
1347,
1931,
167... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4270,
1435,
1216,
1860,
288,
3639,
10931,
2662,
273,
394,
10931,
5621,
3639,
775,
288,
5411,
2662,
18,
5662,
5621,
5411,
2321,
2932,
11785,
1410,
604,
4798,
1347,
1931,
167... |
Assert.assertEquals( 0, nameSer.compareTo( name ) ); } catch ( IOException ioe ) { throw ioe; } finally { try { oIn.close(); fIn.close(); file.delete(); } catch ( IOException ioe ) { throw ioe; } } } | Assert.assertEquals( 0, nameSer.compareTo( name ) ); } catch ( IOException ioe ) { throw ioe; } finally { try { oIn.close(); fIn.close(); file.delete(); } catch ( IOException ioe ) { throw ioe; } } } | public void testNameSerialization() throws Exception { LdapDN name = new LdapDN( "ou= Some People + dc= And Some anImAls,dc = eXample,dc= cOm" ); FileOutputStream fOut = null; ObjectOutputStream oOut = null; File file = new File( "LdapDN.ser" ); try { fOut = new FileOutputStream( file ); oOut = new ObjectOutputStream( fOut ); oOut.writeObject( name ); } catch ( IOException ioe ) { throw ioe; } finally { try { oOut.flush(); oOut.close(); fOut.close(); } catch ( IOException ioe ) { throw ioe; } } FileInputStream fIn = null; ObjectInputStream oIn = null; try { fIn = new FileInputStream( file ); oIn = new ObjectInputStream( fIn ); LdapDN nameSer = ( LdapDN ) oIn.readObject(); Assert.assertEquals( 0, nameSer.compareTo( name ) ); } catch ( IOException ioe ) { throw ioe; } finally { try { oIn.close(); fIn.close(); file.delete(); } catch ( IOException ioe ) { throw ioe; } } } | 54578 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54578/34d16a3366af953bef4b3d5f4cf0e7c6bda29ba6/LdapDNTest.java/clean/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
461,
16764,
1435,
1216,
1185,
565,
288,
3639,
18053,
8609,
508,
273,
394,
18053,
8609,
12,
315,
1395,
33,
10548,
282,
19622,
11763,
282,
397,
6744,
33,
225,
7835,
282,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
461,
16764,
1435,
1216,
1185,
565,
288,
3639,
18053,
8609,
508,
273,
394,
18053,
8609,
12,
315,
1395,
33,
10548,
282,
19622,
11763,
282,
397,
6744,
33,
225,
7835,
282,
10... |
if (rs.wasNull()) { | /*if (rs.wasNull()) { | public Document getUserLayout (IPerson person, UserProfile profile) throws Exception { int userId = person.getID(); int realUserId = userId; ResultSet rs; Connection con = RDBMServices.getConnection(); RDBMServices.setAutoCommit(con, false); // May speed things up, can't hurt try { DocumentImpl doc = new DocumentImpl(); Element root = doc.createElement("layout"); root.setAttribute("ID","root"); doc.putIdentifier("root",root); Statement stmt = con.createStatement(); // A separate statement is needed so as not to interfere with ResultSet // of statements used for queries Statement insertStmt = con.createStatement(); try { long startTime = System.currentTimeMillis(); // eventually, we need to fix template layout implementations so you can just do this: // int layoutId=profile.getLayoutId(); // but for now: String subSelectString = "SELECT LAYOUT_ID FROM UP_USER_PROFILE WHERE USER_ID=" + userId + " AND PROFILE_ID=" + profile.getProfileId(); LogService.instance().log(LogService.DEBUG, "RDBMUserLayoutStore::getUserLayout(): " + subSelectString); int layoutId; rs = stmt.executeQuery(subSelectString); try { rs.next(); layoutId = rs.getInt(1); if (rs.wasNull()) { layoutId = 0; } } finally { rs.close(); } if (layoutId == 0) { // First time, grab the default layout for this user String sQuery = "SELECT USER_DFLT_USR_ID, USER_DFLT_LAY_ID FROM UP_USER WHERE USER_ID=" + userId; LogService.instance().log(LogService.DEBUG, "RDBMUserLayoutStore::getUserLayout(): " + sQuery); rs = stmt.executeQuery(sQuery); try { rs.next(); userId = rs.getInt(1); layoutId = rs.getInt(2); } finally { rs.close(); } // Make sure the next struct id is set in case the user adds a channel sQuery = "SELECT NEXT_STRUCT_ID FROM UP_USER WHERE USER_ID=" + userId; LogService.instance().log(LogService.DEBUG, "RDBMUserLayoutStore::setUserLayout(): " + sQuery); int nextStructId; rs = stmt.executeQuery(sQuery); try { rs.next(); nextStructId = rs.getInt(1); } finally { rs.close(); } sQuery = "UPDATE UP_USER SET NEXT_STRUCT_ID=" + nextStructId + " WHERE USER_ID=" + realUserId; LogService.instance().log(LogService.DEBUG, "RDBMUserLayoutStore::setUserLayout(): " + sQuery); stmt.executeUpdate(sQuery); /* insert row(s) into up_ss_user_atts */ sQuery = "DELETE FROM UP_SS_USER_ATTS WHERE USER_ID=" + realUserId; LogService.instance().log(LogService.DEBUG, "RDBMUserLayoutStore::setUserLayout(): " + sQuery); stmt.executeUpdate(sQuery); // modifed INSERT INTO SELECT statement for MySQL support sQuery = " SELECT "+realUserId+", PROFILE_ID, SS_ID, SS_TYPE, STRUCT_ID, PARAM_NAME, PARAM_TYPE, PARAM_VAL "+ " FROM UP_SS_USER_ATTS WHERE USER_ID="+userId; rs = stmt.executeQuery(sQuery); while (rs.next()) { String Insert = "INSERT INTO UP_SS_USER_ATTS (USER_ID, PROFILE_ID, SS_ID, SS_TYPE, STRUCT_ID, PARAM_NAME, PARAM_TYPE, PARAM_VAL) " + "VALUES("+realUserId+","+ rs.getInt("PROFILE_ID")+","+ rs.getInt("SS_ID")+"," + rs.getInt("SS_TYPE")+"," + rs.getInt("STRUCT_ID")+"," + "'"+rs.getString("PARAM_NAME")+"'," + rs.getInt("PARAM_TYPE")+"," + "'"+rs.getString("PARAM_VAL")+"')";// old code// String Insert = "INSERT INTO UP_SS_USER_ATTS (USER_ID, PROFILE_ID, SS_ID, SS_TYPE, STRUCT_ID, PARAM_NAME, PARAM_TYPE, PARAM_VAL) "+// " SELECT "+realUserId+", USUA.PROFILE_ID, USUA.SS_ID, USUA.SS_TYPE, USUA.STRUCT_ID, USUA.PARAM_NAME, USUA.PARAM_TYPE, USUA.PARAM_VAL "+// " FROM UP_SS_USER_ATTS USUA WHERE USUA.USER_ID="+userId; LogService.log(LogService.DEBUG, "RDBMUserLayoutStore::setUserLayout(): " + Insert); insertStmt.executeUpdate(Insert); } RDBMServices.commit(con); // Make sure it appears in the store } int firstStructId = -1; String sQuery = "SELECT INIT_STRUCT_ID FROM UP_USER_LAYOUT WHERE USER_ID=" + userId + " AND LAYOUT_ID = " + layoutId; LogService.instance().log(LogService.DEBUG, "RDBMUserLayoutStore::getUserLayout(): " + sQuery); rs = stmt.executeQuery(sQuery); try { rs.next(); firstStructId = rs.getInt(1); } finally { rs.close(); } String sql = "SELECT ULS.STRUCT_ID,ULS.NEXT_STRUCT_ID,ULS.CHLD_STRUCT_ID,ULS.CHAN_ID,ULS.NAME,ULS.TYPE,ULS.HIDDEN,"+ "ULS.UNREMOVABLE,ULS.IMMUTABLE"; if (RDBMServices.supportsOuterJoins) { sql += ",USP.STRUCT_PARM_NM,USP.STRUCT_PARM_VAL FROM " + RDBMServices.joinQuery.getQuery("layout"); } else { sql += " FROM UP_LAYOUT_STRUCT ULS WHERE "; } sql += " ULS.USER_ID=" + userId + " AND ULS.LAYOUT_ID=" + layoutId + " ORDER BY ULS.STRUCT_ID"; HashMap layoutStructure = new HashMap(); ArrayList chanIds = new ArrayList(); LogService.instance().log(LogService.DEBUG, "RDBMUserLayoutStore::getUserLayout(): " + sql); StringBuffer structParms = new StringBuffer(); rs = stmt.executeQuery(sql); try { int lastStructId = 0; LayoutStructure ls = null; String sepChar = ""; if (rs.next()) { int structId = rs.getInt(1); if (rs.wasNull()) { structId = 0; } readLayout: while (true) { if (DEBUG > 1) System.err.println("Found layout structureID " + structId); int nextId = rs.getInt(2); if (rs.wasNull()) { nextId = 0; } int childId = rs.getInt(3); if (rs.wasNull()) { childId = 0; } int chanId = rs.getInt(4); if (rs.wasNull()) { chanId = 0; } ls = new LayoutStructure(structId, nextId, childId, chanId, rs.getString(7),rs.getString(8),rs.getString(9)); layoutStructure.put(new Integer(structId), ls); lastStructId = structId; if (!ls.isChannel()) { ls.addFolderData(rs.getString(5), rs.getString(6)); } else { chanIds.add(new Integer(chanId)); // For later } if (RDBMServices.supportsOuterJoins) { do { String name = rs.getString(10); String value = rs.getString(11); // Oracle JDBC requires us to do this for longs if (name != null) { // may not be there because of the join ls.addParameter(name, value); } if (!rs.next()) { break readLayout; } structId = rs.getInt(1); if (rs.wasNull()) { structId = 0; } } while (structId == lastStructId); } else { // Do second SELECT later on for structure parameters if (ls.isChannel()) { structParms.append(sepChar + ls.chanId); sepChar = ","; } if (rs.next()) { structId = rs.getInt(1); if (rs.wasNull()) { structId = 0; } } else { break readLayout; } } } // while } } finally { rs.close(); } // We have to retrieve the channel defition after the layout structure // since retrieving the channel data from the DB may interfere with the // layout structure ResultSet (in other words, Oracle is a pain to program for) if (chanIds.size() > 0) { RDBMServices.PreparedStatement pstmtChannel = crsdb.getChannelPstmt(con); try { RDBMServices.PreparedStatement pstmtChannelParm = crsdb.getChannelParmPstmt(con); try { // Pre-prime the channel pump for (int i = 0; i < chanIds.size(); i++) { int chanId = ((Integer) chanIds.get(i)).intValue(); crsdb.getChannel(chanId, true, pstmtChannel, pstmtChannelParm); if (DEBUG > 1) { System.err.println("Precached " + chanId); } } } finally { if (pstmtChannelParm != null) { pstmtChannelParm.close(); } } } finally { pstmtChannel.close(); } chanIds.clear(); } if (!RDBMServices.supportsOuterJoins) { // Pick up structure parameters sql = "SELECT STRUCT_ID, STRUCT_PARM_NM,STRUCT_PARM_VAL FROM UP_LAYOUT_PARAM WHERE USER_ID=" + userId + " AND LAYOUT_ID=" + layoutId + " AND STRUCT_ID IN (" + structParms.toString() + ") ORDER BY STRUCT_ID"; LogService.instance().log(LogService.DEBUG, "RDBMUserLayoutStore::getUserLayout(): " + sql); rs = stmt.executeQuery(sql); try { if (rs.next()) { int structId = rs.getInt(1); readParm: while(true) { LayoutStructure ls = (LayoutStructure)layoutStructure.get(new Integer(structId)); int lastStructId = structId; do { ls.addParameter(rs.getString(2), rs.getString(3)); if (!rs.next()) { break readParm; } } while ((structId = rs.getInt(1)) == lastStructId); } } } finally { rs.close(); } } if (layoutStructure.size() > 0) { // We have a layout to work with createLayout(layoutStructure, doc, root, firstStructId); layoutStructure.clear(); long stopTime = System.currentTimeMillis(); LogService.instance().log(LogService.DEBUG, "RDBMUserLayoutStore::getUserLayout(): Layout document for user " + userId + " took " + (stopTime - startTime) + " milliseconds to create"); doc.appendChild(root); if (DEBUG > 1) { System.err.println("--> created document"); dumpDoc(doc, ""); System.err.println("<--"); } } } finally { stmt.close(); insertStmt.close(); } return doc; } finally { RDBMServices.releaseConnection(con); } } | 1895 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1895/3e55c7763f1ad0bfc97661dcd35356e72d5f195e/RDBMUserLayoutStore.java/clean/source/org/jasig/portal/RDBMUserLayoutStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
4319,
4735,
3744,
261,
2579,
3565,
6175,
16,
2177,
4029,
3042,
13,
1216,
1185,
288,
377,
509,
6249,
273,
6175,
18,
588,
734,
5621,
565,
509,
2863,
10502,
273,
6249,
31,
565,
10842,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4319,
4735,
3744,
261,
2579,
3565,
6175,
16,
2177,
4029,
3042,
13,
1216,
1185,
288,
377,
509,
6249,
273,
6175,
18,
588,
734,
5621,
565,
509,
2863,
10502,
273,
6249,
31,
565,
10842,
... |
return this.getOrder().compareTo(o.getOrder()); | return this.getFullWeight().compareTo(o.getFullWeight()); | public int compareTo(CurricularPeriod o) { return this.getOrder().compareTo(o.getOrder()); } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/af4175c80021bbe7d6bff77a7dc46fab2dc3e798/CurricularPeriod.java/buggy/src/net/sourceforge/fenixedu/domain/curricularPeriod/CurricularPeriod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
9292,
12,
2408,
1512,
2490,
5027,
320,
13,
288,
3639,
327,
333,
18,
588,
5080,
6544,
7675,
9877,
774,
12,
83,
18,
588,
5080,
6544,
10663,
565,
289,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
9292,
12,
2408,
1512,
2490,
5027,
320,
13,
288,
3639,
327,
333,
18,
588,
5080,
6544,
7675,
9877,
774,
12,
83,
18,
588,
5080,
6544,
10663,
565,
289,
2,
-100,
-100,
-100,
-100,... |
parms.remove(0); | if ( ! Modifier.isStatic(method.getModifiers()) ) parms.remove(0); | private void addTargetMethod( IntertypeMethodDecl imd, SootMethod implMethod) { MethodSig method = imd.getTarget(); SootClass sc = method.getDeclaringClass().getSootClass(); Type retType = method.getReturnType().getSootType(); List parms = new ArrayList(); for( Iterator formalIt = method.getFormals().iterator(); formalIt.hasNext(); ) { final AbcType formalType = ((Formal) formalIt.next()).getType(); parms.add(formalType.getSootType()); } parms.remove(0); // drop the "this" parameter int modifiers = method.getModifiers(); modifiers |= Modifier.PUBLIC; modifiers &= ~Modifier.PRIVATE; modifiers &= ~Modifier.PROTECTED; // Create the method SootMethod sm = new SootMethod( method.getName(), parms, retType, modifiers ); for( Iterator exceptionIt = method.getExceptions().iterator(); exceptionIt.hasNext(); ) { final SootClass exception = (SootClass) exceptionIt.next(); sm.addException( exception ); } /* generate call to implementation: impl(this,arg1,arg2,...,argn) */ //create a body Body b = Jimple.v().newBody(sm); sm.setActiveBody(b); Chain ls = b.getLocals(); PatchingChain ss = b.getUnits(); // argument set-up List args = new LinkedList(); // the first parameter of the impl is "this : TargetType" RefType rt = sc.getType(); ThisRef thisref = Jimple.v().newThisRef(rt); Local v = Jimple.v().newLocal("this$",rt); ls.add(v); IdentityStmt thisStmt = soot.jimple.Jimple.v().newIdentityStmt(v,thisref); ss.add(thisStmt); args.add(v); // add references to the other parameters int index = 0; for (Iterator formals=parms.iterator(); formals.hasNext(); ) { final Type formalType = (Type) formals.next(); Local p = Jimple.v().newLocal("$param"+index,formalType); ; ls.add(p); ParameterRef pr = Jimple.v().newParameterRef(formalType,index); IdentityStmt prStmt = soot.jimple.Jimple.v().newIdentityStmt(p, pr); ss.add(prStmt); args.add(p); index++; } // now invoke the implementation in the originating aspect InvokeExpr ie = Jimple.v().newStaticInvokeExpr(implMethod,args); // if this is a void returntype, create call followed by return // otherwise return the value directly if (retType.equals(VoidType.v())) { InvokeStmt stmt1 = Jimple.v().newInvokeStmt(ie); ReturnVoidStmt stmt2 = Jimple.v().newReturnVoidStmt(); ss.add(stmt1); ss.add(stmt2); } else { Local r = Jimple.v().newLocal("$result",retType); ls.add(r); AssignStmt rStmt = soot.jimple.Jimple.v().newAssignStmt(r, ie); ss.add(rStmt); ReturnStmt stmt = Jimple.v().newReturnStmt(r); ss.add(stmt); } // Add method to the class sc.addMethod(sm); // This is a stub for an intertype method decl MethodCategory.register(sm, MethodCategory.INTERTYPE_METHOD_DELEGATOR); } | 236 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/236/4f9ccae018d491c67d48664ce7575b50725a1f4e/IntertypeAdjuster.java/buggy/aop/abc/src/abc/weaving/weaver/IntertypeAdjuster.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
527,
2326,
1305,
12,
5294,
723,
1305,
3456,
709,
72,
16,
348,
1632,
1305,
9380,
1305,
13,
288,
3639,
2985,
8267,
707,
273,
709,
72,
18,
588,
2326,
5621,
7734,
348,
1632,
797,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
527,
2326,
1305,
12,
5294,
723,
1305,
3456,
709,
72,
16,
348,
1632,
1305,
9380,
1305,
13,
288,
3639,
2985,
8267,
707,
273,
709,
72,
18,
588,
2326,
5621,
7734,
348,
1632,
797,... |
if(time >= olf.start && time < olf.end) { | if((time >= olf.start) && (time < olf.end)) { | public void sendLogByContainedDate(long time, OutputStream os) throws IOException { OldLogFile toReturn = null; synchronized(logFiles) { Iterator i = logFiles.iterator(); while(i.hasNext()) { OldLogFile olf = (OldLogFile) i.next(); Logger.minor(this, "Checking "+time+" against "+olf.filename+" : start="+olf.start+", end="+olf.end); if(time >= olf.start && time < olf.end) { toReturn = olf; Logger.minor(this, "Found "+olf); break; } } if(toReturn == null) return; // couldn't find it } FileInputStream fis = new FileInputStream(toReturn.filename); DataInputStream dis = new DataInputStream(fis); long written = 0; long size = toReturn.size; byte[] buf = new byte[4096]; while(written < size) { int toRead = (int) Math.min(buf.length, (size - written)); try { dis.readFully(buf, 0, toRead); } catch (IOException e) { Logger.error(this, "Could not read bytes "+written+" to "+(written + toRead)+" from file "+toReturn.filename+" which is supposed to be "+size+" bytes ("+toReturn.filename.length()+")"); return; } os.write(buf, 0, toRead); written += toRead; } } | 46731 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46731/ca136843ae9ecb30cadada58a33a5dc2cf8ad064/FileLoggerHook.java/buggy/src/freenet/support/FileLoggerHook.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1366,
1343,
858,
660,
8707,
1626,
12,
5748,
813,
16,
8962,
1140,
13,
1216,
1860,
288,
202,
202,
7617,
19103,
24029,
273,
446,
31,
202,
202,
22043,
12,
1330,
2697,
13,
288... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1366,
1343,
858,
660,
8707,
1626,
12,
5748,
813,
16,
8962,
1140,
13,
1216,
1860,
288,
202,
202,
7617,
19103,
24029,
273,
446,
31,
202,
202,
22043,
12,
1330,
2697,
13,
288... |
.getStringProperty( module, ImageItem.SOURCE_PROP ); | .getStringProperty( module, IImageItemModel.SOURCE_PROP ); | public void end( ) throws SAXException { Module module = handler.getModule( ); if ( image.getLocalProperty( module, ImageItem.SOURCE_PROP ) == null && handler.versionNumber <= VersionUtil.VERSION_3_2_3 ) checkImageType( ); String refType = image .getStringProperty( module, ImageItem.SOURCE_PROP ); if ( DesignChoiceConstants.IMAGE_REF_TYPE_EXPR .equalsIgnoreCase( refType ) ) { String valueExpr = image.getStringProperty( module, ImageItem.VALUE_EXPR_PROP ); if ( StringUtil.isEmpty( valueExpr ) ) { handler .getErrorHandler( ) .semanticError( new DesignParserException( DesignParserException.DESIGN_EXCEPTION_INVALID_IMAGEREF_EXPR_VALUE ) ); } } else if ( DesignChoiceConstants.IMAGE_REF_TYPE_URL .equalsIgnoreCase( refType ) || DesignChoiceConstants.IMAGE_REF_TYPE_FILE .equalsIgnoreCase( refType ) ) { String uri = image.getStringProperty( module, ImageItem.URI_PROP ); if ( StringUtil.isEmpty( uri ) ) { handler .getErrorHandler( ) .semanticError( new DesignParserException( DesignParserException.DESIGN_EXCEPTION_INVALID_IMAGE_URL_VALUE ) ); } } else if ( DesignChoiceConstants.IMAGE_REF_TYPE_EMBED .equalsIgnoreCase( refType ) ) { String name = image.getStringProperty( module, ImageItem.IMAGE_NAME_PROP ); if ( StringUtil.isEmpty( name ) ) { handler .getErrorHandler( ) .semanticError( new DesignParserException( DesignParserException.DESIGN_EXCEPTION_INVALID_IMAGE_NAME_VALUE ) ); } } super.end( ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/d802c33711e0d111551ae23575895cd060f085b6/ImageState.java/clean/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/parser/ImageState.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
679,
12,
262,
1216,
14366,
202,
95,
202,
202,
3120,
1605,
273,
1838,
18,
588,
3120,
12,
11272,
202,
202,
430,
261,
1316,
18,
588,
2042,
1396,
12,
1605,
16,
3421,
1180,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
679,
12,
262,
1216,
14366,
202,
95,
202,
202,
3120,
1605,
273,
1838,
18,
588,
3120,
12,
11272,
202,
202,
430,
261,
1316,
18,
588,
2042,
1396,
12,
1605,
16,
3421,
1180,
... |
if (classGen.isExternal() || _escaped) { il.append(classGen.loadTranslet()); final int sindex = ((Variable)_variable).getStackIndex(); il.append(new PUSH(cpg, sindex)); final int getVar = cpg.addMethodref(TRANSLET_CLASS, GET_VARIABLE, GET_VARIABLE_SIG); il.append(new INVOKEVIRTUAL(getVar)); _type.translateUnBox(classGen, methodGen); | if (classGen.isExternal()) { Closure variableClosure = _closure; while (variableClosure != null) { if (variableClosure.inInnerClass()) break; variableClosure = variableClosure.getParentClosure(); } if (variableClosure != null) { il.append(ALOAD_0); il.append(new GETFIELD( cpg.addFieldref(variableClosure.getInnerClassName(), name, signature))); } else { il.append(_variable.loadInstruction()); _variable.removeReference(this); } | public void translate(ClassGenerator classGen, MethodGenerator methodGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); // Fall-through for variables that are implemented as methods if (_type.implementedAsMethod()) return; final String name = _variable.getVariable(); if (_variable.isLocal()) { if (classGen.isExternal() || _escaped) { il.append(classGen.loadTranslet()); final int sindex = ((Variable)_variable).getStackIndex(); il.append(new PUSH(cpg, sindex)); final int getVar = cpg.addMethodref(TRANSLET_CLASS, GET_VARIABLE, GET_VARIABLE_SIG); il.append(new INVOKEVIRTUAL(getVar)); _type.translateUnBox(classGen, methodGen); } else { il.append(_variable.loadInstruction()); _variable.removeReference(this); } } else { final String signature = _type.toSignature(); final String className = classGen.getClassName(); il.append(classGen.loadTranslet()); // If inside a predicate we must cast this ref down if (classGen.isExternal()) { il.append(new CHECKCAST(cpg.addClass(className))); } il.append(new GETFIELD(cpg.addFieldref(className,name,signature))); } if (_variable.getType() instanceof NodeSetType) { // The method cloneIterator() also does resetting final int clone = cpg.addInterfaceMethodref(NODE_ITERATOR, "cloneIterator", "()" + NODE_ITERATOR_SIG); il.append(new INVOKEINTERFACE(clone, 1)); } } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/00a93536f5d540e84d3bba1a356b60bc17fb7bef/VariableRef.java/clean/src/org/apache/xalan/xsltc/compiler/VariableRef.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4204,
12,
797,
3908,
667,
7642,
16,
2985,
3908,
707,
7642,
13,
288,
202,
6385,
10551,
2864,
7642,
3283,
75,
273,
667,
7642,
18,
588,
6902,
2864,
5621,
202,
6385,
24605,
682,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4204,
12,
797,
3908,
667,
7642,
16,
2985,
3908,
707,
7642,
13,
288,
202,
6385,
10551,
2864,
7642,
3283,
75,
273,
667,
7642,
18,
588,
6902,
2864,
5621,
202,
6385,
24605,
682,
... |
setCharacterStreamInternal(i, x.getCharacterStream(), streamLength); | setCharacterStreamInternal(i, x.getCharacterStream(), false, streamLength); | public void setClob (int i, Clob x) throws SQLException { checkStatus(); int colType; synchronized (getConnectionSynchronization()) { colType = getParameterJDBCType(i); } // DB2, only allow setClob on a CLOB column. if (colType != Types.CLOB) throw dataTypeConversion(i, "java.sql.Clob"); if (x == null) setNull(i, Types.CLOB); else { // 1. max number of characters that can be inserted into a clob column // is 2Gb-1 which is Integer.MAX_INT. // This means that we do not allow any inserts of clobs where // clob.length() > Integer.MAX_INT. For now, we cast the x.length() // to int as a result. This will work ok for valid clob values that // derby supports. If we ever decide to increase these limits for clobs, in that // case the cast of x.Length() to int would not be appropriate. // 2. Note, x.length() needs to be called before retrieving the // stream using x.getCharacterStream() because EmbedClob.length() // will read from the stream and drain the stream. // Hence the need to declare this local variable - streamLength long streamLength = x.length(); setCharacterStreamInternal(i, x.getCharacterStream(), streamLength); } } | 56322 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56322/242c9bda1c1d17214c7658796d4b08809bdad2db/EmbedPreparedStatement.java/clean/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
11440,
1295,
261,
474,
277,
16,
385,
1295,
619,
13,
3639,
1216,
6483,
565,
288,
3639,
866,
1482,
5621,
3639,
509,
645,
559,
31,
3639,
3852,
261,
588,
1952,
30196,
10756,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
11440,
1295,
261,
474,
277,
16,
385,
1295,
619,
13,
3639,
1216,
6483,
565,
288,
3639,
866,
1482,
5621,
3639,
509,
645,
559,
31,
3639,
3852,
261,
588,
1952,
30196,
10756,
3639,
... |
if (boundary == null) return BOUNDARY_NONE; int length = line_buf.length(); byte line[] = line_buf.toBytes(); if (length < 3 || line[0] != '-' || line[1] != '-') return BOUNDARY_NONE; while(length > 2 && (line[length-1] <= ' ')) length--; int blen = boundary.length(); boolean term_p = false; if (length == blen + 4 && line[length-1] == '-' && line[length-2] == '-') { term_p = true; length -= 2; | if (boundary == null) return BOUNDARY_NONE; int length = line_buf.length(); byte line[] = line_buf.toBytes(); if (length < 3 || line[0] != '-' || line[1] != '-') return BOUNDARY_NONE; while(length > 2 && (line[length-1] <= ' ')) length--; int blen = boundary.length(); boolean term_p = false; if (length == blen + 4 && line[length-1] == '-' && line[length-2] == '-') { term_p = true; length -= 2; } if (blen != length-2) return BOUNDARY_NONE; byte bbytes[] = boundary.toBytes(); for (int i = 0; i < length-2; i++) if (line[i+2] != bbytes[i]) return BOUNDARY_NONE; if (term_p) return BOUNDARY_TERMINATOR; else return BOUNDARY_SEPARATOR; | protected int checkBoundary(ByteBuf line_buf) { if (boundary == null) return BOUNDARY_NONE; int length = line_buf.length(); byte line[] = line_buf.toBytes(); if (length < 3 || line[0] != '-' || line[1] != '-') return BOUNDARY_NONE; // strip trailing whitespace (including the newline.) while(length > 2 && (line[length-1] <= ' ')) length--; int blen = boundary.length(); boolean term_p = false; // Could this be a terminating boundary? if (length == blen + 4 && line[length-1] == '-' && line[length-2] == '-') { term_p = true; length -= 2; } // If the two don't have the same length (modulo trailing dashes) // then they can't match. if (blen != length-2) return BOUNDARY_NONE; // Compare each byte, and bug out if there's a mismatch. // (Note that if `boundary' is "xxx" then `line' is "--xxx"; // that's what the +2 is for.) byte bbytes[] = boundary.toBytes(); for (int i = 0; i < length-2; i++) if (line[i+2] != bbytes[i]) return BOUNDARY_NONE; // Success! Return the type of boundary. if (term_p) return BOUNDARY_TERMINATOR; else return BOUNDARY_SEPARATOR; } | 7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/0cc63cb388a13f01532486f9d178811914e6d71b/MimeMultipart.java/clean/grendel/sources/grendel/mime/parser/MimeMultipart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
509,
866,
11941,
12,
3216,
5503,
980,
67,
4385,
13,
288,
565,
309,
261,
16604,
422,
446,
13,
1377,
327,
9784,
5240,
6043,
67,
9826,
31,
565,
509,
769,
273,
980,
67,
4385,
18,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
509,
866,
11941,
12,
3216,
5503,
980,
67,
4385,
13,
288,
565,
309,
261,
16604,
422,
446,
13,
1377,
327,
9784,
5240,
6043,
67,
9826,
31,
565,
509,
769,
273,
980,
67,
4385,
18,
24... |
return (RubyModule) evaluatedPath; | return (RubyModule) type; | public RubyModule getClassFromPath(String path) { RubyModule result = getClass(path); if (result != null) { return result; } IRubyObject evaluatedPath = ruby.evalScript(path); RubyClass type = evaluatedPath.getType(); if (type != getClassClass() && type != getModuleClass()) { return null; } return (RubyModule) evaluatedPath; } | 50993 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50993/76d37f709db398798e5b6a889937559a9e75e062/RubyClasses.java/clean/org/jruby/RubyClasses.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
3120,
2900,
23064,
12,
780,
589,
13,
288,
3639,
19817,
3120,
563,
273,
2900,
12,
803,
1769,
3639,
309,
261,
2088,
480,
446,
13,
288,
5411,
327,
563,
31,
3639,
289,
3639,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
3120,
2900,
23064,
12,
780,
589,
13,
288,
3639,
19817,
3120,
563,
273,
2900,
12,
803,
1769,
3639,
309,
261,
2088,
480,
446,
13,
288,
5411,
327,
563,
31,
3639,
289,
3639,
15... |
if( matches(copy,base) && clmatch<1e-09 ) { | if( matches(copy,base) && exactChildListMatch(copy,base) ) { | private void setMatchTypes( ONode base ) {// System.out.println("SMT: " + base.toString()); getFirstMapping(base); if( getNextMapping() != null ) { // The node is copied, we must resolve main copies as well as child/structmatches // 1st task: find main copy ONode copy = getFirstMapping(base), master=null; boolean search = true; double clmin = 1e+99; // First candidate is perfect clist && match, second best possible clist. while( copy != null && search) {// System.out.println("Loop1"); double clmatch = childListDist(copy,base); if( matches(copy,base) && clmatch<1e-09 ) { master = copy; search = false; // Fund a suitable master } else if( clmatch<clmin ) { master=copy; clmin = clmatch; } copy = getNextMapping(); } // POSSIBLE ACTION here: if clist is baad, then remove the mapping altogether. copy = getFirstMapping(base); Set removed = new HashSet(); while( copy != null ) {// System.out.println("Loop2"); if( copy != master ) { boolean structMatch = exactChildListMatch(master,copy); boolean contMatch = matches( master, copy ); if( !structMatch && !contMatch) removed.add(copy); else copy.matchType = (contMatch ? BranchNode.MATCH_CONTENT : 0) + (structMatch ? BranchNode.MATCH_CHILDREN : 0); System.out.println("MTYPE="+copy.matchType+" for "+copy.toString()); } copy = getNextMapping(); } for( Iterator i=removed.iterator();i.hasNext();) { ONode n = (ONode) i.next(); delMatching(base,n ); delMatching(n,base ); } } // if copy for(int i=0;i<base.getChildCount();i++) setMatchTypes(base.getChild(i)); } | 7752 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7752/03719fcc38ef1b67d88238f5761e60ab51623d85/ProtoBestMatching.java/clean/3dm/src/ProtoBestMatching.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
444,
2060,
2016,
12,
531,
907,
1026,
262,
288,
759,
565,
2332,
18,
659,
18,
8222,
2932,
55,
6152,
30,
315,
397,
1026,
18,
10492,
10663,
565,
7521,
3233,
12,
1969,
1769,
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,
3238,
918,
444,
2060,
2016,
12,
531,
907,
1026,
262,
288,
759,
565,
2332,
18,
659,
18,
8222,
2932,
55,
6152,
30,
315,
397,
1026,
18,
10492,
10663,
565,
7521,
3233,
12,
1969,
1769,
565,
... |
throw new PSQLException("postgresql.fp.protocol", new Character((char)c)); | throw new PSQLException("postgresql.fp.protocol", PSQLState.COMMUNICATION_ERROR, new Character((char)c)); | private Object fastpathV3(int fnid, boolean resulttype, FastpathArg[] args) throws SQLException { // added Oct 7 1998 to give us thread safety synchronized (stream) { // send the function call try { int l_msgLen = 0; l_msgLen += 16; for (int i=0;i < args.length;i++) l_msgLen += args[i].sendSize(); stream.SendChar('F'); stream.SendInteger(l_msgLen,4); stream.SendInteger(fnid, 4); stream.SendInteger(1,2); stream.SendInteger(1,2); stream.SendInteger(args.length,2); for (int i = 0;i < args.length;i++) args[i].send(stream); stream.SendInteger(1,2); // This is needed, otherwise data can be lost stream.flush(); } catch (IOException ioe) { throw new PSQLException("postgresql.fp.send", PSQLState.COMMUNICATION_ERROR, new Integer(fnid), ioe); } // Now handle the result // Now loop, reading the results Object result = null; // our result PSQLException error = null; int c; boolean l_endQuery = false; while (!l_endQuery) { c = stream.ReceiveChar(); switch (c) { case 'A': // Asynchronous Notify int pid = stream.ReceiveInteger(4); String msg = stream.ReceiveString(conn.getEncoding()); conn.addNotification(new org.postgresql.core.Notification(msg, pid)); break; //------------------------------ // Error message returned case 'E': int l_elen = stream.ReceiveIntegerR(4); String totalMessage = conn.getEncoding().decode(stream.Receive(l_elen-4)); PSQLException l_error = PSQLException.parseServerError(totalMessage); if (error != null) { error.setNextException(l_error); } else { error = l_error; } break; //------------------------------ // Notice from backend case 'N': int l_nlen = stream.ReceiveIntegerR(4); conn.addWarning(conn.getEncoding().decode(stream.Receive(l_nlen-4))); break; case 'V': int l_msgLen = stream.ReceiveIntegerR(4); int l_valueLen = stream.ReceiveIntegerR(4); if (l_valueLen == -1) { //null value } else if (l_valueLen == 0) { result = new byte[0]; } else { // Return an Integer if if (resulttype) result = new Integer(stream.ReceiveIntegerR(l_valueLen)); else { byte buf[] = new byte[l_valueLen]; stream.Receive(buf, 0, l_valueLen); result = buf; } } break; case 'Z': //TODO: use size better if (stream.ReceiveIntegerR(4) != 5) throw new PSQLException("postgresql.con.setup", PSQLState.CONNECTION_UNABLE_TO_CONNECT); //TODO: handle transaction status char l_tStatus = (char)stream.ReceiveChar(); l_endQuery = true; break; default: throw new PSQLException("postgresql.fp.protocol", new Character((char)c)); } } if ( error != null ) throw error; return result; } } | 46563 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46563/509a9cd3f922c38c19d35e81bb1427d663ba4aba/Fastpath.java/buggy/src/interfaces/jdbc/org/postgresql/fastpath/Fastpath.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1033,
14469,
58,
23,
12,
474,
2295,
350,
16,
1250,
563,
723,
16,
9545,
803,
4117,
8526,
833,
13,
1216,
6483,
202,
95,
202,
202,
759,
3096,
29482,
2371,
23673,
28,
358,
8492,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
14469,
58,
23,
12,
474,
2295,
350,
16,
1250,
563,
723,
16,
9545,
803,
4117,
8526,
833,
13,
1216,
6483,
202,
95,
202,
202,
759,
3096,
29482,
2371,
23673,
28,
358,
8492,
... |
checkForDuplicates(info); } | checkForDuplicates(info); } | public void addJob(JobInfo info) { checkForDuplicates(info); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/61a3852dd97cae660315c88e82302cd4c0301d5d/FinishedJobs.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/FinishedJobs.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
527,
2278,
12,
2278,
966,
1123,
13,
288,
7734,
13855,
23897,
12,
1376,
1769,
5411,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
527,
2278,
12,
2278,
966,
1123,
13,
288,
7734,
13855,
23897,
12,
1376,
1769,
5411,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if ( artifact.getFile().exists() && !localMetadata.newerThanFile( artifact.getFile() ) ) | String version = localMetadata.constructVersion(); if ( getLogger().isInfoEnabled() && !alreadyResolved ) | public void transformForResolve( Artifact artifact, List remoteRepositories, ArtifactRepository localRepository ) throws ArtifactMetadataRetrievalException { Matcher m = SnapshotArtifactMetadata.VERSION_FILE_PATTERN.matcher( artifact.getBaseVersion() ); if ( m.matches() ) { // This corrects the base version, but ensure it is not resolved again artifact.setBaseVersion( m.group( 1 ) + "-SNAPSHOT" ); } else if ( isSnapshot( artifact ) ) { SnapshotArtifactMetadata localMetadata; try { localMetadata = SnapshotArtifactMetadata.readFromLocalRepository( artifact, localRepository ); } catch ( ArtifactPathFormatException e ) { throw new ArtifactMetadataRetrievalException( "Error reading local metadata", e ); } catch ( IOException e ) { throw new ArtifactMetadataRetrievalException( "Error reading local metadata", e ); } boolean alreadyResolved = alreadyResolved( artifact ); if ( !alreadyResolved ) { boolean checkedUpdates = false; for ( Iterator i = remoteRepositories.iterator(); i.hasNext(); ) { ArtifactRepository remoteRepository = (ArtifactRepository) i.next(); String snapshotPolicy = remoteRepository.getSnapshotPolicy(); // TODO: should be able to calculate this less often boolean checkForUpdates = false; if ( ArtifactRepository.SNAPSHOT_POLICY_ALWAYS.equals( snapshotPolicy ) ) { checkForUpdates = true; } else if ( ArtifactRepository.SNAPSHOT_POLICY_DAILY.equals( snapshotPolicy ) ) { // Note that if last modified is 0, it didn't exist, so this will be true if ( getMidnightBoundary().after( new Date( localMetadata.getLastModified() ) ) ) { checkForUpdates = true; } } else if ( snapshotPolicy.startsWith( ArtifactRepository.SNAPSHOT_POLICY_INTERVAL ) ) { String s = snapshotPolicy.substring( ArtifactRepository.SNAPSHOT_POLICY_INTERVAL.length() + 1 ); int minutes = Integer.valueOf( s ).intValue(); Calendar cal = Calendar.getInstance(); cal.add( Calendar.MINUTE, -minutes ); // Note that if last modified is 0, it didn't exist, so this will be true if ( cal.getTime().after( new Date( localMetadata.getLastModified() ) ) ) { checkForUpdates = true; } } // else assume "never" if ( checkForUpdates ) { getLogger().info( artifact.getArtifactId() + ": checking for updates from " + remoteRepository.getId() ); SnapshotArtifactMetadata remoteMetadata = SnapshotArtifactMetadata.retrieveFromRemoteRepository( artifact, remoteRepository, wagonManager ); if ( remoteMetadata.compareTo( localMetadata ) > 0 ) { artifact.setRepository( remoteRepository ); localMetadata = remoteMetadata; } checkedUpdates = true; } } if ( checkedUpdates ) { localMetadata.storeInLocalRepository( localRepository ); } resolvedArtifactCache.add( getCacheKey( artifact ) ); } // TODO: if the POM and JAR are inconsistent, this might mean that different version of each are used if ( artifact.getFile().exists() && !localMetadata.newerThanFile( artifact.getFile() ) ) { if ( !alreadyResolved ) { // Locally installed file is newer, don't use the resolved version getLogger().info( artifact.getArtifactId() + ": using locally installed snapshot" ); } } else { String version = localMetadata.constructVersion(); if ( getLogger().isInfoEnabled() ) { if ( !version.equals( artifact.getBaseVersion() ) && !alreadyResolved ) { String message = artifact.getArtifactId() + ": resolved to version " + version; if ( artifact.getRepository() != null ) { message += " from repository " + artifact.getRepository().getId(); } else { message += " from local repository"; } getLogger().info( message ); } } artifact.setVersion( version ); try { artifact.setFile( new File( localRepository.getBasedir(), localRepository.pathOf( artifact ) ) ); } catch ( ArtifactPathFormatException e ) { throw new ArtifactMetadataRetrievalException( "Error reading local metadata", e ); } } } } | 47050 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47050/4b0f51b9a19c7b03fefdf8d0f44fa5f4de663bd0/SnapshotTransformation.java/clean/maven-artifact/src/main/java/org/apache/maven/artifact/transform/SnapshotTransformation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2510,
1290,
8460,
12,
14022,
6462,
16,
987,
2632,
18429,
16,
14022,
3305,
1191,
3305,
262,
3639,
1216,
14022,
2277,
27356,
503,
565,
288,
3639,
9757,
312,
273,
10030,
7581,
2277,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2510,
1290,
8460,
12,
14022,
6462,
16,
987,
2632,
18429,
16,
14022,
3305,
1191,
3305,
262,
3639,
1216,
14022,
2277,
27356,
503,
565,
288,
3639,
9757,
312,
273,
10030,
7581,
2277,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.