Multiset<String> evaluations = new Multiset<String>();
Multiset<String> designations = new Multiset<String>();
Multiset<String> bugStatus = new Multiset<String>();
int issuesWithThisManyReviews[] = new int[100];
I18N i18n = I18N.instance();
int packageCount = 0;
int classCount = 0;
int ncss = 0;
ProjectStats projectStats = bugCollection.getProjectStats();
for (PackageStats ps : projectStats.getPackageStats()) {
int num = ps.getNumClasses();
if (ClassName.matchedPrefixes(packagePrefixes, ps.getPackageName()) && num > 0) {
packageCount++;
ncss += ps.size();
classCount += num;
}
}
if (classCount == 0) {
w.println("No classes were analyzed");
return;
}
if (packagePrefixes != null && packagePrefixes.length > 0) {
String lst = Arrays.asList(packagePrefixes).toString();
w.println("Code analyzed in " + lst.substring(1, lst.length() - 1));
} else {
w.println("Code analyzed");
}
w.printf("%,7d packages%n%,7d classes%n", packageCount, classCount);
if (ncss > 0) {
w.printf("%,7d thousands of lines of non-commenting source statements%n", (ncss + 999) / 1000);
}
w.println();
int count = 0;
for (BugInstance bd : bugs) {
count++;
HashSet<String> reviewers = new HashSet<String>();
String status = supportsBugLinks() && getBugLinkStatus(bd).bugIsFiled() ? getBugStatus(bd) : null;
if (status != null) {
bugStatus.add(status);
}
for (BugDesignation d : getLatestDesignationFromEachUser(bd)) {
if (reviewers.add(d.getUser())) {
evaluations.add(d.getUser());
designations.add(i18n.getUserDesignation(d.getDesignationKey()));
}
}
int numReviews = Math.min(reviewers.size(), issuesWithThisManyReviews.length - 1);
issuesWithThisManyReviews[numReviews]++;