Program: 138378
Project: 138378
Buggy source:
public Image getImage(Object element){
  Image image=super.getImage(element);
  if (element instanceof IRepositoryNode) {
    IRepositoryNode node=(IRepositoryNode)element;
    IRepositoryViewObject viewObject=node.getObject();
    ENodeType type=node.getType();
    if (node instanceof ReportAnalysisRepNode) {
      image=ImageLib.getImage(ImageLib.ANALYSIS_OBJECT);
    }
    if (element instanceof RecycleBinRepNode) {
      image=ImageLib.getImage(ImageLib.RECYCLEBIN_EMPTY);
    }
 else     if (type.equals(ENodeType.SYSTEM_FOLDER)) {
      if (viewObject.getLabel().equals(EResourceConstant.DATA_PROFILING.getName())) {
        image=ImageLib.getImage(ImageLib.DATA_PROFILING);
      }
 else       if (viewObject.getLabel().equals(EResourceConstant.METADATA.getName())) {
        image=ImageLib.getImage(ImageLib.METADATA);
      }
 else       if (node instanceof DBConnectionFolderRepNode) {
        image=ImageLib.getImage(ImageLib.CONNECTION);
      }
 else       if (node instanceof MDMConnectionFolderRepNode) {
        image=ImageLib.getImage(ImageLib.MDM_CONNECTION);
      }
 else       if (viewObject.getLabel().equals(EResourceConstant.FILEDELIMITED.getName())) {
        image=ImageLib.getImage(ImageLib.FILE_DELIMITED);
      }
 else       if (viewObject.getLabel().equals(EResourceConstant.LIBRARIES.getName())) {
        image=ImageLib.getImage(ImageLib.LIBRARIES);
      }
 else       if (viewObject.getLabel().equals(EResourceConstant.EXCHANGE.getName())) {
        image=ImageLib.getImage(ImageLib.EXCHANGE);
      }
 else {
        image=ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
      }
    }
 else     if (type.equals(ENodeType.SIMPLE_FOLDER)) {
      image=ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
    }
 else     if (type.equals(ENodeType.REPOSITORY_ELEMENT)) {
      if (node instanceof DBConnectionRepNode) {
        if (!isSupportedConnection(node)) {
          image=ImageLib.createErrorIcon(ImageLib.TD_DATAPROVIDER).createImage();
        }
        image=ImageLib.getImage(ImageLib.TD_DATAPROVIDER);
      }
 else       if (node instanceof MDMConnectionRepNode) {
        image=ImageLib.getImage(ImageLib.MDM_CONNECTION);
      }
 else       if (node instanceof DFConnectionRepNode) {
        image=ImageLib.getImage(ImageLib.FILE_DELIMITED);
      }
 else       if (node instanceof AnalysisRepNode) {
        image=ImageLib.getImage(ImageLib.ANALYSIS_OBJECT);
      }
 else       if (node instanceof ReportRepNode) {
        image=ImageLib.getImage(ImageLib.REPORT_OBJECT);
      }
 else       if (node instanceof SysIndicatorDefinitionRepNode) {
        image=ImageLib.getImage(ImageLib.IND_DEFINITION);
      }
 else       if (node instanceof PatternRepNode) {
        image=ImageLib.getImage(ImageLib.PATTERN_REG);
      }
 else       if (node instanceof RuleRepNode) {
        image=ImageLib.getImage(ImageLib.DQ_RULE);
      }
 else       if (node instanceof SourceFileRepNode) {
        image=ImageLib.getImage(ImageLib.SOURCE_FILE);
      }
 else       if (node instanceof ExchangeCategoryRepNode || node instanceof ExchangeComponentRepNode) {
        image=ImageLib.getImage(ImageLib.EXCHANGE);
      }
 else       if (node instanceof RepositoryNode) {
        Image imageNode=getImageByContentType((RepositoryNode)node);
        if (image != null) {
          image=imageNode;
        }
      }
      if (ERepositoryStatus.LOCK_BY_USER == ProxyRepositoryFactory.getInstance().getStatus(viewObject)) {
        image=ImageLib.createLockedIcon(ImageDescriptor.createFromImage(image)).createImage();
      }
    }
 else     if (type.equals(ENodeType.TDQ_REPOSITORY_ELEMENT)) {
      if (node instanceof DBCatalogRepNode) {
        image=ImageLib.getImage(ImageLib.CATALOG);
      }
 else       if (node instanceof DBSchemaRepNode) {
        image=ImageLib.getImage(ImageLib.SCHEMA);
      }
 else       if (node instanceof DBTableFolderRepNode) {
        image=ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
      }
 else       if (node instanceof DBViewFolderRepNode) {
        image=ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
      }
 else       if (node instanceof DBTableRepNode || node instanceof DFTableRepNode) {
        image=ImageLib.getImage(ImageLib.TABLE);
      }
 else       if (node instanceof DBViewRepNode) {
        image=ImageLib.getImage(ImageLib.VIEW);
      }
 else       if (node instanceof DBColumnRepNode) {
        if (((DBColumnRepNode)node).isKey()) {
          image=ImageLib.getImage(ImageLib.PK_COLUMN);
        }
 else {
          image=ImageLib.getImage(ImageLib.TD_COLUMN);
        }
      }
 else       if (node instanceof DFColumnRepNode) {
        image=ImageLib.getImage(ImageLib.TD_COLUMN);
      }
 else       if (node instanceof MDMSchemaRepNode) {
        image=ImageLib.getImage(ImageLib.XML_DOC);
      }
 else       if (node instanceof MDMXmlElementRepNode) {
        image=ImageLib.getImage(ImageLib.XML_ELEMENT_DOC);
      }
 else       if (node instanceof DBColumnFolderRepNode || node instanceof DFColumnFolderRepNode) {
        image=ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
      }
    }
  }
  return image;
}

