private Set<String> buildClassSet(BugCollection bugCollection) {
        Set<String> classSet = new HashSet<>();

        for (Iterator<BugInstance> i = bugCollection.iterator(); i.hasNext();) {
            BugInstance warning = i.next();
            for (Iterator<BugAnnotation> j = warning.annotationIterator(); j.hasNext();) {
                BugAnnotation annotation = j.next();
                if (!(annotation instanceof ClassAnnotation)) {
                    continue;
                }
                classSet.add(((ClassAnnotation) annotation).getClassName());
            }
        }

        return classSet;
    }
private Set < String > buildClassSet ( BugCollection bugCollection ) { Set < String > classSet = new HashSet < > ( ) ; for ( Iterator < BugInstance > i = bugCollection . iterator ( ) ; i . hasNext ( ) ; ) { BugInstance warning = i . next ( ) ; for ( Iterator < BugAnnotation > j = warning . annotationIterator ( ) ; j . hasNext ( ) ; ) { BugAnnotation annotation = j . next ( ) ; if ( ! ( annotation instanceof ClassAnnotation ) ) { continue ; } classSet . add ( ( ( ClassAnnotation ) annotation ) . getClassName ( ) ) ; } } return classSet ; }
Find set of classes referenced in given BugCollection.

@param bugCollection
@return set of classes referenced in the BugCollection