Program: 138584
Project: 138584
Buggy source:
@Override public Image getImage(Object element){
  Image image=null;
  if (element instanceof ItemRecord) {
    ItemRecord record=(ItemRecord)element;
    File file=record.getFile();
    String fileName=file.getName();
    if (file.isDirectory()) {
      image=ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
      EResourceConstant constant=resolveResourceConstant(fileName);
      if (constant != null) {
switch (constant) {
case DATA_PROFILING:
          image=ImageLib.getImage(ImageLib.DATA_PROFILING);
        break;
case METADATA:
      image=ImageLib.getImage(ImageLib.METADATA);
    break;
case LIBRARIES:
  image=ImageLib.getImage(ImageLib.LIBRARIES);
break;
case ANALYSIS:
break;
case REPORTS:
break;
case EXCHANGE:
image=ImageLib.getImage(ImageLib.EXCHANGE);
break;
case DB_CONNECTIONS:
case MDM_CONNECTIONS:
image=ImageLib.getImage(ImageLib.CONNECTION);
break;
default :
break;
}
}
}
 else {
if (fileName.endsWith(FactoriesUtil.ANA)) {
image=ImageLib.getImage(ImageLib.ANALYSIS_OBJECT);
}
 else if (fileName.endsWith(FactoriesUtil.REP)) {
image=ImageLib.getImage(ImageLib.REPORT_OBJECT);
}
 else if (fileName.endsWith(FactoriesUtil.PATTERN)) {
image=ImageLib.getImage(ImageLib.PATTERN_REG);
}
 else if (fileName.endsWith(FactoriesUtil.DQRULE)) {
image=ImageLib.getImage(ImageLib.DQ_RULE);
}
 else if (fileName.endsWith(FactoriesUtil.ITEM_EXTENSION)) {
image=ImageLib.getImage(ImageLib.TD_DATAPROVIDER);
}
 else if (fileName.endsWith(FactoriesUtil.DEFINITION)) {
image=ImageLib.getImage(ImageLib.IND_DEFINITION);
}
}
}
return image != null ? image : super.getImage(element);
}

Fixed version (ground truth):
@Override public Image getImage(Object element){
  Image image=null;
  if (element instanceof ItemRecord) {
    ItemRecord record=(ItemRecord)element;
    File file=record.getFile();
    String fileName=file.getName();
    if (file.isDirectory()) {
      image=ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
      EResourceConstant constant=resolveResourceConstant(fileName);
      if (constant != null) {
switch (constant) {
case DATA_PROFILING:
          image=ImageLib.getImage(ImageLib.DATA_PROFILING);
        break;
case METADATA:
      image=ImageLib.getImage(ImageLib.METADATA);
    break;
case LIBRARIES:
  image=ImageLib.getImage(ImageLib.LIBRARIES);
break;
case ANALYSIS:
break;
case REPORTS:
break;
case EXCHANGE:
image=ImageLib.getImage(ImageLib.EXCHANGE);
break;
case DB_CONNECTIONS:
case MDM_CONNECTIONS:
image=ImageLib.getImage(ImageLib.CONNECTION);
break;
default :
break;
}
}
}
 else {
if (fileName.endsWith(FactoriesUtil.ANA)) {
image=ImageLib.getImage(ImageLib.ANALYSIS_OBJECT);
}
 else if (fileName.endsWith(FactoriesUtil.REP)) {
image=ImageLib.getImage(ImageLib.REPORT_OBJECT);
}
 else if (fileName.endsWith(FactoriesUtil.PATTERN)) {
image=ImageLib.getImage(ImageLib.PATTERN_REG);
}
 else if (fileName.endsWith(FactoriesUtil.DQRULE)) {
image=ImageLib.getImage(ImageLib.DQ_RULE);
}
 else if (fileName.endsWith(FactoriesUtil.ITEM_EXTENSION)) {
image=ImageLib.getImage(ImageLib.TD_DATAPROVIDER);
}
 else if (fileName.endsWith(FactoriesUtil.DEFINITION)) {
image=ImageLib.getImage(ImageLib.IND_DEFINITION);
}
 else if (fileName.endsWith(FactoriesUtil.SQL)) {
image=ImageLib.getImage(ImageLib.SOURCE_FILE);
}
}
}
return image != null ? image : super.getImage(element);
}