*/
private AbstractDataTable createChartDataTable() {
Project p = this.project;
DataTable data = DataTable.create();
data.addColumn(ColumnType.STRING, "Version");
ArrayList<FindbugsBugInstance> allBp = new ArrayList<FindbugsBugInstance>();
for (int i = 0; i < p.getVersionCount(); i++) {
if (p.getBp(i + 1) != null)
allBp.addAll(p.getBp(i + 1));
}
Set<String> usedAbbrevs = new TreeSet<String>();
for (int i = 0; i < allBp.size(); i++) {
usedAbbrevs.add(allBp.get(i).getAbbrev());
}
data.addRows(p.getVersionCount());
Iterator<String> it = usedAbbrevs.iterator();
while (it.hasNext()) {
String abbrev = it.next();
int col = data.addColumn(ColumnType.NUMBER,
FindbugsBugInstance.getAbbrevDescription(abbrev));
// Unavailable stats counter
int z = 0;
for (int i = 0; i < p.getVersionCount(); i++) {
if (p.getBp(i + 1) == null) {
z++;
} else {
// Version
data.setValue(i - z, 0, String.valueOf(i + 1));
int abbrevErrCount = getAbbrevErrorCount(abbrev, i + 1);
data.setValue(i - z, col, abbrevErrCount);
}
}
}
return data;