Program: 129471
Project: 129471
Buggy source:
/** 
 * DOC qzhang Comment method "getResultSetFromTableInfo".
 * @param dbMetaData
 * @return
 * @throws SQLException
 */
private static ResultSet getResultSetFromTableInfo(TableInfoParameters tableInfo,String namePattern,IMetadataConnection iMetadataConnection,String schema) throws SQLException {
  ResultSet rsTables=null;
  String tableNamePattern="String_Node_Str".equals(namePattern) ? null : namePattern;
  String[] types=new String[tableInfo.getTypes().size()];
  for (int i=0; i < types.length; i++) {
    final String selectedTypeName=tableInfo.getTypes().get(i).getName();
    if ("String_Node_Str".equals(selectedTypeName) && iMetadataConnection.getDbType().equals(EDatabaseTypeName.IBMDB2.getDisplayName())) {
      types[i]="String_Node_Str";
    }
 else     types[i]=selectedTypeName;
  }
  DatabaseMetaData dbMetaData=ExtractMetaDataUtils.getDatabaseMetaData(ExtractMetaDataUtils.conn,iMetadataConnection.getDbType(),iMetadataConnection.isSqlMode(),iMetadataConnection.getDatabase());
  ResultSet rsTableTypes=null;
  rsTableTypes=dbMetaData.getTableTypes();
  Set<String> availableTableTypes=new HashSet<String>();
  String[] neededTableTypes={ETableTypes.TABLETYPE_TABLE.getName(),ETableTypes.TABLETYPE_VIEW.getName(),ETableTypes.TABLETYPE_SYNONYM.getName()};
  while (rsTableTypes.next()) {
    String currentTableType=StringUtils.trimToEmpty(rsTableTypes.getString("String_Node_Str"));
    if (ArrayUtils.contains(neededTableTypes,currentTableType)) {
      availableTableTypes.add(currentTableType);
    }
  }
  rsTableTypes.close();
  rsTables=dbMetaData.getTables(null,schema,tableNamePattern,types);
  return rsTables;
}

Fixed version (ground truth):
/** 
 * DOC qzhang Comment method "getResultSetFromTableInfo".
 * @param dbMetaData
 * @return
 * @throws SQLException
 */
private static ResultSet getResultSetFromTableInfo(TableInfoParameters tableInfo,String namePattern,IMetadataConnection iMetadataConnection,String schema) throws SQLException {
  ResultSet rsTables=null;
  String tableNamePattern="String_Node_Str".equals(namePattern) ? null : namePattern;
  String[] types=new String[tableInfo.getTypes().size()];
  for (int i=0; i < types.length; i++) {
    final String selectedTypeName=tableInfo.getTypes().get(i).getName();
    if ("String_Node_Str".equals(selectedTypeName) && iMetadataConnection.getDbType().equals(EDatabaseTypeName.IBMDB2.getDisplayName())) {
      types[i]="String_Node_Str";
    }
 else {
      types[i]=selectedTypeName;
    }
  }
  DatabaseMetaData dbMetaData=ExtractMetaDataUtils.getDatabaseMetaData(ExtractMetaDataUtils.conn,iMetadataConnection.getDbType(),iMetadataConnection.isSqlMode(),iMetadataConnection.getDatabase());
  ResultSet rsTableTypes=null;
  rsTableTypes=dbMetaData.getTableTypes();
  Set<String> availableTableTypes=new HashSet<String>();
  String[] neededTableTypes={ETableTypes.TABLETYPE_TABLE.getName(),ETableTypes.TABLETYPE_VIEW.getName(),ETableTypes.TABLETYPE_SYNONYM.getName()};
  while (rsTableTypes.next()) {
    String currentTableType=StringUtils.trimToEmpty(rsTableTypes.getString("String_Node_Str"));
    if (ArrayUtils.contains(neededTableTypes,currentTableType)) {
      availableTableTypes.add(currentTableType);
    }
  }
  rsTableTypes.close();
  rsTables=dbMetaData.getTables(null,schema,tableNamePattern,types);
  return rsTables;
}