private String getBugsCategories(DetectorFactory factory) {
        Collection<BugPattern> patterns = factory.getReportedBugPatterns();
        String category = null;
        Set<String> categories = new TreeSet<>();
        for (BugPattern bugPattern : patterns) {
            String category2 = bugPattern.getCategory();
            if (category == null) {
                category = category2;
            } else if (!category.equals(category2)) {
                categories.add(category);
                categories.add(category2);
            }
        }
        if (!categories.isEmpty()) {
            StringBuilder sb = new StringBuilder();
            for (String string : categories) {
                sb.append(I18N.instance().getBugCategoryDescription(string)).append("|");
            }
            category = sb.toString();
        } else {
            category = I18N.instance().getBugCategoryDescription(category);
        }
        return category;
    }
private String getBugsCategories ( DetectorFactory factory ) { Collection < BugPattern > patterns = factory . getReportedBugPatterns ( ) ; String category = null ; Set < String > categories = new TreeSet < > ( ) ; for ( BugPattern bugPattern : patterns ) { String category2 = bugPattern . getCategory ( ) ; if ( category == null ) { category = category2 ; } else if ( ! category . equals ( category2 ) ) { categories . add ( category ) ; categories . add ( category2 ) ; } } if ( ! categories . isEmpty ( ) ) { StringBuilder sb = new StringBuilder ( ) ; for ( String string : categories ) { sb . append ( I18N . instance ( ) . getBugCategoryDescription ( string ) ) . append ( "|" ) ; } category = sb . toString ( ) ; } else { category = I18N . instance ( ) . getBugCategoryDescription ( category ) ; } return category ; }
@param factory
@return