return bug.getType();
}
// uses pattern type, the naming "Abbrev" is misleading
return bug.getAbbrev();
} else if (data instanceof BugPattern) {
BugPattern pattern = (BugPattern) data;
if (useSpecificPattern) {
// uses specific pattern kind, the naming "Type" is misleading
return pattern.getType();
}
// uses pattern type, the naming "Abbrev" is misleading
return pattern.getAbbrev();
} else if (data instanceof BugCode) {
// same as pattern.getAbbrev(): it's pattern type
return ((BugCode) data).getAbbrev();
}
return null;