@Override public void finish() { Iterator<BugInstance> i = bugCollection.iterator(); while (i.hasNext()) { BugInstance bugInstance = i.next(); printBug(bugInstance); } outputStream.close(); }
public SortedBugCollection execute() { SortedBugCollection result = new SortedBugCollection(); for (Iterator<BugInstance> i = newCollection.iterator(); i.hasNext();) { BugInstance bugInstance = i.next(); if (!origCollection.contains(bugInstance)) { result.add(bugInstance); } } return result; }
private void writeBugCategories(XMLOutput xmlOutput) throws IOException { // Find bug categories reported Set<String> bugCatSet = new HashSet<>(); for (Iterator<BugInstance> i = iterator(); i.hasNext();) { BugInstance bugInstance = i.next(); BugPattern bugPattern = bugInstance.getBugPattern(); bugCatSet.add(bugPattern.getCategory()); } // Emit element describing each reported bug code for (String bugCat : bugCatSet) { String bugCatDescription = I18N.instance().getBugCategoryDescription(bugCat); if (bugCatDescription == null) { continue; } XMLAttributeList attributeList = new XMLAttributeList(); attributeList.addAttribute("category", bugCat); xmlOutput.openTag("BugCategory", attributeList); xmlOutput.openTag("Description"); xmlOutput.writeText(bugCatDescription); xmlOutput.closeTag("Description"); xmlOutput.closeTag("BugCategory"); } }
private void writeBugCodes(XMLOutput xmlOutput) throws IOException { // Find bug codes reported Set<String> bugCodeSet = new HashSet<>(); for (Iterator<BugInstance> i = iterator(); i.hasNext();) { BugInstance bugInstance = i.next(); String bugCode = bugInstance.getAbbrev(); if (bugCode != null) { bugCodeSet.add(bugCode); } } // Emit element describing each reported bug code for (String bugCodeAbbrev : bugCodeSet) { BugCode bugCode = DetectorFactoryCollection.instance().getBugCode(bugCodeAbbrev); String bugCodeDescription = bugCode.getDescription(); if (bugCodeDescription == null) { continue; } XMLAttributeList attributeList = new XMLAttributeList(); attributeList.addAttribute("abbrev", bugCodeAbbrev); if (bugCode.getCWEid() != 0) { attributeList.addAttribute("cweid", Integer.toString(bugCode.getCWEid())); } xmlOutput.openTag("BugCode", attributeList); xmlOutput.openTag("Description"); xmlOutput.writeText(bugCodeDescription); xmlOutput.closeTag("Description"); xmlOutput.closeTag("BugCode"); } }
sequenceToAppVersionMap.put(sequenceNumber, currentAppVersion); for (Iterator<BugInstance> j = bugCollection.iterator(); j.hasNext();) { BugInstance bugInstance = j.next();
private void writeBugPatterns(XMLOutput xmlOutput) throws IOException { for (Iterator<BugInstance> i = iterator(); i.hasNext();) { BugInstance bugInstance = i.next(); BugPattern bugPattern = bugInstance.getBugPattern();
@Override public void finish() { Iterator<BugInstance> i = bugCollection.iterator(); while (i.hasNext()) { BugInstance bugInstance = i.next(); printBug(bugInstance); } outputStream.close(); }
public SortedBugCollection execute() { SortedBugCollection result = new SortedBugCollection(); for (Iterator<BugInstance> i = newCollection.iterator(); i.hasNext();) { BugInstance bugInstance = i.next(); if (!origCollection.contains(bugInstance)) { result.add(bugInstance); } } return result; }
static public SortedBugCollection union(SortedBugCollection origCollection, SortedBugCollection newCollection) { SortedBugCollection result = origCollection.duplicate(); for (Iterator<BugInstance> i = newCollection.iterator(); i.hasNext();) { BugInstance bugInstance = i.next(); result.add(bugInstance); } ProjectStats stats = result.getProjectStats(); ProjectStats stats2 = newCollection.getProjectStats(); stats.addStats(stats2); Project project = result.getProject(); project.add(newCollection.getProject()); return result; }
private void writeBugCategories(XMLOutput xmlOutput) throws IOException { // Find bug categories reported Set<String> bugCatSet = new HashSet<String>(); for (Iterator<BugInstance> i = iterator(); i.hasNext();) { BugInstance bugInstance = i.next(); BugPattern bugPattern = bugInstance.getBugPattern(); bugCatSet.add(bugPattern.getCategory()); } // Emit element describing each reported bug code for (String bugCat : bugCatSet) { String bugCatDescription = I18N.instance().getBugCategoryDescription(bugCat); if (bugCatDescription == null) { continue; } XMLAttributeList attributeList = new XMLAttributeList(); attributeList.addAttribute("category", bugCat); xmlOutput.openTag("BugCategory", attributeList); xmlOutput.openTag("Description"); xmlOutput.writeText(bugCatDescription); xmlOutput.closeTag("Description"); xmlOutput.closeTag("BugCategory"); } }
sequenceToAppVersionMap.put(sequenceNumber, currentAppVersion); for (Iterator<BugInstance> j = bugCollection.iterator(); j.hasNext();) { BugInstance bugInstance = j.next();
private void writeBugCodes(XMLOutput xmlOutput) throws IOException { // Find bug codes reported Set<String> bugCodeSet = new HashSet<String>(); for (Iterator<BugInstance> i = iterator(); i.hasNext();) { BugInstance bugInstance = i.next(); String bugCode = bugInstance.getAbbrev(); if (bugCode != null) { bugCodeSet.add(bugCode); } } // Emit element describing each reported bug code for (String bugCodeAbbrev : bugCodeSet) { BugCode bugCode = DetectorFactoryCollection.instance().getBugCode(bugCodeAbbrev); String bugCodeDescription = bugCode.getDescription(); if (bugCodeDescription == null) { continue; } XMLAttributeList attributeList = new XMLAttributeList(); attributeList.addAttribute("abbrev", bugCodeAbbrev); if (bugCode.getCWEid() != 0) { attributeList.addAttribute("cweid", Integer.toString(bugCode.getCWEid())); } xmlOutput.openTag("BugCode", attributeList); xmlOutput.openTag("Description"); xmlOutput.writeText(bugCodeDescription); xmlOutput.closeTag("Description"); xmlOutput.closeTag("BugCode"); } }
if (commandLine.annotationUploadFormat) { bugCollection.computeBugHashes(); for (Iterator<BugInstance> i = bugCollection.iterator(); i.hasNext();) { BugInstance warning = i.next(); try {
private void writeBugPatterns(XMLOutput xmlOutput) throws IOException { for (Iterator<BugInstance> i = iterator(); i.hasNext();) { BugInstance bugInstance = i.next(); BugPattern bugPattern = bugInstance.getBugPattern();