Program: 98454
Project: 98454
Buggy source:
/** 
 * Constructs a new product from data in a ResultSet. Reflection is used to get  the appropriate field corresponding to each table column.
 * @param rs
 * @param tableName
 * @return the newly created product.
 */
private Product createProductFromResultSet(ResultSet rs,String tableName){
  Product product=null;
  try {
    ResultSetMetaData metaData=rs.getMetaData();
    int columnCount=metaData.getColumnCount();
    String className=tableName.replace('_','.');
    Class<?> c=JarLoader.getClass(className);
    product=(Product)c.newInstance();
    for (int i=1; i <= columnCount; i++) {
      String columnName=metaData.getColumnName(i);
      Field f=c.getField(columnName);
      Class<?> fieldType=f.getType();
      String fieldTypeName=fieldType.getSimpleName();
      if (fieldTypeName.equals("String_Node_Str")) {
        System.out.println(rs.getString(i));
        String dateString=rs.getString(i);
        if (dateString != null) {
          Date date=parseDate(dateString);
          f.set(product,date);
        }
      }
 else       if (fieldTypeName.equals("String_Node_Str")) {
        f.set(product,new Color(rs.getInt(i)));
      }
 else       if (fieldTypeName.equalsIgnoreCase("String_Node_Str")) {
        f.set(product,rs.getDouble(i));
      }
 else       if (fieldTypeName.equalsIgnoreCase("String_Node_Str")) {
        f.set(product,rs.getInt(i));
      }
 else       if (fieldTypeName.equals("String_Node_Str")) {
        f.set(product,rs.getString(i));
      }
 else       if (fieldTypeName.equals("String_Node_Str")) {
        f.set(product,rs.getLong(i));
      }
    }
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str");
    e.printStackTrace();
    return null;
  }
  return product;
}

Fixed version (ground truth):
private Product createProductFromResultSet(ResultSet rs,String tableName){
  Product product=null;
  try {
    ResultSetMetaData metaData=rs.getMetaData();
    int columnCount=metaData.getColumnCount();
    String className=tableName.replace('_','.');
    Class<?> c=JarLoader.getClass(className);
    product=(Product)c.newInstance();
    for (int i=1; i <= columnCount; i++) {
      String columnName=metaData.getColumnName(i);
      Field f=c.getField(columnName);
      Class<?> fieldType=f.getType();
      String fieldTypeName=fieldType.getSimpleName();
      if (fieldTypeName.equals("String_Node_Str")) {
        System.out.println(rs.getString(i));
        String dateString=rs.getString(i);
        if (dateString != null) {
          Date date=parseDate(dateString);
          f.set(product,date);
        }
      }
 else       if (fieldTypeName.equals("String_Node_Str")) {
        f.set(product,new Color(rs.getInt(i)));
      }
 else       if (fieldTypeName.equalsIgnoreCase("String_Node_Str")) {
        f.set(product,rs.getDouble(i));
      }
 else       if (fieldTypeName.equalsIgnoreCase("String_Node_Str")) {
        f.set(product,rs.getInt(i));
      }
 else       if (fieldTypeName.equals("String_Node_Str")) {
        f.set(product,rs.getString(i));
      }
 else       if (fieldTypeName.equals("String_Node_Str")) {
        f.set(product,rs.getLong(i));
      }
    }
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str");
    e.printStackTrace();
    return null;
  }
  return product;
}