Program: 129060
Project: 129060
Buggy source:
@Override protected void fillSynonyms(IMetadataConnection metadataConnection,List<TdColumn> metadataColumns,NamedColumnSet table,String tableName,DatabaseMetaData dbMetaData) throws SQLException {
  if (metadataConnection == null || dbMetaData == null) {
    return;
  }
  if (dbMetaData.getDatabaseProductName().equals(OracleExtractManager.DATABASE_PRODUCT_NAME)) {
    String synSQL="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + tableName + "String_Node_Str";
    if (!("String_Node_Str").equals(metadataConnection.getSchema())) {
      synSQL+="String_Node_Str" + metadataConnection.getSchema() + "String_Node_Str";
    }
 else     if (table.eContainer() instanceof Schema) {
      Schema schema=(Schema)table.eContainer();
      synSQL+="String_Node_Str" + schema.getName() + "String_Node_Str";
    }
    Statement sta=ExtractMetaDataUtils.conn.createStatement();
    ExtractMetaDataUtils.setQueryStatementTimeout(sta);
    ResultSet columns=sta.executeQuery(synSQL);
    String typeName=null;
    int index=0;
    try {
      while (columns.next()) {
        long numPrecRadix=0;
        String columnName=columns.getString(GetColumn.COLUMN_NAME.name());
        TdColumn column=ColumnHelper.createTdColumn(columnName);
        String label=column.getLabel();
        label=ManagementTextUtils.filterSpecialChar(label);
        String sub="String_Node_Str";
        String sub2="String_Node_Str";
        String label2=label;
        if (label != null && label.length() > 0 && label.startsWith("String_Node_Str")) {
          sub=label.substring(1);
          if (sub != null && sub.length() > 0) {
            sub2=sub.substring(1);
          }
        }
        if (coreService != null && (coreService.isKeyword(label) || coreService.isKeyword(sub) || coreService.isKeyword(sub2))) {
          label="String_Node_Str" + label;
        }
        label=MetadataToolHelper.validateColumnName(label,index);
        column.setLabel(label);
        column.setOriginalField(label2);
        typeName=columns.getString(GetColumn.DATA_TYPE.name());
        try {
          int column_size=columns.getInt("String_Node_Str");
          column.setLength(column_size);
          numPrecRadix=columns.getLong("String_Node_Str");
          column.setPrecision(numPrecRadix);
        }
 catch (        Exception e1) {
          log.warn(e1,e1);
        }
        DatabaseConnection dbConnection=(DatabaseConnection)ConnectionHelper.getConnection(table);
        String dbmsId=dbConnection == null ? null : dbConnection.getDbmsId();
        if (dbmsId != null) {
          MappingTypeRetriever mappingTypeRetriever=MetadataTalendType.getMappingTypeRetriever(dbmsId);
          String talendType=mappingTypeRetriever.getDefaultSelectedTalendType(typeName,ExtractMetaDataUtils.getIntMetaDataInfo(columns,"String_Node_Str"),ExtractMetaDataUtils.getIntMetaDataInfo(columns,"String_Node_Str"));
          column.setTalendType(talendType);
          String defaultSelectedDbType=MetadataTalendType.getMappingTypeRetriever(dbConnection.getDbmsId()).getDefaultSelectedDbType(talendType);
          column.setSourceType(defaultSelectedDbType);
        }
        try {
          column.setNullable("String_Node_Str".equals(columns.getString(GetColumn.NULLABLE.name())));
        }
 catch (        Exception e) {
          log.error(e);
        }
        metadataColumns.add(column);
        index++;
      }
    }
  finally {
      columns.close();
    }
  }
}

Fixed version (ground truth):
@Override protected void fillSynonyms(IMetadataConnection metadataConnection,List<TdColumn> metadataColumns,NamedColumnSet table,String tableName,DatabaseMetaData dbMetaData) throws SQLException {
  if (metadataConnection == null || dbMetaData == null) {
    return;
  }
  if (dbMetaData.getDatabaseProductName().equals(OracleExtractManager.DATABASE_PRODUCT_NAME)) {
    String synSQL="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + tableName + "String_Node_Str";
    if (!("String_Node_Str").equals(metadataConnection.getSchema())) {
      synSQL+="String_Node_Str" + metadataConnection.getSchema() + "String_Node_Str";
    }
 else     if (table.eContainer() instanceof Schema) {
      Schema schema=(Schema)table.eContainer();
      synSQL+="String_Node_Str" + schema.getName() + "String_Node_Str";
    }
    Statement sta=ExtractMetaDataUtils.conn.createStatement();
    ExtractMetaDataUtils.setQueryStatementTimeout(sta);
    ResultSet columns=sta.executeQuery(synSQL);
    String typeName=null;
    int index=0;
    List<String> columnLabels=new ArrayList<String>();
    try {
      while (columns.next()) {
        long numPrecRadix=0;
        String columnName=columns.getString(GetColumn.COLUMN_NAME.name());
        TdColumn column=ColumnHelper.createTdColumn(columnName);
        String label=column.getLabel();
        label=ManagementTextUtils.filterSpecialChar(label);
        String sub="String_Node_Str";
        String sub2="String_Node_Str";
        String label2=label;
        if (label != null && label.length() > 0 && label.startsWith("String_Node_Str")) {
          sub=label.substring(1);
          if (sub != null && sub.length() > 0) {
            sub2=sub.substring(1);
          }
        }
        if (coreService != null && (coreService.isKeyword(label) || coreService.isKeyword(sub) || coreService.isKeyword(sub2))) {
          label="String_Node_Str" + label;
        }
        label=MetadataToolHelper.validateColumnName(label,index,columnLabels);
        column.setLabel(label);
        column.setOriginalField(label2);
        typeName=columns.getString(GetColumn.DATA_TYPE.name());
        try {
          int column_size=columns.getInt("String_Node_Str");
          column.setLength(column_size);
          numPrecRadix=columns.getLong("String_Node_Str");
          column.setPrecision(numPrecRadix);
        }
 catch (        Exception e1) {
          log.warn(e1,e1);
        }
        DatabaseConnection dbConnection=(DatabaseConnection)ConnectionHelper.getConnection(table);
        String dbmsId=dbConnection == null ? null : dbConnection.getDbmsId();
        if (dbmsId != null) {
          MappingTypeRetriever mappingTypeRetriever=MetadataTalendType.getMappingTypeRetriever(dbmsId);
          String talendType=mappingTypeRetriever.getDefaultSelectedTalendType(typeName,ExtractMetaDataUtils.getIntMetaDataInfo(columns,"String_Node_Str"),ExtractMetaDataUtils.getIntMetaDataInfo(columns,"String_Node_Str"));
          column.setTalendType(talendType);
          String defaultSelectedDbType=MetadataTalendType.getMappingTypeRetriever(dbConnection.getDbmsId()).getDefaultSelectedDbType(talendType);
          column.setSourceType(defaultSelectedDbType);
        }
        try {
          column.setNullable("String_Node_Str".equals(columns.getString(GetColumn.NULLABLE.name())));
        }
 catch (        Exception e) {
          log.error(e);
        }
        metadataColumns.add(column);
        columnLabels.add(column.getLabel());
        index++;
      }
    }
  finally {
      columns.close();
    }
  }
}