Program: 139322
Project: 139322
Buggy source:
/** 
 * DOC rli Comment method "reloadElementOfPackage".
 * @param toReloadObj
 * @return
 * @throws ReloadCompareException
 */
private List<ColumnSet> reloadElementOfPackage(Package toReloadObj) throws ReloadCompareException {
  List<ColumnSet> columnSetList=new ArrayList<ColumnSet>();
  try {
    TdCatalog catalogObj=SwitchHelpers.CATALOG_SWITCH.doSwitch(toReloadObj);
    TdSchema schemaObj=SwitchHelpers.SCHEMA_SWITCH.doSwitch(toReloadObj);
    if (catalogObj != null) {
      if (isCompareTabel) {
        List<TdTable> tables=DqRepositoryViewService.getTables(tempReloadProvider,catalogObj,null,true);
        CatalogHelper.addTables(tables,catalogObj);
        columnSetList.addAll(tables);
      }
      if (isCompareView) {
        List<TdView> views=DqRepositoryViewService.getViews(tempReloadProvider,catalogObj,null,true);
        CatalogHelper.addViews(views,catalogObj);
        columnSetList.addAll(views);
      }
    }
 else     if (schemaObj != null) {
      if (isCompareTabel) {
        List<TdTable> tables=DqRepositoryViewService.getTables(tempReloadProvider,schemaObj,null,true);
        SchemaHelper.addTables(tables,schemaObj);
        columnSetList.addAll(tables);
      }
      if (isCompareView) {
        List<TdView> views=DqRepositoryViewService.getViews(tempReloadProvider,schemaObj,null,true);
        SchemaHelper.addViews(views,schemaObj);
        columnSetList.addAll(views);
      }
    }
 else {
      if (isCompareTabel) {
        List<TdTable> tables=DqRepositoryViewService.getTables(tempReloadProvider,(Schema)toReloadObj,null,true);
        SchemaHelper.addTables(tables,(Schema)toReloadObj);
        columnSetList.addAll(tables);
      }
      if (isCompareView) {
        List<TdView> views=DqRepositoryViewService.getViews(tempReloadProvider,(Schema)toReloadObj,null,true);
        SchemaHelper.addViews(views,(Schema)toReloadObj);
        columnSetList.addAll(views);
      }
    }
  }
 catch (  TalendException e1) {
    throw new ReloadCompareException(e1);
  }
  return columnSetList;
}

Fixed version (ground truth):
/** 
 * DOC rli Comment method "reloadElementOfPackage".
 * @param toReloadObj
 * @return
 * @throws ReloadCompareException
 */
private List<ColumnSet> reloadElementOfPackage(Package toReloadObj) throws ReloadCompareException {
  List<ColumnSet> columnSetList=new ArrayList<ColumnSet>();
  try {
    TdCatalog catalogObj=SwitchHelpers.CATALOG_SWITCH.doSwitch(toReloadObj);
    TdSchema schemaObj=SwitchHelpers.SCHEMA_SWITCH.doSwitch(toReloadObj);
    if (catalogObj != null) {
      List<TdTable> tables=DqRepositoryViewService.getTables(tempReloadProvider,catalogObj,null,true);
      CatalogHelper.addTables(tables,catalogObj);
      columnSetList.addAll(tables);
      List<TdView> views=DqRepositoryViewService.getViews(tempReloadProvider,catalogObj,null,true);
      CatalogHelper.addViews(views,catalogObj);
      columnSetList.addAll(views);
    }
 else     if (schemaObj != null) {
      List<TdTable> tables=DqRepositoryViewService.getTables(tempReloadProvider,schemaObj,null,true);
      SchemaHelper.addTables(tables,schemaObj);
      columnSetList.addAll(tables);
      List<TdView> views=DqRepositoryViewService.getViews(tempReloadProvider,schemaObj,null,true);
      SchemaHelper.addViews(views,schemaObj);
      columnSetList.addAll(views);
    }
 else {
      List<TdTable> tables=DqRepositoryViewService.getTables(tempReloadProvider,(Schema)toReloadObj,null,true);
      SchemaHelper.addTables(tables,(Schema)toReloadObj);
      columnSetList.addAll(tables);
      List<TdView> views=DqRepositoryViewService.getViews(tempReloadProvider,(Schema)toReloadObj,null,true);
      SchemaHelper.addViews(views,(Schema)toReloadObj);
      columnSetList.addAll(views);
    }
  }
 catch (  TalendException e1) {
    throw new ReloadCompareException(e1);
  }
  return columnSetList;
}