Fixed version (ground truth):
public Image getImage(Object element){
  Image image=super.getImage(element);
  if (element instanceof IRepositoryNode) {
    IRepositoryNode node=(IRepositoryNode)element;
    IRepositoryViewObject viewObject=node.getObject();
    ENodeType type=node.getType();
    if (node instanceof ReportAnalysisRepNode) {
      image=ImageLib.getImage(ImageLib.ANALYSIS_OBJECT);
    }
    if (element instanceof RecycleBinRepNode) {
      image=ImageLib.getImage(ImageLib.RECYCLEBIN_EMPTY);
    }
 else     if (type.equals(ENodeType.SYSTEM_FOLDER)) {
      if (viewObject.getLabel().equals(EResourceConstant.DATA_PROFILING.getName())) {
        image=ImageLib.getImage(ImageLib.DATA_PROFILING);
      }
 else       if (viewObject.getLabel().equals(EResourceConstant.METADATA.getName())) {
        image=ImageLib.getImage(ImageLib.METADATA);
      }
 else       if (node instanceof DBConnectionFolderRepNode) {
        image=ImageLib.getImage(ImageLib.CONNECTION);
      }
 else       if (node instanceof MDMConnectionFolderRepNode) {
        image=ImageLib.getImage(ImageLib.MDM_CONNECTION);
      }
 else       if (viewObject.getLabel().equals(EResourceConstant.FILEDELIMITED.getName())) {
        image=ImageLib.getImage(ImageLib.FILE_DELIMITED);
      }
 else       if (viewObject.getLabel().equals(EResourceConstant.LIBRARIES.getName())) {
        image=ImageLib.getImage(ImageLib.LIBRARIES);
      }
 else       if (viewObject.getLabel().equals(EResourceConstant.EXCHANGE.getName())) {
        image=ImageLib.getImage(ImageLib.EXCHANGE);
      }
 else {
        image=ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
      }
    }
 else     if (type.equals(ENodeType.SIMPLE_FOLDER)) {
      image=ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
    }
 else     if (type.equals(ENodeType.REPOSITORY_ELEMENT)) {
      if (node instanceof DBConnectionRepNode) {
        if (!isSupportedConnection(node)) {
          image=ImageLib.createErrorIcon(ImageLib.TD_DATAPROVIDER).createImage();
        }
        image=ImageLib.getImage(ImageLib.TD_DATAPROVIDER);
      }
 else       if (node instanceof MDMConnectionRepNode) {
        image=ImageLib.getImage(ImageLib.MDM_CONNECTION);
      }
 else       if (node instanceof DFConnectionRepNode) {
        image=ImageLib.getImage(ImageLib.FILE_DELIMITED);
      }
 else       if (node instanceof AnalysisRepNode) {
        image=ImageLib.getImage(ImageLib.ANALYSIS_OBJECT);
      }
 else       if (node instanceof ReportRepNode) {
        image=ImageLib.getImage(ImageLib.REPORT_OBJECT);
      }
 else       if (node instanceof SysIndicatorDefinitionRepNode) {
        image=ImageLib.getImage(ImageLib.IND_DEFINITION);
      }
 else       if (node instanceof PatternRepNode) {
        image=ImageLib.getImage(ImageLib.PATTERN_REG);
      }
 else       if (node instanceof RuleRepNode) {
        image=ImageLib.getImage(ImageLib.DQ_RULE);
      }
 else       if (node instanceof SourceFileRepNode) {
        image=ImageLib.getImage(ImageLib.SOURCE_FILE);
      }
 else       if (node instanceof ExchangeCategoryRepNode || node instanceof ExchangeComponentRepNode) {
        image=ImageLib.getImage(ImageLib.EXCHANGE);
      }
 else       if (node instanceof RepositoryNode) {
        Image imageNode=getImageByContentType((RepositoryNode)node);
        if (image != null) {
          image=imageNode;
        }
      }
      if (viewObject != null) {
        if (ERepositoryStatus.LOCK_BY_USER == ProxyRepositoryFactory.getInstance().getStatus(viewObject)) {
          image=ImageLib.createLockedIcon(ImageDescriptor.createFromImage(image)).createImage();
        }
      }
    }
 else     if (type.equals(ENodeType.TDQ_REPOSITORY_ELEMENT)) {
      if (node instanceof DBCatalogRepNode) {
        image=ImageLib.getImage(ImageLib.CATALOG);
      }
 else       if (node instanceof DBSchemaRepNode) {
        image=ImageLib.getImage(ImageLib.SCHEMA);
      }
 else       if (node instanceof DBTableFolderRepNode) {
        image=ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
      }
 else       if (node instanceof DBViewFolderRepNode) {
        image=ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
      }
 else       if (node instanceof DBTableRepNode || node instanceof DFTableRepNode) {
        image=ImageLib.getImage(ImageLib.TABLE);
      }
 else       if (node instanceof DBViewRepNode) {
        image=ImageLib.getImage(ImageLib.VIEW);
      }
 else       if (node instanceof DBColumnRepNode) {
        if (((DBColumnRepNode)node).isKey()) {
          image=ImageLib.getImage(ImageLib.PK_COLUMN);
        }
 else {
          image=ImageLib.getImage(ImageLib.TD_COLUMN);
        }
      }
 else       if (node instanceof DFColumnRepNode) {
        image=ImageLib.getImage(ImageLib.TD_COLUMN);
      }
 else       if (node instanceof MDMSchemaRepNode) {
        image=ImageLib.getImage(ImageLib.XML_DOC);
      }
 else       if (node instanceof MDMXmlElementRepNode) {
        image=ImageLib.getImage(ImageLib.XML_ELEMENT_DOC);
      }
 else       if (node instanceof DBColumnFolderRepNode || node instanceof DFColumnFolderRepNode) {
        image=ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
      }
    }
  }
  return image;
}