Program: 138486
Project: 138486
Buggy source:
/** 
 * DOC scorreia Comment method "getTableName".
 * @param analyzedColumns
 * @return the quoted table name
 */
private String getTableName(final EList<ModelElement> analyzedColumns){
  EObject owner=analyzedColumns.get(0).eContainer();
  ColumnSet set=SwitchHelpers.COLUMN_SET_SWITCH.doSwitch(owner);
  MetadataTable mdColumn=SwitchHelpers.METADATA_TABLE_SWITCH.doSwitch(owner);
  String tableName="String_Node_Str";
  ModelElement columnSetOwner=null;
  if (null == set && mdColumn != null) {
    tableName=mdColumn.getName();
    columnSetOwner=mdColumn;
  }
 else   if (null != set) {
    tableName=set.getName();
    columnSetOwner=set;
  }
  Package pack=ColumnSetHelper.getParentCatalogOrSchema(columnSetOwner);
  if (pack instanceof Schema && ColumnSetHelper.getParentCatalogOrSchema(pack) instanceof Catalog) {
    pack=ColumnSetHelper.getParentCatalogOrSchema(pack);
  }
  if (pack == null) {
    log.error("String_Node_Str" + tableName);
  }
 else {
    this.catalogOrSchema=pack.getName();
  }
  String schemaName=getQuotedSchemaName(columnSetOwner);
  String catalogName=getQuotedCatalogName(columnSetOwner);
  if (catalogName == null && schemaName != null) {
    final Schema parentSchema=SchemaHelper.getParentSchema(columnSetOwner);
    final Catalog parentCatalog=CatalogHelper.getParentCatalog(parentSchema);
    catalogName=parentCatalog != null ? parentCatalog.getName() : null;
  }
  if (ConnectionUtils.isSybaseeDBProducts(dbms().getDbmsName())) {
    schemaName=ColumnSetHelper.getTableOwner(columnSetOwner);
  }
  return dbms().toQualifiedName(catalogName,schemaName,tableName);
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "getTableName".
 * @param analyzedColumns
 * @return the quoted table name
 */
private String getTableName(final EList<MetadataColumn> analyzedColumns){
  EObject owner=analyzedColumns.get(0).eContainer();
  ColumnSet set=SwitchHelpers.COLUMN_SET_SWITCH.doSwitch(owner);
  MetadataTable mdColumn=SwitchHelpers.METADATA_TABLE_SWITCH.doSwitch(owner);
  String tableName="String_Node_Str";
  ModelElement columnSetOwner=null;
  if (null == set && mdColumn != null) {
    tableName=mdColumn.getName();
    columnSetOwner=mdColumn;
  }
 else   if (null != set) {
    tableName=set.getName();
    columnSetOwner=set;
  }
  Package pack=ColumnSetHelper.getParentCatalogOrSchema(columnSetOwner);
  if (pack instanceof Schema && ColumnSetHelper.getParentCatalogOrSchema(pack) instanceof Catalog) {
    pack=ColumnSetHelper.getParentCatalogOrSchema(pack);
  }
  if (pack == null) {
    log.error("String_Node_Str" + tableName);
  }
 else {
    this.catalogOrSchema=pack.getName();
  }
  String schemaName=getQuotedSchemaName(columnSetOwner);
  String catalogName=getQuotedCatalogName(columnSetOwner);
  if (catalogName == null && schemaName != null) {
    final Schema parentSchema=SchemaHelper.getParentSchema(columnSetOwner);
    final Catalog parentCatalog=CatalogHelper.getParentCatalog(parentSchema);
    catalogName=parentCatalog != null ? parentCatalog.getName() : null;
  }
  if (ConnectionUtils.isSybaseeDBProducts(dbms().getDbmsName())) {
    schemaName=ColumnSetHelper.getTableOwner(columnSetOwner);
  }
  return dbms().toQualifiedName(catalogName,schemaName,tableName);
}