rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
JMenu languageMenu = new JMenu(JFritz.getMessage("language_menu"));
public JMenuBar createMenu() { String menu_text = JFritz.PROGRAM_NAME; if (JFritz.runsOn() == "mac") menu_text = "Ablage"; JMenu jfritzMenu = new JMenu(menu_text); // JMenu editMenu = new JMenu(JFritz.getMessage("edit_menu")); JMenu optionsMenu = new JMenu(JFritz.getMessage("options_menu")); JMenu helpMenu = new JMenu(JFritz.getMessage("help_menu")); JMenu lnfMenu = new JMenu(JFritz.getMessage("lnf_menu")); JMenu importMenu = new JMenu("Importieren..."); JMenu exportMenu = new JMenu(JFritz.getMessage("export_menu")); JMenu viewMenu = new JMenu(JFritz.getMessage("view_menu")); JMenuItem item = new JMenuItem(JFritz.getMessage("fetchlist"), 'a'); item.setActionCommand("fetchList"); item.addActionListener(this); jfritzMenu.add(item); item = new JMenuItem(JFritz.getMessage("reverse_lookup"), 'l'); item.setActionCommand("reverselookup"); item.addActionListener(this); jfritzMenu.add(item); item = new JMenuItem("Anrufliste drucken/speichern"); item.setActionCommand("print_callerlist"); item.addActionListener(this); jfritzMenu.add(item); item = new JMenuItem(JFritz.getMessage("delete_fritzbox_callerlist")); item.setActionCommand("delete_fritzbox_callerlist"); item.setMnemonic(KeyEvent.VK_F); item.addActionListener(this); jfritzMenu.add(item); item = new JMenuItem(JFritz.getMessage("backup")); item.setActionCommand("backup"); item.addActionListener(this); jfritzMenu.add(item); if (JFritz.runsOn().startsWith("Windows")) { item = new JMenuItem("Kontakte aus Outlook importieren"); item.setActionCommand("import_outlook"); item.addActionListener(this); importMenu.add(item); } item = new JMenuItem(JFritz.getMessage("import_callerlist_csv"), 'i'); item.setActionCommand("import_callerlist_csv"); item.addActionListener(this); importMenu.add(item); item = new JMenuItem(JFritz.getMessage("phonebook_import")); item.setActionCommand("phonebook_import"); item.addActionListener(this); importMenu.add(item); item = new JMenuItem(JFritz.getMessage("import_contacts_thunderbird_csv")); item.setActionCommand("import_contacts_thunderbird_csv"); item.addActionListener(this); importMenu.add(item); jfritzMenu.add(importMenu); item = new JMenuItem(JFritz.getMessage("export_csv"), 'c'); item.setActionCommand("export_csv"); item.addActionListener(this); exportMenu.add(item); item = new JMenuItem(JFritz.getMessage("export_csv_phonebook")); item.setActionCommand("export_phonebook"); item.addActionListener(this); exportMenu.add(item); jfritzMenu.add(exportMenu); if (JFritz.runsOn() != "mac") { jfritzMenu.add(new JSeparator()); item = new JMenuItem(JFritz.getMessage("prog_exit"), 'x'); // item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, // ActionEvent.ALT_MASK)); item.setActionCommand("exit"); item.addActionListener(this); jfritzMenu.add(item); } item = new JMenuItem(JFritz.getMessage("help_content"), 'h'); item.setActionCommand("help"); item.addActionListener(this); helpMenu.add(item); item = new JMenuItem(JFritz.getMessage("jfritz_website"), 'w'); item.setActionCommand("website"); item.addActionListener(this); helpMenu.add(item); if (JFritz.runsOn() != "mac") { helpMenu.add(new JSeparator()); item = new JMenuItem(JFritz.getMessage("prog_info"), 'i'); item.setActionCommand("about"); item.addActionListener(this); helpMenu.add(item); } LookAndFeelInfo[] lnfs = UIManager.getInstalledLookAndFeels(); ButtonGroup lnfgroup = new ButtonGroup(); for (int i = 0; i < lnfs.length; i++) { JRadioButtonMenuItem rbmi = new JRadioButtonMenuItem(lnfs[i] .getName()); lnfMenu.add(rbmi); rbmi.setSelected(UIManager.getLookAndFeel().getClass().getName() .equals(lnfs[i].getClassName())); rbmi.putClientProperty("lnf name", lnfs[i]); rbmi.addItemListener(this); lnfgroup.add(rbmi); } optionsMenu.add(lnfMenu); if (JFritz.runsOn() != "mac") { item = new JMenuItem(JFritz.getMessage("config"), 'e'); item.setActionCommand("config"); item.addActionListener(this); optionsMenu.add(item); } item = new JMenuItem(JFritz.getMessage("callerlist"), null); item.setActionCommand("callerlist"); item.addActionListener(this); viewMenu.add(item); item = new JMenuItem(JFritz.getMessage("phonebook"), null); item.setActionCommand("phonebook"); item.addActionListener(this); viewMenu.add(item); item = new JMenuItem(JFritz.getMessage("quickdials"), null); item.setActionCommand("quickdial"); item.addActionListener(this); viewMenu.add(item); menu = new JMenuBar(); menu.add(jfritzMenu); menu.add(optionsMenu); menu.add(viewMenu); menu.add(helpMenu); return menu; }
7476 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7476/5415468d9a3c0bc608e2084b951c394611647ad5/JFritzWindow.java/buggy/jfritz/src/de/moonflower/jfritz/JFritzWindow.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 46, 4599, 2653, 4599, 273, 394, 804, 4599, 12, 46, 42, 583, 94, 18, 24906, 2932, 4923, 67, 5414, 7923, 1769, 282, 804, 4599, 5190, 46, 4599, 2653, 4599, 273, 394, 804, 4599, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 46, 4599, 2653, 4599, 273, 394, 804, 4599, 12, 46, 42, 583, 94, 18, 24906, 2932, 4923, 67, 5414, 7923, 1769, 282, 804, 4599, 5190, 46, 4599, 2653, 4599, 273, 394, 804, 4599, ...
geneIdentifier = new String(getAttributeValue(srcGeneName, "name"));
String tmp = getAttributeValue(srcGeneName, "name"); if ((taxonId == 7227) && (!tmp.startsWith("CG"))) { notCG = tmp; } else { geneIdentifier = tmp; }
protected Collection translateItem(Item srcItem) throws ObjectStoreException, InterMineException { // This Item should be an EntryType and only have proteins associated with one organism. if (!(SRC_NS + "Entry").equals(srcItem.getClassName())) { throw new IllegalArgumentException("Attempted to translate and Uniprot source Item that" + " is not of class " + SRC_NS + "Entry"); } // First things first: find out the taxonid of the organism of this entry. int taxonId = 0; List organismList = getItemsInCollection(srcItem.getCollection("organisms")); Iterator organismIter = organismList.iterator(); while (organismIter.hasNext()) { // Drosophila melanogaster = 7227 // Caenorhabditis elegans 6239 // Anopheles gambiae = 7165 Item organism = (Item) organismIter.next(); Iterator dbRefIter = getItemsInCollection( organism.getCollection("dbReferences")).iterator(); while (dbRefIter.hasNext()) { Item dbReference = (Item) dbRefIter.next(); String type = getAttributeValue(dbReference, "type"); if ("NCBI Taxonomy".equals(type)) { String taxonString = getAttributeValue(dbReference, "id"); if (taxonId != 0) { throw new IllegalStateException("Attempting to set taxon id to " + taxonString + " when it is already " + taxonId); } taxonId = Integer.parseInt(taxonString); } } } if (taxonId != 0) { Set retval = new HashSet(); Reference organismReference = new Reference("organism", getOrganismId(taxonId)); // 1. create Protein, same for all organisms // <entry> Item protein = createItem(tgtNs + "Protein", ""); // find name and set all names as synonyms List proteinNames = getItemsInCollection(srcItem.getCollection("names")); String proteinName = (String) getAttributeValue((Item) proteinNames.get(0), "name"); protein.addAttribute(new Attribute("identifier", proteinName)); protein.addReference(organismReference); retval.add(createSynonym(protein.getIdentifier(), "identifier", proteinName, getDataSourceId("UniProt"))); // find primary accession and set others as synonyms <entry><accession>* List srcAccessions = getItemsInCollection(srcItem.getCollection("accessions")); if (srcAccessions.isEmpty()) { // do not create store Protein if no primary accession LOG.info("Entry " + proteinName + " does not have any accessions"); return Collections.EMPTY_SET; } else { // primary accession is first in list Item srcPrimaryAccession = (Item) srcAccessions.get(0); protein.addAttribute(new Attribute("primaryAccession", getAttributeValue( srcPrimaryAccession, "accession"))); // all accessions should be Synonyms Iterator srcAccIter = srcAccessions.iterator(); while (srcAccIter.hasNext()) { Item srcAccession = (Item) srcAccIter.next(); String srcAccessionString = getAttributeValue(srcAccession, "accession"); retval.add(createSynonym(protein.getIdentifier(), "accession", srcAccessionString, getDataSourceId("UniProt"))); } } // add UniProt Database to evidence collection ReferenceList evidence = new ReferenceList("evidence", new ArrayList()); evidence.addRefId(getDataSourceId("UniProt")); protein.addCollection(evidence); // 2. first name should be protein name, all should be Synonyms // <entry><protein><name>* Item srcProtein = ItemHelper.convert(srcItemReader.getItemById(srcItem .getReference("protein").getRefId())); if (srcProtein != null) { List srcProteinNames = getItemsInCollection(srcProtein.getCollection("names")); Iterator srcProtNameIter = srcProteinNames.iterator(); while (srcProtNameIter.hasNext()) { Item srcProteinName = (Item) srcProtNameIter.next(); String srcProteinNameStr = getAttributeValue(srcProteinName, "name"); if (!protein.hasAttribute("name")) { protein.setAttribute("name", srcProteinNameStr); } String srcProteinNameEvidence = getAttributeValue(srcProteinName, "evidence"); if (srcProteinNameEvidence != null) { srcProteinNameStr += " (Evidence " + srcProteinNameEvidence + ")"; } retval.add(createSynonym(protein.getIdentifier(), "symbol", srcProteinNameStr, getDataSourceId("UniProt"))); } } // 3. get collection of Comments // <entry><comment>* List srcComments = getItemsInCollection(srcItem.getCollection("comments")); ReferenceList comments = new ReferenceList("comments", new ArrayList()); Iterator srcComIter = srcComments.iterator(); while (srcComIter.hasNext()) { Item srcComment = (Item) srcComIter.next(); String srcCommentType = getAttributeValue(srcComment, "type"); String srcCommentText = getAttributeValue(srcComment, "text"); if ((srcCommentType != null) && (srcCommentText != null)) { Item comment = createItem(tgtNs + "Comment", ""); comment.addAttribute(new Attribute("type", srcCommentType)); comment.addAttribute(new Attribute("text", srcCommentText)); comment.addReference(uniprotDataSetRef); comments.addRefId(comment.getIdentifier()); retval.add(comment); } } if (comments.getRefIds().size() > 0) { protein.addCollection(comments); } // 4. create a collection of Publications related to this protein // <entry><reference>* List srcReferences = getItemsInCollection(srcItem.getCollection("references")); ReferenceList publications = null; Iterator srcRefIter = srcReferences.iterator(); while (srcRefIter.hasNext()) { Item srcReference = (Item) srcRefIter.next(); Item srcCitation = ItemHelper.convert(srcItemReader.getItemById(srcReference .getReference("citation").getRefId())); List srcDbReferences = getItemsInCollection(srcCitation .getCollection("dbReferences")); Iterator srcDbRefIter = srcDbReferences.iterator(); while (srcDbRefIter.hasNext()) { Item srcDbReference = (Item) srcDbRefIter.next(); String type = getAttributeValue(srcDbReference, "type"); if ("PubMed".equals(type)) { String pubMedString = new String(getAttributeValue(srcDbReference, "id")); String publicationId = (String) pubMedIdToPublicationId .get(pubMedString); pubLinkCount++; if (publicationId == null) { Item publication = createItem(tgtNs + "Publication", ""); publication.addAttribute(new Attribute("pubMedId", pubMedString)); retval.add(publication); publicationId = publication.getIdentifier(); pubMedIdToPublicationId.put(pubMedString, publicationId); if (pubMedIdToPublicationId.size() % 100 == 0) { LOG.info("Processed " + pubMedIdToPublicationId.size() + " publications, with " + pubLinkCount + " references to publications"); } } if (publications == null) { publications = new ReferenceList("publications", new ArrayList()); protein.addCollection(publications); } publications.addRefId(publicationId); } } } // 5. create a Sequence object and reference from Protein // <entry><sequence> Reference seqRef = srcItem.getReference("sequence"); if (seqRef != null) { Item srcSeq = ItemHelper.convert(srcItemReader.getItemById(seqRef.getRefId())); if (srcSeq != null) { Item sequence = createItem(tgtNs + "Sequence", ""); String residues = srcSeq.getAttribute("sequence").getValue(); sequence.addAttribute(new Attribute("residues", residues)); sequence.addAttribute(new Attribute("length", "" + residues.length())); retval.add(sequence); protein.addReference(new Reference("sequence", sequence.getIdentifier())); } } // TODO many dbReference types are present in uniprot records - e.g. Pfam, InterPro. // Specifc code could be add to create additional objects // 6. now try to create reference to gene, choice of identifier is organism specific // <entry><gene>* // <entry><dbReference> // a protein can be related to multiple genes List srcGenes = getItemsInCollection(srcItem.getCollection("genes")); ReferenceList geneCollection = null; Iterator srcGeneIter = srcGenes.iterator(); while (srcGeneIter.hasNext()) { Item srcGene = (Item) srcGeneIter.next(); List srcGeneNames = getItemsInCollection(srcGene.getCollection("names")); // Gene.identifier = <entry><gene><name type="ORF"> String geneIdentifier = null; // Gene.name = <entry><gene><name type="primary"> String primaryGeneName = null; Set geneNames = new HashSet(); { Iterator srcGeneNameIter = srcGeneNames.iterator(); while (srcGeneNameIter.hasNext()) { Item srcGeneName = (Item) srcGeneNameIter.next(); if ("primary".equals(getAttributeValue(srcGeneName, "type"))) { primaryGeneName = new String(getAttributeValue(srcGeneName, "name")); } else if ("ORF".equals(getAttributeValue(srcGeneName, "type"))) { geneIdentifier = new String(getAttributeValue(srcGeneName, "name")); } geneNames.add(new String(getAttributeValue(srcGeneName, "name"))); } } String dbId = null; boolean createGene = false; // geneOrganismDbId = <entry><dbReference><type="FlyBase/WormBase/.."> // where designation = primary gene name String geneOrganismDbId = null; if (taxonId == 7227) { // D. melanogaster geneOrganismDbId = getDataSourceReferenceValue(srcItem, "FlyBase", geneNames); // For fly data use CGxxx as key instead of FBgnxxx if (geneIdentifier != null) { createGene = true; dbId = getDataSourceId("FlyBase"); } } else if (taxonId == 6239) { // C. elegans geneOrganismDbId = getDataSourceReferenceValue(srcItem, "WormBase", geneNames); if (geneOrganismDbId != null) { createGene = true; dbId = getDataSourceId("WormBase"); } } else if (taxonId == 180454) { // A. gambiae str. PEST // no organismDbId and no specific dbxref to enembl - assume that geneIdentifier // is always ensembl gene stable id and set organismDbId to be identifier if (geneIdentifier != null) { createGene = true; geneOrganismDbId = geneIdentifier; dbId = getDataSourceId("ensembl"); } } // output gene identifier details if (outputIdentifiers) { try { fw.write(taxonId + "\tprotein: " + proteinName + "\tname: " + primaryGeneName + "\tidentifier: " + geneIdentifier + "\tgeneOrganismDbId: " + geneOrganismDbId + System.getProperty("line.separator")); } catch (IOException e) { throw new InterMineException(e); } } // uniprot data source has primary key of Gene.organismDbId // only create gene if a value was found if (createGene) { // may alrady have created this gene String geneItemId = (String) geneIdentifierToId.get(geneOrganismDbId); ReferenceList geneSynonyms = new ReferenceList("synonyms", new ArrayList()); // UniProt sometimes has same identifier paired with two organismDbIds // causes problems merging other data sources. Simple check to prevent // creating a gene with a duplicate identifier. // log problem genes boolean isDuplicateIdentifier = false; if ((geneItemId == null) && geneIdentifiers.contains(geneIdentifier)) { LOG.warn("already created a gene for identifier: " + geneIdentifier + " with different organismDbId, discarding this one"); isDuplicateIdentifier = true; } if ((geneItemId == null) && !isDuplicateIdentifier) { Item gene = createItem(tgtNs + "Gene", ""); if (geneOrganismDbId != null) { if (geneOrganismDbId.equals("")) { LOG.info("geneOrganismDbId was empty string"); } gene.addAttribute(new Attribute("organismDbId", geneOrganismDbId)); Item synonym = createSynonym(gene.getIdentifier(), "identifier", geneOrganismDbId, dbId); geneSynonyms.addRefId(synonym.getIdentifier()); retval.add(synonym); } if (geneIdentifier != null) { gene.addAttribute(new Attribute("identifier", geneIdentifier)); // don't create duplicate synonym if (!geneIdentifier.equals(geneOrganismDbId)) { Item synonym = createSynonym(gene.getIdentifier(), "identifier", geneIdentifier, dbId); geneSynonyms.addRefId(synonym.getIdentifier()); retval.add(synonym); } // keep a track of non-null gene identifiers geneIdentifiers.add(geneIdentifier); } // Problem with gene names for drosophila - ignore if (primaryGeneName != null && taxonId != 7227) { gene.addAttribute(new Attribute("symbol", primaryGeneName)); } gene.addReference(organismReference); // add UniProt Database to evidence collection ReferenceList evidence1 = new ReferenceList("evidence", new ArrayList()); evidence1.addRefId(getDataSourceId("UniProt")); gene.addCollection(evidence1); // everything in <entry><gene><name>* becomes a Synonym Iterator srcGeneNameIter = srcGeneNames.iterator(); while (srcGeneNameIter.hasNext()) { Item srcGeneName = (Item) srcGeneNameIter.next(); String type = getAttributeValue(srcGeneName, "type"); String symbol = getAttributeValue(srcGeneName, "name"); // synonym already created for ORF as identifer if (!type.equals("ORF")) { Item synonym = createSynonym(gene.getIdentifier(), (type.equals("primary") || type.equals("synonym")) ? "symbol" : type, symbol, getDataSourceId("UniProt")); geneSynonyms.addRefId(synonym.getIdentifier()); retval.add(synonym); } } gene.addCollection(geneSynonyms); geneItemId = gene.getIdentifier(); geneIdentifierToId.put(geneOrganismDbId, geneItemId); retval.add(gene); } // TODO untidy - sould just do this check once if (!isDuplicateIdentifier) { if (geneCollection == null) { geneCollection = new ReferenceList("genes", new ArrayList()); protein.addCollection(geneCollection); } geneCollection.addRefId(geneItemId); } } } retval.add(protein); return retval; } return Collections.EMPTY_SET; }
29158 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/29158/4c092d94cec09d7e876d3c879247662089ed8c95/UniprotDataTranslator.java/clean/flymine/model/uniprot/src/java/org/flymine/dataconversion/UniprotDataTranslator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 2200, 4204, 1180, 12, 1180, 1705, 1180, 13, 3639, 1216, 1033, 21151, 16, 5294, 49, 558, 503, 288, 3639, 368, 1220, 4342, 1410, 506, 392, 3841, 559, 471, 1338, 1240, 450, 31856, 3627...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2200, 4204, 1180, 12, 1180, 1705, 1180, 13, 3639, 1216, 1033, 21151, 16, 5294, 49, 558, 503, 288, 3639, 368, 1220, 4342, 1410, 506, 392, 3841, 559, 471, 1338, 1240, 450, 31856, 3627...
PDFColorSpace theColorSpace,
PDFDeviceColorSpace theColorSpace,
public PDFShading makeShading(PDFResourceContext res, int theShadingType, PDFColorSpace theColorSpace, List theBackground, List theBBox, boolean theAntiAlias, List theDomain, List theMatrix, PDFFunction theFunction) { // make Shading of Type 1 PDFShading shading = new PDFShading(theShadingType, theColorSpace, theBackground, theBBox, theAntiAlias, theDomain, theMatrix, theFunction); PDFShading oldshad = getDocument().findShading(shading); if (oldshad == null) { getDocument().registerObject(shading); } else { shading = oldshad; } // add this shading to resources if (res != null) { res.getPDFResources().addShading(shading); } else { getDocument().getResources().addShading(shading); } return (shading); }
5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/cbc3059c396fb572727bcb6afbdd70b8967107f1/PDFFactory.java/clean/src/java/org/apache/fop/pdf/PDFFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 12667, 1555, 14968, 1221, 1555, 14968, 12, 17508, 1420, 1042, 400, 16, 509, 326, 1555, 14968, 559, 16, 21394, 12667, 3654, 2957, 3819, 326, 2957, 3819, 16, 21394, 987, 326, 8199, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 12667, 1555, 14968, 1221, 1555, 14968, 12, 17508, 1420, 1042, 400, 16, 509, 326, 1555, 14968, 559, 16, 21394, 12667, 3654, 2957, 3819, 326, 2957, 3819, 16, 21394, 987, 326, 8199, 16, ...
throw new ReturnJump(eval(iVisited.getValueNode()).toRubyObject());
throw new ReturnJump(eval(iVisited.getValueNode()));
public void visitReturnNode(ReturnNode iVisited) { throw new ReturnJump(eval(iVisited.getValueNode()).toRubyObject()); }
46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/f235ab756f32ea9496f8f880066b46ad95ebb692/EvaluateVisitor.java/buggy/org/jruby/evaluator/EvaluateVisitor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 3757, 990, 907, 12, 990, 907, 277, 30019, 13, 288, 3639, 604, 394, 2000, 26743, 12, 8622, 12, 77, 30019, 18, 24805, 907, 1435, 10019, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 3757, 990, 907, 12, 990, 907, 277, 30019, 13, 288, 3639, 604, 394, 2000, 26743, 12, 8622, 12, 77, 30019, 18, 24805, 907, 1435, 10019, 565, 289, 2, -100, -100, -100, -100, -10...
m_currentTest.setParallel(parallel);
if(XmlSuite.PARALLEL_METHODS.equals(parallel) || XmlSuite.PARALLEL_NONE.equals(parallel) || "true".equals(parallel) || "false".equals(parallel)) { m_currentTest.setParallel(parallel); } else { Utils.log("Parser", 1, "[WARN] Unknown value of attribute 'parallel' for test '" + name + "': '" + parallel + "'"); }
private void xmlTest(boolean start, Attributes attributes) { if (start) { String name = attributes.getValue("name"); m_currentTest = new XmlTest(m_currentSuite); m_currentTestParameters = new HashMap<String, String>(); m_currentTest.setName(name); String verbose = attributes.getValue("verbose"); if (null != verbose) { m_currentTest.setVerbose(Integer.parseInt(verbose)); } String jUnit = attributes.getValue("junit"); if (null != jUnit) { m_currentTest.setJUnit(new Boolean(jUnit).booleanValue()); } String parallel = attributes.getValue("parallel"); if (null != parallel) { m_currentTest.setParallel(parallel); } String annotations = attributes.getValue("annotations"); if (null != annotations) { m_currentTest.setAnnotations(annotations); } m_inTest = true; } else { if (null != m_currentTestParameters && m_currentTestParameters.size() > 0) { m_currentTest.setParameters(m_currentTestParameters); } if (null != m_currentClasses) { m_currentTest.setXmlClasses(m_currentClasses); } m_currentClasses = null; m_currentTest = null; m_currentTestParameters = null; m_inTest = false; } }
50502 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50502/fd3d62963585c7d537041ba7ed53ebda5eef31c4/TestNGContentHandler.java/buggy/src/main/org/testng/xml/TestNGContentHandler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 918, 2025, 4709, 12, 6494, 787, 16, 9055, 1677, 13, 288, 565, 309, 261, 1937, 13, 288, 1377, 514, 508, 273, 1677, 18, 24805, 2932, 529, 8863, 1377, 312, 67, 2972, 4709, 273, 394, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 918, 2025, 4709, 12, 6494, 787, 16, 9055, 1677, 13, 288, 565, 309, 261, 1937, 13, 288, 1377, 514, 508, 273, 1677, 18, 24805, 2932, 529, 8863, 1377, 312, 67, 2972, 4709, 273, 394, ...
DotParser dp = new DotParser(input, m_nodes, m_edges); graphID = dp.parse(); setAppropriateNodeSize(); if(m_le!=null) { m_le.setNodeSize(paddedNodeWidth, nodeHeight); jBtLayout.setEnabled(false); layoutGraph(); }
DotParser dp = new DotParser(input, m_nodes, m_edges); graphID = dp.parse(); setAppropriateNodeSize(); if(m_le!=null) { m_le.setNodeSize(paddedNodeWidth, nodeHeight); jBtLayout.setEnabled(false); layoutGraph();
public void readDOT(Reader input) { DotParser dp = new DotParser(input, m_nodes, m_edges); graphID = dp.parse(); setAppropriateNodeSize(); if(m_le!=null) { m_le.setNodeSize(paddedNodeWidth, nodeHeight); jBtLayout.setEnabled(false); layoutGraph(); } }
6866 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6866/b0c04532afe908e8b2dbb20f5627ce038dca3a4d/GraphVisualizer.java/clean/gui/graphvisualizer/GraphVisualizer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 855, 17591, 12, 2514, 810, 13, 288, 202, 10412, 2678, 9986, 273, 394, 17502, 2678, 12, 2630, 16, 312, 67, 4690, 16, 312, 67, 8746, 1769, 202, 4660, 734, 273, 9986, 18, 2670, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17591, 12, 2514, 810, 13, 288, 202, 10412, 2678, 9986, 273, 394, 17502, 2678, 12, 2630, 16, 312, 67, 4690, 16, 312, 67, 8746, 1769, 202, 4660, 734, 273, 9986, 18, 2670, ...
setAccesskey(null);
private void evaluateExpressions() throws JspException { try { setAccesskey((String) evalAttr("accessKey", getAccesskey(), String.class)); } catch (NullAttributeException ex) { setAccesskey(null); } try { setAlt((String) evalAttr("alt", getAlt(), String.class)); } catch (NullAttributeException ex) { setAlt(null); } try { setAltKey((String) evalAttr("altKey", getAltKey(), String.class)); } catch (NullAttributeException ex) { setAltKey(null); } try { setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { setDisabled(false); } try { setOnblur((String) evalAttr("onblur", getOnblur(), String.class)); } catch (NullAttributeException ex) { setOnblur(null); } try { setOnchange((String) evalAttr("onchange", getOnchange(), String.class)); } catch (NullAttributeException ex) { setOnchange(null); } try { setOnclick((String) evalAttr("onclick", getOnclick(), String.class)); } catch (NullAttributeException ex) { setOnclick(null); } try { setOndblclick((String) evalAttr("ondblclick", getOndblclick(), String.class)); } catch (NullAttributeException ex) { setOndblclick(null); } try { setOnfocus((String) evalAttr("onfocus", getOnfocus(), String.class)); } catch (NullAttributeException ex) { setOnfocus(null); } try { setOnkeydown((String) evalAttr("onkeydown", getOnkeydown(), String.class)); } catch (NullAttributeException ex) { setOnkeydown(null); } try { setOnkeypress((String) evalAttr("onkeypress", getOnkeypress(), String.class)); } catch (NullAttributeException ex) { setOnkeypress(null); } try { setOnkeyup((String) evalAttr("onkeyup", getOnkeyup(), String.class)); } catch (NullAttributeException ex) { setOnkeyup(null); } try { setOnmousedown((String) evalAttr("onmousedown", getOnmousedown(), String.class)); } catch (NullAttributeException ex) { setOnmousedown(null); } try { setOnmousemove((String) evalAttr("onmousemove", getOnmousemove(), String.class)); } catch (NullAttributeException ex) { setOnmousemove(null); } try { setOnmouseout((String) evalAttr("onmouseout", getOnmouseout(), String.class)); } catch (NullAttributeException ex) { setOnmouseout(null); } try { setOnmouseover((String) evalAttr("onmouseover", getOnmouseover(), String.class)); } catch (NullAttributeException ex) { setOnmouseover(null); } try { setOnmouseup((String) evalAttr("onmouseup", getOnmouseup(), String.class)); } catch (NullAttributeException ex) { setOnmouseup(null); } try { setProperty((String) evalAttr("property", getProperty(), String.class)); } catch (NullAttributeException ex) { setProperty(null); } try { setStyle((String) evalAttr("style", getStyle(), String.class)); } catch (NullAttributeException ex) { setStyle(null); } try { setStyleClass((String) evalAttr("styleClass", getStyleClass(), String.class)); } catch (NullAttributeException ex) { setStyleClass(null); } try { setStyleId((String) evalAttr("styleId", getStyleId(), String.class)); } catch (NullAttributeException ex) { setStyleId(null); } try { setTabindex((String) evalAttr("tabindex", getTabindex(), String.class)); } catch (NullAttributeException ex) { setTabindex(null); } try { setTitle((String) evalAttr("title", getTitle(), String.class)); } catch (NullAttributeException ex) { setTitle(null); } try { setTitleKey((String) evalAttr("titleKey", getTitleKey(), String.class)); } catch (NullAttributeException ex) { setTitleKey(null); } try { setValue((String) evalAttr("value", getValue(), String.class)); } catch (NullAttributeException ex) { setValue(null); } }
48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/db064e19656421b94aaf753550935d95f44bd5f9/ELCancelTag.java/clean/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELCancelTag.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 5956, 8927, 1435, 1216, 27485, 288, 3639, 775, 288, 5411, 444, 1862, 856, 12443, 780, 13, 5302, 3843, 2932, 3860, 653, 3113, 21909, 856, 9334, 4766, 6647, 514, 18, 1106, 10019, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 5956, 8927, 1435, 1216, 27485, 288, 3639, 775, 288, 5411, 444, 1862, 856, 12443, 780, 13, 5302, 3843, 2932, 3860, 653, 3113, 21909, 856, 9334, 4766, 6647, 514, 18, 1106, 10019, ...
cfw.add(ByteCode.ALOAD_0); cfw.add(ByteCode.GETFIELD, currentCodegen.generatedClassName, Codegen.MAIN_SCRIPT_FIELD, mainCodegen.generatedClassSignature);
if (isTopLevel) { cfw.add(ByteCode.ALOAD_0); } else { cfw.add(ByteCode.ALOAD_0); cfw.add(ByteCode.GETFIELD, zeroArgClassName, Codegen.DIRECT_CALL_PARENT_FIELD, codegen.mainClassSignature); }
private void visitFunction(OptFunctionNode fn, int functionType) { String fnClassName = fn.getClassName(); cfw.add(ByteCode.NEW, fnClassName); // Call function constructor cfw.add(ByteCode.DUP); cfw.addALoad(variableObjectLocal); cfw.addALoad(contextLocal); // load 'cx' cfw.addInvoke(ByteCode.INVOKESPECIAL, fnClassName, "<init>", "(Lorg/mozilla/javascript/Scriptable;" +"Lorg/mozilla/javascript/Context;" +")V"); // Init mainScript field; cfw.add(ByteCode.DUP); cfw.add(ByteCode.ALOAD_0); cfw.add(ByteCode.GETFIELD, currentCodegen.generatedClassName, Codegen.MAIN_SCRIPT_FIELD, mainCodegen.generatedClassSignature); cfw.add(ByteCode.PUTFIELD, fnClassName, Codegen.MAIN_SCRIPT_FIELD, mainCodegen.generatedClassSignature); int directTargetIndex = fn.getDirectTargetIndex(); if (directTargetIndex >= 0) { cfw.add(ByteCode.DUP); cfw.add(ByteCode.ALOAD_0); cfw.add(ByteCode.GETFIELD, currentCodegen.generatedClassName, Codegen.MAIN_SCRIPT_FIELD, mainCodegen.generatedClassSignature); cfw.add(ByteCode.SWAP); cfw.add(ByteCode.PUTFIELD, mainCodegen.generatedClassName, Codegen.getDirectTargetFieldName(directTargetIndex), cfw.classNameToSignature(fn.getClassName())); } // Dup function reference for function expressions to have it // on top of the stack when initFunction returns if (functionType != FunctionNode.FUNCTION_STATEMENT) { cfw.add(ByteCode.DUP); } cfw.addPush(functionType); cfw.addALoad(variableObjectLocal); cfw.addALoad(contextLocal); // load 'cx' addOptRuntimeInvoke("initFunction", "(Lorg/mozilla/javascript/NativeFunction;" +"I" +"Lorg/mozilla/javascript/Scriptable;" +"Lorg/mozilla/javascript/Context;" +")V"); }
12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/3c9b84173796cf5a1eb1f786e5ba6af89b66fcab/Codegen.java/buggy/js/rhino/src/org/mozilla/javascript/optimizer/Codegen.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 3757, 2083, 12, 6179, 2083, 907, 2295, 16, 509, 445, 559, 13, 565, 288, 3639, 514, 2295, 3834, 273, 2295, 18, 588, 3834, 5621, 3639, 6080, 91, 18, 1289, 12, 3216, 1085, 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, 377, 3238, 918, 3757, 2083, 12, 6179, 2083, 907, 2295, 16, 509, 445, 559, 13, 565, 288, 3639, 514, 2295, 3834, 273, 2295, 18, 588, 3834, 5621, 3639, 6080, 91, 18, 1289, 12, 3216, 1085, 18, ...
_limiter.refillBandwidthQueues(inboundToAdd, outboundToAdd);
long maxBurstIn = ((_inboundBurstKBytesPerSecond-_inboundKBytesPerSecond)*1024*numMs)/1000; long maxBurstOut = ((_outboundBurstKBytesPerSecond-_outboundKBytesPerSecond)*1024*numMs)/1000; _limiter.refillBandwidthQueues(inboundToAdd, outboundToAdd, maxBurstIn, maxBurstOut);
private boolean updateQueues(long now) { long numMs = (now - _lastRefillTime); if (_log.shouldLog(Log.INFO)) _log.info("Updating bandwidth after " + numMs + " (status: " + _limiter.getStatus().toString() + " rate in=" + _inboundKBytesPerSecond + ", out=" + _outboundKBytesPerSecond +")"); if (numMs >= REPLENISH_FREQUENCY) { long inboundToAdd = (1024*_inboundKBytesPerSecond * numMs)/1000; long outboundToAdd = (1024*_outboundKBytesPerSecond * numMs)/1000; if (inboundToAdd < 0) inboundToAdd = 0; if (outboundToAdd < 0) outboundToAdd = 0; if (_inboundKBytesPerSecond <= 0) { _limiter.setInboundUnlimited(true); inboundToAdd = 0; } else { _limiter.setInboundUnlimited(false); } if (_outboundKBytesPerSecond <= 0) { _limiter.setOutboundUnlimited(true); outboundToAdd = 0; } else { _limiter.setOutboundUnlimited(false); } _limiter.refillBandwidthQueues(inboundToAdd, outboundToAdd); if (_log.shouldLog(Log.DEBUG)) { _log.debug("Adding " + inboundToAdd + " bytes to inboundAvailable"); _log.debug("Adding " + outboundToAdd + " bytes to outboundAvailable"); } return true; } else { if (_log.shouldLog(Log.WARN)) _log.warn("Refresh delay too fast (" + numMs + ")"); return false; } }
3808 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3808/24bad8e4bbb44f0148e118f584047e5149fff555/FIFOBandwidthRefiller.java/buggy/router/java/src/net/i2p/router/transport/FIFOBandwidthRefiller.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1250, 1089, 17428, 12, 5748, 2037, 13, 288, 3639, 1525, 818, 6947, 273, 261, 3338, 300, 389, 2722, 1957, 737, 950, 1769, 3639, 309, 261, 67, 1330, 18, 13139, 1343, 12, 1343, 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, 3238, 1250, 1089, 17428, 12, 5748, 2037, 13, 288, 3639, 1525, 818, 6947, 273, 261, 3338, 300, 389, 2722, 1957, 737, 950, 1769, 3639, 309, 261, 67, 1330, 18, 13139, 1343, 12, 1343, 18, 5...
case LayoutPackage.BLOCK: return createBlock(); case LayoutPackage.CLIENT_AREA: return createClientArea(); case LayoutPackage.LABEL_BLOCK: return createLabelBlock(); case LayoutPackage.LEGEND: return createLegend(); case LayoutPackage.PLOT: return createPlot(); case LayoutPackage.TITLE_BLOCK: return createTitleBlock();
case LayoutPackage.BLOCK: return createBlock(); case LayoutPackage.CLIENT_AREA: return createClientArea(); case LayoutPackage.LABEL_BLOCK: return createLabelBlock(); case LayoutPackage.LEGEND: return createLegend(); case LayoutPackage.PLOT: return createPlot(); case LayoutPackage.TITLE_BLOCK: return createTitleBlock();
public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case LayoutPackage.BLOCK: return createBlock(); case LayoutPackage.CLIENT_AREA: return createClientArea(); case LayoutPackage.LABEL_BLOCK: return createLabelBlock(); case LayoutPackage.LEGEND: return createLegend(); case LayoutPackage.PLOT: return createPlot(); case LayoutPackage.TITLE_BLOCK: return createTitleBlock(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } }
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/LayoutFactoryImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/layout/impl/LayoutFactoryImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 8091, 752, 12, 5720, 425, 797, 13, 565, 288, 3639, 1620, 261, 73, 797, 18, 588, 13860, 734, 10756, 3639, 288, 5411, 648, 9995, 2261, 18, 11403, 30, 327, 752, 1768, 5621, 5411, 648...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 8091, 752, 12, 5720, 425, 797, 13, 565, 288, 3639, 1620, 261, 73, 797, 18, 588, 13860, 734, 10756, 3639, 288, 5411, 648, 9995, 2261, 18, 11403, 30, 327, 752, 1768, 5621, 5411, 648...
protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, HttpServletRequest request) { // set the dialog type setParamDialogtype(DIALOG_TYPE); // fill the parameter values in the get/set methods fillParamValues(request); if (CmsStringUtil.isEmptyOrWhitespaceOnly(getParamPage()) || !PAGE_LIST.contains(getParamPage())) { // ensure a valid page is set setParamPage(PAGE_ARRAY[0]); } // fill the widget map defineWidgets(); fillWidgetValues(request); // set the action for the JSP switch if (DIALOG_SAVE.equals(getParamAction())) { // ok button pressed setAction(ACTION_SAVE); List errors = commitWidgetValues(); if (errors.size() > 0) { Iterator i = errors.iterator(); while (i.hasNext()) { Exception e = (Exception)i.next(); System.err.println(e.getMessage()); if (e.getCause() != null) { System.err.println("Cause: " + e.getCause().getMessage()); } } setAction(ACTION_DEFAULT); } } else if (DIALOG_OK.equals(getParamAction())) { // ok button pressed setAction(ACTION_CANCEL); } else if (DIALOG_CANCEL.equals(getParamAction())) { // cancel button pressed setAction(ACTION_CANCEL); } else if (EDITOR_ACTION_ELEMENT_ADD.equals(getParamAction())) { setAction(ACTION_ELEMENT_ADD); actionToggleElement(); setAction(ACTION_DEFAULT); } else if (EDITOR_ACTION_ELEMENT_REMOVE.equals(getParamAction())) { setAction(ACTION_ELEMENT_REMOVE); actionToggleElement(); setAction(ACTION_DEFAULT); } else if (DIALOG_BACK.equals(getParamAction())) { setAction(ACTION_DEFAULT); List errors = commitWidgetValues(PAGE_ARRAY[1]); if (errors.size() > 0) { setAction(ACTION_ERROR); try { includeErrorpage(this, (Throwable)errors.get(0)); } catch (JspException e) { // ignore } return; } setParamPage(PAGE_ARRAY[0]); } else if (DIALOG_CONTINUE.equals(getParamAction())) { setAction(ACTION_DEFAULT); List errors = commitWidgetValues(PAGE_ARRAY[0]); if (errors.size() > 0) { setAction(ACTION_ERROR); try { includeErrorpage(this, (Throwable)errors.get(0)); } catch (JspException e) { // ignore } return; } setParamPage(PAGE_ARRAY[1]); } else { // set the default action setAction(ACTION_DEFAULT); } // save the current state of the job (may be changed because of the widget values) getSettings().setDialogObject(m_jobInfo); }
51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/41dcaa9d1a1b8f8fa6c1dd9a04fc8532eb83ebb7/CmsAdminWidgetDemo6.java/clean/src-modules/org/opencms/workplace/tools/widgetdemo/CmsAdminWidgetDemo6.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1208, 16514, 691, 1972, 12, 4747, 16514, 2628, 1947, 16, 9984, 590, 13, 288, 3639, 368, 444, 326, 6176, 618, 3639, 22911, 6353, 723, 12, 2565, 18683, 67, 2399, 1769, 3639, 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, 4750, 918, 1208, 16514, 691, 1972, 12, 4747, 16514, 2628, 1947, 16, 9984, 590, 13, 288, 3639, 368, 444, 326, 6176, 618, 3639, 22911, 6353, 723, 12, 2565, 18683, 67, 2399, 1769, 3639, 368,...
AST tmp123_AST = null; tmp123_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp123_AST); match(LITERAL_function);
public final void defaultNamespaceDecl() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST defaultNamespaceDecl_AST = null; Token defu = null; AST defu_AST = null; Token deff = null; AST deff_AST = null; AST tmp119_AST = null; tmp119_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp119_AST); match(LITERAL_declare); AST tmp120_AST = null; tmp120_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp120_AST); match(LITERAL_default); { switch ( LA(1)) { case LITERAL_element: { AST tmp121_AST = null; tmp121_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp121_AST); match(LITERAL_element); AST tmp122_AST = null; tmp122_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp122_AST); match(LITERAL_namespace); defu = LT(1); defu_AST = astFactory.create(defu); astFactory.addASTChild(currentAST, defu_AST); match(STRING_LITERAL); if ( inputState.guessing==0 ) { defaultNamespaceDecl_AST = (AST)currentAST.root; defaultNamespaceDecl_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(DEF_NAMESPACE_DECL,"defaultNamespaceDecl")).add(defu_AST)); currentAST.root = defaultNamespaceDecl_AST; currentAST.child = defaultNamespaceDecl_AST!=null &&defaultNamespaceDecl_AST.getFirstChild()!=null ? defaultNamespaceDecl_AST.getFirstChild() : defaultNamespaceDecl_AST; currentAST.advanceChildToEnd(); } break; } case LITERAL_function: { AST tmp123_AST = null; tmp123_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp123_AST); match(LITERAL_function); AST tmp124_AST = null; tmp124_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp124_AST); match(LITERAL_namespace); deff = LT(1); deff_AST = astFactory.create(deff); astFactory.addASTChild(currentAST, deff_AST); match(STRING_LITERAL); if ( inputState.guessing==0 ) { defaultNamespaceDecl_AST = (AST)currentAST.root; defaultNamespaceDecl_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(DEF_FUNCTION_NS_DECL,"defaultFunctionNSDecl")).add(deff_AST)); currentAST.root = defaultNamespaceDecl_AST; currentAST.child = defaultNamespaceDecl_AST!=null &&defaultNamespaceDecl_AST.getFirstChild()!=null ? defaultNamespaceDecl_AST.getFirstChild() : defaultNamespaceDecl_AST; currentAST.advanceChildToEnd(); } break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } defaultNamespaceDecl_AST = (AST)currentAST.root; returnAST = defaultNamespaceDecl_AST; }
2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/be23536931f66ed6f552941df1c272ed48eeb933/XPathParser2.java/buggy/src/org/exist/parser/XPathParser2.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 805, 3402, 3456, 1435, 1216, 9539, 16, 3155, 1228, 503, 288, 9506, 202, 2463, 9053, 273, 446, 31, 202, 202, 9053, 4154, 783, 9053, 273, 394, 9183, 4154, 5621, 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, 482, 727, 918, 805, 3402, 3456, 1435, 1216, 9539, 16, 3155, 1228, 503, 288, 9506, 202, 2463, 9053, 273, 446, 31, 202, 202, 9053, 4154, 783, 9053, 273, 394, 9183, 4154, 5621, 202, 2...
if(!isDispatchThread) {
if (!isDispatchThread) {
void interrupted(Context cx) { synchronized(swingMonitor) { if(java.awt.EventQueue.isDispatchThread()) { dispatcherIsWaiting++; if(nonDispatcherWaiting) { // Another thread is stopped in the debugger // process events until it resumes and we // can enter java.awt.EventQueue eventQ = java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue(); while(nonDispatcherWaiting) { try { AWTEvent event = eventQ.getNextEvent(); if(event instanceof ActiveEvent) { ((ActiveEvent)event).dispatch(); } else { Object source = event.getSource(); if(source instanceof Component) { Component comp = (Component)source; // Suppress Window/InputEvent's that aren't // directed to the Debugger // if(!(event instanceof InputEvent || //event instanceof WindowEvent)|| //shouldDispatchTo(comp)) { comp.dispatchEvent(event); //} } else if(source instanceof MenuComponent) { ((MenuComponent)source).dispatchEvent(event); } } if(this.returnValue == EXIT) { return; } swingMonitor.wait(1); } catch(InterruptedException exc) { return; } } } } else { while(isInterrupted || dispatcherIsWaiting > 0) { try { swingMonitor.wait(); } catch(InterruptedException exc) { return; } } nonDispatcherWaiting = true; } isInterrupted = true; } do { currentContext = cx; DebuggableEngine engine = cx.getDebuggableEngine(); Thread thread = Thread.currentThread(); statusBar.setText("Thread: " + thread.toString()); ThreadState state = (ThreadState)threadState.get(thread); int stopAtFrameDepth = -1; if(state != null) { stopAtFrameDepth = state.stopAtFrameDepth; } if(runToCursorFile != null && thread == runToCursorThread) { int frameCount = engine.getFrameCount(); if(frameCount > 0) { DebugFrame frame = engine.getFrame(0); String sourceName = frame.getSourceName(); if(sourceName != null) { if(sourceName.equals(runToCursorFile)) { int lineNumber = frame.getLineNumber(); if(lineNumber == runToCursorLine) { stopAtFrameDepth = -1; runToCursorFile = null; } else { FileWindow w = getFileWindow(sourceName); if(w == null || !w.isBreakPoint(lineNumber)) { return; } else { runToCursorFile = null; } } } } } else { } } if(stopAtFrameDepth > 0) { if (engine.getFrameCount() > stopAtFrameDepth) { break; } } if(state != null) { state.stopAtFrameDepth = -1; } threadState.remove(thread); int frameCount = engine.getFrameCount(); this.frameIndex = frameCount -1; int line = 0; if(frameCount == 0) { break; } DebugFrame frame = engine.getFrame(0); String fileName = frame.getSourceName(); engine.setBreakNextLine(false); line = frame.getLineNumber(); int enterCount = 0; boolean isDispatchThread = java.awt.EventQueue.isDispatchThread(); if(!isDispatchThread) { // detach cx from its thread so the debugger (in the awt // dispatcher thread) can enter it if necessary cx.exit(); while(Context.getCurrentContext() != null) { Context.exit(); enterCount++; } } if(fileName != null && !fileName.equals("<stdin>")) { FileWindow w = (FileWindow)getFileWindow(fileName); if(w != null) { SetFilePosition action = new SetFilePosition(this, w, line); swingInvoke(action); } else { Vector v = (Vector)sourceNames.get(fileName); String source = ((SourceEntry)v.elementAt(0)).source.toString(); CreateFileWindow action = new CreateFileWindow(this, fileName, source, line); swingInvoke(action); } } else { if(console.isVisible()) { final JSInternalConsole finalConsole = console; swingInvoke(new Runnable() { public void run() { finalConsole.show(); } }); } } swingInvoke(new EnterInterrupt(this, cx)); swingInvoke(new UpdateContext(this, cx)); int returnValue; if(!isDispatchThread) { synchronized(monitor) { this.returnValue = -1; try { while(this.returnValue == -1) { monitor.wait(); } returnValue = this.returnValue; } catch(InterruptedException exc) { break; } } } else { java.awt.EventQueue eventQ = java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue(); this.returnValue = -1; while(this.returnValue == -1) { try { AWTEvent event = eventQ.getNextEvent(); if(event instanceof ActiveEvent) { ((ActiveEvent)event).dispatch(); } else { Object source = event.getSource(); if(source instanceof Component) { Component comp = (Component)source; // Suppress Window/InputEvent's that aren't // directed to the Debugger // if(!(event instanceof InputEvent || //event instanceof WindowEvent)|| // shouldDispatchTo(comp)) { //comp.dispatchEvent(event); //} comp.dispatchEvent(event); } else if(source instanceof MenuComponent) { ((MenuComponent)source).dispatchEvent(event); } } } catch(InterruptedException exc) { } } returnValue = this.returnValue; } swingInvoke(new ExitInterrupt(this)); if(!isDispatchThread) { // reattach cx to its thread Context current; if((current = Context.enter(cx)) != cx) { System.out.println("debugger error: cx = " + cx + " current = " + current); } while(enterCount > 0) { Context.enter(); enterCount--; } } switch(returnValue) { case STEP_OVER: engine.setBreakNextLine(true); stopAtFrameDepth = engine.getFrameCount(); if(state == null) { state = new ThreadState(); } state.stopAtFrameDepth = stopAtFrameDepth; threadState.put(thread, state); break; case STEP_INTO: engine.setBreakNextLine(true); if(state != null) { state.stopAtFrameDepth = -1; } break; case STEP_OUT: stopAtFrameDepth = engine.getFrameCount() -1; if(stopAtFrameDepth > 0) { engine.setBreakNextLine(true); if(state == null) { state = new ThreadState(); } state.stopAtFrameDepth = stopAtFrameDepth; threadState.put(thread, state); } break; case RUN_TO_CURSOR: engine.setBreakNextLine(true); if(state != null) { state.stopAtFrameDepth = -1; } break; } } while(false); synchronized(swingMonitor) { isInterrupted = false; if(java.awt.EventQueue.isDispatchThread()) { dispatcherIsWaiting--; } else { nonDispatcherWaiting = false; } swingMonitor.notifyAll(); } }
19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/bebd557da53b74c60ab8525aa96904d4cee6224c/Main.java/buggy/toolsrc/org/mozilla/javascript/tools/debugger/Main.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 15711, 12, 1042, 9494, 13, 288, 3639, 3852, 12, 5328, 310, 7187, 13, 288, 5411, 309, 12, 6290, 18, 2219, 88, 18, 1133, 3183, 18, 291, 5325, 3830, 10756, 288, 7734, 7393, 2520, 1594...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15711, 12, 1042, 9494, 13, 288, 3639, 3852, 12, 5328, 310, 7187, 13, 288, 5411, 309, 12, 6290, 18, 2219, 88, 18, 1133, 3183, 18, 291, 5325, 3830, 10756, 288, 7734, 7393, 2520, 1594...
this.preparation=preparation;
public Prep_Creer_chargement(Utilisateur utilisateur, Camion camion) { super(utilisateur.getPersonne().getNom()+" "+utilisateur.getPersonne().getPrenom()+" - Preparateur"); Vector nomColonnes = new Vector(); Colis premierColisAAfficher=null; // Initialisation de la preparation pour la classe this.preparation=preparation; Container ct = this.getContentPane(); // Taille de la fentre setSize(800,600); setBounds(20,100,1240,680); ct = getContentPane(); ct.setLayout(new FlowLayout()); getContentPane().setLayout(null); // Cration des icnes ImageIcon icone_ajouter=new ImageIcon("images/icones/flech_gauche_droite.gif"); ImageIcon icone_supprimer=new ImageIcon("images/icones/flech_droite_gauche.gif"); // Insertion des icnes dans les boutons ajouter.setIcon(icone_ajouter); supprimer.setIcon(icone_supprimer); // Affichage du bouton "Crer" creer.setBounds(345,540,100,40); ct.add(creer); creer.addActionListener(this); // Affichage du bouton "Annuler" annuler.setBounds(525, 540, 100, 40); ct.add(annuler); annuler.addActionListener(this); // Affichage du bouton "->" ajouter.setBounds(460,100,55,40); ct.add(ajouter); ajouter.addActionListener(this); // Affichage du bouton "<-" supprimer.setBounds(460, 180, 55, 40); ct.add(supprimer); supprimer.addActionListener(this); // Cration de la premire ligne nomColonnes.add("Id"); nomColonnes.add("entrepot"); nomColonnes.add("Code Barre"); nomColonnes.add("expediteur"); nomColonnes.add("destinataire"); nomColonnes.add("destination"); nomColonnes.add("utilisateur"); nomColonnes.add("Poids"); nomColonnes.add("Date Envoi"); nomColonnes.add("Modele"); nomColonnes.add("valeur_declaree"); nomColonnes.add("Volume"); // Acces BDD pour rcupration liste des colis pour la destination donne AccesBDDColis bddColis=new AccesBDDColis(); /*try{ Vector listeColisBDD=bddColis.listerDest(preparation.getDestination().getId()); for(int i=0;i<listeColisBDD.size();i++){ listeColis.addElement(((Colis)listeColisBDD.get(i)).toVector()); if(i==0) premierColisAAfficher=(Colis)listeColisBDD.get(i); } } catch(SQLException SQLe){ }*/ //Cration du tableau listant les colis pour la destination listeColisMod = new ModeleTable(nomColonnes,listeColis); //Cration du TableSorter qui permet de rordonner les lignes volont sorter_colis = new TableSorter(listeColisMod); // Cration du tableau listeColisTab = new JTable(sorter_colis); // initialisation du Sorter sorter_colis.setTableHeader(listeColisTab.getTableHeader()); listeColisTab.setAutoCreateColumnsFromModel(true); listeColisTab.setOpaque(false); listeColisTab.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); listeColisTab.removeColumn(listeColisTab.getColumnModel().getColumn(0)); listeColisTab.removeColumn(listeColisTab.getColumnModel().getColumn(0)); listeColisTab.removeColumn(listeColisTab.getColumnModel().getColumn(1)); listeColisTab.removeColumn(listeColisTab.getColumnModel().getColumn(1)); listeColisTab.removeColumn(listeColisTab.getColumnModel().getColumn(1)); listeColisTab.removeColumn(listeColisTab.getColumnModel().getColumn(1)); listeColisTab.removeColumn(listeColisTab.getColumnModel().getColumn(3)); listeColisTab.removeColumn(listeColisTab.getColumnModel().getColumn(3)); JScrollPane scrollPane = new JScrollPane(listeColisTab); listeColisTab.setPreferredScrollableViewportSize(new Dimension(400,150)); scrollPane.setBounds(20,360,400,150); scrollPane.setOpaque(false); scrollPane.getViewport().setOpaque(false); getContentPane().add(scrollPane); // Ajout de l'coute souris et de la zone graphique au dessus zoneColis3D=new AffichageColisDynamique(ct, listeColisMod, listeColisTab); // Le premier colis de la liste que l'on affiche zoneColis3D.Initialisation(premierColisAAfficher); // Ecoute de la souris par rapport au tableau listeColisTab.addMouseListener(zoneColis3D); // Cration du tableau contenant les colis que l'on veut mettre dans le chargement listeChargementMod = new ModeleTable(nomColonnes,donnees); //Cration du TableSorter qui permet de rordonner les lignes volont sorter_chargement = new TableSorter(listeChargementMod); // Cration du tableau listeChargementTab = new JTable(sorter_chargement); // initialisation du Sorter sorter_chargement.setTableHeader(listeChargementTab.getTableHeader()); listeChargementTab.setAutoCreateColumnsFromModel(true); listeChargementTab.setOpaque(false); listeChargementTab.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); listeChargementTab.removeColumn(listeChargementTab.getColumnModel().getColumn(0)); listeChargementTab.removeColumn(listeChargementTab.getColumnModel().getColumn(0)); listeChargementTab.removeColumn(listeChargementTab.getColumnModel().getColumn(1)); listeChargementTab.removeColumn(listeChargementTab.getColumnModel().getColumn(1)); listeChargementTab.removeColumn(listeChargementTab.getColumnModel().getColumn(1)); listeChargementTab.removeColumn(listeChargementTab.getColumnModel().getColumn(1)); listeChargementTab.removeColumn(listeChargementTab.getColumnModel().getColumn(3)); listeChargementTab.removeColumn(listeChargementTab.getColumnModel().getColumn(3)); JScrollPane scrollPane_chargement = new JScrollPane(listeChargementTab); listeChargementTab.setPreferredScrollableViewportSize(new Dimension(400,150)); scrollPane_chargement.setBounds(555,360,650,150); scrollPane_chargement.setOpaque(false); scrollPane_chargement.getViewport().setOpaque(false); getContentPane().add(scrollPane_chargement); // Creation de la zone 3D correspondant au camion camion3D = new Canvas3D(SimpleUniverse.getPreferredConfiguration()); camion3D.setBounds(555,20,650,300); // Creation d'un objet SimpleUniverse SimpleUniverse simpleU = new SimpleUniverse(camion3D); // Positionnement du point d'observation pour avoir une vue correcte de la scene 3D simpleU.getViewingPlatform().setNominalViewingTransform(); // Creation de la scene 3D qui contient tous les objets 3D que l'on veut visualiser this.scene=new BranchGroup(); BranchGroup branche = new BranchGroup(); // Arriere plan Background background = new Background(1, 1, 1); background.setColor(new Color3f(new Color(230,255,255))); background.setApplicationBounds(new BoundingBox()); branche.addChild(background); //*********************************CREATION DU CAMION*****************************************// // Les coordonnees des 16 sommets des 4 faces visibles du cube Point3f benne[]=tailleBenne(2.55f, 4, 12); //Les couleurs des 4 faces visibles du cube// Les couleurs des 4 faces visibles du cube Color4f color1 = new Color4f(Color.darkGray); Color4f color2 = new Color4f(Color.gray); Color4f color3 = new Color4f(Color.lightGray); // Construction de l'objet geometrique QuadArray constitue de 16 // points QuadArray quadArray = new QuadArray(20, QuadArray.COORDINATES | QuadArray.COLOR_4); // Tableau des points constituant les 4 faces (quadrilateres) qui // sont visibles quadArray.setCoordinates(0, new Point3f[] { /* face 1 */ benne[0],benne[1],benne[2],benne[3], /* face 2 */ benne[4],benne[5],benne[6],benne[7], /* face 3 */ benne[8],benne[9],benne[10],benne[11], /* face 4 */ benne[12],benne[13],benne[14],benne[15], /* face 5 */ benne[16],benne[17],benne[18],benne[19] }); // Tableau des couleurs des 4 sommets de chaque face quadArray.setColors(0, new Color4f[] { /* couleur face 1 */ color1, color1, color1, color1, /* couleur face 2 */ color1, color1, color1, color1, /* couleur face 3 */ color3, color3, color3, color3, /* couleur face 4 */ color2, color2, color2, color2, /* couleur face 5 */ color1, color1, color1, color1 });//******************************************************************************************// // Objet relatif aux paramtres du milieu (echelle, ...) Transform3D echelle=new Transform3D(); Transform3D rotation=new Transform3D(); // Echelle echelle.setScale(1); // Rotation rotation.rotY(-0.8f); //Nouvel objet TransformGroup objSpin1 = new TransformGroup(echelle); TransformGroup objSpin2 = new TransformGroup(rotation); //Affichage du camion TransparencyAttributes transparence=new TransparencyAttributes(); transparence.setTransparency(0.5f); transparence.setTransparencyMode(TransparencyAttributes.NICEST); PolygonAttributes pol = new PolygonAttributes(); pol.setCullFace(PolygonAttributes.CULL_NONE); //Cration d'une apparence Appearance apparence=new Appearance(); apparence.setPolygonAttributes(pol); apparence.setTransparencyAttributes(transparence); //Cration du shade3D Shape3D shape = new Shape3D(); shape.setGeometry(quadArray); shape.setAppearance(apparence); /* CollisionDetector cd=new CollisionDetector(shape); BoundingBox bounds1; bounds1 = new BoundingBox(new Point3d(-0.9f, -0.3f, -0.165f),new Point3d(0.9f, 0.3f, 0.165f)); cd.setSchedulingBounds(bounds1);*/ //Ajout de l'objet cre objSpin1.addChild(objSpin2); objSpin2.addChild(shape); //objSpin1.addChild(createSceneGraph(camion3D)); //Box cam = new Box(0.1f, 0.1f, 0.1f, apparence); //objSpin.addChild(cam); branche.addChild(objSpin1); // Compilation de la scene 3D branche.compile(); //this.scene.addChild(createSceneGraph(camion3D)); this.scene.addChild(branche); this.scene.setCapability(BranchGroup.ALLOW_CHILDREN_WRITE); this.scene.setCapability(BranchGroup.ALLOW_CHILDREN_EXTEND); // Attachement de la scene 3D a l'objet SimpleUniverse simpleU.addBranchGraph(this.scene); //Ajout au container ct.add(camion3D); //PROVISOIRE POUR TESTS try{ chargement=new AccesBDDChargement().rechercher("987654321"); } catch(SQLException e){ } setVisible(true); }
56849 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56849/40be5768eb6b7a4a05e199c8f20efd11dbf3abc3/Prep_Creer_chargement.java/buggy/trunk/ihm/preparation/Prep_Creer_chargement.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 2962, 84, 67, 1996, 264, 67, 3001, 75, 820, 12, 1304, 24954, 1709, 24954, 16, 385, 301, 285, 5861, 285, 13, 288, 202, 202, 9565, 12, 1367, 24954, 18, 588, 8346, 4644, 7675, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 2962, 84, 67, 1996, 264, 67, 3001, 75, 820, 12, 1304, 24954, 1709, 24954, 16, 385, 301, 285, 5861, 285, 13, 288, 202, 202, 9565, 12, 1367, 24954, 18, 588, 8346, 4644, 7675, ...
query.addHit(hit);
query.addHit(hit, taskList);
public void readQueryHit(Node node, TaskList taskList, AbstractRepositoryQuery query) throws TaskExternalizationException { Element element = (Element) node; String id = element.getAttribute(KEY_KEY); String description = element.getAttribute(KEY_NAME); WebQueryHit hit = new WebQueryHit(id, description, ((WebQuery) query).getTaskPrefix(), query.getRepositoryUrl()); query.addHit(hit); }
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/2e7eae84382d4bd28180a6f6e15a4f55e7a1db3d/WebTaskExternalizer.java/buggy/sandbox/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/web/WebTaskExternalizer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 855, 1138, 13616, 12, 907, 756, 16, 3837, 682, 1562, 682, 16, 4115, 3305, 1138, 843, 13, 1082, 202, 15069, 3837, 6841, 1588, 503, 288, 202, 202, 1046, 930, 273, 261, 1046...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 855, 1138, 13616, 12, 907, 756, 16, 3837, 682, 1562, 682, 16, 4115, 3305, 1138, 843, 13, 1082, 202, 15069, 3837, 6841, 1588, 503, 288, 202, 202, 1046, 930, 273, 261, 1046...
} if (args[0] instanceof RubyFixnum) { store(RubyNumeric.fix2long(args[0]), args[1]); return args[1];
public IRubyObject aset(IRubyObject[] args) { int argc = checkArgumentCount(args, 2, 3); if (argc == 3) { long beg = RubyNumeric.fix2long(args[0]); long len = RubyNumeric.fix2long(args[1]); replace(beg, len, args[2]); return args[2]; } if (args[0] instanceof RubyFixnum) { store(RubyNumeric.fix2long(args[0]), args[1]); return args[1]; } if (args[0] instanceof RubyRange) { long[] begLen = ((RubyRange) args[0]).getBeginLength(getLength(), false, true); replace(begLen[0], begLen[1], args[1]); return args[1]; } if (args[0] instanceof RubyBignum) { throw getRuntime().newIndexError("Index too large"); } store(RubyNumeric.num2long(args[0]), args[1]); return args[1]; }
45298 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45298/803c66ee682936beecc8a43fe2cfc90fe5645b22/RubyArray.java/buggy/src/org/jruby/RubyArray.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 15908, 10340, 921, 487, 278, 12, 7937, 10340, 921, 8526, 833, 13, 288, 3639, 509, 1501, 71, 273, 10788, 1380, 12, 1968, 16, 576, 16, 890, 1769, 3639, 309, 261, 3175, 71, 422, 890,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 15908, 10340, 921, 487, 278, 12, 7937, 10340, 921, 8526, 833, 13, 288, 3639, 509, 1501, 71, 273, 10788, 1380, 12, 1968, 16, 576, 16, 890, 1769, 3639, 309, 261, 3175, 71, 422, 890,...
return rv; }
return rv; }
public LinkedList nickCompleteAll(String pnick, String channel) { LinkedList rv = new LinkedList(); if (getChannel(channel) != null) { Set users = getChannel(channel).getAllUsers(); Iterator i = users.iterator(); while (i.hasNext()) { User temp = (User) i.next(); if (temp.getNick().length() >= pnick.length()) { if (temp.getNick().toLowerCase().substring(0, pnick.length()).equals(pnick.toLowerCase())) { rv.addFirst(temp.getNick()); } else if (temp.getNick().toLowerCase().indexOf(pnick.toLowerCase()) > -1 && (!temp.getNick().toLowerCase().equals(getMyNick().toLowerCase()))) { rv.addLast(temp.getNick()); } } } } rv.addLast(pnick); return rv; }
12160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12160/ed0c6eff25b6d7ed992af5a5f7eb4bc086a475ae/InternalDataList.java/clean/rero/src/rero/ircfw/InternalDataList.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 10688, 10909, 6322, 1595, 12, 780, 11059, 1200, 16, 514, 1904, 13, 565, 288, 3639, 10688, 5633, 273, 394, 10688, 5621, 3639, 309, 261, 588, 2909, 12, 4327, 13, 480, 446, 13, 288, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 10688, 10909, 6322, 1595, 12, 780, 11059, 1200, 16, 514, 1904, 13, 565, 288, 3639, 10688, 5633, 273, 394, 10688, 5621, 3639, 309, 261, 588, 2909, 12, 4327, 13, 480, 446, 13, 288, ...
ModelAndView mav = new ModelAndView("aggregateStatus");
ModelAndView mav = new ModelAndView("siteStatus");
protected ModelAndView handleRequestInternal(HttpServletRequest req, HttpServletResponse resp) throws Exception { ModelAndView mav = new ModelAndView("aggregateStatus"); String statusView = req.getParameter("statusView"); String statusSite = req.getParameter("statusSite"); String nodeId = req.getParameter("nodeid"); AggregateStatusView view = m_service.createAggregateStatusView(statusView); Collection<AggregateStatus> aggrStati; if (nodeId != null && Integer.parseInt(nodeId) > 0) { aggrStati = m_service.createAggregateStatusesUsingNodeId(Integer.parseInt(nodeId), statusView); } else if (statusSite == null) { aggrStati = m_service.createAggreateStatuses(view); } else { aggrStati = m_service.createAggreateStatuses(view, statusSite); //Don't persist this, convenience for display only. view.setColumnValue(statusSite); } mav.addObject("view", view); mav.addObject("stati", aggrStati); return mav; }
11849 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11849/43c44d95be7f7912fdad473e92b3bc1f0604a938/SiteStatusViewController.java/buggy/opennms-webapp/src/main/java/org/opennms/web/controller/SiteStatusViewController.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 3164, 1876, 1767, 15713, 3061, 12, 2940, 18572, 1111, 16, 12446, 1718, 13, 1216, 1185, 288, 3639, 3164, 1876, 1767, 14757, 273, 394, 3164, 1876, 1767, 2932, 4256, 1482, 8863, 3639, 51...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3164, 1876, 1767, 15713, 3061, 12, 2940, 18572, 1111, 16, 12446, 1718, 13, 1216, 1185, 288, 3639, 3164, 1876, 1767, 14757, 273, 394, 3164, 1876, 1767, 2932, 4256, 1482, 8863, 3639, 51...
connection.setCatalog(catalog); }
connection.setCatalog(catalog); }
public void setCatalog(String catalog) throws SQLException { connection.setCatalog(catalog); }
53257 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53257/8e1649c678c3685e1bb2bd5a35c57795e56eed9b/ConnectionFacade.java/clean/src/ca/sqlpower/architect/jdbc/ConnectionFacade.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 444, 9769, 12, 780, 6222, 13, 1216, 6483, 288, 3639, 1459, 18, 542, 9769, 12, 7199, 1769, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 444, 9769, 12, 780, 6222, 13, 1216, 6483, 288, 3639, 1459, 18, 542, 9769, 12, 7199, 1769, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
else
} else {
public void store() { String val; if (defaultButton.getSelection() || choiceCombo.getText().equals("")) //$NON-NLS-1$ val = null; else { Map lineSeparators = Platform.knownPlatformLineSeparators(); val = (String) lineSeparators.get(choiceCombo.getText()); } IEclipsePreferences node = getScopeContext().getNode( Platform.PI_RUNTIME); if (val == null) node.remove(Platform.PREF_LINE_SEPARATOR); else node.put(Platform.PREF_LINE_SEPARATOR, val); try { node.flush(); } catch (BackingStoreException e) { IDEWorkbenchPlugin.log(e.getMessage(), e); } }
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/LineDelimiterEditor.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/LineDelimiterEditor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1707, 1435, 288, 202, 202, 780, 1244, 31, 202, 202, 430, 261, 1886, 3616, 18, 588, 6233, 1435, 747, 6023, 16156, 18, 588, 1528, 7675, 14963, 2932, 6, 3719, 4329, 3993, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1707, 1435, 288, 202, 202, 780, 1244, 31, 202, 202, 430, 261, 1886, 3616, 18, 588, 6233, 1435, 747, 6023, 16156, 18, 588, 1528, 7675, 14963, 2932, 6, 3719, 4329, 3993, 17...
public ObjectId writeObject( final String type, long len, final InputStream is) throws IOException { final File t; final DeflaterOutputStream ts; ObjectId id = null; t = File.createTempFile("noz", null, r.getObjectsDirectory()); ts = new DeflaterOutputStream(new FileOutputStream(t), new Deflater( Deflater.BEST_COMPRESSION)); try { final byte[] header = (type + ' ' + len + '\0').getBytes("UTF-8"); int r; md.update(header); ts.write(header); while (len > 0 && (r = is.read(buf, 0, (int) Math.min(len, buf.length))) > 0) { md.update(buf, 0, r); ts.write(buf, 0, r); len -= r; } if (len != 0) { throw new IOException("Input did not match supplied length. " + len + " bytes are missing."); } ts.close(); t.setReadOnly(); id = new ObjectId(md.digest()); } finally { if (id == null) { md.reset(); try { ts.close(); } finally { t.delete(); } } } if (r.hasObject(id)) { // Object is already in the repository so remove the temporary file. // t.delete(); } else { final File o = r.toFile(id); if (!t.renameTo(o)) { // Maybe the directory doesn't exist yet as the object // directories are always lazilly created. Note that we try the // rename first as the directory likely does exist. // o.getParentFile().mkdir(); if (!t.renameTo(o)) { if (!r.hasObject(id)) { // The object failed to be renamed into its proper // location and it doesn't exist in the repository // either. We really don't know what went wrong, so // fail. // t.delete(); throw new WritingNotSupportedException("Unable to" + " create new object: " + o); } } } } return id; }
45532 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45532/a3aa28f96d8948af66bd61819772328d15c0c01c/ObjectWriter.java/buggy/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectWriter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 21192, 16306, 12, 3639, 727, 514, 618, 16, 3639, 1525, 562, 16, 3639, 727, 5037, 353, 13, 1216, 1860, 565, 288, 3639, 727, 1387, 268, 31, 3639, 727, 1505, 2242, 2045, 4632, 3742, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 21192, 16306, 12, 3639, 727, 514, 618, 16, 3639, 1525, 562, 16, 3639, 727, 5037, 353, 13, 1216, 1860, 565, 288, 3639, 727, 1387, 268, 31, 3639, 727, 1505, 2242, 2045, 4632, 3742, ...
return eDynamicIsSet( eFeature );
return super.eIsSet( featureID );
public boolean eIsSet( EStructuralFeature eFeature ) { switch ( eDerivedStructuralFeatureID( eFeature ) ) { case DataPackage.DATE_TIME_DATA_ELEMENT__VALUE : return isSetValue( ); } return eDynamicIsSet( eFeature ); }
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/036e8c78765730b146e5854b9d6c397a296fed86/DateTimeDataElementImpl.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/data/impl/DateTimeDataElementImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 20372, 12, 512, 14372, 4595, 425, 4595, 262, 202, 95, 202, 202, 9610, 261, 425, 21007, 14372, 4595, 734, 12, 425, 4595, 262, 262, 202, 202, 95, 1082, 202, 3593, 1910, 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, 225, 202, 482, 1250, 20372, 12, 512, 14372, 4595, 425, 4595, 262, 202, 95, 202, 202, 9610, 261, 425, 21007, 14372, 4595, 734, 12, 425, 4595, 262, 262, 202, 202, 95, 1082, 202, 3593, 1910, 22...
public HighLevelSimpleClient makeClient(short prioClass, short prio) { return new HighLevelSimpleClientImpl(this, archiveManager, tempBucketFactory, random, makeStarterClient(prioClass, prio, false), makeStarterClient(prioClass, prio, true), !DONT_CACHE_LOCAL_REQUESTS);
public HighLevelSimpleClient makeClient(short prioClass) { return new HighLevelSimpleClientImpl(this, archiveManager, tempBucketFactory, random, !DONT_CACHE_LOCAL_REQUESTS, prioClass);
public HighLevelSimpleClient makeClient(short prioClass, short prio) { return new HighLevelSimpleClientImpl(this, archiveManager, tempBucketFactory, random, makeStarterClient(prioClass, prio, false), makeStarterClient(prioClass, prio, true), !DONT_CACHE_LOCAL_REQUESTS); }
50653 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50653/d32229c02576d531c915059f111c468591f30e84/Node.java/clean/src/freenet/node/Node.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 15207, 2355, 5784, 1227, 1221, 1227, 12, 6620, 14705, 83, 797, 16, 3025, 14705, 83, 13, 288, 202, 202, 2463, 394, 15207, 2355, 5784, 1227, 2828, 12, 2211, 16, 5052, 1318, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 15207, 2355, 5784, 1227, 1221, 1227, 12, 6620, 14705, 83, 797, 16, 3025, 14705, 83, 13, 288, 202, 202, 2463, 394, 15207, 2355, 5784, 1227, 2828, 12, 2211, 16, 5052, 1318, 16, ...
final int size = getSize(); int offset = headerSize;
final Word size = Word.fromIntZeroExtend(getSize()); final Word headerSize = Word.fromIntZeroExtend(this.headerSize); Word offset = headerSize;
protected final void defragment() throws UninterruptiblePragma { final int size = getSize(); int offset = headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; lock(); try { Address firstFreePtr = null; while (offset < size) { final Address ptr = start.add(offset); final int objSize = ptr.loadInt(sizeOffset); final int nextOffset = offset + objSize + headerSize; final Object vmt = ptr.loadObjectReference(tibOffset); if ((firstFreePtr == null) && (vmt == FREE)) { firstFreePtr = ptr; } if ((vmt == FREE) && (nextOffset < size)) { final Object nextVmt; final Address nextObjectPtr = start.add(nextOffset); nextVmt = nextObjectPtr.loadObjectReference(tibOffset); if (nextVmt == FREE) { // Combine two free spaces int nextObjSize = nextObjectPtr.loadInt(sizeOffset); int newObjSize = objSize + headerSize + nextObjSize; ptr.store(newObjSize, sizeOffset); // Do not increment offset here, because there may be // another next free object, which we will combine // in the next loop. } else { offset = nextOffset; } } else { offset = nextOffset; } } // Set the address of the next free block, to the first free block this.nextFreePtr = firstFreePtr; } finally { unlock(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d72aecd9d9769d27b315f4c415bf7fe4ef49cb91/VmDefaultHeap.java/clean/core/src/core/org/jnode/vm/memmgr/def/VmDefaultHeap.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 727, 918, 1652, 3520, 1435, 1216, 1351, 31847, 1523, 2050, 9454, 288, 3639, 727, 509, 963, 273, 9950, 5621, 3639, 509, 1384, 273, 31719, 31, 3639, 727, 9874, 963, 2335, 273, 333, 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, 377, 4750, 727, 918, 1652, 3520, 1435, 1216, 1351, 31847, 1523, 2050, 9454, 288, 3639, 727, 509, 963, 273, 9950, 5621, 3639, 509, 1384, 273, 31719, 31, 3639, 727, 9874, 963, 2335, 273, 333, 18...
stream.println(" } catch (IllegalSymbolException ex) { throw new IllegalAlphabetException(ex, "DNA not tokenizing"); }
stream.println(sq); } stream.println(" } catch (IllegalSymbolException ex) { throw new IllegalAlphabetException(ex, "DNA not tokenizing"); }
public void addSymbols(final Alphabet alpha, final Symbol [] syms, final int start, final int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCount = 0; int oCount = 0; int end = start + length - 1; for (int i = start; i <= end; i++) { char c = dnaTokenization.tokenizeSymbol(syms[i]).charAt(0); switch (c) { case 'a': case 'A': aCount++; break; case 'c': case 'C': cCount++; break; case 'g': case 'G': gCount++; break; case 't': case 'T': tCount++; break; default: oCount++; } } // My Changes are here if (idb != null) {stream.println(idb); stream.println("XX");} if (acb != null) {stream.println(acb); stream.println("XX");} if (svb != null) {stream.println(svb); stream.println("XX");} if (dtb != null) {stream.println(dtb); stream.println("XX");} if (deb != null) {stream.println(deb); stream.println("XX");} if (kwb != null) {stream.println(kwb); stream.println("XX");} if (osb != null) {stream.println(osb);} if (ocb != null) {stream.println(ocb); stream.println("XX");} if (ccb != null) {stream.println(ccb); stream.println("XX");} if (ftb.length() != 0) { ftb.insert(0, "FH Key Location/Qualifiers" + nl); stream.print(ftb); } sq.setLength(0); sq.append("XX"); sq.append(nl); sq.append("SQ Sequence "); sq.append(length + " BP; "); sq.append(aCount + " A; "); sq.append(cCount + " C; "); sq.append(gCount + " G; "); sq.append(tCount + " T; "); sq.append(oCount + " other;"); // Print sequence summary header stream.println(sq); int fullLine = length / 60; int partLine = length % 60; int lineCount = fullLine; if (partLine > 0) lineCount++; int lineLens [] = new int [lineCount]; // All lines are 60, except last (if present) Arrays.fill(lineLens, 60); lineLens[lineCount - 1] = partLine; // Prepare line 80 characters wide, sequence is subset of this char [] emptyLine = new char [80]; for (int i = 0; i < lineLens.length; i++) { // Empty the sequence buffer sq.setLength(0); // Empty the utility buffer ub.setLength(0); // How long is this chunk? int len = lineLens[i]; // Prep the whitespace Arrays.fill(emptyLine, ' '); sq.append(emptyLine); // Prepare a Symbol array same length as chunk Symbol [] sa = new Symbol [len]; // Get symbols and format into blocks of tokens System.arraycopy(syms, start + (i * 60), sa, 0, len); String blocks = (formatTokenBlock(ub, sa, 10, dnaTokenization)).toString(); sq.replace(5, blocks.length() + 5, blocks); // Calculate the running residue count and add to the line String count = Integer.toString((i * 60) + len); sq.replace((80 - count.length()), 80, count); // Print formatted sequence line stream.println(sq); } // Print end of entry stream.println("//"); } catch (IllegalSymbolException ex) { throw new IllegalAlphabetException(ex, "DNA not tokenizing"); } }
50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/81bbcbecd0dab58e07bb12a09bee0e5cd0b82a99/EmblFileFormer.java/buggy/src/org/biojava/bio/seq/io/EmblFileFormer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 527, 14821, 12, 6385, 2262, 8907, 225, 4190, 16, 21821, 727, 8565, 5378, 24367, 16, 21821, 727, 509, 4202, 787, 16, 21821, 727, 509, 4202, 769, 13, 3639, 1216, 2141, 27316, 503...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 527, 14821, 12, 6385, 2262, 8907, 225, 4190, 16, 21821, 727, 8565, 5378, 24367, 16, 21821, 727, 509, 4202, 787, 16, 21821, 727, 509, 4202, 769, 13, 3639, 1216, 2141, 27316, 503...
rw.SetWindowInfo(this.GetWindowInfo());
public void Render() { if (rw != null) { if (windowSet == 0) { // set the window id and the active camera //rw.SetWindowInfo(this.GetWindowInfo()); cam = ren.GetActiveCamera(); ren.AddLight(lgt); lgt.SetPosition(cam.GetPosition()); lgt.SetFocalPoint(cam.GetFocalPoint()); windowSet = 1; } // System.out.println("Start Render 2"); rw.Render(); // System.out.println("Finish Render 2"); } }
45401 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45401/166778585c90cff572494d02aefab52cc6efcd28/vtkPanel.java/clean/java/vtk/vtkPanel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 7985, 18, 694, 3829, 966, 12, 2211, 18, 967, 3829, 966, 10663, 7985, 18, 694, 3829, 966, 12, 2211, 18, 967, 3829, 966, 10663, 7985, 18, 694, 3829, 966, 12, 2211, 18, 967, 3829, 966, 10663, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 7985, 18, 694, 3829, 966, 12, 2211, 18, 967, 3829, 966, 10663, 7985, 18, 694, 3829, 966, 12, 2211, 18, 967, 3829, 966, 10663, 7985, 18, 694, 3829, 966, 12, 2211, 18, 967, 3829, 966, 10663, ...
} catch (ServiceException se) { throw new AccountException("errors.update", se); } catch (FinancialException fe) {
} catch (FinancialException fe) {
protected final void buildFinancialEntries( Set<AccountTrxnEntity> accountTrxns) throws AccountException { try { FinancialBusinessService financialBusinessService = (FinancialBusinessService) ServiceFactory .getInstance().getBusinessService( BusinessServiceName.Financial); for (AccountTrxnEntity accountTrxn : accountTrxns) { financialBusinessService.buildAccountingEntries(accountTrxn); } } catch (ServiceException se) { throw new AccountException("errors.update", se); } catch (FinancialException fe) { throw new AccountException("errors.update", fe); } }
45468 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45468/a9a9bc0f2ffc27eb70a268eee14f04fa23ed3819/AccountBO.java/clean/mifos/src/org/mifos/application/accounts/business/AccountBO.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 727, 918, 1361, 6187, 19292, 649, 5400, 12, 1082, 202, 694, 32, 3032, 1070, 22695, 1943, 34, 2236, 1070, 92, 2387, 13, 1216, 6590, 503, 288, 202, 202, 698, 288, 1082, 202, 61...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 727, 918, 1361, 6187, 19292, 649, 5400, 12, 1082, 202, 694, 32, 3032, 1070, 22695, 1943, 34, 2236, 1070, 92, 2387, 13, 1216, 6590, 503, 288, 202, 202, 698, 288, 1082, 202, 61...
public void expander_lhs_block(AndDescr descrs) throws RecognitionException { Token loc=null; String text = null; try { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:524:17: ( ( options {greedy=false; } : text= paren_chunk loc= EOL )* ) // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:524:17: ( options {greedy=false; } : text= paren_chunk loc= EOL )* { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:524:17: ( options {greedy=false; } : text= paren_chunk loc= EOL )* loop41: do { int alt41=2; switch ( input.LA(1) ) { case 27: alt41=2; break; case EOL: alt41=2; break; case 31: alt41=2; break; case ID: case INT: case BOOL: case STRING: case FLOAT: case MISC: case WS: case SH_STYLE_SINGLE_LINE_COMMENT: case C_STYLE_SINGLE_LINE_COMMENT: case MULTI_LINE_COMMENT: case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 28: case 29: case 30: case 32: case 33: case 34: case 35: case 36: case 37: case 38: case 39: case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: case 48: case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: alt41=1; break; case 15: alt41=2; break; } switch (alt41) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:525:25: text= paren_chunk loc= EOL { following.push(FOLLOW_paren_chunk_in_expander_lhs_block1282); text=paren_chunk(); following.pop(); loc=(Token)input.LT(1); match(input,EOL,FOLLOW_EOL_in_expander_lhs_block1286); //only expand non null if (text != null) { runWhenExpander( text, descrs, loc.getLine()); text = null; } } break; default : break loop41; } } while (true); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; }
6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/f57cd683a66080d941264e3f98974908a6a489a0/RuleParser.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 4542, 264, 67, 80, 4487, 67, 2629, 12, 1876, 16198, 3044, 5453, 13, 1216, 9539, 288, 6647, 3155, 1515, 33, 2011, 31, 3639, 514, 977, 273, 446, 31, 3639, 775, 288, 5411, 368, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 4542, 264, 67, 80, 4487, 67, 2629, 12, 1876, 16198, 3044, 5453, 13, 1216, 9539, 288, 6647, 3155, 1515, 33, 2011, 31, 3639, 514, 977, 273, 446, 31, 3639, 775, 288, 5411, 368, ...
MMultiplicity m = ae.getMultiplicity(); if (MMultiplicity.M1_1.equals(m) || MMultiplicity.M0_1.equals(m)) { } if (VERBOSE) temp_s += "/*" + generateClassifierRef(ae.getType()) + "*/"; else { if (VERBOSE) temp_s += "/* Vector */ ";
if (VERBOSE) { tempS += "/*" + generateClassifierRef(ModelFacade.getType(associationEnd)) + "*/"; } else { if (VERBOSE) { tempS += "/* Vector */ "; }
public String generateAssociationEnd(Object handle) { MAssociationEnd ae = (MAssociationEnd)handle; if (!ae.isNavigable()) return ""; //String s = INDENT + "protected "; String s = INDENT; String temp_s = ""; if (VERBOSE) temp_s += "/* public */ "; // must be public or generate public navigation method! if (MScopeKind.CLASSIFIER.equals(ae.getTargetScope())) { if (VERBOSE) temp_s += "static "; } // String n = ae.getName(); // if (n != null && !String.UNSPEC.equals(n)) s += generateName(n) + " "; // if (ae.isNavigable()) s += "navigable "; // if (ae.getIsOrdered()) s += "ordered "; MMultiplicity m = ae.getMultiplicity(); if (MMultiplicity.M1_1.equals(m) || MMultiplicity.M0_1.equals(m)) { } if (VERBOSE) temp_s += "/*" + generateClassifierRef(ae.getType()) + "*/"; else { if (VERBOSE) temp_s += "/* Vector */ "; //generateMultiplicity(m) + " "; } if (temp_s.length() > 0) { s += temp_s + " "; } String n = ae.getName(); MAssociation asc = ae.getAssociation(); String ascName = asc.getName(); if (n != null && n != null && n.length() > 0) { s += "var $" + generateName(n); } else if (ascName != null && ascName != null && ascName.length() > 0) { s += "var $" + generateName(ascName); } else { s += "var $my" + generateClassifierRef(ae.getType()); } return s + ";\n"; }
7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/1866ce2aba8057ad992b7d3853a02863d492ab25/GeneratorCSharp.java/buggy/modules/csharp/src/org/argouml/language/csharp/generator/GeneratorCSharp.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 2103, 7174, 1638, 12, 921, 1640, 13, 288, 202, 49, 7174, 1638, 14221, 273, 261, 49, 7174, 1638, 13, 4110, 31, 202, 430, 16051, 8906, 18, 291, 50, 4911, 429, 10756, 327, 1408,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 2103, 7174, 1638, 12, 921, 1640, 13, 288, 202, 49, 7174, 1638, 14221, 273, 261, 49, 7174, 1638, 13, 4110, 31, 202, 430, 16051, 8906, 18, 291, 50, 4911, 429, 10756, 327, 1408,...
gd.horizontalAlignment = gd.FILL;
gd.horizontalAlignment = GridData.FILL;
private void createEditorHistoryGroup(Composite composite) { Composite groupComposite = new Composite(composite, SWT.LEFT); GridLayout layout = new GridLayout(); layout.numColumns = 2; groupComposite.setLayout(layout); GridData gd = new GridData(); gd.horizontalAlignment = gd.FILL; gd.grabExcessHorizontalSpace = true; groupComposite.setLayoutData(gd); groupComposite.setFont(composite.getFont()); recentFilesEditor = new IntegerFieldEditor(IPreferenceConstants.RECENT_FILES, WorkbenchMessages.getString("WorkbenchPreference.recentFiles"), groupComposite); //$NON-NLS-1$ int recentFilesMax = IPreferenceConstants.MAX_RECENT_FILES_SIZE; recentFilesEditor.setPreferenceStore(WorkbenchPlugin.getDefault().getPreferenceStore()); recentFilesEditor.setPreferencePage(this); recentFilesEditor.setTextLimit(Integer.toString(recentFilesMax).length()); recentFilesEditor.setErrorMessage(WorkbenchMessages.format("WorkbenchPreference.recentFilesError", new Object[] { new Integer(recentFilesMax)})); //$NON-NLS-1$ recentFilesEditor.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE); recentFilesEditor.setValidRange(0, recentFilesMax); recentFilesEditor.load(); recentFilesEditor.setPropertyChangeListener(new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals(FieldEditor.IS_VALID)) setValid(recentFilesEditor.isValid()); } }); }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/02ba77e383bb608847bcbeec7cbb2c08f1e26a2a/EditorsPreferencePage.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/EditorsPreferencePage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 752, 6946, 5623, 1114, 12, 9400, 9635, 13, 288, 202, 202, 9400, 1041, 9400, 273, 394, 14728, 12, 27676, 16, 348, 8588, 18, 10066, 1769, 202, 202, 6313, 3744, 3511, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 752, 6946, 5623, 1114, 12, 9400, 9635, 13, 288, 202, 202, 9400, 1041, 9400, 273, 394, 14728, 12, 27676, 16, 348, 8588, 18, 10066, 1769, 202, 202, 6313, 3744, 3511, 273, ...
expectation3.needsMoreInvocations = false;
expectation3.isSatisfied = true;
public void testInvokesNextMatchingMember() throws Throwable { expectation1.matches = true; expectation1.needsMoreInvocations = true; assertEquals(1, group.invoke(invocation)); assertTrue("expectation1 was invoked", expectation1.wasInvoked); expectation1.wasInvoked = false; expectation1.matches = false; expectation1.needsMoreInvocations = false; expectation2.matches = false; expectation2.needsMoreInvocations = false; expectation3.matches = true; expectation3.needsMoreInvocations = true; assertEquals(3, group.invoke(invocation)); assertTrue("expectation1 was not invoked", !expectation1.wasInvoked); assertTrue("expectation2 was not invoked", !expectation2.wasInvoked); assertTrue("expectation3 was invoked", expectation3.wasInvoked); expectation3.wasInvoked = false; expectation3.matches = true; assertEquals(3, group.invoke(invocation)); assertTrue("expectation3 was invoked", expectation3.wasInvoked); expectation3.wasInvoked = false; expectation3.matches = false; expectation3.needsMoreInvocations = false; expectation4.matches = true; assertEquals(4, group.invoke(invocation)); assertTrue("expectation3 was not invoked", !expectation3.wasInvoked); assertTrue("expectation4 was invoked", expectation4.wasInvoked); }
54028 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54028/e26b74ed4c60546991e04518a519c4d68bd29943/OrderedExpectationGroupTests.java/buggy/jmock2/test/org/jmock/test/unit/lib/OrderedExpectationGroupTests.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 20749, 2134, 9517, 4419, 1435, 1216, 4206, 288, 3639, 17733, 21, 18, 8436, 273, 638, 31, 3639, 17733, 21, 18, 20600, 7417, 3605, 17448, 273, 638, 31, 7734, 1815, 8867, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 20749, 2134, 9517, 4419, 1435, 1216, 4206, 288, 3639, 17733, 21, 18, 8436, 273, 638, 31, 3639, 17733, 21, 18, 20600, 7417, 3605, 17448, 273, 638, 31, 7734, 1815, 8867, 12...
assertRequestSql(new CellRequest[] {request}, pattern, "select `customer`.`gender`"); }
assertRequestSql(new CellRequest[] {request}, pattern, "select `customer`.`gender`"); }
public void testFemaleUnitSalesSql() { CellRequest request = createRequest("Sales", "[Measures].[Unit Sales]", "customer", "gender", "F"); final String pattern = "select `customer`.`gender` as `c0`," + " sum(`sales_fact_1997`.`unit_sales`) as `m0` " + "from `customer` as `customer`," + " `sales_fact_1997` as `sales_fact_1997` " + "where `sales_fact_1997`.`customer_id` = `customer`.`customer_id` " + "and `customer`.`gender` = 'F' " + "group by `customer`.`gender`"; assertRequestSql(new CellRequest[] {request}, pattern, "select `customer`.`gender`"); }
4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/b5b5168edc3af09cb74945a80b0c36e6630ed502/TestAggregationManager.java/clean/testsrc/main/mondrian/rolap/TestAggregationManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 42, 351, 5349, 2802, 23729, 5101, 1435, 288, 202, 202, 4020, 691, 590, 273, 15798, 2932, 23729, 3113, 5158, 23177, 1823, 8009, 63, 2802, 25996, 65, 3113, 315, 10061, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 42, 351, 5349, 2802, 23729, 5101, 1435, 288, 202, 202, 4020, 691, 590, 273, 15798, 2932, 23729, 3113, 5158, 23177, 1823, 8009, 63, 2802, 25996, 65, 3113, 315, 10061, ...
status = new Status(IStatus.ERROR, EditorPlugin.ID, IStatus.OK, "", null);
status = new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.OK, "", null);
protected IStatus doQuery() { clearMatches(); IStatus status = Status.OK_STATUS; FindRegions findRegions = new FindRegions(this.fDocument, this.fRegionText, this.fRegionType); try { ResourcesPlugin.getWorkspace().run(findRegions, null); } catch (CoreException e) { status = new Status(IStatus.ERROR, EditorPlugin.ID, IStatus.OK, "", null); //$NON-NLS-1$ } return status; }
13989 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13989/425ffe7b68526a8574007dbae9d4ecfb097cff08/OccurrencesSearchQuery.java/clean/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchQuery.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 467, 1482, 741, 1138, 1435, 288, 202, 202, 8507, 6869, 5621, 202, 202, 45, 1482, 1267, 273, 2685, 18, 3141, 67, 8608, 31, 202, 202, 3125, 17344, 1104, 17344, 273, 394, 4163, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 467, 1482, 741, 1138, 1435, 288, 202, 202, 8507, 6869, 5621, 202, 202, 45, 1482, 1267, 273, 2685, 18, 3141, 67, 8608, 31, 202, 202, 3125, 17344, 1104, 17344, 273, 394, 4163, ...
totalSwaps++; value.setToUnassigned(); treeValueTask.calculateNumber(sTree, value, null, commandRec); if (better(value, bestValue)) { bestValue.setValue(value); bestString = "Best tree found so far of score " + bestValue.toString(); logln(" Tree search: Better tree found, score = " + value.toString()); progIndicator.setSecondaryMessage("Better tree found, score = " + value.toString()); tree.setToClone(sTree); trees.removeAllElements(false); trees.addElement(tree, false); if (minimize) tree.setName("Tree " + 1 + " from search (criterion: minimize " + treeValueTask.getName() + ")"); else tree.setName("Tree " + 1 + " from search (criterion: maximimize " + treeValueTask.getName() + ")"); better = true; swapTree = 0; } else if(justAsGood(value, bestValue) && trees.size()<MAXTREES){ if (trees.size()>=MAXTREES){ if (firstWarning){ progIndicator.setTertiaryMessage("MAXTREES of " + MAXTREES + " hit in tree search.\n\n" + getParameters()); logln(" MAXTREES of " + MAXTREES + " hit in tree search.");
if (trees.indexOfByTopology(sTree, false)<0){ totalSwaps++; value.setToUnassigned(); treeValueTask.calculateNumber(sTree, value, null, commandRec); if (better(value, bestValue)) { bestValue.setValue(value); bestString = "Best tree found so far of score " + bestValue.toString(); logln(" Tree search: Better tree found, score = " + value.toString()); progIndicator.setSecondaryMessage("Better tree found, score = " + value.toString()); tree.setToClone(sTree); trees.removeAllElements(false); trees.addElement(tree, false); if (minimize) tree.setName("Tree " + 1 + " from search (criterion: minimize " + treeValueTask.getName() + ")"); else tree.setName("Tree " + 1 + " from search (criterion: maximimize " + treeValueTask.getName() + ")"); better = true; swapTree = 0; } else if(justAsGood(value, bestValue) && trees.size()<MAXTREES){ if (trees.size()>=MAXTREES){ if (firstWarning){ progIndicator.setTertiaryMessage("MAXTREES of " + MAXTREES + " hit in tree search.\n\n" + getParameters()); logln(" MAXTREES of " + MAXTREES + " hit in tree search."); } firstWarning = false;
private TreeVector getTrees(Taxa taxa, CommandRecord commandRec) { TreeVector trees = new TreeVector(taxa); MesquiteTree initialTree = new MesquiteTree(taxa); initialTree.setToDefaultBush(2, false); bestValue = new MesquiteNumber(0); logln("Tree search: Adding taxa"); commandRec.tick("Tree Search in progress " ); //alternative: allow user to choose OneTreeSource for starting tree, instead of from addition sequence MesquiteTree tempTree = initialTree.cloneTree(); ProgressIndicator progIndicator = new ProgressIndicator(getProject(),"Tree Search", "Tree Search in progress", 0, "Stop Search"); progIndicator.setButtonMode(ProgressIndicator.FLAG_AND_HIDE); progIndicator.setText("Tree Search in progress "); progIndicator.setTertiaryMessage(getParameters()); progIndicator.start(); Runtime rt = Runtime.getRuntime(); rt.gc(); for (int taxon = 2; taxon < taxa.getNumTaxa() && !progIndicator.isAborted(); taxon++) { bestValue.setToUnassigned(); progIndicator.setSecondaryMessage("Adding taxon " + (taxon +1)); whichNode = 0; MesquiteNumber value = new MesquiteNumber(); int numNodes = initialTree.numberOfNodesInClade(initialTree.getRoot()); for (int node = 0; node< numNodes && !progIndicator.isAborted(); node++) { if (initialTree.nodeInTree(node)) { tempTree.setToClone(initialTree); tempTree.graftTaxon(taxon, node, false); value.setToUnassigned(); treeValueTask.calculateNumber(tempTree, value, null, commandRec); if (better(value,bestValue)) { bestValue.setValue(value); whichNode = node; } } } initialTree.graftTaxon(taxon, whichNode, false); logln(" Tree search: " + taxon + " added."); } trees.addElement(initialTree, false); if (minimize) initialTree.setName("Tree " + 1 + " from search (criterion: minimize " + treeValueTask.getName() + ")"); else initialTree.setName("Tree " + 1 + " from search (criterion: maximimize " + treeValueTask.getName() + ")"); if (progIndicator.isAborted()) { progIndicator.goAway(); return null; } logln("Tree search: About to swap. Score = "+ bestValue.toString() + " Rearranging tree using " + swapTask.getName()); String bestString = "Best tree found so far of score " + bestValue.toString(); boolean firstWarning = true; long totalSwaps = 0; if (swapTask!=null) { for (int swapTree = 0; swapTree< trees.size(); swapTree++){ MesquiteTree tree = trees.getTree(swapTree); MesquiteTree sTree = tree.cloneTree(); boolean better = true; while (better&& !progIndicator.isAborted()) { better = false; long swaps = swapTask.numberOfRearrangements(tree); MesquiteNumber value = new MesquiteNumber(); for (int i = 0; i<swaps && !better && !progIndicator.isAborted(); i++) { progIndicator.setSecondaryMessage(bestString + "; Now examining rearrangement #" + i + " of " + swaps + " on tree " + (swapTree + 1)); sTree.setToClone(tree); swapTask.rearrange(sTree, i); totalSwaps++; value.setToUnassigned(); treeValueTask.calculateNumber(sTree, value, null, commandRec); if (better(value, bestValue)) { bestValue.setValue(value); bestString = "Best tree found so far of score " + bestValue.toString(); logln(" Tree search: Better tree found, score = " + value.toString()); progIndicator.setSecondaryMessage("Better tree found, score = " + value.toString()); tree.setToClone(sTree); trees.removeAllElements(false); trees.addElement(tree, false); if (minimize) tree.setName("Tree " + 1 + " from search (criterion: minimize " + treeValueTask.getName() + ")"); else tree.setName("Tree " + 1 + " from search (criterion: maximimize " + treeValueTask.getName() + ")"); better = true; swapTree = 0; } else if(justAsGood(value, bestValue) && trees.size()<MAXTREES){ if (trees.size()>=MAXTREES){ if (firstWarning){ progIndicator.setTertiaryMessage("MAXTREES of " + MAXTREES + " hit in tree search.\n\n" + getParameters()); logln(" MAXTREES of " + MAXTREES + " hit in tree search."); } firstWarning = false; } else { MesquiteTree sTree2 = sTree.cloneTree(); trees.addElement(sTree2, false); bestString = Integer.toString(trees.size()) + " trees found so far of score " + bestValue.toString(); progIndicator.setSecondaryMessage("Equally good tree found, score = " + value.toString()); if (minimize) sTree2.setName("Tree " + trees.size() + " from search (criterion: minimize " + treeValueTask.getName() + ")"); else sTree2.setName("Tree " + trees.size() + " from search (criterion: maximimize " + treeValueTask.getName() + ")"); logln(" Tree search: Equally good tree found, total number of trees found = " + trees.size()); } } } } } } if (progIndicator.isAborted()) { if (!AlertDialog.query(containerOfModule(), "Keep trees?", "Tree search stopped before rearranging complete. Best tree found has score = " + bestValue.toString() + ". Do you want to keep the trees?", "Keep", "Discard", 1)) return null; //rename all trees//sn = "Tree from incomplete search"; for (int i = 0; i< trees.size(); i++){ MesquiteTree tree = trees.getTree(i); if (minimize) tree.setName("Tree " + (i+1) + " from INCOMPLETE search (criterion: minimize " + treeValueTask.getName() + ")"); else tree.setName("Tree " + (i+1) + " from INCOMPLETE search (criterion: maximimize " + treeValueTask.getName() + ")"); } } else { logln(" Tree search: Swapping completed. Best tree found has score = " + bestValue.toString() + ". Total number of rearrangements examined: " + totalSwaps); } if (progIndicator!=null) progIndicator.goAway(); return trees; }
57538 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57538/4ab0259e838ae89b50a66f40bfe35ac2440f92ed/AddAndRearrange.java/buggy/trunk/Mesquite Project/Source/mesquite/search/AddAndRearrange/AddAndRearrange.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 202, 1152, 4902, 5018, 3181, 5312, 12, 7731, 69, 5320, 69, 16, 3498, 2115, 1296, 5650, 13, 288, 202, 202, 2471, 5018, 11491, 273, 394, 4902, 5018, 12, 8066, 69, 1769, 202, 202, 49, 281,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 202, 1152, 4902, 5018, 3181, 5312, 12, 7731, 69, 5320, 69, 16, 3498, 2115, 1296, 5650, 13, 288, 202, 202, 2471, 5018, 11491, 273, 394, 4902, 5018, 12, 8066, 69, 1769, 202, 202, 49, 281,...
String compressed = value;
String compressed = (String)values.get(0);
public RequestParameters(PipelineContext pipelineContext, Document requestDocument) { try { this.pipelineContext = pipelineContext; List parameters = requestDocument.getRootElement().element("parameters").elements("parameter"); // Get encryption key if (XFormsUtils.isHiddenEncryptionEnabled() || XFormsUtils.isNameEncryptionEnabled()) { for (Iterator i = parameters.iterator(); i.hasNext();) { Element parameterElement = (Element) i.next(); if ("$key".equals(parameterElement.element("name").getStringValue())) { String value = parameterElement.element("value").getStringValue(); String serverPassword = OXFProperties.instance().getPropertySet().getString(Constants.XFORMS_PASSWORD); encryptionPassword = SecureUtils.decrypt(pipelineContext, serverPassword, value); } } } // Go through parameters for (Iterator i = parameters.iterator(); i.hasNext();) { Element parameterElement = (Element) i.next(); String name = parameterElement.element("name").getStringValue(); String value = parameterElement.element("value").getStringValue(); String type = parameterElement.element("value").attributeValue (new QName("type", XMLUtils.XSI_NAMESPACE)); if ("$instance".equals(name)) { // Un-base64, uncompress to get XML as text String xmlText; { String compressed = value; if (XFormsUtils.isHiddenEncryptionEnabled()) compressed = SecureUtils.decrypt(pipelineContext, encryptionPassword, compressed); ByteArrayInputStream compressedData = new ByteArrayInputStream(Base64.decode(compressed)); StringBuffer xml = new StringBuffer(); byte[] buffer = new byte[1024]; GZIPInputStream gzipInputStream = new GZIPInputStream(compressedData); int size; while ((size = gzipInputStream.read(buffer)) != -1) xml.append(new String(buffer, 0, size)); xmlText = xml.toString(); } // Parse XML and store as instance LocationSAXContentHandler saxContentHandler = new LocationSAXContentHandler(); XMLUtils.stringToSAX(xmlText, null, saxContentHandler, false); instance = saxContentHandler.getDocument(); } else if (name.startsWith("$upload^")) { // Split encoded name String s = name.substring("$upload^".length()); String fileName = s.substring(0, s.indexOf('-')); s = s.substring(s.indexOf('-') + 1); String filenameName = s.substring(0, s.indexOf('-')); s = s.substring(s.indexOf('-') + 1); String mediatypeName = s.substring(0, s.indexOf('-')); s = s.substring(s.indexOf('-') + 1); String sizeName = s; // Store file in instance addValue(fileName, value, type); // Store other information about file if (filenameName.length() > 0) { String filenameFromRequest = parameterElement.element("filename").getStringValue(); addValue(filenameName, filenameFromRequest, null); } if (name.startsWith("$upload^") && mediatypeName.length() > 0) { String contentTypeFromRequest = parameterElement.element("content-type").getStringValue(); addValue(mediatypeName, contentTypeFromRequest, null); } if (name.startsWith("$upload^") && sizeName.length() > 0) { String contentLengthFromRequest = parameterElement.element("content-length").getStringValue(); addValue(sizeName, contentLengthFromRequest, null); } } else if (name.startsWith("$action^") || name.startsWith("$actionImg^")) { // Image submit. If .y: ignore. If .x: remove .x at the end of name. if (name.startsWith("$actionImg^")) { if (name.endsWith(".y")) return; name = name.substring(0, name.length() - 2); } // Separate different action, e.g.: $action^action1&action_2 StringTokenizer actionsTokenizer = new StringTokenizer(name.substring(name.indexOf('^') + 1), "&"); while (actionsTokenizer.hasMoreTokens()) { // Parse an action string, e.g.: name&param1Name&param1Value&param2Name&param2Value String actionString = URLDecoder.decode(actionsTokenizer.nextToken(), NetUtils.DEFAULT_URL_ENCODING); String[] keyValue = new String[2]; String actionName = null; Map actionParameters = new HashMap(); while (actionString.length() > 0) { for (int j = 0; j < 2; j++) { int firstDelimiter = actionString.indexOf('&'); keyValue[j] = firstDelimiter == -1 ? actionString : actionString.substring(0, firstDelimiter); actionString = firstDelimiter == -1 ? "" : actionString.substring(firstDelimiter + 1); if (actionName == null) break; } if (actionName == null) { actionName = keyValue[0]; } else { // We used to do URLDecoder.decode(keyValue[1], NetUtils.DEFAULT_URL_ENCODING) but this was once too many times actionParameters.put(keyValue[0], keyValue[1]); } } // Create action object Class actionClass = (Class) actionClasses.get(actionName); if (actionClass == null) throw new OXFException("Cannot find implementation for action '" + actionName + "'"); Action action = (Action) actionClass.newInstance(); action.setParameters(actionParameters); actions.add(action); } } else if (name.startsWith("$node^")) { addValue(name, value, type); } } } catch (IOException e) { throw new OXFException(e); } catch (InstantiationException e) { throw new OXFException(e); } catch (IllegalAccessException e) { throw new OXFException(e); } }
10097 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10097/0c4faa34b9398ef22e39712bf16860e7d2ea849a/RequestParameters.java/buggy/src/java/org/orbeon/oxf/processor/xforms/input/RequestParameters.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1567, 2402, 12, 8798, 1042, 5873, 1042, 16, 4319, 590, 2519, 13, 288, 3639, 775, 288, 5411, 333, 18, 14511, 1042, 273, 5873, 1042, 31, 5411, 987, 1472, 273, 590, 2519, 18, 588, 23...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1567, 2402, 12, 8798, 1042, 5873, 1042, 16, 4319, 590, 2519, 13, 288, 3639, 775, 288, 5411, 333, 18, 14511, 1042, 273, 5873, 1042, 31, 5411, 987, 1472, 273, 590, 2519, 18, 588, 23...
Messages.getResourceBundle( rtc.getULocale( ) ) );
Messages.getResourceBundle( rtc.getULocale( ) ) );
protected void validateAxis( Axis ax ) throws ChartException { if ( !ax.isSetType( ) ) // AXIS TYPE UNDEFINED { throw new ChartException( ChartEnginePlugin.ID, ChartException.VALIDATION, new ChartException( ChartEnginePlugin.ID, ChartException.UNDEFINED_VALUE, "exception.undefined.axis.data.type", //$NON-NLS-1$ new Object[]{ ax }, Messages.getResourceBundle( rtc.getULocale( ) ) ) ); } if ( !ax.getLabel( ).isSetVisible( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.VALIDATION, new ChartException( ChartEnginePlugin.ID, ChartException.UNDEFINED_VALUE, "exception.undefined.axis.label.visibility", //$NON-NLS-1$ new Object[]{ ax }, Messages.getResourceBundle( rtc.getULocale( ) ) ) ); } if ( !ax.getTitle( ).isSetVisible( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.VALIDATION, new ChartException( ChartEnginePlugin.ID, ChartException.UNDEFINED_VALUE, "exception.undefined.axis.title.visibility", //$NON-NLS-1$ new Object[]{ ax }, Messages.getResourceBundle( rtc.getULocale( ) ) ) ); } if ( !ax.isSetLabelPosition( ) && ax.getLabel( ).isVisible( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.VALIDATION, new ChartException( ChartEnginePlugin.ID, ChartException.UNDEFINED_VALUE, "exception.undefined.axis.label.position", //$NON-NLS-1$ new Object[]{ ax }, Messages.getResourceBundle( rtc.getULocale( ) ) ) ); } if ( !ax.isSetTitlePosition( ) && ax.getTitle( ).isVisible( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.VALIDATION, new ChartException( ChartEnginePlugin.ID, ChartException.UNDEFINED_VALUE, "exception.undefined.axis.title.position", //$NON-NLS-1$ new Object[]{ ax }, Messages.getResourceBundle( rtc.getULocale( ) ) ) ); } LineAttributes liaTicks = ax.getMajorGrid( ).getTickAttributes( ); if ( !ax.getMajorGrid( ).isSetTickStyle( ) && liaTicks.isVisible( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.VALIDATION, new ChartException( ChartEnginePlugin.ID, ChartException.UNDEFINED_VALUE, "exception.undefined.axis.major.tick.style", //$NON-NLS-1$ new Object[]{ ax }, Messages.getResourceBundle( rtc.getULocale( ) ) ) ); } liaTicks = ax.getMinorGrid( ).getTickAttributes( ); if ( !ax.getMinorGrid( ).isSetTickStyle( ) && liaTicks.isVisible( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.VALIDATION, new ChartException( ChartEnginePlugin.ID, ChartException.UNDEFINED_VALUE, "exception.undefined.axis.minor.tick.style", //$NON-NLS-1$ new Object[]{ ax }, Messages.getResourceBundle( rtc.getULocale( ) ) ) ); } final int iOrientation = ax.getOrientation( ).getValue( ); if ( iOrientation == Orientation.VERTICAL ) { int iPosition = -1; if ( ax.getLabel( ).isVisible( ) ) // LABEL POSITION (IF VISIBLE) { iPosition = ax.getLabelPosition( ).getValue( ); if ( iPosition != Position.LEFT && iPosition != Position.RIGHT ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.VALIDATION, "exception.illegal.vaxis.label.position", //$NON-NLS-1$ new Object[]{ ax.getLabelPosition( ).getName( ), ax }, Messages.getResourceBundle( rtc.getULocale( ) ) ); } } if ( ax.getTitle( ).isVisible( ) ) // LABEL POSITION (IF VISIBLE) { iPosition = ax.getTitlePosition( ).getValue( ); if ( iPosition != Position.LEFT && iPosition != Position.RIGHT ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.VALIDATION, "exception.illegal.vaxis.title.position", //$NON-NLS-1$ new Object[]{ ax.getLabelPosition( ).getName( ), ax }, Messages.getResourceBundle( rtc.getULocale( ) ) ); } } int iTickStyle = ax.getMajorGrid( ).getTickStyle( ).getValue( ); if ( iTickStyle != TickStyle.ACROSS && iTickStyle != TickStyle.LEFT && iTickStyle != TickStyle.RIGHT ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.VALIDATION, "exception.illegal.vaxis.major.tick.style", //$NON-NLS-1$ new Object[]{ ax.getMajorGrid( ).getTickStyle( ).getName( ), ax }, Messages.getResourceBundle( rtc.getULocale( ) ) ); } iTickStyle = ax.getMinorGrid( ).getTickStyle( ).getValue( ); if ( iTickStyle != TickStyle.ACROSS && iTickStyle != TickStyle.LEFT && iTickStyle != TickStyle.RIGHT ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.VALIDATION, "exception.illegal.vaxis.minor.tick.style", //$NON-NLS-1$ new Object[]{ ax.getMinorGrid( ).getTickStyle( ).getName( ), ax }, Messages.getResourceBundle( rtc.getULocale( ) ) ); } } else if ( iOrientation == Orientation.HORIZONTAL ) { int iPosition = -1; if ( ax.getLabel( ).isVisible( ) ) // LABEL POSITION (IF VISIBLE) { iPosition = ax.getLabelPosition( ).getValue( ); if ( iPosition != Position.ABOVE && iPosition != Position.BELOW ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.VALIDATION, "exception.illegal.haxis.label.position", //$NON-NLS-1$ new Object[]{ ax.getLabelPosition( ).getName( ), ax }, Messages.getResourceBundle( rtc.getULocale( ) ) ); } } if ( ax.getTitle( ).isVisible( ) ) // LABEL POSITION (IF VISIBLE) { iPosition = ax.getTitlePosition( ).getValue( ); if ( iPosition != Position.ABOVE && iPosition != Position.BELOW ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.VALIDATION, "exception.illegal.haxis.title.position", //$NON-NLS-1$ new Object[]{ ax.getTitlePosition( ).getName( ), ax }, Messages.getResourceBundle( rtc.getULocale( ) ) ); } } int iTickStyle = ax.getMajorGrid( ).getTickStyle( ).getValue( ); if ( iTickStyle != TickStyle.ACROSS && iTickStyle != TickStyle.ABOVE && iTickStyle != TickStyle.BELOW ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.VALIDATION, "exception.illegal.haxis.major.tick.style", //$NON-NLS-1$ new Object[]{ ax.getMajorGrid( ).getTickStyle( ).getName( ), ax }, Messages.getResourceBundle( rtc.getULocale( ) ) ); } iTickStyle = ax.getMinorGrid( ).getTickStyle( ).getValue( ); if ( iTickStyle != TickStyle.ACROSS && iTickStyle != TickStyle.ABOVE && iTickStyle != TickStyle.BELOW ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.VALIDATION, "exception.illegal.haxis.minor.tick.style", //$NON-NLS-1$ new Object[]{ ax.getMinorGrid( ).getTickStyle( ).getName( ), ax }, Messages.getResourceBundle( rtc.getULocale( ) ) ); } } }
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/48591faaeb26460761e9a40eb903978ef98c0f90/PlotWithAxes.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/withaxes/PlotWithAxes.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 1954, 6558, 12, 15509, 1740, 262, 1216, 14804, 503, 202, 95, 202, 202, 430, 261, 401, 651, 18, 291, 25181, 12, 262, 262, 368, 29539, 5127, 3463, 21919, 202, 202, 95, 108...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1954, 6558, 12, 15509, 1740, 262, 1216, 14804, 503, 202, 95, 202, 202, 430, 261, 401, 651, 18, 291, 25181, 12, 262, 262, 368, 29539, 5127, 3463, 21919, 202, 202, 95, 108...
IEditorPart editorPart = this.getActiveEditor(); if(editorPart == null) { return;
if(this.getActivePage() != 0) { this.switchToJava();
public void showHighlightRangeOnly(boolean showHighlightRangeOnly) { IEditorPart editorPart = this.getActiveEditor(); if(editorPart == null) { return; } if(!(editorPart instanceof ITextEditor)) { return; } ITextEditor textEditor = (ITextEditor)editorPart; textEditor.showHighlightRangeOnly(showHighlightRangeOnly); }
50596 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50596/cfa60f4c7c64179ca3e944698b55b7f81acf67a1/ComponentEditor.java/clean/projects/wolips/plugins/org.objectstyle.wolips.componenteditor/java/org/objectstyle/wolips/componenteditor/part/ComponentEditor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 2405, 16205, 2655, 3386, 12, 6494, 2405, 16205, 2655, 3386, 13, 288, 202, 202, 45, 6946, 1988, 4858, 1988, 273, 333, 18, 588, 3896, 6946, 5621, 202, 202, 430, 12, 9177, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2405, 16205, 2655, 3386, 12, 6494, 2405, 16205, 2655, 3386, 13, 288, 202, 202, 45, 6946, 1988, 4858, 1988, 273, 333, 18, 588, 3896, 6946, 5621, 202, 202, 430, 12, 9177, 1...
if (jj_3R_81()) return true; if (jj_scan_token(DOT)) return true; if (jj_scan_token(CLASS)) return true;
if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3_16()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3_17()) { jj_scanpos = xsp; break; } }
final private boolean jj_3R_171() { if (jj_3R_81()) return true; if (jj_scan_token(DOT)) return true; if (jj_scan_token(CLASS)) return true; return false; }
41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/204bebdbecd44fd7e3376db20b9709780ab79771/JavaParser.java/clean/pmd/src/net/sourceforge/pmd/ast/JavaParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 727, 3238, 1250, 10684, 67, 23, 54, 67, 4033, 21, 1435, 288, 565, 309, 261, 78, 78, 67, 23, 54, 67, 11861, 10756, 327, 638, 31, 565, 309, 261, 78, 78, 67, 9871, 67, 2316, 12, 17591,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 727, 3238, 1250, 10684, 67, 23, 54, 67, 4033, 21, 1435, 288, 565, 309, 261, 78, 78, 67, 23, 54, 67, 11861, 10756, 327, 638, 31, 565, 309, 261, 78, 78, 67, 9871, 67, 2316, 12, 17591,...
char[] chars = getCharBuffer(strLen); k.getChars(0, strLen, chars, 0); int utfLen = strLen; for (int i = 0; i != strLen; i++) { int c = chars[i]; if (c == 0 || c > 0x7F) { if (c < 0x7FF) { ++utfLen; } else { utfLen += 2; } } } return utfLen <= 65535;
return strLen == getUtfEncodingLimit(s, 0, strLen);
boolean isUnderUtfEncodingLimit(String k) { int strLen = k.length(); if (strLen * 3 <= MAX_UTF_ENCODING_SIZE) { return true; } else if (strLen > MAX_UTF_ENCODING_SIZE) { return false; } char[] chars = getCharBuffer(strLen); k.getChars(0, strLen, chars, 0); int utfLen = strLen; for (int i = 0; i != strLen; i++) { int c = chars[i]; if (c == 0 || c > 0x7F) { if (c < 0x7FF) { ++utfLen; } else { utfLen += 2; } } } return utfLen <= 65535; }
13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/666483b96d42790e5a2f946a7e7ced4a018638b3/ClassFileWriter.java/clean/js/rhino/src/org/mozilla/classfile/ClassFileWriter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1250, 353, 14655, 15230, 4705, 3039, 12, 780, 417, 13, 565, 288, 3639, 509, 609, 2891, 273, 417, 18, 2469, 5621, 3639, 309, 261, 701, 2891, 380, 890, 1648, 4552, 67, 5159, 67, 14672, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1250, 353, 14655, 15230, 4705, 3039, 12, 780, 417, 13, 565, 288, 3639, 509, 609, 2891, 273, 417, 18, 2469, 5621, 3639, 309, 261, 701, 2891, 380, 890, 1648, 4552, 67, 5159, 67, 14672, 67...
for (int i = 0; i < field_count; i++) { Field f; try { f = clazz.getDeclaredField(fields[i].getName()); if (f != null && !f.getType().equals(fields[i].getType())) throw new InvalidClassException ("invalid field type for " + fields[i].getName() + " in class " + name + " (requested was \"" + fields[i].getType() + " and found \"" + f.getType() + "\")"); } catch (NoSuchFieldException _) { } }
protected ObjectStreamClass readClassDescriptor() throws ClassNotFoundException, IOException { dumpElement("CLASSDESC NAME="); String name = this.realInputStream.readUTF(); dumpElement(name + "; UID="); long uid = this.realInputStream.readLong (); dumpElement(Long.toHexString(uid) + "; FLAGS="); byte flags = this.realInputStream.readByte (); dumpElement(Integer.toHexString(flags) + "; FIELD COUNT="); short field_count = this.realInputStream.readShort(); dumpElementln(Short.toString(field_count)); ObjectStreamField[] fields = new ObjectStreamField[field_count]; ObjectStreamClass osc = new ObjectStreamClass(name, uid, flags, fields); assignNewHandle(osc); for (int i = 0; i < field_count; i++) { dumpElement(" TYPE CODE="); char type_code = (char)this.realInputStream.readByte(); dumpElement(type_code + "; FIELD NAME="); String field_name = this.realInputStream.readUTF(); dumpElementln(field_name); String class_name; // If the type code is an array or an object we must // decode a String here. In the other case we convert // the type code and pass it to ObjectStreamField. // Type codes are decoded by gnu.java.lang.reflect.TypeSignature. if (type_code == 'L' || type_code == '[') class_name = (String)readObject(); else class_name = String.valueOf(type_code); fields[i] = new ObjectStreamField(field_name, class_name, currentLoader()); } /* Now that fields have been read we may resolve the class * (and read annotation if needed). */ Class clazz = resolveClass(osc); for (int i = 0; i < field_count; i++) { Field f; try { f = clazz.getDeclaredField(fields[i].getName()); if (f != null && !f.getType().equals(fields[i].getType())) throw new InvalidClassException ("invalid field type for " + fields[i].getName() + " in class " + name + " (requested was \"" + fields[i].getType() + " and found \"" + f.getType() + "\")"); } catch (NoSuchFieldException _) { } } boolean oldmode = setBlockDataMode(true); osc.setClass(clazz, lookupClass(clazz.getSuperclass())); classLookupTable.put(clazz, osc); setBlockDataMode(oldmode); return osc; }
45163 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45163/287ecb3eab399e579158e4cbd037261f67ffbc1b/ObjectInputStream.java/clean/libjava/java/io/ObjectInputStream.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 1033, 1228, 797, 855, 797, 3187, 1435, 565, 1216, 10403, 16, 1860, 225, 288, 565, 4657, 1046, 2932, 5237, 10964, 6048, 1546, 1769, 565, 514, 508, 273, 333, 18, 7688, 4348, 18, 896, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1033, 1228, 797, 855, 797, 3187, 1435, 565, 1216, 10403, 16, 1860, 225, 288, 565, 4657, 1046, 2932, 5237, 10964, 6048, 1546, 1769, 565, 514, 508, 273, 333, 18, 7688, 4348, 18, 896, ...
assert b.contains(x, y) : "The coordinates are expected to be within the " + "view's bounds: x=" + x + ", y=" + y + "a=" + a;
public int viewToModel(GlyphView v, float x, float y, Shape a, Bias[] biasRet) { Rectangle b = a.getBounds(); assert b.contains(x, y) : "The coordinates are expected to be within the " + "view's bounds: x=" + x + ", y=" + y + "a=" + a; int pos = getBoundedPosition(v, v.getStartOffset(), b.x, x - b.x); return pos; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/badba23052f905d992da7c32124c28f4339931fc/GlyphView.java/buggy/core/src/classpath/javax/javax/swing/text/GlyphView.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 1476, 774, 1488, 12, 15141, 1767, 331, 16, 1431, 619, 16, 1431, 677, 16, 12383, 279, 16, 21821, 605, 1795, 8526, 12005, 7055, 13, 565, 288, 1377, 13264, 324, 273, 279, 18, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 1476, 774, 1488, 12, 15141, 1767, 331, 16, 1431, 619, 16, 1431, 677, 16, 12383, 279, 16, 21821, 605, 1795, 8526, 12005, 7055, 13, 565, 288, 1377, 13264, 324, 273, 279, 18, 58...
spConsumer.detectNewRow( pathHolder.getPath( ), true );
public void startElement( String uri, String name, String qName, Attributes atts ) { //If the current thread should be stopped and current parsing should not continue any more, then //throw a ThreadStopException so that it can be catched later in run method to stop the current thread //execution. if( this.stopCurrentThread ) throw new ThreadStopException(); String elementName = getElementName( uri, qName, name ); String parentPath = pathHolder.getPath(); //Record the occurance of elements if(this.currentElementRecoder.get(parentPath+UtilConstants.XPATH_SLASH+elementName)==null) { this.currentElementRecoder.put(parentPath+UtilConstants.XPATH_SLASH+elementName,new Integer(1)); }else { this.currentElementRecoder.put(parentPath+UtilConstants.XPATH_SLASH+elementName, new Integer(((Integer)this.currentElementRecoder.get(parentPath+UtilConstants.XPATH_SLASH+elementName)).intValue()+1 )); } pathHolder.push( elementName+"["+((Integer)this.currentElementRecoder.get(parentPath+UtilConstants.XPATH_SLASH+elementName)).intValue()+"]" ); for ( int i = 0; i < atts.getLength( ); i++ ) { spConsumer.manipulateData( getAttributePath( atts, i ), atts.getValue( i ) ); spConsumer.detectNewRow( getAttributePath( atts, i ) ); } }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/857f08d2976a6c670029ef1e5217acb85d868190/SaxParser.java/buggy/data/org.eclipse.birt.report.data.oda.xml/src/org/eclipse/birt/report/data/oda/xml/util/SaxParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1752, 5869, 18, 16518, 1908, 1999, 12, 589, 6064, 18, 588, 743, 12, 262, 16, 638, 11272, 918, 1752, 5869, 18, 16518, 1908, 1999, 12, 589, 6064, 18, 588, 743, 12, 262, 16, 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, 225, 202, 482, 1752, 5869, 18, 16518, 1908, 1999, 12, 589, 6064, 18, 588, 743, 12, 262, 16, 638, 11272, 918, 1752, 5869, 18, 16518, 1908, 1999, 12, 589, 6064, 18, 588, 743, 12, 262, 16, 63...
(method.getAccessFlags() & (Constants.ACC_PUBLIC|Constants.ACC_PRIVATE|Constants.ACC_PROTECTED)) == 0;
(method.getAccessFlags() & (Constants.ACC_PUBLIC | Constants.ACC_PRIVATE | Constants.ACC_PROTECTED)) == 0;
public void reportMatch(ClassContext classContext, Method method, ByteCodePatternMatch match) throws CFGBuilderException, DataflowAnalysisException { JavaClass javaClass = classContext.getJavaClass(); MethodGen methodGen = classContext.getMethodGen(method); CFG cfg = classContext.getCFG(method); try { // Get the variable referenced in the pattern instance. BindingSet bindingSet = match.getBindingSet(); Binding binding = bindingSet.lookup("f"); // Look up the field as an XField. // If it is volatile, then the instance is not a bug. FieldVariable field = (FieldVariable) binding.getVariable(); XField xfield = Hierarchy.findXField(field.getClassName(), field.getFieldName(), field.getFieldSig()); if (xfield == null || (xfield.getAccessFlags() & Constants.ACC_VOLATILE) != 0) return; // XXX: for now, ignore lazy initialization of instance fields if (!xfield.isStatic()) return; // Definitely ignore synthetic class$ fields if (xfield.getFieldName().startsWith("class$") || xfield.getFieldName().startsWith("array$")) { if (DEBUG) System.out.println("Ignoring field " + xfield.getFieldName()); return; } // Ignore non-reference fields if (!xfield.getFieldSignature().startsWith("[")) { if (DEBUG) System.out.println("Ignoring non-reference field " + xfield.getFieldName()); return; } // TODO: // - Strings are safe to pass by data race in 1.5 // Get locations matching the beginning of the object creation, // and the final field store. PatternElementMatch createBegin = match.getFirstLabeledMatch("createObject"); PatternElementMatch store = match.getFirstLabeledMatch("end"); // Get all blocks // // (1) dominated by the wildcard instruction matching // the beginning of the instructions creating the object, and // (2) postdominated by the field store // // Exception edges are not considered in computing dominators/postdominators. // We will consider this to be all of the code that creates // the object. DominatorsAnalysis domAnalysis = classContext.getNonExceptionDominatorsAnalysis(method); PostDominatorsAnalysis postDomAnalysis = classContext.getNonExceptionPostDominatorsAnalysis(method); BitSet extent = domAnalysis.getAllDominatedBy(createBegin.getBasicBlock()); extent.and(postDomAnalysis.getAllDominatedBy(store.getBasicBlock())); //System.out.println("Extent: " + extent); if (DEBUG) System.out.println("Object creation extent: " + extent); // Check all instructions in the object creation extent // // (1) to determine the common lock set, and // (2) to check for NEW and Invoke instructions that might create an object // // We ignore matches where a lock is held consistently, // or if the extent does not appear to create a new object. LockDataflow lockDataflow = classContext.getLockDataflow(method); LockSet lockSet = null; boolean sawNEW = false, sawINVOKE = false; for (Iterator<BasicBlock> i = cfg.getBlocks(extent).iterator(); i.hasNext(); ) { BasicBlock block = i.next(); for (Iterator<InstructionHandle> j = block.instructionIterator(); j.hasNext(); ) { InstructionHandle handle = j.next(); Location location = new Location(handle, block); // Keep track of whether we saw any instructions // that might actually have created a new object. Instruction ins = handle.getInstruction(); if (ins instanceof NEW) sawNEW = true; else if (ins instanceof InvokeInstruction) sawINVOKE = true; // Compute lock set intersection for all matched instructions. LockSet insLockSet = lockDataflow.getFactAtLocation(location); if (lockSet == null) { lockSet = new LockSet(); lockSet.copyFrom(insLockSet); } else lockSet.intersectWith(insLockSet); } } if (!(sawNEW || sawINVOKE)) return; if (lockSet == null) throw new IllegalStateException(); if (!lockSet.isEmpty()) return; // Compute the priority: // - ignore lazy initialization of instance fields // - when it's done in a public method, emit a high priority warning // - protected or default access method, emit a medium priority warning // - otherwise, low priority int priority = LOW_PRIORITY; boolean isDefaultAccess = (method.getAccessFlags() & (Constants.ACC_PUBLIC|Constants.ACC_PRIVATE|Constants.ACC_PROTECTED)) == 0; if (method.isPublic()) priority = NORMAL_PRIORITY; else if (method.isProtected() || isDefaultAccess) priority = NORMAL_PRIORITY; // Report the bug. InstructionHandle start = match.getLabeledInstruction("start"); InstructionHandle end = match.getLabeledInstruction("end"); String sourceFile = javaClass.getSourceFileName(); bugReporter.reportBug(new BugInstance("LI_LAZY_INIT_STATIC", priority) .addClassAndMethod(methodGen, sourceFile) .addField(xfield).describe("FIELD_ON") .addSourceLine(methodGen, sourceFile, start, end)); } catch (ClassNotFoundException e) { bugReporter.reportMissingClass(e); return; } }
10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/1d541964940eaa91b52b21469dc5b763fef1d8d1/LazyInit.java/clean/findbugs/src/java/edu/umd/cs/findbugs/detect/LazyInit.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 2605, 2060, 12, 797, 1042, 667, 1042, 16, 2985, 707, 16, 3506, 1085, 3234, 2060, 845, 13, 202, 202, 15069, 7577, 1263, 503, 16, 1910, 2426, 9418, 503, 288, 202, 202, 5852...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 2605, 2060, 12, 797, 1042, 667, 1042, 16, 2985, 707, 16, 3506, 1085, 3234, 2060, 845, 13, 202, 202, 15069, 7577, 1263, 503, 16, 1910, 2426, 9418, 503, 288, 202, 202, 5852...
if (todo[k].getPass() != pass || !at.equals(todo[k].getAt())) {
if (todo[k].getPass() != pass || !at.equals(todo[k].getAt())) {
private static List invokeMethods(MBeanServer server, InvokerService[] invokerServices, InvokeAtType at, boolean reverse, boolean failFast) { Category log = ThreadCategory.getInstance(Manager.class); Integer[] serviceIndexes = new Integer[invokerServices.length]; for (int i = 0; i < invokerServices.length; i++) { if (!reverse) { serviceIndexes[i] = new Integer(i); } else { serviceIndexes[i] = new Integer(invokerServices.length - 1 - i); } } List resultInfo = new ArrayList(invokerServices.length); for (int pass = 0, end = getEndPass(invokerServices); pass <= end; pass++) { if (log.isDebugEnabled()) { log.debug("starting pass " + pass); } for (int i = 0; i < serviceIndexes.length; i++) { int j = serviceIndexes[i].intValue(); String name = invokerServices[j].getService().getName(); if (invokerServices[j].isBadService()) { if (log.isDebugEnabled()) { log.debug("pass " + pass + " on service " + name + " is bad: not invoking any more methods"); } break; } Invoke[] todo = invokerServices[j].getService().getInvoke(); for (int k = 0; todo != null && k < todo.length; k++) { if (todo[k].getPass() != pass || !at.equals(todo[k].getAt())) { continue; } Service service = invokerServices[j].getService(); ObjectInstance mbean = invokerServices[j].getMbean(); if (log.isDebugEnabled()) { log.debug("pass " + pass + " on service " + name + " will invoke method \"" + todo[k].getMethod() + "\""); } try { Object result = invoke(server, todo[k], mbean); resultInfo.add(new InvokerResult(service, mbean, result, null)); } catch (Throwable t) { resultInfo.add(new InvokerResult(service, mbean, null, t)); if (failFast) { return resultInfo; } } } } if (log.isDebugEnabled()) { log.debug("completed pass " + pass); } } return resultInfo; }
47678 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47678/af23ab05906a1983a222bf21e159158242295c81/Manager.java/buggy/src/services/org/opennms/netmgt/vmmgr/Manager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 987, 4356, 4712, 12, 18089, 2081, 1438, 16, 4766, 1377, 17602, 264, 1179, 8526, 24920, 5676, 16, 4766, 1377, 14373, 861, 559, 622, 16, 1250, 4219, 16, 4766, 1377, 1250, 2321, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 987, 4356, 4712, 12, 18089, 2081, 1438, 16, 4766, 1377, 17602, 264, 1179, 8526, 24920, 5676, 16, 4766, 1377, 14373, 861, 559, 622, 16, 1250, 4219, 16, 4766, 1377, 1250, 2321, 1...
if (fontMetrics == null) return 0; return Dialog.convertVerticalDLUsToPixels(fontMetrics, dlus); }
if (fontMetrics == null) return 0; return Dialog.convertVerticalDLUsToPixels(fontMetrics, dlus); }
protected int convertVerticalDLUsToPixels(int dlus) { // test for failure to initialize for backward compatibility if (fontMetrics == null) return 0; return Dialog.convertVerticalDLUsToPixels(fontMetrics, dlus);}
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/b55db1f8df03ebade4e59f55f97c8c3917057362/DialogPage.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogPage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4750, 509, 1765, 15704, 8914, 3477, 774, 18079, 12, 474, 8910, 407, 13, 288, 202, 759, 1842, 364, 5166, 358, 4046, 364, 12555, 8926, 202, 430, 261, 5776, 5653, 422, 446, 13, 202, 202, 2463, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 509, 1765, 15704, 8914, 3477, 774, 18079, 12, 474, 8910, 407, 13, 288, 202, 759, 1842, 364, 5166, 358, 4046, 364, 12555, 8926, 202, 430, 261, 5776, 5653, 422, 446, 13, 202, 202, 2463, ...
if (closureEnvField != null)
if (closureEnv != null && ! closureEnv.isParameter() && ! getInlineOnly())
void enterFunction (Compilation comp, Variable argsArray) { CodeAttr code = comp.getCode(); // Tail-calls loop back to here! code.enterScope (scope); if (closureEnvField != null) { code.emitPushThis(); code.emitGetField(closureEnvField); code.emitStore(closureEnv); } if (heapFrame != null && ! comp.usingCPStyle()) { ClassType frameType = (ClassType) heapFrame.getType(); for (Declaration decl = capturedVars; decl != null; decl = decl.nextCapturedVar) { String dname = comp.mangleName(decl.getName()); String mname = dname; // Check for existing field with name name. Probably overkill. for (int i = 0; ; i++) { Field fld = frameType.getField(mname); if (fld == null) break; mname = dname + 1; } Type dtype = decl.getType(); decl.field = frameType.addField (mname, decl.getType()); } if (closureEnv != null && heapFrame != null) staticLinkField = frameType.addField("staticLink", closureEnv.getType()); if (heapFrameLambda != null) heapFrameLambda.compileAlloc(comp); else { code.emitNew(frameType); code.emitDup(frameType); Method constructor = comp.generateConstructor(frameType, null); code.emitInvokeSpecial(constructor); } if (staticLinkField != null) { code.emitDup(heapFrame.getType()); code.emitLoad(closureEnv); code.emitPutField(staticLinkField); } code.emitStore(heapFrame); } if (min_args == max_args && ! comp.fewerClasses) argsArray = null; // For each non-artificial parameter, copy it from its incoming // location (a local variable register, or the argsArray) into // its home location, if they are different. int i = 0; int opt_i = 0; int key_i = 0; int key_args = keywords == null ? 0 : keywords.length; int opt_args = defaultArgs == null ? 0 : defaultArgs.length - key_args; for (Variable var = firstVar (); var != null; var = var.nextVar ()) { if (var.isParameter () && ! var.isArtificial ()) { Declaration param = (Declaration) var; if (argsArray != null || ! var.isSimple() || param.isIndirectBinding()) { // If the parameter is captured by an inferior lambda, // then the incoming parameter needs to be copied into its // slot in the heapFrame. Thus we emit an aaload instruction. // Unfortunately, it expects the new value *last*, // so first push the heapFrame array and the array index. if (!param.isSimple ()) { param.loadOwningObject(comp); } // This part of the code pushes the incoming argument. if (argsArray == null) { // Simple case: Use Incoming register. code.emitLoad(param.nextVar()); } else if (i < min_args) { // This is a required parameter, in argsArray[i]. code.emitLoad(argsArray); code.emitPushInt(i); code.emitArrayLoad(Type.pointer_type); } else if (i < min_args + opt_args) { // An optional parameter code.emitPushInt(i); code.emitLoad(argsArray); code.emitArrayLength(); code.emitIfIntLt(); code.emitLoad(argsArray); code.emitPushInt(i); code.emitArrayLoad(Type.pointer_type); code.emitElse(); defaultArgs[opt_i++].compile(comp, Target.pushObject); code.emitFi(); } else if (max_args < 0 && i == min_args + opt_args) { // This is the "rest" parameter (i.e. following a "."): // Convert argsArray[i .. ] to a list. code.emitLoad(argsArray); code.emitPushInt(i); code.emitInvokeStatic(Compilation.makeListMethod); } else { // Keyword argument. if (searchForKeywordMethod == null) { Type[] argts = new Type[3]; argts[0] = Compilation.objArrayType; argts[1] = Type.int_type; argts[2] = Type.pointer_type; searchForKeywordMethod = Compilation.scmKeywordType.addMethod("searchForKeyword", argts, Type.pointer_type, Access.PUBLIC|Access.STATIC); } code.emitLoad(argsArray); code.emitPushInt(min_args + opt_args); comp.compileConstant(keywords[key_i++]); code.emitInvokeStatic(searchForKeywordMethod); code.emitDup(1); comp.compileConstant(Special.dfault); code.emitIfEq(); code.emitPop(1); defaultArgs[opt_i++].compile(comp, Target.pushObject); code.emitFi(); } // Now finish copying the incoming argument into its // home location. param.getType().emitCoerceFromObject(code); if (param.isIndirectBinding()) param.pushIndirectBinding(comp); if (param.isSimple()) code.emitStore(param); else code.emitPutField(param.field); } i++; } } }
36952 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/36952/232bc1a8dc64958777f364a5e499c8480d5b0f1d/LambdaExp.java/clean/gnu/expr/LambdaExp.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 918, 6103, 2083, 261, 19184, 1161, 16, 7110, 833, 1076, 13, 225, 288, 565, 3356, 3843, 981, 273, 1161, 18, 588, 1085, 5621, 565, 368, 399, 671, 17, 12550, 2798, 1473, 358, 2674, 5, 565,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 918, 6103, 2083, 261, 19184, 1161, 16, 7110, 833, 1076, 13, 225, 288, 565, 3356, 3843, 981, 273, 1161, 18, 588, 1085, 5621, 565, 368, 399, 671, 17, 12550, 2798, 1473, 358, 2674, 5, 565,...
fJProject1 = createJavaProject("P", new String[] {"src"}, "bin"); fSourceFolder = this.getPackageFragmentRoot("P", "src");
IJavaProject proj= createJavaProject("P", new String[] {"src"}, "bin"); proj.setOption(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.SPACE); proj.setOption(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "4"); this.project1 = proj; this.sourceFolder = this.getPackageFragmentRoot("P", "src");
protected void setUp() throws Exception { super.setUp(); fJProject1 = createJavaProject("P", new String[] {"src"}, "bin"); fSourceFolder = this.getPackageFragmentRoot("P", "src"); waitUntilIndexesReady(); }
10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/40ace06b6f9aaa2f71ebf049ffa37ed745fa6ef3/ASTRewritingTest.java/buggy/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTest.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, 9506, 202, 74, 46, 4109, 21, 273, 752, 5852, 4109, 2932, 52, 3113, 394, 514, 8526, 12528, 4816, 6, 577...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9506, 202, 74, 46, 4109, 21, 273, 752, 5852, 4109, 2932, 52, 3113, 394, 514, 8526, 12528, 4816, 6, 577...
WordRelation wordRelation) {
WordRelation wordRelation,Item tokenItem) {
private static void expandNumberAt(String numberString, int startIndex, WordRelation wordRelation) { expandNumber(numberString.substring(startIndex,numberString.length()), wordRelation); }
24259 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24259/460d07833503253a5c476790f8921bd1e3c702a9/NumberExpander.java/buggy/java/de/dfki/lt/mary/modules/en/NumberExpander.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 918, 4542, 1854, 861, 12, 780, 1300, 780, 16, 6862, 4202, 509, 10588, 16, 6862, 4202, 9926, 3963, 2076, 3963, 13, 288, 202, 12320, 1854, 12, 2696, 780, 18, 28023, 12, 1937, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3238, 760, 918, 4542, 1854, 861, 12, 780, 1300, 780, 16, 6862, 4202, 509, 10588, 16, 6862, 4202, 9926, 3963, 2076, 3963, 13, 288, 202, 12320, 1854, 12, 2696, 780, 18, 28023, 12, 1937, 1...
public UserGUI(String title, int imageWidth, int imageHeight) { mainFrame = new JFrame(title); mainFrame.setContentPane(createMainPanel(imageWidth, imageHeight)); mainFrame.setJMenuBar(createMenuBar()); mainFrame.pack(); mainFrame.setVisible(true); }
23362 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/23362/feb205e44ad808bcfe2f33002933567d2fddf0c3/UserGUI.java/clean/src/org/objectweb/proactive/examples/c3d/gui/UserGUI.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2177, 43, 5370, 12, 780, 2077, 16, 509, 1316, 2384, 16, 509, 1316, 2686, 13, 288, 3639, 2774, 3219, 273, 394, 804, 3219, 12, 2649, 1769, 3639, 2774, 3219, 18, 542, 1350, 8485, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2177, 43, 5370, 12, 780, 2077, 16, 509, 1316, 2384, 16, 509, 1316, 2686, 13, 288, 3639, 2774, 3219, 273, 394, 804, 3219, 12, 2649, 1769, 3639, 2774, 3219, 18, 542, 1350, 8485, 12,...
System.out.println("command: " + lShellProp + " " + lSwitch + " " + lCommand);
public static RubyObject backquote(Ruby ruby, RubyObject recv, RubyString aString) { // XXX use other methods try { String lShellProp = System.getProperty("jruby.shell"); Process aProcess; String lCommand = aString.toString(); String lSwitch = "-c"; if (lShellProp != null) { if (!lShellProp.endsWith("sh")) //case windowslike lSwitch = "/c"; System.out.println("command: " + lShellProp + " " + lSwitch + " " + lCommand); aProcess = Runtime.getRuntime().exec(new String[] { lShellProp, lSwitch, lCommand}); } else { System.out.println("command: " + lCommand); aProcess = Runtime.getRuntime().exec(lCommand); } final StringBuffer sb = new StringBuffer(); final BufferedReader reader = new BufferedReader(new InputStreamReader(aProcess.getInputStream())); String line; while ((line = reader.readLine()) != null) { sb.append(line).append('\n'); } aProcess.waitFor(); return RubyString.newString(ruby, sb.toString()); } catch (Exception excptn) { excptn.printStackTrace(); return RubyString.newString(ruby, ""); } }
48300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48300/64e7f5fdb16cb9a9a712da37e02ccfe842e598f3/RubyGlobal.java/clean/org/jruby/RubyGlobal.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 19817, 921, 1473, 6889, 12, 54, 10340, 22155, 16, 19817, 921, 10665, 16, 19817, 780, 279, 780, 13, 288, 3639, 368, 11329, 999, 1308, 2590, 3639, 775, 288, 5411, 514, 328, 13220...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 19817, 921, 1473, 6889, 12, 54, 10340, 22155, 16, 19817, 921, 10665, 16, 19817, 780, 279, 780, 13, 288, 3639, 368, 11329, 999, 1308, 2590, 3639, 775, 288, 5411, 514, 328, 13220...
if (input instanceof IFileEditorInput) { resourceFile = ((IFileEditorInput) input).getFile(); } else if (input instanceof ILocationProvider) { IPath path = ((ILocationProvider)input).getPath(input); String ext = path.getFileExtension(); if (ext != null && ext.equals("xsd")) { return true; } return false; } else { return false; } return true; }
if (input instanceof IFileEditorInput) { resourceFile = ((IFileEditorInput) input).getFile(); } else if (input instanceof ILocationProvider) { IPath path = ((ILocationProvider) input).getPath(input); String ext = path.getFileExtension(); if (ext != null && ext.equals("xsd")) { return true; } return false; } else { return false; } return true; }
protected boolean loadFile() { Object input = getEditorInput(); if (input instanceof IFileEditorInput) { resourceFile = ((IFileEditorInput) input).getFile(); } else if (input instanceof ILocationProvider) { IPath path = ((ILocationProvider)input).getPath(input); String ext = path.getFileExtension(); if (ext != null && ext.equals("xsd")) { return true; } return false; } else { return false; } return true; }
13989 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13989/64de6da717851c7df521a5645f367316a8c3bb3a/XSDEditor.java/clean/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 1250, 26953, 1435, 225, 288, 565, 1033, 810, 273, 336, 6946, 1210, 5621, 565, 309, 261, 2630, 1276, 467, 812, 6946, 1210, 13, 565, 288, 1377, 1058, 812, 273, 14015, 45, 812, 6946, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26953, 1435, 225, 288, 565, 1033, 810, 273, 336, 6946, 1210, 5621, 565, 309, 261, 2630, 1276, 467, 812, 6946, 1210, 13, 565, 288, 1377, 1058, 812, 273, 14015, 45, 812, 6946, ...
public void setAngleBendingSecondDerivative(GVector coord3d) { ddDeltav = new double[coord3d.getSize()][][]; Double forAtomNumber = null; int atomNumbern; int atomNumberm; int coordinaten; int coordinatem; double ddDeltav1; double ddDeltav2; double ddDeltav2a; double ddDeltav2b; double ddDeltav2a1; double ddDeltav2a2; double ddDeltav2a3; double ddDeltav2a4; double ddDeltav2a1a; double ddDeltav2a1b; double ddDeltav2a4a1; double ddDeltav2a4a1a; double ddDeltav2a4a1b; double ddDeltav2a4a1c; double ddDeltav2a4a2; double ddDeltav2a4b; double ddDeltav2a4c1; double ddDeltav2a4c1a; double ddDeltav2a4c1b; double ddDeltav2a4c1c; double ddDeltav2a4c2; double ddDeltav2a4d; setAngleBendingFirstDerivative(coord3d); for (int n=0; n<coord3d.getSize(); n++) { ddDeltav[n] = new double[coord3d.getSize()][]; forAtomNumber = new Double(n/3); coordinaten = n % 3; //System.out.println("coordinaten = " + coordinaten); atomNumbern = forAtomNumber.intValue(); //System.out.println("atomNumbern = " + atomNumbern); for (int m = 0; m < coord3d.getSize(); m++) { ddDeltav[n][m] = new double[angleNumber]; forAtomNumber = new Double(m/3); coordinatem = m % 3; //System.out.println("coordinatem = " + coordinatem); atomNumberm = forAtomNumber.intValue(); //System.out.println("atomNumberm = " + atomNumberm); for (int l = 0; l < angleNumber; l++) { if ((angleAtomPosition[l][0] == atomNumberm) | (angleAtomPosition[l][1] == atomNumberm) | (angleAtomPosition[l][2] == atomNumberm)) { if ((angleAtomPosition[l][0] == atomNumbern) | (angleAtomPosition[l][1] == atomNumbern) | (angleAtomPosition[l][2] == atomNumbern)) { Point3d xi = new Point3d(coord3d.getElement(3 * angleAtomPosition[l][0]), coord3d.getElement(3 * angleAtomPosition[l][0] + 1),coord3d.getElement( 3 * angleAtomPosition[l][0] + 2)); //System.out.println("xi = " + xi); Point3d xj = new Point3d(coord3d.getElement(3 * angleAtomPosition[l][1]), coord3d.getElement(3 * angleAtomPosition[l][1] + 1),coord3d.getElement( 3 * angleAtomPosition[l][1] + 2)); //System.out.println("xj = " + xj); Point3d xk = new Point3d(coord3d.getElement(3 * angleAtomPosition[l][2]), coord3d.getElement(3 * angleAtomPosition[l][2] + 1),coord3d.getElement( 3 * angleAtomPosition[l][2] + 2)); //System.out.println("xk = " + xk); Vector3d xij = new Vector3d(); xij.sub(xi,xj); //System.out.println("xij = " + xij); Vector3d xkj = new Vector3d(); xkj.sub(xk,xj); //System.out.println("xkj = " + xkj); double rij = xi.distance(xj); //System.out.println("rij = " + rij); double rkj = xk.distance(xj); //System.out.println("rkj = " + rkj); ddDeltav1 = (-1/Math.sqrt(Math.pow(1-Math.pow(xij.dot(xkj)/(rij * rkj),2),3))) * (xij.dot(xkj)/(rij * rkj)) * (1/(Math.pow(rij,2) * Math.pow(rkj,2))); ddDeltav2 = (-1/Math.sqrt(1-Math.pow(xij.dot(xkj)/(rij * rkj),2))) * (1/(Math.pow(rij,4) * Math.pow(rkj,4))); ddDeltav2a = Math.pow(rij,2) * Math.pow(rkj,2); ddDeltav2a1 = rij * rkj; ddDeltav2a1a = 0; ddDeltav2a1b = 0; ddDeltav2a2 = 0; ddDeltav2a3 = 0; ddDeltav2a4 = xij.dot(xkj); ddDeltav2a4a1a = 0; ddDeltav2a4a1b = 0; ddDeltav2a4a1c = 0; ddDeltav2a4a2 = 0; ddDeltav2b = 0; ddDeltav2a4a1 = 0; ddDeltav2a4b = 0; ddDeltav2a4c1 = 0; ddDeltav2a4c1a = 0; ddDeltav2a4c1b = 0; ddDeltav2a4c1c = 0; ddDeltav2a4c2 = 0; ddDeltav2a4d = 0; //System.out.println("OK: had d1 and have the atomNumbern"); if (angleAtomPosition[l][0] == atomNumberm) { switch (coordinatem) { case 0: ddDeltav1 = ddDeltav1 * ((xk.x-xj.x) * rij * rkj - (xij.dot(xkj)) * rkj * ((xi.x-xj.x)/rij)); ddDeltav2b = (xk.x-xj.x) * rij * rkj - (xij.dot(xkj)) * rkj * ((xi.x-xj.x)/rij); ddDeltav2a1a = 1; ddDeltav2a1b = 0; ddDeltav2a2 = xk.x-xj.x; ddDeltav2a3 = rkj * ((xi.x-xj.x)/rij); ddDeltav2a4a1a = 1; ddDeltav2a4a2 = xi.x-xj.x; ddDeltav2a4c1a = 0; ddDeltav2a4c2 = 0; ddDeltav2a4b = (xi.x-xj.x)/rij; ddDeltav2a4d = 0; break; case 1: ddDeltav1 = ddDeltav1 * ((xk.y-xj.y) * rij * rkj - (xij.dot(xkj)) * rkj * ((xi.y-xj.y)/rij)); ddDeltav2b = (xk.y-xj.y) * rij * rkj - (xij.dot(xkj)) * rkj * ((xi.y-xj.y)/rij); ddDeltav2a1a = 1; ddDeltav2a1b = 0; ddDeltav2a2 = xk.y-xj.y; ddDeltav2a3 = rkj * ((xi.y-xj.y)/rij); ddDeltav2a4a1b = 1; ddDeltav2a4a2 = xi.y-xj.y; ddDeltav2a4c1b = 0; ddDeltav2a4c2 = 0; ddDeltav2a4b = (xi.y-xj.y)/rij; ddDeltav2a4d = 0; break; case 2: ddDeltav1 = ddDeltav1 * ((xk.z-xj.z) * rij * rkj - (xij.dot(xkj)) * rkj * ((xi.z-xj.z)/rij)); ddDeltav2b = (xk.z-xj.z) * rij * rkj - (xij.dot(xkj)) * rkj * ((xi.z-xj.z)/rij); ddDeltav2a1a = 1; ddDeltav2a1b = 0; ddDeltav2a2 = xk.z-xj.z; ddDeltav2a3 = rkj * ((xi.z-xj.z)/rij); ddDeltav2a4a1c = 1; ddDeltav2a4a2 = xi.z-xj.z; ddDeltav2a4c1c = 0; ddDeltav2a4c2 = 0; ddDeltav2a4b = (xi.z-xj.z)/rij; ddDeltav2a4d = 0; break; } } if (angleAtomPosition[l][1] == atomNumberm) { switch (coordinatem) { case 0: ddDeltav1 = ddDeltav1 * ((2 * xj.x - xk.x - xi.x) * rij * rkj - (xij.dot(xkj)) * ((-(xi.x-xj.x)/rij) * rkj + (-(xk.x-xj.x)/rkj) * rij)); ddDeltav2b = (2 * xj.x - xk.x - xi.x) * rij * rkj - (xij.dot(xkj)) * ((-(xi.x-xj.x)/rij) * rkj + (-(xk.x-xj.x)/rkj) * rij); ddDeltav2a1a = -1; ddDeltav2a1b = -1; ddDeltav2a2 = 2 * xj.x - xk.x - xi.x; ddDeltav2a3 = (-(xi.x-xj.x)/rij) * rkj + (-(xk.x-xj.x)/rkj) * rij; ddDeltav2a4a1a = -1; ddDeltav2a4a2 = -(xi.x-xj.x); ddDeltav2a4c1a = -1; ddDeltav2a4c2 = -(xk.x-xj.x); ddDeltav2a4b = -(xi.x-xj.x)/rij; ddDeltav2a4d = -(xk.x-xj.x)/rkj; break; case 1: ddDeltav1 = ddDeltav1 * ((2 * xj.y - xk.y - xi.y) * rij * rkj - (xij.dot(xkj)) * ((-(xi.y-xj.y)/rij) * rkj + (-(xk.y-xj.y)/rkj) * rij)); ddDeltav2b = (2 * xj.y - xk.y - xi.y) * rij * rkj - (xij.dot(xkj)) * ((-(xi.y-xj.y)/rij) * rkj + (-(xk.y-xj.y)/rkj) * rij); ddDeltav2a1a = -1; ddDeltav2a1b = -1; ddDeltav2a2 = 2 * xj.y - xk.y - xi.y; ddDeltav2a3 = (-(xi.y-xj.y)/rij) * rkj + (-(xk.y-xj.y)/rkj) * rij; ddDeltav2a4a1b = -1; ddDeltav2a4a2 = -(xi.y-xj.y); ddDeltav2a4c1b = -1; ddDeltav2a4c2 = -(xk.y-xj.y); ddDeltav2a4b = -(xi.y-xj.y)/rij; ddDeltav2a4d = -(xk.y-xj.y)/rkj; break; case 2: ddDeltav1 = ddDeltav1 * ((2 * xj.z - xk.z - xi.z) * rij * rkj - (xij.dot(xkj)) * ((-(xi.z-xj.z)/rij) * rkj + (-(xk.z-xj.z)/rkj) * rij)); ddDeltav2b = (2 * xj.z - xk.z - xi.z) * rij * rkj - (xij.dot(xkj)) * ((-(xi.z-xj.z)/rij) * rkj + (-(xk.z-xj.z)/rkj) * rij); ddDeltav2a1a = -1; ddDeltav2a1b = -1; ddDeltav2a2 = 2 * xj.z - xk.z - xi.z; ddDeltav2a3 = (-(xi.z-xj.z)/rij) * rkj + (-(xk.z-xj.z)/rkj) * rij; ddDeltav2a4a1c = -1; ddDeltav2a4a2 = -(xi.z-xj.z); ddDeltav2a4c1c = -1; ddDeltav2a4c2 = -(xk.z-xj.z); ddDeltav2a4b = -(xi.z-xj.z)/rij; ddDeltav2a4d = -(xk.z-xj.z)/rkj; break; } } if (angleAtomPosition[l][2] == atomNumberm) { switch (coordinatem) { case 0: ddDeltav1 = ddDeltav1 * ((xi.x-xj.x) * rij * rkj - (xij.dot(xkj)) * rij * ((xk.x-xj.x)/rkj)); ddDeltav2b = (xi.x-xj.x) * rij * rkj - (xij.dot(xkj)) * rij * ((xk.x-xj.x)/rkj); ddDeltav2a1a = 0; ddDeltav2a1b = 1; ddDeltav2a2 = xi.x-xj.x; ddDeltav2a3 = rij * ((xk.x-xj.x)/rkj); ddDeltav2a4a1a = 0; ddDeltav2a4a2 = 0; ddDeltav2a4c1a = 1; ddDeltav2a4c2 = xk.x-xj.x; ddDeltav2a4b = 0; ddDeltav2a4d = (xk.x-xj.x)/rkj; break; case 1: ddDeltav1 = ddDeltav1 * ((xi.y-xj.y) * rij * rkj - (xij.dot(xkj)) * rij * ((xk.y-xj.y)/rkj)); ddDeltav2b = (xi.y-xj.y) * rij * rkj - (xij.dot(xkj)) * rij * ((xk.y-xj.y)/rkj); ddDeltav2a1a = 0; ddDeltav2a1b = 1; ddDeltav2a2 = xi.y-xj.y; ddDeltav2a3 = rij * ((xk.y-xj.y)/rkj); ddDeltav2a4a1b = 0; ddDeltav2a4a2 = 0; ddDeltav2a4c1b = 1; ddDeltav2a4c2 = xk.y-xj.y; ddDeltav2a4b = 0; ddDeltav2a4d = (xk.y-xj.y)/rkj; break; case 2: ddDeltav1 = ddDeltav1 * ((xi.z-xj.z) * rij * rkj - (xij.dot(xkj)) * rij * ((xk.z-xj.z)/rkj)); ddDeltav2b = (xi.z-xj.z) * rij * rkj - (xij.dot(xkj)) * rij * ((xk.z-xj.z)/rkj); ddDeltav2a1a = 0; ddDeltav2a1b = 1; ddDeltav2a2 = xi.z-xj.z; ddDeltav2a3 = rij * ((xk.z-xj.z)/rkj); ddDeltav2a4a1c = 0; ddDeltav2a4a2 = 0; ddDeltav2a4c1c = 1; ddDeltav2a4c2 = xk.z-xj.z; ddDeltav2a4b = 0; ddDeltav2a4d = (xk.z-xj.z)/rkj; break; } } if (angleAtomPosition[l][0] == atomNumbern) { switch (coordinaten) { case 0: ddDeltav1 = ddDeltav1 * ((xk.x-xj.x) * rij * rkj - (xij.dot(xkj)) * rkj * ((xi.x-xj.x)/rij)); ddDeltav2b = ddDeltav2b * 2 * rij * ((xi.x-xj.x)/rij) * Math.pow(rkj,2); ddDeltav2a1a = ddDeltav2a1a * 0; ddDeltav2a1b = ddDeltav2a1b * 1; ddDeltav2a2 = ddDeltav2a2 * rkj * ((xi.x-xj.x)/rij); ddDeltav2a3 = ddDeltav2a3 * (xk.x-xj.x); ddDeltav2a4a1a = ddDeltav2a4a1a * 1; ddDeltav2a4a2 = ddDeltav2a4a2 * ((xi.x-xj.x)/rij); ddDeltav2a4c1a = ddDeltav2a4c1a * 0; ddDeltav2a4c2 = ddDeltav2a4c2 * 0; ddDeltav2a4b = ddDeltav2a4b * 0; ddDeltav2a4d = ddDeltav2a4d * ((xi.x-xj.x)/rij); break; case 1: ddDeltav1 = ddDeltav1 * ((xk.y-xj.y) * rij * rkj - (xij.dot(xkj)) * rkj * ((xi.y-xj.y)/rij)); ddDeltav2b = ddDeltav2b * 2 * rij * ((xi.y-xj.y)/rij) * Math.pow(rkj,2); ddDeltav2a1a = ddDeltav2a1a * 0; ddDeltav2a1b = ddDeltav2a1b * 1; ddDeltav2a2 = ddDeltav2a2 * rkj * ((xi.y-xj.y)/rij); ddDeltav2a3 = ddDeltav2a3 * (xk.y-xj.y); ddDeltav2a4a1b = ddDeltav2a4a1b * 1; ddDeltav2a4a2 = ddDeltav2a4a2 * ((xi.y-xj.y)/rij); ddDeltav2a4c1b = ddDeltav2a4c1b * 0; ddDeltav2a4c2 = ddDeltav2a4c2 * 0; ddDeltav2a4b = ddDeltav2a4b * 0; ddDeltav2a4d = ddDeltav2a4d * ((xi.y-xj.y)/rij); break; case 2: ddDeltav1 = ddDeltav1 * ((xk.z-xj.z) * rij * rkj - (xij.dot(xkj)) * rkj * ((xi.z-xj.z)/rij)); ddDeltav2b = ddDeltav2b * 2 * rij * ((xi.z-xj.z)/rij) * Math.pow(rkj,2); ddDeltav2a1a = ddDeltav2a1a * 0; ddDeltav2a1b = ddDeltav2a1b * 1; ddDeltav2a2 = ddDeltav2a2 * rkj * ((xi.z-xj.z)/rij); ddDeltav2a3 = ddDeltav2a3 * (xk.z-xj.z); ddDeltav2a4a1c = ddDeltav2a4a1c * 1; ddDeltav2a4a2 = ddDeltav2a4a2 * ((xi.z-xj.z)/rij); ddDeltav2a4c1c = ddDeltav2a4c1c * 0; ddDeltav2a4c2 = ddDeltav2a4c2 * 0; ddDeltav2a4b = ddDeltav2a4b * 0; ddDeltav2a4d = ddDeltav2a4d * ((xi.z-xj.z)/rij); break; } } if (angleAtomPosition[l][1] == atomNumbern) { switch (coordinaten) { case 0: ddDeltav1 = ddDeltav1 * ((2 * xj.x - xk.x - xi.x) * rij * rkj - (xij.dot(xkj)) * ((-(xi.x-xj.x)/rij) * rkj + (-(xk.x-xj.x)/rkj) * rij)); ddDeltav2b = ddDeltav2b * (2 * rij * (-(xi.x-xj.x)/rij) * Math.pow(rkj,2) + Math.pow(rij,2) * 2 * rkj * (-(xk.x-xj.x)/rkj)); ddDeltav2a1a = ddDeltav2a1a * -1; ddDeltav2a1b = ddDeltav2a1b * -1; ddDeltav2a2 = ddDeltav2a2 * ((-(xi.x-xj.x)/rij) * rkj + (-(xk.x-xj.x)/rkj) * rij); ddDeltav2a3 = ddDeltav2a3 * (2 * xj.x - xk.x - xi.x); ddDeltav2a4a1a = ddDeltav2a4a1a * (-1); ddDeltav2a4a2 = ddDeltav2a4a2 * (-(xi.x-xj.x)/rij); ddDeltav2a4c1a = ddDeltav2a4c1a * (-1); ddDeltav2a4c2 = ddDeltav2a4c2 * (-(xk.x-xj.x)/rkj); ddDeltav2a4b = ddDeltav2a4b * (-(xk.x-xj.x)/rkj); ddDeltav2a4d = ddDeltav2a4d * (-(xi.x-xj.x)/rij); break; case 1: ddDeltav1 = ddDeltav1 * ((2 * xj.y - xk.y - xi.y) * rij * rkj - (xij.dot(xkj)) * ((-(xi.y-xj.y)/rij) * rkj + (-(xk.y-xj.y)/rkj) * rij)); ddDeltav2b = ddDeltav2b * (2 * rij * (-(xi.y-xj.y)/rij) * Math.pow(rkj,2) + Math.pow(rij,2) * 2 * rkj * (-(xk.y-xj.y)/rkj)); ddDeltav2a1a = ddDeltav2a1a * -1; ddDeltav2a1b = ddDeltav2a1b * -1; ddDeltav2a2 = ddDeltav2a2 * ((-(xi.y-xj.y)/rij) * rkj + (-(xk.y-xj.y)/rkj) * rij); ddDeltav2a3 = ddDeltav2a3 * (2 * xj.y - xk.y - xi.y); ddDeltav2a4a1b = ddDeltav2a4a1b * (-1); ddDeltav2a4a2 = ddDeltav2a4a2 * (-(xi.y-xj.y)/rij); ddDeltav2a4c1b = ddDeltav2a4c1b * (-1); ddDeltav2a4c2 = ddDeltav2a4c2 * (-(xk.y-xj.y)/rkj); ddDeltav2a4b = ddDeltav2a4b * (-(xk.y-xj.y)/rkj); ddDeltav2a4d = ddDeltav2a4d * (-(xi.y-xj.y)/rij); break; case 2: ddDeltav1 = ddDeltav1 * ((2 * xj.z - xk.z - xi.z) * rij * rkj - (xij.dot(xkj)) * ((-(xi.z-xj.z)/rij) * rkj + (-(xk.z-xj.z)/rkj) * rij)); ddDeltav2b = ddDeltav2b * (2 * rij * (-(xi.z-xj.z)/rij) * Math.pow(rkj,2) + Math.pow(rij,2) * 2 * rkj * (-(xk.z-xj.z)/rkj)); ddDeltav2a1a = ddDeltav2a1a * -1; ddDeltav2a1b = ddDeltav2a1b * -1; ddDeltav2a2 = ddDeltav2a2 * ((-(xi.z-xj.z)/rij) * rkj + (-(xk.z-xj.z)/rkj) * rij); ddDeltav2a3 = ddDeltav2a3 * (2 * xj.z - xk.z - xi.z); ddDeltav2a4a1c = ddDeltav2a4a1c * (-1); ddDeltav2a4a2 = ddDeltav2a4a2 * (-(xi.z-xj.z)/rij); ddDeltav2a4c1c = ddDeltav2a4c1c * (-1); ddDeltav2a4c2 = ddDeltav2a4c2 * (-(xk.z-xj.z)/rkj); ddDeltav2a4b = ddDeltav2a4b * (-(xk.z-xj.z)/rkj); ddDeltav2a4d = ddDeltav2a4d * (-(xi.z-xj.z)/rij); break; } } if (angleAtomPosition[l][2] == atomNumbern) { switch (coordinaten) { case 0: ddDeltav1 = ddDeltav1 * ((xi.x-xj.x) * rij * rkj - (xij.dot(xkj)) * rij * ((xk.x-xj.x)/rkj)); ddDeltav2b = ddDeltav2b * Math.pow(rij,2) * 2 * rkj * ((xk.x-xj.x)/rkj); ddDeltav2a1a = ddDeltav2a1a * 1; ddDeltav2a1b = ddDeltav2a1b * 0; ddDeltav2a2 = ddDeltav2a2 * rij * ((xk.x-xj.x)/rkj); ddDeltav2a3 = ddDeltav2a3 * (xi.x-xj.x); ddDeltav2a4a1a = ddDeltav2a4a1a * 0; ddDeltav2a4a2 = ddDeltav2a4a2 * 0; ddDeltav2a4c1a = ddDeltav2a4c1a * 1; ddDeltav2a4c2 = ddDeltav2a4c2 * ((xk.x-xj.x)/rkj); ddDeltav2a4b = ddDeltav2a4b * ((xk.x-xj.x)/rkj); ddDeltav2a4d = ddDeltav2a4d * 0; break; case 1: ddDeltav1 = ddDeltav1 * ((xi.y-xj.y) * rij * rkj - (xij.dot(xkj)) * rij * ((xk.y-xj.y)/rkj)); ddDeltav2b = ddDeltav2b * Math.pow(rij,2) * 2 * rkj * ((xk.y-xj.y)/rkj); ddDeltav2a1a = ddDeltav2a1a * 1; ddDeltav2a1b = ddDeltav2a1b * 0; ddDeltav2a2 = ddDeltav2a2 * rij * ((xk.y-xj.y)/rkj); ddDeltav2a3 = ddDeltav2a3 * (xi.y-xj.y); ddDeltav2a4a1b = ddDeltav2a4a1b * 0; ddDeltav2a4a2 = ddDeltav2a4a2 * 0; ddDeltav2a4c1b = ddDeltav2a4c1b * 1; ddDeltav2a4c2 = ddDeltav2a4c2 * ((xk.y-xj.y)/rkj); ddDeltav2a4b = ddDeltav2a4b * ((xk.y-xj.y)/rkj); ddDeltav2a4d = ddDeltav2a4d * 0; break; case 2: ddDeltav1 = ddDeltav1 * ((xi.z-xj.z) * rij * rkj - (xij.dot(xkj)) * rij * ((xk.z-xj.z)/rkj)); ddDeltav2b = ddDeltav2b * Math.pow(rij,2) * 2 * rkj * ((xk.z-xj.z)/rkj); ddDeltav2a1a = ddDeltav2a1a * 1; ddDeltav2a1b = ddDeltav2a1b * 0; ddDeltav2a2 = ddDeltav2a2 * rij * ((xk.z-xj.z)/rkj); ddDeltav2a3 = ddDeltav2a3 * (xi.z-xj.z); ddDeltav2a4a1c = ddDeltav2a4a1c * 0; ddDeltav2a4a2 = ddDeltav2a4a2 * 0; ddDeltav2a4c1c = ddDeltav2a4c1c * 1; ddDeltav2a4c2 = ddDeltav2a4c2 * ((xk.z-xj.z)/rkj); ddDeltav2a4b = ddDeltav2a4b * ((xk.z-xj.z)/rkj); ddDeltav2a4d = ddDeltav2a4d * 0; break; } } ddDeltav2a4a1 = (ddDeltav2a4a1a + ddDeltav2a4a1b + ddDeltav2a4a1c) * rij; ddDeltav2a4c1 = (ddDeltav2a4c1a + ddDeltav2a4c1b + ddDeltav2a4c1c) * rkj; ddDeltav2a4 = ddDeltav2a4 * (((ddDeltav2a4a1 - ddDeltav2a4a2) / Math.pow(rij,2)) * rkj + ddDeltav2a4b + ((ddDeltav2a4c1 + ddDeltav2a4c2) / Math.pow(rkj,2)) * rij + ddDeltav2a4d); ddDeltav2 = ddDeltav2 * (((ddDeltav2a1a + ddDeltav2a1b) * ddDeltav2a1 + ddDeltav2a2 - ddDeltav2a3 - ddDeltav2a4) * ddDeltav2a - ddDeltav2b); ddDeltav[n][m][l] = ddDeltav1 + ddDeltav2; } } else { ddDeltav[n][m][l] = 0; } //System.out.println("ddDeltav[" + n + "][" + m + "][" + l + "] = " + ddDeltav[n][m][l]); } } } }
46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/9adcbd5769512fe518277f87ee5cc7c84de1ccb0/AngleBending.java/clean/src/org/openscience/cdk/modeling/forcefield/AngleBending.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 444, 8467, 38, 2846, 8211, 26239, 1535, 12, 43, 5018, 2745, 23, 72, 13, 288, 9506, 202, 449, 2837, 88, 842, 273, 394, 1645, 63, 5732, 23, 72, 18, 588, 1225, 1435, 6362,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 444, 8467, 38, 2846, 8211, 26239, 1535, 12, 43, 5018, 2745, 23, 72, 13, 288, 9506, 202, 449, 2837, 88, 842, 273, 394, 1645, 63, 5732, 23, 72, 18, 588, 1225, 1435, 6362,...
if (event.getButton() == MouseEvent.BUTTON1) {
} if ((event.getModifiers() & MouseEvent.BUTTON1_MASK) != 0) {
public void mouseReleased(MouseEvent event) { isUndoableChange = false; logger.debug("MouseReleased Event Props: mode=" + c2dm.getDrawModeString() + ", trigger=" + event.isPopupTrigger() + ", Button number: " + event.getButton() + ", Click count: " + event.getClickCount()); if (event.getButton() == MouseEvent.BUTTON1) { int[] screenCoords = {event.getX(), event.getY()}; int[] mouseCoords = getWorldCoordinates(screenCoords); int mouseX = mouseCoords[0]; int mouseY = mouseCoords[1]; if (c2dm.getDrawMode() == c2dm.SYMBOL) { Atom atomInRange = r2dm.getHighlightedAtom(); if (atomInRange != null) { int index = commonElements.indexOf(atomInRange.getSymbol()); if ((index < (commonElements.size() - 1)) && (index != -1)) { // pick next atom in list of common Elements index++; } else { index = 0; } String symbol = (String) commonElements.get(index); atomInRange.setSymbol(symbol); // configure the atom, so that the atomic number matches the symbol try { IsotopeFactory.getInstance().configure(atomInRange); } catch (Exception exception) { logger.error("Error while configuring atom"); logger.debug(exception); } // update atom AtomContainer container = ChemModelManipulator.getRelevantAtomContainer(chemModel, atomInRange); updateAtom(container, atomInRange); // also adjust the new draw elem c2dm.setDrawElement(symbol); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ r2dm.fireChange(); fireChange(); } } if (c2dm.getDrawMode() == c2dm.INCCHARGE) { Atom atomInRange = r2dm.getHighlightedAtom(); if (atomInRange != null) { atomInRange.setFormalCharge(atomInRange.getFormalCharge() + 1); // update atom AtomContainer container = ChemModelManipulator.getRelevantAtomContainer(chemModel, atomInRange); updateAtom(container, atomInRange); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom charge */ isUndoableChange = true; /* * --- */ r2dm.fireChange(); fireChange(); } } if (c2dm.getDrawMode() == c2dm.DECCHARGE) { Atom atomInRange = r2dm.getHighlightedAtom(); if (atomInRange != null) { atomInRange.setFormalCharge(atomInRange.getFormalCharge() - 1); // update atom AtomContainer container = ChemModelManipulator.getRelevantAtomContainer(chemModel, atomInRange); updateAtom(container, atomInRange); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ r2dm.fireChange(); fireChange(); } } if (c2dm.getDrawMode() == c2dm.DRAWBOND) { Atom atomInRange; Atom newAtom1; Atom newAtom2; Bond newBond; int startX = r2dm.getPointerVectorStart().x; int startY = r2dm.getPointerVectorStart().y; Bond bondInRange = r2dm.getHighlightedBond(); atomInRange = r2dm.getHighlightedAtom(); if (bondInRange != null) { // increase Bond order double order = bondInRange.getOrder(); if (order >= CDKConstants.BONDORDER_TRIPLE) { bondInRange.setOrder(CDKConstants.BONDORDER_SINGLE); } else { bondInRange.setOrder(order + 1.0); // this is tricky as it depends on the fact that the // constants are unidistant, i.e. {1.0, 2.0, 3.0}. } ; // update atoms Atom[] atoms = bondInRange.getAtoms(); AtomContainer container = ChemModelManipulator.getRelevantAtomContainer(chemModel, atoms[0]); updateAtoms(container, atoms); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ } else { if (atomInRange != null) { newAtom1 = atomInRange; } else { // create a new molecule newAtom1 = new Atom(c2dm.getDrawElement(), new Point2d(startX, startY)); AtomContainer atomCon = ChemModelManipulator.createNewMolecule(chemModel); atomCon.addAtom(newAtom1); // update atoms updateAtom(atomCon, newAtom1); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ } if (wasDragged) { int endX = r2dm.getPointerVectorEnd().x; int endY = r2dm.getPointerVectorEnd().y; atomInRange = getAtomInRange(endX, endY); AtomContainer atomCon = null; if (atomInRange != null) { newAtom2 = atomInRange; atomCon = ChemModelManipulator.getRelevantAtomContainer(chemModel, newAtom2); } else { newAtom2 = new Atom(c2dm.getDrawElement(), new Point2d(endX, endY)); atomCon = ChemModelManipulator.getRelevantAtomContainer(chemModel, newAtom1); atomCon.addAtom(newAtom2); } newBond = new Bond(newAtom1, newAtom2, 1); atomCon.addBond(newBond); // update atoms updateAtom(atomCon, newAtom2); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ } else if (atomInRange != null) { // add a new atom to the current atom in some random // direction AtomContainer atomCon = ChemModelManipulator.getRelevantAtomContainer(chemModel, atomInRange); Point2d center2D = atomCon.get2DCenter(); newAtom2 = new Atom(c2dm.getDrawElement(), atomInRange.getPoint2D()); // now create 2D coords for new atom double bondLength = r2dm.getBondLength(); Atom[] connectedAtoms = atomCon.getConnectedAtoms(atomInRange); AtomContainer placedAtoms = new AtomContainer(); for (int i = 0; i < connectedAtoms.length; i++) { placedAtoms.addAtom(connectedAtoms[i]); } AtomContainer unplacedAtoms = new AtomContainer(); unplacedAtoms.addAtom(newAtom2); AtomPlacer atomPlacer = new AtomPlacer(); atomPlacer.setMolecule(new Molecule(atomCon)); atomPlacer.distributePartners(atomInRange, placedAtoms, center2D, unplacedAtoms, bondLength); // now add the new atom atomCon.addAtom(newAtom2); atomCon.addBond(new Bond(atomInRange, newAtom2, 1.0)); // update atoms updateAtom(atomCon, atomInRange); updateAtom(atomCon, newAtom2); } } r2dm.fireChange(); fireChange(); } if (c2dm.getDrawMode() == c2dm.UP_BOND) { Bond bondInRange = r2dm.getHighlightedBond(); if (bondInRange != null) { // toggle bond stereo double stereo = bondInRange.getStereo(); if (stereo == CDKConstants.STEREO_BOND_UP) { bondInRange.setStereo(CDKConstants.STEREO_BOND_UP_INV); } else if (stereo == CDKConstants.STEREO_BOND_UP_INV) { bondInRange.setStereo(CDKConstants.STEREO_BOND_NONE); } else { bondInRange.setStereo(CDKConstants.STEREO_BOND_UP); } ; /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ } else { logger.warn("No bond in range!"); } r2dm.fireChange(); fireChange(); } if (c2dm.getDrawMode() == c2dm.DOWN_BOND) { logger.info("Toggling stereo bond down"); Bond bondInRange = r2dm.getHighlightedBond(); if (bondInRange != null) { // toggle bond stereo double stereo = bondInRange.getStereo(); if (stereo == CDKConstants.STEREO_BOND_DOWN) { bondInRange.setStereo(CDKConstants.STEREO_BOND_DOWN_INV); } else if (stereo == CDKConstants.STEREO_BOND_DOWN_INV) { bondInRange.setStereo(CDKConstants.STEREO_BOND_NONE); } else { bondInRange.setStereo(CDKConstants.STEREO_BOND_DOWN); } ; /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ } else { logger.warn("No bond in range!"); } r2dm.fireChange(); fireChange(); } if (c2dm.getDrawMode() == c2dm.SELECT && wasDragged) { logger.info("User asks to selected atoms"); AtomContainer selectedPart = new AtomContainer(); r2dm.setSelectedPart(selectedPart); r2dm.setSelectedPart(getContainedAtoms(r2dm.getSelectRect())); r2dm.setSelectRect(null); logger.debug("selected stuff " + selectedPart); } if (c2dm.getDrawMode() == c2dm.ERASER) { Atom highlightedAtom = r2dm.getHighlightedAtom(); Bond highlightedBond = r2dm.getHighlightedBond(); if (highlightedAtom != null) { logger.info("User asks to delete an Atom"); AtomContainer container = ChemModelManipulator.getAllInOneContainer(chemModel); logger.debug("Atoms before delete: " + container.getAtomCount()); ChemModelManipulator.removeAtomAndConnectedElectronContainers(chemModel, highlightedAtom); container = ChemModelManipulator.getAllInOneContainer(chemModel); logger.debug("Atoms before delete: " + container.getAtomCount()); // update atoms Atom[] atoms = container.getConnectedAtoms(highlightedAtom); AtomContainer atomCon = ChemModelManipulator.getRelevantAtomContainer(chemModel, atoms[0]); updateAtoms(atomCon, atoms); } else if (highlightedBond != null) { logger.info("User asks to delete a Bond"); ChemModelManipulator.removeElectronContainer(chemModel, highlightedBond); // update atoms Atom[] atoms = highlightedBond.getAtoms(); AtomContainer container = ChemModelManipulator.getRelevantAtomContainer(chemModel, atoms[0]); updateAtoms(container, atoms); } else { logger.warn("Cannot deleted if nothing is highlighted"); return; } /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ r2dm.fireChange(); fireChange(); } if (c2dm.getDrawMode() == c2dm.RING || c2dm.getDrawMode() == c2dm.BENZENERING) { Ring newRing; Point2d sharedAtomsCenter; Vector2d ringCenterVector; double bondLength; int pointerMarkX; int pointerMarkY; double ringRadius; double angle; double xDiff; double yDiff; double distance1 = 0; double distance2 = 0; Atom firstAtom; Atom secondAtom; Atom spiroAtom; Point2d conAtomsCenter = null; Point2d newPoint1; Point2d newPoint2; RingPlacer ringPlacer = new RingPlacer(); int ringSize = c2dm.getRingSize(); String symbol = c2dm.getDrawElement(); AtomContainer sharedAtoms = getHighlighted(); if (sharedAtoms.getAtomCount() == 0) { sharedAtoms = new AtomContainer(); newRing = new Ring(ringSize, symbol); if (c2dm.getDrawMode() == c2dm.BENZENERING) { // make newRing a benzene ring Bond[] bonds = newRing.getBonds(); bonds[0].setOrder(2.0); bonds[2].setOrder(2.0); bonds[4].setOrder(2.0); makeRingAromatic(newRing); } bondLength = r2dm.getBondLength(); ringRadius = (bondLength / 2) / Math.sin(Math.PI / c2dm.getRingSize()); sharedAtomsCenter = new Point2d(mouseX, mouseY - ringRadius); firstAtom = newRing.getAtomAt(0); firstAtom.setPoint2D(sharedAtomsCenter); sharedAtoms.addAtom(firstAtom); ringCenterVector = new Vector2d(new Point2d(mouseX, mouseY)); ringCenterVector.sub(sharedAtomsCenter); ringPlacer.placeSpiroRing(newRing, sharedAtoms, sharedAtomsCenter, ringCenterVector, bondLength); AtomContainer atomCon = ChemModelManipulator.createNewMolecule(chemModel); atomCon.add(newRing); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ } else if (sharedAtoms.getAtomCount() == 1) { spiroAtom = sharedAtoms.getAtomAt(0); sharedAtomsCenter = sharedAtoms.get2DCenter(); newRing = createAttachRing(sharedAtoms, ringSize, symbol); if (c2dm.getDrawMode() == c2dm.BENZENERING) { // make newRing a benzene ring Bond[] bonds = newRing.getBonds(); bonds[0].setOrder(2.0); bonds[2].setOrder(2.0); bonds[4].setOrder(2.0); makeRingAromatic(newRing); } bondLength = r2dm.getBondLength(); conAtomsCenter = getConnectedAtomsCenter(sharedAtoms); if (conAtomsCenter.equals(spiroAtom.getPoint2D())) { ringCenterVector = new Vector2d(0, 1); } else { ringCenterVector = new Vector2d(sharedAtomsCenter); ringCenterVector.sub(conAtomsCenter); } ringPlacer.placeSpiroRing(newRing, sharedAtoms, sharedAtomsCenter, ringCenterVector, bondLength); // removes the highlighed atom from the ring to add only the new placed // atoms to the AtomContainer. try { newRing.removeAtom(spiroAtom); } catch (Exception exc) { logger.error("Could not remove atom from ring"); logger.debug(exc); } AtomContainer atomCon = ChemModelManipulator.getRelevantAtomContainer(chemModel, spiroAtom); atomCon.add(newRing); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ } else if (sharedAtoms.getAtomCount() == 2) { sharedAtomsCenter = sharedAtoms.get2DCenter(); // calculate two points that are perpendicular to the highlighted bond // and have a certain distance from the bondcenter firstAtom = sharedAtoms.getAtomAt(0); secondAtom = sharedAtoms.getAtomAt(1); xDiff = secondAtom.getX2D() - firstAtom.getX2D(); yDiff = secondAtom.getY2D() - firstAtom.getY2D(); bondLength = Math.sqrt(Math.pow(xDiff, 2) + Math.pow(yDiff, 2)); angle = GeometryTools.getAngle(xDiff, yDiff); newPoint1 = new Point2d((Math.cos(angle + (Math.PI / 2)) * bondLength / 4) + sharedAtomsCenter.x, (Math.sin(angle + (Math.PI / 2)) * bondLength / 4) + sharedAtomsCenter.y); newPoint2 = new Point2d((Math.cos(angle - (Math.PI / 2)) * bondLength / 4) + sharedAtomsCenter.x, (Math.sin(angle - (Math.PI / 2)) * bondLength / 4) + sharedAtomsCenter.y); if (wasDragged) { // check which one of the two points is nearest to the endpoint of the pointer // vector that was dragged to make the ringCenterVector point into the right direction. pointerMarkX = r2dm.getPointerVectorEnd().x; pointerMarkY = r2dm.getPointerVectorEnd().y; distance1 = -1 * (Math.sqrt(Math.pow(newPoint1.x - pointerMarkX, 2) + Math.pow(newPoint1.y - pointerMarkY, 2))); distance2 = -1 * (Math.sqrt(Math.pow(newPoint2.x - pointerMarkX, 2) + Math.pow(newPoint2.y - pointerMarkY, 2))); r2dm.setPointerVectorStart(null); r2dm.setPointerVectorEnd(null); } else { // check which one of the two points is nearest to the center of the // connected atoms to make the ringCenterVector point into the right direction. conAtomsCenter = getConnectedAtomsCenter(sharedAtoms); distance1 = Math.sqrt(Math.pow(newPoint1.x - conAtomsCenter.x, 2) + Math.pow(newPoint1.y - conAtomsCenter.y, 2)); distance2 = Math.sqrt(Math.pow(newPoint2.x - conAtomsCenter.x, 2) + Math.pow(newPoint2.y - conAtomsCenter.y, 2)); } ringCenterVector = new Vector2d(sharedAtomsCenter); // no ring is attached if the two ditances are equal if (distance1 == distance2) { logger.warn("don't know where to draw the new Ring"); } else { if (distance1 < distance2) { ringCenterVector.sub(newPoint1); } else if (distance2 < distance1) { ringCenterVector.sub(newPoint2); } AtomContainer atomCon = ChemModelManipulator.getRelevantAtomContainer(chemModel, firstAtom); // construct a new Ring that contains the highlighted bond an its two atoms newRing = createAttachRing(sharedAtoms, ringSize, symbol); if (c2dm.getDrawMode() == c2dm.BENZENERING) { // make newRing a benzene ring Bond existingBond = atomCon.getBond(firstAtom, secondAtom); Bond[] bonds = newRing.getBonds(); if (existingBond.getOrder() == 1.0) { if (existingBond.getFlag(CDKConstants.ISAROMATIC)) { bonds[2].setOrder(2.0); bonds[4].setOrder(2.0); } else { bonds[1].setOrder(2.0); bonds[3].setOrder(2.0); bonds[5].setOrder(2.0); } } else { bonds[2].setOrder(2.0); bonds[4].setOrder(2.0); } makeRingAromatic(newRing); } // place the new atoms of the new ring to the right position ringPlacer.placeFusedRing(newRing, sharedAtoms, sharedAtomsCenter, ringCenterVector, bondLength); // removes the highlighed bond and its atoms from the ring to add only // the new placed atoms to the AtomContainer. try { newRing.remove(sharedAtoms); } catch (Exception exc) { logger.error("Could not remove atom from ring"); logger.debug(exc); } atomCon.add(newRing); } /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ } r2dm.fireChange(); fireChange(); } if (c2dm.getDrawMode() == c2dm.LASSO) { // first deselect all atoms r2dm.setSelectedPart(new AtomContainer()); // now select new atoms if (wasDragged) { Vector lassoPoints = r2dm.getLassoPoints(); r2dm.addLassoPoint(new Point((Point) lassoPoints.elementAt(0))); int number = lassoPoints.size(); logger.debug("# lasso points: " + number); int[] screenLassoCoords = new int[number * 2]; Point currentPoint; for (int i = 0; i < number; i++) { currentPoint = (Point) lassoPoints.elementAt(i); screenLassoCoords[i * 2] = currentPoint.x; screenLassoCoords[i * 2 + 1] = currentPoint.y; logger.debug("ScreenLasso(.x .y) = " + screenLassoCoords[i * 2] + ", " + screenLassoCoords[i * 2 + 1]); } /* * Convert points to world coordinates as they are * in screen coordinates in the vector */ int[] worldCoords = getWorldCoordinates(screenLassoCoords); logger.debug("Returned coords: " + worldCoords.length); logger.debug(" # points: " + number); int[] xPoints = new int[number]; int[] yPoints = new int[number]; for (int i = 0; i < number; i++) { xPoints[i] = worldCoords[i * 2]; yPoints[i] = worldCoords[i * 2 + 1]; logger.debug("WorldCoords(.x .y) = " + worldCoords[i * 2] + ", " + worldCoords[i * 2 + 1]); logger.debug("Polygon(.x .y) = " + xPoints[i] + ", " + yPoints[i]); } Polygon polygon = new Polygon(xPoints, yPoints, number); r2dm.setSelectedPart(getContainedAtoms(polygon)); r2dm.getLassoPoints().removeAllElements(); r2dm.fireChange(); } else { // one atom clicked or one bond clicked ChemObject chemObj = getChemObjectInRange(mouseX, mouseY); AtomContainer container = new AtomContainer(); if (chemObj instanceof Atom) { container.addAtom((Atom) chemObj); logger.debug("selected one atom in lasso mode"); r2dm.setSelectedPart(container); } else if (chemObj instanceof Bond) { Bond bond = (Bond) chemObj; container.addBond(bond); logger.debug("selected one bond in lasso mode"); Atom[] atoms = bond.getAtoms(); for (int i = 0; i < atoms.length; i++) { container.addAtom(atoms[i]); } r2dm.setSelectedPart(container); } } fireChange(); } if (c2dm.getDrawMode() == c2dm.MOVE) { if (draggingSelected == false) { // then it was dragging nearest Bond or Atom draggingSelected = true; r2dm.setSelectedPart(new AtomContainer()); } } if (wasDragged) { prevDragCoordX = 0; prevDragCoordY = 0; wasDragged = false; } } }
45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/d6ff6c772e1d5e98bcfd1cee2a6a3e8187d643f1/Controller2D.java/buggy/src/org/openscience/cdk/controller/Controller2D.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 7644, 26363, 12, 9186, 1133, 871, 13, 202, 95, 202, 202, 291, 31224, 429, 3043, 273, 629, 31, 202, 202, 4901, 18, 4148, 2932, 9186, 26363, 2587, 1186, 1121, 30, 1965, 154...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7644, 26363, 12, 9186, 1133, 871, 13, 202, 95, 202, 202, 291, 31224, 429, 3043, 273, 629, 31, 202, 202, 4901, 18, 4148, 2932, 9186, 26363, 2587, 1186, 1121, 30, 1965, 154...
public Object next(){ String nextHostname = (String)mxHosts.next(); Record[] aRecords = lookup(nextHostname, Type.A); return new SMTPHostAddressesImpl(aRecords, nextHostname); }
return addresses.next(); }
public Iterator getSMTPHostAddresses(final String domainName) { return new Iterator() { private Iterator mxHosts = new MxSorter(domainName); public boolean hasNext(){ return mxHosts.hasNext(); } public Object next(){ String nextHostname = (String)mxHosts.next(); Record[] aRecords = lookup(nextHostname, Type.A); return new SMTPHostAddressesImpl(aRecords, nextHostname); } public void remove () { throw new UnsupportedOperationException ("remove not supported by this iterator"); } }; }
47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/274f70db4af97b826f9436dce43c6133c79c74ed/DNSServer.java/clean/branches/branch_2_1_fcs/src/java/org/apache/james/dnsserver/DNSServer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 4498, 1322, 14636, 2594, 7148, 12, 6385, 514, 21044, 13, 288, 3639, 327, 394, 4498, 1435, 288, 7734, 3238, 4498, 7938, 12172, 273, 394, 28185, 24952, 12, 4308, 461, 1769, 27573, 1071,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4498, 1322, 14636, 2594, 7148, 12, 6385, 514, 21044, 13, 288, 3639, 327, 394, 4498, 1435, 288, 7734, 3238, 4498, 7938, 12172, 273, 394, 28185, 24952, 12, 4308, 461, 1769, 27573, 1071,...
private Router startupGame(TransportManager transportManager, DeploymentRec game, StatusReport installationReport) { Router router = null; int gameID = game.getID(); try { router = new RouterImpl(transportManager); } catch (Exception e){ e.printStackTrace(); return null; } int gameCount = Integer.parseInt(installationReport.getParameter("game", "count")); String statusBlockName = "game." + gameCount; installationReport.setParameter( statusBlockName, "id", Integer.toString(gameID)); installationReport.setParameter( statusBlockName, "description", game.getDescription()); installationReport.setParameter( statusBlockName, "name", game.getName()); int umgrCount = 0; // create simulation container for game // create user managers for (UserMgrRec umgrRec : game.getUserManagers()) { String serverClassName = umgrRec.getServerClassName(); String umgrBlock = statusBlockName + ".umgr." + umgrCount; umgrCount++; installationReport.setParameter( statusBlockName + ".umgr", "count", Integer.toString(umgrCount)); try { Class serverClass = Class.forName(serverClassName); Constructor constructor = serverClass.getConstructor(new Class[] { Router.class, Map.class}); UserManager umgr = (UserManager) constructor.newInstance(new Object[] { router,umgrRec.getParameterMap()}); installationReport.setParameter(umgrBlock, "clientClassName", umgr.getClientClassname()); Set clientParams = umgr.getClientParams().entrySet(); installationReport.setParameter( umgrBlock + ".params", "count", Integer.toString(clientParams.size())); int c = 0; for (Iterator i2 = clientParams.iterator(); i2.hasNext(); ) { Entry entry = (Entry) i2.next(); installationReport.setParameter( umgrBlock + ".params.keys", Integer.toString(c), (String) entry.getKey()); installationReport.setParameter( umgrBlock + ".params.values", Integer.toString(c), (String) entry.getValue()); c++; } if (umgrRec.hasLoginModules()) { LoginModuleValidatorFactory validatorFactory = new LoginModuleValidatorFactory(); for (LoginModuleRec lmoduleRec : umgrRec.getLoginModules() ) { String loginModuleClassname = lmoduleRec.getModuleClassName(); Class loginModuleClass = Class.forName(loginModuleClassname); validatorFactory.addLoginModule(loginModuleClass); } umgr.setUserValidatorFactory(validatorFactory); } // add client to list // need to start boot method in container if it has one here. } catch (Exception ex) { ex.printStackTrace(); } gameCount++; installationReport.setParameter("game", "count", Integer.toString(gameCount)); } return router; }
55380 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55380/96b8c34a552c4fde1dbf307285233759afb44ea3/SGS.java/buggy/src/com/sun/gi/SGS.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3238, 8259, 23939, 12496, 12, 6568, 1318, 13049, 1318, 16, 6733, 5650, 13957, 16, 1482, 4820, 5425, 367, 4820, 15329, 8259, 10717, 33, 2011, 31, 474, 13957, 734, 33, 13957, 18, 588, 734, 5621, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3238, 8259, 23939, 12496, 12, 6568, 1318, 13049, 1318, 16, 6733, 5650, 13957, 16, 1482, 4820, 5425, 367, 4820, 15329, 8259, 10717, 33, 2011, 31, 474, 13957, 734, 33, 13957, 18, 588, 734, 5621, ...
public org.quickfix.field.NoLegStipulations getNoLegStipulations() throws FieldNotFound { org.quickfix.field.NoLegStipulations value = new org.quickfix.field.NoLegStipulations();
public quickfix.field.NoLegStipulations getNoLegStipulations() throws FieldNotFound { quickfix.field.NoLegStipulations value = new quickfix.field.NoLegStipulations();
public org.quickfix.field.NoLegStipulations getNoLegStipulations() throws FieldNotFound { org.quickfix.field.NoLegStipulations value = new org.quickfix.field.NoLegStipulations(); getField(value); return value; }
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/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, 2279, 8329, 510, 625, 21011, 336, 2279, 8329, 510, 625, 21011, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 2279, 8329, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2279, 8329, 510, 625, 21011, 336, 2279, 8329, 510, 625, 21011, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 2279, 8329, ...
AbstractModule m = getModule("__builtin__", state.nature); return m.getGlobalTokens("int", this, state.line, state.col, state.nature);
state2.activationToken = "int";
private IToken[] getBuiltinsCompletions(CompletionState state){ //check for the builtin types. if(state.activationToken.endsWith("'") || state.activationToken.endsWith("\"")){ //ok, we are getting code completion for a string. AbstractModule m = getModule("__builtin__", state.nature); return m.getGlobalTokens("str", this, state.line, state.col, state.nature); } if(state.activationToken.endsWith("]")){ //ok, we are getting code completion for a list. AbstractModule m = getModule("__builtin__", state.nature); return m.getGlobalTokens("list", this, state.line, state.col, state.nature); } if(state.activationToken.endsWith("}")){ //ok, we are getting code completion for a dict. AbstractModule m = getModule("__builtin__", state.nature); return m.getGlobalTokens("dict", this, state.line, state.col, state.nature); } try { Integer.parseInt(state.activationToken); AbstractModule m = getModule("__builtin__", state.nature); return m.getGlobalTokens("int", this, state.line, state.col, state.nature); } catch (Exception e) { //ok, not parsed as int } try { Float.parseFloat(state.activationToken); AbstractModule m = getModule("__builtin__", state.nature); return m.getGlobalTokens("float", this, state.line, state.col, state.nature); } catch (Exception e) { //ok, not parsed as int } return null; }
1319 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1319/5007693acc9ad007f28a92b1a6bde8892efba8f9/ASTManager.java/buggy/org.python.pydev/src/org/python/pydev/editor/codecompletion/revisited/ASTManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 467, 1345, 8526, 2882, 4853, 2679, 6297, 1115, 12, 11238, 1119, 919, 15329, 3639, 368, 1893, 364, 326, 15273, 1953, 18, 3639, 309, 12, 2019, 18, 16908, 1345, 18, 5839, 1190, 2932, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 467, 1345, 8526, 2882, 4853, 2679, 6297, 1115, 12, 11238, 1119, 919, 15329, 3639, 368, 1893, 364, 326, 15273, 1953, 18, 3639, 309, 12, 2019, 18, 16908, 1345, 18, 5839, 1190, 2932, 4...
}
private void load() { InputStream in = null; try { try { String[] args = { vfs.getFileName(path) }; setStatus(jEdit.getProperty("vfs.status.load",args)); setAbortable(true); setProgressValue(0); path = vfs._canonPath(session,path,view); VFS.DirectoryEntry entry = vfs._getDirectoryEntry( session,path,view); long length; if(entry != null) length = entry.length; else length = 0L; in = vfs._createInputStream(session,path,false,view); if(in == null) { System.err.println("in = null"); return; } in = new BufferedInputStream(in); if(in.markSupported()) { in.mark(2); int b1 = in.read(); int b2 = in.read(); in.reset(); if(b1 == GZIP_MAGIC_1 && b2 == GZIP_MAGIC_2) { in = new GZIPInputStream(in); buffer.setBooleanProperty(Buffer.GZIPPED,true); } else if((b1 == UNICODE_MAGIC_1 && b2 == UNICODE_MAGIC_2) || (b1 == UNICODE_MAGIC_2 && b2 == UNICODE_MAGIC_1)) { buffer.setProperty(Buffer.ENCODING,"Unicode"); } } else if(path.toLowerCase().endsWith(".gz")) in = new GZIPInputStream(in); read(buffer,in,length); buffer.setNewFile(false); } catch(CharConversionException ch) { Log.log(Log.ERROR,this,ch); Object[] pp = { buffer.getProperty(Buffer.ENCODING), ch.toString() }; VFSManager.error(view,path,"ioerror.encoding-error",pp); buffer.setBooleanProperty(ERROR_OCCURRED,true); } catch(IOException io) { Log.log(Log.ERROR,this,io); Object[] pp = { io.toString() }; VFSManager.error(view,path,"ioerror.read-error",pp); buffer.setBooleanProperty(ERROR_OCCURRED,true); } catch(OutOfMemoryError oom) { Log.log(Log.ERROR,this,oom); VFSManager.error(view,path,"out-of-memory-error",null); buffer.setBooleanProperty(ERROR_OCCURRED,true); } if(jEdit.getBooleanProperty("persistentMarkers")) { try { String[] args = { vfs.getFileName(path) }; setStatus(jEdit.getProperty("vfs.status.load-markers",args)); setAbortable(true); in = vfs._createInputStream(session,markersPath,true,view); if(in != null) readMarkers(buffer,in); } catch(IOException io) { // ignore } } } catch(WorkThread.Abort a) { if(in != null) { try { in.close(); } catch(IOException io) { } } buffer.setBooleanProperty(ERROR_OCCURRED,true); } finally { try { vfs._endVFSSession(session,view); } catch(IOException io) { Log.log(Log.ERROR,this,io); String[] pp = { io.toString() }; VFSManager.error(view,path,"ioerror.read-error",pp); buffer.setBooleanProperty(ERROR_OCCURRED,true); } catch(WorkThread.Abort a) { buffer.setBooleanProperty(ERROR_OCCURRED,true); } } } //}}}
8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/bbab12baa0a51912bf514b2bd5d48199075a8b2f/BufferIORequest.java/buggy/org/gjt/sp/jedit/io/BufferIORequest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1262, 1435, 202, 95, 202, 202, 4348, 316, 273, 446, 31, 202, 202, 698, 202, 202, 95, 1082, 202, 698, 1082, 202, 95, 9506, 202, 780, 8526, 833, 273, 288, 20682, 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, 225, 202, 1152, 918, 1262, 1435, 202, 95, 202, 202, 4348, 316, 273, 446, 31, 202, 202, 698, 202, 202, 95, 1082, 202, 698, 1082, 202, 95, 9506, 202, 780, 8526, 833, 273, 288, 20682, 18, 588...
throw new ArgumentError(recv.getRuntime(), "odd number of args for Hash");
throw recv.getRuntime().newArgumentError("odd number of args for Hash");
public static RubyHash create(IRubyObject recv, IRubyObject[] args) { RubyHash hash = new RubyHash(recv.getRuntime()); if (args.length == 1) { hash.setValueMap(new HashMap(((RubyHash) args[0]).getValueMap())); } else if (args.length % 2 != 0) { throw new ArgumentError(recv.getRuntime(), "odd number of args for Hash"); } else { for (int i = 0; i < args.length; i += 2) { hash.aset(args[i], args[i + 1]); } } return hash; }
45827 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45827/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyHash.java/clean/src/org/jruby/RubyHash.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 19817, 2310, 752, 12, 7937, 10340, 921, 10665, 16, 15908, 10340, 921, 8526, 833, 13, 288, 3639, 19817, 2310, 1651, 273, 394, 19817, 2310, 12, 18334, 18, 588, 5576, 10663, 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, 19817, 2310, 752, 12, 7937, 10340, 921, 10665, 16, 15908, 10340, 921, 8526, 833, 13, 288, 3639, 19817, 2310, 1651, 273, 394, 19817, 2310, 12, 18334, 18, 588, 5576, 10663, 3639, ...
else priorityCombos[j].add(oldSelection);
} else { priorityCombos[j].add(oldSelection); }
public void widgetSelected(SelectionEvent e) { int oldSelectionDirection = TableSorter.ASCENDING; if (descendingButtons[index].getSelection()) oldSelectionDirection = TableSorter.DESCENDING; ArrayList oldSelectionList = new ArrayList(Arrays .asList(priorityCombos[index].getItems())); oldSelectionList.removeAll(Arrays .asList(priorityCombos[index + 1].getItems())); if (oldSelectionList.size() != 1) return; String oldSelection = (String) oldSelectionList.get(0); String newSelection = priorityCombos[index] .getItem(priorityCombos[index] .getSelectionIndex()); if (oldSelection.equals(newSelection)) { return; } for (int j = index + 1; j < priorityCombos.length; j++) { int newSelectionIndex = priorityCombos[j] .indexOf(newSelection); //this combo's current selection is equal to newSelection if (priorityCombos[j].getSelectionIndex() == newSelectionIndex) { priorityCombos[j].remove(newSelection); int insertionPoint = -1 - Arrays.binarySearch(priorityCombos[j] .getItems(), oldSelection, columnComparator); if (insertionPoint >= 0 && insertionPoint <= priorityCombos[j] .getItemCount()) priorityCombos[j].add(oldSelection, insertionPoint); else priorityCombos[j].add(oldSelection); priorityCombos[j].select(priorityCombos[j] .indexOf(oldSelection)); ascendingButtons[index] .setSelection(ascendingButtons[j] .getSelection()); descendingButtons[index] .setSelection(descendingButtons[j] .getSelection()); ascendingButtons[j] .setSelection(oldSelectionDirection == TableSorter.ASCENDING); descendingButtons[j] .setSelection(oldSelectionDirection == TableSorter.DESCENDING); } //this combo contains newSelection else if (newSelectionIndex >= 0) { priorityCombos[j].remove(newSelection); int insertionPoint = -1 - Arrays.binarySearch(priorityCombos[j] .getItems(), oldSelection, columnComparator); if (insertionPoint >= 0 && insertionPoint <= priorityCombos[j] .getItemCount()) priorityCombos[j].add(oldSelection, insertionPoint); else priorityCombos[j].add(oldSelection); } } markDirty(); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/TableSortDialog.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/TableSortDialog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 5397, 1071, 918, 3604, 7416, 12, 6233, 1133, 425, 13, 288, 13491, 509, 1592, 6233, 8212, 273, 3555, 24952, 18, 8633, 12280, 31, 13491, 309, 261, 5569, 2846, 14388, 63, 1615, 8009, 588, 6233, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 5397, 1071, 918, 3604, 7416, 12, 6233, 1133, 425, 13, 288, 13491, 509, 1592, 6233, 8212, 273, 3555, 24952, 18, 8633, 12280, 31, 13491, 309, 261, 5569, 2846, 14388, 63, 1615, 8009, 588, 6233, 1...
GridData gdBTNFormatSpecifier = new GridData( ); gdBTNFormatSpecifier.widthHint = 20; btnFormatSpecifier.setLayoutData( gdBTNFormatSpecifier ); btnFormatSpecifier.setImage( UIHelper.getImage( "icons/obj16/formatbuilder.gif" ) ); btnFormatSpecifier.setToolTipText( Messages.getString( "Shared.Tooltip.FormatSpecifier" ) ); btnFormatSpecifier.addSelectionListener( this ); btnFormatSpecifier.getImage( ) .setBackground( btnFormatSpecifier.getBackground( ) );
{ GridData gdBTNFormatSpecifier = new GridData( ); gdBTNFormatSpecifier.widthHint = 20; gdBTNFormatSpecifier.horizontalIndent = -3; btnFormatSpecifier.setLayoutData( gdBTNFormatSpecifier ); btnFormatSpecifier.setImage( UIHelper.getImage( "icons/obj16/formatbuilder.gif" ) ); btnFormatSpecifier.setToolTipText( Messages.getString( "Shared.Tooltip.FormatSpecifier" ) ); btnFormatSpecifier.addSelectionListener( this ); btnFormatSpecifier.getImage( ) .setBackground( btnFormatSpecifier.getBackground( ) ); }
public void getComponent( Composite parent ) { cmpContent = new Composite( parent, SWT.NONE ); { GridLayout glContent = new GridLayout( 2, false ); cmpContent.setLayout( glContent ); GridData gd = new GridData( GridData.FILL_BOTH ); cmpContent.setLayoutData( gd ); } Composite cmpBasic = new Composite( cmpContent, SWT.NONE ); { cmpBasic.setLayout( new GridLayout( 3, false ) ); cmpBasic.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); } new Label( cmpBasic, SWT.NONE ).setText( Messages.getString( "AxisYSheetImpl.Label.Title" ) ); //$NON-NLS-1$ List keys = null; if ( serviceprovider != null ) { keys = serviceprovider.getRegisteredKeys( ); } txtTitle = new ExternalizedTextEditorComposite( cmpBasic, SWT.BORDER | SWT.SINGLE, -1, -1, keys, serviceprovider, getAxisForProcessing( ).getTitle( ).getCaption( ).getValue( ) ); { GridData gd = new GridData( GridData.FILL_HORIZONTAL ); gd.horizontalSpan = 2; txtTitle.setLayoutData( gd ); txtTitle.addListener( this ); } Label lblType = new Label( cmpBasic, SWT.NONE ); lblType.setText( Messages.getString( "OrthogonalAxisDataSheetImpl.Lbl.Type" ) ); //$NON-NLS-1$ cmbTypes = new Combo( cmpBasic, SWT.DROP_DOWN | SWT.READ_ONLY ); { GridData gd = new GridData( GridData.FILL_HORIZONTAL ); cmbTypes.setLayoutData( gd ); cmbTypes.addSelectionListener( this ); } btnFormatSpecifier = new Button( cmpBasic, SWT.PUSH ); GridData gdBTNFormatSpecifier = new GridData( ); gdBTNFormatSpecifier.widthHint = 20; btnFormatSpecifier.setLayoutData( gdBTNFormatSpecifier ); btnFormatSpecifier.setImage( UIHelper.getImage( "icons/obj16/formatbuilder.gif" ) ); //$NON-NLS-1$ btnFormatSpecifier.setToolTipText( Messages.getString( "Shared.Tooltip.FormatSpecifier" ) ); //$NON-NLS-1$ btnFormatSpecifier.addSelectionListener( this ); btnFormatSpecifier.getImage( ) .setBackground( btnFormatSpecifier.getBackground( ) ); Label lblOrigin = new Label( cmpBasic, SWT.NONE ); lblOrigin.setText( Messages.getString( "OrthogonalAxisDataSheetImpl.Lbl.Origin" ) ); //$NON-NLS-1$ cmbOrigin = new Combo( cmpBasic, SWT.DROP_DOWN | SWT.READ_ONLY ); { GridData gd = new GridData( GridData.FILL_HORIZONTAL ); gd.horizontalSpan = 2; cmbOrigin.setLayoutData( gd ); cmbOrigin.addSelectionListener( this ); } boolean bValueOrigin = false; if ( getAxisForProcessing( ).getOrigin( ) != null ) { if ( getAxisForProcessing( ).getOrigin( ) .getType( ) .equals( IntersectionType.VALUE_LITERAL ) ) { bValueOrigin = true; } } lblValue = new Label( cmpBasic, SWT.NONE ); { lblValue.setText( Messages.getString( "BaseAxisDataSheetImpl.Lbl.Value" ) ); //$NON-NLS-1$ lblValue.setEnabled( bValueOrigin ); } txtValue = new TextEditorComposite( cmpBasic, SWT.BORDER | SWT.SINGLE ); { GridData gd = new GridData( GridData.FILL_HORIZONTAL ); gd.horizontalSpan = 2; txtValue.setLayoutData( gd ); txtValue.addListener( this ); txtValue.setEnabled( bValueOrigin ); } new Label( cmpBasic, SWT.NONE ).setText( Messages.getString( "AxisYSheetImpl.Label.Labels" ) ); //$NON-NLS-1$ btnVisible = new Button( cmpBasic, SWT.CHECK ); { btnVisible.setText( Messages.getString( "AxisYSheetImpl.Label.Visible" ) ); //$NON-NLS-1$ GridData gd = new GridData( GridData.FILL_HORIZONTAL ); gd.horizontalSpan = 2; btnVisible.setLayoutData( gd ); btnVisible.addSelectionListener( this ); btnVisible.setSelection( getAxisForProcessing( ).getLabel( ) .isVisible( ) ); } createButtonGroup( cmpContent ); populateLists( ); }
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/ac26365eb54b9a10e69498a213cb6f605f15760b/AxisYSheetImpl.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/format/axis/AxisYSheetImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 10322, 12, 14728, 982, 262, 202, 95, 202, 202, 9625, 1350, 273, 394, 14728, 12, 982, 16, 348, 8588, 18, 9826, 11272, 202, 202, 95, 1082, 202, 6313, 3744, 5118, 1350, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 10322, 12, 14728, 982, 262, 202, 95, 202, 202, 9625, 1350, 273, 394, 14728, 12, 982, 16, 348, 8588, 18, 9826, 11272, 202, 202, 95, 1082, 202, 6313, 3744, 5118, 1350, 273,...
tilebmpFile = name;
tilebmpFile = new File(name); tilebmpFileLastModified = tilebmpFile.lastModified();
public void setTilesetImageFilename(String name) { tilebmpFile = name; }
6621 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6621/4d9c6db9217eca659efd010fb07842c209998861/TileSet.java/clean/src/tiled/core/TileSet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 444, 27669, 278, 2040, 5359, 12, 780, 508, 13, 288, 3639, 4769, 70, 1291, 812, 273, 394, 1387, 12, 529, 1769, 4769, 70, 1291, 812, 14747, 273, 4769, 70, 1291, 812, 18, 2722, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 444, 27669, 278, 2040, 5359, 12, 780, 508, 13, 288, 3639, 4769, 70, 1291, 812, 273, 394, 1387, 12, 529, 1769, 4769, 70, 1291, 812, 14747, 273, 4769, 70, 1291, 812, 18, 2722, ...
this.serviceprovider = builder; this.oContext = oContext;
this.context = context;
public DefaultBaseSeriesComponent( SeriesDefinition seriesDefn, IUIServiceProvider builder, Object oContext, String sTitle ) { super( ); this.seriesDefn = seriesDefn; this.serviceprovider = builder; this.oContext = oContext; this.sTitle = sTitle; }
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/c60a4815037b62e9358af2625eb6236e7c979d0f/DefaultBaseSeriesComponent.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/data/DefaultBaseSeriesComponent.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 2989, 2171, 6485, 1841, 12, 9225, 1852, 4166, 3262, 82, 16, 1082, 202, 45, 5370, 16300, 2089, 16, 1033, 320, 1042, 16, 514, 272, 4247, 262, 202, 95, 202, 202, 9565, 12, 11272,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2989, 2171, 6485, 1841, 12, 9225, 1852, 4166, 3262, 82, 16, 1082, 202, 45, 5370, 16300, 2089, 16, 1033, 320, 1042, 16, 514, 272, 4247, 262, 202, 95, 202, 202, 9565, 12, 11272,...
try { System.out.println("Atom " + molecule.getAtomNumber(bond.getAtomAt(1)) + " is placed"); System.out.println("Atom " + molecule.getAtomNumber(bond.getAtomAt(0)) + " is not placed"); System.out.println("Atom " + molecule.getAtomNumber(bond.getAtomAt(0)) + " is not in Ring"); } catch(Exception exc) { }
private Atom getNextAtomWithAliphaticUnplacedNeigbors() { Bond bond = null; for (int f = 0; f < molecule.getBondCount(); f++) { bond = molecule.getBondAt(f); if (bond.getAtomAt(1).flags[ISPLACED] && !bond.getAtomAt(0).flags[ISPLACED] ) { // && !bond.getAtomAt(0).flags[ISINRING] try { System.out.println("Atom " + molecule.getAtomNumber(bond.getAtomAt(1)) + " is placed"); System.out.println("Atom " + molecule.getAtomNumber(bond.getAtomAt(0)) + " is not placed"); System.out.println("Atom " + molecule.getAtomNumber(bond.getAtomAt(0)) + " is not in Ring"); } catch(Exception exc) { } return bond.getAtomAt(1); } if (bond.getAtomAt(0).flags[ISPLACED] && !bond.getAtomAt(1).flags[ISPLACED] ) { //&& !bond.getAtomAt(1).flags[ISINRING] try { System.out.println("Atom " + molecule.getAtomNumber(bond.getAtomAt(1)) + " is placed"); System.out.println("Atom " + molecule.getAtomNumber(bond.getAtomAt(0)) + " is not placed"); System.out.println("Atom " + molecule.getAtomNumber(bond.getAtomAt(0)) + " is not in Ring"); } catch(Exception exc) { } return bond.getAtomAt(0); } } return null; }
45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/34bc71f72cf2676165c2b4ab2ea57d0a6b7dc876/StructureDiagramGenerator.java/clean/org/openscience/cdk/layout/StructureDiagramGenerator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 7149, 6927, 3641, 1190, 37, 549, 844, 2126, 984, 28238, 6586, 360, 70, 1383, 1435, 202, 95, 202, 202, 9807, 8427, 273, 446, 31, 3196, 202, 1884, 261, 474, 284, 273, 374, 31, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 7149, 6927, 3641, 1190, 37, 549, 844, 2126, 984, 28238, 6586, 360, 70, 1383, 1435, 202, 95, 202, 202, 9807, 8427, 273, 446, 31, 3196, 202, 1884, 261, 474, 284, 273, 374, 31, ...
panel.add(BorderLayout.CENTER,valueBox);
labelAndValueBox.add(BorderLayout.CENTER,valueBox); panel.add(BorderLayout.NORTH,labelAndValueBox);
InstallPluginsDialog(JDialog dialog, Vector model, int mode) { super(JOptionPane.getFrameForComponent(dialog), (mode == INSTALL ? jEdit.getProperty("install-plugins.title") : jEdit.getProperty("update-plugins.title")),true); JPanel content = new JPanel(new BorderLayout(12,12)); content.setBorder(new EmptyBorder(12,12,12,12)); setContentPane(content); JLabel label = new JLabel(jEdit.getProperty("install-plugins.caption")); content.add(BorderLayout.NORTH,label); plugins = new JCheckBoxList(model); plugins.getSelectionModel().addListSelectionListener(new ListHandler()); plugins.getModel().addTableModelListener(new TableModelHandler()); JScrollPane scroller = new JScrollPane(plugins); scroller.setPreferredSize(new Dimension(200,0)); content.add(BorderLayout.WEST,scroller); JPanel panel = new JPanel(new BorderLayout()); panel.setBorder(new TitledBorder(jEdit.getProperty("install-plugins" + ".plugin-info"))); JPanel labelBox = new JPanel(new GridLayout( (mode == UPDATE ? 7 : 6),1,0,3)); labelBox.setBorder(new EmptyBorder(0,0,3,12)); labelBox.add(new JLabel(jEdit.getProperty("install-plugins" + ".info.name"),SwingConstants.RIGHT)); labelBox.add(new JLabel(jEdit.getProperty("install-plugins" + ".info.author"),SwingConstants.RIGHT)); labelBox.add(new JLabel(jEdit.getProperty("install-plugins" + ".info.size"),SwingConstants.RIGHT)); labelBox.add(new JLabel(jEdit.getProperty("install-plugins" + ".info.latest-version"),SwingConstants.RIGHT)); if(mode == UPDATE) { labelBox.add(new JLabel(jEdit.getProperty("install-plugins" + ".info.installed-version"),SwingConstants.RIGHT)); } labelBox.add(new JLabel(jEdit.getProperty("install-plugins" + ".info.updated"),SwingConstants.RIGHT)); labelBox.add(new JLabel(jEdit.getProperty("install-plugins" + ".info.description"),SwingConstants.RIGHT)); panel.add(BorderLayout.WEST,labelBox); JPanel valueBox = new JPanel(new GridLayout( (mode == UPDATE ? 7 : 6),1,0,3)); valueBox.setBorder(new EmptyBorder(0,0,3,0)); valueBox.add(name = new JLabel()); valueBox.add(author = new JLabel()); valueBox.add(size = new JLabel()); valueBox.add(latestVersion = new JLabel()); if(mode == UPDATE) valueBox.add(installedVersion = new JLabel()); valueBox.add(updated = new JLabel()); valueBox.add(Box.createGlue()); panel.add(BorderLayout.CENTER,valueBox); description = new JTextArea(6,50); description.setEditable(false); description.setLineWrap(true); description.setWrapStyleWord(true); panel.add(BorderLayout.SOUTH,new JScrollPane(description)); content.add(BorderLayout.CENTER,panel); panel = new JPanel(new BorderLayout(12,0)); JPanel panel2 = new JPanel(new GridLayout((mode == INSTALL ? 4 : 2),1)); Box totalSizeBox = new Box(BoxLayout.X_AXIS); totalSizeBox.add(new JLabel(jEdit.getProperty("install-plugins.totalSize"))); totalSizeBox.add(Box.createHorizontalStrut(12)); totalSizeBox.add(totalSize = new JLabel()); panel2.add(totalSizeBox); panel2.add(downloadSource = new JCheckBox( jEdit.getProperty("install-plugins.downloadSource"))); downloadSource.setSelected(jEdit.getBooleanProperty("install-plugins" + ".downloadSource.value")); downloadSource.addActionListener(new ActionHandler()); if(mode == INSTALL) { ButtonGroup grp = new ButtonGroup(); installUser = new JRadioButton(); String settings = jEdit.getSettingsDirectory(); if(settings == null) { settings = jEdit.getProperty("install-plugins.none"); installUser.setEnabled(false); } else { settings = MiscUtilities.constructPath(settings,"jars"); installUser.setEnabled(true); } String[] args = { settings }; installUser.setText(jEdit.getProperty("install-plugins.user",args)); grp.add(installUser); panel2.add(installUser); installSystem = new JRadioButton(); String jEditHome = jEdit.getJEditHome(); if(jEditHome == null) { jEditHome = jEdit.getProperty("install-plugins.none"); installSystem.setEnabled(false); } else { jEditHome = MiscUtilities.constructPath(jEditHome,"jars"); installSystem.setEnabled(true); } args[0] = jEditHome; installSystem.setText(jEdit.getProperty("install-plugins.system",args)); grp.add(installSystem); panel2.add(installSystem); if(installUser.isEnabled()) installUser.setSelected(true); else installSystem.setSelected(true); } panel.add(BorderLayout.NORTH,panel2); Box box = new Box(BoxLayout.X_AXIS); box.add(Box.createGlue()); install = new JButton(jEdit.getProperty("install-plugins.install")); install.setEnabled(false); getRootPane().setDefaultButton(install); install.addActionListener(new ActionHandler()); box.add(install); box.add(Box.createHorizontalStrut(6)); cancel = new JButton(jEdit.getProperty("common.cancel")); cancel.addActionListener(new ActionHandler()); box.add(cancel); box.add(Box.createHorizontalStrut(6)); box.add(Box.createGlue()); panel.add(BorderLayout.SOUTH,box); content.add(BorderLayout.SOUTH,panel); updateTotalSize(); pack(); setLocationRelativeTo(dialog); show(); } //}}}
8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/4de5df49e47dc1c7ada553f3b4f236eb29452500/InstallPluginsDialog.java/buggy/org/gjt/sp/jedit/pluginmgr/InstallPluginsDialog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 6410, 9461, 6353, 12, 46, 6353, 6176, 16, 5589, 938, 16, 509, 1965, 13, 202, 95, 202, 202, 9565, 12, 46, 1895, 8485, 18, 588, 3219, 1290, 1841, 12, 12730, 3631, 1082, 202, 12, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 6410, 9461, 6353, 12, 46, 6353, 6176, 16, 5589, 938, 16, 509, 1965, 13, 202, 95, 202, 202, 9565, 12, 46, 1895, 8485, 18, 588, 3219, 1290, 1841, 12, 12730, 3631, 1082, 202, 12, 31...
public org.quickfix.field.MoneyLaunderingStatus getMoneyLaunderingStatus() throws FieldNotFound { org.quickfix.field.MoneyLaunderingStatus value = new org.quickfix.field.MoneyLaunderingStatus();
public quickfix.field.MoneyLaunderingStatus getMoneyLaunderingStatus() throws FieldNotFound { quickfix.field.MoneyLaunderingStatus value = new quickfix.field.MoneyLaunderingStatus();
public org.quickfix.field.MoneyLaunderingStatus getMoneyLaunderingStatus() throws FieldNotFound { org.quickfix.field.MoneyLaunderingStatus value = new org.quickfix.field.MoneyLaunderingStatus(); getField(value); return value; }
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/CrossOrderCancelReplaceRequest.java/clean/src/java/src/quickfix/fix44/CrossOrderCancelReplaceRequest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 23091, 30745, 9341, 310, 1482, 2108, 265, 402, 30745, 9341, 310, 1482, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 2309...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23091, 30745, 9341, 310, 1482, 2108, 265, 402, 30745, 9341, 310, 1482, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 2309...
if (lastPos == LOG_FILE_INCREMENT) { fileSize = buffy.position(); } else { fileSize = lastPos + buffy.position(); }
fileSize = endOfMappedBytes - LOG_FILE_INCREMENT + buffy.position();
void writeEpilogueAndClose(SendEpilogue sendEpilogue) { System.out.println("writing epilogue and closing"); try { putInBuffer(encoder.encode(CharBuffer.wrap(sendEpilogue .getMessageString()))); buffy.force(); // shrink the file to the appropriate size int fileSize = 0; if (lastPos == LOG_FILE_INCREMENT) { fileSize = buffy.position(); } else { fileSize = lastPos + buffy.position(); } buffy = null; Memory.reclaim(); channel.close(); channel = null; new RandomAccessFile(logFile, "rw").getChannel().truncate(fileSize); } catch (CharacterCodingException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } debug("file closed."); }
51914 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51914/2a62551ae2df95565e0e9d7ddeab4f7079c9ce95/Logging.java/buggy/ecologylab/services/logging/Logging.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 918, 1045, 18918, 21947, 344, 1876, 4605, 12, 3826, 18918, 21947, 344, 1366, 18918, 21947, 344, 13, 3639, 288, 5411, 2332, 18, 659, 18, 8222, 2932, 14345, 5529, 21947, 344, 471, 7647, 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, 540, 918, 1045, 18918, 21947, 344, 1876, 4605, 12, 3826, 18918, 21947, 344, 1366, 18918, 21947, 344, 13, 3639, 288, 5411, 2332, 18, 659, 18, 8222, 2932, 14345, 5529, 21947, 344, 471, 7647, 8863,...
Game g = null;
IGame g = null;
public void scenario() { FileDialog fd = new FileDialog(frame, "Select a scenario file...", FileDialog.LOAD); fd.setDirectory("data" + File.separatorChar + "scenarios"); // the filter doesn't seem to do anything in windows. oh well FilenameFilter ff = new FilenameFilter() { public boolean accept(File f, String s) { return s.endsWith(".mms"); } }; fd.setFilenameFilter(ff); fd.setFile("*.mms"); //see comment above for load game dialog fd.show(); if (fd.getFile() == null) { return; } ScenarioLoader sl = new ScenarioLoader(new File(fd.getDirectory(), fd.getFile())); Game g = null; try { g = sl.createGame(); } catch (Exception e) { new AlertDialog(frame, "Host Scenario", "Error: " + e.getMessage()).show(); return; } // get player types and colors set Player[] pa = new Player[g.getPlayersVector().size()]; g.getPlayersVector().copyInto(pa); ScenarioDialog sd = new ScenarioDialog(frame, pa); sd.show(); if (!sd.bSet) { return; } // host with the scenario. essentially copied from host() HostDialog hd = new HostDialog(frame); hd.yourNameF.setText(sd.localName); hd.show(); // verify dialog data if (hd.name == null || hd.serverPass == null || hd.port == 0) { return; } // Players should have to enter a non-blank, non-whitespace name. boolean foundValid = false; char[] nameChars = hd.name.toCharArray(); for (int loop = 0; !foundValid && loop < nameChars.length; loop++) { if (!Character.isWhitespace(nameChars[loop])) { foundValid = true; } } if (!foundValid) { new AlertDialog(frame, "Host Scenario", "Error: enter a player name.").show(); return; } // kick off a RNG check megamek.common.Compute.d6(); // start server server = new Server(hd.serverPass, hd.port); server.setGame(g); // apply any scenario damage sl.applyDamage(server); ClientGUI gui = null; if (sd.localName != "") { // initialize game client = new Client(hd.name, "localhost", hd.port); gui = new ClientGUI(client); gui.initialize(); try { client.connect(); } catch (Exception e) { ; } server.getGame().getOptions().loadOptions(client, hd.serverPass); // popup options dialog gui.getGameOptionsDialog().update(client.game.getOptions()); gui.getGameOptionsDialog().show(); } optdlg = null; // setup any bots for (int x = 0; x < pa.length; x++) { if (sd.playerTypes[x] == ScenarioDialog.T_BOT) { BotClient c = new TestBot(pa[x].getName(), "localhost", hd.port); c.game.addGameListener(new BotGUI(c)); try { c.connect(); } catch (Exception e) { ; } c.retrieveServerInfo(); } } launch(gui.getFrame()); }
3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/db64c0778bbea1399999fd25b589d242f8842761/MegaMek.java/buggy/megamek/src/megamek/MegaMek.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 10766, 1435, 288, 3639, 1387, 6353, 5194, 273, 394, 1387, 6353, 12, 3789, 16, 315, 3391, 279, 10766, 585, 7070, 16, 1387, 6353, 18, 7783, 1769, 3639, 5194, 18, 542, 2853, 2932,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10766, 1435, 288, 3639, 1387, 6353, 5194, 273, 394, 1387, 6353, 12, 3789, 16, 315, 3391, 279, 10766, 585, 7070, 16, 1387, 6353, 18, 7783, 1769, 3639, 5194, 18, 542, 2853, 2932,...
if (newCatalog.equals(catalog)) {
if (!newCatalog.equals(catalog)) {
private static void fixup( Util.PropertyList connectionProperties, ServletContext servletContext) { String catalog = connectionProperties.get("catalog"); if (servletContext != null) { final ServletContextCatalogLocator locator = new ServletContextCatalogLocator(servletContext); final String newCatalog = locator.locate(catalog); if (newCatalog.equals(catalog)) { connectionProperties.put("catalog", catalog); } } }
37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/132ef816d5f7ab27d966c3839a0aea7bb3ac8f3e/DriverManager.java/buggy/src/main/mondrian/olap/DriverManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 918, 2917, 416, 12, 5411, 3564, 18, 1396, 682, 1459, 2297, 16, 5411, 22717, 20474, 13, 288, 3639, 514, 6222, 273, 1459, 2297, 18, 588, 2932, 7199, 8863, 3639, 309, 261, 23231, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 918, 2917, 416, 12, 5411, 3564, 18, 1396, 682, 1459, 2297, 16, 5411, 22717, 20474, 13, 288, 3639, 514, 6222, 273, 1459, 2297, 18, 588, 2932, 7199, 8863, 3639, 309, 261, 23231, ...
return Node.createList(argsNode, bodyNode);
return Node.createList(nameNode, argsNode, bodyNode);
public List childNodes() { return Node.createList(argsNode, bodyNode); }
47619 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47619/b1293eda8454686e846e2a9837b348e2983bb423/DefnNode.java/buggy/src/org/jruby/ast/DefnNode.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 987, 10582, 1435, 288, 3639, 327, 2029, 18, 2640, 682, 12, 529, 907, 16, 833, 907, 16, 1417, 907, 1769, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 987, 10582, 1435, 288, 3639, 327, 2029, 18, 2640, 682, 12, 529, 907, 16, 833, 907, 16, 1417, 907, 1769, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
public abstract boolean printDialog();
public abstract boolean printDialog() throws HeadlessException;
public abstract boolean printDialog();
45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/6c9004db86e553664db96c29f834edac76ae51ed/PrinterJob.java/clean/libraries/javalib/java/awt/print/PrinterJob.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 8770, 1250, 1172, 6353, 5621, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 8770, 1250, 1172, 6353, 5621, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
classFile.add(ByteCode.GETSTATIC, "java/lang/Boolean",
cfw.add(ByteCode.GETSTATIC, "java/lang/Boolean",
private void visitEqOp(Node node, Node child) { int type = node.getType(); Node rightChild = child.getNext(); boolean isStrict = type == Token.SHEQ || type == Token.SHNE; if (rightChild.getType() == Token.NULL) { generateCodeFromNode(child, node); if (isStrict) { addByteCode(ByteCode.IFNULL, 9); } else { addByteCode(ByteCode.DUP); addByteCode(ByteCode.IFNULL, 15); pushUndefined(); addByteCode(ByteCode.IF_ACMPEQ, 10); } if ((type == Token.EQ) || (type == Token.SHEQ)) classFile.add(ByteCode.GETSTATIC, "java/lang/Boolean", "FALSE", "Ljava/lang/Boolean;"); else classFile.add(ByteCode.GETSTATIC, "java/lang/Boolean", "TRUE", "Ljava/lang/Boolean;"); if (isStrict) { addByteCode(ByteCode.GOTO, 6); } else { addByteCode(ByteCode.GOTO, 7); addByteCode(ByteCode.POP); } if ((type == Token.EQ) || (type == Token.SHEQ)) classFile.add(ByteCode.GETSTATIC, "java/lang/Boolean", "TRUE", "Ljava/lang/Boolean;"); else classFile.add(ByteCode.GETSTATIC, "java/lang/Boolean", "FALSE", "Ljava/lang/Boolean;"); return; } generateCodeFromNode(child, node); generateCodeFromNode(child.getNext(), node); String name; switch (type) { case Token.EQ: name = "eqB"; break; case Token.NE: name = "neB"; break; case Token.SHEQ: name = "seqB"; break; case Token.SHNE: name = "sneB"; break; default: name = null; badTree(); } addScriptRuntimeInvoke(name, "(Ljava/lang/Object;" +"Ljava/lang/Object;" +")Ljava/lang/Boolean;"); }
7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/bd2594e6ebd6d8099b587934641c8f7650d87761/Codegen.java/buggy/js/rhino/src/org/mozilla/javascript/optimizer/Codegen.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 3757, 19508, 3817, 12, 907, 756, 16, 2029, 1151, 13, 565, 288, 3639, 509, 618, 273, 756, 18, 588, 559, 5621, 3639, 2029, 2145, 1763, 273, 1151, 18, 588, 2134, 5621, 3639, 125...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3757, 19508, 3817, 12, 907, 756, 16, 2029, 1151, 13, 565, 288, 3639, 509, 618, 273, 756, 18, 588, 559, 5621, 3639, 2029, 2145, 1763, 273, 1151, 18, 588, 2134, 5621, 3639, 125...
final Object obj = aFeatList.get(Globals.getRandomInt(aFeatList. size()));
final Ability ability = aFeatList.get(Globals.getRandomInt(aFeatList.size()));
private void selectFeats(final PlayerCharacter aPC, final List aFeatList, final PCClass aClass, final int aLevel) { while ((int)aPC.getFeats() > 0) { final Object obj = aFeatList.get(Globals.getRandomInt(aFeatList. size())); Ability feat = null; if (obj instanceof WeightedList) { final WeightedList subList = (WeightedList) obj; feat = (Ability) subList.get(Globals.getRandomInt(aFeatList. size())); } else { feat = (Ability) obj; } if (!PrereqHandler.passesAll(feat.getPreReqList(), aPC, feat)) { // We will leave the feat because we may qualify later. continue; } AbilityUtilities.modFeat(aPC, null, feat.getKeyName(), true, false); } }
48301 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48301/702b037e2f689561675929d6350ee23555326271/NPCGenerator.java/clean/code/src/java/pcgen/core/npcgen/NPCGenerator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 2027, 2954, 2323, 12, 6385, 19185, 7069, 279, 3513, 16, 727, 987, 279, 11667, 682, 16, 727, 26300, 797, 20148, 16, 727, 509, 279, 2355, 13, 202, 95, 202, 202, 17523, 140...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2027, 2954, 2323, 12, 6385, 19185, 7069, 279, 3513, 16, 727, 987, 279, 11667, 682, 16, 727, 26300, 797, 20148, 16, 727, 509, 279, 2355, 13, 202, 95, 202, 202, 17523, 140...
m_gameInformation.m_komi = komi; m_gameInformation.m_rules = rules; m_gameInformation.m_timeSettings = (TimeSettings)timeSettings.clone(); if (handicap != null) { m_gameInformation.m_handicap = handicap.size(); if (handicap.size() > 0) { m_root.setPlayer(Color.WHITE); for (int i = 0; i < handicap.size(); ++i) m_root.addBlack((Point)handicap.get(i)); } }
public GameTree(int boardSize, double komi, Vector handicap, String rules, TimeSettings timeSettings) { m_gameInformation = new GameInformation(boardSize); setDate(); m_root = new Node(); m_gameInformation.m_komi = komi; m_gameInformation.m_rules = rules; m_gameInformation.m_timeSettings = (TimeSettings)timeSettings.clone(); if (handicap != null) { m_gameInformation.m_handicap = handicap.size(); if (handicap.size() > 0) { m_root.setPlayer(Color.WHITE); for (int i = 0; i < handicap.size(); ++i) m_root.addBlack((Point)handicap.get(i)); } } }
51310 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51310/403ffcb60338ec96777dd5fdc89c616387653404/GameTree.java/buggy/src/game/GameTree.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 14121, 2471, 12, 474, 11094, 1225, 16, 1645, 417, 362, 77, 16, 5589, 948, 335, 438, 16, 514, 2931, 16, 10792, 2647, 2628, 813, 2628, 13, 565, 288, 3639, 312, 67, 13957, 5369, 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, 14121, 2471, 12, 474, 11094, 1225, 16, 1645, 417, 362, 77, 16, 5589, 948, 335, 438, 16, 514, 2931, 16, 10792, 2647, 2628, 813, 2628, 13, 565, 288, 3639, 312, 67, 13957, 5369, 273,...
protected void ProcessSoarToolJavaCommand(SoarToolJavaCommand command) { switch (command.GetCommandID()) { // Edit Production command case 1001: // BUGBUG: JDK complains that STI_kEditProduction needs to be a constant // Seems defined as 'final' which I thought was a Java constant. //case command.STI_kEditProduction: { // Edit the production EditProductionByName(command.GetStringParam()); break; } } }
47007 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47007/1b1fc0d1cd3e331f011554311af91290afd09142/MainFrame.java/buggy/OldSoar/trunk/visualsoar/Source/edu/umich/visualsoar/MainFrame.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 6459, 2227, 10225, 297, 6364, 5852, 2189, 12, 10225, 297, 6364, 5852, 2189, 3076, 13, 202, 95, 202, 202, 9610, 12, 3076, 18, 967, 2189, 734, 10756, 202, 202, 95, 759, 4666, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 6459, 2227, 10225, 297, 6364, 5852, 2189, 12, 10225, 297, 6364, 5852, 2189, 3076, 13, 202, 95, 202, 202, 9610, 12, 3076, 18, 967, 2189, 734, 10756, 202, 202, 95, 759, 4666, 3...
logResult("", Utils.stackTrace(ex, false)[0], null);
stackTrace= Utils.stackTrace(ex, false)[0];
private void logResults() { // // Log HTML // // m_htmlLogger.generateLog(); // // Log Text // for(Object o : getPassedTests()) { ITestResult tr = (ITestResult) o; logResult("PASSED", tr.getName(), tr.getMethod().getDescription()); } for(Object o : getFailedTests()) { ITestResult tr = (ITestResult) o; Throwable ex = tr.getThrowable(); logResult("FAILED", tr.getName(), tr.getMethod().getDescription()); if (ex != null) { if (m_verbose >= 2) { logResult("", Utils.stackTrace(ex, false)[0], null); } } } for(Object o : getSkippedTests()) { ITestResult tr = (ITestResult) o; logResult("SKIPPED", tr.getName(), tr.getMethod().getDescription()); } ITestNGMethod[] ft = resultsToMethods(getFailedTests()); String stats = "\n===============================================\n" + " " + m_testName + "\n" + " Tests run: " + Utils.calculateInvokedMethodCount(getAllTestMethods()) + ", Failures: " + Utils.calculateInvokedMethodCount(ft) + ", Skips: " + Utils.calculateInvokedMethodCount(resultsToMethods(getSkippedTests())) + "\n===============================================\n"; logResult("", stats, null); }
50502 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50502/c70a9debafb066e6124205609109e49078e16d94/TextReporter.java/clean/src/main/org/testng/reporters/TextReporter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 918, 613, 3447, 1435, 288, 565, 368, 565, 368, 1827, 3982, 565, 368, 565, 368, 565, 312, 67, 2620, 3328, 18, 7163, 1343, 5621, 565, 368, 565, 368, 1827, 3867, 565, 368, 565, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 918, 613, 3447, 1435, 288, 565, 368, 565, 368, 1827, 3982, 565, 368, 565, 368, 565, 312, 67, 2620, 3328, 18, 7163, 1343, 5621, 565, 368, 565, 368, 1827, 3867, 565, 368, 565, 364, ...
public void run() {
public void run() {
public void run() { try { List<ITaskscapeNode> nodesToRefresh = new ArrayList<ITaskscapeNode>(); boolean showChildrenRequested = false; if (MylarPlugin.getTaskscapeManager().getTempRaisedHandle() != null) { String raisedElementHandle = MylarPlugin.getTaskscapeManager().getTempRaisedHandle(); nodesToRefresh = new ArrayList<ITaskscapeNode>(); // override refresh nodes nodesToRefresh.add(MylarPlugin.getTaskscapeManager().getNode(raisedElementHandle)); showChildrenRequested = true; } else if (nodes != null) { nodesToRefresh.addAll(nodes); } for (StructuredViewer viewer : managedViewers) { if (viewer != null && !viewer.getControl().isDisposed() && viewer.getControl().isVisible()) { if (nodes == null || nodes.isEmpty()) { viewer.getControl().setRedraw(false); // TODO: does this really help? viewer.refresh(); viewer.getControl().setRedraw(true); } else { Object objectToRefresh = null; ITaskscapeNode lastNode = null; for (ITaskscapeNode node : nodesToRefresh) { if (node != null) { lastNode = node; IMylarStructureBridge structureBridge = MylarPlugin.getDefault().getStructureBridge(node.getStructureKind()); objectToRefresh = structureBridge.getObjectForHandle(node.getElementHandle()); if (node.getDegreeOfInterest().getValue() <= 0) { objectToRefresh = structureBridge.getObjectForHandle(structureBridge.getParentHandle(node.getElementHandle())); } if (objectToRefresh != null) { viewer.refresh(objectToRefresh, updateLabels); // also refresh the current outline IEditorPart editorPart = Workbench.getInstance().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); IMylarUiBridge bridge = MylarUiPlugin.getDefault().getUiBridgeForEditor(editorPart); bridge.refreshOutline(objectToRefresh, updateLabels); } } } InteractionEvent lastInteraction = lastNode.getDegreeOfInterest().getEvents().get(lastNode.getDegreeOfInterest().getEvents().size()-1); if (showChildrenRequested && viewer instanceof TreeViewer) { ((TreeViewer)viewer).expandToLevel(objectToRefresh, 1); } else if (objectToRefresh != null && lastInteraction.getKind().isUserEvent() && (!IContentOutlinePage.class.isAssignableFrom(viewer.getClass().getEnclosingClass()))) { // ignore outlines since they're synched StructuredSelection selection = new StructuredSelection(objectToRefresh); if (!selection.equals(viewer.getSelection())) viewer.setSelection(selection); } } } } } catch (Throwable t) { MylarPlugin.fail(t, "could not refresh viewer", false); } }
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/84b4102f9e4c34a0abbc3512483b39fbc04f78c5/MylarViewerManager.java/clean/org.eclipse.mylyn.context.ui/src/org/eclipse/mylyn/ui/MylarViewerManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 1086, 1435, 288, 2868, 202, 698, 288, 2398, 202, 202, 682, 32, 1285, 835, 12476, 907, 34, 2199, 774, 8323, 273, 394, 2407, 32, 1285, 835, 12476, 907, 34, 5621, 9506, 377, 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, 2398, 1071, 918, 1086, 1435, 288, 2868, 202, 698, 288, 2398, 202, 202, 682, 32, 1285, 835, 12476, 907, 34, 2199, 774, 8323, 273, 394, 2407, 32, 1285, 835, 12476, 907, 34, 5621, 9506, 377, 20...
MessageDialog .openInformation( shell, WorkbenchMessages.PropertyDialog_messageTitle, NLS.bind(WorkbenchMessages.PropertyDialog_noPropertyMessage, name));
MessageDialog.openInformation(shell, WorkbenchMessages.PropertyDialog_messageTitle, NLS.bind( WorkbenchMessages.PropertyDialog_noPropertyMessage, name));
public static PropertyDialog createDialogOn(Shell shell,final String propertyPageId, IAdaptable element){ PropertyPageManager pageManager = new PropertyPageManager(); String title = "";//$NON-NLS-1$ if (element == null) return null; // load pages for the selection // fill the manager with contributions from the matching contributors PropertyPageContributorManager.getManager().contribute(pageManager, element); // testing if there are pages in the manager Iterator pages = pageManager.getElements(PreferenceManager.PRE_ORDER) .iterator(); String name = getName(element); if (!pages.hasNext()) { MessageDialog .openInformation( shell, WorkbenchMessages.PropertyDialog_messageTitle, NLS.bind(WorkbenchMessages.PropertyDialog_noPropertyMessage, name)); return null; } title = NLS.bind(WorkbenchMessages.PropertyDialog_propertyMessage, name ); PropertyDialog propertyDialog = new PropertyDialog(shell, pageManager, new StructuredSelection(element)); if (propertyPageId != null) propertyDialog.setSelectedNode(propertyPageId); propertyDialog.create(); propertyDialog.getShell().setText(title); PlatformUI.getWorkbench().getHelpSystem().setHelp( propertyDialog.getShell(), IWorkbenchHelpContextIds.PROPERTY_DIALOG); return propertyDialog; }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/eb293e9cc60a34226692c24b15c18406134ec97e/PropertyDialog.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyDialog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 4276, 6353, 752, 6353, 1398, 12, 13220, 5972, 16, 6385, 514, 1272, 23053, 16, 467, 13716, 429, 930, 15329, 202, 202, 1396, 1964, 1318, 1363, 1318, 273, 394, 4276, 1964, 1318, 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, 760, 4276, 6353, 752, 6353, 1398, 12, 13220, 5972, 16, 6385, 514, 1272, 23053, 16, 467, 13716, 429, 930, 15329, 202, 202, 1396, 1964, 1318, 1363, 1318, 273, 394, 4276, 1964, 1318, 5...
String clsName = pkgPrefix.nextToken() + "." + protocol + ".Handler";
String clsName = (pkgPrefix.nextToken() + "." + protocol + ".Handler");
getURLStreamHandler (String protocol) { URLStreamHandler ph = null; // First, see if a protocol handler is in our cache. if (cache_handlers) { if ((ph = (URLStreamHandler) ph_cache.get (protocol)) != null) return ph; } // If a non-default factory has been set, use it to find the protocol. if (factory != null) { ph = factory.createURLStreamHandler (protocol); } else if (protocol.equals ("core")) { ph = new gnu.java.net.protocol.core.Handler(); } else if (protocol.equals ("file")) { // This is an interesting case. It's tempting to think that we // could call Class.forName ("gnu.java.net.protocol.file.Handler") to // get the appropriate class. Unfortunately, if we do that the // program will never terminate, because getURLStreamHandler is // eventually called by Class.forName. // // Treating "file" as a special case is the minimum that will // fix this problem. If other protocols are required in a // statically linked application they will need to be handled in // the same way as "file". ph = new gnu.java.net.protocol.file.Handler(); } // Non-default factory may have returned null or a factory wasn't set. // Use the default search algorithm to find a handler for this protocol. if (ph == null) { // Get the list of packages to check and append our default handler // to it, along with the JDK specified default as a last resort. // Except in very unusual environments the JDK specified one shouldn't // ever be needed (or available). String ph_search_path = System.getProperty ("java.protocol.handler.pkgs"); // Tack our default package on at the ends. if (ph_search_path != null) ph_search_path += "|" + DEFAULT_SEARCH_PATH; else ph_search_path = DEFAULT_SEARCH_PATH; // Finally loop through our search path looking for a match. StringTokenizer pkgPrefix = new StringTokenizer (ph_search_path, "|"); do { String clsName = pkgPrefix.nextToken() + "." + protocol + ".Handler"; try { Object obj = Class.forName (clsName).newInstance(); if (!(obj instanceof URLStreamHandler)) continue; else ph = (URLStreamHandler) obj; } catch (Exception e) { // Can't instantiate; handler still null, go on to next element. } } while ((! (ph instanceof URLStreamHandler)) && pkgPrefix.hasMoreTokens()); } // Update the hashtable with the new protocol handler. if (ph != null && cache_handlers) if (ph instanceof URLStreamHandler) ph_cache.put (protocol, ph); else ph = null; return ph; }
1739 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1739/907e79a24080aea2c7b5c4a36eb76512702e7580/URL.java/clean/libjava/java/net/URL.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 19341, 1228, 1503, 261, 780, 1771, 13, 225, 288, 565, 1976, 1228, 1503, 1844, 273, 446, 31, 565, 368, 5783, 16, 2621, 309, 279, 1771, 1838, 353, 316, 3134, 1247, 18, 565, 309, 261, 2493...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19341, 1228, 1503, 261, 780, 1771, 13, 225, 288, 565, 1976, 1228, 1503, 1844, 273, 446, 31, 565, 368, 5783, 16, 2621, 309, 279, 1771, 1838, 353, 316, 3134, 1247, 18, 565, 309, 261, 2493...
return (IASTStatement[]) ArrayUtil.removeNulls( IASTStatement.class, statements );
return (IASTStatement[]) ArrayUtil.trim( IASTStatement.class, statements );
public IASTStatement[] getStatements() { if( statements == null ) return IASTStatement.EMPTY_STATEMENT_ARRAY; return (IASTStatement[]) ArrayUtil.removeNulls( IASTStatement.class, statements ); }
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/6ac289f8203885031a79a3324dc4b14f52460aef/CASTCompoundStatement.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatement.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 467, 9053, 3406, 8526, 8997, 1346, 1435, 288, 3639, 309, 12, 6317, 422, 446, 262, 327, 467, 9053, 3406, 18, 13625, 67, 28411, 67, 8552, 31, 3639, 327, 261, 45, 9053, 3406, 63, 571...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 467, 9053, 3406, 8526, 8997, 1346, 1435, 288, 3639, 309, 12, 6317, 422, 446, 262, 327, 467, 9053, 3406, 18, 13625, 67, 28411, 67, 8552, 31, 3639, 327, 261, 45, 9053, 3406, 63, 571...
if (entries.contains(entry)) { RosterPacket packet = new RosterPacket(); packet.setType(IQ.Type.SET); RosterPacket.Item item = RosterEntry.toRosterItem(entry); item.setItemType(RosterPacket.ItemType.REMOVE); packet.addRosterItem(item); connection.sendPacket(packet);
if (!entries.contains(entry)) { return;
public void removeEntry(RosterEntry entry) { // Only remove the entry if it's in the entry list. // The actual removal logic takes place in RosterPacketListenerprocess>>Packet(Packet) synchronized (entries) { if (entries.contains(entry)) { RosterPacket packet = new RosterPacket(); packet.setType(IQ.Type.SET); RosterPacket.Item item = RosterEntry.toRosterItem(entry); // Set the item type as REMOVE so that the server will delete the entry item.setItemType(RosterPacket.ItemType.REMOVE); packet.addRosterItem(item); connection.sendPacket(packet); } } }
1538 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1538/f995c0d79152e94e95cffa4a31d362829fc076ac/Roster.java/buggy/source/org/jivesoftware/smack/Roster.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1206, 1622, 12, 54, 29811, 1622, 1241, 13, 288, 3639, 368, 5098, 1206, 326, 1241, 309, 518, 1807, 316, 326, 1241, 666, 18, 3639, 368, 1021, 3214, 14817, 4058, 5530, 3166, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1206, 1622, 12, 54, 29811, 1622, 1241, 13, 288, 3639, 368, 5098, 1206, 326, 1241, 309, 518, 1807, 316, 326, 1241, 666, 18, 3639, 368, 1021, 3214, 14817, 4058, 5530, 3166, 316, ...
if (targetVar != null) {
if (thisVar != null) { ret.put(0, reti++); } if (targetVar != null && targetVar != thisVar) {
private IntMap makeRemap() { IntMap ret = new IntMap(5); int reti = 0; if (targetVar != null) { ret.put(targetVar.getSlot(), reti++); } for (int i = 0, len = argVars.length; i < len; i++) { ret.put(argVars[i].getSlot(), reti); reti += argVars[i].getType().getSize(); } if (thisJoinPointVar != null) { ret.put(thisJoinPointVar.getSlot(), reti++); } // we not only need to put the arguments, we also need to remap their // aliases, which we so helpfully put into temps at the beginning of this join // point. if (! getKind().argsOnStack()) { int index = 0; if (hasThis()) { ret.put(0, 0); index++; } for (int i = 0; i < getArgCount(); i++) { TypeX type = getArgType(i); ret.put(index, index); index += type.getSize(); } } return ret; }
7955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7955/9c535bada84254eb397d1988ce1b04443145fdcc/BcelShadow.java/buggy/org.aspectj/modules/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 3094, 863, 1221, 1933, 438, 1435, 288, 3639, 3094, 863, 325, 273, 394, 3094, 863, 12, 25, 1769, 3639, 509, 325, 77, 273, 374, 31, 3639, 309, 261, 2211, 1537, 480, 446, 13, 288, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 3094, 863, 1221, 1933, 438, 1435, 288, 3639, 3094, 863, 325, 273, 394, 3094, 863, 12, 25, 1769, 3639, 509, 325, 77, 273, 374, 31, 3639, 309, 261, 2211, 1537, 480, 446, 13, 288, ...
public void readImpl(PipelineContext pipelineContext, ContentHandler contentHandler) {
public void readImpl(final PipelineContext pipelineContext, ContentHandler contentHandler) {
public void readImpl(PipelineContext pipelineContext, ContentHandler contentHandler) { // Extract information from XForms model Model model = (Model) readCacheInputAsObject(pipelineContext, getInputByName(INPUT_MODEL), new CacheableInputReader(){ public Object read(PipelineContext context, ProcessorInput input) { Model model = new Model(); readInputAsSAX(context, input, model.getContentHandlerForModel()); return model; } }); // Extract parameters from request RequestParameters requestParameters = (RequestParameters) readCacheInputAsObject(pipelineContext, getInputByName(INPUT_REQUEST), new CacheableInputReader(){ public Object read(PipelineContext context, ProcessorInput input) { RequestParameters requestParameters = new RequestParameters(); readInputAsSAX(context, input, requestParameters.getContentHandlerForRequest()); return requestParameters; } }); // Try to get instance document from context Instance instance = Instance.createInstanceFromContext(pipelineContext); if (instance == null) { // Read instance input org.dom4j.Document instanceDom4j = readCacheInputAsDOM4J(pipelineContext, INPUT_INSTANCE); if (instanceDom4j.getRootElement() == null) throw new OXFException("No instance found in XForms model"); instance = new Instance(pipelineContext, instanceDom4j); final Element instanceElement = instance.getDocument().getRootElement(); // Only recreate instance if data was submitted if (requestParameters.isSubmitted()) { // Discard text in instance instance.empty(); } // Extract filtered parameters from instance if any Element filterElement = readCacheInputAsDOM4J(pipelineContext, INPUT_FILTER).getRootElement(); Map filteredParams = null; for (Iterator i = XPathUtils.selectIterator(filterElement, "/*/*/@ref"); i.hasNext();) { Attribute attribute = (Attribute) i.next(); String paramRef = attribute.getValue(); // FIXME: Argh, we don't handle namespaces correctly here! // If the param element in the WAC contains namespaces, this won't work! Node paramNode = XPathUtils.selectSingleNode(instanceElement, paramRef); if (paramNode != null) { if (filteredParams == null) filteredParams = new HashMap(); String nodeName = XFormsUtils.getNameForNode(paramNode, false); String nodeValue = paramNode instanceof Element ? ((Element) paramNode).getStringValue() : ((Attribute) paramNode).getValue(); filteredParams.put(nodeName, nodeValue); } } // Fill-out instance String[] paths = requestParameters.getPaths(); for (int i = 0; i < paths.length; i++) { String path = paths[i]; instance.setValue(path, requestParameters.getValue(path), requestParameters.getType(path), false); } if (requestParameters.isSubmitted() && filteredParams != null) { for (Iterator i = filteredParams.keySet().iterator(); i.hasNext();) { String nodeName = (String) i.next(); String nodeValue = (String) filteredParams.get(nodeName); instance.setValue(nodeName, nodeValue, null, true); } } if (logger.isDebugEnabled()) logger.debug("1) Instance recontructed from request:\n" + XMLUtils.domToString(instance.getDocument())); // Run actions XFormsUtils.setInitialDecoration(instance.getDocument()); Action[] actions = requestParameters.getActions(); for (int i = 0; i < actions.length; i++) { Action action = actions[i]; action.run(pipelineContext, new ActionFunctionContext(), instance.getDocument()); } if (logger.isDebugEnabled()) logger.debug("2) Instance with actions applied:\n" + XMLUtils.domToString(instance.getDocument())); // Run model item properties model.applyInputOutputBinds(instance.getDocument()); if (logger.isDebugEnabled()) logger.debug("3) Instance with model item properties applied:\n" + XMLUtils.domToString(instance.getDocument())); } // Schema-validate if necessary Boolean enabled = getPropertySet().getBoolean(XFORMS_VALIDATION_FLAG, true); if (enabled != null && enabled.booleanValue() && model.getSchema() != null) { Processor validator = new XFormsValidationProcessor(model.getSchema()); Processor resourceGenerator = PipelineUtils.createURLGenerator(model.getSchema()); PipelineUtils.connect(resourceGenerator, ProcessorImpl.OUTPUT_DATA, validator, XFormsValidationProcessor.INPUT_SCHEMA); PipelineUtils.connect(XFormsValidationProcessor.DECORATION_CONFIG, ProcessorImpl.OUTPUT_DATA, validator, ProcessorImpl.INPUT_CONFIG); DOMGenerator domGenerator = new DOMGenerator(instance.getDocument()); PipelineUtils.connect(domGenerator, ProcessorImpl.OUTPUT_DATA, validator, ProcessorImpl.INPUT_DATA); ProcessorOutput validationOutput = validator.createOutput(ProcessorImpl.OUTPUT_DATA); validationOutput.read(pipelineContext, contentHandler); } else { // Just output instance instance.read(contentHandler); } }
57229 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57229/5996bad8ae7a5e6bde143d457470ccb6e7d8a675/XFormsInput.java/buggy/src/java/org/orbeon/oxf/processor/xforms/input/XFormsInput.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 855, 2828, 12, 6385, 13671, 1042, 5873, 1042, 16, 3697, 1503, 913, 1503, 13, 288, 7734, 368, 8152, 1779, 628, 1139, 18529, 938, 7734, 3164, 938, 273, 261, 1488, 13, 855, 1649,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 918, 855, 2828, 12, 6385, 13671, 1042, 5873, 1042, 16, 3697, 1503, 913, 1503, 13, 288, 7734, 368, 8152, 1779, 628, 1139, 18529, 938, 7734, 3164, 938, 273, 261, 1488, 13, 855, 1649,...
if(fs.get("DontCompress").equalsIgnoreCase("true")){ dontCompress=true; }else{ dontCompress=false; }
dontCompress = Fields.stringToBool(fs.get("DontCompress"), false);
public ClientPutMessage(SimpleFieldSet fs) throws MessageInvalidException { identifier = fs.get("Identifier"); if(identifier == null) throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "No Identifier", null); try { String u = fs.get("URI"); if(u == null) throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "No URI", identifier); uri = new FreenetURI(fs.get("URI")); } catch (MalformedURLException e) { throw new MessageInvalidException(ProtocolErrorMessage.URI_PARSE_ERROR, e.getMessage(), identifier); } String verbosityString = fs.get("Verbosity"); if(verbosityString == null) verbosity = 0; else { try { verbosity = Integer.parseInt(verbosityString, 10); } catch (NumberFormatException e) { throw new MessageInvalidException(ProtocolErrorMessage.ERROR_PARSING_NUMBER, "Error parsing Verbosity field: "+e.getMessage(), identifier); } } contentType = fs.get("Metadata.ContentType"); String maxRetriesString = fs.get("MaxRetries"); if(maxRetriesString == null) // default to 0 maxRetries = 0; else { try { maxRetries = Integer.parseInt(maxRetriesString, 10); } catch (NumberFormatException e) { throw new MessageInvalidException(ProtocolErrorMessage.ERROR_PARSING_NUMBER, "Error parsing MaxSize field: "+e.getMessage(), identifier); } } if(fs.get("GetCHKOnly").equalsIgnoreCase("true")){ getCHKOnly=true; }else{ getCHKOnly=false; } String priorityString = fs.get("PriorityClass"); if(priorityString == null) { // defaults to the one just below fproxy priorityClass = RequestStarter.IMMEDIATE_SPLITFILE_PRIORITY_CLASS; } else { try { priorityClass = Short.parseShort(priorityString, 10); if(priorityClass < RequestStarter.MAXIMUM_PRIORITY_CLASS || priorityClass > RequestStarter.MINIMUM_PRIORITY_CLASS) throw new MessageInvalidException(ProtocolErrorMessage.INVALID_FIELD, "Valid priorities are from "+RequestStarter.MAXIMUM_PRIORITY_CLASS+" to "+RequestStarter.MINIMUM_PRIORITY_CLASS, identifier); } catch (NumberFormatException e) { throw new MessageInvalidException(ProtocolErrorMessage.ERROR_PARSING_NUMBER, "Error parsing PriorityClass field: "+e.getMessage(), identifier); } } String uploadFrom = fs.get("UploadFrom"); if(uploadFrom != null && uploadFrom.equalsIgnoreCase("disk")) { fromDisk = true; String filename = fs.get("Filename"); if(filename == null) throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "Missing field Filename", identifier); File f = new File(filename); if(!(f.exists() && f.isFile() && f.canRead())) throw new MessageInvalidException(ProtocolErrorMessage.FILE_NOT_FOUND, null, identifier); dataLength = f.length(); FileBucket fileBucket = new FileBucket(f, true, false, false); this.bucket = fileBucket; } else { fromDisk = false; String dataLengthString = fs.get("DataLength"); if(dataLengthString == null) throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "Need DataLength on a ClientPut", identifier); try { dataLength = Long.parseLong(dataLengthString, 10); } catch (NumberFormatException e) { throw new MessageInvalidException(ProtocolErrorMessage.ERROR_PARSING_NUMBER, "Error parsing DataLength field: "+e.getMessage(), identifier); } } if(fs.get("DontCompress").equalsIgnoreCase("true")){ dontCompress=true; }else{ dontCompress=false; } }
50915 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50915/c76e66320637c9e8c51b294047e6cecb45bc9066/ClientPutMessage.java/buggy/src/freenet/node/fcp/ClientPutMessage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 2445, 6426, 1079, 12, 5784, 974, 694, 2662, 13, 1216, 2350, 1941, 503, 288, 202, 202, 5644, 273, 2662, 18, 588, 2932, 3004, 8863, 202, 202, 430, 12, 5644, 422, 446, 13, 1082, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 2445, 6426, 1079, 12, 5784, 974, 694, 2662, 13, 1216, 2350, 1941, 503, 288, 202, 202, 5644, 273, 2662, 18, 588, 2932, 3004, 8863, 202, 202, 430, 12, 5644, 422, 446, 13, 1082, ...
setErrorMessage("Message with id '" + messageId + "'not found");
setErrorMessage(getResourceBundleString(MESSAGE_WITH_ID) + messageId + getResourceBundleString(NOT_FOUND_WITH_QUOTE));
public String processActionDisplayMessage() { LOG.debug("processActionDisplayMessage()"); String messageId = getExternalParameterByKey(MESSAGE_ID); String topicId = getExternalParameterByKey(TOPIC_ID); if (messageId == null) { setErrorMessage("Message reference not found"); return MAIN; } if (topicId == null) { setErrorMessage("Topic reference not found for the message"); return MAIN; } // Message message=forumManager.getMessageById(new Long(messageId)); Message message = messageManager.getMessageByIdWithAttachments(new Long( messageId)); messageManager.markMessageReadForUser(new Long(topicId), new Long(messageId), true); if (message == null) { setErrorMessage("Message with id '" + messageId + "'not found"); return MAIN; } message = messageManager.getMessageByIdWithAttachments(message.getId()); selectedMessage = new DiscussionMessageBean(message, messageManager); DiscussionTopic topic=forumManager.getTopicById(new Long( getExternalParameterByKey(TOPIC_ID))); setSelectedForumForCurrentTopic(topic); selectedTopic = new DiscussionTopicBean(topic, selectedForum.getForum(), uiPermissionsManager, forumManager); setTopicBeanAssign(); String currentForumId = getExternalParameterByKey(FORUM_ID); if (currentForumId != null && (!currentForumId.trim().equals("")) && (!currentForumId.trim().equals("null"))) { DiscussionForum forum = forumManager .getForumById(new Long(currentForumId)); selectedForum = getDecoratedForum(forum); setForumBeanAssign(); selectedTopic.getTopic().setBaseForum(forum); } selectedTopic = getDecoratedTopic(forumManager.getTopicById(new Long( getExternalParameterByKey(TOPIC_ID)))); setTopicBeanAssign(); getSelectedTopic(); List tempMsgs = selectedTopic.getMessages(); if(tempMsgs != null) { for(int i=0; i<tempMsgs.size(); i++) { DiscussionMessageBean thisDmb = (DiscussionMessageBean)tempMsgs.get(i); if(((DiscussionMessageBean)tempMsgs.get(i)).getMessage().getId().toString().equals(messageId)) { selectedMessage.setDepth(thisDmb.getDepth()); selectedMessage.setHasNext(thisDmb.getHasNext()); selectedMessage.setHasPre(thisDmb.getHasPre()); break; } } } // selectedTopic= new DiscussionTopicBean(message.getTopic()); return MESSAGE_VIEW; }
48936 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48936/daf96dee19a568b9d9699beb307fd7e9e3f46696/DiscussionForumTool.java/clean/messageforums-app/src/java/org/sakaiproject/tool/messageforums/DiscussionForumTool.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 514, 1207, 1803, 4236, 1079, 1435, 225, 288, 565, 2018, 18, 4148, 2932, 2567, 1803, 4236, 1079, 1435, 8863, 565, 514, 19090, 273, 22319, 1662, 14560, 12, 8723, 67, 734, 1769, 565, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 514, 1207, 1803, 4236, 1079, 1435, 225, 288, 565, 2018, 18, 4148, 2932, 2567, 1803, 4236, 1079, 1435, 8863, 565, 514, 19090, 273, 22319, 1662, 14560, 12, 8723, 67, 734, 1769, 565, 5...
throw new MissingAttributeException( "var" );
throw new MissingAttributeException( "delim" );
public void doTag(final XMLOutput output) throws Exception { if ( this.var == null ) { throw new MissingAttributeException( "var" ); } if ( this.delim == null ) { throw new MissingAttributeException( "var" ); } StringTokenizer tokenizer = new StringTokenizer( getBodyText(), this.delim ); List tokens = new ArrayList(); while ( tokenizer.hasMoreTokens() ) { tokens.add( tokenizer.nextToken() ); } getContext().setVariable( this.var, tokens ); }
51800 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51800/e806c3db24bc056b0baa0bb6fe8834464865f3d3/TokenizeTag.java/buggy/src/java/org/apache/commons/jelly/tags/util/TokenizeTag.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 741, 1805, 12, 6385, 3167, 1447, 876, 13, 1216, 1185, 565, 288, 3639, 309, 261, 333, 18, 1401, 422, 446, 262, 3639, 288, 5411, 604, 394, 10230, 1499, 503, 12, 315, 23822, 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, 918, 741, 1805, 12, 6385, 3167, 1447, 876, 13, 1216, 1185, 565, 288, 3639, 309, 261, 333, 18, 1401, 422, 446, 262, 3639, 288, 5411, 604, 394, 10230, 1499, 503, 12, 315, 23822, 6, ...
DbSnmpInterfaceEntry dbSnmpIfEntry = DbSnmpInterfaceEntry.get(dbc, node.getNodeId(), ifIndex);
DbSnmpInterfaceEntry dbSnmpIfEntry = DbSnmpInterfaceEntry.get(dbc, node.getNodeId(), ifIndex);
private void updateSnmpInfo(Connection dbc, DbNodeEntry node, DbIpInterfaceEntry dbIpIfEntry, IfSnmpCollector snmpc) throws SQLException { Category log = ThreadCategory.getInstance(getClass()); InetAddress ifaddr = dbIpIfEntry.getIfAddress(); /* * If SNMP info is available update the snmpInterface table entry with * anything that has changed. */ int ifIndex = dbIpIfEntry.getIfIndex(); if (snmpc != null && !snmpc.failed() && ifIndex != -1) { if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: updating snmp interface for nodeId/ifIndex=" + +node.getNodeId() + "/" + ifIndex); } // Create and load SNMP Interface entry from the database boolean newSnmpIfTableEntry = false; DbSnmpInterfaceEntry dbSnmpIfEntry = DbSnmpInterfaceEntry.get(dbc, node.getNodeId(), ifIndex); if (dbSnmpIfEntry == null) { /* * SNMP Interface not found with this nodeId, create new * interface */ if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: SNMP interface index " + ifIndex + " not in database, creating new interface object."); } dbSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); newSnmpIfTableEntry = true; } /* * Create SNMP interface entry representing latest information * retrieved for the interface via the collector */ DbSnmpInterfaceEntry currSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); // Find the ifTable entry for this interface IfTable ift = snmpc.getIfTable(); Iterator ifiter = ift.getEntries().iterator(); IfTableEntry ifte = null; while (ifiter.hasNext()) { ifte = (IfTableEntry) ifiter.next(); // index Integer sint = ifte.getIfIndex(); if (sint != null) { if (ifIndex == sint.intValue()) { break; } else { ifte = null; } } } // Make sure we have a valid IfTableEntry object if (ifte == null && ifIndex == CapsdConfigFactory.LAME_SNMP_HOST_IFINDEX) { currSnmpIfEntry.setIfAddress(snmpc.getCollectorTargetAddress()); if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: interface " + snmpc.getCollectorTargetAddress().getHostAddress() + " appears to be a lame SNMP host. Setting ipaddr only."); } } else if (ifte != null) { /* * IP address and netmask * * WARNING: IfSnmpCollector.getIfAddressAndMask() ONLY returns * the FIRST IP address and mask for a given interface as * specified in the ipAddrTable. */ InetAddress[] aaddrs = snmpc.getIfAddressAndMask(ifIndex); // Address array should NEVER be null but just in case.. if (aaddrs == null) { log.warn("updateSnmpInfo: unable to retrieve address and netmask for nodeId/ifIndex: " + node.getNodeId() + "/" + ifIndex); aaddrs = new InetAddress[2]; // Set interface address to current interface aaddrs[0] = ifaddr; // Set netmask to NULL aaddrs[1] = null; } // IP address currSnmpIfEntry.setIfAddress(aaddrs[0]); // netmask if (aaddrs[1] != null) { if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: interface " + aaddrs[0].getHostAddress() + " has netmask: " + aaddrs[1].getHostAddress()); } currSnmpIfEntry.setNetmask(aaddrs[1]); } // type Integer sint = ifte.getIfType(); currSnmpIfEntry.setType(sint.intValue()); // description String str = ifte.getIfDescr(); if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: " + ifaddr + " has ifDescription: " + str); } if (str != null && str.length() > 0) { currSnmpIfEntry.setDescription(str); } String physAddr = ifte.getPhysAddr(); if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: " + ifaddr + " has phys address: -" + physAddr + "-"); } if (physAddr != null && physAddr.length() == 12) { currSnmpIfEntry.setPhysicalAddress(physAddr); } // speed Long uint = ifte.getIfSpeed(); //set the default speed to 10MB if not retrievable. currSnmpIfEntry.setSpeed((uint == null ? 10000000L : uint.longValue())); // admin status sint = ifte.getIfAdminStatus(); currSnmpIfEntry.setAdminStatus(sint.intValue()); // oper status sint = ifte.getIfOperStatus(); currSnmpIfEntry.setOperationalStatus(sint.intValue()); // name (from interface extensions table) String ifName = snmpc.getIfName(ifIndex); if (ifName != null && ifName.length() > 0) { currSnmpIfEntry.setName(ifName); } // alias (from interface extensions table) String ifAlias = snmpc.getIfAlias(ifIndex); if (ifAlias != null) { currSnmpIfEntry.setAlias(ifAlias); } else { currSnmpIfEntry.setAlias(""); } } // end if valid ifTable entry // Update any fields which have changed // dbSnmpIfEntry.updateIfIndex(currSnmpIfEntry.getIfIndex()); dbSnmpIfEntry.updateIfAddress(currSnmpIfEntry.getIfAddress()); dbSnmpIfEntry.updateNetmask(currSnmpIfEntry.getNetmask()); dbSnmpIfEntry.updatePhysicalAddress(currSnmpIfEntry.getPhysicalAddress()); dbSnmpIfEntry.updateDescription(currSnmpIfEntry.getDescription()); dbSnmpIfEntry.updateName(currSnmpIfEntry.getName()); dbSnmpIfEntry.updateType(currSnmpIfEntry.getType()); dbSnmpIfEntry.updateSpeed(currSnmpIfEntry.getSpeed()); dbSnmpIfEntry.updateAdminStatus(currSnmpIfEntry.getAdminStatus()); dbSnmpIfEntry.updateOperationalStatus(currSnmpIfEntry.getOperationalStatus()); dbSnmpIfEntry.updateAlias(currSnmpIfEntry.getAlias()); /* * If this is a new interface or if any of the following * key fields have changed set the m_snmpIfTableChangedFlag * variable to TRUE. This will potentially trigger an event * which will cause the poller to reinitialize the primary * SNMP interface for the node. */ // dbSnmpIfEntry.hasIfIndexChanged() || if (!m_snmpIfTableChangedFlag && newSnmpIfTableEntry || dbSnmpIfEntry.hasIfAddressChanged() || dbSnmpIfEntry.hasTypeChanged() || dbSnmpIfEntry.hasNameChanged() || dbSnmpIfEntry.hasDescriptionChanged() || dbSnmpIfEntry.hasPhysicalAddressChanged() || dbSnmpIfEntry.hasAliasChanged()) { m_snmpIfTableChangedFlag = true; } // Update the database dbSnmpIfEntry.store(dbc); // end if complete snmp info available } else if (snmpc != null && snmpc.hasIpAddrTable() && ifIndex != -1) { if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: updating snmp interface for nodeId/ifIndex/ipAddr=" + +node.getNodeId() + "/" + ifIndex + "/" + ifaddr + " based on ipAddrTable only - No ifTable available"); } // Create and load SNMP Interface entry from the database boolean newSnmpIfTableEntry = false; DbSnmpInterfaceEntry dbSnmpIfEntry = DbSnmpInterfaceEntry.get(dbc, node.getNodeId(), ifIndex); if (dbSnmpIfEntry == null) { /* * SNMP Interface not found with this nodeId, create new * interface */ if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: SNMP interface index " + ifIndex + " not in database, creating new interface object."); } dbSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); newSnmpIfTableEntry = true; } /* * Create SNMP interface entry representing latest information * retrieved for the interface via the collector */ DbSnmpInterfaceEntry currSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); // IP address currSnmpIfEntry.setIfAddress(ifaddr); // Update any fields which have changed dbSnmpIfEntry.updateIfAddress(currSnmpIfEntry.getIfAddress()); // Update the database dbSnmpIfEntry.store(dbc); // end if partial snmp info available } else if (snmpc != null) { // allow for lame snmp hosts with no ipAddrTable ifIndex = CapsdConfigFactory.LAME_SNMP_HOST_IFINDEX; if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: updating snmp interface for nodeId/ipAddr=" + +node.getNodeId() + "/" + ifaddr + " based on ip address only - No ipAddrTable available"); } // Create and load SNMP Interface entry from the database boolean newSnmpIfTableEntry = false; DbSnmpInterfaceEntry dbSnmpIfEntry = DbSnmpInterfaceEntry.get(dbc, node.getNodeId(), ifIndex); if (dbSnmpIfEntry == null) { /* * SNMP Interface not found with this nodeId, create new * interface */ if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: SNMP interface index " + ifIndex + " not in database, creating new interface object."); } dbSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); newSnmpIfTableEntry = true; } /* * Create SNMP interface entry representing latest information * retrieved for the interface via the collector */ DbSnmpInterfaceEntry currSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); // IP address currSnmpIfEntry.setIfAddress(ifaddr); // Update any fields which have changed dbSnmpIfEntry.updateIfAddress(currSnmpIfEntry.getIfAddress()); // Update the database dbSnmpIfEntry.store(dbc); } }
25465 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25465/8a6576d66e6ad3849723ebfbdc7af8419591da4a/RescanProcessor.java/clean/opennms-services/src/main/java/org/opennms/netmgt/capsd/RescanProcessor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1089, 10461, 1291, 966, 12, 1952, 9881, 16, 8408, 907, 1622, 756, 16, 8408, 5273, 1358, 1622, 1319, 5273, 2047, 1622, 16, 971, 10461, 1291, 7134, 15366, 71, 13, 1216, 6483, 288...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1089, 10461, 1291, 966, 12, 1952, 9881, 16, 8408, 907, 1622, 756, 16, 8408, 5273, 1358, 1622, 1319, 5273, 2047, 1622, 16, 971, 10461, 1291, 7134, 15366, 71, 13, 1216, 6483, 288...
private void cursorCreate(String sql, String procName, ParamInfo[] parameters) throws SQLException { TdsCore tds = statement.getTds(); int prepareSql = statement.connection.getPrepareSql(); // // If this cursor is going to be a named forward only cursor // force the concurrency to be updateable. // TODO: Cursor is updateable unless user appends FOR READ to the select // but we would need to parse the SQL to discover this. // if (cursorName != null && resultSetType == ResultSet.TYPE_FORWARD_ONLY && concurrency == ResultSet.CONCUR_READ_ONLY) { concurrency = ResultSet.CONCUR_UPDATABLE; } // // Simplify future tests for parameters // if (parameters != null && parameters.length == 0) { parameters = null; } // // If there are no parameters we will opt for // the sp_cursoropen option only. // // TODO Is this really the best solution? What if the query is complex? if (parameters == null) { prepareSql = TdsCore.UNPREPARED; } // // SQL 6.5 does not support stored procs (with params) in the sp_cursor call // will need to substitute any parameter values into the SQL. // if (tds.getTdsVersion() == Driver.TDS42) { prepareSql = TdsCore.UNPREPARED; if (parameters != null) { procName = null; } } // // If we are running in unprepare mode and there are parameters // substitute these into the SQL statement now. // if (parameters != null && prepareSql == TdsCore.UNPREPARED) { sql = Support.substituteParameters(sql, parameters, tds.getTdsVersion()); parameters = null; } // // For most prepare modes we need to substitute parameter // names for the ? markers. // if (parameters != null) { if (procName == null || !procName.startsWith("#jtds")) { sql = Support.substituteParamMarkers(sql, parameters); } } // // There are generally three situations in which procName is not null: // 1. Running in prepareSQL=1 and contains a temp proc name e.g. #jtds00001 // in which case we need to generate an SQL statement exec #jtds... // 2. Running in prepareSQL=4 and contains an existing statement handle. // 3. CallableStatement in which case the SQL string has a valid exec // statement and we can ignore procName. // if (procName != null) { if (procName.startsWith("#jtds")) { StringBuffer buf = new StringBuffer(procName.length() + 16 + (parameters != null ? parameters.length * 5 : 0)); buf.append("EXEC ").append(procName).append(' '); for (int i = 0; parameters != null && i < parameters.length; i++) { if (i != 0) { buf.append(','); } if (parameters[i].name != null) { buf.append(parameters[i].name); } else { buf.append("@P").append(i); } } sql = buf.toString(); } else // Prepared Statement Handle? if (TdsCore.isPreparedProcedureName(procName)) { // // At present procName is set to the value obtained by // the connection.prepareSQL() call in JtdsPreparedStatement. // This handle was obtained using sp_cursorprepare not sp_prepare // so it's ok to use here. // try { prepStmtHandle = new Integer(procName); } catch (NumberFormatException e) { throw new IllegalStateException( "Invalid prepared statement handle: " + procName); } } } // // Select the correct type of Server side cursor to // match the scroll and concurrency options. // int scrollOpt = getCursorScrollOpt(resultSetType, concurrency, parameters != null); int ccOpt = getCursorConcurrencyOpt(concurrency); // // Create parameter objects // // Setup scroll options parameter // ParamInfo pScrollOpt = new ParamInfo(Types.INTEGER, new Integer(scrollOpt), ParamInfo.OUTPUT); // // Setup concurrency options parameter // ParamInfo pConCurOpt = new ParamInfo(Types.INTEGER, new Integer(ccOpt), ParamInfo.OUTPUT); // // Setup number of rows parameter // ParamInfo pRowCount = new ParamInfo(Types.INTEGER, null, ParamInfo.OUTPUT); // // Setup cursor handle parameter // ParamInfo pCursor = new ParamInfo(Types.INTEGER, null, ParamInfo.OUTPUT); // // Setup statement handle param // ParamInfo pStmtHand = null; if (prepareSql == TdsCore.PREPEXEC || prepareSql == TdsCore.PREPARE) { pStmtHand = new ParamInfo(Types.INTEGER, prepStmtHandle, ParamInfo.OUTPUT); } // // Setup parameter definitions parameter // ParamInfo pParamDef = null; if (parameters != null ) { // Parameter declarations for (int i = 0; i < parameters.length; i++) { TdsData.getNativeType(statement.connection, parameters[i]); } pParamDef = new ParamInfo(Types.LONGVARCHAR, Support.getParameterDefinitions(parameters), ParamInfo.UNICODE); } // // Setup SQL statement parameter // ParamInfo pSQL = new ParamInfo(Types.LONGVARCHAR, sql, ParamInfo.UNICODE); // // If using the prepare/execute model, now need to pepare SQL // if (prepareSql == TdsCore.PREPARE && prepStmtHandle == null) { ParamInfo params[] = new ParamInfo[6]; // Setup statement handle param params[0] = pStmtHand; // Setup parameter definitions params[1] = pParamDef; // Setup statement param params[2] = pSQL; // Setup flag param params[3] = new ParamInfo(Types.INTEGER, new Integer(1), ParamInfo.INPUT); // Setup scroll options params[4] = pScrollOpt; // Setup concurrency options params[5] = pConCurOpt; columns = null; // Will be populated if preparing a select // Use sp_cursorprepare approach tds.executeSQL(null, "sp_cursorprepare", params, false, statement.getQueryTimeout(), -1, -1, true); tds.clearResponseQueue(); // columns will now hold meta data for select statements prepStmtHandle = (Integer) pStmtHand.getOutValue(); if (prepStmtHandle == null) { // Some types of statements cannot be prepared prepareSql = TdsCore.UNPREPARED; if (parameters != null) { // Ensure that sp_cursoropen will recognise user params pScrollOpt.value = new Integer( ((Integer)pScrollOpt.getOutValue()).intValue() | 0x1000); } } } // // OK now open the Cursor // if (prepareSql == TdsCore.PREPARE && prepStmtHandle != null) { // Use sp_cursorexecute approach ParamInfo[] params = new ParamInfo[5 + parameters.length]; System.arraycopy(parameters, 0, params, 5, parameters.length); // Setup statement handle param pStmtHand.isOutput = false; pStmtHand.value = prepStmtHandle; params[0] = pStmtHand; // Setup cursor handle param params[1] = pCursor; // Setup scroll options (mask off parameter flag) pScrollOpt.value = new Integer( ((Integer)pScrollOpt.getOutValue()).intValue() & 0XFF); params[2] = pScrollOpt; // Setup concurrency options params[3] = pConCurOpt; // Setup numRows parameter params[4] = pRowCount; parameters = params; procName = "sp_cursorexecute"; } else if (prepareSql == TdsCore.PREPEXEC) { // Use sp_cursorprepexec approach ParamInfo[] params = new ParamInfo[7 + parameters.length]; System.arraycopy(parameters, 0, params, 7, parameters.length); // Setup statement handle param params[0] = pStmtHand; // Setup cursor handle param params[1] = pCursor; // Setup parameter definitions params[2] = pParamDef; // Setup statement param params[3] = pSQL; // Setup scroll options params[4] = pScrollOpt; // Setup concurrency options params[5] = pConCurOpt; // Setup numRows parameter params[6] = pRowCount; parameters = params; procName = "sp_cursorprepexec"; } else { // Use sp_cursoropen approach ParamInfo[] params; if (parameters == null) { params = new ParamInfo[5]; } else { params = new ParamInfo[6 + parameters.length]; System.arraycopy(parameters, 0, params, 6, parameters.length); params[5] = pParamDef; } // Setup cursor handle param params[0] = pCursor; // Setup statement param params[1] = pSQL; // Setup scroll options params[2] = pScrollOpt; // Setup concurrency options params[3] = pConCurOpt; // Setup numRows parameter params[4] = pRowCount; parameters = params; procName = "sp_cursoropen"; } tds.executeSQL(null, procName, parameters, false, statement.getQueryTimeout(), statement.getMaxRows(), statement.getMaxFieldSize(), true); while (!tds.getMoreResults() && !tds.isEndOfResponse()); if (tds.isResultSet()) { this.columns = copyInfo(tds.getColumns()); this.columnCount = getColumnCount(columns); } else { statement.getMessages().addException(new SQLException( Messages.get("error.statement.noresult"), "24000")); } tds.clearResponseQueue(); statement.messages.checkErrors(); Integer retVal = tds.getReturnStatus(); int actualScroll; int actualCc; // // Retrieve values of output parameters // PARAM_CURSOR_HANDLE.value = pCursor.getOutValue(); actualScroll = ((Integer)pScrollOpt.getOutValue()).intValue(); actualCc = ((Integer)pConCurOpt.getOutValue()).intValue(); rowsInResult = ((Integer)pRowCount.getOutValue()).intValue(); if (prepareSql == TdsCore.PREPEXEC) { prepStmtHandle = (Integer)pStmtHand.getOutValue(); } if ((retVal == null) || (retVal.intValue() != 0)) { throw new SQLException(Messages.get("error.resultset.openfail"), "24000"); } // // Set the cursor name if required allowing positioned updates. // We need to do this here as any downgrade warnings will be wiped // out by the executeSQL call. // if (cursorName != null) { ParamInfo params[] = new ParamInfo[3]; params[0] = PARAM_CURSOR_HANDLE; PARAM_OPTYPE.value = new Integer(2); params[1] = PARAM_OPTYPE; params[2] = new ParamInfo(Types.VARCHAR, cursorName, ParamInfo.UNICODE); tds.executeSQL(null, "sp_cursoroption", params, true, 0, -1, -1, true); tds.clearResponseQueue(); if (tds.getReturnStatus().intValue() != 0) { throw new SQLException(Messages.get("error.resultset.openfail"), "24000"); } } // // Check for downgrade of scroll or concurrency options // if ((actualScroll != (scrollOpt & 0xFFF)) || (actualCc != ccOpt)) { if (actualScroll != scrollOpt) { switch (actualScroll) { case CURSOR_TYPE_FORWARD: case CURSOR_TYPE_FASTFORWARDONLY: this.resultSetType = TYPE_FORWARD_ONLY; break; case CURSOR_TYPE_STATIC: this.resultSetType = TYPE_SCROLL_INSENSITIVE; break; case CURSOR_TYPE_DYNAMIC: case CURSOR_TYPE_KEYSET: this.resultSetType = TYPE_SCROLL_SENSITIVE; break; default: statement.getMessages().addWarning(new SQLWarning( Messages.get("warning.cursortype", Integer.toString(actualScroll)), "01000")); } } if (actualCc != ccOpt) { switch (actualCc) { case CURSOR_CONCUR_READ_ONLY: concurrency = CONCUR_READ_ONLY; break; case CURSOR_CONCUR_SCROLL_LOCKS: case CURSOR_CONCUR_OPTIMISTIC: concurrency = CONCUR_UPDATABLE; break; default: statement.getMessages().addWarning(new SQLWarning( Messages.get("warning.concurrtype", Integer.toString(actualCc)), "01000")); } } // SAfe This warning goes to the Statement, not the ResultSet statement.addWarning(new SQLWarning(Messages.get( "warning.cursordowngraded", resultSetType + "/" + concurrency), "01000")); } // // TODO: Save the value of the prepStmtHandle for reuse later // }
2029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2029/6a0dfa3ffdf166ddb9edef1347afb2909589185a/MSCursorResultSet.java/clean/src/main/net/sourceforge/jtds/jdbc/MSCursorResultSet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3238, 918, 3347, 1684, 12, 780, 1847, 16, 225, 514, 5418, 461, 16, 225, 3014, 966, 8526, 1472, 13, 15069, 6483, 288, 56, 2377, 4670, 268, 2377, 273, 3021, 18, 588, 56, 2377, 5621, 474, 2911,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3347, 1684, 12, 780, 1847, 16, 225, 514, 5418, 461, 16, 225, 3014, 966, 8526, 1472, 13, 15069, 6483, 288, 56, 2377, 4670, 268, 2377, 273, 3021, 18, 588, 56, 2377, 5621, 474, 2911,...
output.dumpString(getValue());
output.dumpString(toString());
public void marshalTo(MarshalStream output) throws java.io.IOException { output.write('"'); output.dumpString(getValue()); }
45298 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45298/9f2efc63a858fa0507245b207025eab027840a04/RubyString.java/clean/src/org/jruby/RubyString.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 10893, 774, 12, 8105, 1228, 876, 13, 1216, 2252, 18, 1594, 18, 14106, 288, 202, 202, 2844, 18, 2626, 2668, 5187, 1769, 202, 202, 2844, 18, 8481, 780, 12, 24805, 10663, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10893, 774, 12, 8105, 1228, 876, 13, 1216, 2252, 18, 1594, 18, 14106, 288, 202, 202, 2844, 18, 2626, 2668, 5187, 1769, 202, 202, 2844, 18, 8481, 780, 12, 24805, 10663, 20...
if (createForGroup) {
if (createForSingleGroup) {
public JClass[] createSourceCode(XMLBindingComponent component, SGStateInfo sgState) { if (component == null) { throw new IllegalStateException("XMLBindingComponent may not be null."); } if (sgState == null) { throw new IllegalStateException("SGStateInfo may not be null."); } //-- check for previous JClass bindings JClass[] classes = sgState.getSourceCode(component.getAnnotated()); if (classes != null) return classes; _binding = component.getBinding(); if (sgState.verbose()) { String name = component.getXMLName(); if (name == null) name = component.getJavaClassName(); String msg = "Creating classes for: "+name; sgState.getDialog().notify(msg); } FactoryState state = null; //0-- set the packageName String packageName = component.getJavaPackage(); if ((packageName == null) || (packageName.length() == 0)) packageName = sgState.packageName; //1-- get the name String className = component.getQualifiedName(); //--if no package used then try to append the default package //--used in the SourceGenerator if (className.indexOf('.') == -1) { //--be sure it is a valid className className = JavaNaming.toJavaClassName(className); className = resolveClassName(className, packageName); } //2-- check if we have to create an Item class boolean createGroupItem = component.createGroupItem(); if (createGroupItem) { className += ITEM_NAME; classes = new JClass[2]; } else { classes = new JClass[1]; } //3-- Create factoryState and chains it to sgState //-- to prevent endless loop state = new FactoryState(className, sgState, packageName); state.setCreateGroupItem(createGroupItem); if (sgState.getCurrentFactoryState() == null) sgState.setCurrentFactoryState(state); else { state.setParent(sgState.getCurrentFactoryState()); sgState.setCurrentFactoryState(state); } //--Prevent endless loop if (state.processed(component.getAnnotated())) { return new JClass[0]; } //-- Mark the enclosed annotated structure as processed in the //-- current FactoryState for preventing endless loop. state.markAsProcessed(component.getAnnotated()); ////////////////////////////////////////////////////// //NOTE: check that the component is not referring to //an imported schema to prevent class creation ////////////////////////////////////////////////////// //4-- intialization of the JClass ClassInfo classInfo = state.classInfo; JClass jClass = state.jClass; initialize(jClass); //-- name information classInfo.setNodeName(component.getXMLName()); //-- namespace information classInfo.setNamespaceURI(component.getTargetNamespace()); //5--processing the type XMLType type = component.getXMLType(); boolean createForGroup = false; boolean creatingForAnElement = false; if (type != null) { //5a--the type is a complexType if (type.isComplexType()) { creatingForAnElement = (component.getAnnotated().getStructureType() == Structure.ELEMENT); ComplexType complexType = (ComplexType)type; if (complexType.isTopLevel() && creatingForAnElement) { //--move the view and keep the structure Annotated saved = component.getAnnotated(); String previousPackage = component.getJavaPackage(); XMLBindingComponent baseComponent = new XMLBindingComponent(_config); baseComponent.setBinding(component.getBinding()); baseComponent.setView(complexType); String baseClassName = null; String basePackage = baseComponent.getJavaPackage(); //--if the base class is not in the same package //--of the current class then we have to qualify the base //--class if (basePackage != null && !basePackage.equals(previousPackage)) { baseClassName = baseComponent.getQualifiedName(); if (baseClassName.indexOf('.') == -1) { //--be sure it is a valid className baseClassName = JavaNaming.toJavaClassName(baseClassName); } } else { baseClassName = baseComponent.getJavaClassName(); } jClass.setSuperClass(baseClassName); basePackage = null; baseClassName = null; component.setView(saved); saved = null; } //generate class if the complexType is anonymous and we create classes //for an element OR if the complexType is top-level and we create //classes for it. else if (complexType.isTopLevel() || creatingForAnElement) { //-- check Group type if (complexType.getParticleCount() == 1) { Particle particle = complexType.getParticle(0); if (particle.getStructureType() == Structure.GROUP) { Group group = (Group) particle; if (group.getOrder() == Order.choice) { classInfo.getGroupInfo().setAsChoice(); } } } Annotated saved = component.getAnnotated(); processComplexType(complexType, state); component.setView(saved); saved = null; } } //--5b the type is a simpleType else if (type.isSimpleType()) { SimpleType simpleType = (SimpleType)type; //-- handle our special case for enumerated types if (simpleType.hasFacet(Facet.ENUMERATION)) { //-- Don't create source code for simple types that //-- don't belong in the elements target namespace String tns = simpleType.getSchema().getTargetNamespace(); boolean create = false; if (tns == null) create = (component.getTargetNamespace() == null); else create = tns.equals(component.getTargetNamespace()); if (create) { ClassInfo tmpInfo = sgState.resolve(simpleType); JClass tmpClass = null; if (tmpInfo != null) { tmpClass = tmpInfo.getJClass(); } else { tmpClass = createSourceCode(simpleType, sgState); } classInfo.setSchemaType(new XSClass(tmpClass)); } } else { ////////////////////////////////////////////////////////// //NOTE: generate sources if the flag for generating sources //from imported schemas is on ////////////////////////////////////////////////////////// return new JClass[0]; } } //--5c the type is an anyType else if (type.isAnyType()) { //-- Do not create classes for AnyType classInfo.setSchemaType(new XSClass(SGTypes.Object)); return new JClass[0]; } } //--no type we must be facing an XML schema group else { //--MODEL GROUP OR GROUP try{ createForGroup = true; Group group = (Group)component.getAnnotated(); processContentModel(group, state); component.setView(group); //-- Check Group Type Order order = group.getOrder(); if (order == Order.choice) classInfo.getGroupInfo().setAsChoice(); else if (order == Order.seq) classInfo.getGroupInfo().setAsSequence(); else classInfo.getGroupInfo().setAsAll(); } catch (ClassCastException ce) { //--Should not happen throw new IllegalArgumentException("Illegal binding component:"+ce.getMessage()); } } //6--createGroupItem if (createGroupItem) { //-- create Bound Properties code if (component.hasBoundProperties()) createPropertyChangeMethods(jClass); sgState.bindReference(jClass, classInfo); classes[1] = jClass; //-- create main group class String fname = component.getJavaClassName() + ITEM_NAME; fname = JavaNaming.toJavaMemberName(fname, false); FieldInfo fInfo = null; if (createForGroup) { //A choice Item can occur only once in the nested group fInfo = infoFactory.createFieldInfo(new XSClass(jClass), fname); } else { fInfo = infoFactory.createCollection(new XSClass(jClass), "_items", fname); } fInfo.setContainer(true); className = className.substring(0,className.length()-4); state = new FactoryState(className, sgState, packageName); classInfo = state.classInfo; jClass = state.jClass; initialize(jClass); if (type != null && type.isComplexType()) { ComplexType complexType = (ComplexType)type; if (complexType.isTopLevel() ^ creatingForAnElement) { //process attributes and content type //since it has not be performed before Annotated saved = component.getAnnotated(); processAttributes(complexType, state); component.setView(saved); if (complexType.getContentType() == ContentType.mixed) { FieldInfo fieldInfo = memberFactory.createFieldInfoForContent(new XSString()); handleField(fieldInfo, state); } else if (complexType.getContentType().getType() == ContentType.SIMPLE) { SimpleContent simpleContent = (SimpleContent)complexType.getContentType(); SimpleType temp = simpleContent.getSimpleType(); XSType xsType = _typeConversion.convertType(temp, packageName); FieldInfo fieldInfo = memberFactory.createFieldInfoForContent(xsType); handleField(fieldInfo,state); temp = null; } } } classInfo.addFieldInfo(fInfo); fInfo.createJavaField(jClass); fInfo.createAccessMethods(jClass); fInfo.generateInitializerCode(jClass.getConstructor(0).getSourceCode()); //-- name information classInfo.setNodeName(component.getXMLName()); //-- mark as a container classInfo.setContainer(true); // -- if we have a superclass, make sure that the actual type extends it, not the // xxxItem holder class. String actSuperClass = classes[1].getSuperClass(); jClass.setSuperClass(actSuperClass); classes[1].setSuperClass(null); } //7--set the class information given the component information //--base class String baseClass = component.getExtends(); if ( (baseClass != null) && (baseClass.length() >0) ) { //-- at this point if a base class has been set //-- it means that it is a class generated for an element //-- that extends a class generated for a complexType. Thus //-- no change is possible if (jClass.getSuperClass() == null) jClass.setSuperClass(baseClass); } //--interface implemented String[] implemented = component.getImplements(); if (implemented != null) { for (int i=0 ; i<implemented.length; i++) { String interfaceName = implemented[i]; if ((interfaceName != null) && (interfaceName.length() > 0)) jClass.addInterface(interfaceName); } } //--final jClass.getModifiers().setFinal(component.isFinal()); //--abstract if (component.isAbstract()) { jClass.getModifiers().setAbstract(true); classInfo.setAbstract(true); } //-- process annotation String comment = processAnnotations(component.getAnnotated()); if (comment != null) jClass.getJDocComment().setComment(comment); //--create equals, bounds ... //NOTE: be careful with the derivation stuff when generating bounds properties //-- add imports required by the marshal methods jClass.addImport("java.io.Writer"); jClass.addImport("java.io.Reader"); if (_createMarshalMethods) { //-- #validate() createValidateMethods(jClass); //--don't generate marshal/unmarshal methods //--for abstract classes if (!component.isAbstract()) { //-- #marshal() createMarshalMethods(jClass); //-- #unmarshal() createUnmarshalMethods(jClass, sgState); } } //create equals() method? if (component.hasEquals()) createEqualsMethod(jClass); //implements CastorTestable? if (_testable) SourceFactory.createTestableMethods(jClass); //-- This boolean is set to create bound properties //-- even if the user has set the SUPER CLASS property boolean userDerived = false; if (jClass.getSuperClass() != null) { userDerived = (jClass.getSuperClass().equals(baseClass)); //-- create Bound Properties code if (component.hasBoundProperties() && (userDerived)) createPropertyChangeMethods(jClass); } else { //-- no super-class, create notify method if necessary if (component.hasBoundProperties()) createPropertyChangeMethods(jClass); } sgState.bindReference(jClass, classInfo); sgState.bindReference(component.getAnnotated(), classInfo); classes[0] = jClass; //-- Save source code bindings to prevent duplicate code //-- generation sgState.bindSourceCode(component.getAnnotated(), classes); return classes; }
3614 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3614/50aa9e481bc01b1c581e027541bf948f491a1390/SourceFactory.java/buggy/trunk/castor/src/main/org/exolab/castor/builder/SourceFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 804, 797, 8526, 752, 1830, 1085, 12, 4201, 5250, 1841, 1794, 16, 348, 43, 1119, 966, 11150, 1119, 13, 288, 3639, 309, 261, 4652, 422, 446, 13, 288, 5411, 604, 394, 5477, 2932, 420...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 804, 797, 8526, 752, 1830, 1085, 12, 4201, 5250, 1841, 1794, 16, 348, 43, 1119, 966, 11150, 1119, 13, 288, 3639, 309, 261, 4652, 422, 446, 13, 288, 5411, 604, 394, 5477, 2932, 420...
if(membership_listener != null) membership_listener.suspect((Address)evt.getArg());
if (membership_listener != null) { membership_listener.suspect((Address) evt.getArg()); }
public void passUp(Event evt) { byte[] tmp_state=null; switch(evt.getType()) { case Event.MSG: if(msg_listener != null) msg_listener.receive((Message)evt.getArg()); break; case Event.GET_APPLSTATE: // reply with GET_APPLSTATE_OK if(msg_listener != null) { try { tmp_state=msg_listener.getState(); } catch(Throwable t) { log.error("failed getting state from message listener (" + msg_listener + ")", t); } } channel.returnState(tmp_state); break; case Event.GET_STATE_OK: if(msg_listener != null) { try { msg_listener.setState((byte[])evt.getArg()); } catch(ClassCastException cast_ex) { if(log.isErrorEnabled()) log.error("received SetStateEvent, but argument " + evt.getArg() + " is not serializable. Discarding message."); } } break; case Event.VIEW_CHANGE: View v=(View)evt.getArg(); Vector new_mbrs=v.getMembers(); if(new_mbrs != null) { members.removeAllElements(); for(int i=0; i < new_mbrs.size(); i++) members.addElement(new_mbrs.elementAt(i)); } if(membership_listener != null) membership_listener.viewAccepted(v); break;//// case Event.SET_LOCAL_ADDRESS:// local_addr=(Address)evt.getArg();// break; case Event.SUSPECT: if(membership_listener != null) membership_listener.suspect((Address)evt.getArg()); break; case Event.BLOCK: if(membership_listener != null) membership_listener.block(); break; } }
49475 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49475/9b133caccdd70cd06c1674ee2a42e75071fdc287/MessageDispatcher.java/clean/src/org/jgroups/blocks/MessageDispatcher.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 1342, 1211, 12, 1133, 6324, 13, 288, 5411, 1160, 8526, 1853, 67, 2019, 33, 2011, 31, 5411, 1620, 12, 73, 11734, 18, 588, 559, 10756, 288, 7734, 648, 2587, 18, 11210, 30, 1079...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1342, 1211, 12, 1133, 6324, 13, 288, 5411, 1160, 8526, 1853, 67, 2019, 33, 2011, 31, 5411, 1620, 12, 73, 11734, 18, 588, 559, 10756, 288, 7734, 648, 2587, 18, 11210, 30, 1079...
byte[][] tuple = new byte[13][0];
byte[][] tuple = new byte[13][];
public java.sql.ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException { Field f[] = new Field[13]; Vector v = new Vector(); // The new ResultSet tuple stuff f[0] = new Field(connection, "PROCEDURE_CAT", iVarcharOid, getMaxNameLength()); f[1] = new Field(connection, "PROCEDURE_SCHEM", iVarcharOid, getMaxNameLength()); f[2] = new Field(connection, "PROCEDURE_NAME", iVarcharOid, getMaxNameLength()); f[3] = new Field(connection, "COLUMN_NAME", iVarcharOid, getMaxNameLength()); f[4] = new Field(connection, "COLUMN_TYPE", iInt2Oid, 2); f[5] = new Field(connection, "DATA_TYPE", iInt2Oid, 2); f[6] = new Field(connection, "TYPE_NAME", iVarcharOid, getMaxNameLength()); f[7] = new Field(connection, "PRECISION", iInt4Oid, 4); f[8] = new Field(connection, "LENGTH", iInt4Oid, 4); f[9] = new Field(connection, "SCALE", iInt2Oid, 2); f[10] = new Field(connection, "RADIX", iInt2Oid, 2); f[11] = new Field(connection, "NULLABLE", iInt2Oid, 2); f[12] = new Field(connection, "REMARKS", iVarcharOid, getMaxNameLength()); String sql; if (connection.haveMinimumServerVersion("7.3")) { sql = "SELECT n.nspname,p.proname,p.prorettype,p.proargtypes, t.typtype,t.typrelid "+ " FROM pg_catalog.pg_proc p,pg_catalog.pg_namespace n, pg_catalog.pg_type t "+ " WHERE p.pronamespace=n.oid AND p.prorettype=t.oid "; if (schemaPattern != null && !"".equals(schemaPattern)) { sql += " AND n.nspname LIKE '"+escapeQuotes(schemaPattern.toLowerCase())+"' "; } if (procedureNamePattern != null) { sql += " AND p.proname LIKE '"+escapeQuotes(procedureNamePattern.toLowerCase())+"' "; } sql += " ORDER BY n.nspname, p.proname "; } else { sql = "SELECT NULL AS nspname,p.proname,p.prorettype,p.proargtypes, t.typtype,t.typrelid "+ " FROM pg_proc p,pg_type t "+ " WHERE p.prorettype=t.oid "; if (procedureNamePattern != null) { sql += " AND p.proname LIKE '"+escapeQuotes(procedureNamePattern.toLowerCase())+"' "; } sql += " ORDER BY p.proname "; } ResultSet rs = connection.createStatement().executeQuery(sql); while (rs.next()) { byte schema[] = rs.getBytes("nspname"); byte procedureName[] = rs.getBytes("proname"); int returnType = rs.getInt("prorettype"); String returnTypeType = rs.getString("typtype"); int returnTypeRelid = rs.getInt("typrelid"); String strArgTypes = rs.getString("proargtypes"); StringTokenizer st = new StringTokenizer(strArgTypes); Vector argTypes = new Vector(); while (st.hasMoreTokens()) { argTypes.addElement(new Integer(st.nextToken())); } // decide if we are returning a single column result. if (!returnTypeType.equals("c")) { byte[][] tuple = new byte[13][0]; tuple[0] = null; tuple[1] = schema; tuple[2] = procedureName; tuple[3] = "returnValue".getBytes(); tuple[4] = Integer.toString(java.sql.DatabaseMetaData.procedureColumnReturn).getBytes(); tuple[5] = Integer.toString(connection.getSQLType(returnType)).getBytes(); tuple[6] = connection.getPGType(returnType).getBytes(); tuple[7] = null; tuple[8] = null; tuple[9] = null; tuple[10] = null; tuple[11] = Integer.toString(java.sql.DatabaseMetaData.procedureNullableUnknown).getBytes(); tuple[12] = null; v.addElement(tuple); } // Add a row for each argument. for (int i=0; i<argTypes.size(); i++) { int argOid = ((Integer)argTypes.elementAt(i)).intValue(); byte[][] tuple = new byte[13][0]; tuple[0] = null; tuple[1] = schema; tuple[2] = procedureName; tuple[3] = ("$"+(i+1)).getBytes(); tuple[4] = Integer.toString(java.sql.DatabaseMetaData.procedureColumnIn).getBytes(); tuple[5] = Integer.toString(connection.getSQLType(argOid)).getBytes(); tuple[6] = connection.getPGType(argOid).getBytes(); tuple[7] = null; tuple[8] = null; tuple[9] = null; tuple[10] = null; tuple[11] = Integer.toString(java.sql.DatabaseMetaData.procedureNullableUnknown).getBytes(); tuple[12] = null; v.addElement(tuple); } // if we are returning a multi-column result. if (returnTypeType.equals("c")) { String columnsql = "SELECT a.attname,a.atttypid FROM pg_catalog.pg_attribute a WHERE a.attrelid = "+returnTypeRelid+" ORDER BY a.attnum "; ResultSet columnrs = connection.createStatement().executeQuery(columnsql); while (columnrs.next()) { int columnTypeOid = columnrs.getInt("atttypid"); byte[][] tuple = new byte[13][0]; tuple[0] = null; tuple[1] = schema; tuple[2] = procedureName; tuple[3] = columnrs.getString("attname").getBytes(); tuple[4] = Integer.toString(java.sql.DatabaseMetaData.procedureColumnResult).getBytes(); tuple[5] = Integer.toString(connection.getSQLType(columnTypeOid)).getBytes(); tuple[6] = connection.getPGType(columnTypeOid).getBytes(); tuple[7] = null; tuple[8] = null; tuple[9] = null; tuple[10] = null; tuple[11] = Integer.toString(java.sql.DatabaseMetaData.procedureNullableUnknown).getBytes(); tuple[12] = null; v.addElement(tuple); } } } rs.close(); return connection.getResultSet(null, f, v, "OK", 1); }
46409 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46409/7ab25fffac499eb5906daa9230902a162928cd7c/AbstractJdbc1DatabaseMetaData.java/clean/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 2252, 18, 4669, 18, 13198, 3570, 8153, 3380, 12, 780, 6222, 16, 514, 1963, 3234, 16, 514, 12131, 461, 3234, 16, 514, 7578, 3234, 13, 1216, 6483, 202, 95, 202, 202, 974, 284, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2252, 18, 4669, 18, 13198, 3570, 8153, 3380, 12, 780, 6222, 16, 514, 1963, 3234, 16, 514, 12131, 461, 3234, 16, 514, 7578, 3234, 13, 1216, 6483, 202, 95, 202, 202, 974, 284, ...
String moduleName = req.getParameter("modules");
String moduleName = req.getParameter("modules");
protected void processEngageToService(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { HashMap modules = configContext.getAxisConfiguration().getModules(); req.getSession().setAttribute(Constants.MODULE_MAP, modules); HashMap services = configContext.getAxisConfiguration().getServices(); req.getSession().setAttribute(Constants.SERVICE_MAP, services); String moduleName = req.getParameter("modules"); req.getSession().setAttribute(Constants.ENGAGE_STATUS, null); req.getSession().setAttribute("modules", null); String serviceName = req.getParameter("axisService"); req.getSession().setAttribute(Constants.ENGAGE_STATUS, null); if ((serviceName != null) && (moduleName != null)) { try { configContext.getAxisConfiguration().getService(serviceName).engageModule( configContext.getAxisConfiguration().getModule(new QName(moduleName)), configContext.getAxisConfiguration()); req.getSession().setAttribute(Constants.ENGAGE_STATUS, moduleName + " module engaged to the service Successfully"); } catch (AxisFault axisFault) { req.getSession().setAttribute(Constants.ENGAGE_STATUS, axisFault.getMessage()); } } req.getSession().setAttribute("axisService", null); renderView(ENGAGING_MODULE_TO_SERVICE_JSP_NAME, req, res); }
49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/9cd28cc48911efea6c6eeda6bb202d386774bc29/AdminAgent.java/buggy/modules/core/src/org/apache/axis2/transport/http/AdminAgent.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 918, 1207, 28429, 410, 774, 1179, 12, 2940, 18572, 1111, 16, 12446, 400, 13, 565, 1216, 1860, 16, 16517, 288, 565, 4317, 4381, 273, 642, 1042, 18, 588, 6558, 1750, 7675, 588, 7782, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 918, 1207, 28429, 410, 774, 1179, 12, 2940, 18572, 1111, 16, 12446, 400, 13, 565, 1216, 1860, 16, 16517, 288, 565, 4317, 4381, 273, 642, 1042, 18, 588, 6558, 1750, 7675, 588, 7782, ...
Group group= new Group(result, SWT.NONE); group.setLayout(new GridLayout()); group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); group.setText(PreferencesMessages.getString("CSearchPreferences.ExternalSearchLinks.ExternalSearchLinksGroup")); fExternEnabled = createCheckButton(group, PreferencesMessages.getString("CSearchPreferences.ExternalSearchLinks.EnableMessage")); fExternEnabled.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { Button button = (Button) e.widget; boolean externLinkEnabled = false; fExternLinks.setEnabled(false); if (button.getSelection()){ fExternLinks.setEnabled(true); externLinkEnabled = true; } fOverlayStore.setValue(CSearchPage.EXTERNALMATCH_ENABLED, externLinkEnabled); } }); fExternLinks = createComboBox(group,PreferencesMessages.getString("CSearchPreferences.ExternalSearchLinks.EnableMarkerLinkType"),new String[]{PreferencesMessages.getString("CSearchPreferences.ExternalSearchLinks.Invisible")},PreferencesMessages.getString("CSearchPreferences.ExternalSearchLinks.Invisible")); fExternLinks.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { Combo combo = (Combo) e.widget; fOverlayStore.setValue(CSearchPage.EXTERNALMATCH_VISIBLE, combo.getSelectionIndex()); } });
protected Control createContents(Composite parent) { fOverlayStore.load(); fOverlayStore.start(); initializeDialogUnits(parent); Composite result= new Composite(parent, SWT.NONE); GridLayout layout= new GridLayout(); layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth= 0; layout.verticalSpacing= convertVerticalDLUsToPixels(10); layout.horizontalSpacing= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); result.setLayout(layout); Group group= new Group(result, SWT.NONE); group.setLayout(new GridLayout()); group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); group.setText(PreferencesMessages.getString("CSearchPreferences.ExternalSearchLinks.ExternalSearchLinksGroup")); //$NON-NLS-1$ fExternEnabled = createCheckButton(group, PreferencesMessages.getString("CSearchPreferences.ExternalSearchLinks.EnableMessage")); //$NON-NLS-1$ fExternEnabled.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { Button button = (Button) e.widget; boolean externLinkEnabled = false; fExternLinks.setEnabled(false); if (button.getSelection()){ fExternLinks.setEnabled(true); externLinkEnabled = true; } fOverlayStore.setValue(CSearchPage.EXTERNALMATCH_ENABLED, externLinkEnabled); } }); fExternLinks = createComboBox(group,PreferencesMessages.getString("CSearchPreferences.ExternalSearchLinks.EnableMarkerLinkType"),new String[]{PreferencesMessages.getString("CSearchPreferences.ExternalSearchLinks.Invisible")},PreferencesMessages.getString("CSearchPreferences.ExternalSearchLinks.Invisible")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ fExternLinks.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { Combo combo = (Combo) e.widget; fOverlayStore.setValue(CSearchPage.EXTERNALMATCH_VISIBLE, combo.getSelectionIndex()); } }); Group indexerTimeoutGroup= new Group(result, SWT.NONE); indexerTimeoutGroup.setLayout(new GridLayout()); indexerTimeoutGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); indexerTimeoutGroup.setText(PreferencesMessages.getString("CSearchPreferences.IndexerTimeout.IndexerTimeoutGroup")); //$NON-NLS-1$ fTextControl = (Text) addTextField( indexerTimeoutGroup, PreferencesMessages.getString("CSearchPreferences.IndexerTimeout.Timeout"),"TimeOut",6,0,true); //$NON-NLS-1$ //$NON-NLS-2$ initialize(); return result; }
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/7c700e68e97c6074ab4f7d48b4ccf7f2cc6b8d90/CSearchPreferencePage.java/clean/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CSearchPreferencePage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 8888, 752, 6323, 12, 9400, 982, 13, 288, 202, 202, 74, 11627, 2257, 18, 945, 5621, 202, 202, 74, 11627, 2257, 18, 1937, 5621, 9506, 202, 11160, 6353, 7537, 12, 2938, 1769, 95...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 8888, 752, 6323, 12, 9400, 982, 13, 288, 202, 202, 74, 11627, 2257, 18, 945, 5621, 202, 202, 74, 11627, 2257, 18, 1937, 5621, 9506, 202, 11160, 6353, 7537, 12, 2938, 1769, 95...
void updateCharacterStream(int columnIndex, Reader x, int length)
void updateCharacterStream(int columnIndex, Reader reader, int count)
void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException;
47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/49386b54ba94e937a085f9484371a383d8905f0a/ResultSet.java/buggy/java/sql/ResultSet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 918, 1089, 7069, 1228, 12, 474, 14882, 16, 5393, 2949, 16, 509, 1056, 13, 565, 1216, 6483, 31, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 918, 1089, 7069, 1228, 12, 474, 14882, 16, 5393, 2949, 16, 509, 1056, 13, 565, 1216, 6483, 31, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
JDragTree.this.paintImmediately(this._raGhost.getBounds());
JDragTree.this.paintImmediately(_raGhost.getBounds());
public void dragOver(DropTargetDragEvent e) { if( e==null || this._raGhost == null || this._ptLast == null || JDragTree.this._ptOffset == null || JDragTree.this._imgGhost == null || this._raCueLine == null ) { return; } // Even if the mouse is not moving, this method is still invoked 10 times per second Point pt = e.getLocation(); if(pt==null) { return; } if (pt.equals(this._ptLast)) return; // Try to determine whether the user is flicking the cursor right or left int nDeltaLeftRight = pt.x - this._ptLast.x; if ( (this._nLeftRight > 0 && nDeltaLeftRight < 0) || (this._nLeftRight < 0 && nDeltaLeftRight > 0) ) this._nLeftRight = 0; this._nLeftRight += nDeltaLeftRight; this._ptLast = pt; Graphics2D g2 = (Graphics2D) JDragTree.this.getGraphics(); if( g2 == null ) { return; } // If a drag image is not supported by the platform, then draw my own drag image if (!DragSource.isDragImageSupported()) { JDragTree.this.paintImmediately(this._raGhost.getBounds()); // Rub out the last ghost image and cue line // And remember where we are about to draw the new ghost image this._raGhost.setRect(pt.x - JDragTree.this._ptOffset.x, pt.y - JDragTree.this._ptOffset.y, JDragTree.this._imgGhost.getWidth(), JDragTree.this._imgGhost.getHeight()); g2.drawImage(JDragTree.this._imgGhost, AffineTransform.getTranslateInstance(this._raGhost.getX(), this._raGhost.getY()), null); } else // Just rub out the last cue line JDragTree.this.paintImmediately(this._raCueLine.getBounds()); TreePath path = JDragTree.this.getClosestPathForLocation(pt.x, pt.y); if (!(path == this._pathLast)) { this._nLeftRight = 0; // We've moved up or down, so reset left/right movement trend this._pathLast = path; this._timerHover.restart(); } // In any case draw (over the ghost image if necessary) a cue line indicating where a drop will occur Rectangle raPath = JDragTree.this.getPathBounds(path); this._raCueLine.setRect(0, raPath.y+(int)raPath.getHeight(), JDragTree.this.getWidth(), 2); g2.setColor(this._colorCueLine); g2.fill(this._raCueLine); this._nShift = 0; // And include the cue line in the area to be rubbed out next time this._raGhost = this._raGhost.createUnion(this._raCueLine); // Do this if you want to prohibit dropping onto the drag source if (path.equals(JDragTree.this._pathSource)) e.rejectDrag(); else e.acceptDrag(e.getDropAction()); }
47012 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47012/0458430a0dc8a713aa2b4d64f000cbbaaeb4adea/JDragTree.java/buggy/src/thaw/gui/JDragTree.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 1071, 918, 8823, 4851, 12, 7544, 2326, 11728, 1133, 425, 13, 1082, 288, 2398, 309, 12, 425, 631, 2011, 747, 333, 6315, 354, 43, 2564, 422, 446, 747, 333, 6315, 337, 3024, 422, 446, 747...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1071, 918, 8823, 4851, 12, 7544, 2326, 11728, 1133, 425, 13, 1082, 288, 2398, 309, 12, 425, 631, 2011, 747, 333, 6315, 354, 43, 2564, 422, 446, 747, 333, 6315, 337, 3024, 422, 446, 747...
result = serializer.deserialize(new StringReader(writer.toString()));
result = deserializer.deserialize(new StringReader(writer.toString()));
protected DoRoundTrip[] getRoundTripActions(final Object original) { return new DoRoundTrip[] { // With a Writer new DoRoundTrip() { public void doRoundTrip(ObjectSerializer serializer, ObjectSerializer deserializer) throws Exception { StringWriter writer = new StringWriter(); serializer.serialize(writer, original); result = serializer.deserialize(new StringReader(writer.toString())); } }, // With an OutputStream new DoRoundTrip() { public void doRoundTrip(ObjectSerializer serializer, ObjectSerializer deserializer) throws Exception { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); serializer.serialize(outputStream, original); result = serializer.deserialize(new ByteArrayInputStream(outputStream.toByteArray())); } }, // With a File new DoRoundTrip() { public void doRoundTrip(ObjectSerializer serializer, ObjectSerializer deserializer) throws Exception { File tempFile = File.createTempFile("testfile", ".xml"); tempFile.deleteOnExit(); serializer.serialize(tempFile, original); result = serializer.deserialize(tempFile); } }, // With a String new DoRoundTrip() { public void doRoundTrip(ObjectSerializer serializer, ObjectSerializer deserializer) throws Exception { File tempFile = File.createTempFile("testfile", ".xml"); tempFile.deleteOnExit(); serializer.serialize(tempFile.toString(), original); result = serializer.deserialize(tempFile.toString()); } }, }; }
8150 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8150/0bc212ec0ae7b12cac6f95b2318bda16f65863a6/ObjectSerializerTester.java/clean/test/src/org/lockss/util/ObjectSerializerTester.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 2256, 11066, 16148, 8526, 4170, 772, 16148, 6100, 12, 6385, 1033, 2282, 13, 288, 565, 327, 394, 2256, 11066, 16148, 8526, 288, 3639, 368, 3423, 279, 5497, 3639, 394, 2256, 11066, 1614...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2256, 11066, 16148, 8526, 4170, 772, 16148, 6100, 12, 6385, 1033, 2282, 13, 288, 565, 327, 394, 2256, 11066, 16148, 8526, 288, 3639, 368, 3423, 279, 5497, 3639, 394, 2256, 11066, 1614...
private void init(String sTitle) { display = Display.getDefault();
private void init( String sTitle ) { display = Display.getDefault( );
private void init(String sTitle) { display = Display.getDefault(); if ( PlatformUI.isWorkbenchRunning( ) ) { shell = new Shell( PlatformUI.getWorkbench( ) .getDisplay( ) .getActiveShell( ), SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL ); } else { shell = new Shell( display, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL ); } shell.setText(sTitle); shell.setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT); shell.setLayout(new FillLayout()); // CENTER THE DIALOG ON SCREEN shell.setLocation((display.getClientArea().width / 2) - (shell.getSize().x / 2), (display.getClientArea().height / 2) - (shell.getSize().y / 2)); placeComponents(); shell.setDefaultButton(btnOK); shell.open(); while(!shell.isDisposed()) { if(!display.readAndDispatch()) { display.sleep(); } } }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/a9320be9ea7b1e0ded35d1f9f455bafd282468e8/ErrorDialog.java/buggy/core/org.eclipse.birt.core.ui/src/org/eclipse/birt/core/ui/frameworks/errordisplay/ErrorDialog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1208, 12, 780, 272, 4247, 13, 565, 288, 3639, 2562, 273, 9311, 18, 588, 1868, 5621, 202, 202, 430, 261, 11810, 5370, 18, 291, 2421, 22144, 7051, 12, 262, 262, 202, 202, 95, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1208, 12, 780, 272, 4247, 13, 565, 288, 3639, 2562, 273, 9311, 18, 588, 1868, 5621, 202, 202, 430, 261, 11810, 5370, 18, 291, 2421, 22144, 7051, 12, 262, 262, 202, 202, 95, ...
boolean remove( User user, String docName ) throws EXistException, PermissionDeniedException;
boolean remove(User user, String docName) throws EXistException, PermissionDeniedException;
boolean remove( User user, String docName ) throws EXistException, PermissionDeniedException;
2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/bd6906f52069c6612f3a61229c258c275e3c12f1/RpcAPI.java/clean/src/org/exist/xmlrpc/RpcAPI.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1250, 1206, 12, 2177, 729, 16, 514, 997, 461, 262, 540, 1216, 5675, 376, 503, 16, 8509, 15877, 31, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1250, 1206, 12, 2177, 729, 16, 514, 997, 461, 262, 540, 1216, 5675, 376, 503, 16, 8509, 15877, 31, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
new WindowsDefaultBrowserLauncher()
new SystemDefaultBrowserLauncher()
protected void setUp() throws Exception { super.setUp(); selenium = new SeleneseTestingSelenium( new JettyCommandProcessor(null, DefaultSelenium.DEFAULT_SELENIUM_CONTEXT, new TestIngPurposesStaticContentHandler()), new WindowsDefaultBrowserLauncher() ); selenium.start(); }
4718 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4718/080654cd190b31c7681d57d1888691dd0e97a93b/InBrowserWithJavaScriptIntegrationTest.java/buggy/code/java/integration-test/com/thoughtworks/selenium/embedded/jetty/InBrowserWithJavaScriptIntegrationTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 24292, 1435, 1216, 1185, 288, 3639, 2240, 18, 542, 1211, 5621, 3639, 29480, 273, 394, 4352, 275, 3392, 22218, 1877, 17327, 12, 7734, 394, 804, 22084, 2189, 5164, 12, 2011, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 24292, 1435, 1216, 1185, 288, 3639, 2240, 18, 542, 1211, 5621, 3639, 29480, 273, 394, 4352, 275, 3392, 22218, 1877, 17327, 12, 7734, 394, 804, 22084, 2189, 5164, 12, 2011, 16, ...