Program: 137468
Project: 137468
Buggy source:
/** 
 * DOC klliu Comment method "doSwichNode".
 * @param analyzedElement
 * @return
 */
private IRepositoryNode doSwichNode(ModelElement analyzedElement,AnalysisSubFolderRepNode childNodeFolder){
  Property anaEleProperty=PropertyHelper.getProperty(analyzedElement);
  IRepositoryViewObject medataViewObject=null;
  try {
    medataViewObject=ProxyRepositoryFactory.getInstance().getLastVersion(anaEleProperty.getId());
  }
 catch (  Exception e) {
    log.error(e);
  }
  if (medataViewObject != null) {
    if (analyzedElement instanceof DatabaseConnection) {
      DBConnectionRepNode connNode=new DBConnectionRepNode(medataViewObject,this,ENodeType.REPOSITORY_ELEMENT);
      connNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_CONNECTIONS);
      connNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_CONNECTIONS);
      medataViewObject.setRepositoryNode(connNode);
      return connNode;
    }
 else     if (analyzedElement instanceof Catalog) {
      RepositoryNode catalogNode=new DBCatalogRepNode(new MetadataCatalogRepositoryObject(medataViewObject,(Catalog)analyzedElement),this,ENodeType.TDQ_REPOSITORY_ELEMENT);
      catalogNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_CON_CATALOG);
      catalogNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_CON_CATALOG);
      medataViewObject.setRepositoryNode(catalogNode);
      return catalogNode;
    }
 else     if (analyzedElement instanceof Schema) {
      RepositoryNode schemaNode=new DBSchemaRepNode(new MetadataSchemaRepositoryObject(medataViewObject,(Schema)analyzedElement),this,ENodeType.TDQ_REPOSITORY_ELEMENT);
      schemaNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_CON_SCHEMA);
      schemaNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_CON_SCHEMA);
      medataViewObject.setRepositoryNode(schemaNode);
      return schemaNode;
    }
 else     if (analyzedElement instanceof TdTable) {
      DBTableRepNode tableNode=new DBTableRepNode(new TdTableRepositoryObject(medataViewObject,(TdTable)analyzedElement),childNodeFolder,ENodeType.TDQ_REPOSITORY_ELEMENT);
      tableNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_CON_TABLE);
      tableNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_CON_TABLE);
      medataViewObject.setRepositoryNode(tableNode);
      return tableNode;
    }
 else     if (analyzedElement instanceof MetadataColumn) {
      RepositoryNode columnNode=null;
      if (analyzedElement instanceof TdColumn) {
        columnNode=new DBColumnRepNode(new MetadataColumnRepositoryObject(medataViewObject,(MetadataColumn)analyzedElement),childNodeFolder,ENodeType.TDQ_REPOSITORY_ELEMENT);
      }
 else {
        columnNode=new DFColumnRepNode(new MetadataColumnRepositoryObject(medataViewObject,(MetadataColumn)analyzedElement),this,ENodeType.TDQ_REPOSITORY_ELEMENT);
      }
      columnNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_CON_COLUMN);
      columnNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_CON_COLUMN);
      medataViewObject.setRepositoryNode(columnNode);
      return columnNode;
    }
 else     if (analyzedElement instanceof TdXmlElementType) {
      MDMXmlElementRepNode mdmXmlElementNode=new MDMXmlElementRepNode(new MetadataXmlElementTypeRepositoryObject(medataViewObject,(TdXmlElementType)analyzedElement),this,ENodeType.REPOSITORY_ELEMENT);
      mdmXmlElementNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.MDM_ELEMENT_TYPE);
      mdmXmlElementNode.setProperties(EProperties.LABEL,ERepositoryObjectType.MDM_ELEMENT_TYPE);
      medataViewObject.setRepositoryNode(mdmXmlElementNode);
      return mdmXmlElementNode;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * DOC klliu Comment method "doSwichNode".
 * @param analyzedElement
 * @return
 */
private IRepositoryNode doSwichNode(ModelElement analyzedElement,AnalysisSubFolderRepNode childNodeFolder){
  Property anaEleProperty=PropertyHelper.getProperty(analyzedElement);
  IRepositoryViewObject medataViewObject=null;
  try {
    medataViewObject=ProxyRepositoryFactory.getInstance().getLastVersion(anaEleProperty.getId());
  }
 catch (  Exception e) {
    log.error(e);
  }
  if (medataViewObject != null) {
    if (analyzedElement instanceof DatabaseConnection) {
      DBConnectionRepNode connNode=new DBConnectionRepNode(medataViewObject,this,ENodeType.REPOSITORY_ELEMENT);
      connNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_CONNECTIONS);
      connNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_CONNECTIONS);
      medataViewObject.setRepositoryNode(connNode);
      return connNode;
    }
 else     if (analyzedElement instanceof Catalog) {
      RepositoryNode catalogNode=DQRepNodeCreateFactory.createDBCatalogRepNode(new MetadataCatalogRepositoryObject(medataViewObject,(Catalog)analyzedElement),this,ENodeType.TDQ_REPOSITORY_ELEMENT);
      catalogNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_CON_CATALOG);
      catalogNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_CON_CATALOG);
      medataViewObject.setRepositoryNode(catalogNode);
      return catalogNode;
    }
 else     if (analyzedElement instanceof Schema) {
      RepositoryNode schemaNode=new DBSchemaRepNode(new MetadataSchemaRepositoryObject(medataViewObject,(Schema)analyzedElement),this,ENodeType.TDQ_REPOSITORY_ELEMENT);
      schemaNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_CON_SCHEMA);
      schemaNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_CON_SCHEMA);
      medataViewObject.setRepositoryNode(schemaNode);
      return schemaNode;
    }
 else     if (analyzedElement instanceof TdTable) {
      DBTableRepNode tableNode=new DBTableRepNode(new TdTableRepositoryObject(medataViewObject,(TdTable)analyzedElement),childNodeFolder,ENodeType.TDQ_REPOSITORY_ELEMENT);
      tableNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_CON_TABLE);
      tableNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_CON_TABLE);
      medataViewObject.setRepositoryNode(tableNode);
      return tableNode;
    }
 else     if (analyzedElement instanceof MetadataColumn) {
      RepositoryNode columnNode=null;
      if (analyzedElement instanceof TdColumn) {
        columnNode=new DBColumnRepNode(new MetadataColumnRepositoryObject(medataViewObject,(MetadataColumn)analyzedElement),childNodeFolder,ENodeType.TDQ_REPOSITORY_ELEMENT);
      }
 else {
        columnNode=new DFColumnRepNode(new MetadataColumnRepositoryObject(medataViewObject,(MetadataColumn)analyzedElement),this,ENodeType.TDQ_REPOSITORY_ELEMENT);
      }
      columnNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_CON_COLUMN);
      columnNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_CON_COLUMN);
      medataViewObject.setRepositoryNode(columnNode);
      return columnNode;
    }
 else     if (analyzedElement instanceof TdXmlElementType) {
      MDMXmlElementRepNode mdmXmlElementNode=new MDMXmlElementRepNode(new MetadataXmlElementTypeRepositoryObject(medataViewObject,(TdXmlElementType)analyzedElement),this,ENodeType.REPOSITORY_ELEMENT);
      mdmXmlElementNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.MDM_ELEMENT_TYPE);
      mdmXmlElementNode.setProperties(EProperties.LABEL,ERepositoryObjectType.MDM_ELEMENT_TYPE);
      medataViewObject.setRepositoryNode(mdmXmlElementNode);
      return mdmXmlElementNode;
    }
  }
  return null;
}