Program: 112455
Project: 112455
Buggy source:
/** 
 * Get array of ColumnInfos that contain Column Name and its associated PDataType
 * @param columns
 * @return
 * @throws SQLException
 */
private ColumnInfo[] generateColumnInfo(List<String> columns) throws SQLException {
  Map<String,Integer> columnNameToTypeMap=Maps.newLinkedHashMap();
  DatabaseMetaData dbmd=conn.getMetaData();
  String escapedTableName=StringUtil.escapeLike(tableName);
  String[] schemaAndTable=escapedTableName.split("String_Node_Str");
  ResultSet rs=null;
  try {
    rs=dbmd.getColumns(null,(schemaAndTable.length == 1 ? "String_Node_Str" : schemaAndTable[0]),(schemaAndTable.length == 1 ? escapedTableName : schemaAndTable[1]),null);
    while (rs.next()) {
      columnNameToTypeMap.put(rs.getString(QueryUtil.COLUMN_NAME_POSITION),rs.getInt(QueryUtil.DATA_TYPE_POSITION));
    }
  }
  finally {
    if (rs != null) {
      rs.close();
    }
  }
  ColumnInfo[] columnType;
  if (columns == null) {
    int i=0;
    columnType=new ColumnInfo[columnNameToTypeMap.size()];
    for (    Map.Entry<String,Integer> entry : columnNameToTypeMap.entrySet()) {
      columnType[i++]=new ColumnInfo(entry.getKey(),entry.getValue());
    }
  }
 else {
    columnType=new ColumnInfo[columns.size()];
    for (int i=0; i < columns.size(); i++) {
      String columnName=SchemaUtil.normalizeIdentifier(columns.get(i).trim());
      Integer sqlType=columnNameToTypeMap.get(columnName);
      if (sqlType == null) {
        if (isStrict) {
          throw new SQLExceptionInfo.Builder(SQLExceptionCode.COLUMN_NOT_FOUND).setColumnName(columnName).setTableName(tableName).build().buildException();
        }
        unfoundColumnCount++;
      }
 else {
        columnType[i]=new ColumnInfo(columnName,sqlType);
      }
    }
    if (unfoundColumnCount == columns.size()) {
      throw new SQLExceptionInfo.Builder(SQLExceptionCode.COLUMN_NOT_FOUND).setColumnName(Arrays.toString(columns.toArray(new String[0]))).setTableName(tableName).build().buildException();
    }
  }
  return columnType;
}

Fixed version (ground truth):
/** 
 * Get array of ColumnInfos that contain Column Name and its associated PDataType
 * @param columns
 * @return
 * @throws SQLException
 */
private ColumnInfo[] generateColumnInfo(List<String> columns) throws SQLException {
  Map<String,Integer> columnNameToTypeMap=Maps.newLinkedHashMap();
  DatabaseMetaData dbmd=conn.getMetaData();
  String escapedTableName=StringUtil.escapeLike(tableName);
  String[] schemaAndTable=escapedTableName.split("String_Node_Str");
  ResultSet rs=null;
  try {
    rs=dbmd.getColumns(null,(schemaAndTable.length == 1 ? "String_Node_Str" : schemaAndTable[0]),(schemaAndTable.length == 1 ? escapedTableName : schemaAndTable[1]),null);
    while (rs.next()) {
      columnNameToTypeMap.put(rs.getString(QueryUtil.COLUMN_NAME_POSITION),rs.getInt(QueryUtil.DATA_TYPE_POSITION));
    }
  }
  finally {
    if (rs != null) {
      rs.close();
    }
  }
  ColumnInfo[] columnType;
  if (columns == null) {
    int i=0;
    columnType=new ColumnInfo[columnNameToTypeMap.size()];
    for (    Map.Entry<String,Integer> entry : columnNameToTypeMap.entrySet()) {
      columnType[i++]=new ColumnInfo('"' + entry.getKey() + '"',entry.getValue());
    }
  }
 else {
    columnType=new ColumnInfo[columns.size()];
    for (int i=0; i < columns.size(); i++) {
      String columnName=SchemaUtil.normalizeIdentifier(columns.get(i).trim());
      Integer sqlType=columnNameToTypeMap.get(columnName);
      if (sqlType == null) {
        if (isStrict) {
          throw new SQLExceptionInfo.Builder(SQLExceptionCode.COLUMN_NOT_FOUND).setColumnName(columnName).setTableName(tableName).build().buildException();
        }
        unfoundColumnCount++;
      }
 else {
        columnType[i]=new ColumnInfo('"' + columnName + '"',sqlType);
      }
    }
    if (unfoundColumnCount == columns.size()) {
      throw new SQLExceptionInfo.Builder(SQLExceptionCode.COLUMN_NOT_FOUND).setColumnName(Arrays.toString(columns.toArray(new String[0]))).setTableName(tableName).build().buildException();
    }
  }
  return columnType;
}