public int getCWEid() { BugPattern pattern = getBugPattern(); int cweid = pattern.getCWEid(); if (cweid != 0) { return cweid; } BugCode bugCode = pattern.getBugCode(); return bugCode.getCWEid(); } public void writeXML(XMLOutput xmlOutput, BugCollection bugCollection, boolean addMessages) throws IOException {
public boolean isDisabledByDefault(String bugPatternOrCode) { @CheckForNull BugPattern pattern = lookupBugPattern(bugPatternOrCode); if (pattern != null) { for(DetectorFactory fac : factoryList) { if (fac.isDefaultEnabled() && fac.getReportedBugPatterns().contains(pattern)) { return false; } } return true; } @CheckForNull BugCode code = lookupBugCode(bugPatternOrCode); if (code != null) { for(DetectorFactory fac : factoryList) { if (fac.isDefaultEnabled()) { for(BugPattern p : fac.getReportedBugPatterns()) { if (p.getBugCode().equals(code)) { return false; } } } } return true; } return false; }
public int getCWEid() { BugPattern pattern = getBugPattern(); int cweid = pattern.getCWEid(); if (cweid != 0) { return cweid; } BugCode bugCode = pattern.getBugCode(); return bugCode.getCWEid(); } public void writeXML(XMLOutput xmlOutput, BugCollection bugCollection, boolean addMessages) throws IOException {
public boolean isDisabledByDefault(String bugPatternOrCode) { @CheckForNull BugPattern pattern = lookupBugPattern(bugPatternOrCode); if (pattern != null) { for(DetectorFactory fac : factoryList) { if (fac.isDefaultEnabled() && fac.getReportedBugPatterns().contains(pattern)) { return false; } } return true; } @CheckForNull BugCode code = lookupBugCode(bugPatternOrCode); if (code != null) { for(DetectorFactory fac : factoryList) { if (fac.isDefaultEnabled()) { for(BugPattern p : fac.getReportedBugPatterns()) { if (p.getBugCode().equals(code)) { return false; } } } } return true; } return false; }