+ Column[] columns = {
+ CfbSchema.FOUNDID,
+ CfbSchema.BUGID,
+ CfbSchema.CATEGORYID,
+ CfbSchema.FIRSTLOCID,
+ CfbSchema.SECONDLOCID,
+ CfbSchema.THIRDLOCID,
+ CfbSchema.VARID_FK
+ };
+ Table[] tables = {
+ CfbSchema.FOUND
+ };
+ Condition[] conditions = {
+ new Condition(CfbSchema.RUNID, runId, Operation.EQUAL)
+ };
+
+ BugCollection coll = new BugCollection();
+
+ List<Row> rows = m_driver.select(m_con, columns, tables, conditions);
+
+ for (Row row : rows) {
+ // long foundId = row.getLong(0);
+ Long bugId = row.getLong(1);
+ Long categoryId = row.getLong(2);
+ Long firstLocId = row.getLong(3);
+ Long secondLocId = row.getLong(4);
+ Long thirdLocId = row.getLong(5);
+ Long varId = row.getLong(6);
+
+ String bugType = getBugType(bugId);
+ String category = getCategoryName(categoryId);
+ Location[] locations = { getLoc(firstLocId), getLoc(secondLocId), getLoc(thirdLocId) };
+ LocalVariable[] vars = { getVar(varId) };
+
+
+ BugInstance bug = new BugInstance(bugId, category, bugType, locations, vars);
+ coll.add(bug);
+ }
+
+ return coll;