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 |
|---|---|---|---|---|---|---|
try { if (rowStart == true) { if (currIndex > 0) IOUtil.writeInt(this.rowExprsDos, RDIOUtil.RowSeparator); | try { if ( rowStart == true ) { if ( currIndex > 0 ) IOUtil.writeInt( this.rowExprsDos, RDIOUtil.RowSeparator ); | private void saveWhenInOneRow(int currIndex, String exprID, Object exprValue) throws DataException { ByteArrayOutputStream tempBaos = new ByteArrayOutputStream(); BufferedOutputStream tempBos = new BufferedOutputStream(tempBaos); DataOutputStream tempDos = new DataOutputStream(tempBos); try { if (rowStart == true) { if (currIndex > 0) IOUtil.writeInt(this.rowExprsDos, RDIOUtil.RowSeparator); IOUtil.writeInt(tempDos, RDIOUtil.ColumnSeparator); } else { IOUtil.writeInt(tempDos, RDIOUtil.ColumnSeparator); } IOUtil.writeString(tempDos, exprID); IOUtil.writeObject(tempDos, exprValue); tempDos.flush(); tempBos.flush(); tempBaos.flush(); byte[] bytes = tempBaos.toByteArray(); currRowBytes += bytes.length; IOUtil.writeRawBytes(this.rowExprsDos, bytes); tempBaos = null; tempBos = null; tempDos = null; rowStart = false; } catch (IOException e) { throw new DataException(ResourceConstants.RD_SAVE_ERROR, e, "Result Data"); } exprNameSet.add(exprID); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/7f50e12b6336aaa1d5cb539eef819c63548feb2a/RowSaveUtil.java/clean/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/document/RowSaveUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1923,
9434,
382,
3335,
1999,
12,
474,
4306,
1016,
16,
514,
3065,
734,
16,
1033,
3065,
620,
13,
1082,
202,
15069,
1910,
503,
288,
202,
202,
8826,
4632,
1906,
38,
69,
538,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1923,
9434,
382,
3335,
1999,
12,
474,
4306,
1016,
16,
514,
3065,
734,
16,
1033,
3065,
620,
13,
1082,
202,
15069,
1910,
503,
288,
202,
202,
8826,
4632,
1906,
38,
69,
538,... |
TerritoryAttatchment t1a = TerritoryAttatchment.get(t1); if (t1a.isOriginalFactory() && isOriginalOwner(t1, player)) return t1; TerritoryAttatchment t2a = TerritoryAttatchment.get(t2); if (t2a.isOriginalFactory() && isOriginalOwner(t2, player)) return t2; | TerritoryAttatchment t1a = TerritoryAttatchment.get(t1); if (t1a.isOriginalFactory() && isOriginalOwner(t1, player)) return t1; TerritoryAttatchment t2a = TerritoryAttatchment.get(t2); if (t2a.isOriginalFactory() && isOriginalOwner(t2, player)) return t2; | private Territory getBetterProducer(Territory t1, Territory t2, PlayerID player) { //anything is better than nothing if (t1 == null) return t2; if (t2 == null) return t1; //conquered cant produce if (wasConquered(t1)) return t2; if (wasConquered(t2)) return t1; //original factories are good TerritoryAttatchment t1a = TerritoryAttatchment.get(t1); if (t1a.isOriginalFactory() && isOriginalOwner(t1, player)) return t1; TerritoryAttatchment t2a = TerritoryAttatchment.get(t2); if (t2a.isOriginalFactory() && isOriginalOwner(t2, player)) return t2; //which can produce the most if (getProduction(t1) - getAlreadyProduced(t1).size() > getProduction(t2) - getAlreadyProduced(t1).size()) return t1; return t2; } | 8339 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8339/1ce4f0ed1b98517b885661c3695c3d788f6b9979/AbstractPlaceDelegate.java/buggy/src/games/strategy/triplea/delegate/AbstractPlaceDelegate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
399,
25313,
2882,
11214,
12140,
12,
56,
25313,
268,
21,
16,
399,
25313,
268,
22,
16,
19185,
734,
7291,
13,
565,
288,
3639,
368,
2273,
4274,
353,
7844,
2353,
5083,
3639,
309,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
399,
25313,
2882,
11214,
12140,
12,
56,
25313,
268,
21,
16,
399,
25313,
268,
22,
16,
19185,
734,
7291,
13,
565,
288,
3639,
368,
2273,
4274,
353,
7844,
2353,
5083,
3639,
309,
261,
... |
} catch (Throwable e) { queryStatus.add(TracUiPlugin.toStatus(e)); return hits; | for (TracTicket ticket : tickets) { TracQueryHit hit = new TracQueryHit(query.getRepositoryUrl(), getTicketDescription(ticket), ticket .getId() + ""); hit.setCompleted(TracTask.isCompleted(ticket.getValue(Key.STATUS))); hit.setPriority(TracTask.getMylarPriority(ticket.getValue(Key.PRIORITY))); resultCollector.accept(hit); } } catch (Throwable e) { return TracUiPlugin.toStatus(e); | public List<AbstractQueryHit> performQuery(AbstractRepositoryQuery query, IProgressMonitor monitor, MultiStatus queryStatus) { List<AbstractQueryHit> hits = new ArrayList<AbstractQueryHit>(); final List<TracTicket> tickets = new ArrayList<TracTicket>(); String url = query.getRepositoryUrl(); TaskRepository taskRepository = TasksUiPlugin.getRepositoryManager().getRepository( TracCorePlugin.REPOSITORY_KIND, url); ITracClient tracRepository; try { tracRepository = getClientManager().getRepository(taskRepository); if (query instanceof TracRepositoryQuery) { tracRepository.search(((TracRepositoryQuery) query).getTracSearch(), tickets); } } catch (Throwable e) { queryStatus.add(TracUiPlugin.toStatus(e)); return hits; } for (TracTicket ticket : tickets) { TracQueryHit hit = new TracQueryHit(query.getRepositoryUrl(), getTicketDescription(ticket), ticket.getId() + ""); hit.setCompleted(TracTask.isCompleted(ticket.getValue(Key.STATUS))); hit.setPriority(TracTask.getMylarPriority(ticket.getValue(Key.PRIORITY))); hits.add(hit); } queryStatus.add(Status.OK_STATUS); return hits; } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/6f976ecb8642ca1074f37457cf105716e4374c11/TracRepositoryConnector.java/clean/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracRepositoryConnector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
32,
7469,
1138,
13616,
34,
3073,
1138,
12,
7469,
3305,
1138,
843,
16,
467,
5491,
7187,
6438,
16,
1082,
202,
5002,
1482,
843,
1482,
13,
288,
202,
202,
682,
32,
7469,
1138,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
32,
7469,
1138,
13616,
34,
3073,
1138,
12,
7469,
3305,
1138,
843,
16,
467,
5491,
7187,
6438,
16,
1082,
202,
5002,
1482,
843,
1482,
13,
288,
202,
202,
682,
32,
7469,
1138,... |
DOMInput in = impl.createDOMInput(); | LSInput in = impl.createLSInput(); | public static void main( String[] argv) { try { boolean namespaces = true; System.out.println("Running dom.dom3.Test..."); System.setProperty(DOMImplementationRegistry.PROPERTY,"org.apache.xerces.dom.DOMImplementationSourceImpl"); DOMImplementationLS impl = (DOMImplementationLS)DOMImplementationRegistry.newInstance().getDOMImplementation("LS"); Assertion.verify(impl!=null, "domImplementation != null"); DOMParser builder = impl.createDOMParser(DOMImplementationLS.MODE_SYNCHRONOUS, null); DOMSerializer writer = impl.createDOMSerializer(); DOMConfiguration config = writer.getConfig(); config.setParameter("namespaces",(namespaces)?Boolean.TRUE:Boolean.FALSE); config.setParameter("validate",Boolean.FALSE); //---------------------------- // TEST: lookupPrefix // isDefaultNamespace // lookupNamespaceURI //---------------------------- //System.out.println("TEST #1: lookupPrefix, isDefaultNamespace, lookupNamespaceURI, input: tests/dom/dom3/input.xml"); { Document doc = builder.parseURI("tests/dom/dom3/input.xml"); NodeList ls = doc.getElementsByTagName("a:elem_a"); NodeImpl elem = (NodeImpl)ls.item(0); if (namespaces) { //System.out.println("[a:elem_a].lookupPrefix('http://www.example.com', true) == null"); Assertion.verify(elem.lookupPrefix("http://www.example.com").equals("ns1"), "[a:elem_a].lookupPrefix(http://www.example.com)==null"); //System.out.println("[a:elem_a].isDefaultNamespace('http://www.example.com') == true"); Assertion.verify(elem.isDefaultNamespace("http://www.example.com") == true, "[a:elem_a].isDefaultNamespace(http://www.example.com)==true"); //System.out.println("[a:elem_a].lookupPrefix('http://www.example.com', false) == ns1"); Assertion.verify(elem.lookupPrefix("http://www.example.com").equals("ns1"), "[a:elem_a].lookupPrefix(http://www.example.com)==ns1"); Assertion.verify(elem.lookupNamespaceURI("xsi").equals("http://www.w3.org/2001/XMLSchema-instance"), "[a:elem_a].lookupNamespaceURI('xsi') == 'http://www.w3.org/2001/XMLSchema-instance'" ); } else { Assertion.verify( elem.lookupPrefix("http://www.example.com") == null,"lookupPrefix(http://www.example.com)==null"); } ls = doc.getElementsByTagName("bar:leaf"); elem = (NodeImpl)ls.item(0); Assertion.verify(elem.lookupPrefix("url1:").equals("foo"), "[bar:leaf].lookupPrefix('url1:', false) == foo"); //System.out.println("[bar:leaf].lookupPrefix('url1:', false) == "+ ); //System.out.println("==>Create b:baz with namespace 'b:' and xmlns:x='b:'"); ls = doc.getElementsByTagName("baz"); elem = (NodeImpl)ls.item(0); ls = doc.getElementsByTagName("elem8"); elem = (NodeImpl)ls.item(0); Element e1 = doc.createElementNS("b:","p:baz"); e1.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:x", "b:"); elem.appendChild(e1); Assertion.verify(((NodeImpl)e1).lookupPrefix("b:").equals("p"), "[p:baz].lookupPrefix('b:', false) == p"); //System.out.println("[p:baz].lookupPrefix('b:', false) == "+ ((NodeImpl)e1).lookupPrefix("b:",false)); Assertion.verify(elem.lookupNamespaceURI("xsi").equals("http://www.w3.org/2001/XMLSchema-instance"), "[bar:leaf].lookupNamespaceURI('xsi') == 'http://www.w3.org/2001/XMLSchema-instance'" ); } //************************ //* Test normalizeDocument() //************************ //System.out.println("TEST #2: normalizeDocumention() - 3 errors, input: tests/dom/dom3/schema.xml"); { errorCounter = 0; config = builder.getConfig(); config.setParameter("error-handler",errorHandler); config.setParameter("validate", Boolean.TRUE); DocumentImpl core = (DocumentImpl)builder.parseURI("tests/dom/dom3/schema.xml"); Assertion.verify(errorCounter == 0, "No errors should be reported"); errorCounter = 0; NodeList ls2 = core.getElementsByTagName("decVal"); Element testElem = (Element)ls2.item(0); testElem.removeAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns"); ls2 = core.getElementsByTagName("v02:decVal"); testElem = (Element)ls2.item(0); testElem.setPrefix("myPrefix"); Element root = core.getDocumentElement(); Element newElem = core.createElementNS(null, "decVal"); String data="4.5"; if (true) { data = "string"; } newElem.appendChild(core.createTextNode(data)); root.insertBefore(newElem, testElem); newElem = core.createElementNS(null, "notInSchema"); newElem.appendChild(core.createTextNode("added new element")); root.insertBefore(newElem, testElem); root.appendChild(core.createElementNS("UndefinedNamespace", "NS1:foo")); config = core.getDomConfig(); config.setParameter("error-handler",errorHandler); config.setParameter("validate", Boolean.TRUE); core.normalizeDocument(); Assertion.verify(errorCounter == 3, "3 errors should be reported"); errorCounter = 0; config.setParameter("validate", Boolean.FALSE); config.setParameter("comments", Boolean.FALSE); core.normalizeDocument(); Assertion.verify(errorCounter == 0, "No errors should be reported"); config = builder.getConfig(); config.setParameter("validate", Boolean.FALSE); } //************************ //* Test normalizeDocument() //************************ // System.out.println("TEST #3: normalizeDocumention() + psvi, input: data/personal-schema.xml"); { errorCounter = 0; config = builder.getConfig(); config.setParameter("error-handler",errorHandler); config.setParameter("validate", Boolean.TRUE); config.setParameter("psvi", Boolean.TRUE); DocumentImpl core = (DocumentImpl)builder.parseURI("data/personal-schema.xml"); Assertion.verify(errorCounter == 0, "No errors should be reported"); NodeList ls2 = core.getElementsByTagName("person"); Element testElem = (Element)ls2.item(0); Assertion.verify(((ElementPSVI)testElem).getElementDeclaration().getName().equals("person"), "testElem decl"); Element e1 = core.createElementNS(null, "person"); core.getDocumentElement().appendChild(e1); e1.setAttributeNS(null, "id", "newEmp"); Element e2 = core.createElementNS(null, "name"); e2.appendChild(core.createElementNS(null, "family")); e2.appendChild(core.createElementNS(null, "given")); e1.appendChild(e2); e1.appendChild(core.createElementNS(null, "email")); Element e3 = core.createElementNS(null, "link"); e3.setAttributeNS(null, "manager", "Big.Boss"); e1.appendChild(e3); testElem.removeAttributeNode(testElem.getAttributeNodeNS(null, "contr")); NamedNodeMap map = testElem.getAttributes(); config = core.getDomConfig(); errorCounter = 0; config.setParameter("psvi", Boolean.TRUE); config.setParameter("error-handler",errorHandler); config.setParameter("validate", Boolean.TRUE); core.normalizeDocument(); Assertion.verify(errorCounter == 0, "No errors should be reported"); Assertion.verify(((ElementPSVI)e1).getElementDeclaration().getName().equals("person"), "e1 decl"); config = builder.getConfig(); config.setParameter("validate", Boolean.FALSE); } //************************ //* Test normalizeDocument(): core tests //************************ // System.out.println("TEST #4: normalizeDocument() core"); { // check that namespace normalization algorithm works correctly Document doc= new DocumentImpl(); Element root = doc.createElementNS("http://www.w3.org/1999/XSL/Transform", "xsl:stylesheet"); doc.appendChild(root); root.setAttributeNS("http://attr1", "xsl:attr1",""); Element child1 = doc.createElementNS("http://child1", "NS2:child1"); child1.setAttributeNS("http://attr2", "NS2:attr2",""); root.appendChild(child1); Element child2 = doc.createElementNS("http://child2","NS4:child2"); child2.setAttributeNS("http://attr3","attr3", ""); root.appendChild(child2); Element child3 = doc.createElementNS("http://www.w3.org/1999/XSL/Transform","xsl:child3"); child3.setAttributeNS("http://a1","attr1", ""); child3.setAttributeNS("http://a2","xsl:attr2", ""); child3.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:a1", "http://a1"); child3.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xsl", "http://a2"); Element child4 = doc.createElementNS(null, "child4"); child4.setAttributeNS("http://a1", "xsl:attr1", ""); child4.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", "default"); child3.appendChild(child4); root.appendChild(child3); ((CoreDocumentImpl)doc).normalizeDocument(); // // assertions // // xsl:stylesheet should include 2 namespace declarations String name = root.getNodeName(); Assertion.verify(name.equals("xsl:stylesheet"), "xsl:stylesheet"); String value = root.getAttributeNS("http://www.w3.org/2000/xmlns/", "xsl"); Assertion.verify(value!=null, "xmlns:xsl != null"); Assertion.verify(value.equals("http://www.w3.org/1999/XSL/Transform"), "xmlns:xsl="+value); value = root.getAttributeNS("http://www.w3.org/2000/xmlns/", "NS1"); Assertion.verify(value!=null && value.equals("http://attr1"), "xmlns:NS1="+value); // child includes 2 namespace decls Assertion.verify(child1.getNodeName().equals("NS2:child1"), "NS2:child1"); value = child1.getAttributeNS("http://www.w3.org/2000/xmlns/", "NS2"); Assertion.verify(value!=null && value.equals("http://child1"), "xmlns:NS2="+value); value = child1.getAttributeNS("http://www.w3.org/2000/xmlns/", "NS1"); Assertion.verify(value!=null && value.equals("http://attr2"), "xmlns:NS1="+value); // child3 Assertion.verify(child3.getNodeName().equals("xsl:child3"), "xsl:child3"); value = child3.getAttributeNS("http://www.w3.org/2000/xmlns/", "NS1"); Assertion.verify(value!=null && value.equals("http://a2"), "xmlns:NS1="+value); value = child3.getAttributeNS("http://www.w3.org/2000/xmlns/", "a1"); Assertion.verify(value!=null && value.equals("http://a1"), "xmlns:a1="+value); value = child3.getAttributeNS("http://www.w3.org/2000/xmlns/", "xsl"); Assertion.verify(value!=null && value.equals("http://www.w3.org/1999/XSL/Transform"), "xmlns:xsl="+value); Attr attr = child3.getAttributeNodeNS("http://a2", "attr2"); Assertion.verify(attr != null, "NS1:attr2 !=null"); Assertion.verify(child3.getAttributes().getLength() == 5, "xsl:child3 has 5 attrs"); // child 4 Attr temp = child4.getAttributeNodeNS("http://www.w3.org/2000/xmlns/", "xmlns"); Assertion.verify(temp.getNodeName().equals("xmlns"), "attribute name is xmlns"); Assertion.verify(temp.getNodeValue().length() == 0, "xmlns=''"); /* OutputFormat format = new OutputFormat((Document)doc); format.setLineSeparator(LineSeparator.Windows); format.setIndenting(true); format.setLineWidth(0); format.setPreserveSpace(true); XMLSerializer serializer = new XMLSerializer(System.out, format); serializer.serialize(doc); */ } //************************ //* Test normalizeDocument(): core tests //************************ //System.out.println("TEST #4: namespace fixup during serialization"); { Document doc= new DocumentImpl(); Element root = doc.createElementNS("http://www.w3.org/1999/XSL/Transform", "xsl:stylesheet"); doc.appendChild(root); root.setAttributeNS("http://attr1", "xsl:attr1",""); Element child1 = doc.createElementNS("http://child1", "NS2:child1"); child1.setAttributeNS("http://attr2", "NS2:attr2",""); root.appendChild(child1); Element child2 = doc.createElementNS("http://child2","NS4:child2"); child2.setAttributeNS("http://attr3","attr3", ""); root.appendChild(child2); Element child3 = doc.createElementNS("http://www.w3.org/1999/XSL/Transform","xsl:child3"); child3.setAttributeNS("http://a1","attr1", ""); child3.setAttributeNS("http://a2","xsl:attr2", ""); child3.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:a1", "http://a1"); child3.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xsl", "http://a2"); Element child4 = doc.createElementNS(null, "child4"); child4.setAttributeNS("http://a1", "xsl:attr1", ""); child4.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", "default"); child3.appendChild(child4); root.appendChild(child3); // serialize data writer.getConfig().setParameter("namespaces", Boolean.TRUE); String xmlData = writer.writeToString(doc); Reader r = new StringReader(xmlData); DOMInput in = impl.createDOMInput(); in.setCharacterStream(r); doc = builder.parse(in); // // make sure algorithm works correctly // root = doc.getDocumentElement(); child1 = (Element)root.getFirstChild(); child2 = (Element)child1.getNextSibling(); child3 = (Element)child2.getNextSibling(); // xsl:stylesheet should include 2 namespace declarations String name = root.getNodeName(); Assertion.verify(name.equals("xsl:stylesheet"), "xsl:stylesheet"); String value = root.getAttributeNS("http://www.w3.org/2000/xmlns/", "xsl"); Assertion.verify(value!=null, "xmlns:xsl != null"); Assertion.verify(value.equals("http://www.w3.org/1999/XSL/Transform"), "xmlns:xsl="+value); value = root.getAttributeNS("http://www.w3.org/2000/xmlns/", "NS1"); Assertion.verify(value!=null && value.equals("http://attr1"), "xmlns:NS1="+value); // child includes 2 namespace decls Assertion.verify(child1.getNodeName().equals("NS2:child1"), "NS2:child1"); value = child1.getAttributeNS("http://www.w3.org/2000/xmlns/", "NS2"); Assertion.verify(value!=null && value.equals("http://child1"), "xmlns:NS2="+value); value = child1.getAttributeNS("http://www.w3.org/2000/xmlns/", "NS1"); Assertion.verify(value!=null && value.equals("http://attr2"), "xmlns:NS1="+value); // child3 Assertion.verify(child3.getNodeName().equals("xsl:child3"), "xsl:child3"); value = child3.getAttributeNS("http://www.w3.org/2000/xmlns/", "NS1"); Assertion.verify(value!=null && value.equals("http://a2"), "xmlns:NS1="+value); value = child3.getAttributeNS("http://www.w3.org/2000/xmlns/", "a1"); Assertion.verify(value!=null && value.equals("http://a1"), "xmlns:a1="+value); value = child3.getAttributeNS("http://www.w3.org/2000/xmlns/", "xsl"); Assertion.verify(value!=null && value.equals("http://www.w3.org/1999/XSL/Transform"), "xmlns:xsl="+value); Attr attr = child3.getAttributeNodeNS("http://a2", "attr2"); Assertion.verify(attr != null, "NS6:attr2 !=null"); Assertion.verify(child3.getAttributes().getLength() == 5, "xsl:child3 has 5 attrs"); //OutputFormat format = new OutputFormat((Document)doc); //format.setLineSeparator(LineSeparator.Windows); //format.setIndenting(true); //format.setLineWidth(0); //format.setPreserveSpace(true); //XMLSerializer serializer = new XMLSerializer(System.out, format); //serializer.serialize(doc); } //************************ // TEST: replaceWholeText() // getWholeText() // //************************ //System.out.println("TEST #5: wholeText, input: tests/dom/dom3/wholeText.xml"); { config = builder.getConfig(); config.setParameter("error-handler",errorHandler); config.setParameter("validate", Boolean.FALSE); config.setParameter("entities", Boolean.TRUE); DocumentImpl doc = (DocumentImpl)builder.parseURI("tests/dom/dom3/wholeText.xml"); Element root = doc.getDocumentElement(); Element test = (Element)doc.getElementsByTagName("elem").item(0); test.appendChild(doc.createTextNode("Address: ")); test.appendChild(doc.createEntityReference("ent2")); test.appendChild(doc.createTextNode("City: ")); test.appendChild(doc.createEntityReference("ent1")); DocumentType doctype = doc.getDoctype(); Node entity = doctype.getEntities().getNamedItem("ent3"); NodeList ls = test.getChildNodes(); Assertion.verify(ls.getLength()==5, "List length"); String compare1 = "Home Address: 1900 Dallas Road (East) City: Dallas. California. USA PO #5668"; Assertion.verify(((TextImpl)ls.item(0)).getWholeText().equals(compare1), "Compare1"); String compare2 = "Address: 1900 Dallas Road (East) City: Dallas. California. USA PO #5668"; Assertion.verify(((TextImpl)ls.item(1)).getWholeText().equals(compare2), "Compare2"); //TEST replaceWholeText() ((NodeImpl)ls.item(0)).setReadOnly(true, true); TextImpl original = (TextImpl)ls.item(0); Node newNode = original.replaceWholeText("Replace with this text"); ls = test.getChildNodes(); Assertion.verify(ls.getLength() == 1, "Length == 1"); Assertion.verify(ls.item(0).getNodeValue().equals("Replace with this text"), "Replacement works"); Assertion.verify(newNode != original, "New node created"); // replace text for node which is not yet attached to the tree Text text = doc.createTextNode("readonly"); ((NodeImpl)text).setReadOnly(true, true); text = ((TextImpl)text).replaceWholeText("Data"); Assertion.verify(text.getNodeValue().equals("Data"), "New value 'Data'"); // test with second child that does not have any content test = (Element)doc.getElementsByTagName("elem").item(1); try { ((TextImpl)test.getFirstChild()).replaceWholeText("can't replace"); } catch (DOMException e){ Assertion.verify(e !=null); } String compare3 = "Test: The Content ends here. "; //Assertion.assert(((Text)test.getFirstChild()).getWholeText().equals(compare3), "Compare3"); } //************************ // TEST: schema-type // schema-location // //************************ { errorCounter = 0; config = builder.getConfig(); config.setParameter("error-handler",errorHandler); config.setParameter("resource-resolver",resolver); config.setParameter("validate", Boolean.TRUE); config.setParameter("psvi", Boolean.TRUE); // schema-type is not set validate against both grammars errorCounter = 0; DocumentImpl core2 = (DocumentImpl)builder.parseURI("tests/dom/dom3/both-error.xml"); Assertion.verify(errorCounter == 4, "4 errors should be reported"); errorCounter = 0; // set schema-type to be XML Schema config.setParameter("schema-type", "http://www.w3.org/2001/XMLSchema"); // test parsing a file that has both XML schema and DTD core2 = (DocumentImpl)builder.parseURI("tests/dom/dom3/both.xml"); Assertion.verify(errorCounter == 0, "No errors should be reported"); // parse a file with XML schema and DTD but validate against DTD only errorCounter = 0; config.setParameter("schema-type","http://www.w3.org/TR/REC-xml"); core2 = (DocumentImpl)builder.parseURI("tests/dom/dom3/both-error.xml"); Assertion.verify(errorCounter == 3, "3 errors should be reported"); // parse a file with DTD only but set schema-location and // validate against XML Schema // set schema location core2 = (DocumentImpl)builder.parseURI("tests/dom/dom3/both-error.xml"); // normalize document errorCounter = 0; Element root = core2.getDocumentElement(); root.removeAttributeNS("http://www.w3.org/2001/XMLSchema", "xsi"); root.removeAttributeNS("http://www.w3.org/2001/XMLSchema", "noNamespaceSchemaLocation"); config = core2.getDomConfig(); config.setParameter("error-handler",errorHandler); config.setParameter("schema-type", "http://www.w3.org/2001/XMLSchema"); config.setParameter("schema-location","personal.xsd"); config.setParameter("resource-resolver",resolver); config.setParameter("validate", Boolean.TRUE); core2.normalizeDocument(); Assertion.verify(errorCounter == 1, "1 error should be reported: "+errorCounter); } } catch ( Exception ex ) { ex.printStackTrace(); } System.out.println("done!"); } | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/d3787c91dabf67f7f2f7ee5aee04c490c6f849b1/Test.java/buggy/tests/dom/dom3/Test.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
514,
8526,
5261,
13,
288,
3639,
775,
288,
5411,
1250,
7728,
273,
638,
31,
5411,
2332,
18,
659,
18,
8222,
2932,
7051,
4092,
18,
9859,
23,
18,
4709,
7070,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
514,
8526,
5261,
13,
288,
3639,
775,
288,
5411,
1250,
7728,
273,
638,
31,
5411,
2332,
18,
659,
18,
8222,
2932,
7051,
4092,
18,
9859,
23,
18,
4709,
7070,
1769,
... |
this.keyClass = WritableName.getClass(Text.readString(in)); this.valClass = WritableName.getClass(Text.readString(in)); | this.keyClass = WritableName.getClass(Text.readString(in), conf); this.valClass = WritableName.getClass(Text.readString(in), conf); | private void init() throws IOException { byte[] versionBlock = new byte[VERSION.length]; in.readFully(versionBlock); if ((versionBlock[0] != VERSION[0]) || (versionBlock[1] != VERSION[1]) || (versionBlock[2] != VERSION[2])) throw new IOException(file + " not a SequenceFile"); // Set 'version' version = versionBlock[3]; if (version > VERSION[3]) throw new VersionMismatchException(VERSION[3], version); if (version < BLOCK_COMPRESS_VERSION) { UTF8 className = new UTF8(); className.readFields(in); // read key class name this.keyClass = WritableName.getClass(className.toString()); className.readFields(in); // read val class name this.valClass = WritableName.getClass(className.toString()); } else { this.keyClass = WritableName.getClass(Text.readString(in)); this.valClass = WritableName.getClass(Text.readString(in)); } if (version > 2) { // if version > 2 this.decompress = in.readBoolean(); // is compressed? } if (version >= BLOCK_COMPRESS_VERSION) { // if version >= 4 this.blockCompressed = in.readBoolean(); // is block-compressed? } if (version > 1) { // if version > 1 in.readFully(sync); // read sync bytes } // Initialize valBuffer = new DataInputBuffer(); if (decompress) { valInflater = new Inflater(); valIn = new DataInputStream(new BufferedInputStream( new InflaterInputStream(valBuffer, valInflater)) ); } else { valIn = new DataInputStream(new BufferedInputStream(valBuffer)); } if (blockCompressed) { keyLenBuffer = new DataInputBuffer(); keyBuffer = new DataInputBuffer(); valLenBuffer = new DataInputBuffer(); keyLenInflater = new Inflater(); keyLenIn = new DataInputStream(new BufferedInputStream( new InflaterInputStream(keyLenBuffer, keyLenInflater)) ); keyInflater = new Inflater(); keyIn = new DataInputStream(new BufferedInputStream( new InflaterInputStream(keyBuffer, keyInflater))); valLenInflater = new Inflater(); valLenIn = new DataInputStream(new BufferedInputStream( new InflaterInputStream(valLenBuffer, valLenInflater)) ); } lazyDecompress = conf.getBoolean("mapred.seqfile.lazydecompress", true); } | 53958 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53958/f8a86f6ded7474b8d8f5b334c2e060c68eb2f215/SequenceFile.java/clean/src/java/org/apache/hadoop/io/SequenceFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
1435,
1216,
1860,
288,
1377,
1160,
8526,
1177,
1768,
273,
394,
1160,
63,
5757,
18,
2469,
15533,
1377,
316,
18,
896,
16999,
12,
1589,
1768,
1769,
1377,
309,
14015,
1589,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
1435,
1216,
1860,
288,
1377,
1160,
8526,
1177,
1768,
273,
394,
1160,
63,
5757,
18,
2469,
15533,
1377,
316,
18,
896,
16999,
12,
1589,
1768,
1769,
1377,
309,
14015,
1589,
1... |
if (registry.getDescriptor(key) == null) { | if (registry.getDescriptor(key) == null) { | public void registerIconForFamily(ImageDescriptor icon, Object family) { String key = IMAGE_KEY + String.valueOf(imageKeyTable.size()); imageKeyTable.put(family, key); ImageRegistry registry = JFaceResources.getImageRegistry(); // Avoid registering twice if (registry.getDescriptor(key) == null) { registry.put(key, icon); } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/82e45bfb168fa5c37a8ced4976d2cc8fef6ce0f2/ProgressManager.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1744,
5554,
1290,
9203,
12,
2040,
3187,
4126,
16,
1033,
6755,
13,
288,
202,
202,
780,
498,
273,
10757,
67,
3297,
397,
514,
18,
1132,
951,
12,
2730,
653,
1388,
18,
1467,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1744,
5554,
1290,
9203,
12,
2040,
3187,
4126,
16,
1033,
6755,
13,
288,
202,
202,
780,
498,
273,
10757,
67,
3297,
397,
514,
18,
1132,
951,
12,
2730,
653,
1388,
18,
1467,
... |
GroupExecutor groupExecutor = (GroupExecutor)nextExecutor; | GroupExecutor groupExecutor = (GroupExecutor) nextExecutor; | public IReportItemExecutor getNextChild( ) { if ( hasNextChild( ) ) { assert ( currentElement < totalElements ); ReportItemDesign nextDesign = executableElements[currentElement++]; ReportItemExecutor nextExecutor = manager.createExecutor( this, nextDesign ); if (nextExecutor instanceof GroupExecutor ) { GroupExecutor groupExecutor = (GroupExecutor)nextExecutor; groupExecutor.setLisingExecutor( this ); } return nextExecutor; } return null; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/aae2e17b3a4d3ea45b489ef2f0c59ab5e9576e76/ListingElementExecutor.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/executor/ListingElementExecutor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
4820,
1180,
6325,
6927,
1763,
12,
262,
202,
95,
202,
202,
430,
261,
4564,
1763,
12,
262,
262,
202,
202,
95,
1082,
202,
11231,
261,
22993,
411,
2078,
3471,
11272,
1082,
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,
467,
4820,
1180,
6325,
6927,
1763,
12,
262,
202,
95,
202,
202,
430,
261,
4564,
1763,
12,
262,
262,
202,
202,
95,
1082,
202,
11231,
261,
22993,
411,
2078,
3471,
11272,
1082,
20... |
protected void serializeAttributes(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { int count = reader.getAttributeCount(); String prefix = null; String namespaceName = null; for (int i = 0; i < count; i++) { prefix = reader.getAttributePrefix(i); namespaceName = reader.getAttributeNamespace(i); if (prefix != null && !namespaceName.equals("")) { writer.writeAttribute(prefix, namespaceName, reader.getAttributeLocalName(i), reader.getAttributeValue(i)); } else { writer.writeAttribute(reader.getAttributeLocalName(i), reader.getAttributeValue(i)); } } } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/af7717d39bf334b9910718812650d5561f1cbe1c/StreamingOMSerializer.java/clean/modules/om/src/java/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
6459,
6288,
2498,
12,
4201,
31495,
10530,
16,
4201,
29421,
6299,
13,
15069,
4201,
1228,
503,
95,
474,
1883,
33,
10530,
18,
588,
1499,
1380,
5621,
780,
3239,
33,
2011,
31,
780,
4937,
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,
4750,
6459,
6288,
2498,
12,
4201,
31495,
10530,
16,
4201,
29421,
6299,
13,
15069,
4201,
1228,
503,
95,
474,
1883,
33,
10530,
18,
588,
1499,
1380,
5621,
780,
3239,
33,
2011,
31,
780,
4937,
461,... | ||
String where = MetaInfo.getServletPath(req) ; res.sendRedirect(where + "ConfAdd?ADDTYPE=Discussion") ; | res.sendRedirect("ConfAdd?ADDTYPE=Discussion") ; | public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { // Lets validate the session, e.g has the user logged in to Janus? if (super.checkSession(req,res) == false) return ; // Lets get the user object imcode.server.User user = super.getUserObj(req,res) ; if(user == null) return ; if ( !isUserAuthorized( req, res, user ) ) { return; } // Lets add the standard SESSION parameters Properties params = this.getSessionParameters(req) ; // Lets get the buttonparameters and validate all parameters if (super.checkParameters(req, res, params) == false) { /* String header = "ConfDisc servlet. " ; String msg = params.toString() ; ConfError err = new ConfError(req,res,header,1) ; */ return ; } // Lets get serverinformation String host = req.getHeader("Host") ; String imcServer = Utility.getDomainPref("userserver",host) ; String confPoolServer = Utility.getDomainPref("conference_server",host) ; RmiConf rmi = new RmiConf(user) ; // ********* UPDATE DISCUSSIONS ******** if (req.getParameter("UPDATE") != null) { // log("NU uppdaterar vi discussions") ; // Lets get the forum_id and set our session object before updating Properties reqParams = this.getRequestParameters(req) ; String aForumId = reqParams.getProperty("FORUM_ID") ; String discIndex = params.getProperty("DISC_INDEX") ; String changeForum = req.getParameter("CHANGE_FORUM"); // RmiConf rmi = new RmiConf(user) ; HttpSession session = req.getSession(false) ; if(session != null) { String latestDiscId = rmi.execSqlProcedureStr(confPoolServer, "A_GetLastDiscussionId " + params.getProperty("META_ID") + ", " + aForumId) ; if(latestDiscId == null) { log("LatestDiscID saknas, det kan saknas diskussioner i forumet:" + aForumId) ; latestDiscId = "-1" ; } if(discIndex == null) { log("DiscIndex var null:" + discIndex) ; discIndex = "0" ; } else { //lets set disc index to 0 then changing forum if ( changeForum != null ) { discIndex = "0"; } } session.setAttribute("Conference.disc_id", latestDiscId) ; session.setAttribute("Conference.forum_id", aForumId) ; session.setAttribute("Conference.disc_index", discIndex) ; } // log("LastLoginDate: " + session.getAttribute("Conference.last_login_date")) ; // Lets redirect to the servlet which holds in us. String where = MetaInfo.getServletPath(req) ; res.sendRedirect(where + "ConfDiscView") ; return ; } // ********* ADD DISCUSSIONS ******** if (req.getParameter("ADD") != null) { // log("Nu redirectar vi till ConfAdd") ; String where = MetaInfo.getServletPath(req) ; res.sendRedirect(where + "ConfAdd?ADDTYPE=Discussion") ; return ; } // ********* VIEW NEXT DISCUSSIONS ******** if(( req.getParameter("NEXT") != null || req.getParameter("NEXT.x") != null ) ) { //if (req.getParameter("NEXT") != null) { // Lets get the total nbr of discs in the forum // RmiConf rmi = new RmiConf(user) ; String sql = "A_GetNbrOfDiscs " + params.getProperty("FORUM_ID") ; String nbrOfDiscsStr = rmi.execSqlProcedureStr(confPoolServer, sql) ; int nbrOfDiscs = 0 ; // Lets get the nbr of discussions to show. If it does not contain any // discussions, 20 will be returned by default from db String showDiscsStr = rmi.execSqlProcedureStr(confPoolServer, "A_GetNbrOfDiscsToShow " + params.getProperty("FORUM_ID")) ; int showDiscsCounter = Integer.parseInt(showDiscsStr) ; // log("Nbr of discs to show: " + showDiscsCounter) ; try { nbrOfDiscs = Integer.parseInt(nbrOfDiscsStr) ; } catch (Exception e) { nbrOfDiscs = 0 ; log("GetNbrOfDiscs returned null") ; } int currIndex = this.getDiscIndex(req) ; if( currIndex + showDiscsCounter < nbrOfDiscs ) { this.increaseDiscIndex(req, showDiscsCounter) ; // log("Ok, vi hjer indexrknaren") ; } // Lets redirect to the servlet which holds in us. String where = MetaInfo.getServletPath(req) ; res.sendRedirect(where + "ConfDiscView") ; return ; } // ********* VIEW PREVIOUS DISCUSSIONS ******** if(( req.getParameter("PREVIOUS") != null || req.getParameter("PREVIOUS.x") != null ) ) { //if (req.getParameter("PREVIOUS") != null) { //RmiConf rmi = new RmiConf(user) ; // Lets get the nbr of discussions to show. If it does not contain any // discussions, 20 will be returned by default from db String showDiscsStr = rmi.execSqlProcedureStr(confPoolServer, "A_GetNbrOfDiscsToShow " + params.getProperty("FORUM_ID")) ; int showDiscsCounter = Integer.parseInt(showDiscsStr) ; // log("Nbr of discs to show: " + showDiscsCounter) ; this.decreaseDiscIndex(req, showDiscsCounter) ; // log("Currindex efter snkning: " + this.getDiscIndex(req)) ; // Lets redirect to the servlet which holds in us. String where = MetaInfo.getServletPath(req) ; res.sendRedirect(where + "ConfDiscView") ; return ; } // ********* SEARCH ******** if (req.getParameter("SEARCH") != null) { // log("Nu r vi i search") ; params = this.getSearchParameters(req, params) ; String searchMsg = "" ; String sqlAnswer[] = null ; boolean searchParamsOk = true ; String currForum = "" ; // Lets get the forumname for the current forum String aForumId = params.getProperty("FORUM_ID") ; String sqlForumName = "A_GetForumName " + aForumId ; currForum = "" + rmi.execSqlProcedureStr(confPoolServer, "A_GetForumName " + aForumId) ; //lets get metaId befor buildSearchDateParams destroys that info (happens if error in dateformat) String metaId = params.getProperty("META_ID"); // Lets validate the searchdates. If not correct then get a message and show user // 42=En skdatumstrng var felaktig! params = this.buildSearchDateParams(params) ; //log("Efter buildSearchDateParams: " + params) ; if (params == null) { log("An illegal searchdateparameter was sent to server") ; ConfError msgErr = new ConfError() ; searchMsg = msgErr.getErrorMessage(req, 42) ; searchParamsOk = false ; } // Lets validate the searchwords. If not correct then get a message and show user // 40=En skparameter saknades! Du mste ange minst ett skord! if( searchParamsOk) { boolean itsOk = this.checkSearchWords(params) ; //this.log("ItsOk: " + itsOk) ; if (!itsOk ) { ConfError msgErr = new ConfError() ; searchMsg = msgErr.getErrorMessage(req, 40) ; //log("searchMsg: " + searchMsg) ; searchParamsOk = false ; } } //log("Ok, we have passed test 1 and 2") ; //log("searchParamsOk: " + searchParamsOk) ; // this.log("SEARCHWORD: " + params.getProperty("SEARCH").trim()) ; // Lets check if everything is alright if( searchParamsOk ) { //String metaId = params.getProperty("META_ID") ; //aForumId = params.getProperty("FORUM_ID") ; String searchW = params.getProperty("SEARCH") ; String category = params.getProperty("CATEGORY") ; String frDate = params.getProperty("FR_DATE") ; String toDate = params.getProperty("TO_DATE") ; // IF WE ARE LOOKING FOR USERS ACTIVITY if(params.getProperty("CATEGORY").equals("2")) { String sqlQ = this.buildSearchUserSql(params) ; //log("SQL: " + sqlQ) ; //RmiConf rmi = new RmiConf(user) ; sqlAnswer = rmi.execSqlQueryExt(confPoolServer, sqlQ) ; } else { // Ok, Lets build the search string //RmiConf rmi = new RmiConf(user) ; String sqlQ = "A_SearchText " + metaId +", "+ aForumId + ", " ; sqlQ += category + ", " + "'" + searchW + "'" + " ," ; sqlQ += "'" + frDate + "', '" + toDate + " 23:59:59" + "'" ; // log("Search SQL: " + sqlQ) ; sqlAnswer = rmi.execSqlProcedureExt(confPoolServer, sqlQ) ; } // End if } // End if //log("Ok, we have done a search!") ; //log("sqlAnswer:" + sqlAnswer) ; // Lets get the part of an html page, wich will be parsed for every a Href reference File templateLib = super.getExternalTemplateFolder(req) ; // templateLib += getTemplateLibName(params.getProperty("META_ID")) ; File aHreHtmlFile = new File(templateLib, A_HREF_HTML) ; // Lets build our tags vector. Vector tagsV = this.buildTags() ; // Lets preparse all records, if any returned get an error mesage String allRecs = "" ; // log("SqlAnswer: " + sqlAnswer) ; if( sqlAnswer != null ) { if( sqlAnswer.length > 0) { //for(int i = 0 ; i < sqlAnswer.length ; i++){ // log("SqlAnswer: " + i + " : " + sqlAnswer[i]) ; //} allRecs = preParse(req, sqlAnswer, tagsV, aHreHtmlFile, "" ) ; if(allRecs == null ) { ConfError msgErr = new ConfError() ; allRecs = msgErr.getErrorMessage(req, 41) ; msgErr = null ; } else{ } } else { } } else { // log("SqlAnswer = null") ; // Ok, we coulnt find anything if (searchParamsOk ) { ConfError msgErr = new ConfError() ; allRecs = msgErr.getErrorMessage(req, 41) ; msgErr = null ; } } //log("Ok, we passed the sqlquestioning") ; //log("ALLRECS: " + allRecs) ; //log("searchMsg: " + searchMsg) ; // Lets build the Responsepage VariableManager vm = new VariableManager() ; if (allRecs == null || allRecs.equals("") ) vm.addProperty("A_HREF_LIST", searchMsg) ; else vm.addProperty("A_HREF_LIST", allRecs) ; //lets show newbutton if user has more than readrights String newDiscButton = " "; int intMetaId = Integer.parseInt( metaId ); if ( IMCServiceRMI.checkDocRights( imcServer, intMetaId, user ) && IMCServiceRMI.checkDocAdminRights( imcServer, intMetaId, user ) ) { VariableManager vmButtons = new VariableManager(); vmButtons.addProperty( "#SERVLET_URL#", MetaInfo.getServletPath( req ) ); vmButtons.addProperty( "#IMAGE_URL#", this.getExternalImageFolder( req ) ); HtmlGenerator newButtonHtmlObj = new HtmlGenerator( templateLib, this.NEW_DISC_TEMPLATE ); newDiscButton = newButtonHtmlObj.createHtmlString( vmButtons, req ); } vm.addProperty("CURRENT_FORUM_NAME", currForum ); vm.addProperty("PREVIOUS_BUTTON", " " ); vm.addProperty("NEXT_BUTTON", " " ); vm.addProperty("NEW_DISC_BUTTON", newDiscButton ); vm.addProperty( "ADMIN_LINK_HTML", this.ADMIN_LINK_TEMPLATE ); this.sendHtml(req,res,vm, HTML_TEMPLATE) ; // log("ConfDisc doPost r frdig") ; return ; } } // DoPost | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/a270627916b37a677a391dd9f45c54d3d6f12503/ConfDisc.java/clean/servlets/conf/ConfDisc.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
741,
3349,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
202,
15069,
16517,
16,
1860,
288,
202,
202,
759,
511,
2413,
1954,
326,
1339,
16,
425,
18,
75,
711,
326,
729,
7545,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
3349,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
202,
15069,
16517,
16,
1860,
288,
202,
202,
759,
511,
2413,
1954,
326,
1339,
16,
425,
18,
75,
711,
326,
729,
7545,
... |
if(myParentType != null) LOG.assertTrue(parent.getElementType() == myParentType); | public ASTNode findChild(ASTNode parent) { if(myParentType != null) LOG.assertTrue(parent.getElementType() == myParentType); ASTNode current = parent.getFirstChildNode(); while(current != null && current.getElementType() != myElementType) current = current.getTreeNext(); return current; } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/2cea9a79a815e14293ef62b2ba40817c6af52dd1/DefaultRoleFinder.java/buggy/source/com/intellij/psi/tree/DefaultRoleFinder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
9183,
907,
1104,
1763,
12,
9053,
907,
982,
13,
288,
4202,
9183,
907,
783,
273,
982,
18,
588,
3759,
25550,
5621,
565,
1323,
12,
2972,
480,
446,
597,
783,
18,
588,
17481,
1435,
480,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
9183,
907,
1104,
1763,
12,
9053,
907,
982,
13,
288,
4202,
9183,
907,
783,
273,
982,
18,
588,
3759,
25550,
5621,
565,
1323,
12,
2972,
480,
446,
597,
783,
18,
588,
17481,
1435,
480,... | |
fix.applyFix(psiElement.getProject(), problems[j]); myTool.ignoreProblem(refElement, problems[j]); | fix.applyFix(psiElement.getProject(), problem); myTool.ignoreProblem(refElement, problem); | protected boolean applyFix(RefElement[] refElements) { for (int i = 0; i < refElements.length; i++) { RefElement refElement = refElements[i]; ProblemDescriptor[] problems = myTool.getDescriptions(refElement); if (problems != null) { PsiElement psiElement = refElement.getElement(); if (psiElement != null) { for (int j = 0; j < problems.length; j++) { LocalQuickFix fix = problems[j].getFix(); if (fix != null) { fix.applyFix(psiElement.getProject(), problems[j]); myTool.ignoreProblem(refElement, problems[j]); } } } } } return true; } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/3daaaca2b37f1a4183984eba87a518a45fb2b76c/LocalQuickFixWrapper.java/clean/source/com/intellij/codeInspection/ex/LocalQuickFixWrapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
1250,
2230,
8585,
12,
1957,
1046,
8526,
1278,
3471,
13,
288,
565,
364,
261,
474,
277,
273,
374,
31,
277,
411,
1278,
3471,
18,
2469,
31,
277,
27245,
288,
1377,
3941,
1046,
1278,
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,
282,
4750,
1250,
2230,
8585,
12,
1957,
1046,
8526,
1278,
3471,
13,
288,
565,
364,
261,
474,
277,
273,
374,
31,
277,
411,
1278,
3471,
18,
2469,
31,
277,
27245,
288,
1377,
3941,
1046,
1278,
10... |
public List getAliases(String domainName) { if (StringUtils.isBlank(m_extension)) { return Collections.EMPTY_LIST; | public Set getAliases() { if (m_aliases == null) { m_aliases = new LinkedHashSet(0); | public List getAliases(String domainName) { if (StringUtils.isBlank(m_extension)) { return Collections.EMPTY_LIST; } final String identity = AliasMapping.createUri(m_extension, domainName); final String contact = getUri(domainName); AliasMapping mapping = new AliasMapping(identity, contact); return Collections.singletonList(mapping); } | 12962 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12962/07cc5e619ae637ba50e9f55d0c0420ce08a2377a/User.java/clean/sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/common/User.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
336,
9667,
12,
780,
21044,
13,
288,
3639,
309,
261,
780,
1989,
18,
291,
7796,
12,
81,
67,
6447,
3719,
288,
5411,
327,
5737,
18,
13625,
67,
7085,
31,
3639,
289,
3639,
727,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
336,
9667,
12,
780,
21044,
13,
288,
3639,
309,
261,
780,
1989,
18,
291,
7796,
12,
81,
67,
6447,
3719,
288,
5411,
327,
5737,
18,
13625,
67,
7085,
31,
3639,
289,
3639,
727,
5... |
public void testGetRole(){ | public void testGetRole() throws MetadataProviderException{ | public void testGetRole(){ List<RoleDescriptor> roles = metadataProvider.getRole(entityID, IDPSSODescriptor.DEFAULT_ELEMENT_NAME); assertNotNull("Roles for entity descriptor was null", roles); assertEquals("Unexpected number of roles", 1, roles.size()); } | 52539 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52539/5d2210e36a613fd6d058514df132486612b28ec2/FilesystemMetadataProviderTest.java/clean/test/org/opensaml/saml2/metadata/provider/FilesystemMetadataProviderTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
967,
2996,
1435,
1216,
6912,
2249,
503,
95,
3639,
987,
32,
2996,
3187,
34,
4900,
273,
1982,
2249,
18,
588,
2996,
12,
1096,
734,
16,
1599,
52,
1260,
1212,
2263,
18,
5280... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2996,
1435,
1216,
6912,
2249,
503,
95,
3639,
987,
32,
2996,
3187,
34,
4900,
273,
1982,
2249,
18,
588,
2996,
12,
1096,
734,
16,
1599,
52,
1260,
1212,
2263,
18,
5280... |
public static boolean is_INT_PACK_Data(SampleModel sm, boolean requireAlpha) { // Check ColorModel is of type DirectColorModel if(!(sm instanceof SinglePixelPackedSampleModel)) return false; // Check transfer type if(sm.getDataType() != DataBuffer.TYPE_INT) return false; SinglePixelPackedSampleModel sppsm; sppsm = (SinglePixelPackedSampleModel)sm; int [] masks = sppsm.getBitMasks(); if (masks.length == 3) { if (requireAlpha) return false; } else if (masks.length != 4) return false; if(masks[0] != 0x00ff0000) return false; if(masks[1] != 0x0000ff00) return false; if(masks[2] != 0x000000ff) return false; if ((masks.length == 4) && (masks[3] != 0xff000000)) return false; return true; } | 46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/4d3a99ba25df78f76a0cd7a624ef8aca67e45c6d/GraphicsUtil.java/buggy/sources/org/apache/batik/ext/awt/image/GraphicsUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
353,
67,
3217,
67,
12231,
67,
751,
12,
8504,
1488,
3029,
16,
4766,
6647,
1250,
2583,
9690,
13,
288,
1850,
368,
2073,
5563,
1488,
353,
434,
618,
9908,
2957,
1488,
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,
760,
1250,
353,
67,
3217,
67,
12231,
67,
751,
12,
8504,
1488,
3029,
16,
4766,
6647,
1250,
2583,
9690,
13,
288,
1850,
368,
2073,
5563,
1488,
353,
434,
618,
9908,
2957,
1488,
3639,
... | ||
if (ref != null) { | if (ref != null && !visited.contains(ref)) { visited.add(ref); | private boolean _canContainAttribute(String name, String namespace, XmlTag tag) { if (XmlNSDescriptorImpl.equalsToSchemaName(tag, "anyAttribute")) { String ns = tag.getAttributeValue("namespace"); if ("##other".equals(ns)) { return !namespace.equals(myDocumentDescriptor.getDefaultNamespace()); } return true; } else if (XmlNSDescriptorImpl.equalsToSchemaName(tag, "attributeGroup")) { String ref = tag.getAttributeValue("ref"); if (ref != null) { XmlTag groupTag = myDocumentDescriptor.findGroup(ref); if (groupTag != null) { if (_canContainAttribute(name, namespace, groupTag)) return true; } } } else if (XmlNSDescriptorImpl.equalsToSchemaName(tag, "restriction") || XmlNSDescriptorImpl.equalsToSchemaName(tag, "extension")) { String base = tag.getAttributeValue("base"); if (base != null) { TypeDescriptor descriptor = myDocumentDescriptor.findTypeDescriptor( myDocumentDescriptor.myFile.getDocument().getRootTag(), base); if (descriptor instanceof ComplexTypeDescriptor) { ComplexTypeDescriptor complexTypeDescriptor = (ComplexTypeDescriptor)descriptor; if (complexTypeDescriptor.canContainAttribute(name, namespace)) return true; } } } XmlTag[] subTags = tag.getSubTags(); for (int i = 0; i < subTags.length; i++) { XmlTag subTag = subTags[i]; if (_canContainAttribute(name, namespace, subTag)) return true; } return false; } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/93f24e478a2a8f468fb3738aa8544716a48b46bf/ComplexTypeDescriptor.java/buggy/source/com/intellij/xml/impl/schema/ComplexTypeDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1250,
389,
4169,
22928,
1499,
12,
780,
508,
16,
514,
1981,
16,
5714,
1805,
1047,
13,
288,
565,
309,
261,
4432,
3156,
3187,
2828,
18,
14963,
774,
3078,
461,
12,
2692,
16,
315,
2273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
4169,
22928,
1499,
12,
780,
508,
16,
514,
1981,
16,
5714,
1805,
1047,
13,
288,
565,
309,
261,
4432,
3156,
3187,
2828,
18,
14963,
774,
3078,
461,
12,
2692,
16,
315,
2273... |
TCP_VERSION, new byte[1]); assertTrue(false); | TCP_VERSION, bytes(1)); fail("should have thrown bpe"); | public void testTCPConnectBackConstructor() throws Exception { byte[] guid = GUID.makeGuid(); byte ttl = 1, hops = 0; try { // try a VERSION we don't support TCPConnectBackVendorMessage TCP = new TCPConnectBackVendorMessage(guid, ttl, hops, TCP_VERSION+1, new byte[0]); assertTrue(false); } catch (BadPacketException expected) {} try { // in the next few tests, try bad sizes of the payload.... TCPConnectBackVendorMessage TCP = new TCPConnectBackVendorMessage(guid, ttl, hops, TCP_VERSION, new byte[0]); assertTrue(false); } catch (BadPacketException expected) {} try { TCPConnectBackVendorMessage TCP = new TCPConnectBackVendorMessage(guid, ttl, hops, TCP_VERSION, new byte[1]); assertTrue(false); } catch (BadPacketException expected) {} try { TCPConnectBackVendorMessage TCP = new TCPConnectBackVendorMessage(guid, ttl, hops, TCP_VERSION, new byte[3]); assertTrue(false); } catch (BadPacketException expected) {} // this is the correct size of the payload TCPConnectBackVendorMessage TCP = new TCPConnectBackVendorMessage(guid, ttl, hops, TCP_VERSION, new byte[2]); // make sure we encode things just fine.... TCPConnectBackVendorMessage VendorMessage1 = new TCPConnectBackVendorMessage(6346); TCPConnectBackVendorMessage VendorMessage2 = new TCPConnectBackVendorMessage(VendorMessage1.getGUID(), ttl, hops, TCP_VERSION, VendorMessage1.getPayload()); assertTrue(VendorMessage1.equals(VendorMessage2)); assertTrue(VendorMessage1.getConnectBackPort() == VendorMessage2.getConnectBackPort()); } | 5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/44575f5e79a07561d982b0719da214e41bc3363e/ConnectBackVendorMessageTest.java/clean/components/gnutella-core/src/test/java/com/limegroup/gnutella/messages/vendor/ConnectBackVendorMessageTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
13891,
5215,
2711,
6293,
1435,
1216,
1185,
288,
3639,
1160,
8526,
9875,
273,
20322,
18,
6540,
22549,
5621,
3639,
1160,
6337,
273,
404,
16,
366,
4473,
273,
374,
31,
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,
1842,
13891,
5215,
2711,
6293,
1435,
1216,
1185,
288,
3639,
1160,
8526,
9875,
273,
20322,
18,
6540,
22549,
5621,
3639,
1160,
6337,
273,
404,
16,
366,
4473,
273,
374,
31,
3639,
... |
Anchor oldTargetAnchor = targetAnchor; targetAnchor = newTargetAnchor; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, NotationPackage.EDGE__TARGET_ANCHOR, oldTargetAnchor, newTargetAnchor); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } | Anchor oldTargetAnchor = targetAnchor; targetAnchor = newTargetAnchor; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, NotationPackage.EDGE__TARGET_ANCHOR, oldTargetAnchor, newTargetAnchor); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } | public NotificationChain basicSetTargetAnchor(Anchor newTargetAnchor, NotificationChain msgs) { Anchor oldTargetAnchor = targetAnchor; targetAnchor = newTargetAnchor; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, NotationPackage.EDGE__TARGET_ANCHOR, oldTargetAnchor, newTargetAnchor); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } | 1758 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1758/1d1e28c0f7853dd16bd3fe819770773ed4e61d20/EdgeImpl.java/buggy/org.eclipse.gmf.notation/plugins/org.eclipse.gmf.runtime.notation/src/org/eclipse/gmf/runtime/notation/impl/EdgeImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
27050,
5337,
694,
2326,
11605,
12,
11605,
394,
2326,
11605,
16,
27050,
8733,
13,
288,
202,
202,
11605,
1592,
2326,
11605,
273,
1018,
11605,
31,
202,
202,
3299,
11605,
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,
225,
202,
482,
27050,
5337,
694,
2326,
11605,
12,
11605,
394,
2326,
11605,
16,
27050,
8733,
13,
288,
202,
202,
11605,
1592,
2326,
11605,
273,
1018,
11605,
31,
202,
202,
3299,
11605,
273,
394,
... |
/* properties.setProperty("javax.sip.IP_ADDRESS","129.6.55.62"); */ | public void init() { SipFactory sipFactory = null; sipStack = null; sipFactory = SipFactory.getInstance(); sipFactory.setPathName("gov.nist"); Properties properties = new Properties();//ifdef SIMULATION/* properties.setProperty("javax.sip.IP_ADDRESS","129.6.55.62");//else*/ properties.setProperty("javax.sip.IP_ADDRESS", myAddress );//endif// properties.setProperty("javax.sip.RETRANSMISSION_FILTER", "true"); properties.setProperty("javax.sip.STACK_NAME", "shootme"); // You need 16 for logging traces. 32 for debug + traces. // Your code will limp at 32 but it is best for debugging. properties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "32"); properties.setProperty( "gov.nist.javax.sip.DEBUG_LOG", "shootmedebug.txt"); properties.setProperty( "gov.nist.javax.sip.SERVER_LOG", "shootmelog.txt"); // Guard against starvation. properties.setProperty( "gov.nist.javax.sip.READ_TIMEOUT", "1000"); // properties.setProperty("gov.nist.javax.sip.MAX_MESSAGE_SIZE", "4096"); properties.setProperty("gov.nist.javax.sip.CACHE_SERVER_CONNECTIONS", "false"); try { // Create SipStack object sipStack = sipFactory.createSipStack(properties); System.out.println("sipStack = " + sipStack); } catch (PeerUnavailableException e) { // could not find // gov.nist.jain.protocol.ip.sip.SipStackImpl // in the classpath e.printStackTrace(); System.err.println(e.getMessage()); if (e.getCause() != null) e.getCause().printStackTrace(); System.exit(0); } try { headerFactory = sipFactory.createHeaderFactory(); addressFactory = sipFactory.createAddressFactory(); messageFactory = sipFactory.createMessageFactory(); ListeningPoint lp = sipStack.createListeningPoint(5070, "udp"); ListeningPoint lp1 = sipStack.createListeningPoint(5070, "tcp"); Shootme listener = this; SipProvider sipProvider = sipStack.createSipProvider(lp); System.out.println("udp provider " + sipProvider); sipProvider.addSipListener(listener); sipProvider = sipStack.createSipProvider(lp1); System.out.println("tcp provider " + sipProvider); sipProvider.addSipListener(listener); } catch (Exception ex) { System.out.println(ex.getMessage()); ex.printStackTrace(); usage(); } } | 7607 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7607/6a1de85e0a356cbcd34b1fb5bef0f7730b349af9/Shootme.java/clean/trunk/src/examples/shootist/Shootme.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1208,
1435,
288,
202,
202,
17550,
1733,
10341,
1733,
273,
446,
31,
202,
202,
28477,
2624,
273,
446,
31,
202,
202,
28477,
1733,
273,
13475,
1733,
18,
588,
1442,
5621,
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,
1208,
1435,
288,
202,
202,
17550,
1733,
10341,
1733,
273,
446,
31,
202,
202,
28477,
2624,
273,
446,
31,
202,
202,
28477,
1733,
273,
13475,
1733,
18,
588,
1442,
5621,
202,
... | |
dialog.setFilterExtensions( new String[]{ "*.rptdesign" } ); | if ( needFilter ) { dialog.setFilterExtensions( new String[]{ "*.rptdesign" } ); } | public void widgetSelected( SelectionEvent e ) { FileDialog dialog = new FileDialog( UIUtil.getDefaultShell( ) ); dialog.setFilterExtensions( new String[]{ "*.rptdesign" //$NON-NLS-1$ } ); try { String filename = dialog.open( ); if ( filename != null ) { if ( needQuote ) { filename = "\"" + filename + "\""; //$NON-NLS-1$ //$NON-NLS-2$ } text.setText( filename ); } else { text.setText( "" ); //$NON-NLS-1$ } updateButtons( ); } catch ( Exception ex ) { ExceptionHandler.handle( ex ); } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/9cf4d8625cb60c83780c533705a71415b34111eb/HyperlinkBuilder.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/HyperlinkBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
3604,
7416,
12,
12977,
1133,
425,
262,
1082,
202,
95,
9506,
202,
812,
6353,
6176,
273,
394,
1387,
6353,
12,
6484,
1304,
18,
588,
1868,
13220,
12,
262,
11272,
9506,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
3604,
7416,
12,
12977,
1133,
425,
262,
1082,
202,
95,
9506,
202,
812,
6353,
6176,
273,
394,
1387,
6353,
12,
6484,
1304,
18,
588,
1868,
13220,
12,
262,
11272,
9506,
202,
... |
public Object execMethod (int methodId, IdFunction function, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) throws JavaScriptException { switch (methodId) { case Id_abs: return wrap_double (js_abs(ScriptRuntime.toNumber(args, 0))); case Id_acos: return wrap_double (js_acos(ScriptRuntime.toNumber(args, 0))); case Id_asin: return wrap_double (js_asin(ScriptRuntime.toNumber(args, 0))); case Id_atan: return wrap_double (js_atan(ScriptRuntime.toNumber(args, 0))); case Id_atan2: return wrap_double (js_atan2(ScriptRuntime.toNumber(args, 0), ScriptRuntime.toNumber(args, 1))); case Id_ceil: return wrap_double (js_ceil(ScriptRuntime.toNumber(args, 0))); case Id_cos: return wrap_double (js_cos(ScriptRuntime.toNumber(args, 0))); case Id_exp: return wrap_double (js_exp(ScriptRuntime.toNumber(args, 0))); case Id_floor: return wrap_double (js_floor(ScriptRuntime.toNumber(args, 0))); case Id_log: return wrap_double (js_log(ScriptRuntime.toNumber(args, 0))); case Id_max: return wrap_double (js_max(args)); case Id_min: return wrap_double (js_min(args)); case Id_pow: return wrap_double (js_pow(ScriptRuntime.toNumber(args, 0), ScriptRuntime.toNumber(args, 1))); case Id_random: return wrap_double (js_random()); case Id_round: return wrap_double (js_round(ScriptRuntime.toNumber(args, 0))); case Id_sin: return wrap_double (js_sin(ScriptRuntime.toNumber(args, 0))); case Id_sqrt: return wrap_double (js_sqrt(ScriptRuntime.toNumber(args, 0))); case Id_tan: return wrap_double (js_tan(ScriptRuntime.toNumber(args, 0))); } return null; } | 12564 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12564/b631b3e8574543a4d24a0048cc710f305deb8ff5/NativeMath.java/buggy/org/mozilla/javascript/NativeMath.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
3639,
261,
474,
707,
548,
16,
3124,
2083,
445,
16,
540,
1772,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
3639,
261,
474,
707,
548,
16,
3124,
2083,
445,
16,
540,
1772,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,
... | ||
switch (alt26) { | switch (alt27) { | public BaseDescr fact_expression_in_paren(String id) throws RecognitionException { BaseDescr pd = null; BaseDescr fe = null; BaseDescr f = null; pd = null; boolean multi = false; try { // D:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:899:5: ( '(' fe= fact_expression_in_paren[id] ')' | f= fact ( ('or'|'||')f= fact )* ) int alt26=2; int LA26_0 = input.LA(1); if ( (LA26_0==LEFT_PAREN) ) { alt26=1; } else if ( (LA26_0==ID) ) { alt26=2; } else { NoViableAltException nvae = new NoViableAltException("894:2: fact_expression_in_paren[String id] returns [BaseDescr pd] : ( '(' fe= fact_expression_in_paren[id] ')' | f= fact ( ('or'|'||')f= fact )* );", 26, 0, input); throw nvae; } switch (alt26) { case 1 : // D:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:899:5: '(' fe= fact_expression_in_paren[id] ')' { match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_fact_expression_in_paren1740); pushFollow(FOLLOW_fact_expression_in_paren_in_fact_expression_in_paren1744); fe=fact_expression_in_paren(id); _fsp--; match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_fact_expression_in_paren1746); pd=fe; } break; case 2 : // D:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:900:6: f= fact ( ('or'|'||')f= fact )* { pushFollow(FOLLOW_fact_in_fact_expression_in_paren1757); f=fact(); _fsp--; ((ColumnDescr)f).setIdentifier( id ); pd = f; // D:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:905:4: ( ('or'|'||')f= fact )* loop25: do { int alt25=2; int LA25_0 = input.LA(1); if ( ((LA25_0>=54 && LA25_0<=55)) ) { alt25=1; } switch (alt25) { case 1 : // D:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:905:6: ('or'|'||')f= fact { if ( (input.LA(1)>=54 && input.LA(1)<=55) ) { input.consume(); errorRecovery=false; } else { MismatchedSetException mse = new MismatchedSetException(null,input); recoverFromMismatchedSet(input,mse,FOLLOW_set_in_fact_expression_in_paren1770); throw mse; } if ( ! multi ) { BaseDescr first = pd; pd = new OrDescr(); ((OrDescr)pd).addDescr( first ); multi=true; } pushFollow(FOLLOW_fact_in_fact_expression_in_paren1787); f=fact(); _fsp--; ((ColumnDescr)f).setIdentifier( id ); ((OrDescr)pd).addDescr( f ); } break; default : break loop25; } } while (true); } break; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return pd; } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/c3437c2488c314384990c4282a547e0f92ca02c2/DRLParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/DRLParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3360,
16198,
5410,
67,
8692,
67,
267,
67,
13012,
12,
780,
612,
13,
1216,
9539,
288,
6647,
3360,
16198,
4863,
273,
446,
31,
3639,
3360,
16198,
1656,
273,
446,
31,
3639,
3360,
16198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3360,
16198,
5410,
67,
8692,
67,
267,
67,
13012,
12,
780,
612,
13,
1216,
9539,
288,
6647,
3360,
16198,
4863,
273,
446,
31,
3639,
3360,
16198,
1656,
273,
446,
31,
3639,
3360,
16198,
... |
stmt.executeUpdate("DELETE FROM UP_FRAGMENT_RESTRICTIONS WHERE FRAGMENT_ID="+fragmentId); stmt.executeUpdate("DELETE FROM UP_GROUP_FRAGMENT WHERE FRAGMENT_ID="+fragmentId); | stmt.executeUpdate("DELETE FROM UP_FRAGMENT_RESTRICTIONS WHERE FRAGMENT_ID="+fragmentId); stmt.executeUpdate("DELETE FROM UP_GROUP_FRAGMENT WHERE FRAGMENT_ID="+fragmentId); | public void deleteFragment (IPerson person, String fragmentId) throws PortalException { int userId = person.getID(); Connection con = RDBMServices.getConnection(); try { RDBMServices.setAutoCommit(con, false); // May speed things up, can't hurt Statement stmt = con.createStatement(); boolean isOwner = false; // Check if the user was an owner ResultSet rs = stmt.executeQuery("SELECT OWNER_ID FROM UP_OWNER_FRAGMENT WHERE FRAGMENT_ID="+fragmentId); if ( rs.next() ) { if ( rs.getInt(1) == userId ) isOwner = true; } if ( rs != null ) rs.close(); if ( !isOwner ) throw new PortalException("The user "+userId+" is not an owner of the fragment with ID="+fragmentId); stmt.executeUpdate("DELETE FROM UP_FRAGMENT_RESTRICTIONS WHERE FRAGMENT_ID="+fragmentId); stmt.executeUpdate("DELETE FROM UP_GROUP_FRAGMENT WHERE FRAGMENT_ID="+fragmentId); stmt.executeUpdate("DELETE FROM UP_FRAGMENTS WHERE FRAGMENT_ID="+fragmentId); String sqlUpdate = "DELETE FROM UP_OWNER_FRAGMENT WHERE OWNER_ID=? AND FRAGMENT_ID=?"; PreparedStatement ps = con.prepareStatement(sqlUpdate); ps.setInt(1,userId); ps.setInt(2,CommonUtils.parseInt(fragmentId)); ps.executeUpdate(); ps.close(); if ( stmt != null ) stmt.close(); // Commit all the changes RDBMServices.commit(con); // Close the connection if ( con != null ) con.close(); } catch (Exception e) { e.printStackTrace(); String errorMessage = e.getMessage(); try { RDBMServices.rollback(con); } catch ( SQLException sqle ) { log.error( sqle.toString() ); errorMessage += ":" + sqle.getMessage(); } throw new PortalException(errorMessage); } } | 24959 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24959/948a50c00c52659556ab3183d5ea2e316077d789/AggregatedUserLayoutStore.java/clean/source/org/jasig/portal/layout/AggregatedUserLayoutStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1430,
7456,
261,
2579,
3565,
6175,
16,
514,
5481,
548,
13,
1216,
25478,
503,
288,
202,
282,
509,
6249,
273,
6175,
18,
588,
734,
5621,
202,
282,
4050,
356,
273,
534,
2290,
49,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1430,
7456,
261,
2579,
3565,
6175,
16,
514,
5481,
548,
13,
1216,
25478,
503,
288,
202,
282,
509,
6249,
273,
6175,
18,
588,
734,
5621,
202,
282,
4050,
356,
273,
534,
2290,
49,... |
private WorkbenchJob getUpdateJob() { WorkbenchJob job = new WorkbenchJob( WorkbenchMessages.DecorationScheduler_UpdateJobName) { int currentIndex = NEEDS_INIT; LabelProviderChangedEvent labelProviderChangedEvent; ILabelProviderListener[] listeners; public IStatus runInUIThread(IProgressMonitor monitor) { if (shutdown) { return Status.CANCEL_STATUS; } // If this is the first one check again in case // someone has already cleared it out. if (currentIndex == NEEDS_INIT){ if(pendingUpdate.isEmpty()){ //If the removal came in while we were waiting clear it anyways removedListeners.clear(); return Status.OK_STATUS; } setUpUpdates(); } monitor.beginTask( WorkbenchMessages.DecorationScheduler_UpdatingTask, 10); monitor.worked(5); if(listeners.length == 0) { return Status.OK_STATUS; } //If it was removed in the meantime then leave. ILabelProviderListener listener = listeners[currentIndex]; currentIndex ++; if(!removedListeners.contains(listener)) { decoratorManager. fireListener(labelProviderChangedEvent,listener); } monitor.done(); if(currentIndex >= listeners.length){ // Other decoration requests may have occured due to // updates. Only clear the results if there are none // pending. if (awaitingDecoration.isEmpty()) { resultCache.clear(); } if (!pendingUpdate.isEmpty()) { decorated(); } currentIndex = NEEDS_INIT;//Reset labelProviderChangedEvent = null; removedListeners.clear(); } else { schedule();//Reschedule if we are not done } return Status.OK_STATUS; } private void setUpUpdates() { // Get the elements awaiting update and then // clear the list removedListeners.clear(); currentIndex = 0; Object[] elements = pendingUpdate .toArray(new Object[pendingUpdate.size()]); pendingUpdate.clear(); labelProviderChangedEvent = new LabelProviderChangedEvent( decoratorManager, elements); listeners = decoratorManager.getListeners(); } /* * (non-Javadoc) * * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object) */ public boolean belongsTo(Object family) { return DecoratorManager.FAMILY_DECORATE == family; } /* (non-Javadoc) * @see org.eclipse.core.runtime.jobs.Job#shouldRun() */ public boolean shouldRun(){ return PlatformUI.isWorkbenchRunning(); } }; job.setSystem(true); return job; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/b543fc145c42526ff99e6c17d4baec8b9a5cf3e0/DecorationScheduler.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecorationScheduler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
4147,
22144,
2278,
23866,
2278,
1435,
288,
202,
202,
2421,
22144,
2278,
1719,
273,
394,
4147,
22144,
2278,
12,
9506,
202,
2421,
22144,
5058,
18,
7859,
367,
11870,
67,
1891,
29425... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4147,
22144,
2278,
23866,
2278,
1435,
288,
202,
202,
2421,
22144,
2278,
1719,
273,
394,
4147,
22144,
2278,
12,
9506,
202,
2421,
22144,
5058,
18,
7859,
367,
11870,
67,
1891,
29425... | ||
return s43; | return s39; | public DFA.State transition(IntStream input) throws RecognitionException { switch ( input.LA(1) ) { case 23: return s32; case 22: return s43; case EOL: case 15: return s67; case ID: return s68; default: NoViableAltException nvae = new NoViableAltException("", 4, 67, input); throw nvae; } } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/2c627236020a6a6e3e349b38b1010bfe64567df7/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
463,
2046,
18,
1119,
6007,
12,
1702,
1228,
810,
13,
1216,
9539,
288,
7734,
1620,
261,
810,
18,
2534,
12,
21,
13,
262,
288,
7734,
648,
10213,
30,
10792,
327,
272,
1578,
31,
7734,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
463,
2046,
18,
1119,
6007,
12,
1702,
1228,
810,
13,
1216,
9539,
288,
7734,
1620,
261,
810,
18,
2534,
12,
21,
13,
262,
288,
7734,
648,
10213,
30,
10792,
327,
272,
1578,
31,
7734,
... |
(new com.ibm.math.DiagBigDecimal.Test("flv004")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==((new java.lang.Float(val)).floatValue()); | (new Test("flv004")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==((new java.lang.Float(val)).floatValue()); | public void diagfloatvalue(){ java.lang.String val; // 1999.03.07 Infinities no longer errors val="-1"; (new com.ibm.math.DiagBigDecimal.Test("flv001")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==((new java.lang.Float(val)).floatValue()); val="-0.1"; (new com.ibm.math.DiagBigDecimal.Test("flv002")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==((new java.lang.Float(val)).floatValue()); val="0"; (new com.ibm.math.DiagBigDecimal.Test("flv003")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==((new java.lang.Float(val)).floatValue()); val="0.1"; (new com.ibm.math.DiagBigDecimal.Test("flv004")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==((new java.lang.Float(val)).floatValue()); val="1"; (new com.ibm.math.DiagBigDecimal.Test("flv005")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==((new java.lang.Float(val)).floatValue()); val="1e200"; (new com.ibm.math.DiagBigDecimal.Test("flv006")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==java.lang.Float.POSITIVE_INFINITY; val="-1e200"; (new com.ibm.math.DiagBigDecimal.Test("flv007")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==java.lang.Float.NEGATIVE_INFINITY; val="1e1000"; (new com.ibm.math.DiagBigDecimal.Test("flv008")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==java.lang.Float.POSITIVE_INFINITY; val="-1e1000"; (new com.ibm.math.DiagBigDecimal.Test("flv009")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==java.lang.Float.NEGATIVE_INFINITY; summary("floatValue"); return;} | 5620 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5620/9d7cfece10981dede4d5303274403593abc1a92d/DiagBigDecimal.java/buggy/icu4j/src/com/ibm/test/bigdec/DiagBigDecimal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1071,
918,
6643,
5659,
1132,
1435,
95,
225,
2252,
18,
4936,
18,
780,
1244,
31,
225,
368,
404,
11984,
18,
4630,
18,
8642,
657,
926,
1961,
1158,
7144,
1334,
225,
1244,
1546,
17,
21,
14432... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1071,
918,
6643,
5659,
1132,
1435,
95,
225,
2252,
18,
4936,
18,
780,
1244,
31,
225,
368,
404,
11984,
18,
4630,
18,
8642,
657,
926,
1961,
1158,
7144,
1334,
225,
1244,
1546,
17,
21,
14432... |
TaskActivityView.this.treeViewer.refresh(week); | refresh(); | public void activityChanged(DateRangeContainer week) { TaskActivityView.this.treeViewer.refresh(week); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/522b2b16a7ad7c7621fee7faab0db6c9cd4dc7e2/TaskActivityView.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/views/TaskActivityView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
5728,
5033,
12,
1626,
2655,
2170,
4860,
13,
288,
1082,
202,
2174,
6193,
1767,
18,
2211,
18,
3413,
18415,
18,
9144,
12,
10741,
1769,
202,
202,
97,
2,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3196,
202,
482,
918,
5728,
5033,
12,
1626,
2655,
2170,
4860,
13,
288,
1082,
202,
2174,
6193,
1767,
18,
2211,
18,
3413,
18415,
18,
9144,
12,
10741,
1769,
202,
202,
97,
2,
-100,
-100,
-100,
-1... |
public synchronized MailItem getItemByImapId(OperationContext octxt, int id, int folderId) throws ServiceException { boolean success = false; try { // tag/folder caches are populated in beginTransaction... beginTransaction("getItemByImapId", octxt); MailItem item = checkAccess(getCachedItem(id)); if (item == null) { try { // in general, the item will not have been moved and its id will be the same as its IMAP id. item = checkAccess(MailItem.getById(this, id)); } catch (NoSuchItemException nsie) { // if it's not found, we have to search on the non-indexed IMAP_ID column... item = checkAccess(MailItem.getByImapId(this, id, folderId)); } } if (isCachedType(item.getType()) || item.getImapUid() != id || item.getFolderId() != folderId) throw MailServiceException.NO_SUCH_ITEM(id); success = true; return item; } finally { endTransaction(success); } } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/f10ba7974d00f1b4c21022892fecda9262ef0735/Mailbox.java/clean/ZimbraServer/src/java/com/zimbra/cs/mailbox/Mailbox.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
22043,
6759,
1180,
588,
1180,
858,
20827,
548,
12,
2988,
1042,
83,
20364,
16,
474,
350,
16,
474,
5609,
548,
13,
15069,
15133,
95,
1075,
29510,
2825,
33,
5743,
31,
698,
95,
759,
2692,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
22043,
6759,
1180,
588,
1180,
858,
20827,
548,
12,
2988,
1042,
83,
20364,
16,
474,
350,
16,
474,
5609,
548,
13,
15069,
15133,
95,
1075,
29510,
2825,
33,
5743,
31,
698,
95,
759,
2692,
1... | ||
public IRubyObject infectBy(IRubyObject obj) { setTaint(isTaint() || obj.isTaint()); return this; } | 45298 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45298/c8b66db475de1dc66f347884891dd70d9943689b/RubyObject.java/clean/src/org/jruby/RubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
8286,
386,
858,
12,
7937,
10340,
921,
1081,
13,
288,
3639,
444,
29048,
12,
291,
29048,
1435,
747,
1081,
18,
291,
29048,
10663,
7734,
327,
333,
31,
565,
289,
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,
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,
15908,
10340,
921,
8286,
386,
858,
12,
7937,
10340,
921,
1081,
13,
288,
3639,
444,
29048,
12,
291,
29048,
1435,
747,
1081,
18,
291,
29048,
10663,
7734,
327,
333,
31,
565,
289,
2,
... | ||
crii.cm = (Chart) EcoreUtil.copy( cm ); | crii.cm = cm == null ? null : (Chart) EcoreUtil.copy( cm ); | public final IReportItem copy( ) { final ChartReportItemImpl crii = new ChartReportItemImpl( handle ); crii.cm = (Chart) EcoreUtil.copy( cm ); return crii; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/0b5be0e2d4795ce8188e6cd163505eb8d7ce37a0/ChartReportItemImpl.java/clean/chart/org.eclipse.birt.chart.reportitem/src/org/eclipse/birt/chart/reportitem/ChartReportItemImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
467,
4820,
1180,
1610,
12,
262,
202,
95,
202,
202,
6385,
14804,
4820,
1180,
2828,
19990,
77,
273,
394,
14804,
4820,
1180,
2828,
12,
1640,
11272,
202,
202,
22203,
77,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
467,
4820,
1180,
1610,
12,
262,
202,
95,
202,
202,
6385,
14804,
4820,
1180,
2828,
19990,
77,
273,
394,
14804,
4820,
1180,
2828,
12,
1640,
11272,
202,
202,
22203,
77,
18,
... |
protected void setUp() throws Exception { assertNotNull(MylarJavaPlugin.getDefault()); project1 = new TestProject("project1"); p1 = project1.createPackage("p1"); type1 = project1.createType(p1, "Type1.java", "public class Type1 { }" ); taskscape = new MylarContext("1", scaling); manager.contextActivated(taskscape); assertNotNull(MylarJavaPlugin.getDefault()); assertTrue(MylarPlugin.getDefault().getStructureBridges().toString().indexOf( JavaStructureBridge.class.getCanonicalName()) != -1);// System.err.println(">>> " + MylarPlugin.getDefault().getStructureBridges()); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/bf5e7ce30f3a08a5fbb8a560510275c2c00355ac/ContextManagerTest.java/buggy/org.eclipse.mylyn.java.tests/src/org/eclipse/mylyn/java/tests/ContextManagerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
6459,
542,
1211,
1435,
15069,
503,
95,
202,
11231,
5962,
12,
12062,
7901,
5852,
3773,
18,
588,
1868,
10663,
202,
4406,
21,
33,
2704,
4709,
4109,
2932,
4406,
21,
8863,
84,
21,
33,
4406,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
6459,
542,
1211,
1435,
15069,
503,
95,
202,
11231,
5962,
12,
12062,
7901,
5852,
3773,
18,
588,
1868,
10663,
202,
4406,
21,
33,
2704,
4709,
4109,
2932,
4406,
21,
8863,
84,
21,
33,
4406,
... | ||
if (i == 0) { | if (w == seperator1) { | protected void layout(Composite composite, boolean flushCache) { Rectangle clientArea = composite.getClientArea(); Control[] ws = composite.getChildren(); for (int i = 0; i < ws.length; i++) { Control w = ws[i]; if (i == 0) { // Separator Point e = w.computeSize(SWT.DEFAULT, SWT.DEFAULT, flushCache); w.setBounds(clientArea.x, clientArea.y, clientArea.width, e.y); clientArea.y += e.y; clientArea.height -= e.y; } else if (getToolBarControl() == w) { if (toolBarChildrenExist()) { Point e = w.computeSize(SWT.DEFAULT, SWT.DEFAULT, flushCache); w.setBounds(clientArea.x, clientArea.y, clientArea.width, e.y); clientArea.y += e.y + VGAP; clientArea.height -= e.y + VGAP; } } else if (getCoolBarControl() == w) { if (coolBarChildrenExist()) { Point e = w.computeSize(clientArea.width, SWT.DEFAULT, flushCache); w.setBounds(clientArea.x, clientArea.y, clientArea.width, e.y); clientArea.y += e.y + VGAP; clientArea.height -= e.y + VGAP; } } else if (statusLineManager != null && statusLineManager.getControl() == w) { Point e = w.computeSize(SWT.DEFAULT, SWT.DEFAULT, flushCache); w.setBounds(clientArea.x, clientArea.y + clientArea.height - e.y, clientArea.width, e.y); clientArea.height -= e.y + VGAP; } else { w.setBounds(clientArea.x, clientArea.y + VGAP, clientArea.width, clientArea.height - VGAP); } } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/e4338fb398d42dcc438cc0430b7b20c1d66feb73/ApplicationWindow.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/window/ApplicationWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4750,
918,
3511,
12,
9400,
9635,
16,
1250,
3663,
1649,
13,
288,
5411,
13264,
1004,
5484,
273,
9635,
18,
588,
1227,
5484,
5621,
5411,
8888,
8526,
4945,
273,
9635,
18,
588,
4212,
5621,
5411... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4750,
918,
3511,
12,
9400,
9635,
16,
1250,
3663,
1649,
13,
288,
5411,
13264,
1004,
5484,
273,
9635,
18,
588,
1227,
5484,
5621,
5411,
8888,
8526,
4945,
273,
9635,
18,
588,
4212,
5621,
5411... |
public org.quickfix.field.EventDate getEventDate() throws FieldNotFound { org.quickfix.field.EventDate value = new org.quickfix.field.EventDate(); | public quickfix.field.EventDate getEventDate() throws FieldNotFound { quickfix.field.EventDate value = new quickfix.field.EventDate(); | public org.quickfix.field.EventDate getEventDate() throws FieldNotFound { org.quickfix.field.EventDate value = new org.quickfix.field.EventDate(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/ExecutionReport.java/buggy/src/java/src/quickfix/fix44/ExecutionReport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
1133,
1626,
9832,
1626,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
1133,
1626,
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,
1133,
1626,
9832,
1626,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
1133,
1626,
460,
273,
394,
2358,
18,
19525,
904,
... |
if (dataFile.getDataAsString("type")[0].equals("IS")) { | if (dataFile.getDataAsString("type")[0].equals("IS Level 1")) { t.setTechLevel(TechConstants.T_IS_LEVEL_1); } else if (dataFile.getDataAsString("type")[0].equals("IS Level 2")) { t.setTechLevel(TechConstants.T_IS_LEVEL_2); } else if (dataFile.getDataAsString("type")[0].equals("IS Level 3")) { t.setTechLevel(TechConstants.T_IS_LEVEL_3); } else if (dataFile.getDataAsString("type")[0].equals("Clan Level 3")) { t.setTechLevel(TechConstants.T_CLAN_LEVEL_3); } else if (dataFile.getDataAsString("type")[0].equals("IS")) { | public Entity getEntity() throws EntityLoadingException { BattleArmor t = new BattleArmor(); if (!dataFile.exists("name")) throw new EntityLoadingException("Could not find name block."); t.setChassis(dataFile.getDataAsString("Name")[0]); // Model is not strictly necessary. if (dataFile.exists("Model") && dataFile.getDataAsString("Model")[0] != null) { t.setModel(dataFile.getDataAsString("Model")[0]); } else { t.setModel(""); } if (!dataFile.exists("year")) throw new EntityLoadingException("Could not find year block."); t.setYear(dataFile.getDataAsInt("year")[0]); if (!dataFile.exists("type")) throw new EntityLoadingException("Could not find type block."); if (dataFile.getDataAsString("type")[0].equals("IS")) { if (t.getYear() == 3025) { t.setTechLevel(TechConstants.T_IS_LEVEL_1); } else { t.setTechLevel(TechConstants.T_IS_LEVEL_2); } } else if (dataFile.getDataAsString("type")[0].equals("IS Level 1")) { t.setTechLevel(TechConstants.T_IS_LEVEL_1); } else if (dataFile.getDataAsString("type")[0].equals("IS Level 2")) { t.setTechLevel(TechConstants.T_IS_LEVEL_2); } else if (dataFile.getDataAsString("type")[0].equals("IS Level 3")) { t.setTechLevel(TechConstants.T_IS_LEVEL_3); } else if (dataFile.getDataAsString("type")[0].equals("Clan")) { t.setTechLevel(TechConstants.T_CLAN_LEVEL_2); } else if (dataFile.getDataAsString("type")[0].equals("Clan Level 3")) { t.setTechLevel(TechConstants.T_CLAN_LEVEL_3); } if (!dataFile.exists("tonnage")) throw new EntityLoadingException("Could not find weight block."); t.setWeight(dataFile.getDataAsFloat("tonnage")[0]); if (!dataFile.exists("BV")) throw new EntityLoadingException("Could not find BV block."); t.setBattleValue( dataFile.getDataAsInt("BV")[0] ); if (!dataFile.exists("motion_type")) throw new EntityLoadingException("Could not find movement block."); String sMotion = dataFile.getDataAsString("motion_type")[0]; int nMotion = -1; if(sMotion.equalsIgnoreCase("leg")) nMotion = IEntityMovementMode.INF_LEG; else if(sMotion.equalsIgnoreCase("jump")) nMotion = IEntityMovementMode.INF_JUMP; else if(sMotion.equalsIgnoreCase("vtol")) nMotion = IEntityMovementMode.VTOL; if (nMotion == -1) throw new EntityLoadingException("Invalid movement type: " + sMotion); t.setMovementMode(nMotion); if (!dataFile.exists("cruiseMP")) throw new EntityLoadingException("Could not find cruiseMP block."); t.setOriginalRunMP(dataFile.getDataAsInt("cruiseMP")[0]); if (dataFile.exists("jumpingMP")) t.setOriginalJumpMP(dataFile.getDataAsInt("jumpingMP")[0]); if (!dataFile.exists("armor") ) throw new EntityLoadingException("Could not find armor block."); int[] armor = dataFile.getDataAsInt("armor"); // Each trooper has the same amount of armor if (armor.length != 1) { throw new EntityLoadingException("Incorrect armor array length"); } // add the body to the armor array t.refreshLocations(); for (int x = 1; x < t.locations(); x++) { t.initializeArmor(armor[0], x); } t.autoSetInternal(); loadEquipment(t, "Squad", BattleArmor.LOC_SQUAD); String[] abbrs = t.getLocationAbbrs(); for ( int loop = 1; loop < t.locations(); loop++ ) { loadEquipment( t, abbrs[loop], loop ); } return t; } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/1aca84cbd33c9299233fb0da080b6b2c80a558c2/BLKBattleArmorFile.java/clean/megamek/src/megamek/common/loaders/BLKBattleArmorFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3887,
6352,
1435,
1216,
3887,
10515,
503,
288,
3639,
605,
4558,
298,
25583,
280,
268,
273,
394,
605,
4558,
298,
25583,
280,
5621,
3639,
309,
16051,
892,
812,
18,
1808,
2932,
529,
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,
3887,
6352,
1435,
1216,
3887,
10515,
503,
288,
3639,
605,
4558,
298,
25583,
280,
268,
273,
394,
605,
4558,
298,
25583,
280,
5621,
3639,
309,
16051,
892,
812,
18,
1808,
2932,
529,
6,... |
System.out.println(this); System.out.println(m); | public Matrix localMultiplyForGroup (Matrix m) { System.out.println(this); System.out.println(m); Matrix res = new Matrix(getWidth(),m.getHeight()); int height=res.getHeight() ; int width = res.getWidth(); for (int line=0 ; line < height ; line++) { for (int column=0 ; column < width ; column++) { double val = 0; for (int index=0 ; index < height ; index++) { System.out.println("(" + m.getWH(index,line) + " * " + getWH(column,index) + ") + "); val += m.getWH(index,line) * getWH(column,index); } System.out.println(" == " + val + "\n"); res.setWH(column,line,val); } } return res; } | 23362 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/23362/6c6cebd15e6ccaa8618f1c96037b6df18600d110/Matrix.java/buggy/src/org/objectweb/proactive/examples/matrix/Matrix.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
7298,
1191,
26040,
1290,
1114,
261,
4635,
312,
13,
288,
202,
3163,
18,
659,
18,
8222,
12,
2211,
1769,
202,
3163,
18,
659,
18,
8222,
12,
81,
1769,
202,
4635,
400,
273,
394,
7298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7298,
1191,
26040,
1290,
1114,
261,
4635,
312,
13,
288,
202,
3163,
18,
659,
18,
8222,
12,
2211,
1769,
202,
3163,
18,
659,
18,
8222,
12,
81,
1769,
202,
4635,
400,
273,
394,
7298,
... | |
_optionSignature = new Signature(); | Signature optionSignature = new Signature(); | public void readPacket(byte buffer[], int offset, int length) throws IllegalArgumentException { if (buffer.length - offset < length) throw new IllegalArgumentException("len=" + buffer.length + " off=" + offset + " length=" + length); if (length < 22) // min header size throw new IllegalArgumentException("Too small: len=" + buffer.length); int cur = offset; _sendStreamId = DataHelper.fromLong(buffer, cur, 4); cur += 4; _receiveStreamId = DataHelper.fromLong(buffer, cur, 4); cur += 4; _sequenceNum = DataHelper.fromLong(buffer, cur, 4); cur += 4; _ackThrough = DataHelper.fromLong(buffer, cur, 4); cur += 4; int numNacks = (int)DataHelper.fromLong(buffer, cur, 1); cur++; if (length < 22 + numNacks*4) throw new IllegalArgumentException("Too small with " + numNacks + " nacks: " + length); if (numNacks > 0) { _nacks = new long[numNacks]; for (int i = 0; i < numNacks; i++) { _nacks[i] = DataHelper.fromLong(buffer, cur, 4); cur += 4; } } else { _nacks = null; } _resendDelay = (int)DataHelper.fromLong(buffer, cur, 1); cur++; _flags = (int)DataHelper.fromLong(buffer, cur, 2); cur += 2; int optionSize = (int)DataHelper.fromLong(buffer, cur, 2); cur += 2; if (length < 22 + numNacks*4 + optionSize) throw new IllegalArgumentException("Too small with " + numNacks + " nacks and " + optionSize + " options: " + length); int payloadBegin = cur + optionSize; int payloadSize = length - payloadBegin; if ( (payloadSize < 0) || (payloadSize > MAX_PAYLOAD_SIZE) ) throw new IllegalArgumentException("length: " + length + " offset: " + offset + " begin: " + payloadBegin); // skip ahead to the payload _payload = new ByteArray(new byte[payloadSize]); //_cache.acquire(); System.arraycopy(buffer, payloadBegin, _payload.getData(), 0, payloadSize); _payload.setValid(payloadSize); _payload.setOffset(0); // ok now lets go back and deal with the options if (isFlagSet(FLAG_DELAY_REQUESTED)) { _optionDelay = (int)DataHelper.fromLong(buffer, cur, 2); cur += 2; } if (isFlagSet(FLAG_FROM_INCLUDED)) { _optionFrom = new Destination(); try { cur += _optionFrom.readBytes(buffer, cur); } catch (DataFormatException dfe) { throw new IllegalArgumentException("Bad from field: " + dfe.getMessage()); } } if (isFlagSet(FLAG_MAX_PACKET_SIZE_INCLUDED)) { _optionMaxSize = (int)DataHelper.fromLong(buffer, cur, 2); cur += 2; } if (isFlagSet(FLAG_SIGNATURE_INCLUDED)) { _optionSignature = new Signature(); byte buf[] = new byte[Signature.SIGNATURE_BYTES]; System.arraycopy(buffer, cur, buf, 0, Signature.SIGNATURE_BYTES); _optionSignature.setData(buf); cur += Signature.SIGNATURE_BYTES; } } | 45677 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45677/900420719ee2a88d69d78ef9add09f2cb910daf4/Packet.java/buggy/apps/streaming/java/src/net/i2p/client/streaming/Packet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
855,
6667,
12,
7229,
1613,
63,
6487,
509,
1384,
16,
509,
769,
13,
1216,
2754,
288,
3639,
309,
261,
4106,
18,
2469,
300,
1384,
411,
769,
13,
2398,
604,
394,
2754,
2932,
1897,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
855,
6667,
12,
7229,
1613,
63,
6487,
509,
1384,
16,
509,
769,
13,
1216,
2754,
288,
3639,
309,
261,
4106,
18,
2469,
300,
1384,
411,
769,
13,
2398,
604,
394,
2754,
2932,
1897,
... |
if (checkExtensions( new String[]{"*.css;*.CSS"}, fileName ) == false ) | if (checkExtensions( new String[]{"*.css","*.CSS"}, fileName ) == false ) | public void widgetSelected( SelectionEvent e ) { FileDialog fileSelector = new FileDialog( PlatformUI.getWorkbench( ) .getDisplay( ) .getActiveShell( ), SWT.NULL ); fileSelector.setFilterExtensions(new String[]{"*.css;*.CSS"});//$NON-NLS-1$ //$NON-NLS-2$ String fileName = fileSelector.open( ); if ( fileName != null ) { // should check extensions in Linux enviroment if (checkExtensions( new String[]{"*.css;*.CSS"}, fileName ) == false ) { ExceptionHandler.openErrorMessageBox( Messages.getString( "WizardSelectCssStylePage.FileNameError.Title" ), Messages.getString( "WizardSelectCssStylePage.FileNameError.Message" ) ); }else { fileNameField.setText( fileName ); } } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/896327cfdafeec5e24cd35581f455b6ebe18bbee/WizardSelectCssStylePage.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/WizardSelectCssStylePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
3604,
7416,
12,
12977,
1133,
425,
262,
1082,
202,
95,
9506,
202,
812,
6353,
585,
4320,
273,
394,
1387,
6353,
12,
11810,
5370,
18,
588,
2421,
22144,
12,
262,
25083,
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,
1875,
202,
482,
918,
3604,
7416,
12,
12977,
1133,
425,
262,
1082,
202,
95,
9506,
202,
812,
6353,
585,
4320,
273,
394,
1387,
6353,
12,
11810,
5370,
18,
588,
2421,
22144,
12,
262,
25083,
202,
... |
public void serialize( Document doc ) | public void serialize( Element elem ) | public void serialize( Document doc ) throws IOException { if ( _writer == null ) throw new IllegalStateException( "No writer supplied for serializer" ); try { startDocument(); } catch ( SAXException except ) { } serializeNode( doc ); serializePreRoot(); flush(); if ( _exception != null ) throw _exception; } | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/05632b8c819f8c808367c08822d8eeb4b3819115/BaseMarkupSerializer.java/buggy/src/org/apache/xml/serialize/BaseMarkupSerializer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4472,
12,
3010,
3659,
262,
3639,
1216,
1860,
565,
288,
202,
430,
261,
389,
6299,
422,
446,
262,
202,
565,
604,
394,
5477,
12,
315,
2279,
2633,
4580,
364,
6340,
6,
11272,
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,
377,
1071,
918,
4472,
12,
3010,
3659,
262,
3639,
1216,
1860,
565,
288,
202,
430,
261,
389,
6299,
422,
446,
262,
202,
565,
604,
394,
5477,
12,
315,
2279,
2633,
4580,
364,
6340,
6,
11272,
202,... |
public IRegion getHoverRegion(ITextViewer textViewer, int offset) { try { // Extract current line int lineNr = textViewer.getDocument().getLineOfOffset(offset); int lOffset = textViewer.getDocument().getLineOffset(lineNr); String line = textViewer.getDocument().get(lOffset, textViewer.getDocument().getLineLength(lineNr)); int start = offset - lOffset; int cStart = line.lastIndexOf('\\', start); int cEnd = line.indexOf('}', start); if (cStart >= 0 && cEnd >= 0) { String fullCommand = line.substring(cStart, cEnd + 1); Matcher m = recognizeCommand.matcher(fullCommand); if (m.matches()) { String command = m.group(1); if (command.indexOf("cite") >= 0) { int regionStart = line.lastIndexOf(',', start) < line.lastIndexOf('{', start) ? line.lastIndexOf('{', start) + 1 : line.lastIndexOf(',', start) + 1; int lastComma = line.indexOf(',', start); if (lastComma >= 0 && lastComma < cEnd) { return new Region(lOffset + regionStart, lastComma - regionStart); } else { return new Region(lOffset + regionStart, cEnd - regionStart); } } else { return new Region(lOffset + cStart, (cEnd - cStart) + 1); } } } /* // first closing brace int cbr = line.indexOf('}', start); // last opening brace int obr = line.lastIndexOf('{', start); int insBack = line.lastIndexOf('\\', start); if (obr != -1 && cbr != -1 && obr > line.lastIndexOf('}', start) && (line.indexOf('{', start) == -1 || cbr < line.indexOf('{', start)) && obr > insBack) { // seems we are inside {...} // now search for the command obr = line.lastIndexOf('\\', obr); if (obr != -1) return new Region(lOffset + obr, (cbr - obr) + 1); }*/ // else extract current word int dLength = line.length(); while ((start > 0) && !isIgnoreChar(line.charAt(start))) start--; int finish = start; while ((finish < dLength) && !isIgnoreChar(line.charAt(finish))) finish++; // special case \command we want the backslash if not \\command if (line.charAt(start) == '\\' && (start == 0 || (start > 0 && line.charAt(start - 1) != '\\'))) start--; Region r = new Region(lOffset + start + 1, (finish - start) - 1); return r; } catch (BadLocationException ex) { return new Region(offset, 0); } } | 9028 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9028/deecd6269643d7c913361976527126932fb8a0a3/TexHover.java/buggy/source/net/sourceforge/texlipse/editor/hover/TexHover.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
45,
5165,
588,
21184,
5165,
12,
1285,
408,
18415,
955,
18415,
16,
474,
3348,
15329,
698,
95,
759,
4976,
2972,
1369,
474,
1369,
18726,
33,
955,
18415,
18,
588,
2519,
7675,
588,
1670,
951,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
45,
5165,
588,
21184,
5165,
12,
1285,
408,
18415,
955,
18415,
16,
474,
3348,
15329,
698,
95,
759,
4976,
2972,
1369,
474,
1369,
18726,
33,
955,
18415,
18,
588,
2519,
7675,
588,
1670,
951,... | ||
String message = genDeleteConfirmationMessage(task); boolean deleteConfirmed = MessageDialog.openQuestion(PlatformUI.getWorkbench().getActiveWorkbenchWindow() .getShell(), "Confirm Delete", message); if (!deleteConfirmed) { return; } TasksUiPlugin.getTaskListManager().deactivateTask(task); TasksUiPlugin.getTaskListManager().getTaskList().deleteTask(task); ContextCorePlugin.getContextManager().deleteContext(task.getHandleIdentifier()); TasksUiUtil.closeEditorInActivePage(task); | public void run() { ISelection selection = TaskListView.getFromActivePerspective().getViewer().getSelection(); for (Object selectedObject : ((IStructuredSelection) selection).toList()) { if (selectedObject instanceof ITask || selectedObject instanceof AbstractQueryHit) { ITask task = null; if (selectedObject instanceof AbstractQueryHit) { task = ((AbstractQueryHit) selectedObject).getCorrespondingTask(); } else { task = (ITask) selectedObject; } if (task == null) { MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Mylar Tasks", "No task data to delete."); return; } String message = genDeleteConfirmationMessage(task); boolean deleteConfirmed = MessageDialog.openQuestion(PlatformUI.getWorkbench().getActiveWorkbenchWindow() .getShell(), "Confirm Delete", message); if (!deleteConfirmed) { return; } TasksUiPlugin.getTaskListManager().deactivateTask(task); TasksUiPlugin.getTaskListManager().getTaskList().deleteTask(task); ContextCorePlugin.getContextManager().deleteContext(task.getHandleIdentifier()); TasksUiUtil.closeEditorInActivePage(task); } else if (selectedObject instanceof AbstractRepositoryQuery) { boolean deleteConfirmed = MessageDialog.openQuestion(PlatformUI.getWorkbench().getActiveWorkbenchWindow() .getShell(), "Confirm delete", "Delete the selected query? Task data will not be deleted."); if (deleteConfirmed) { TasksUiPlugin.getTaskListManager().getTaskList().deleteQuery((AbstractRepositoryQuery) selectedObject); } } else if (selectedObject instanceof TaskCategory) { boolean deleteConfirmed = MessageDialog.openQuestion(PlatformUI.getWorkbench().getActiveWorkbenchWindow() .getShell(), "Confirm Delete", "Delete the selected category? Contained tasks will be moved to the root."); if (!deleteConfirmed) return; TaskCategory cat = (TaskCategory) selectedObject; for (ITask task : cat.getChildren()) { ContextCorePlugin.getContextManager().deleteContext(task.getHandleIdentifier()); TasksUiUtil.closeEditorInActivePage(task); } TasksUiPlugin.getTaskListManager().getTaskList().deleteCategory(cat); } else { MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Delete failed", "Nothing selected."); return; } } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/13dbd1fdca785609517495bb34562a349a49f698/DeleteAction.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
288,
202,
202,
45,
6233,
4421,
273,
3837,
682,
1767,
18,
588,
1265,
3896,
14781,
16772,
7675,
588,
18415,
7675,
588,
6233,
5621,
202,
202,
1884,
261,
921,
3170,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
1435,
288,
202,
202,
45,
6233,
4421,
273,
3837,
682,
1767,
18,
588,
1265,
3896,
14781,
16772,
7675,
588,
18415,
7675,
588,
6233,
5621,
202,
202,
1884,
261,
921,
3170,... | |
throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); } | throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); } | public RubyObject removeCvar(RubyObject name) { // Wrong Parameter ? RubyId id = getRuby().toId(name); if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } RubyObject value = (RubyObject) getInstanceVariables().remove(id); if (value != null) { return value; } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); } | 49476 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49476/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
1206,
39,
1401,
12,
54,
10340,
921,
508,
13,
288,
368,
24668,
5498,
692,
202,
202,
54,
10340,
548,
612,
273,
4170,
10340,
7675,
869,
548,
12,
529,
1769,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
1206,
39,
1401,
12,
54,
10340,
921,
508,
13,
288,
368,
24668,
5498,
692,
202,
202,
54,
10340,
548,
612,
273,
4170,
10340,
7675,
869,
548,
12,
529,
1769,
202,
202,
... |
NativeRegExp.isHex(c = s[index++])) | NativeRegExp.isHex((char)(c = s[index++]))) | void buildBitmap(MatchState state, char[] s, boolean fold) { int index = ((Integer) kid).intValue(); int end = kid2; byte fill = 0; int i,n,ocp; boolean not = false; kid2 = 0; if (s[index] == '^') { not = true; kid2 = -1; index++; } calcBMSize(s, index, end, fold); bitmap = new byte[bmsize]; if (not) { fill = (byte)0xff; for (i = 0; i < bmsize; i++) bitmap[i] = (byte)0xff; bitmap[0] = (byte)0xfe; } int nchars = bmsize * NativeRegExp.JS_BITS_PER_BYTE; char lastc = (char)nchars; boolean inrange = false; while (index < end) { char c = s[index++]; if (c == '\\') { c = s[index++]; switch (c) { case 'b': case 'f': case 'n': case 'r': case 't': case 'v': c = NativeRegExp.getEscape(c); break; case 'd': if (inrange) checkRange(lastc, fill); lastc = (char) nchars; for (c = '0'; c <= '9'; c++) matchBit(c, fill); continue; case 'D': if (inrange) checkRange(lastc, fill); lastc = (char) nchars; for (c = 0; c < '0'; c++) matchBit(c, fill); for (c = '9' + 1; c < nchars; c++) matchBit(c, fill); continue; case 'w': if (inrange) checkRange(lastc, fill); lastc = (char) nchars; for (c = 0; c < nchars; c++) if (NativeRegExp.isWord(c)) matchBit(c, fill); continue; case 'W': if (inrange) checkRange(lastc, fill); lastc = (char) nchars; for (c = 0; c < nchars; c++) if (!NativeRegExp.isWord(c)) matchBit(c, fill); continue; case 's': if (inrange) checkRange(lastc, fill); lastc = (char) nchars; for (c = 0; c < nchars; c++) if (Character.isWhitespace(c)) matchBit(c, fill); continue; case 'S': if (inrange) checkRange(lastc, fill); lastc = (char) nchars; for (c = 0; c < nchars; c++) if (!Character.isWhitespace(c)) matchBit(c, fill); continue; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': n = NativeRegExp.unDigit(c); ocp = index - 2; c = s[index]; if ('0' <= c && c <= '7') { index++; n = 8 * n + NativeRegExp.unDigit(c); c = s[index]; if ('0' <= c && c <= '7') { index++; i = 8 * n + NativeRegExp.unDigit(c); if (i <= 0377) n = i; else index--; } } c = (char) n; break; case 'x': ocp = index; if (index < s.length && NativeRegExp.isHex(c = s[index++])) { n = NativeRegExp.unHex(c); if (index < s.length && NativeRegExp.isHex(c = s[index++])) { n <<= 4; n += NativeRegExp.unHex(c); } } else { index = ocp; /* \xZZ is xZZ (Perl does \0ZZ!) */ n = 'x'; } c = (char) n; break; case 'u': if (s.length > index+3 && NativeRegExp.isHex(s[index+0]) && NativeRegExp.isHex(s[index+1]) && NativeRegExp.isHex(s[index+2]) && NativeRegExp.isHex(s[index+3])) { n = (((((NativeRegExp.unHex(s[index+0]) << 4) + NativeRegExp.unHex(s[index+1])) << 4) + NativeRegExp.unHex(s[index+2])) << 4) + NativeRegExp.unHex(s[index+3]); c = (char) n; index += 4; } break; case 'c': c = s[index++]; c = Character.toUpperCase(c); c = (char) (c ^ 64); // JS_TOCTRL break; } } if (inrange) { if (lastc > c) { throw NativeGlobal.constructError( Context.getCurrentContext(), "RangeError", ScriptRuntime.getMessage( "msg.bad.range", null), state.scope); } inrange = false; } else { // Set lastc so we match just c's bit in the for loop. lastc = c; // [balance: if (index + 1 < end && s[index] == '-' && s[index+1] != ']') { index++; inrange = true; continue; } } // Match characters in the range [lastc, c]. for (; lastc <= c; lastc++) { matchBit(lastc, fill); if (fold) { /* * Must do both upper and lower for Turkish dotless i, * Georgian, etc. */ char foldc = Character.toUpperCase(lastc); matchBit(foldc, fill); foldc = Character.toLowerCase(foldc); matchBit(foldc, fill); } } lastc = c; } } | 13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/b16d847568c4b6033672534e58b050c4923f9c31/NativeRegExp.java/clean/js/rhino/src/org/mozilla/javascript/regexp/NativeRegExp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1361,
12224,
12,
2060,
1119,
919,
16,
1149,
8526,
272,
16,
1250,
11590,
13,
288,
3639,
509,
770,
273,
14015,
4522,
13,
17395,
2934,
474,
620,
5621,
3639,
509,
679,
273,
17395,
22,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1361,
12224,
12,
2060,
1119,
919,
16,
1149,
8526,
272,
16,
1250,
11590,
13,
288,
3639,
509,
770,
273,
14015,
4522,
13,
17395,
2934,
474,
620,
5621,
3639,
509,
679,
273,
17395,
22,
... |
null, "setAltKey"); | null, "setAltKeyExpr"); | public PropertyDescriptor[] getPropertyDescriptors() { PropertyDescriptor[] result = new PropertyDescriptor[27]; try { result[0] = new PropertyDescriptor("accesskey", ELCheckboxTag.class, null, "setAccesskey"); result[1] = new PropertyDescriptor("alt", ELCheckboxTag.class, null, "setAlt"); result[2] = new PropertyDescriptor("altKey", ELCheckboxTag.class, null, "setAltKey"); // This attribute has a non-standard mapping. result[3] = new PropertyDescriptor("disabled", ELCheckboxTag.class, null, "setDisabledExpr"); // This attribute has a non-standard mapping. result[4] = new PropertyDescriptor("indexed", ELCheckboxTag.class, null, "setIndexedExpr"); result[5] = new PropertyDescriptor("name", ELCheckboxTag.class, null, "setName"); result[6] = new PropertyDescriptor("onblur", ELCheckboxTag.class, null, "setOnblur"); result[7] = new PropertyDescriptor("onchange", ELCheckboxTag.class, null, "setOnchange"); result[8] = new PropertyDescriptor("onclick", ELCheckboxTag.class, null, "setOnclick"); result[9] = new PropertyDescriptor("ondblclick", ELCheckboxTag.class, null, "setOndblclick"); result[10] = new PropertyDescriptor("onfocus", ELCheckboxTag.class, null, "setOnfocus"); result[11] = new PropertyDescriptor("onkeydown", ELCheckboxTag.class, null, "setOnkeydown"); result[12] = new PropertyDescriptor("onkeypress", ELCheckboxTag.class, null, "setOnkeypress"); result[13] = new PropertyDescriptor("onkeyup", ELCheckboxTag.class, null, "setOnkeyup"); result[14] = new PropertyDescriptor("onmousedown", ELCheckboxTag.class, null, "setOnmousedown"); result[15] = new PropertyDescriptor("onmousemove", ELCheckboxTag.class, null, "setOnmousemove"); result[16] = new PropertyDescriptor("onmouseout", ELCheckboxTag.class, null, "setOnmouseout"); result[17] = new PropertyDescriptor("onmouseover", ELCheckboxTag.class, null, "setOnmouseover"); result[18] = new PropertyDescriptor("onmouseup", ELCheckboxTag.class, null, "setOnmouseup"); result[19] = new PropertyDescriptor("property", ELCheckboxTag.class, null, "setProperty"); result[20] = new PropertyDescriptor("style", ELCheckboxTag.class, null, "setStyle"); result[21] = new PropertyDescriptor("styleClass", ELCheckboxTag.class, null, "setStyleClass"); result[22] = new PropertyDescriptor("styleId", ELCheckboxTag.class, null, "setStyleId"); result[23] = new PropertyDescriptor("tabindex", ELCheckboxTag.class, null, "setTabindex"); result[24] = new PropertyDescriptor("title", ELCheckboxTag.class, null, "setTitle"); result[25] = new PropertyDescriptor("titleKey", ELCheckboxTag.class, null, "setTitleKey"); result[26] = new PropertyDescriptor("value", ELCheckboxTag.class, null, "setValue"); } catch (IntrospectionException ex) { ex.printStackTrace(); } return (result); } | 2722 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2722/db064e19656421b94aaf753550935d95f44bd5f9/ELCheckboxTagBeanInfo.java/buggy/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELCheckboxTagBeanInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
225,
26761,
8526,
3911,
12705,
1435,
565,
288,
3639,
26761,
8526,
225,
563,
282,
273,
394,
26761,
63,
5324,
15533,
3639,
775,
288,
5411,
563,
63,
20,
65,
273,
394,
26761,
2932,
3860... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
26761,
8526,
3911,
12705,
1435,
565,
288,
3639,
26761,
8526,
225,
563,
282,
273,
394,
26761,
63,
5324,
15533,
3639,
775,
288,
5411,
563,
63,
20,
65,
273,
394,
26761,
2932,
3860... |
public org.quickfix.field.SecurityIDSource getSecurityIDSource() throws FieldNotFound { org.quickfix.field.SecurityIDSource value = new org.quickfix.field.SecurityIDSource(); | public quickfix.field.SecurityIDSource getSecurityIDSource() throws FieldNotFound { quickfix.field.SecurityIDSource value = new quickfix.field.SecurityIDSource(); | public org.quickfix.field.SecurityIDSource getSecurityIDSource() throws FieldNotFound { org.quickfix.field.SecurityIDSource value = new org.quickfix.field.SecurityIDSource(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/SecurityList.java/buggy/src/java/src/quickfix/fix44/SecurityList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
734,
1830,
19288,
734,
1830,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
734,
1830,
460,
273,
394,
2358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
734,
1830,
19288,
734,
1830,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
734,
1830,
460,
273,
394,
2358,
... |
testSession.save(); | testSession.save(); | public void testSaveInvalidStateException() throws RepositoryException { // get default workspace test root node using superuser session Node defaultRootNode = (Node) superuser.getItem(testRootNode.getPath()); // create a node Node nodeSession1 = defaultRootNode.addNode(nodeName1, testNodeType); // save new node superuser.save(); // make a modification nodeSession1.addNode(nodeName2, testNodeType); // get the new node with a different session Session testSession = helper.getReadWriteSession(); Node nodeSession2 = (Node) testSession.getItem(nodeSession1.getPath()); // delete the node with the new session nodeSession2.remove(); // make node removal persistent testSession.save(); // save changes made wit superuser session try { superuser.save(); fail("Saving a modified Node using Session.save() already deleted by an other session should throw InvalidItemStateException"); } catch (InvalidItemStateException e) { // ok, works as expected } } | 48761 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48761/a70220ce21821950174edcf6b4370f7215d33b9f/SessionTest.java/clean/src/test/org/apache/jackrabbit/test/api/SessionTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4755,
1941,
5060,
1435,
1216,
13367,
288,
3639,
368,
336,
805,
6003,
1842,
1365,
756,
1450,
2240,
1355,
1339,
3639,
2029,
805,
29658,
273,
261,
907,
13,
2240,
1355,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4755,
1941,
5060,
1435,
1216,
13367,
288,
3639,
368,
336,
805,
6003,
1842,
1365,
756,
1450,
2240,
1355,
1339,
3639,
2029,
805,
29658,
273,
261,
907,
13,
2240,
1355,
18,
5... |
protected SimpleSymbol( char token, String name, Annotation annotation ) { | protected SimpleSymbol(char token, Annotation annotation) { | protected SimpleSymbol( char token, String name, Annotation annotation ) { this.token = token; this.name = name; this.annotation = new SimpleAnnotation(annotation); } | 50397 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50397/50df2bb038e847e65fa3345d040faec4b21c5bc8/SimpleSymbol.java/clean/src/org/biojava/bio/symbol/SimpleSymbol.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
4477,
5335,
12,
565,
1149,
1147,
16,
514,
508,
16,
6090,
3204,
225,
262,
288,
565,
333,
18,
2316,
273,
1147,
31,
565,
333,
18,
529,
273,
508,
31,
565,
333,
18,
11495,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
4477,
5335,
12,
565,
1149,
1147,
16,
514,
508,
16,
6090,
3204,
225,
262,
288,
565,
333,
18,
2316,
273,
1147,
31,
565,
333,
18,
529,
273,
508,
31,
565,
333,
18,
11495,
273,
394,
... |
return formatPeriod(startMillis, endMillis, ISO_EXTENDED_FORMAT_PATTERN, false, TimeZone.getDefault() ); | return formatPeriod(startMillis, endMillis, ISO_EXTENDED_FORMAT_PATTERN, false, TimeZone.getDefault()); | public static String formatPeriodISO(long startMillis, long endMillis) { return formatPeriod(startMillis, endMillis, ISO_EXTENDED_FORMAT_PATTERN, false, TimeZone.getDefault() ); } | 4554 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4554/bc218db61cce03a5facfc1e7130af8579367bba7/DurationFormatUtils.java/buggy/src/java/org/apache/commons/lang/time/DurationFormatUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
740,
5027,
12609,
12,
5748,
787,
4814,
16,
1525,
679,
4814,
13,
288,
3639,
327,
740,
5027,
12,
1937,
4814,
16,
679,
4814,
16,
9351,
67,
4142,
22088,
67,
7254,
67,
10831,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
740,
5027,
12609,
12,
5748,
787,
4814,
16,
1525,
679,
4814,
13,
288,
3639,
327,
740,
5027,
12,
1937,
4814,
16,
679,
4814,
16,
9351,
67,
4142,
22088,
67,
7254,
67,
10831,... |
final List expectedAlerts = Arrays.asList(new String[] { "TBODY", "TABLE" }); | final String[] expectedAlerts = { "TBODY", "TABLE" }; | public void testInsertRowInEmtpyTable() throws Exception { final String content = "<html><head>" + "<script>" + "function test()" + "{" + " var oTable = document.getElementById('mytable');" + " var tableRow = oTable.insertRow(0);" + " alert(tableRow.parentNode.tagName);" + " alert(tableRow.parentNode.parentNode.tagName);" + "}" + "</script>" + "</head>" + "<body onload='test()'>" + "<table id='mytable'>" + "</table>" + "</body>" + "</html>"; final List expectedAlerts = Arrays.asList(new String[] { "TBODY", "TABLE" }); createTestPageForRealBrowserIfNeeded(content, expectedAlerts); final List collectedAlerts = new ArrayList(); loadPage(content, collectedAlerts); assertEquals(expectedAlerts, collectedAlerts); } | 3508 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3508/89261f9bae92ed7e774145b8d142f593385ad5a1/TableTest.java/buggy/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/TableTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4600,
1999,
382,
41,
1010,
2074,
1388,
1435,
1216,
1185,
288,
3639,
727,
514,
913,
273,
5411,
3532,
2620,
4438,
1978,
2984,
5411,
397,
3532,
4263,
2984,
5411,
397,
315,
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,
377,
1071,
918,
1842,
4600,
1999,
382,
41,
1010,
2074,
1388,
1435,
1216,
1185,
288,
3639,
727,
514,
913,
273,
5411,
3532,
2620,
4438,
1978,
2984,
5411,
397,
3532,
4263,
2984,
5411,
397,
315,
9... |
if ( ejbName == null ) { | if (ejbName == null) { | protected void processElement() { if (inEJBRef || (parseState != STATE_IN_ENTITY && parseState != STATE_IN_SESSION && parseState != STATE_IN_MESSAGE)) { return; } if (currentElement.equals(HOME_INTERFACE) || currentElement.equals(REMOTE_INTERFACE) || currentElement.equals(LOCAL_INTERFACE) || currentElement.equals(LOCAL_HOME_INTERFACE) || currentElement.equals(BEAN_CLASS) || currentElement.equals(PK_CLASS)) { // Get the filename into a String object File classFile = null; String className = currentText.trim(); // If it's a primitive wrapper then we shouldn't try and put // it into the jar, so ignore it. if (!className.startsWith("java.") && !className.startsWith("javax.")) { // Translate periods into path separators, add .class to the // name, create the File object and add it to the Hashtable. className = className.replace('.', File.separatorChar); className += ".class"; classFile = new File(srcDir, className); ejbFiles.put(className, classFile); } } // Get the value of the <ejb-name> tag. Only the first occurence. if (currentElement.equals(EJB_NAME)) { if ( ejbName == null ) { ejbName = currentText.trim(); } } } | 17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/c7b5b643b25b20f5c96097b2c54e2e26a054f212/DescriptorHandler.java/buggy/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1207,
1046,
1435,
288,
3639,
309,
261,
267,
22719,
1957,
747,
2398,
261,
2670,
1119,
480,
7442,
67,
706,
67,
11101,
597,
1109,
1119,
480,
7442,
67,
706,
67,
7042,
597,
1109,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1207,
1046,
1435,
288,
3639,
309,
261,
267,
22719,
1957,
747,
2398,
261,
2670,
1119,
480,
7442,
67,
706,
67,
11101,
597,
1109,
1119,
480,
7442,
67,
706,
67,
7042,
597,
1109,
... |
("Depth of cflow should have been recorded by now"); | ("Depth of cflow should have been recorded by now. This= " + this + " at " + position()); | public abc.weaving.aspectinfo.Pointcut makeAIPointcut() { if(depth==-1) throw new InternalCompilerError ("Depth of cflow should have been recorded by now"); return new abc.weaving.aspectinfo.Cflow (pc.makeAIPointcut(),position(),depth); } | 236 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/236/7982195af028aee79831da4c29f936955ba628c3/PCCflow_c.java/buggy/aop/abc/src/abc/aspectj/ast/PCCflow_c.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
20011,
18,
1814,
5339,
18,
23579,
1376,
18,
2148,
5150,
1221,
18194,
2148,
5150,
1435,
288,
202,
430,
12,
5979,
631,
17,
21,
13,
604,
394,
3186,
9213,
668,
9506,
225,
7566,
6148,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
20011,
18,
1814,
5339,
18,
23579,
1376,
18,
2148,
5150,
1221,
18194,
2148,
5150,
1435,
288,
202,
430,
12,
5979,
631,
17,
21,
13,
604,
394,
3186,
9213,
668,
9506,
225,
7566,
6148,
... |
if ((table.getSelectedRowCount() <= 1 && table.getSelectedColumnCount() <= 1) || (table.getRowSelectionAllowed() == false && table.getColumnSelectionAllowed() == false)) { rowModel.setSelectionInterval((rowLead + 1)%(rowMax + 1), (rowLead + 1)%(rowMax + 1)); | if ((table.getSelectedRowCount() <= 1 && table.getSelectedColumnCount() <= 1) || (table.getRowSelectionAllowed() == false && table.getColumnSelectionAllowed() == false)) { rowModel.setSelectionInterval((rowLead + 1)%(rowMax + 1), (rowLead + 1)%(rowMax + 1)); | public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colModel.getLeadSelectionIndex(); int colMax = table.getModel().getColumnCount() - 1; if ((evt.getKeyCode() == KeyEvent.VK_DOWN) || (evt.getKeyCode() == KeyEvent.VK_KP_DOWN)) { if (!evt.isShiftDown()) { table.clearSelection(); rowModel.setSelectionInterval(Math.min(rowLead + 1, rowMax), Math.min(rowLead + 1, rowMax)); colModel.setSelectionInterval(colLead,colLead); } else { rowModel.setLeadSelectionIndex(Math.min(rowLead + 1, rowMax)); colModel.setLeadSelectionIndex(colLead); } } else if ((evt.getKeyCode() == KeyEvent.VK_UP) || (evt.getKeyCode() == KeyEvent.VK_KP_UP)) { if (!evt.isShiftDown()) { table.clearSelection(); rowModel.setSelectionInterval(Math.max(rowLead - 1, 0), Math.max(rowLead - 1, 0)); colModel.setSelectionInterval(colLead,colLead); } else { rowModel.setLeadSelectionIndex(Math.max(rowLead - 1, 0)); colModel.setLeadSelectionIndex(colLead); } } else if ((evt.getKeyCode() == KeyEvent.VK_LEFT) || (evt.getKeyCode() == KeyEvent.VK_KP_LEFT)) { if (evt.isShiftDown()) { colModel.setLeadSelectionIndex(Math.max(colLead - 1, 0)); rowModel.setLeadSelectionIndex(rowLead); } else { table.clearSelection(); rowModel.setSelectionInterval(rowLead,rowLead); colModel.setSelectionInterval(Math.max(colLead - 1, 0), Math.max(colLead - 1, 0)); } } else if ((evt.getKeyCode() == KeyEvent.VK_RIGHT) || (evt.getKeyCode() == KeyEvent.VK_KP_RIGHT)) { if (evt.isShiftDown()) { colModel.setLeadSelectionIndex(Math.min(colLead + 1, colMax)); rowModel.setLeadSelectionIndex(rowLead); } else { table.clearSelection(); rowModel.setSelectionInterval(rowLead,rowLead); colModel.setSelectionInterval(Math.min(colLead + 1, colMax), Math.min(colLead + 1, colMax)); } } else if (evt.getKeyCode() == KeyEvent.VK_END) { if (evt.isControlDown() && evt.isShiftDown()) { rowModel.setLeadSelectionIndex(rowMax); colModel.setLeadSelectionIndex(colLead); } else if (evt.isControlDown()) { table.clearSelection(); rowModel.setSelectionInterval(rowMax,rowMax); colModel.setSelectionInterval(colLead, colLead); } else if (evt.isShiftDown()) { colModel.setLeadSelectionIndex(colMax); rowModel.setLeadSelectionIndex(rowLead); } else { table.clearSelection(); rowModel.setSelectionInterval(rowLead, rowLead); colModel.setSelectionInterval(colMax, colMax); } } else if (evt.getKeyCode() == KeyEvent.VK_HOME) { if (evt.isControlDown() && evt.isShiftDown()) { rowModel.setLeadSelectionIndex(0); colModel.setLeadSelectionIndex(colLead); } else if (evt.isControlDown()) { table.clearSelection(); rowModel.setSelectionInterval(0,0); colModel.setSelectionInterval(colLead, colLead); } else if (evt.isShiftDown()) { colModel.setLeadSelectionIndex(0); rowModel.setLeadSelectionIndex(rowLead); } else { table.clearSelection(); rowModel.setSelectionInterval(rowLead, rowLead); colModel.setSelectionInterval(0, 0); } } else if (evt.getKeyCode() == KeyEvent.VK_F2) { // FIXME: Implement "start editing" } else if (evt.getKeyCode() == KeyEvent.VK_PAGE_UP) { // FIXME: implement, need JList.ensureIndexIsVisible to work } else if (evt.getKeyCode() == KeyEvent.VK_PAGE_DOWN) { // FIXME: implement, need JList.ensureIndexIsVisible to work } else if (evt.getKeyCode() == KeyEvent.VK_TAB) { // FIXME: Implement select next column // NOTE: TAB doesn't get recognized by this KeyHandler // something must be intercepting it and using it to change // focus } else if (evt.getKeyCode() == KeyEvent.VK_ENTER) { // If nothing is selected, select the first cell in the table if (table.getSelectedRowCount() == 0 && table.getSelectedColumnCount() == 0) { rowModel.setSelectionInterval(0, 0); colModel.setSelectionInterval(0, 0); return; } // If the lead selection index isn't selected (ie a remove operation // happened, then set the lead to the first selected cell in the // table if (!table.isCellSelected(rowLead, colLead)) { rowModel.addSelectionInterval(rowModel.getMinSelectionIndex(), rowModel.getMinSelectionIndex()); colModel.addSelectionInterval(colModel.getMinSelectionIndex(), colModel.getMinSelectionIndex()); return; } // If there is just one cell selected, select the next row, and wrap // when you get to the edges of the table. if ((table.getSelectedRowCount() <= 1 && table.getSelectedColumnCount() <= 1) || (table.getRowSelectionAllowed() == false && table.getColumnSelectionAllowed() == false)) { rowModel.setSelectionInterval((rowLead + 1)%(rowMax + 1), (rowLead + 1)%(rowMax + 1)); if (rowLead == rowMax) colModel.setSelectionInterval((colLead + 1)%(colMax + 1), (colLead + 1)%(colMax + 1)); else colModel.setSelectionInterval(colLead, colLead); return; } // Otherwise select the next row and wrap when you get to the edges // of the selection. So you only move the lead indices around // amongst the already selected cells. // If the row lead index is at the end of the selection, wrap it around if (rowLead == rowModel.getMaxSelectionIndex()) { rowModel.addSelectionInterval(rowModel.getMinSelectionIndex(), rowModel.getMinSelectionIndex()); // And select the next column (from within the selection) if (colLead == colModel.getMaxSelectionIndex()) colModel.addSelectionInterval(colModel.getMinSelectionIndex(), colModel.getMinSelectionIndex()); else { int[] colsSelected = table.getSelectedColumns(); int colIndex = 0; while (colsSelected[colIndex] <= colLead) colIndex++; colModel.addSelectionInterval(colsSelected[colIndex], colsSelected[colIndex]); } } // If the row lead index isn't at the end, just advance it // and you don't have to update the column index else { int[] rowsSelected = table.getSelectedRows(); int rowIndex = 0; while (rowsSelected[rowIndex] <= rowLead) rowIndex++; rowModel.addSelectionInterval(rowsSelected[rowIndex], rowsSelected[rowIndex]); colModel.addSelectionInterval(colLead, colLead); } } else if (evt.getKeyCode() == KeyEvent.VK_ESCAPE) { // FIXME: implement "cancel" } else if ((evt.getKeyCode() == KeyEvent.VK_A || evt.getKeyCode() == KeyEvent.VK_SLASH) && evt.isControlDown()) { rowModel.setSelectionInterval(0, rowMax); colModel.setSelectionInterval(0, colMax); // the next two lines are to restore the lead selection indices to // their previous values, because select-all operations shouldn't // change them rowModel.addSelectionInterval(rowLead, rowLead); colModel.addSelectionInterval(colLead, colLead); } else if (evt.getKeyCode() == KeyEvent.VK_BACK_SLASH && evt.isControlDown()) { table.clearSelection(); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/9cc7b60db57475e9252947e71598fd6bdc44e23e/BasicTableUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTableUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
498,
24624,
12,
653,
1133,
6324,
13,
377,
288,
1377,
987,
6233,
1488,
1027,
1488,
273,
1014,
18,
588,
6233,
1488,
5621,
1377,
987,
6233,
1488,
645,
1488,
273,
1014,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
498,
24624,
12,
653,
1133,
6324,
13,
377,
288,
1377,
987,
6233,
1488,
1027,
1488,
273,
1014,
18,
588,
6233,
1488,
5621,
1377,
987,
6233,
1488,
645,
1488,
273,
1014,
18,
588,
... |
protected int[] parse(String str) throws SchemaDateTimeException{ | protected DateTimeData parse(String str) throws SchemaDateTimeException{ DateTimeData date = new DateTimeData(this); | protected int[] parse(String str) throws SchemaDateTimeException{ int len = str.length(); int[] date = new int[TOTAL_SIZE]; int[] timeZone = new int[2]; int end = getDate(str, 0, len, date); parseTimeZone (str, end, len, date, timeZone); //validate and normalize //REVISIT: do we need SchemaDateTimeException? validateDateTime(date, timeZone); if ( date[utc]!=0 && date[utc]!='Z' ) { normalize(date, timeZone); } return date; } | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/7569f1e56b929395f70c2717a33b9ea5e6583d7a/DateDV.java/clean/src/org/apache/xerces/impl/dv/xs/DateDV.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
3716,
751,
1109,
12,
780,
609,
13,
1216,
4611,
5096,
503,
95,
3716,
751,
1509,
273,
394,
3716,
751,
12,
2211,
1769,
3639,
509,
562,
273,
609,
18,
2469,
5621,
3639,
509,
8526,
1509... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3716,
751,
1109,
12,
780,
609,
13,
1216,
4611,
5096,
503,
95,
3716,
751,
1509,
273,
394,
3716,
751,
12,
2211,
1769,
3639,
509,
562,
273,
609,
18,
2469,
5621,
3639,
509,
8526,
1509... |
insideVersions = false; | public void endElement( String uri, String localName, String rawName ) throws SAXException { if ( insideVersioning ) { if ( "versioning".equals( rawName ) ) { insideVersioning = false; } else if ( insideSnapshot && "snapshot".equals( rawName ) ) { if ( "buildNumber".equals( rawName ) ) { try { metadata.setSnapshotBuildNumber( Integer.valueOf( getBodyText() ).intValue() ); } catch ( NumberFormatException e ) { // Ignore } } else if ( "timestamp".equals( rawName ) ) { metadata.setSnapshotTimestamp( getBodyText() ); } else if ( "localCopy".equals( rawName ) ) { metadata.setLocalCopy( Boolean.valueOf( getBodyText() ).booleanValue() ); } insideSnapshot = false; } else if ( insideVersions && "versions".equals( rawName ) ) { if ( "version".equals( rawName ) ) { metadata.addVersion( getBodyText() ); } insideVersions = false; } else if ( "latest".equals( rawName ) ) { metadata.setLatestVersion( getBodyText() ); } else if ( "release".equals( rawName ) ) { metadata.setReleaseVersion( getBodyText() ); } } else if ( "groupId".equals( rawName ) ) { metadata.setGroupId( getBodyText() ); } else if ( "artifactId".equals( rawName ) ) { metadata.setArtifactId( getBodyText() ); } else if ( "version".equals( rawName ) ) { metadata.setVersion( getBodyText() ); } bodyText = new StringBuffer(); } | 47050 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47050/db945f1dd05cfea1ead452eccde7f9cb65e6fce5/RepositoryMetadata.java/clean/maven-mboot2/src/main/java/download/RepositoryMetadata.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
14840,
12,
514,
2003,
16,
514,
11927,
16,
514,
1831,
461,
262,
5411,
1216,
14366,
3639,
288,
5411,
309,
261,
4832,
1444,
310,
262,
5411,
288,
7734,
309,
261,
315,
1589,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
14840,
12,
514,
2003,
16,
514,
11927,
16,
514,
1831,
461,
262,
5411,
1216,
14366,
3639,
288,
5411,
309,
261,
4832,
1444,
310,
262,
5411,
288,
7734,
309,
261,
315,
1589,
310,
... | |
IPluginModelBase bootModel = ( IPluginModelBase ) pluginMap .get( "org.eclipse.core.boot" ); | IPluginModelBase bootModel = (IPluginModelBase) pluginMap.get( "org.eclipse.core.boot" ); | private String[] getProgramArguments( ILaunchConfiguration configuration ) throws CoreException { ArrayList programArgs = new ArrayList( ); // If a product is specified, then add it to the program args if ( configuration.getAttribute( USE_PRODUCT, false ) ) { programArgs.add( "-product" ); //$NON-NLS-1$ programArgs.add( configuration.getAttribute( PRODUCT, "" ) ); //$NON-NLS-1$ } else { // specify the application to launch programArgs.add( "-application" ); //$NON-NLS-1$ programArgs.add( configuration.getAttribute( APPLICATION, LauncherUtils.getDefaultApplicationName( ) ) ); } // specify the workspace location for the runtime workbench String targetWorkspace = configuration .getAttribute( LOCATION + "0", LauncherUtils.getDefaultPath( ).append( WORKESPACENAME ).toOSString( ) ); //$NON-NLS-1$ //$NON-NLS-2$ programArgs.add( "-data" ); //$NON-NLS-1$ programArgs.add( targetWorkspace ); boolean isOSGI = PDECore.getDefault( ).getModelManager( ) .isOSGiRuntime( ); if ( configuration.getAttribute( USEFEATURES, false ) ) { validateFeatures( ); IPath installPath = PDEPlugin.getWorkspace( ).getRoot( ) .getLocation( ); programArgs.add( "-install" ); //$NON-NLS-1$ programArgs .add( "file:" + installPath.removeLastSegments( 1 ).addTrailingSeparator( ).toString( ) ); //$NON-NLS-1$ programArgs.add( "-update" ); //$NON-NLS-1$ } else { TreeMap pluginMap = LauncherUtils.getPluginsToRun( configuration ); if ( pluginMap == null ) return null; String primaryFeatureId = ReportLauncherUtils.getPrimaryFeatureId( ); DebugUtil.runCreatePlatformConfigurationArea( pluginMap, getConfigDir( configuration ), primaryFeatureId, ReportLauncherUtils.getAutoStartPlugins( configuration ) ); programArgs.add( "-configuration" ); //$NON-NLS-1$ if ( isOSGI ) programArgs .add( "file:" + new Path( getConfigDir( configuration ).getPath( ) ).addTrailingSeparator( ).toString( ) ); //$NON-NLS-1$ else programArgs .add( "file:" + new Path( getConfigDir( configuration ).getPath( ) ).append( "platform.cfg" ).toString( ) ); //$NON-NLS-1$ //$NON-NLS-2$ if ( !isOSGI ) { if ( primaryFeatureId != null ) { programArgs.add( "-feature" ); //$NON-NLS-1$ programArgs.add( primaryFeatureId ); } IPluginModelBase bootModel = ( IPluginModelBase ) pluginMap .get( "org.eclipse.core.boot" ); //$NON-NLS-1$ String bootPath = LauncherUtils.getBootPath( bootModel ); if ( bootPath != null && !bootPath.endsWith( ".jar" ) ) { //$NON-NLS-1$ programArgs.add( "-boot" ); //$NON-NLS-1$ programArgs.add( "file:" + bootPath ); //$NON-NLS-1$ } } } // add the output folder names programArgs.add( "-dev" ); //$NON-NLS-1$ if ( PDECore.getDefault( ).getModelManager( ).isOSGiRuntime( ) ) programArgs.add( DebugUtil.getDevEntriesProperties( getConfigDir( configuration ).toString( ) + "/dev.properties", true ) ); //$NON-NLS-1$ else programArgs.add( DebugUtil.getDevEntries( true ) ); // necessary for PDE to know how to load plugins when target platform = // host platform // see PluginPathFinder.getPluginPaths() programArgs.add( "-pdelaunch" ); //$NON-NLS-1$ // add tracing, if turned on if ( configuration.getAttribute( TRACING, false ) && !TRACING_NONE.equals( configuration.getAttribute( TRACING_CHECKED, ( String ) null ) ) ) { programArgs.add( "-debug" ); //$NON-NLS-1$ programArgs.add( LauncherUtils.getTracingFileArgument( configuration, getConfigDir( configuration ).toString( ) + Path.SEPARATOR + ".options" ) ); //$NON-NLS-1$ } // add the program args specified by the user StringTokenizer tokenizer = new StringTokenizer( configuration .getAttribute( PROGARGS, "" ) ); //$NON-NLS-1$ while ( tokenizer.hasMoreTokens( ) ) { programArgs.add( tokenizer.nextToken( ) ); } // show splash only if we are launching the default application boolean showSplash = true; int index = programArgs.indexOf( "-application" ); //$NON-NLS-1$ if ( index != -1 && index <= programArgs.size( ) - 2 ) { if ( !programArgs.get( index + 1 ).equals( LauncherUtils.getDefaultApplicationName( ) ) ) { showSplash = false; } } if ( showSplash && !programArgs.contains( "-nosplash" ) ) { //$NON-NLS-1$ programArgs.add( 0, "-showsplash" ); //$NON-NLS-1$ programArgs.add( 1, computeShowsplashArgument( ) ); } return ( String[] ) programArgs .toArray( new String[programArgs.size( )] ); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/93f83d28c012c9318e61bf947b01279cec0512a3/ReportLaunchConfigurationDelegate.java/buggy/UI/org.eclipse.birt.report.debug.ui/src/org/eclipse/birt/report/debug/ui/launcher/ReportLaunchConfigurationDelegate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
8526,
3570,
3295,
4628,
12,
467,
9569,
1750,
1664,
262,
1082,
202,
15069,
30015,
202,
95,
202,
202,
19558,
5402,
2615,
273,
394,
2407,
12,
11272,
202,
202,
759,
971,
279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
8526,
3570,
3295,
4628,
12,
467,
9569,
1750,
1664,
262,
1082,
202,
15069,
30015,
202,
95,
202,
202,
19558,
5402,
2615,
273,
394,
2407,
12,
11272,
202,
202,
759,
971,
279,
... |
data.add(new Fixture("thinkParity - Local Model", "1.0.0-RC5")); | data.add(new Fixture("thinkParity - Local Model", "1.0.0-RC6")); | protected void setUp() throws Exception { super.setUp(); data = new LinkedList<Fixture>(); data.add(new Fixture("thinkParity - Local Model", "1.0.0-RC5")); } | 53635 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53635/f83da50d78da8dd72194ff92a71ae02a09967482/VersionTest.java/clean/local/model/src/test/java/com/thinkparity/model/VersionTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
24292,
1435,
1216,
1185,
288,
202,
202,
9565,
18,
542,
1211,
5621,
202,
202,
892,
273,
394,
10688,
32,
26392,
34,
5621,
202,
202,
892,
18,
1289,
12,
2704,
12139,
10970,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
24292,
1435,
1216,
1185,
288,
202,
202,
9565,
18,
542,
1211,
5621,
202,
202,
892,
273,
394,
10688,
32,
26392,
34,
5621,
202,
202,
892,
18,
1289,
12,
2704,
12139,
10970,
... |
QueryPart parent = (QueryPart) walker.getParent(); int iOrdinal = walker.getOrdinal(); parent.replaceChild(iOrdinal, funToggle); } | QueryPart parent = (QueryPart) walker.getParent(); int iOrdinal = walker.getOrdinal(); parent.replaceChild(iOrdinal, funToggle); } | public void toggleDrillState(Member member) { Walker walker = findHierarchy(member.getHierarchy()); if (walker == null) throw Util.getRes().newInternal( "member's dimension is not used: " + member.toString()); // If 'e' is our expression, then // f(..., e, ...) // becomes // f(..., ToggleDrillState(e, {member}), ...) Exp e = (Exp) walker.currentElement(); FunCall funToggle = new FunCall( "ToggleDrillState", Syntax.Function, new Exp[] { e, new FunCall("{}", Syntax.Braces, new Exp[] {member}) }); QueryPart parent = (QueryPart) walker.getParent(); int iOrdinal = walker.getOrdinal(); parent.replaceChild(iOrdinal, funToggle); } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/b5b5168edc3af09cb74945a80b0c36e6630ed502/Query.java/buggy/src/main/mondrian/olap/Query.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
10486,
8956,
737,
1119,
12,
4419,
3140,
13,
202,
95,
202,
202,
16246,
14810,
273,
1104,
12074,
12,
5990,
18,
588,
12074,
10663,
202,
202,
430,
261,
11348,
264,
422,
446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
10486,
8956,
737,
1119,
12,
4419,
3140,
13,
202,
95,
202,
202,
16246,
14810,
273,
1104,
12074,
12,
5990,
18,
588,
12074,
10663,
202,
202,
430,
261,
11348,
264,
422,
446,
... |
if ( sd!= null && sd.getGrouping( ).isEnabled( ) | if ( sd != null && sd.getGrouping( ).isEnabled( ) | private void checkDataType( Query query, Series series ) { String expression = query.getDefinition( ); Axis axis = null; for ( EObject o = query; o != null; ) { o = o.eContainer( ); if ( o instanceof Axis ) { axis = (Axis) o; break; } } Collection cRegisteredEntries = ChartUIExtensionsImpl.instance( ) .getSeriesUIComponents( ); Iterator iterEntries = cRegisteredEntries.iterator( ); String sSeries = null; while ( iterEntries.hasNext( ) ) { ISeriesUIProvider provider = (ISeriesUIProvider) iterEntries.next( ); sSeries = provider.getSeriesClass( ); if ( sSeries.equals( series.getClass( ).getName( ) ) ) { try { provider.validateSeriesBindingType( series, getDataServiceProvider( ) ); } catch ( ChartException ce ) { if ( expression != null && expression.trim( ).length( ) > 0 ) { Text text = DataDefinitionTextManager.getInstance( ) .findText( query ); if ( text != null ) { // Display the text even if it's useless and will be // changed text.setText( query.getDefinition( ) ); } WizardBase.displayException( new RuntimeException( Messages.getFormattedString( "TaskSelectData.Warning.TypeCheck",//$NON-NLS-1$ new String[]{ expression, sSeries } ) ) ); } query.setDefinition( "" ); //$NON-NLS-1$ DataDefinitionTextManager.getInstance( ).updateText( query ); } if ( getChartModel( ) instanceof ChartWithAxes ) { DataType dataType = getDataServiceProvider( ).getDataType( expression ); SeriesDefinition sd = (SeriesDefinition) ( ChartUIUtil.getBaseSeriesDefinitions( getChartModel( ) ).get( 0 ) ); if ( sd!= null && sd.getGrouping( ).isEnabled( ) && ( sd.getGrouping( ) .getAggregateExpression( ) .equals( "Count" )//$NON-NLS-1$ || sd.getGrouping( ) .getAggregateExpression( ) .equals( "DistinctCount" ) ) ) //$NON-NLS-1$ { dataType = DataType.NUMERIC_LITERAL; } if ( isValidatedAxis( dataType, axis.getType( ) ) ) { break; } AxisType[] axisTypes = provider.getCompatibleAxisType( series ); for ( int i = 0; i < axisTypes.length; i++ ) { if ( isValidatedAxis( dataType, axisTypes[i] ) ) { axisNotification( axis, axisTypes[i] ); axis.setType( axisTypes[i] ); break; } } } break; } } } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/e9dc6b992e105c203abf58a5973567f6a2585487/TaskSelectData.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/TaskSelectData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
866,
6273,
12,
2770,
843,
16,
9225,
4166,
262,
202,
95,
202,
202,
780,
2652,
273,
843,
18,
588,
1852,
12,
11272,
202,
202,
6558,
2654,
273,
446,
31,
202,
202,
1884,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
866,
6273,
12,
2770,
843,
16,
9225,
4166,
262,
202,
95,
202,
202,
780,
2652,
273,
843,
18,
588,
1852,
12,
11272,
202,
202,
6558,
2654,
273,
446,
31,
202,
202,
1884,
26... |
StringBuffer sb = new StringBuffer( "0x" ); sb.append( ( isUnsigned() ) ? bigValue.toString( 16 ) : Long.toHexString( longValue ) ); | StringBuffer sb = new StringBuffer( "0x" ); if ( isUnsigned() ) { BigInteger bigValue = new BigInteger( value.getValueString() ); sb.append( bigValue.toString( 16 ) ); } else sb.append( Long.toHexString( value.longValue() ) ); | private String getLongLongValueString( ICDILongLongValue value ) throws CDIException { BigInteger bigValue = new BigInteger( value.getValueString() ); long longValue = value.longValue(); switch( getParentVariable().getFormat() ) { case ICDIFormat.NATURAL: case ICDIFormat.DECIMAL: return ( isUnsigned() ) ? bigValue.toString() : Long.toString( longValue ); case ICDIFormat.HEXADECIMAL: { StringBuffer sb = new StringBuffer( "0x" ); sb.append( ( isUnsigned() ) ? bigValue.toString( 16 ) : Long.toHexString( longValue ) ); return sb.toString(); } } return null; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/0375bb50a144391b0fc6eb9c6290d1db5b3109be/CValue.java/buggy/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
11105,
3708,
620,
780,
12,
26899,
2565,
3708,
3708,
620,
460,
262,
1216,
385,
2565,
503,
202,
95,
202,
202,
24198,
5446,
620,
273,
394,
10246,
12,
460,
18,
24805,
780,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
11105,
3708,
620,
780,
12,
26899,
2565,
3708,
3708,
620,
460,
262,
1216,
385,
2565,
503,
202,
95,
202,
202,
24198,
5446,
620,
273,
394,
10246,
12,
460,
18,
24805,
780,
1... |
catch (ReflectException r) { } | catch (ReflectException e) { } | public void initMetadata(String id) throws FormatException, IOException { String directory = (String) pixels.get(new Integer(0)); String name = (String) names.get(new Integer(0)); try { r.setVar("dirName", directory); r.exec("root = fs.getRoot()"); if (!directory.equals("Root Entry")) { r.exec("dir = root.getEntry(dirName)"); r.setVar("entryName", name); r.exec("document = dir.getEntry(entryName)"); } else { r.setVar("entryName", name); r.exec("document = root.getEntry(entryName)"); } r.exec("dis = new DocumentInputStream(document)"); r.exec("numBytes = dis.available()"); int numBytes = ((Integer) r.getVar("numBytes")).intValue(); byte[] b = new byte[numBytes + 4]; // append 0 for final offset r.setVar("data", b); r.exec("dis.read(data)"); RandomAccessStream stream = new RandomAccessStream(b); ifds = TiffTools.getIFDs(stream); } catch (ReflectException r) { } rgb = (TiffTools.getIFDIntValue(ifds[0], TiffTools.SAMPLES_PER_PIXEL, false, 1) > 1); little = TiffTools.isLittleEndian(ifds[0]); // parse the image description String description = new String(tags, 22, tags.length-22); metadata.put("Image Description", description); // default values metadata.put("slices", "1"); metadata.put("channels", "1"); metadata.put("frames", new Integer(getImageCount(id))); // parse the description to get channels/slices/times where applicable // basically the same as in ImageProSeqForm if (description != null) { StringTokenizer tokenizer = new StringTokenizer(description, "\n"); while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); String label = "Timestamp"; String data; if (token.indexOf("=") != -1) { label = token.substring(0, token.indexOf("=")); data = token.substring(token.indexOf("=")+1); } else { data = token.trim(); } metadata.put(label, data); } } metadata.put("Version", new String(header).trim()); Integer tSize = Integer.valueOf((String) metadata.get("slices")); Integer cSize = Integer.valueOf((String) metadata.get("channels")); Integer zSize = Integer.valueOf(metadata.get("frames").toString()); sizeX = new int[1]; sizeY = new int[1]; sizeZ = new int[1]; sizeC = new int[1]; sizeT = new int[1]; pixelType = new int[1]; currentOrder = new String[1]; Hashtable h = ifds[0]; sizeX[0] = TiffTools.getIFDIntValue(h, TiffTools.IMAGE_WIDTH); sizeY[0] = TiffTools.getIFDIntValue(h, TiffTools.IMAGE_LENGTH); sizeZ[0] = Integer.valueOf(metadata.get("frames").toString()).intValue(); sizeC[0] = Integer.parseInt((String) metadata.get("channels")); sizeT[0] = Integer.parseInt((String) metadata.get("slices")); currentOrder[0] = "XYCTZ"; int bitsPerSample = TiffTools.getIFDIntValue(ifds[0], TiffTools.BITS_PER_SAMPLE); int bitFormat = TiffTools.getIFDIntValue(ifds[0], TiffTools.SAMPLE_FORMAT); while (bitsPerSample % 8 != 0) bitsPerSample++; if (bitsPerSample == 24 || bitsPerSample == 48) bitsPerSample /= 3; if (bitFormat == 3) pixelType[0] = FormatReader.FLOAT; else if (bitFormat == 2) { switch (bitsPerSample) { case 8: pixelType[0] = FormatReader.INT8; break; case 16: pixelType[0] = FormatReader.INT16; break; case 32: pixelType[0] = FormatReader.INT32; break; } } else { switch (bitsPerSample) { case 8: pixelType[0] = FormatReader.UINT8; break; case 16: pixelType[0] = FormatReader.UINT16; break; case 32: pixelType[0] = FormatReader.UINT32; break; } } // The metadata store we're working with. MetadataStore store = getMetadataStore(id); store.setPixels(null, null, zSize, cSize, tSize, new Integer(pixelType[0]), new Boolean(!isLittleEndian(id)), getDimensionOrder(id), null); store.setImage(null, null, (String) metadata.get("Version"), null); } | 46826 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46826/eeb7d180f005e6ae2fd86935cddb27bf8758f621/IPWReader.java/clean/loci/formats/in/IPWReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1208,
2277,
12,
780,
612,
13,
565,
1216,
4077,
503,
16,
1860,
225,
288,
565,
514,
1867,
273,
261,
780,
13,
8948,
18,
588,
12,
2704,
2144,
12,
20,
10019,
565,
514,
508,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1208,
2277,
12,
780,
612,
13,
565,
1216,
4077,
503,
16,
1860,
225,
288,
565,
514,
1867,
273,
261,
780,
13,
8948,
18,
588,
12,
2704,
2144,
12,
20,
10019,
565,
514,
508,
273,... |
if (name!=null && name.equals("DO_NOT_DELETE_THIS_SHEET")){ schemaUrl = (String)attr_map.get(OdsReader.SCHEMA_ATTR_NAME); } else{ | if (!Utils.isNullStr(schema_url) && !Utils.isNullStr(name)){ | private void convertMetaFile() throws Exception{ String schemaUrl = null; FileOutputStream os = null; FileInputStream in = null; StringBuffer tableSchemaUrls = new StringBuffer(); try{ IXmlCtx ctx=new XmlContext(); ctx.checkFromFile(strContentFile); IXQuery xQuery=ctx.getQueryManager(); List elements = xQuery.getElements("table:table"); for (int i = 0; i < elements.size(); i++) { HashMap attr_map = (HashMap) elements.get(i); if (attr_map.containsKey(OdsReader.SCHEMA_ATTR_NAME)){ String schema_url = (String)attr_map.get(OdsReader.SCHEMA_ATTR_NAME); if (attr_map.containsKey("table:name")){ String name = (String)attr_map.get("table:name"); if (name!=null && name.equals("DO_NOT_DELETE_THIS_SHEET")){ schemaUrl = (String)attr_map.get(OdsReader.SCHEMA_ATTR_NAME); } else{ tableSchemaUrls.append(OdsReader.TABLE_NAME); tableSchemaUrls.append(name); tableSchemaUrls.append(";"); tableSchemaUrls.append(OdsReader.TABLE_SCHEMA_URL); tableSchemaUrls.append(schema_url); tableSchemaUrls.append(";"); } } } } if (schemaUrl!=null){ os = new FileOutputStream(strWorkingFolder + File.separator + META_FILE_NAME); in = new FileInputStream(strMetaFile); HashMap parameters = new HashMap(); parameters.put(OdsReader.SCHEMA_ATTR_NAME, schemaUrl); parameters.put(OdsReader.TBL_SCHEMAS_ATTR_NAME, tableSchemaUrls.toString()); XSLTransformer transform = new XSLTransformer(); transform.transform(strMetaXslFile, new InputSource(in), os, parameters); } } catch (Exception ex) { System.out.println("Error converting meta.xml"); throw ex; //_logger.error("Error reading conversions.xml file ", ex); } finally{ if (os!=null){ try { os.close(); } catch (IOException ioe) {} } if (in!=null){ try { in.close(); } catch (IOException ioe) {} } } } | 6392 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6392/81370233d607b0fa9a0a3899c518cf664dccd34e/OpenDocument.java/clean/src/eionet/gdem/conversion/odf/OpenDocument.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1765,
2781,
812,
1435,
1216,
1185,
95,
202,
202,
780,
1963,
1489,
273,
446,
31,
202,
202,
812,
4632,
1140,
273,
446,
31,
202,
202,
812,
4348,
316,
273,
446,
31,
202,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1765,
2781,
812,
1435,
1216,
1185,
95,
202,
202,
780,
1963,
1489,
273,
446,
31,
202,
202,
812,
4632,
1140,
273,
446,
31,
202,
202,
812,
4348,
316,
273,
446,
31,
202,
2... |
int functionSourceOffset = decompiler.startFunction(name, functionIndex); | int functionSourceOffset = decompiler.startFunction(functionIndex); | private Object function(TokenStream ts, int functionType) throws IOException, ParserException { int baseLineno = ts.getLineno(); // line number where source starts String name; Object memberExprNode = null; if (ts.matchToken(Token.NAME)) { name = ts.getString(); if (!ts.matchToken(Token.LP)) { if (allowMemberExprAsFunctionName) { // Extension to ECMA: if 'function <name>' does not follow // by '(', assume <name> starts memberExpr decompiler.addName(name); Object memberExprHead = nf.createName(name); name = ""; memberExprNode = memberExprTail(ts, false, memberExprHead); } mustMatchToken(ts, Token.LP, "msg.no.paren.parms"); } } else if (ts.matchToken(Token.LP)) { // Anonymous function name = ""; } else { name = ""; if (allowMemberExprAsFunctionName) { // Note that memberExpr can not start with '(' like // in function (1+2).toString(), because 'function (' already // processed as anonymous function memberExprNode = memberExpr(ts, false); } mustMatchToken(ts, Token.LP, "msg.no.paren.parms"); } if (memberExprNode != null) { // transform 'function' <memberExpr> to <memberExpr> = function // even in the decompilated source decompiler.addOp(Token.ASSIGN, Token.NOP); } FunctionNode fnNode = nf.createFunction(name); int functionIndex = currentScriptOrFn.addFunction(fnNode); int functionSourceOffset = decompiler.startFunction(name, functionIndex); ScriptOrFnNode savedScriptOrFn = currentScriptOrFn; currentScriptOrFn = fnNode; Object body; String source; try { decompiler.addToken(Token.LP); if (!ts.matchToken(Token.RP)) { boolean first = true; do { if (!first) decompiler.addToken(Token.COMMA); first = false; mustMatchToken(ts, Token.NAME, "msg.no.parm"); String s = ts.getString(); if (fnNode.hasParamOrVar(s)) { Object[] msgArgs = { s }; ts.reportCurrentLineWarning("msg.dup.parms", msgArgs); } fnNode.addParam(s); decompiler.addName(s); } while (ts.matchToken(Token.COMMA)); mustMatchToken(ts, Token.RP, "msg.no.paren.after.parms"); } decompiler.addToken(Token.RP); mustMatchToken(ts, Token.LC, "msg.no.brace.body"); decompiler.addEOL(Token.LC); body = parseFunctionBody(ts); mustMatchToken(ts, Token.RC, "msg.no.brace.after.body"); decompiler.addToken(Token.RC); // skip the last EOL so nested functions work... // name might be null; } finally { source = decompiler.stopFunction(functionSourceOffset); currentScriptOrFn = savedScriptOrFn; } Object pn; if (memberExprNode == null) { pn = nf.initFunction(fnNode, functionIndex, body, ts.getSourceName(), baseLineno, ts.getLineno(), source, functionType); if (functionType == FunctionNode.FUNCTION_EXPRESSION_STATEMENT) { // The following can be removed but then code generators should // be modified not to push on the stack function expression // statements pn = nf.createExprStatementNoReturn(pn, baseLineno); } // Add EOL but only if function is not part of expression, in which // case it gets SEMI + EOL from Statement. if (functionType != FunctionNode.FUNCTION_EXPRESSION) { decompiler.addToken(Token.EOL); checkWellTerminatedFunction(ts); } } else { pn = nf.initFunction(fnNode, functionIndex, body, ts.getSourceName(), baseLineno, ts.getLineno(), source, FunctionNode.FUNCTION_EXPRESSION); pn = nf.createBinary(Token.ASSIGN, Token.NOP, memberExprNode, pn); if (functionType != FunctionNode.FUNCTION_EXPRESSION) { pn = nf.createExprStatement(pn, baseLineno); // Add ';' to make 'function x.f(){}' and 'x.f = function(){}' // to print the same strings when decompiling decompiler.addEOL(Token.SEMI); checkWellTerminatedFunction(ts); } } return pn; } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/666483b96d42790e5a2f946a7e7ced4a018638b3/Parser.java/clean/js/rhino/src/org/mozilla/javascript/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
445,
12,
1345,
1228,
3742,
16,
509,
445,
559,
13,
3639,
1216,
1860,
16,
27990,
565,
288,
3639,
509,
1026,
48,
267,
5764,
273,
3742,
18,
588,
48,
267,
5764,
5621,
225,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
445,
12,
1345,
1228,
3742,
16,
509,
445,
559,
13,
3639,
1216,
1860,
16,
27990,
565,
288,
3639,
509,
1026,
48,
267,
5764,
273,
3742,
18,
588,
48,
267,
5764,
5621,
225,
368,
... |
while (node != null && !(node instanceof IPluginExtension)) | while (node != null && !(node instanceof IPluginExtension) && !(node instanceof IPluginExtensionPoint)) | public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) { if (region == null || canShowMultipleHyperlinks) return null; IDocumentRange element = fSourcePage.getRangeElement(region.getOffset()); if (element == null) return null; if (!(element instanceof IDocumentAttribute)) return null; // only highlight if we are hovering inside of the attribute value IDocumentAttribute attr = (IDocumentAttribute)element; if (attr.getValueOffset() > region.getOffset() || attr.getValueOffset() + attr.getValueLength() - 1 < region.getOffset()) return null; // consult schema to make sure attribute is of kind IMetaAttribute.JAVA IDocumentNode node = attr.getEnclosingElement(); while (node != null && !(node instanceof IPluginExtension)) node = node.getParentNode(); if (node == null || !((IPluginExtension)node).getModel().isEditable()) return null; ISchema schema = PDECore.getDefault().getSchemaRegistry().getSchema(((IPluginExtension)node).getPoint()); if (schema == null) return null; ISchemaElement sElement = schema.findElement(attr.getEnclosingElement().getXMLTagName()); if (sElement == null) return null; ISchemaAttribute sAttr = sElement.getAttribute(attr.getAttributeName()); if (sAttr == null) return null; if (((IPluginAttribute)attr).getValue().length() == 0) return null; if (sAttr.getKind() == IMetaAttribute.JAVA) { return new IHyperlink[] { new JavaHyperlink( new Region(attr.getValueOffset(), attr.getValueLength()), ((IPluginExtension)node).getModel().getUnderlyingResource(), ((IPluginAttribute)attr).getValue())}; } else if (sAttr.getKind() == IMetaAttribute.RESOURCE) { // TODO select OR open resource in package explorer } return null; } | 14404 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14404/aa447f24f01069089c4fa162806e6911726b73da/ManifestHyperlinkDetector.java/clean/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ManifestHyperlinkDetector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
15996,
1232,
8526,
5966,
15996,
7135,
12,
1285,
408,
18415,
977,
18415,
16,
467,
5165,
3020,
16,
1250,
848,
5706,
8438,
15996,
7135,
13,
288,
202,
202,
430,
261,
6858,
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,
467,
15996,
1232,
8526,
5966,
15996,
7135,
12,
1285,
408,
18415,
977,
18415,
16,
467,
5165,
3020,
16,
1250,
848,
5706,
8438,
15996,
7135,
13,
288,
202,
202,
430,
261,
6858,
422,... |
int rc = stmt.executeUpdate(); | int rc; try { rc = stmt.executeUpdate(); } catch (SQLException e) { log.warn("ifServices DB insert got exception; will retry after " + "deletion of any existing records for this ifService " + "that are marked for deletion. " + "Exception: " + e.getMessage(), e); /* * Maybe there's already an entry for this (service, node, ipaddr) * in the table, but it's marked for deletion. Delete it and try * the insertion again. */ c.rollback(); String delCmd = "DELETE FROM ifServices WHERE status = 'D' " + "AND nodeid = ? AND ipAddr = ? AND serviceID = ?"; PreparedStatement delStmt = c.prepareStatement(delCmd); delStmt.setInt(1, m_nodeId); delStmt.setString(2, m_ipAddr.getHostAddress()); delStmt.setInt(3, m_serviceId); rc = delStmt.executeUpdate(); delStmt.close(); rc = stmt.executeUpdate(); } | private void insert(Connection c) throws SQLException { if (m_fromDb) throw new IllegalStateException("The record already exists in the database"); Category log = ThreadCategory.getInstance(getClass()); // first extract the next node identifier // StringBuffer names = new StringBuffer("INSERT INTO ifServices (nodeID,ipAddr,serviceID"); StringBuffer values = new StringBuffer("?,?,?"); if ((m_changed & CHANGED_IFINDEX) == CHANGED_IFINDEX) { values.append(",?"); names.append(",ifIndex"); } if ((m_changed & CHANGED_STATUS) == CHANGED_STATUS) { values.append(",?"); names.append(",status"); } if ((m_changed & CHANGED_LASTGOOD) == CHANGED_LASTGOOD) { values.append(",?"); names.append(",lastGood"); } if ((m_changed & CHANGED_LASTFAIL) == CHANGED_LASTFAIL) { values.append(",?"); names.append(",lastFail"); } if ((m_changed & CHANGED_SOURCE) == CHANGED_SOURCE) { values.append(",?"); names.append(",source"); } if ((m_changed & CHANGED_NOTIFY) == CHANGED_NOTIFY) { values.append(",?"); names.append(",notify"); } if ((m_changed & CHANGED_QUALIFIER) == CHANGED_QUALIFIER) { values.append(",?"); names.append(",qualifier"); } names.append(") VALUES (").append(values).append(')'); if (log.isDebugEnabled()) log.debug("DbIfServiceEntry.insert: SQL insert statment = " + names.toString()); // create the Prepared statment and then // start setting the result values // PreparedStatement stmt = c.prepareStatement(names.toString()); names = null; int ndx = 1; stmt.setInt(ndx++, m_nodeId); stmt.setString(ndx++, m_ipAddr.getHostAddress()); stmt.setInt(ndx++, m_serviceId); if ((m_changed & CHANGED_IFINDEX) == CHANGED_IFINDEX) stmt.setInt(ndx++, m_ifIndex); if ((m_changed & CHANGED_STATUS) == CHANGED_STATUS) stmt.setString(ndx++, new String(new char[] { m_status })); if ((m_changed & CHANGED_LASTGOOD) == CHANGED_LASTGOOD) { stmt.setTimestamp(ndx++, m_lastGood); } if ((m_changed & CHANGED_LASTFAIL) == CHANGED_LASTFAIL) { stmt.setTimestamp(ndx++, m_lastFail); } if ((m_changed & CHANGED_SOURCE) == CHANGED_SOURCE) stmt.setString(ndx++, new String(new char[] { m_source })); if ((m_changed & CHANGED_NOTIFY) == CHANGED_NOTIFY) stmt.setString(ndx++, new String(new char[] { m_notify })); if ((m_changed & CHANGED_QUALIFIER) == CHANGED_QUALIFIER) stmt.setString(ndx++, m_qualifier); // Run the insert // int rc = stmt.executeUpdate(); log.debug("insert(): SQL update result = " + rc); stmt.close(); // clear the mask and mark as backed // by the database // m_fromDb = true; m_changed = 0; } | 48885 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48885/3e0b6a20d1b2919e6647b3434be5e25c77cbadda/DbIfServiceEntry.java/buggy/opennms-services/src/main/java/org/opennms/netmgt/capsd/DbIfServiceEntry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2243,
12,
1952,
276,
13,
1216,
6483,
288,
3639,
309,
261,
81,
67,
2080,
4331,
13,
5411,
604,
394,
5477,
2932,
1986,
1409,
1818,
1704,
316,
326,
2063,
8863,
3639,
9856,
613,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2243,
12,
1952,
276,
13,
1216,
6483,
288,
3639,
309,
261,
81,
67,
2080,
4331,
13,
5411,
604,
394,
5477,
2932,
1986,
1409,
1818,
1704,
316,
326,
2063,
8863,
3639,
9856,
613,
2... |
if (ChainBuilderAgent.DEBUG) { | if (ChainBuilderAgent.DEBUG_TIMING) { | public void contentComplete() { if (dataManager.getChains() != null || dataManager.getModules() != null) { long guiStart =System.currentTimeMillis(); buildGUI((ModulesData) modLoader.getContents()); if (ChainBuilderAgent.DEBUG) { long guiTime =System.currentTimeMillis()-guiStart; System.err.println("time spent on module palette .."+guiTime); } uiManager.contentComplete(); topWindowManager.continueHandleDisplay(); if (ChainBuilderAgent.DEBUG) { totalTime = System.currentTimeMillis()-start; System.err.println("time for chainbuilder start..."+totalTime); } dataState = LOADED; } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ModulePaletteWindow.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/ui/ModulePaletteWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
913,
6322,
1435,
288,
202,
202,
430,
261,
892,
1318,
18,
588,
15945,
1435,
480,
446,
747,
501,
1318,
18,
588,
7782,
1435,
480,
446,
13,
288,
1082,
202,
5748,
13238,
1685,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
913,
6322,
1435,
288,
202,
202,
430,
261,
892,
1318,
18,
588,
15945,
1435,
480,
446,
747,
501,
1318,
18,
588,
7782,
1435,
480,
446,
13,
288,
1082,
202,
5748,
13238,
1685,... |
for (int i = 0; i < methods.length; i++) { final PsiMethod testMethod = methods[i]; | for(final PsiMethod testMethod : methods){ | public void visitMethod(PsiMethod method) { final PsiClass aClass = method.getContainingClass(); if (aClass == null) { return; } final String methName = method.getName(); final PsiParameterList parameterList = method.getParameterList(); if (parameterList == null) { return; } final PsiParameter[] parameters = parameterList.getParameters(); if (parameters == null) { return; } final int numParameters = parameters.length; PsiClass ancestorClass = aClass.getSuperClass(); final Set visitedClasses = new HashSet(); while (ancestorClass != null) { if (!visitedClasses.add(ancestorClass)) { return; } final PsiMethod[] methods = ancestorClass.findMethodsByName(methName, false); if (methods != null) { for (int i = 0; i < methods.length; i++) { final PsiMethod testMethod = methods[i]; final PsiParameterList testParametersList = testMethod.getParameterList(); if (testParametersList == null) { continue; } final int numTestParameters = testParametersList.getParameters().length; if (numParameters != numTestParameters) { continue; } if (testMethod.hasModifierProperty(PsiModifier.STATIC) && !testMethod.hasModifierProperty(PsiModifier.PRIVATE)) { registerMethodError(method); return; } } } ancestorClass = ancestorClass.getSuperClass(); } } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/2d46d291193579a7564649b4881c7ea8e02eda5b/MethodOverridesStaticMethodInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/visibility/MethodOverridesStaticMethodInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
25138,
12,
52,
7722,
1305,
707,
13,
288,
5411,
727,
453,
7722,
797,
20148,
273,
707,
18,
588,
24344,
797,
5621,
5411,
309,
261,
69,
797,
422,
446,
13,
288,
7734,
327,
31,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
25138,
12,
52,
7722,
1305,
707,
13,
288,
5411,
727,
453,
7722,
797,
20148,
273,
707,
18,
588,
24344,
797,
5621,
5411,
309,
261,
69,
797,
422,
446,
13,
288,
7734,
327,
31,
5... |
public void testCreateSucessWithNoRoles() throws Exception { addActionAndMethod(Methods.create.toString()); addRequestParameter("firstName", "Jim"); addRequestParameter("lastName", "khan"); addRequestParameter("gender", "1"); addRequestParameter("level", "1"); addRequestParameter("title", "1"); addRequestParameter("emailId", "1@1.com"); addRequestParameter("dob", "20/03/76"); addRequestParameter("loginName", "tarzen"); addRequestParameter("preferredLocale","189"); addRequestParameter("userPassword", "XXXXXXXX"); addRequestParameter("passwordRepeat", "XXXXXXXX"); actionPerform(); verifyNoActionErrors(); verifyNoActionMessages(); verifyForward(ActionForwards.create_success.toString()); assertNotNull(request.getAttribute("globalPersonnelNum")); assertNotNull(request.getAttribute("displayName")); PersonnelBO personnelBO = new PersonnelPersistence().getPersonnelByGlobalPersonnelNum((String)request.getAttribute("globalPersonnelNum")); assertNotNull(personnelBO); //assert few values assertEquals("Jim",personnelBO.getPersonnelDetails().getName().getFirstName()); assertEquals("khan",personnelBO.getPersonnelDetails().getName().getLastName()); assertEquals(1,personnelBO.getPersonnelDetails().getGender().intValue()); TestObjectFactory.cleanUp(personnelBO); personnelBO=null; } | 45468 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45468/df38cb7b51629663f6dacb5391ab44de8ff5ac1d/TestPersonAction.java/buggy/mifos/test/org/mifos/application/personnel/struts/action/TestPersonAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1684,
17072,
614,
1190,
2279,
6898,
1435,
1216,
1185,
288,
202,
202,
1289,
1803,
1876,
1305,
12,
4712,
18,
2640,
18,
10492,
10663,
202,
202,
1289,
691,
1662,
2932,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1684,
17072,
614,
1190,
2279,
6898,
1435,
1216,
1185,
288,
202,
202,
1289,
1803,
1876,
1305,
12,
4712,
18,
2640,
18,
10492,
10663,
202,
202,
1289,
691,
1662,
2932,
36... | ||
return attackSource; | try { return attackSource.get(pos); } catch(IndexOutOfBoundsException e) { return null; } | public RPEntity getAttackSource() { return attackSource; } | 4438 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4438/32352214a251e730149977a3f9c81970c3a35b93/RPEntity.java/clean/src/games/stendhal/server/entity/RPEntity.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
534,
1423,
1628,
336,
3075,
484,
1830,
1435,
565,
288,
565,
775,
288,
327,
13843,
1830,
18,
588,
12,
917,
1769,
289,
1044,
12,
30548,
425,
13,
288,
327,
446,
31,
289,
565,
289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
534,
1423,
1628,
336,
3075,
484,
1830,
1435,
565,
288,
565,
775,
288,
327,
13843,
1830,
18,
588,
12,
917,
1769,
289,
1044,
12,
30548,
425,
13,
288,
327,
446,
31,
289,
565,
289,
... |
result.put("releaseResult", new Boolean(true)); | result.put("releaseResult", Boolean.TRUE); | public static Map giftCertificateRelease(DispatchContext dctx, Map context) { LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue) context.get("userLogin"); GenericValue paymentPref = (GenericValue) context.get("orderPaymentPreference"); String err = "Unable to expire financial account authorization for Gift Certificate: "; try { // expire the related financial authorization transaction GenericValue authTransaction = PaymentGatewayServices.getAuthTransaction(paymentPref); if (authTransaction == null) { return ServiceUtil.returnError(err + " Could not find authorization transaction."); } Map input = UtilMisc.toMap("userLogin", userLogin, "finAccountAuthId", authTransaction.get("referenceNum")); Map serviceResults = dispatcher.runSync("expireFinAccountAuth", input); Map result = ServiceUtil.returnSuccess(); result.put("releaseRefNum", authTransaction.getString("referenceNum")); result.put("releaseAmount", authTransaction.getDouble("amount")); result.put("releaseResult", new Boolean(true)); // if there's an error, don't release if (ServiceUtil.isError(serviceResults)) { return ServiceUtil.returnError(err + ServiceUtil.getErrorMessage(serviceResults)); } return result; } catch (GenericServiceException e) { Debug.logError(e, e.getMessage(), module); return ServiceUtil.returnError(err + e.getMessage()); } } | 55411 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55411/4adaa061c0ea82fe49397c1a7bdbe032dcf80d90/GiftCertificateServices.java/clean/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1635,
314,
2136,
4719,
7391,
12,
5325,
1042,
302,
5900,
16,
1635,
819,
13,
288,
3639,
3566,
6681,
7393,
273,
302,
5900,
18,
588,
6681,
5621,
3639,
7928,
620,
729,
5358,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1635,
314,
2136,
4719,
7391,
12,
5325,
1042,
302,
5900,
16,
1635,
819,
13,
288,
3639,
3566,
6681,
7393,
273,
302,
5900,
18,
588,
6681,
5621,
3639,
7928,
620,
729,
5358,
273,
... |
decompileResult = AsmUtils.getFullBytecode(stream, true, isASMifierMode()); } catch (IOException e1) { e1.printStackTrace(); throw new CoreException(new Status(IStatus.ERROR, "de.loskutov.bco", -1, "cannot get bytecode dump", null) ); | decompiledClass = DecompilerClassVisitor.getDecompiledClass( stream, null, null, true, isASMifierMode(), false, null); } catch (IOException e) { throw new CoreException(new Status( IStatus.ERROR, "de.loskutov.bco", -1, "cannot get bytecode dump", null)); | protected InputStream createStream() throws CoreException { InputStream stream = JdtUtils.createInputStream(element); if(stream == null){ throw new CoreException(new Status(IStatus.ERROR, "de.loskutov.bco", //$NON-NLS-1$ -1, "cannot get bytecode from class file", null) ); } DecompileResult decompileResult = null; try { decompileResult = AsmUtils.getFullBytecode(stream, true, isASMifierMode()); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); throw new CoreException(new Status(IStatus.ERROR, "de.loskutov.bco", //$NON-NLS-1$ -1, "cannot get bytecode dump", null) ); } String decompiledCode = decompileResult.getDecompiledCode(); decompiledCode = decompiledCode == null? "" : decompiledCode; //$NON-NLS-1$ StringBufferInputStream sbi = new StringBufferInputStream(decompiledCode); return sbi; } | 2697 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2697/fd19bc74dba4e4810f9cc170df9e970cc2d06b7b/TypedElement.java/clean/eclipse/plugin/src/de/loskutov/bco/compare/TypedElement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
5037,
752,
1228,
1435,
1216,
30015,
288,
3639,
5037,
1407,
273,
804,
7510,
1989,
18,
2640,
4348,
12,
2956,
1769,
540,
309,
12,
3256,
422,
446,
15329,
5411,
604,
394,
30015,
12,
2704... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
5037,
752,
1228,
1435,
1216,
30015,
288,
3639,
5037,
1407,
273,
804,
7510,
1989,
18,
2640,
4348,
12,
2956,
1769,
540,
309,
12,
3256,
422,
446,
15329,
5411,
604,
394,
30015,
12,
2704... |
case Event.TMP_VIEW: | case Event.TMP_VIEW: | public void up(Event evt) { Message msg; //System.out.println("UP: " + evt); Object temp_obj; // used for type checking before performing casts switch( evt.getType() ) { case Event.SET_LOCAL_ADDRESS: temp_obj = evt.getArg(); if ( temp_obj instanceof Address ) { local_addr = (Address) temp_obj; } else { log.error( "Error: Total.up() - could not cast local address to an Address object" ); } break; case Event.MSG: // get the message and the header for the TOTAL_OLD layer temp_obj = evt.getArg(); if ( temp_obj instanceof Message ) { msg = (Message) temp_obj; temp_obj = msg.removeHeader(getName()); if ( temp_obj instanceof TotalHeader ) { TotalHeader hdr = (TotalHeader) temp_obj; // switch on the "command" defined by the header switch( hdr.total_header_type ) { case TotalHeader.TOTAL_UNICAST: // don't process this message, just pass it up (TotalHeader header already removed) passUp(evt); return; case TotalHeader.TOTAL_BCAST: handleBCastMessage( msg, hdr.seq_id ); break; case TotalHeader.TOTAL_REQUEST: // if we are the sequencer, respond to this request if ( isSequencer() ) { handleRequestMessage( msg ); } break; case TotalHeader.TOTAL_NEW_VIEW: // store the sequence id that we should expect next next_seq_id = hdr.seq_id; // TODO: need to send some sort of ACK or something to the sequencer (maybe) break; case TotalHeader.TOTAL_CUM_SEQ_ACK: // if we are the sequencer, update state if ( isSequencer() ) { temp_obj = msg.getSrc(); if ( temp_obj instanceof Address ) { ack_history.setSeq( (Address) temp_obj, hdr.seq_id ); } else { log.error( "Error: TOTAL_OLD.Up() - could not cast source of message to an Address object (case TotalHeader.TOTAL_CUM_SEQ_ACK)" ); } } break; case TotalHeader.TOTAL_RESEND: // if we are the sequencer, respond to this request if ( isSequencer() ) { handleResendRequest( msg, hdr.seq_id ); } break; default: // unrecognized header type - discard message log.error( "Error: TOTAL_OLD.up() - unrecognized TotalHeader in message - " + hdr.toString() ); return; // don't let it call passUp() } // switch( hdr.total_header_type ) } else { log.error( "Error: TOTAL_OLD.up() - could not cast message header to TotalHeader (case Event.MSG)" ); } // if ( temp_obj instanceof TotalHeader ) } else { log.error( "Error: TOTAL_OLD.up() - could not cast argument of Event to a Message (case Event.MSG)" ); } // if ( temp_obj instanceof Address ) //System.out.println("The message is " + msg); return; // don't blindly pass up messages immediately (if at all) // begin mms21 /* case Event.BECOME_SERVER: System.out.println( "Become Server event passed up to TOTAL_OLD (debug - mms21)" ); break; */ case Event.TMP_VIEW: // TODO: this may be temporary case Event.VIEW_CHANGE: System.out.println( "View Change event passed up to TOTAL_OLD (debug - mms21)" ); View new_view = (View) evt.getArg(); members = new_view.getMembers(); { // print the members of this new view System.out.println( "New view members (printed in TOTAL_OLD):" ); int view_size = members.size(); for( int i=0; i<view_size; i++ ) { System.out.println( " " + members.elementAt(i).toString() ); } } // reset the state for total ordering for this new view reset(); // if we are the sequencer in this new view, send a new // TOTAL_NEW_VIEW message to the group if ( isSequencer() ) { // we are the sequencer in this new view log.error( "TOTAL_OLD.up() - I am the sequencer of this new view" ); // we need to keep track of acknowledgements messages ack_history = new MessageAcks( members ); // start assigning messages with this sequence id next_seq_id_to_assign = INIT_SEQ_ID; // send a message to the group with the initial sequence id to expect Message new_view_msg = new Message( null, local_addr, null ); new_view_msg.putHeader(getName(), new TotalHeader( TotalHeader.TOTAL_NEW_VIEW, next_seq_id_to_assign ) ); passDown( new Event( Event.MSG, new_view_msg ) ); } break; // end mms21 default: break; } // switch( evt.getType() ) passUp(evt); // Pass up to the layer above us } | 51463 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51463/5ad015d9a78e1da3350d9b398b46b2f5d4508564/TOTAL_OLD.java/clean/src/org/jgroups/protocols/TOTAL_OLD.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
731,
12,
1133,
6324,
13,
288,
3639,
2350,
1234,
31,
3639,
368,
3163,
18,
659,
18,
8222,
2932,
3079,
30,
315,
397,
6324,
1769,
202,
921,
1906,
67,
2603,
31,
225,
368,
1399,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
731,
12,
1133,
6324,
13,
288,
3639,
2350,
1234,
31,
3639,
368,
3163,
18,
659,
18,
8222,
2932,
3079,
30,
315,
397,
6324,
1769,
202,
921,
1906,
67,
2603,
31,
225,
368,
1399,
... |
iaXY[2 * i] = xpoints[i]; iaXY[2 * i + 1] = ypoints[i]; | Location lo = (Location) getPoints( ).get( i ); iaXY[2 * i] = (int) lo.getX( ); iaXY[2 * i + 1] = (int) lo.getY( ); | public final int[] getSwtPoints( ) { int[] iaXY = new int[8]; for ( int i = 0; i < 4; i++ ) { iaXY[2 * i] = xpoints[i]; iaXY[2 * i + 1] = ypoints[i]; } return iaXY; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/6618c22738cb830a4ebf9a96efc9f66a82fd43a3/RotatedRectangle.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/RotatedRectangle.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
509,
8526,
1322,
6046,
5636,
12,
262,
202,
95,
202,
202,
474,
8526,
20389,
8546,
273,
394,
509,
63,
28,
15533,
202,
202,
1884,
261,
509,
277,
273,
374,
31,
277,
411,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
509,
8526,
1322,
6046,
5636,
12,
262,
202,
95,
202,
202,
474,
8526,
20389,
8546,
273,
394,
509,
63,
28,
15533,
202,
202,
1884,
261,
509,
277,
273,
374,
31,
277,
411,
10... |
GeneralPath path = new GeneralPath(clipNode.getOutline()); | GeneralPath path = new GeneralPath(clipNode.getTransformedOutline()); | public ClipRable createClip(BridgeContext ctx, Element clipElement, Element clipedElement, GraphicsNode clipedNode) { String s; // 'transform' attribute AffineTransform Tx; s = clipElement.getAttributeNS(null, SVG_TRANSFORM_ATTRIBUTE); if (s.length() != 0) { Tx = SVGUtilities.convertTransform (clipElement, SVG_TRANSFORM_ATTRIBUTE, s); } else { Tx = new AffineTransform(); } // 'clipPathUnits' attribute - default is userSpaceOnUse short coordSystemType; s = clipElement.getAttributeNS(null, SVG_CLIP_PATH_UNITS_ATTRIBUTE); if (s.length() == 0) { coordSystemType = SVGUtilities.USER_SPACE_ON_USE; } else { coordSystemType = SVGUtilities.parseCoordinateSystem (clipElement, SVG_CLIP_PATH_UNITS_ATTRIBUTE, s); } // additional transform to move to objectBoundingBox coordinate system if (coordSystemType == SVGUtilities.OBJECT_BOUNDING_BOX) { Tx = SVGUtilities.toObjectBBox(Tx, clipedNode); } // Build the GVT tree that represents the clip path // // The silhouettes of the child elements are logically OR'd // together to create a single silhouette which is then used to // restrict the region onto which paint can be applied. // // The 'clipPath' element or any of its children can specify // property 'clip-path'. // Area clipPath = new Area(); GVTBuilder builder = ctx.getGVTBuilder(); boolean hasChildren = false; for(Node node = clipElement.getFirstChild(); node != null; node = node.getNextSibling()) { // check if the node is a valid Element if (node.getNodeType() != node.ELEMENT_NODE) { continue; } Element child = (Element)node; GraphicsNode clipNode = builder.build(ctx, child) ; // check if a GVT node has been created if (clipNode == null) { continue; } hasChildren = true; // compute the outline of the current clipPath's child int wr = CSSUtilities.convertClipRule(child); GeneralPath path = new GeneralPath(clipNode.getOutline()); path.setWindingRule(wr); Shape outline = Tx.createTransformedShape(path); // apply the 'clip-path' of the current clipPath's child ShapeNode outlineNode = new ShapeNode(); outlineNode.setShape(outline); ClipRable clip = CSSUtilities.convertClipPath(child, outlineNode, ctx); if (clip != null) { Area area = new Area(outline); area.subtract(new Area(clip.getClipPath())); outline = area; } clipPath.add(new Area(outline)); } if (!hasChildren) { return null; // empty clipPath } // construct the shape node that represents the clipPath ShapeNode clipPathNode = new ShapeNode(); clipPathNode.setShape(clipPath); // apply the 'clip-path' of the clipPath element (already in user space) ClipRable clipElementClipPath = CSSUtilities.convertClipPath(clipElement, clipPathNode, ctx); if (clipElementClipPath != null) { clipPath.subtract(new Area(clipElementClipPath.getClipPath())); } Filter filter = clipedNode.getFilter(); if (filter == null) { // Make the initial source as a RenderableImage filter = clipedNode.getGraphicsNodeRable(); } return new ClipRable8Bit(filter, clipPath); } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/8db9db84e0c39085c71d70cf44f5535767bd7730/SVGClipPathElementBridge.java/clean/sources/org/apache/batik/bridge/SVGClipPathElementBridge.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
385,
3169,
54,
429,
752,
15339,
12,
13691,
1042,
1103,
16,
27573,
3010,
6807,
1046,
16,
27573,
3010,
4942,
1845,
1046,
16,
27573,
16830,
907,
4942,
1845,
907,
13,
288,
3639,
514,
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,
385,
3169,
54,
429,
752,
15339,
12,
13691,
1042,
1103,
16,
27573,
3010,
6807,
1046,
16,
27573,
3010,
4942,
1845,
1046,
16,
27573,
16830,
907,
4942,
1845,
907,
13,
288,
3639,
514,
27... |
} else if(argv_[i].equals("-info")) { | } else if (argv_[i].equals("-info")) { | void parseArgv() { if(argv_.length==0) { exitUsage(false); } int i=0; while(i < argv_.length) { String s; if(argv_[i].equals("-verbose")) { verbose_ = true; } else if(argv_[i].equals("-info")) { detailedUsage_ = true; } else if(argv_[i].equals("-debug")) { debug_++; } else if((s = optionArg(argv_, i, "-input", false)) != null) { i++; inputGlobs_.add(s); } else if((s = optionArg(argv_, i, "-output", output_ != null)) != null) { i++; output_ = s; } else if((s = optionArg(argv_, i, "-mapper", mapCmd_ != null)) != null) { i++; mapCmd_ = s; } else if((s = optionArg(argv_, i, "-combiner", comCmd_ != null)) != null) { i++; comCmd_ = s; } else if((s = optionArg(argv_, i, "-reducer", redCmd_ != null)) != null) { i++; redCmd_ = s; } else if((s = optionArg(argv_, i, "-file", false)) != null) { i++; packageFiles_.add(s); } else if((s = optionArg(argv_, i, "-cluster", cluster_ != null)) != null) { i++; cluster_ = s; } else if((s = optionArg(argv_, i, "-config", false)) != null) { i++; configPath_.add(s); } else if((s = optionArg(argv_, i, "-dfs", false)) != null) { i++; userJobConfProps_.add("fs.default.name="+s); } else if((s = optionArg(argv_, i, "-jt", false)) != null) { i++; userJobConfProps_.add("mapred.job.tracker="+s); } else if((s = optionArg(argv_, i, "-jobconf", false)) != null) { i++; validateNameEqValue(s); userJobConfProps_.add(s); } else if((s = optionArg(argv_, i, "-cmdenv", false)) != null) { i++; validateNameEqValue(s); if(addTaskEnvironment_.length() > 0) { addTaskEnvironment_ += " "; } addTaskEnvironment_ += s; } else if((s = optionArg(argv_, i, "-inputreader", inReaderSpec_ != null)) != null) { i++; inReaderSpec_ = s; } else { System.err.println("Unexpected argument: " + argv_[i]); exitUsage(false); } i++; } if(detailedUsage_) { exitUsage(true); } } | 49935 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49935/e10b40e8014547113799b2653164e8c990d41209/StreamJob.java/clean/src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamJob.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
1109,
4117,
90,
1435,
225,
288,
565,
309,
12,
19485,
27799,
2469,
631,
20,
13,
288,
1377,
2427,
5357,
12,
5743,
1769,
565,
289,
565,
509,
277,
33,
20,
31,
565,
1323,
12,
77,
411,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
1109,
4117,
90,
1435,
225,
288,
565,
309,
12,
19485,
27799,
2469,
631,
20,
13,
288,
1377,
2427,
5357,
12,
5743,
1769,
565,
289,
565,
509,
277,
33,
20,
31,
565,
1323,
12,
77,
411,... |
final Display display = new Display (); Shell shell = new Shell (display); shell.setLayout(new FillLayout()); TableViewer v = new TableViewer(shell,SWT.FULL_SELECTION); v.getTable().setLinesVisible(true); v.getTable().setHeaderVisible(true); v.activateCustomTooltips(); v.setContentProvider(new MyContentProvider()); CellLabelProvider labelProvider = new CellLabelProvider() { | final Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new FillLayout()); | public static void main(String[] args) { final Display display = new Display (); Shell shell = new Shell (display); shell.setLayout(new FillLayout()); TableViewer v = new TableViewer(shell,SWT.FULL_SELECTION); v.getTable().setLinesVisible(true); v.getTable().setHeaderVisible(true); v.activateCustomTooltips(); v.setContentProvider(new MyContentProvider()); CellLabelProvider labelProvider = new CellLabelProvider() { /* (non-Javadoc) * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipText(java.lang.Object) */ public String getToolTipText(Object element) { return "Tooltip (" + element + ")"; } /* (non-Javadoc) * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipShift(java.lang.Object) */ public Point getToolTipShift(Object object) { return new Point(5,5); } /* (non-Javadoc) * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipDisplayDelayTime(java.lang.Object) */ public int getToolTipDisplayDelayTime(Object object) { return 2000; } /* (non-Javadoc) * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipTimeDisplayed(java.lang.Object) */ public int getToolTipTimeDisplayed(Object object) { return 5000; } /* (non-Javadoc) * @see org.eclipse.jface.viewers.CellLabelProvider#update(org.eclipse.jface.viewers.ViewerCell) */ public void update(ViewerCell cell) { cell.setText(cell.getElement().toString()); } }; TableViewerColumn column = new TableViewerColumn(v,SWT.NONE); column.setLabelProvider(labelProvider); column.getColumn().setText("Column 1"); column.getColumn().setWidth(100); v.setInput(""); shell.setSize(200,200); shell.open (); while (!shell.isDisposed()) { if (!display.readAndDispatch ()) { display.sleep (); } } display.dispose (); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e8377b71f3cf1bbeaf66b1b6a87a864e93333fda/Snippet011CustomTooltips.java/clean/examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet011CustomTooltips.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
202,
202,
6385,
9311,
2562,
273,
394,
9311,
261,
1769,
202,
202,
13220,
5972,
273,
394,
19433,
261,
5417,
1769,
202,
565,
5972,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
202,
202,
6385,
9311,
2562,
273,
394,
9311,
261,
1769,
202,
202,
13220,
5972,
273,
394,
19433,
261,
5417,
1769,
202,
565,
5972,
18... |
throws java.rmi.RemoteException; | throws java.rmi.RemoteException; | public void setProActiveSecurityManager(ProActiveSecurityManager ps) throws java.rmi.RemoteException; | 58694 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58694/1279458d52679339839158611daec34b4baf800a/RemoteProActiveRuntime.java/buggy/src/org/objectweb/proactive/core/runtime/rmi/RemoteProActiveRuntime.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
626,
3896,
4368,
1318,
12,
626,
3896,
4368,
1318,
4250,
13,
202,
202,
15069,
2252,
18,
8864,
77,
18,
5169,
503,
31,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
626,
3896,
4368,
1318,
12,
626,
3896,
4368,
1318,
4250,
13,
202,
202,
15069,
2252,
18,
8864,
77,
18,
5169,
503,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if (adding.indexOf(reference, 0) != -1) /* if this service is already | if (adding.contains(reference)) /* if this service is already | protected void track(ServiceReference reference) { Object object = get(reference); if (object != null) /* we are already tracking the service */ { if (DEBUG) { System.out.println("ServiceTracker.Tracked.track[modified]: "+reference); } /* Call customizer outside of synchronized region */ customizer.modifiedService(reference, object); /* If the customizer throws an unchecked exception, it is safe to let it propagate */ return; } synchronized (this) { if (adding.indexOf(reference, 0) != -1) /* if this service is already * in the process of being added. */ { if (DEBUG) { System.out.println("ServiceTracker.Tracked.track[already adding]: "+reference); } return; } adding.addElement(reference); /* mark this service is being added */ } if (DEBUG) { System.out.println("ServiceTracker.Tracked.track[adding]: "+reference); } boolean becameUntracked = false; /* Call customizer outside of synchronized region */ try { object = customizer.addingService(reference); /* If the customizer throws an unchecked exception, it will propagate after the finally */ } finally { synchronized (this) { if (adding.removeElement(reference)) /* if the service was not untracked * during the customizer callback */ { if (object != null) { put(reference, object); trackingCount++; /* increment modification count */ notifyAll(); } } else { becameUntracked = true; } } } /* The service became untracked during * the customizer callback. */ if (becameUntracked) { if (DEBUG) { System.out.println("ServiceTracker.Tracked.track[removed]: "+reference); } /* Call customizer outside of synchronized region */ customizer.removedService(reference, object); /* If the customizer throws an unchecked exception, it is safe to let it propagate */ } } | 2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/a8d46c5aef9dd49c493caa7204388c720bcc00cd/ServiceTracker.java/buggy/bundles/org.eclipse.osgi/osgi/src/org/osgi/util/tracker/ServiceTracker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4750,
918,
3298,
12,
1179,
2404,
2114,
13,
3639,
288,
5411,
1033,
733,
273,
336,
12,
6180,
1769,
5411,
309,
261,
1612,
480,
446,
13,
377,
1748,
732,
854,
1818,
11093,
326,
1156,
1195,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4750,
918,
3298,
12,
1179,
2404,
2114,
13,
3639,
288,
5411,
1033,
733,
273,
336,
12,
6180,
1769,
5411,
309,
261,
1612,
480,
446,
13,
377,
1748,
732,
854,
1818,
11093,
326,
1156,
1195,
5... |
rb_undef_method(rb_cClass, "module_function"); | public static void initModuleClass(RubyClass moduleClass) { moduleClass.defineMethod("===", getMethod("op_eqq", RubyObject.class, false)); moduleClass.defineMethod("<=>", getMethod("op_cmp", RubyObject.class, false)); moduleClass.defineMethod("<", getMethod("op_lt", RubyObject.class, false)); moduleClass.defineMethod("<=", getMethod("op_le", RubyObject.class, false)); moduleClass.defineMethod(">", getMethod("op_gt", RubyObject.class, false)); moduleClass.defineMethod(">=", getMethod("op_ge", RubyObject.class, false)); moduleClass.defineMethod("clone", getMethod("m_clone", false)); moduleClass.defineMethod("dup", getMethod("m_dup", false)); moduleClass.defineMethod("to_s", getMethod("m_to_s", false)); moduleClass.defineMethod("included_modules", getMethod("m_included_modules", false)); moduleClass.defineMethod("name", getMethod("m_name", false)); moduleClass.defineMethod("ancestors", getMethod("m_ancestors", false)); moduleClass.definePrivateMethod("attr", getMethod("m_attr", RubySymbol.class, true)); moduleClass.definePrivateMethod("attr_reader", getMethod("m_attr_reader", true)); moduleClass.definePrivateMethod("attr_writer", getMethod("m_attr_writer", true)); moduleClass.definePrivateMethod("attr_accessor", getMethod("m_attr_accessor", true)); moduleClass.defineSingletonMethod("new", getSingletonMethod("m_new", false)); moduleClass.defineMethod("initialize", getMethod("m_initialize", true)); moduleClass.defineMethod("instance_methods", getMethod("m_instance_methods", true)); moduleClass.defineMethod("public_instance_methods", getMethod("m_instance_methods", true)); moduleClass.defineMethod("protected_instance_methods", getMethod("m_protected_instance_methods", true)); moduleClass.defineMethod("private_instance_methods", getMethod("m_private_instance_methods", true)); moduleClass.defineMethod("constants", getMethod("m_constants", false)); moduleClass.defineMethod("const_get", getMethod("m_const_get", RubySymbol.class, false)); moduleClass.defineMethod("const_set", getMethod("m_const_set", RubySymbol.class, RubyObject.class)); moduleClass.defineMethod("const_defined?", getMethod("m_const_defined", RubySymbol.class, false)); moduleClass.definePrivateMethod("method_added", getDummyMethod()); moduleClass.defineMethod("class_variables", getMethod("m_class_variables", false)); moduleClass.definePrivateMethod("remove_class_variable", getMethod("m_remove_class_variable", RubyObject.class, false)); /*rb_define_private_method(rb_cModule, "append_features", rb_mod_append_features, 1); rb_define_private_method(rb_cModule, "extend_object", rb_mod_extend_object, 1); rb_define_private_method(rb_cModule, "include", rb_mod_include, -1); rb_define_private_method(rb_cModule, "public", rb_mod_public, -1); rb_define_private_method(rb_cModule, "protected", rb_mod_protected, -1); rb_define_private_method(rb_cModule, "private", rb_mod_private, -1); rb_define_private_method(rb_cModule, "module_function", rb_mod_modfunc, -1); rb_define_method(rb_cModule, "method_defined?", rb_mod_method_defined, 1); rb_define_method(rb_cModule, "public_class_method", rb_mod_public_method, -1); rb_define_method(rb_cModule, "private_class_method", rb_mod_private_method, -1); rb_define_method(rb_cModule, "module_eval", rb_mod_module_eval, -1); rb_define_method(rb_cModule, "class_eval", rb_mod_module_eval, -1); rb_undef_method(rb_cClass, "module_function"); rb_define_private_method(rb_cModule, "remove_method", rb_mod_remove_method, 1); rb_define_private_method(rb_cModule, "undef_method", rb_mod_undef_method, 1); rb_define_private_method(rb_cModule, "alias_method", rb_mod_alias_method, 2); rb_define_private_method(rb_cModule, "define_method", rb_mod_define_method, -1); rb_define_singleton_method(rb_cModule, "nesting", rb_mod_nesting, 0); rb_define_singleton_method(rb_cModule, "constants", rb_mod_s_constants, 0);*/ } | 46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/60d09f0d06e157ff7d9bb828d89273706e4e2798/RbModule.java/buggy/org/jruby/core/RbModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1208,
3120,
797,
12,
54,
10340,
797,
1605,
797,
13,
288,
3639,
1605,
797,
18,
11255,
1305,
2932,
631,
1546,
16,
6272,
2932,
556,
67,
11253,
85,
3113,
19817,
921,
18,
110... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1208,
3120,
797,
12,
54,
10340,
797,
1605,
797,
13,
288,
3639,
1605,
797,
18,
11255,
1305,
2932,
631,
1546,
16,
6272,
2932,
556,
67,
11253,
85,
3113,
19817,
921,
18,
110... | |
int lastChildNumExecPerPhase; { if (getHierarchicalChild(getNumChildren() - 1).getSteadyPush() != 0) { lastChildNumExecPerPhase = numChildPhases[getNumChildren() - 1]; } else { int numDataConsumed = getChildNumExecs(getNumChildren() - 1) * getHierarchicalChild(getNumChildren() - 1) .getSteadyPop(); double numPipelinePhases = Math.sqrt(numDataConsumed); if (numPipelinePhases != 0) lastChildNumExecPerPhase = (int)Math.ceil( ((double)numChildPhases[getNumChildren() - 1]) / numPipelinePhases); else lastChildNumExecPerPhase = numChildPhases[getNumChildren() - 1]; } } | public void computeSchedule() { int steadyChildPhases[] = new int[getNumChildren()]; // first compute schedules for all my children { int nChild; for (nChild = 0; nChild < getNumChildren(); nChild++) { StreamInterface child = getHierarchicalChild(nChild); // compute child's schedule child.computeSchedule(); // get the # of phases that this child needs to have executed // to complete a steady state schedule steadyChildPhases[nChild] = child.getNumSteadyPhases() * getChildNumExecs(nChild); } } // compute the minimal amount of data necessary in buffers // after the initialization has taken place // this is a little tricky - for every child I need to figure out // exactly how many times I will run it in the init schedule // including the child's steady-state phases that I'll run to fill // up the buffers // store how many init stages and steady-state phases each child will // need to be executed in order to provide enough data for the steady // state int childInitStages[] = new int[getNumChildren()]; // store how many data each child will need in the process of // initialization // extra element here is just to simplify the algorithm int childInitDataNeeded[] = new int[getNumChildren() + 1]; // number of children that HAVE TO execute at least one init stage // (that includes their own init-stages) int numChildrenForInit = 0; // find out how much each child needs to be executed in order to // process all of the init functions { int nChild; for (nChild = getNumChildren() - 1; nChild >= 0; nChild--) { StreamInterface child = getHierarchicalChild(nChild); childInitStages[nChild] = child.getNumInitStages(); // first figure out how much data this child pops for // running just the init stages int initPop = child.getInitPop(); // and how much extra data is needed due to peeking in // init and steady state int initPeek = MAX( child.getInitPeek() - child.getInitPop(), child.getSteadyPeek() - child.getSteadyPop()); int initPush = child.getInitPush(); int nPhase = 0; // does the next child need more data? while (initPush < childInitDataNeeded[nChild + 1]) { // yes // execute another phase PhasingSchedule initStage = getChildInitStage(child, childInitStages[nChild]); childInitStages[nChild]++; initPush += initStage.getOverallPush(); // and don't forget that this means that // this child may need more data! initPeek = MAX( initPeek - initStage.getOverallPop(), initStage.getOverallPeek() - initStage.getOverallPop()); initPop += initStage.getOverallPop(); // next phase nPhase = (nPhase + 1) % child.getNumSteadyPhases(); } // store this child's needs for init data childInitDataNeeded[nChild] = initPop + initPeek; numChildrenForInit += (childInitStages[nChild] != 0 ? 1 : 0); } } // amount of data in buffers. Each entry corresponds to the buffer // ABOVE the correspondingly numbered buffer (dataInBuffers[0] is above // the pipeline). The last buffer obviously is the buffer right below // the last child, which is just below the pipeline. int dataInBuffers[] = new int[getNumChildren() + 1]; // create the initialization schedule // The intialization schedule is created by executing the bottom-most // child, and pulling the data from upper children accordingly. // This is repeated until all children have had at least // childInitStages worth of stages or phases executed. Reasoning for // this is in my (karczma) notebook, date 02/07/14. // here I'll force pulling data all the way // this is necessary because I haven't calculated exactly // how many times every filter will need to get executed, // and I want to preserve the pull semantics of this schedule computeMinLatencySchedule( new PipelineInitSchedulingUtility(this), childInitStages, dataInBuffers, true); // here I'll allow the schedule to simply execute the children // however many times I told it to - this should satisfy the // pull semantics, because it's a steady schedule, and the // init schedule is a pull schedule! computeMinLatencySchedule( new PipelineSteadySchedulingUtility(this), steadyChildPhases, dataInBuffers, false); } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/eda689ff11ed909ea4517d27002f59961452773f/Pipeline.java/clean/streams/src/streamit/scheduler2/minlatency/Pipeline.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3671,
6061,
1435,
565,
288,
509,
30006,
2578,
1905,
2173,
11406,
31,
288,
309,
261,
588,
44,
14529,
1763,
12,
588,
2578,
4212,
1435,
300,
404,
2934,
588,
510,
684,
93,
7621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3671,
6061,
1435,
565,
288,
509,
30006,
2578,
1905,
2173,
11406,
31,
288,
309,
261,
588,
44,
14529,
1763,
12,
588,
2578,
4212,
1435,
300,
404,
2934,
588,
510,
684,
93,
7621,
... | |
match(LITERAL_eq); if ( inputState.guessing==0 ) { name="eq"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_ne: | match(LITERAL_into); if ( inputState.guessing==0 ) { name = "into"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_rename: | public final String reservedKeywords() throws RecognitionException, TokenStreamException { String name; returnAST = null; ASTPair currentAST = new ASTPair(); org.exist.xquery.parser.XQueryAST reservedKeywords_AST = null; name= null; switch ( LA(1)) { case LITERAL_element: { org.exist.xquery.parser.XQueryAST tmp388_AST = null; tmp388_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp388_AST); match(LITERAL_element); if ( inputState.guessing==0 ) { name = "element"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_to: { org.exist.xquery.parser.XQueryAST tmp389_AST = null; tmp389_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp389_AST); match(LITERAL_to); if ( inputState.guessing==0 ) { name = "to"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_div: { org.exist.xquery.parser.XQueryAST tmp390_AST = null; tmp390_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp390_AST); match(LITERAL_div); if ( inputState.guessing==0 ) { name= "div"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_mod: { org.exist.xquery.parser.XQueryAST tmp391_AST = null; tmp391_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp391_AST); match(LITERAL_mod); if ( inputState.guessing==0 ) { name= "mod"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_text: { org.exist.xquery.parser.XQueryAST tmp392_AST = null; tmp392_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp392_AST); match(LITERAL_text); if ( inputState.guessing==0 ) { name= "text"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_node: { org.exist.xquery.parser.XQueryAST tmp393_AST = null; tmp393_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp393_AST); match(LITERAL_node); if ( inputState.guessing==0 ) { name= "node"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_or: { org.exist.xquery.parser.XQueryAST tmp394_AST = null; tmp394_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp394_AST); match(LITERAL_or); if ( inputState.guessing==0 ) { name= "or"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_and: { org.exist.xquery.parser.XQueryAST tmp395_AST = null; tmp395_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp395_AST); match(LITERAL_and); if ( inputState.guessing==0 ) { name= "and"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_child: { org.exist.xquery.parser.XQueryAST tmp396_AST = null; tmp396_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp396_AST); match(LITERAL_child); if ( inputState.guessing==0 ) { name= "child"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_parent: { org.exist.xquery.parser.XQueryAST tmp397_AST = null; tmp397_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp397_AST); match(LITERAL_parent); if ( inputState.guessing==0 ) { name= "parent"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_self: { org.exist.xquery.parser.XQueryAST tmp398_AST = null; tmp398_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp398_AST); match(LITERAL_self); if ( inputState.guessing==0 ) { name= "self"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_attribute: { org.exist.xquery.parser.XQueryAST tmp399_AST = null; tmp399_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp399_AST); match(LITERAL_attribute); if ( inputState.guessing==0 ) { name= "attribute"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_comment: { org.exist.xquery.parser.XQueryAST tmp400_AST = null; tmp400_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp400_AST); match(LITERAL_comment); if ( inputState.guessing==0 ) { name= "comment"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_document: { org.exist.xquery.parser.XQueryAST tmp401_AST = null; tmp401_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp401_AST); match(LITERAL_document); if ( inputState.guessing==0 ) { name= "document"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case 166: { org.exist.xquery.parser.XQueryAST tmp402_AST = null; tmp402_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp402_AST); match(166); if ( inputState.guessing==0 ) { name= "document-node"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_collection: { org.exist.xquery.parser.XQueryAST tmp403_AST = null; tmp403_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp403_AST); match(LITERAL_collection); if ( inputState.guessing==0 ) { name= "collection"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_ancestor: { org.exist.xquery.parser.XQueryAST tmp404_AST = null; tmp404_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp404_AST); match(LITERAL_ancestor); if ( inputState.guessing==0 ) { name= "ancestor"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_descendant: { org.exist.xquery.parser.XQueryAST tmp405_AST = null; tmp405_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp405_AST); match(LITERAL_descendant); if ( inputState.guessing==0 ) { name= "descendant"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case 178: { org.exist.xquery.parser.XQueryAST tmp406_AST = null; tmp406_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp406_AST); match(178); if ( inputState.guessing==0 ) { name= "descendant-or-self"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case 182: { org.exist.xquery.parser.XQueryAST tmp407_AST = null; tmp407_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp407_AST); match(182); if ( inputState.guessing==0 ) { name= "ancestor-or-self"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case 183: { org.exist.xquery.parser.XQueryAST tmp408_AST = null; tmp408_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp408_AST); match(183); if ( inputState.guessing==0 ) { name= "preceding-sibling"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case 179: { org.exist.xquery.parser.XQueryAST tmp409_AST = null; tmp409_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp409_AST); match(179); if ( inputState.guessing==0 ) { name= "following-sibling"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_following: { org.exist.xquery.parser.XQueryAST tmp410_AST = null; tmp410_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp410_AST); match(LITERAL_following); if ( inputState.guessing==0 ) { name = "following"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_preceding: { org.exist.xquery.parser.XQueryAST tmp411_AST = null; tmp411_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp411_AST); match(LITERAL_preceding); if ( inputState.guessing==0 ) { name = "preceding"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_item: { org.exist.xquery.parser.XQueryAST tmp412_AST = null; tmp412_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp412_AST); match(LITERAL_item); if ( inputState.guessing==0 ) { name= "item"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_empty: { org.exist.xquery.parser.XQueryAST tmp413_AST = null; tmp413_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp413_AST); match(LITERAL_empty); if ( inputState.guessing==0 ) { name= "empty"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_version: { org.exist.xquery.parser.XQueryAST tmp414_AST = null; tmp414_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp414_AST); match(LITERAL_version); if ( inputState.guessing==0 ) { name= "version"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_xquery: { org.exist.xquery.parser.XQueryAST tmp415_AST = null; tmp415_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp415_AST); match(LITERAL_xquery); if ( inputState.guessing==0 ) { name= "xquery"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_variable: { org.exist.xquery.parser.XQueryAST tmp416_AST = null; tmp416_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp416_AST); match(LITERAL_variable); if ( inputState.guessing==0 ) { name= "variable"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_namespace: { org.exist.xquery.parser.XQueryAST tmp417_AST = null; tmp417_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp417_AST); match(LITERAL_namespace); if ( inputState.guessing==0 ) { name= "namespace"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_if: { org.exist.xquery.parser.XQueryAST tmp418_AST = null; tmp418_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp418_AST); match(LITERAL_if); if ( inputState.guessing==0 ) { name= "if"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_then: { org.exist.xquery.parser.XQueryAST tmp419_AST = null; tmp419_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp419_AST); match(LITERAL_then); if ( inputState.guessing==0 ) { name= "then"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_else: { org.exist.xquery.parser.XQueryAST tmp420_AST = null; tmp420_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp420_AST); match(LITERAL_else); if ( inputState.guessing==0 ) { name= "else"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_for: { org.exist.xquery.parser.XQueryAST tmp421_AST = null; tmp421_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp421_AST); match(LITERAL_for); if ( inputState.guessing==0 ) { name= "for"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_let: { org.exist.xquery.parser.XQueryAST tmp422_AST = null; tmp422_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp422_AST); match(LITERAL_let); if ( inputState.guessing==0 ) { name= "let"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_default: { org.exist.xquery.parser.XQueryAST tmp423_AST = null; tmp423_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp423_AST); match(LITERAL_default); if ( inputState.guessing==0 ) { name= "default"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_function: { org.exist.xquery.parser.XQueryAST tmp424_AST = null; tmp424_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp424_AST); match(LITERAL_function); if ( inputState.guessing==0 ) { name= "function"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_external: { org.exist.xquery.parser.XQueryAST tmp425_AST = null; tmp425_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp425_AST); match(LITERAL_external); if ( inputState.guessing==0 ) { name = "external"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_as: { org.exist.xquery.parser.XQueryAST tmp426_AST = null; tmp426_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp426_AST); match(LITERAL_as); if ( inputState.guessing==0 ) { name = "as"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_union: { org.exist.xquery.parser.XQueryAST tmp427_AST = null; tmp427_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp427_AST); match(LITERAL_union); if ( inputState.guessing==0 ) { name = "union"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_intersect: { org.exist.xquery.parser.XQueryAST tmp428_AST = null; tmp428_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp428_AST); match(LITERAL_intersect); if ( inputState.guessing==0 ) { name = "intersect"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_except: { org.exist.xquery.parser.XQueryAST tmp429_AST = null; tmp429_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp429_AST); match(LITERAL_except); if ( inputState.guessing==0 ) { name = "except"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_order: { org.exist.xquery.parser.XQueryAST tmp430_AST = null; tmp430_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp430_AST); match(LITERAL_order); if ( inputState.guessing==0 ) { name = "order"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_by: { org.exist.xquery.parser.XQueryAST tmp431_AST = null; tmp431_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp431_AST); match(LITERAL_by); if ( inputState.guessing==0 ) { name = "by"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_some: { org.exist.xquery.parser.XQueryAST tmp432_AST = null; tmp432_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp432_AST); match(LITERAL_some); if ( inputState.guessing==0 ) { name = "some"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_every: { org.exist.xquery.parser.XQueryAST tmp433_AST = null; tmp433_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp433_AST); match(LITERAL_every); if ( inputState.guessing==0 ) { name = "every"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_is: { org.exist.xquery.parser.XQueryAST tmp434_AST = null; tmp434_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp434_AST); match(LITERAL_is); if ( inputState.guessing==0 ) { name = "is"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_isnot: { org.exist.xquery.parser.XQueryAST tmp435_AST = null; tmp435_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp435_AST); match(LITERAL_isnot); if ( inputState.guessing==0 ) { name = "isnot"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_module: { org.exist.xquery.parser.XQueryAST tmp436_AST = null; tmp436_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp436_AST); match(LITERAL_module); if ( inputState.guessing==0 ) { name = "module"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_import: { org.exist.xquery.parser.XQueryAST tmp437_AST = null; tmp437_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp437_AST); match(LITERAL_import); if ( inputState.guessing==0 ) { name = "import"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_at: { org.exist.xquery.parser.XQueryAST tmp438_AST = null; tmp438_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp438_AST); match(LITERAL_at); if ( inputState.guessing==0 ) { name = "at"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_cast: { org.exist.xquery.parser.XQueryAST tmp439_AST = null; tmp439_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp439_AST); match(LITERAL_cast); if ( inputState.guessing==0 ) { name = "cast"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_return: { org.exist.xquery.parser.XQueryAST tmp440_AST = null; tmp440_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp440_AST); match(LITERAL_return); if ( inputState.guessing==0 ) { name = "return"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_instance: { org.exist.xquery.parser.XQueryAST tmp441_AST = null; tmp441_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp441_AST); match(LITERAL_instance); if ( inputState.guessing==0 ) { name = "instance"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_of: { org.exist.xquery.parser.XQueryAST tmp442_AST = null; tmp442_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp442_AST); match(LITERAL_of); if ( inputState.guessing==0 ) { name = "of"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_declare: { org.exist.xquery.parser.XQueryAST tmp443_AST = null; tmp443_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp443_AST); match(LITERAL_declare); if ( inputState.guessing==0 ) { name = "declare"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_collation: { org.exist.xquery.parser.XQueryAST tmp444_AST = null; tmp444_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp444_AST); match(LITERAL_collation); if ( inputState.guessing==0 ) { name = "collation"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case 63: { org.exist.xquery.parser.XQueryAST tmp445_AST = null; tmp445_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp445_AST); match(63); if ( inputState.guessing==0 ) { name = "boundary-space"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_preserve: { org.exist.xquery.parser.XQueryAST tmp446_AST = null; tmp446_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp446_AST); match(LITERAL_preserve); if ( inputState.guessing==0 ) { name = "preserve"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_strip: { org.exist.xquery.parser.XQueryAST tmp447_AST = null; tmp447_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp447_AST); match(LITERAL_strip); if ( inputState.guessing==0 ) { name = "strip"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_ordering: { org.exist.xquery.parser.XQueryAST tmp448_AST = null; tmp448_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp448_AST); match(LITERAL_ordering); if ( inputState.guessing==0 ) { name = "ordering"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_construction: { org.exist.xquery.parser.XQueryAST tmp449_AST = null; tmp449_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp449_AST); match(LITERAL_construction); if ( inputState.guessing==0 ) { name = "construction"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_ordered: { org.exist.xquery.parser.XQueryAST tmp450_AST = null; tmp450_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp450_AST); match(LITERAL_ordered); if ( inputState.guessing==0 ) { name = "ordered"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_unordered: { org.exist.xquery.parser.XQueryAST tmp451_AST = null; tmp451_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp451_AST); match(LITERAL_unordered); if ( inputState.guessing==0 ) { name = "unordered"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_typeswitch: { org.exist.xquery.parser.XQueryAST tmp452_AST = null; tmp452_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp452_AST); match(LITERAL_typeswitch); if ( inputState.guessing==0 ) { name = "typeswitch"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_encoding: { org.exist.xquery.parser.XQueryAST tmp453_AST = null; tmp453_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp453_AST); match(LITERAL_encoding); if ( inputState.guessing==0 ) { name = "encoding"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case 66: { org.exist.xquery.parser.XQueryAST tmp454_AST = null; tmp454_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp454_AST); match(66); if ( inputState.guessing==0 ) { name = "base-uri"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_update: { org.exist.xquery.parser.XQueryAST tmp455_AST = null; tmp455_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp455_AST); match(LITERAL_update); if ( inputState.guessing==0 ) { name = "update"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_replace: { org.exist.xquery.parser.XQueryAST tmp456_AST = null; tmp456_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp456_AST); match(LITERAL_replace); if ( inputState.guessing==0 ) { name = "replace"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_delete: { org.exist.xquery.parser.XQueryAST tmp457_AST = null; tmp457_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp457_AST); match(LITERAL_delete); if ( inputState.guessing==0 ) { name = "delete"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_value: { org.exist.xquery.parser.XQueryAST tmp458_AST = null; tmp458_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp458_AST); match(LITERAL_value); if ( inputState.guessing==0 ) { name = "value"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_insert: { org.exist.xquery.parser.XQueryAST tmp459_AST = null; tmp459_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp459_AST); match(LITERAL_insert); if ( inputState.guessing==0 ) { name = "insert"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_with: { org.exist.xquery.parser.XQueryAST tmp460_AST = null; tmp460_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp460_AST); match(LITERAL_with); if ( inputState.guessing==0 ) { name = "with"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_into: { org.exist.xquery.parser.XQueryAST tmp461_AST = null; tmp461_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp461_AST); match(LITERAL_into); if ( inputState.guessing==0 ) { name = "into"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_rename: { org.exist.xquery.parser.XQueryAST tmp462_AST = null; tmp462_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp462_AST); match(LITERAL_rename); if ( inputState.guessing==0 ) { name = "rename"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_option: { org.exist.xquery.parser.XQueryAST tmp463_AST = null; tmp463_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp463_AST); match(LITERAL_option); if ( inputState.guessing==0 ) { name = "option"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_case: { org.exist.xquery.parser.XQueryAST tmp464_AST = null; tmp464_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp464_AST); match(LITERAL_case); if ( inputState.guessing==0 ) { name = "case"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_validate: { org.exist.xquery.parser.XQueryAST tmp465_AST = null; tmp465_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp465_AST); match(LITERAL_validate); if ( inputState.guessing==0 ) { name = "validate"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_schema: { org.exist.xquery.parser.XQueryAST tmp466_AST = null; tmp466_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp466_AST); match(LITERAL_schema); if ( inputState.guessing==0 ) { name = "schema"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_treat: { org.exist.xquery.parser.XQueryAST tmp467_AST = null; tmp467_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp467_AST); match(LITERAL_treat); if ( inputState.guessing==0 ) { name = "treat"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case 84: { org.exist.xquery.parser.XQueryAST tmp468_AST = null; tmp468_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp468_AST); match(84); if ( inputState.guessing==0 ) { name = "no-preserve"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_inherit: { org.exist.xquery.parser.XQueryAST tmp469_AST = null; tmp469_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp469_AST); match(LITERAL_inherit); if ( inputState.guessing==0 ) { name = "inherit"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case 86: { org.exist.xquery.parser.XQueryAST tmp470_AST = null; tmp470_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp470_AST); match(86); if ( inputState.guessing==0 ) { name = "no-inherit"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_eq: { org.exist.xquery.parser.XQueryAST tmp471_AST = null; tmp471_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp471_AST); match(LITERAL_eq); if ( inputState.guessing==0 ) { name="eq"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_ne: { org.exist.xquery.parser.XQueryAST tmp472_AST = null; tmp472_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp472_AST); match(LITERAL_ne); if ( inputState.guessing==0 ) { name = "ne"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_lt: { org.exist.xquery.parser.XQueryAST tmp473_AST = null; tmp473_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp473_AST); match(LITERAL_lt); if ( inputState.guessing==0 ) { name = "lt"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_le: { org.exist.xquery.parser.XQueryAST tmp474_AST = null; tmp474_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp474_AST); match(LITERAL_le); if ( inputState.guessing==0 ) { name = "le"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_gt: { org.exist.xquery.parser.XQueryAST tmp475_AST = null; tmp475_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp475_AST); match(LITERAL_gt); if ( inputState.guessing==0 ) { name = "gt"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_ge: { org.exist.xquery.parser.XQueryAST tmp476_AST = null; tmp476_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp476_AST); match(LITERAL_ge); if ( inputState.guessing==0 ) { name = "ge"; } reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } returnAST = reservedKeywords_AST; return name; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/68bb69fc2bc91cbece43dcdf563e1be3ba003e1b/XQueryParser.java/buggy/src/org/exist/xquery/parser/XQueryParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
514,
225,
8735,
14149,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
202,
202,
780,
508,
31,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
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,
225,
202,
482,
727,
514,
225,
8735,
14149,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
202,
202,
780,
508,
31,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,... |
featureFile.append(line+"\n"); break; | featureFile.append(line+"\n"); if (labelUnit == null){ break; } else { if (returnString == null){ returnString = "Label file is longer than feature file: " +" unit "+unitIndex +" and greater do not exist in feature file"; } } | protected String firstVerifyAlignment(String basename) throws IOException { BufferedReader labels = new BufferedReader(new InputStreamReader(new FileInputStream(new File( db.unitLabDirName() + basename + db.unitLabExt() )), "UTF-8")); BufferedReader features = new BufferedReader(new InputStreamReader(new FileInputStream(new File( db.unitFeaDirName() + basename + db.unitFeaExt() )), "UTF-8")); StringBuffer featureFile = new StringBuffer(); String line; // Skip label file header: while ((line = labels.readLine()) != null) { if (line.startsWith("#")) break; // line starting with "#" marks end of header } // Skip features file header: while ((line = features.readLine()) != null) { featureFile.append(line+"\n"); if (line.trim().equals("")) break; // empty line marks end of header } String labelUnit = getLabelUnit(labels); line = features.readLine(); String featureUnit = getFeatureUnit(line); String returnString = null; int unitIndex = 0; while (labelUnit!=null){ //System.out.println("featureUnit : "+featureUnit // +" labelUnit : "+labelUnit); unitIndex++; if (featureUnit == null) throw new IOException("Incomplete feature file: "+basename); // when featureUnit is the empty string, we have found an empty line == end of feature section if ("".equals(featureUnit)){ featureFile.append(line+"\n"); break; } if (!featureUnit.equals(labelUnit)) { if (featureUnit.equals("_")){ //unnecessary pause unit in features, delete System.out.println("Deleting unnecessary pause unit "+unitIndex); line = features.readLine(); featureUnit = getFeatureUnit(line); continue; } else { if (featureUnit.equals("__L")){ //two unnecessary pause units in features, delete System.out.println("Deleting unnecessary pause units "+unitIndex +" and "+unitIndex+1); features.readLine(); line = features.readLine(); featureUnit = getFeatureUnit(line); continue; } else { //truely not matching if (returnString == null){ //only remember the the first mismatch returnString = "Non-matching units found: feature file '" +featureUnit+"' vs. label file '"+labelUnit +"' (Unit "+unitIndex+")"; } } } } featureFile.append(line+"\n"); line = features.readLine(); featureUnit = getFeatureUnit(line); labelUnit = getLabelUnit(labels); } labels.close(); while ((line = features.readLine()) != null) { //simply append all remaining lines featureFile.append(line+"\n"); } features.close(); //now overwrite the feature file with the lines in the StringBuffer PrintWriter featureFileWriter = new PrintWriter( new FileWriter( new File( db.unitFeaDirName() + basename + db.unitFeaExt() ))); featureFileWriter.print(featureFile.toString()); featureFileWriter.flush(); featureFileWriter.close(); //returnString is null if all units matched, //otherwise the first error is given back return returnString; } | 49846 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49846/e25f4a6660ca4b4b45fe9bbc1083a695f9e4e4e7/LabelFeatureAligner.java/buggy/java/de/dfki/lt/mary/unitselection/voiceimport/LabelFeatureAligner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
1122,
8097,
11535,
12,
780,
4882,
13,
1216,
1860,
565,
288,
3639,
10633,
3249,
273,
394,
10633,
12,
2704,
15322,
12,
2704,
11907,
12,
2704,
1387,
12,
1319,
18,
4873,
14506,
287... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
1122,
8097,
11535,
12,
780,
4882,
13,
1216,
1860,
565,
288,
3639,
10633,
3249,
273,
394,
10633,
12,
2704,
15322,
12,
2704,
11907,
12,
2704,
1387,
12,
1319,
18,
4873,
14506,
287... |
replace( '/', File.separatorChar ). replace( '\\', File.separatorChar ); | replace('/', File.separatorChar). replace('\\', File.separatorChar); | public void addDefaultExcludes() { int excludesLength = excludes == null ? 0 : excludes.length; String[] newExcludes; newExcludes = new String[excludesLength + DEFAULTEXCLUDES.length]; if (excludesLength > 0) { System.arraycopy(excludes, 0, newExcludes, 0, excludesLength); } for (int i = 0; i < DEFAULTEXCLUDES.length; i++) { newExcludes[i + excludesLength] = DEFAULTEXCLUDES[i]. replace( '/', File.separatorChar ). replace( '\\', File.separatorChar ); } excludes = newExcludes; } | 17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/c7b5b643b25b20f5c96097b2c54e2e26a054f212/VAJWorkspaceScanner.java/buggy/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJWorkspaceScanner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
28297,
30866,
1435,
288,
3639,
509,
13644,
1782,
273,
13644,
422,
446,
692,
374,
294,
13644,
18,
2469,
31,
3639,
514,
8526,
394,
30866,
31,
3639,
394,
30866,
273,
394,
514,
63,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
28297,
30866,
1435,
288,
3639,
509,
13644,
1782,
273,
13644,
422,
446,
692,
374,
294,
13644,
18,
2469,
31,
3639,
514,
8526,
394,
30866,
31,
3639,
394,
30866,
273,
394,
514,
63,... |
ERXArrayUtilities.sortedArraySortedWithKey(eos, key, EOSortOrdering.CompareCaseInsensitiveAscending); | ERXArrayUtilities.sortArrayWithKey(eos, key, EOSortOrdering.CompareCaseInsensitiveAscending); | public static void sortEOsUsingSingleKey(NSMutableArray eos, String key) { ERXArrayUtilities.sortedArraySortedWithKey(eos, key, EOSortOrdering.CompareCaseInsensitiveAscending); } | 50512 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50512/6c1817f4bb03a3ecd72ebdf90f67d70ac055afdc/ERXUtilities.java/clean/Common/Frameworks/ERExtensions/Sources/er/extensions/ERXUtilities.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1524,
41,
15112,
7736,
5281,
653,
12,
3156,
19536,
1076,
425,
538,
16,
514,
498,
13,
288,
3639,
4232,
60,
1076,
11864,
18,
3804,
1076,
1190,
653,
12,
73,
538,
16,
498,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1524,
41,
15112,
7736,
5281,
653,
12,
3156,
19536,
1076,
425,
538,
16,
514,
498,
13,
288,
3639,
4232,
60,
1076,
11864,
18,
3804,
1076,
1190,
653,
12,
73,
538,
16,
498,
... |
Class clazz = null; | public void callInit( String className ) { Class clazz = null; Method op = null; Thread.currentThread().setContextClassLoader( appLoader ); try { clazz = appLoader.loadClass( className ); } catch ( ClassNotFoundException e ) { log.error( "Could not find " + className, e ); System.exit( ExitCodes.CLASS_LOOKUP ); } try { bootstrapped = clazz.newInstance(); } catch ( Exception e ) { log.error( "Could not instantiate " + className, e ); System.exit( ExitCodes.INSTANTIATION ); } try { op = clazz.getMethod( "init", new Class[] { InstallationLayout.class } ); } catch ( Exception e ) { log.error( "Could not find init(InstallationLayout) method for " + className, e ); System.exit( ExitCodes.METHOD_LOOKUP ); } try { op.invoke( bootstrapped, new Object[] { this.install } ); } catch ( Exception e ) { log.error( "Failed on " + className + ".init(InstallationLayout)", e ); System.exit( ExitCodes.INITIALIZATION ); } } | 10677 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10677/4350c947119a3f2bb5047cf41c1cca097a80b46b/Bootstrapper.java/clean/standalone/daemon/src/main/java/org/apache/directory/server/standalone/daemon/Bootstrapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
745,
2570,
12,
514,
2658,
262,
565,
288,
9079,
2985,
1061,
273,
446,
31,
7734,
4884,
18,
2972,
3830,
7675,
542,
1042,
7805,
12,
595,
2886,
11272,
3639,
775,
3639,
288,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
745,
2570,
12,
514,
2658,
262,
565,
288,
9079,
2985,
1061,
273,
446,
31,
7734,
4884,
18,
2972,
3830,
7675,
542,
1042,
7805,
12,
595,
2886,
11272,
3639,
775,
3639,
288,
5411,
... | |
if (isPrimitive() || isNullType() || this.isTypeVariable()) { return new String(this.binding.sourceName()); | if (isPrimitive() || isNullType()) { BaseTypeBinding baseTypeBinding = (BaseTypeBinding) this.binding; return new String(baseTypeBinding.simpleName); | public String getQualifiedName() { if (isAnonymous() || isLocal()) { return NO_NAME; } if (isPrimitive() || isNullType() || this.isTypeVariable()) { return new String(this.binding.sourceName()); } if (isArray()) { ITypeBinding elementType = getElementType(); String elementTypeQualifiedName = elementType.getQualifiedName(); if (elementTypeQualifiedName.length() != 0) { int dimensions = this.getDimensions(); char[] brackets = new char[dimensions * 2]; for (int i = dimensions * 2 - 1; i >= 0; i -= 2) { brackets[i] = ']'; brackets[i - 1] = '['; } StringBuffer stringBuffer = new StringBuffer(elementTypeQualifiedName); stringBuffer.append(brackets); return stringBuffer.toString(); } else { return NO_NAME; } } if (isTopLevel() || isMember()) { PackageBinding packageBinding = this.binding.getPackage(); StringBuffer buffer = new StringBuffer(); if (isWildcardType()) { buffer.append(TypeConstants.WILDCARD_NAME); WildcardBinding wildcardBinding = (WildcardBinding) this.binding; if (wildcardBinding.bound != null) { switch(wildcardBinding.kind) { case Wildcard.SUPER : buffer.append(TypeConstants.WILDCARD_SUPER); break; case Wildcard.EXTENDS : buffer.append(TypeConstants.WILDCARD_EXTENDS); break; } buffer.append(getBound().getQualifiedName()); } } else { if (packageBinding != null && packageBinding.compoundName != CharOperation.NO_CHAR_CHAR) { buffer.append(packageBinding.readableName()).append('.'); } buffer.append(this.binding.qualifiedSourceName()); if (!isRawType()) { // only one of the type parameters or type arguments is non-empty at the same time appendQualifiedTypeParameters(buffer, getTypeParameters()); appendQualifiedTypeArguments(buffer, getTypeArguments()); } } return String.valueOf(buffer); } return NO_NAME; } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/996ea5997dae4e7ec05722a233804ef32ae29f15/TypeBinding.java/clean/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
26661,
1435,
288,
202,
202,
430,
261,
291,
18792,
1435,
747,
22873,
10756,
288,
1082,
202,
2463,
3741,
67,
1985,
31,
202,
202,
97,
9506,
202,
430,
261,
291,
9840,
1435,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
26661,
1435,
288,
202,
202,
430,
261,
291,
18792,
1435,
747,
22873,
10756,
288,
1082,
202,
2463,
3741,
67,
1985,
31,
202,
202,
97,
9506,
202,
430,
261,
291,
9840,
1435,
7... |
myXcodeProjProject.addSourceReference(_resource.getLocation().toOSString()); | myXcodeProjProject.addSourceReference(resource.getLocation().toOSString()); | public void handleSource(IResource _resource, IProgressMonitor _progressMonitor, Map _buildCache) { if (myXcodeProject != null) { myXcodeProject.addSourceReference(_resource.getLocation().toOSString()); } if (myXcodeProjProject != null) { myXcodeProjProject.addSourceReference(_resource.getLocation().toOSString()); } } | 47899 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47899/5644f6506a8f17f2b8311774090206457f13a78d/DotXcodeBuilder.java/buggy/wolips/plugins/org.objectstyle.wolips.builder/java/org/objectstyle/wolips/builder/internal/DotXcodeBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
1830,
12,
45,
1420,
389,
3146,
16,
467,
5491,
7187,
389,
8298,
7187,
16,
1635,
389,
3510,
1649,
13,
288,
202,
202,
430,
261,
4811,
60,
710,
4109,
480,
446,
13,
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,
225,
202,
482,
918,
1640,
1830,
12,
45,
1420,
389,
3146,
16,
467,
5491,
7187,
389,
8298,
7187,
16,
1635,
389,
3510,
1649,
13,
288,
202,
202,
430,
261,
4811,
60,
710,
4109,
480,
446,
13,
28... |
try { new Attribute("xml:base", "http: | try { new Attribute("xml:base", "http: | public void testXmlPrefix() { try { new Attribute("xml:base", "http://www.w3.org/TR"); fail("Created attribute with name xml:base"); } catch (NamespaceException ex) { // success assertNotNull(ex.getMessage()); } try { new Attribute("xml:space", "preserve"); fail("Created attribute with name xml:space"); } catch (NamespaceException ex) { // success assertNotNull(ex.getMessage()); } try { new Attribute("xml:lang", "fr-FR"); fail("Created attribute with name xml:lang"); } catch (NamespaceException ex) { // success assertNotNull(ex.getMessage()); } String xmlNamespace = "http://www.w3.org/XML/1998/namespace"; Attribute a1 = new Attribute( "xml:base", xmlNamespace, "http://www.w3.org/"); assertEquals("base", a1.getLocalName()); assertEquals("xml:base", a1.getQualifiedName()); assertEquals(xmlNamespace, a1.getNamespaceURI()); Attribute a2 = new Attribute("xml:space", xmlNamespace, "preserve"); assertEquals(a2.getLocalName(), "space"); assertEquals("xml:space", a2.getQualifiedName()); assertEquals(xmlNamespace, a2.getNamespaceURI()); Attribute a3 = new Attribute("xml:lang", xmlNamespace, "en-UK"); assertEquals("lang", a3.getLocalName()); assertEquals("xml:lang", a3.getQualifiedName()); assertEquals(xmlNamespace, a3.getNamespaceURI()); try { new Attribute("xml:base", "http://www.nothteXMLNamespace", "http://www.w3.org/"); fail("remapped xml prefix"); } catch (NamespaceException ex) { // success assertNotNull(ex.getMessage()); } } | 626 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/626/a86cda2999f0a7146f0d1ac7a397a0a472054a55/AttributeTest.java/clean/src/nu/xom/tests/AttributeTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4432,
2244,
1435,
288,
7734,
775,
288,
5411,
394,
3601,
2932,
2902,
30,
1969,
3113,
315,
2505,
2207,
5591,
18,
91,
23,
18,
3341,
19,
4349,
8863,
5411,
2321,
2932,
6119,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4432,
2244,
1435,
288,
7734,
775,
288,
5411,
394,
3601,
2932,
2902,
30,
1969,
3113,
315,
2505,
2207,
5591,
18,
91,
23,
18,
3341,
19,
4349,
8863,
5411,
2321,
2932,
6119,
... |
SelectionListener listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { listViewer.setAllChecked(true); } }; selectButton.addSelectionListener(listener); | SelectionListener listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { listViewer.setAllChecked(true); } }; selectButton.addSelectionListener(listener); | private void addSelectionButtons(Composite composite) { Composite buttonComposite = new Composite(composite, SWT.RIGHT); buttonComposite.setFont(composite.getFont()); GridLayout layout = new GridLayout(); layout.numColumns = 2; buttonComposite.setLayout(layout); GridData data = new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.GRAB_HORIZONTAL); data.grabExcessHorizontalSpace = true; composite.setData(data); Button selectButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, SELECT_ALL_TITLE, false); SelectionListener listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { listViewer.setAllChecked(true); } }; selectButton.addSelectionListener(listener); Button deselectButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, DESELECT_ALL_TITLE, false); listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { listViewer.setAllChecked(false); } }; deselectButton.addSelectionListener(listener); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/ae5fb304a3c625bec2a4a9b282bc061b8111fa1c/ListSelectionDialog.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/ListSelectionDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
527,
6233,
14388,
12,
9400,
9635,
13,
288,
202,
9400,
3568,
9400,
273,
394,
14728,
12,
27676,
16,
348,
8588,
18,
11847,
1769,
202,
5391,
9400,
18,
542,
5711,
12,
27676,
18,
588,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
527,
6233,
14388,
12,
9400,
9635,
13,
288,
202,
9400,
3568,
9400,
273,
394,
14728,
12,
27676,
16,
348,
8588,
18,
11847,
1769,
202,
5391,
9400,
18,
542,
5711,
12,
27676,
18,
588,
5... |
content.append("<br>"); content.append("<span class=\"link\">"); | content.append(System.getProperties("line.separator")); | public void targetStarted(BuildEvent event) { super.targetStarted(event); init(event); if (out != null) { String name = event.getTarget().getName(); StringBuffer content = new StringBuffer(); content.append("<br>"); content.append("<span class=\"link\">"); content.append(FORMATTER.format(new Date())); content.append(" ["); content.append(name); content.append("] </span>"); writeStatus(content); } } | 55334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55334/bfaec9482bdb2752d2b555d83a3b37a628d1b7ac/XmlLoggerWithStatus.java/buggy/contrib/XmlLoggerWithStatus/XmlLoggerWithStatus.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1018,
9217,
12,
3116,
1133,
871,
13,
288,
3639,
2240,
18,
3299,
9217,
12,
2575,
1769,
3639,
1208,
12,
2575,
1769,
3639,
309,
261,
659,
480,
446,
13,
288,
5411,
514,
508,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1018,
9217,
12,
3116,
1133,
871,
13,
288,
3639,
2240,
18,
3299,
9217,
12,
2575,
1769,
3639,
1208,
12,
2575,
1769,
3639,
309,
261,
659,
480,
446,
13,
288,
5411,
514,
508,
273,... |
location = locationOfKaBoom; if (location == null) throw new NullPointerException("location of KaBoom is null"); | if (locationOfKaBoom == null) throw new NullPointerException("location of KaBoom is null"); | public void foundRedundantNullCheck(Location location, RedundantBranch redundantBranch) { String sourceFile = classContext.getJavaClass().getSourceFileName(); MethodGen methodGen = classContext.getMethodGen(method); boolean isChecked = redundantBranch.firstValue.isChecked(); boolean wouldHaveBeenAKaboom = redundantBranch.firstValue.wouldHaveBeenAKaboom(); Location locationOfKaBoom = redundantBranch.firstValue.getLocationOfKaBoom(); boolean createdDeadCode = false; Edge infeasibleEdge = redundantBranch.infeasibleEdge; if (infeasibleEdge != null) { if (DEBUG) System.out.println("Check if " + redundantBranch + " creates dead code"); BasicBlock target = infeasibleEdge.getTarget(); // If the block is empty, it probably doesn't matter that it was killed. // FIXME: really, we should crawl the immediately reachable blocks // starting at the target block to see if any of them are dead and nonempty. boolean empty = !target.isExceptionThrower() && (target.isEmpty() || isGoto(target.getFirstInstruction().getInstruction())); if (DEBUG) System.out.println("Target block is " + (empty ? "empty" : "not empty")); if (!empty && !previouslyDeadBlocks.get(target.getId())) { if (DEBUG) System.out.println("target was alive previously"); // Block was not dead before the null pointer analysis. // See if it is dead now by inspecting the null value frame. // If it's TOP, then the block became dead. IsNullValueFrame invFrame = invDataflow.getStartFact(target); createdDeadCode = invFrame.isTop(); if (DEBUG) System.out.println("target is now " + (createdDeadCode ? "dead" : "alive")); } } int priority = LOW_PRIORITY; String warning; if (redundantBranch.secondValue == null) { if (redundantBranch.firstValue.isDefinitelyNull() ) { warning = "RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE"; } else { warning = "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"; } } else { boolean bothNull = redundantBranch.firstValue.isDefinitelyNull() && redundantBranch.secondValue.isDefinitelyNull(); if (bothNull) warning = "RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES"; else warning = "RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE"; if (redundantBranch.secondValue.isChecked()) isChecked = true; if (redundantBranch.secondValue.wouldHaveBeenAKaboom()) wouldHaveBeenAKaboom = true; } if (wouldHaveBeenAKaboom) { priority = HIGH_PRIORITY; warning = "RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE"; location = locationOfKaBoom; if (location == null) throw new NullPointerException("location of KaBoom is null"); } else if (isChecked) { // A non-kaboom redundant null check is medium priority only // if it creates dead code. priority = createdDeadCode ? NORMAL_PRIORITY : LOW_PRIORITY; } if (DEBUG) { System.out.println("RCN" + priority + " " + redundantBranch.firstValue + " =? " + redundantBranch.secondValue + " : " + warning ); if (location == null) System.out.println("location is null"); if (location.getHandle() == null) System.out.println("location handle is null"); if (isChecked) System.out.println("isChecked"); if (wouldHaveBeenAKaboom) System.out.println("wouldHaveBeenAKaboom"); if (createdDeadCode) System.out.println("createdDeadCode"); } BugInstance bugInstance = new BugInstance(this, warning, priority) .addClassAndMethod(methodGen, sourceFile) .addSourceLine(classContext, methodGen, sourceFile, location.getHandle()); if (FindBugsAnalysisFeatures.isRelaxedMode()) { WarningPropertySet propertySet = new WarningPropertySet(); WarningPropertyUtil.addPropertiesForLocation(propertySet, classContext, method, location); if (isChecked) propertySet.addProperty(NullDerefProperty.CHECKED_VALUE); if (wouldHaveBeenAKaboom) propertySet.addProperty(NullDerefProperty.WOULD_HAVE_BEEN_A_KABOOM); if (createdDeadCode) propertySet.addProperty(NullDerefProperty.CREATED_DEAD_CODE); propertySet.decorateBugInstance(bugInstance); priority = propertySet.computePriority(NORMAL_PRIORITY); bugInstance.setPriority(priority); } bugReporter.reportBug(bugInstance); } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/fbc2b8881b3f255814b4efcee6f8eec7419d4d36/FindNullDeref.java/clean/findbugs/src/java/edu/umd/cs/findbugs/detect/FindNullDeref.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1392,
3715,
15362,
2041,
1564,
12,
2735,
2117,
16,
4621,
15362,
7108,
19530,
7108,
13,
288,
202,
202,
780,
16338,
273,
667,
1042,
18,
588,
5852,
797,
7675,
588,
1830,
4771,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1392,
3715,
15362,
2041,
1564,
12,
2735,
2117,
16,
4621,
15362,
7108,
19530,
7108,
13,
288,
202,
202,
780,
16338,
273,
667,
1042,
18,
588,
5852,
797,
7675,
588,
1830,
4771,... |
if (root == null) return null; Object group = null; try { R.setVar("ome", root); R.setVar("name", name); R.setVar("leader", leader); R.setVar("contact", contact); Object ca = getChild(root, "CustomAttributes"); R.setVar("ca", ca); R.exec("import org.openmicroscopy.xml.st.GroupNode"); group = getChild(ca, "Group"); R.setVar("group", group); R.exec("group.setName(name)"); R.exec("group.setLeader(leader)"); R.exec("group.setContact(contact)"); } catch (ReflectException exc) { exc.printStackTrace(); } return group; | return setGroup(root, name, leader, contact, 0); | public static Object setGroup(Object root, String name, Object leader, Object contact) { if (root == null) return null; Object group = null; try { R.setVar("ome", root); R.setVar("name", name); R.setVar("leader", leader); R.setVar("contact", contact); Object ca = getChild(root, "CustomAttributes"); R.setVar("ca", ca); R.exec("import org.openmicroscopy.xml.st.GroupNode"); group = getChild(ca, "Group"); R.setVar("group", group); R.exec("group.setName(name)"); R.exec("group.setLeader(leader)"); R.exec("group.setContact(contact)"); } catch (ReflectException exc) { exc.printStackTrace(); } return group; } | 49800 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49800/91859a26506b8a1d312b398da2c3ecd94e02fa60/OMETools.java/clean/loci/formats/OMETools.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1033,
444,
1114,
12,
921,
1365,
16,
514,
508,
16,
565,
1033,
10302,
16,
1033,
5388,
13,
225,
288,
565,
309,
261,
3085,
422,
446,
13,
327,
446,
31,
565,
1033,
1041,
273,
446... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1033,
444,
1114,
12,
921,
1365,
16,
514,
508,
16,
565,
1033,
10302,
16,
1033,
5388,
13,
225,
288,
565,
309,
261,
3085,
422,
446,
13,
327,
446,
31,
565,
1033,
1041,
273,
446... |
n.putIntProp(Node.ISNUMBER_PROP, Node.RIGHT); markDCPNumberContext(arrayIndex); | if (!convertParameter(arrayIndex)) { n.putIntProp(Node.ISNUMBER_PROP, Node.RIGHT); } | int rewriteForNumberVariables(Node n) { switch (n.getType()) { case TokenStream.POP : { Node child = n.getFirstChild(); int type = rewriteForNumberVariables(child); if (type == TypeEvent.NumberType) n.putIntProp(Node.ISNUMBER_PROP, Node.BOTH); return TypeEvent.NoType; } case TokenStream.NUMBER : n.putIntProp(Node.ISNUMBER_PROP, Node.BOTH); return TypeEvent.NumberType; case TokenStream.GETVAR : { OptLocalVariable theVar = (OptLocalVariable)(n.getProp(Node.VARIABLE_PROP)); if (theVar != null) { if (inDirectCallFunction && theVar.isParameter()) { n.putIntProp(Node.ISNUMBER_PROP, Node.BOTH); return TypeEvent.NumberType; } else if (theVar.isNumber()) { n.putIntProp(Node.ISNUMBER_PROP, Node.BOTH); return TypeEvent.NumberType; } } return TypeEvent.NoType; } case TokenStream.INC : case TokenStream.DEC : { Node child = n.getFirstChild(); // will be a GETVAR or GETPROP if (child.getType() == TokenStream.GETVAR) { OptLocalVariable theVar = (OptLocalVariable)(child.getProp(Node.VARIABLE_PROP)); if ((theVar != null) && theVar.isNumber()) { n.putIntProp(Node.ISNUMBER_PROP, Node.BOTH); markDCPNumberContext(child); return TypeEvent.NumberType; } else return TypeEvent.NoType; } else return TypeEvent.NoType; } case TokenStream.SETVAR : { Node lChild = n.getFirstChild(); Node rChild = lChild.getNext(); int rType = rewriteForNumberVariables(rChild); OptLocalVariable theVar = (OptLocalVariable)(n.getProp(Node.VARIABLE_PROP)); if (inDirectCallFunction && theVar.isParameter()) { if (rType == TypeEvent.NumberType) { if (!convertParameter(rChild)) { n.putIntProp(Node.ISNUMBER_PROP, Node.BOTH); return TypeEvent.NumberType; } markDCPNumberContext(rChild); return TypeEvent.NoType; } else return rType; } else { if ((theVar != null) && theVar.isNumber()) { if (rType != TypeEvent.NumberType) { n.removeChild(rChild); Node newRChild = new Node(TokenStream.CONVERT, rChild); newRChild.putProp(Node.TYPE_PROP, Double.class); n.addChildToBack(newRChild); } n.putIntProp(Node.ISNUMBER_PROP, Node.BOTH); markDCPNumberContext(rChild); return TypeEvent.NumberType; } else { if (rType == TypeEvent.NumberType) { if (!convertParameter(rChild)) { n.removeChild(rChild); Node newRChild = new Node(TokenStream.CONVERT, rChild); newRChild.putProp(Node.TYPE_PROP, Object.class); n.addChildToBack(newRChild); } } return TypeEvent.NoType; } } } case TokenStream.RELOP : { Node lChild = n.getFirstChild(); Node rChild = lChild.getNext(); int lType = rewriteForNumberVariables(lChild); int rType = rewriteForNumberVariables(rChild); markDCPNumberContext(lChild); markDCPNumberContext(rChild); int op = n.getOperation(); if (op == TokenStream.INSTANCEOF || op == TokenStream.IN) { if (lType == TypeEvent.NumberType) { if (!convertParameter(lChild)) { n.removeChild(lChild); Node nuChild = new Node(TokenStream.CONVERT, lChild); nuChild.putProp(Node.TYPE_PROP, Object.class); n.addChildToFront(nuChild); } } if (rType == TypeEvent.NumberType) { if (!convertParameter(rChild)) { n.removeChild(rChild); Node nuChild = new Node(TokenStream.CONVERT, rChild); nuChild.putProp(Node.TYPE_PROP, Object.class); n.addChildToBack(nuChild); } } } else { if (convertParameter(lChild)) { if (convertParameter(rChild)) { return TypeEvent.NoType; } else { if (rType == TypeEvent.NumberType) { n.putIntProp(Node.ISNUMBER_PROP, Node.RIGHT); } } } else { if (convertParameter(rChild)) { if (lType == TypeEvent.NumberType) { n.putIntProp(Node.ISNUMBER_PROP, Node.LEFT); } } else { if (lType == TypeEvent.NumberType) { if (rType == TypeEvent.NumberType) { n.putIntProp(Node.ISNUMBER_PROP, Node.BOTH); } else { n.putIntProp(Node.ISNUMBER_PROP, Node.LEFT); } } else { if (rType == TypeEvent.NumberType) { n.putIntProp(Node.ISNUMBER_PROP, Node.RIGHT); } } } } } // we actually build a boolean value return TypeEvent.NoType; } case TokenStream.ADD : { Node lChild = n.getFirstChild(); Node rChild = lChild.getNext(); int lType = rewriteForNumberVariables(lChild); int rType = rewriteForNumberVariables(rChild); if (convertParameter(lChild)) { if (convertParameter(rChild)) { return TypeEvent.NoType; } else { if (rType == TypeEvent.NumberType) { n.putIntProp(Node.ISNUMBER_PROP, Node.RIGHT); } } } else { if (convertParameter(rChild)) { if (lType == TypeEvent.NumberType) { n.putIntProp(Node.ISNUMBER_PROP, Node.LEFT); } } else { if (lType == TypeEvent.NumberType) { if (rType == TypeEvent.NumberType) { n.putIntProp(Node.ISNUMBER_PROP, Node.BOTH); return TypeEvent.NumberType; } else { n.putIntProp(Node.ISNUMBER_PROP, Node.LEFT); } } else { if (rType == TypeEvent.NumberType) { n.putIntProp(Node.ISNUMBER_PROP, Node.RIGHT); } } } } return TypeEvent.NoType; } case TokenStream.BITXOR : case TokenStream.BITOR : case TokenStream.BITAND : case TokenStream.RSH : case TokenStream.LSH : case TokenStream.SUB : case TokenStream.MUL : case TokenStream.DIV : case TokenStream.MOD : { Node lChild = n.getFirstChild(); Node rChild = lChild.getNext(); int lType = rewriteForNumberVariables(lChild); int rType = rewriteForNumberVariables(rChild); markDCPNumberContext(lChild); markDCPNumberContext(rChild); if (lType == TypeEvent.NumberType) { if (rType == TypeEvent.NumberType) { n.putIntProp(Node.ISNUMBER_PROP, Node.BOTH); return TypeEvent.NumberType; } else { if (!convertParameter(rChild)) { n.removeChild(rChild); Node newRChild = new Node(TokenStream.CONVERT, rChild); newRChild.putProp(Node.TYPE_PROP, Double.class); n.addChildToBack(newRChild); n.putIntProp(Node.ISNUMBER_PROP, Node.BOTH); } return TypeEvent.NumberType; } } else { if (rType == TypeEvent.NumberType) { if (!convertParameter(lChild)) { n.removeChild(lChild); Node newLChild = new Node(TokenStream.CONVERT, lChild); newLChild.putProp(Node.TYPE_PROP, Double.class); n.addChildToFront(newLChild); n.putIntProp(Node.ISNUMBER_PROP, Node.BOTH); } return TypeEvent.NumberType; } else { if (!convertParameter(lChild)) { n.removeChild(lChild); Node newLChild = new Node(TokenStream.CONVERT, lChild); newLChild.putProp(Node.TYPE_PROP, Double.class); n.addChildToFront(newLChild); } if (!convertParameter(rChild)) { n.removeChild(rChild); Node newRChild = new Node(TokenStream.CONVERT, rChild); newRChild.putProp(Node.TYPE_PROP, Double.class); n.addChildToBack(newRChild); } n.putIntProp(Node.ISNUMBER_PROP, Node.BOTH); return TypeEvent.NumberType; } } } case TokenStream.SETELEM : { Node arrayBase = n.getFirstChild(); Node arrayIndex = arrayBase.getNext(); Node rValue = arrayIndex.getNext(); int baseType = rewriteForNumberVariables(arrayBase); if (baseType == TypeEvent.NumberType) {// can never happen ??? if (!convertParameter(arrayBase)) { n.removeChild(arrayBase); Node nuChild = new Node(TokenStream.CONVERT, arrayBase); nuChild.putProp(Node.TYPE_PROP, Object.class); n.addChildToFront(nuChild); } } int indexType = rewriteForNumberVariables(arrayIndex); if (indexType == TypeEvent.NumberType) { // setting the ISNUMBER_PROP signals the codegen // to use the scriptRuntime.setElem that takes // a double index n.putIntProp(Node.ISNUMBER_PROP, Node.LEFT); markDCPNumberContext(arrayIndex); } int rValueType = rewriteForNumberVariables(rValue); if (rValueType == TypeEvent.NumberType) { if (!convertParameter(rValue)) { n.removeChild(rValue); Node nuChild = new Node(TokenStream.CONVERT, rValue); nuChild.putProp(Node.TYPE_PROP, Object.class); n.addChildToBack(nuChild); } } return TypeEvent.NoType; } case TokenStream.GETELEM : { Node arrayBase = n.getFirstChild(); Node arrayIndex = arrayBase.getNext(); int baseType = rewriteForNumberVariables(arrayBase); if (baseType == TypeEvent.NumberType) {// can never happen ??? if (!convertParameter(arrayBase)) { n.removeChild(arrayBase); Node nuChild = new Node(TokenStream.CONVERT, arrayBase); nuChild.putProp(Node.TYPE_PROP, Object.class); n.addChildToFront(nuChild); } } int indexType = rewriteForNumberVariables(arrayIndex); if (indexType == TypeEvent.NumberType) { // setting the ISNUMBER_PROP signals the codegen // to use the scriptRuntime.getElem that takes // a double index n.putIntProp(Node.ISNUMBER_PROP, Node.RIGHT); markDCPNumberContext(arrayIndex); } return TypeEvent.NoType; } case TokenStream.CALL : { FunctionNode target = (FunctionNode)n.getProp(Node.DIRECTCALL_PROP); if (target != null) {/* we leave each child as a Number if it can be. The codegen will handle moving the pairs of parameters.*/ Node child = n.getFirstChild(); // the function rewriteForNumberVariables(child); child = child.getNext(); // the 'this' object rewriteForNumberVariables(child); child = child.getNext(); // the first arg while (child != null) { int type = rewriteForNumberVariables(child); if (type == TypeEvent.NumberType) { markDCPNumberContext(child); } child = child.getNext(); } return TypeEvent.NoType; } // else fall thru... } default : { Node child = n.getFirstChild(); while (child != null) { Node nextChild = child.getNext(); int type = rewriteForNumberVariables(child); if (type == TypeEvent.NumberType) { if (!convertParameter(child)) { n.removeChild(child); Node nuChild = new Node(TokenStream.CONVERT, child); nuChild.putProp(Node.TYPE_PROP, Object.class); if (nextChild == null) n.addChildToBack(nuChild); else n.addChildBefore(nuChild, nextChild); } } child = nextChild; } return TypeEvent.NoType; } } } | 51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/2660547deef560c4299f34446f254d473df361bd/Optimizer.java/buggy/js/rhino/src/org/mozilla/javascript/optimizer/Optimizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
509,
10738,
1290,
1854,
6158,
12,
907,
290,
13,
565,
288,
3639,
1620,
261,
82,
18,
588,
559,
10756,
288,
5411,
648,
3155,
1228,
18,
30374,
294,
288,
10792,
2029,
1151,
273,
290,
18,
588... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
509,
10738,
1290,
1854,
6158,
12,
907,
290,
13,
565,
288,
3639,
1620,
261,
82,
18,
588,
559,
10756,
288,
5411,
648,
3155,
1228,
18,
30374,
294,
288,
10792,
2029,
1151,
273,
290,
18,
588... |
public org.quickfix.field.UnderlyingStateOrProvinceOfIssue getUnderlyingStateOrProvinceOfIssue() throws FieldNotFound { org.quickfix.field.UnderlyingStateOrProvinceOfIssue value = new org.quickfix.field.UnderlyingStateOrProvinceOfIssue(); | public quickfix.field.UnderlyingStateOrProvinceOfIssue getUnderlyingStateOrProvinceOfIssue() throws FieldNotFound { quickfix.field.UnderlyingStateOrProvinceOfIssue value = new quickfix.field.UnderlyingStateOrProvinceOfIssue(); | public org.quickfix.field.UnderlyingStateOrProvinceOfIssue getUnderlyingStateOrProvinceOfIssue() throws FieldNotFound { org.quickfix.field.UnderlyingStateOrProvinceOfIssue value = new org.quickfix.field.UnderlyingStateOrProvinceOfIssue(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/OrderMassCancelRequest.java/buggy/src/java/src/quickfix/fix43/OrderMassCancelRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
1119,
1162,
626,
90,
2410,
951,
12956,
10833,
765,
6291,
1119,
1162,
626,
90,
2410,
951,
12956,
1435,
1216,
2286,
2768,
225,
288,
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,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
1119,
1162,
626,
90,
2410,
951,
12956,
10833,
765,
6291,
1119,
1162,
626,
90,
2410,
951,
12956,
1435,
1216,
2286,
2768,
225,
288,
23... |
Logger.minor(this, "Started counting items in database"); count = ((BtreeStats)chkDB.getStats(null)).getLeafNodeCount(); Logger.minor(this, "Counted "+count+" items in database"); }catch(DatabaseException ex){ Logger.minor(this, "Exception while counting items in database",ex); | Cursor c = chkDB_blockNum.openCursor(null,null); DatabaseEntry keyDBE = new DatabaseEntry(); DatabaseEntry dataDBE = new DatabaseEntry(); if(c.getLast(keyDBE,dataDBE,null)==OperationStatus.SUCCESS) { StoreBlock storeBlock = (StoreBlock) storeBlockTupleBinding.entryToObject(dataDBE); count = storeBlock.offset; } c.close(); }catch(DatabaseException ex){ex.printStackTrace();} count++; System.out.println("Count from database: "+count); long oCount = chkStore.length() / (dataBlockSize + headerBlockSize); if(oCount > count) { System.err.println("Count from file length: "+oCount); return oCount; | private long countCHKBlocks() { long count =0; try{ Logger.minor(this, "Started counting items in database"); count = ((BtreeStats)chkDB.getStats(null)).getLeafNodeCount(); Logger.minor(this, "Counted "+count+" items in database"); }catch(DatabaseException ex){ Logger.minor(this, "Exception while counting items in database",ex); } return count; } | 52909 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52909/fc1107153611521b8802dc2e6ed37430b0f7d687/BerkeleyDBFreenetStore.java/clean/src/freenet/store/BerkeleyDBFreenetStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1525,
1056,
1792,
47,
6450,
1435,
288,
377,
202,
5748,
1056,
273,
20,
31,
377,
202,
698,
95,
377,
202,
202,
3328,
18,
17364,
12,
2211,
16,
315,
9217,
22075,
1516,
316,
2063,
8863,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1525,
1056,
1792,
47,
6450,
1435,
288,
377,
202,
5748,
1056,
273,
20,
31,
377,
202,
698,
95,
377,
202,
202,
3328,
18,
17364,
12,
2211,
16,
315,
9217,
22075,
1516,
316,
2063,
8863,... |
} catch (BDDException x) { | } catch (ReorderException x) { | int bdd_ite(int f, int g, int h) { int res; int numReorder = 1; CHECKa(f, bddfalse); CHECKa(g, bddfalse); CHECKa(h, bddfalse); if (itecache == null) itecache = new OpCache3(cachesize); // ite_rec() if (singlecache == null) singlecache = new OpCache1(cachesize); // not_rec() again : for (;;) { try { INITREF(); if (numReorder == 0) bdd_disable_reorder(); res = ite_rec(f, g, h); if (numReorder == 0) bdd_enable_reorder(); } catch (BDDException x) { bdd_checkreorder(); numReorder--; continue again; } break; } checkresize(); return res; } | 5661 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5661/89cb49994eb868d156357d12efa8aa38e96ac325/MicroFactory.java/buggy/JavaBDD/net/sf/javabdd/MicroFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
509,
324,
449,
67,
1137,
12,
474,
284,
16,
509,
314,
16,
509,
366,
13,
288,
3639,
509,
400,
31,
3639,
509,
818,
426,
1019,
273,
404,
31,
3639,
14565,
69,
12,
74,
16,
324,
449,
5743,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
509,
324,
449,
67,
1137,
12,
474,
284,
16,
509,
314,
16,
509,
366,
13,
288,
3639,
509,
400,
31,
3639,
509,
818,
426,
1019,
273,
404,
31,
3639,
14565,
69,
12,
74,
16,
324,
449,
5743,... |
ConcreteMarker marker = getMarker(next); if (marker != null) { result.add(marker); } } | ConcreteMarker marker = getMarker(next); if (marker != null) { result.add(marker); } } | public MarkerList findMarkers(Collection ofIMarker) { List result = new ArrayList(ofIMarker.size()); Iterator iter = ofIMarker.iterator(); while (iter.hasNext()) { IMarker next = (IMarker) iter.next(); ConcreteMarker marker = getMarker(next); if (marker != null) { result.add(marker); } } return new MarkerList(result); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/2bc2f7e05493c8f842d6d73cc7cb85357120cefd/MarkerList.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
14742,
682,
1104,
21644,
12,
2532,
434,
3445,
1313,
264,
13,
288,
3639,
987,
563,
273,
394,
2407,
12,
792,
3445,
1313,
264,
18,
1467,
10663,
3639,
4498,
1400,
273,
434,
3445,
1313,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14742,
682,
1104,
21644,
12,
2532,
434,
3445,
1313,
264,
13,
288,
3639,
987,
563,
273,
394,
2407,
12,
792,
3445,
1313,
264,
18,
1467,
10663,
3639,
4498,
1400,
273,
434,
3445,
1313,
... |
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; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/NewOrderMultileg.java/buggy/src/java/src/quickfix/fix44/NewOrderMultileg.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,
... |
error = true; | if (! catchErrors(parent)) { this.error = true; } | public NodeVisitor enter(Node parent, Node n) { if (Report.should_report(Report.visit, 5)) Report.report(5, "enter(" + n + ")"); try { return (ErrorHandlingVisitor) enterCall(parent, n); } catch (SemanticException e) { if (e.getMessage() != null) { Position position = e.position(); if (position == null) { position = n.position(); } errorQueue().enqueue(ErrorInfo.SEMANTIC_ERROR, e.getMessage(), position); } else { // silent error; these should be thrown only // when the error has already been reported } error = true; return enterError(n); } } | 11982 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11982/3783ad675c798ccef5413f0f2898d800f00e3d96/ErrorHandlingVisitor.java/buggy/src/polyglot/visit/ErrorHandlingVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2029,
7413,
6103,
12,
907,
982,
16,
2029,
290,
13,
288,
3639,
309,
261,
4820,
18,
13139,
67,
6006,
12,
4820,
18,
11658,
16,
1381,
3719,
202,
565,
8706,
18,
6006,
12,
25,
16,
315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2029,
7413,
6103,
12,
907,
982,
16,
2029,
290,
13,
288,
3639,
309,
261,
4820,
18,
13139,
67,
6006,
12,
4820,
18,
11658,
16,
1381,
3719,
202,
565,
8706,
18,
6006,
12,
25,
16,
315... |
"Id Engine", "Global Time", | "Id Engine", "Global Time(ms)", | private void initGUI() { try { { chooserSave = new JFileChooser(); chooserSave.setDialogTitle("Save Scilab Result"); } { splitMain1 = new JSplitPane(); getContentPane().add(splitMain1, BorderLayout.CENTER); splitMain1.setOrientation(JSplitPane.VERTICAL_SPLIT); splitMain1.setOneTouchExpandable(true); splitMain1.setDividerLocation(520); splitMain1.setDividerSize(7); { splitMain2 = new JSplitPane(); splitMain1.add(splitMain2, JSplitPane.TOP); splitMain2.setOneTouchExpandable(true); splitMain2.setDividerLocation(160); splitMain2.setDividerSize(7); { scrollTreeEngine = new JScrollPane(); splitMain2.add(scrollTreeEngine, JSplitPane.LEFT); { rootEngine = new DefaultMutableTreeNode("Scilab Engines"); treeEngine = new JTree(rootEngine); scrollTreeEngine.setViewportView(treeEngine); treeEngine.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { treeEngineMouseClicked(evt); } }); } } { splitTask1 = new JSplitPane(); splitTask1.setOrientation(JSplitPane.VERTICAL_SPLIT); splitTask1.setDividerSize(7); splitTask1.setOneTouchExpandable(true); splitMain2.add(splitTask1, JSplitPane.RIGHT); { splitTask2 = new JSplitPane(); splitTask2.setOneTouchExpandable(true); splitTask2.setOrientation(JSplitPane.VERTICAL_SPLIT); splitTask2.setDividerSize(7); splitTask1.add(splitTask2, JSplitPane.TOP); { pnlTaskWait = new JPanel(); splitTask2.add(pnlTaskWait, JSplitPane.TOP); BorderLayout pnlTaskWaitLayout = new BorderLayout(); pnlTaskWait.setLayout(pnlTaskWaitLayout); pnlTaskWait.setSize(700, 180); pnlTaskWait .setPreferredSize(new java.awt.Dimension( 702, 150)); { lblTaskWait = new JLabel(); pnlTaskWait.add(lblTaskWait, BorderLayout.NORTH); lblTaskWait.setText("Pending Tasks:"); } { scrollTaskWait = new JScrollPane(); pnlTaskWait.add(scrollTaskWait, BorderLayout.CENTER); scrollTaskWait.setPreferredSize(new java.awt.Dimension(690, 135)); { tableTaskWaitModel = new DefaultTableModel( null, new String[] { "Id Task", "Script", "Priority", "Awaited Time", "State"}); tableTaskWait = new JTable() { public boolean isCellEditable(int rowIndex, int vColIndex) { return false; } }; scrollTaskWait.setViewportView(tableTaskWait); scrollTaskWait.getViewport().setBackground(Color.WHITE); tableTaskWait.setModel(tableTaskWaitModel); tableTaskWait.getColumnModel().getColumn(4).setCellRenderer(new IconRenderer()); tableTaskWait.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); tableTaskWait .addMouseListener(new MouseAdapter() { public void mouseClicked( MouseEvent evt) { tableTaskWaitMouseClicked(evt); } }); } } { pnlBtnTaskWait = new JPanel(); pnlTaskWait.add(pnlBtnTaskWait, BorderLayout.SOUTH); FlowLayout pnlBtnTaskWaitLayout = new FlowLayout(); pnlBtnTaskWaitLayout .setAlignment(FlowLayout.RIGHT); pnlBtnTaskWait.setLayout(pnlBtnTaskWaitLayout); { btnCancelTaskWait = new JButton(); pnlBtnTaskWait.add(btnCancelTaskWait); btnCancelTaskWait.setText("Cancel"); btnCancelTaskWait.setToolTipText("Cancel pending tasks "); btnCancelTaskWait .addActionListener(new ActionListener() { public void actionPerformed( ActionEvent evt) { btnCancelTaskWaitActionPerformed(evt); } }); } { btnClearTaskWait = new JButton(); pnlBtnTaskWait.add(btnClearTaskWait); btnClearTaskWait.setText("Clear"); btnClearTaskWait.setSize(70, 22); btnClearTaskWait.setToolTipText("Clear cancelled tasks"); btnClearTaskWait .addActionListener(new ActionListener() { public void actionPerformed( ActionEvent evt) { btnClearTaskWaitActionPerformed(evt); } }); } } } { pnlTaskRun = new JPanel(); splitTask2.add(pnlTaskRun, JSplitPane.BOTTOM); BorderLayout pnlTaskRunLayout = new BorderLayout(); pnlTaskRun.setLayout(pnlTaskRunLayout); pnlTaskRun.setSize(700, 180); pnlTaskRun.setPreferredSize(new java.awt.Dimension( 702, 150)); { lblTaskRun = new JLabel(); pnlTaskRun.add(lblTaskRun, BorderLayout.NORTH); lblTaskRun.setText("Executing Tasks:"); } { scrollTaskRun = new JScrollPane(); pnlTaskRun.add(scrollTaskRun, BorderLayout.CENTER); scrollTaskRun.setPreferredSize(new java.awt.Dimension(690, 135)); //scrollTaskRun.setSize(692, 104); { tableTaskRunModel = new DefaultTableModel( null, new String[] { "Id Task", "Script", "Id Engine", "Global Time", "State"}); tableTaskRun = new JTable() { public boolean isCellEditable(int rowIndex, int vColIndex) { return false; } }; scrollTaskRun.setViewportView(tableTaskRun); scrollTaskRun.getViewport().setBackground(Color.WHITE); tableTaskRun.setModel(tableTaskRunModel); tableTaskRun.getColumnModel().getColumn(4).setCellRenderer(new IconRenderer()); tableTaskRun.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); tableTaskRun.addMouseListener(new MouseAdapter() { public void mouseClicked( MouseEvent evt) { tableTaskRunMouseClicked(evt); } }); } } { pnlBtnTaskRun = new JPanel(); pnlTaskRun.add(pnlBtnTaskRun, BorderLayout.SOUTH); FlowLayout pnlBtnTaskRunLayout = new FlowLayout(); pnlBtnTaskRunLayout .setAlignment(FlowLayout.RIGHT); pnlBtnTaskRun.setLayout(pnlBtnTaskRunLayout); { btnKillTaskRun = new JButton(); pnlBtnTaskRun.add(btnKillTaskRun); btnKillTaskRun.setText("Kill"); btnKillTaskRun.setSize(70, 22); btnKillTaskRun.setToolTipText("Kill executing tasks"); btnKillTaskRun.addActionListener(new ActionListener() { public void actionPerformed( ActionEvent evt) { btnKillTaskRunActionPerformed(evt); } }); } { btnClearTaskRun = new JButton(); pnlBtnTaskRun.add(btnClearTaskRun); btnClearTaskRun.setText("Clear"); btnClearTaskRun.setSize(70, 22); btnClearTaskRun.setToolTipText("Clear killed tasks"); btnClearTaskRun.addActionListener(new ActionListener() { public void actionPerformed( ActionEvent evt) { btnClearTaskRunActionPerformed(evt); } }); } } } } { pnlTaskEnd = new JPanel(); splitTask1.add(pnlTaskEnd, JSplitPane.BOTTOM); BorderLayout pnlTaskEndLayout = new BorderLayout(); pnlTaskEnd.setLayout(pnlTaskEndLayout); pnlTaskEnd.setSize(700, 180); pnlTaskEnd.setPreferredSize(new java.awt.Dimension( 702, 150)); { lblTaskEnd = new JLabel(); pnlTaskEnd.add(lblTaskEnd, BorderLayout.NORTH); lblTaskEnd.setText("Terminated Tasks:"); } { scrollTaskEnd = new JScrollPane(); pnlTaskEnd.add(scrollTaskEnd,BorderLayout.CENTER); scrollTaskEnd.setPreferredSize(new java.awt.Dimension(690, 135)); { tableTaskEndModel = new DefaultTableModel( null, new String[] { "Id Task", "Script", "Execution Time", "Global Time", "State"}); tableTaskEnd = new JTable() { public boolean isCellEditable(int rowIndex, int vColIndex) { return false; } }; scrollTaskEnd.setViewportView(tableTaskEnd); scrollTaskEnd.getViewport().setBackground(Color.WHITE); tableTaskEnd.setModel(tableTaskEndModel); tableTaskEnd.getColumnModel().getColumn(4).setCellRenderer(new IconRenderer()); tableTaskEnd.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); tableTaskEnd.addMouseListener(new MouseAdapter() { public void mouseClicked( MouseEvent evt) { tableTaskEndMouseClicked(evt); } }); } } { pnlBtnTaskEnd = new JPanel(); pnlTaskEnd.add(pnlBtnTaskEnd, BorderLayout.SOUTH); FlowLayout pnlBtnTaskEndLayout = new FlowLayout(); pnlBtnTaskEndLayout .setAlignment(FlowLayout.RIGHT); pnlBtnTaskEnd.setLayout(pnlBtnTaskEndLayout); { btnSaveTaskEnd = new JButton(); pnlBtnTaskEnd.add(btnSaveTaskEnd); btnSaveTaskEnd.setText("Save"); btnSaveTaskEnd.setSize(70, 22); btnSaveTaskEnd.setToolTipText("Save results"); btnSaveTaskEnd .addActionListener(new ActionListener() { public void actionPerformed( ActionEvent evt) { btnSaveTaskEndActionPerformed(evt); } }); } { btnDeleteTaskEnd = new JButton(); pnlBtnTaskEnd.add(btnDeleteTaskEnd); btnDeleteTaskEnd.setText("Delete"); btnDeleteTaskEnd.setSize(70, 22); btnDeleteTaskEnd.setToolTipText("Delete result"); btnDeleteTaskEnd .addActionListener(new ActionListener() { public void actionPerformed( ActionEvent evt) { btnDeleteTaskEndActionPerformed(evt); } }); } } } } } { pnlMainLog = new JPanel(); splitMain1.add(pnlMainLog, JSplitPane.BOTTOM); BorderLayout pnlMainLogLayout = new BorderLayout(); pnlMainLog.setLayout(pnlMainLogLayout); pnlMainLog .setPreferredSize(new java.awt.Dimension(790, 348)); pnlMainLog.setSize(790, 200); { lblLog = new JLabel(); pnlMainLog.add(lblLog, BorderLayout.NORTH); lblLog.setText("Operations:"); } { scrollLog = new JScrollPane(); pnlMainLog.add(scrollLog, BorderLayout.CENTER); { txtLog = new JTextArea(); scrollLog.setViewportView(txtLog); } } { pnlBtnLog = new JPanel(); pnlMainLog.add(pnlBtnLog, BorderLayout.SOUTH); FlowLayout pnlBtnLogLayout = new FlowLayout(); pnlBtnLogLayout.setAlignment(FlowLayout.RIGHT); pnlBtnLog.setLayout(pnlBtnLogLayout); { btnClearLog = new JButton(); pnlBtnLog.add(btnClearLog); btnClearLog.setText("Clear"); btnClearLog.setToolTipText("Clear operation logs"); btnClearLog.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { btnClearLogActionPerformed(evt); } }); } } } } { menuBar = new JMenuBar(); setJMenuBar(menuBar); { menuCommand = new JMenu(); menuBar.add(menuCommand); menuCommand.setText("Command"); { menuEngine = new JMenu(); menuCommand.add(menuEngine); menuEngine.setText("New Engine"); { itemDescriptor = new JMenuItem(); menuEngine.add(itemDescriptor); itemDescriptor.setText("From Descriptor"); itemDescriptor .addActionListener(new ActionListener() { public void actionPerformed( ActionEvent evt) { itemDescriptorActionPerformed(evt); } }); } { itemDesktopGrid = new JMenuItem(); menuEngine.add(itemDesktopGrid); itemDesktopGrid.setText("From Desktop Grid"); //to modify itemDesktopGrid.setEnabled(false); itemDesktopGrid .addActionListener(new ActionListener() { public void actionPerformed( ActionEvent evt) { itemDesktopGridActionPerformed(evt); } }); } } { itemTask = new JMenuItem(); menuCommand.add(itemTask); itemTask.setText("New Task"); itemTask.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { itemTaskActionPerformed(evt); } }); } { itemExit = new JMenuItem(); menuCommand.add(itemExit); itemExit.setText("Exit"); itemExit.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { System.out.println("itemExit.actionPerformed, event="+ evt); if(service != null){ service.exit(); } System.exit(0); } }); } } } { chooserDescriptor = new JFileChooser(); FileFilter filter = new FileFilter() { public boolean accept(File f) { if (f == null) { return false; } if (f.isDirectory()) { return true; } return f.getName().endsWith(".xml"); } public String getDescription() { return "XML Filter"; } }; chooserDescriptor.setApproveButtonText("Deploy"); chooserDescriptor.setFileFilter(filter); { pnlPreview = new JPanel(); BorderLayout pnlPreviewLayout = new BorderLayout(); pnlPreview.setLayout(pnlPreviewLayout); pnlPreview.setBorder(BorderFactory.createTitledBorder("")); { lblVn = new JLabel(); lblVn.setText("Select Virtual Node"); pnlPreview.add(lblVn, BorderLayout.NORTH); } { scrollPreview = new JScrollPane(); scrollPreview.setPreferredSize(new java.awt.Dimension(90, 80)); scrollPreview.setBorder(BorderFactory.createLineBorder(Color.BLACK)); pnlPreview.add(scrollPreview, BorderLayout.CENTER); { listPreviewModel = new DefaultComboBoxModel(); listPreview = new JList(); listPreview.setModel(listPreviewModel); scrollPreview.setViewportView(listPreview); } } } chooserDescriptor.setAccessory(pnlPreview); chooserDescriptor.addPropertyChangeListener( new PropertyChangeListener(){ public void propertyChange(PropertyChangeEvent evt) { if(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY.equals(evt.getPropertyName())) { File newFile = (File) evt.getNewValue(); if(newFile != null) { String path = newFile.getAbsolutePath(); String arrayNameVn[] = SciDeployEngine.getListVirtualNode(path); listPreviewModel.removeAllElements(); for(int i=0; i<arrayNameVn.length; i++){ listPreviewModel.addElement(arrayNameVn[i]); } } } } }); } setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); this.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent evt) { if(service != null){ service.exit(); } System.exit(0); } }); pack(); Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); Dimension f = this.getSize(); int x = (d.width - f.width) / 2; int y = (d.height - f.height) / 2; this.setBounds(x, y, f.width, f.height ); this.setIconImage(new ImageIcon(getClass().getResource("img/icone.png")).getImage()); this.setTitle("Grid Scilab ToolBox"); this.setSize(812, 744); } catch (Exception e) { e.printStackTrace(); } } | 14315 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14315/21261276b03c1a4e5e11ffe02bf227ac59b3e3d1/SciFrame.java/buggy/src/org/objectweb/proactive/ext/scilab/gui/SciFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1208,
43,
5370,
1435,
288,
202,
202,
698,
288,
1082,
202,
95,
9506,
202,
2599,
13164,
4755,
273,
394,
804,
812,
17324,
5621,
9506,
202,
2599,
13164,
4755,
18,
542,
6353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
43,
5370,
1435,
288,
202,
202,
698,
288,
1082,
202,
95,
9506,
202,
2599,
13164,
4755,
273,
394,
804,
812,
17324,
5621,
9506,
202,
2599,
13164,
4755,
18,
542,
6353,
... |
} | } | public int doStartTag() throws JspException { StringBuffer results = new StringBuffer(); HttpServletRequest request = (HttpServletRequest)pageContext.getRequest(); ServletContext servletContext = pageContext.getServletContext(); ModuleConfig config = ModuleUtils.getInstance().getModuleConfig(request, servletContext); ValidatorResources resources = (ValidatorResources) pageContext.getAttribute( ValidatorPlugIn.VALIDATOR_KEY + config.getPrefix(), PageContext.APPLICATION_SCOPE); Locale locale = TagUtils.getInstance().getUserLocale(pageContext, null); Form form = resources.getForm(locale, formName); if (form != null) { if ("true".equalsIgnoreCase(dynamicJavascript)) { MessageResources messages = (MessageResources) pageContext.getAttribute( bundle + config.getPrefix(), PageContext.APPLICATION_SCOPE); List lActions = new ArrayList(); List lActionMethods = new ArrayList(); // Get List of actions for this Form for (Iterator i = form.getFields().iterator(); i.hasNext();) { Field field = (Field) i.next(); for (Iterator x = field.getDependencyList().iterator(); x.hasNext();) { Object o = x.next(); if (o != null && !lActionMethods.contains(o)) { lActionMethods.add(o); } } } // Create list of ValidatorActions based on lActionMethods for (Iterator i = lActionMethods.iterator(); i.hasNext();) { String depends = (String) i.next(); ValidatorAction va = resources.getValidatorAction(depends); // throw nicer NPE for easier debugging if (va == null) { throw new NullPointerException( "Depends string \"" + depends + "\" was not found in validator-rules.xml."); } String javascript = va.getJavascript(); if (javascript != null && javascript.length() > 0) { lActions.add(va); } else { i.remove(); } } Collections.sort(lActions, new Comparator() { public int compare(Object o1, Object o2) { ValidatorAction va1 = (ValidatorAction) o1; ValidatorAction va2 = (ValidatorAction) o2; if ((va1.getDepends() == null || va1.getDepends().length() == 0) && (va2.getDepends() == null || va2.getDepends().length() == 0)) { return 0; } else if ( (va1.getDepends() != null && va1.getDepends().length() > 0) && (va2.getDepends() == null || va2.getDepends().length() == 0)) { return 1; } else if ( (va1.getDepends() == null || va1.getDepends().length() == 0) && (va2.getDepends() != null && va2.getDepends().length() > 0)) { return -1; } else { return va1.getDependencyList().size() - va2.getDependencyList().size(); } } }); String methods = null; for (Iterator i = lActions.iterator(); i.hasNext();) { ValidatorAction va = (ValidatorAction) i.next(); if (methods == null) { methods = va.getMethod() + "(form)"; } else { methods += " && " + va.getMethod() + "(form)"; } } results.append(getJavascriptBegin(methods)); for (Iterator i = lActions.iterator(); i.hasNext();) { ValidatorAction va = (ValidatorAction) i.next(); String jscriptVar = null; String functionName = null; if (va.getJsFunctionName() != null && va.getJsFunctionName().length() > 0) { functionName = va.getJsFunctionName(); } else { functionName = va.getName(); } if (isStruts11()) { results.append(" function " + functionName + " () { \n"); } else { results.append(" function " + formName + "_" + functionName + " () { \n"); } for (Iterator x = form.getFields().iterator(); x.hasNext();) { Field field = (Field) x.next(); // Skip indexed fields for now until there is a good way to handle // error messages (and the length of the list (could retrieve from scope?)) if (field.isIndexed() || field.getPage() != page || !field.isDependency(va.getName())) { continue; } String message = Resources.getMessage(messages, locale, va, field); message = (message != null) ? message : ""; jscriptVar = this.getNextVar(jscriptVar); results.append( " this." + jscriptVar + " = new Array(\"" + getFormClientId() + ":" + field.getKey() + "\", \"" + message + "\", "); results.append("new Function (\"varName\", \""); Map vars = field.getVars(); // Loop through the field's variables. Iterator varsIterator = vars.keySet().iterator(); while (varsIterator.hasNext()) { String varName = (String) varsIterator.next(); Var var = (Var) vars.get(varName); String varValue = var.getValue(); String jsType = var.getJsType(); // skip requiredif variables field, fieldIndexed, fieldTest, fieldValue if (varName.startsWith("field")) { continue; } if (Var.JSTYPE_INT.equalsIgnoreCase(jsType)) { results.append( "this." + varName + "=" + ValidatorUtils.replace( varValue, "\\", "\\\\") + "; "); } else if (Var.JSTYPE_REGEXP.equalsIgnoreCase(jsType)) { results.append( "this." + varName + "=/" + ValidatorUtils.replace( varValue, "\\", "\\\\") + "/; "); } else if (Var.JSTYPE_STRING.equalsIgnoreCase(jsType)) { results.append( "this." + varName + "='" + ValidatorUtils.replace( varValue, "\\", "\\\\") + "'; "); // So everyone using the latest format doesn't need to change their xml files immediately. } else if ("mask".equalsIgnoreCase(varName)) { results.append( "this." + varName + "=/" + ValidatorUtils.replace( varValue, "\\", "\\\\") + "/; "); } else { results.append( "this." + varName + "='" + ValidatorUtils.replace( varValue, "\\", "\\\\") + "'; "); } } results.append(" return this[varName];\"));\n"); } results.append(" } \n\n"); } } else if ("true".equalsIgnoreCase(staticJavascript)) { results.append(this.getStartElement()); if ("true".equalsIgnoreCase(htmlComment)) { results.append(htmlBeginComment); } } } if ("true".equalsIgnoreCase(staticJavascript)) { results.append(getJavascriptStaticMethods(resources)); } if (form != null && ("true".equalsIgnoreCase(dynamicJavascript) || "true".equalsIgnoreCase(staticJavascript))) { results.append(getJavascriptEnd()); } JspWriter writer = pageContext.getOut(); try { writer.print(results.toString()); } catch (IOException e) { throw new JspException(e.getMessage()); } return (EVAL_BODY_TAG); } | 48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/38f2e40392f85661d745d657cc7df428c2fc6653/JavascriptValidatorTag.java/buggy/faces/src/main/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
741,
30512,
1435,
1216,
27485,
288,
3639,
6674,
1686,
273,
394,
6674,
5621,
3639,
9984,
590,
273,
261,
2940,
18572,
13,
2433,
1042,
18,
588,
691,
5621,
3639,
22717,
20474,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
741,
30512,
1435,
1216,
27485,
288,
3639,
6674,
1686,
273,
394,
6674,
5621,
3639,
9984,
590,
273,
261,
2940,
18572,
13,
2433,
1042,
18,
588,
691,
5621,
3639,
22717,
20474,
273,
... |
schemas= new Vector(); i++; while (i < argv.length && !(arg = argv[i]).startsWith("-")) { schemas.addElement(arg); i++; } if (schemas.size() == 0) { printUsage(); System.exit(1); } | public static void main(String argv[]) { // too few parameters if (argv.length < 2) { printUsage(); System.exit(1); } XMLParserConfiguration parserConfiguration = null; String arg = null; int i = 0; arg = argv[i]; if (arg.equals("-p")) { // get parser name i++; String parserName = argv[i]; // create parser try { ClassLoader cl = ObjectFactory.findClassLoader(); parserConfiguration = (XMLParserConfiguration)ObjectFactory.newInstance(parserName, cl); } catch (Exception e) { parserConfiguration = null; System.err.println("error: Unable to instantiate parser configuration ("+parserName+")"); } i++; } arg = argv[i]; // process -d Vector externalDTDs = null; if (arg.equals("-d")) { externalDTDs= new Vector(); i++; while (i < argv.length && !(arg = argv[i]).startsWith("-")) { externalDTDs.addElement(arg); i++; } // has to be at least one dTD or schema , and there has to be other parameters if (externalDTDs.size() == 0) { printUsage(); System.exit(1); } } // process -f/F arg = argv[i]; boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING; if (arg.equals("-f")) { schemaFullChecking = true; i++; arg = argv[i]; } else if (arg.equals("-F")) { schemaFullChecking = false; i++; arg = argv[i]; } Vector schemas = null; if (arg.equals("-a")) { if(externalDTDs != null) { printUsage(); System.exit(1); } // process -a: schema files schemas= new Vector(); i++; while (i < argv.length && !(arg = argv[i]).startsWith("-")) { schemas.addElement(arg); i++; } // has to be at least one dTD or schema , and there has to be other parameters if (schemas.size() == 0) { printUsage(); System.exit(1); } } // process -i: instance files, if any Vector ifiles = null; if (i < argv.length) { if (!arg.equals("-i")) { printUsage(); System.exit(1); } i++; ifiles = new Vector(); while (i < argv.length && !(arg = argv[i]).startsWith("-")) { ifiles.addElement(arg); i++; } // has to be at least one instance file, and there has to be no more // parameters if (ifiles.size() == 0 || i != argv.length) { printUsage(); System.exit(1); } } // now we have all our arguments. We only // need to parse the DTD's/schemas, put them // in a grammar pool, possibly instantiate an // appropriate configuration, and we're on our way. SymbolTable sym = new SymbolTable(BIG_PRIME); XMLGrammarPreparser preparser = new XMLGrammarPreparser(sym); XMLGrammarPoolImpl grammarPool = new XMLGrammarPoolImpl(); boolean isDTD = false; if(externalDTDs != null) { preparser.registerPreparser(XMLGrammarDescription.XML_DTD, null); isDTD = true; } else if(schemas != null) { preparser.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null); isDTD = false; } else { System.err.println("No schema or DTD specified!"); System.exit(1); } preparser.setProperty(GRAMMAR_POOL, grammarPool); preparser.setFeature(NAMESPACES_FEATURE_ID, true); preparser.setFeature(VALIDATION_FEATURE_ID, true); // note we can set schema features just in case... preparser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true); preparser.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking); // parse the grammar... try { if(isDTD) { for (i = 0; i < externalDTDs.size(); i++) { Grammar g = preparser.preparseGrammar(XMLGrammarDescription.XML_DTD, stringToXIS((String)externalDTDs.elementAt(i))); // we don't really care about g; grammarPool will take care of everything. } } else { // must be schemas! for (i = 0; i < schemas.size(); i++) { Grammar g = preparser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA, stringToXIS((String)schemas.elementAt(i))); // we don't really care about g; grammarPool will take care of everything. } } } catch (Exception e) { e.printStackTrace(); System.exit(1); } // Now we have a grammar pool and a SymbolTable; just // build a configuration and we're on our way! if(parserConfiguration == null) { parserConfiguration = new StandardParserConfiguration(sym, grammarPool); } else { // set GrammarPool and SymbolTable... parserConfiguration.setProperty(SYMBOL_TABLE, sym); parserConfiguration.setProperty(GRAMMAR_POOL, grammarPool); } // now must reset features, unfortunately: try{ parserConfiguration.setFeature(NAMESPACES_FEATURE_ID, true); parserConfiguration.setFeature(VALIDATION_FEATURE_ID, true); // now we can still do schema features just in case, // so long as it's our configuraiton...... parserConfiguration.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true); parserConfiguration.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking); } catch (Exception e) { e.printStackTrace(); System.exit(1); } // then for each instance file, try to validate it if (ifiles != null) { try { for (i = 0; i < ifiles.size(); i++) { parserConfiguration.parse(stringToXIS((String)ifiles.elementAt(i))); } } catch (Exception e) { e.printStackTrace(); System.exit(1); } } } // main(String[]) | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/b49592a2d36e6c9101794589cf77fa813b379f74/XMLGrammarBuilder.java/buggy/samples/xni/XMLGrammarBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
5261,
63,
5717,
288,
3639,
368,
4885,
11315,
1472,
3639,
309,
261,
19485,
18,
2469,
411,
576,
13,
288,
5411,
1172,
5357,
5621,
5411,
2332,
18,
8593,
12,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
5261,
63,
5717,
288,
3639,
368,
4885,
11315,
1472,
3639,
309,
261,
19485,
18,
2469,
411,
576,
13,
288,
5411,
1172,
5357,
5621,
5411,
2332,
18,
8593,
12,
2... | |
public org.quickfix.field.UnsolicitedIndicator getUnsolicitedIndicator() throws FieldNotFound { org.quickfix.field.UnsolicitedIndicator value = new org.quickfix.field.UnsolicitedIndicator(); | public quickfix.field.UnsolicitedIndicator getUnsolicitedIndicator() throws FieldNotFound { quickfix.field.UnsolicitedIndicator value = new quickfix.field.UnsolicitedIndicator(); | public org.quickfix.field.UnsolicitedIndicator getUnsolicitedIndicator() throws FieldNotFound { org.quickfix.field.UnsolicitedIndicator value = new org.quickfix.field.UnsolicitedIndicator(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/SecurityStatus.java/buggy/src/java/src/quickfix/fix44/SecurityStatus.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
984,
87,
1415,
16261,
13140,
10833,
87,
1415,
16261,
13140,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
984,
87,
1415,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
984,
87,
1415,
16261,
13140,
10833,
87,
1415,
16261,
13140,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
984,
87,
1415,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.