Program: 115139
Project: 115139
Buggy source:
public ArrayList processResultRows(ResultSet rs){
  ArrayList al=new ArrayList();
  HashMap hm;
  try {
    while (rs.next()) {
      hm=new HashMap();
      ResultSetMetaData rsmd=rs.getMetaData();
      for (int i=1; i <= rsmd.getColumnCount(); i++) {
        String column=rsmd.getColumnName(i).toLowerCase();
        Integer type=(Integer)setTypes.get(new Integer(i));
        logMe("String_Node_Str" + column + "String_Node_Str"+ type.intValue()+ "String_Node_Str"+ i);
switch (type.intValue()) {
case TypeNames.DATE:
          hm.put(column,rs.getDate(i));
        break;
case TypeNames.TIMESTAMP:
      hm.put(column,rs.getTimestamp(i));
    break;
case TypeNames.DOUBLE:
  hm.put(column,new Double(rs.getDouble(i)));
if (rs.wasNull()) {
  hm.put(column,new Double(0));
}
break;
case TypeNames.BOOL:
if (CoreResources.getDBName().equals("String_Node_Str")) {
hm.put(column,new Boolean(rs.getString(i).equals("String_Node_Str") ? true : false));
if (rs.wasNull()) {
if (column.equalsIgnoreCase("String_Node_Str") || column.equalsIgnoreCase("String_Node_Str")) {
  hm.put(column,new Boolean(false));
}
 else {
  hm.put(column,new Boolean(true));
}
}
}
 else {
hm.put(column,new Boolean(rs.getBoolean(i)));
if (rs.wasNull()) {
if (column.equalsIgnoreCase("String_Node_Str") || column.equalsIgnoreCase("String_Node_Str")) {
  hm.put(column,new Boolean(false));
}
 else {
  hm.put(column,new Boolean(true));
}
}
}
break;
case TypeNames.FLOAT:
hm.put(column,new Float(rs.getFloat(i)));
if (rs.wasNull()) {
hm.put(column,new Float(0.0));
}
break;
case TypeNames.INT:
hm.put(column,new Integer(rs.getInt(i)));
if (rs.wasNull()) {
hm.put(column,new Integer(0));
}
break;
case TypeNames.STRING:
hm.put(column,rs.getString(i));
if (rs.wasNull()) {
hm.put(column,"String_Node_Str");
}
break;
case TypeNames.CHAR:
hm.put(column,rs.getString(i));
if (rs.wasNull()) {
char x='x';
hm.put(column,new Character(x));
}
break;
default :
}
}
al.add(hm);
}
}
 catch (SQLException sqle) {
if (logger.isWarnEnabled()) {
logger.warn("String_Node_Str" + "String_Node_Str" + sqle.getMessage() + "String_Node_Str"+ al.size());
sqle.printStackTrace();
}
}
return al;
}

Fixed version (ground truth):
public ArrayList processResultRows(ResultSet rs){
  ArrayList al=new ArrayList();
  HashMap hm;
  try {
    while (rs.next()) {
      hm=new HashMap();
      ResultSetMetaData rsmd=rs.getMetaData();
      for (int i=1; i <= rsmd.getColumnCount(); i++) {
        String column=rsmd.getColumnName(i).toLowerCase();
        Integer type=(Integer)setTypes.get(new Integer(i));
        if (null != type) {
switch (type.intValue()) {
case TypeNames.DATE:
            hm.put(column,rs.getDate(i));
          break;
case TypeNames.TIMESTAMP:
        hm.put(column,rs.getTimestamp(i));
      break;
case TypeNames.DOUBLE:
    hm.put(column,new Double(rs.getDouble(i)));
  if (rs.wasNull()) {
    hm.put(column,new Double(0));
  }
break;
case TypeNames.BOOL:
if (CoreResources.getDBName().equals("String_Node_Str")) {
hm.put(column,new Boolean(rs.getString(i).equals("String_Node_Str") ? true : false));
if (rs.wasNull()) {
  if (column.equalsIgnoreCase("String_Node_Str") || column.equalsIgnoreCase("String_Node_Str")) {
    hm.put(column,new Boolean(false));
  }
 else {
    hm.put(column,new Boolean(true));
  }
}
}
 else {
hm.put(column,new Boolean(rs.getBoolean(i)));
if (rs.wasNull()) {
  if (column.equalsIgnoreCase("String_Node_Str") || column.equalsIgnoreCase("String_Node_Str")) {
    hm.put(column,new Boolean(false));
  }
 else {
    hm.put(column,new Boolean(true));
  }
}
}
break;
case TypeNames.FLOAT:
hm.put(column,new Float(rs.getFloat(i)));
if (rs.wasNull()) {
hm.put(column,new Float(0.0));
}
break;
case TypeNames.INT:
hm.put(column,new Integer(rs.getInt(i)));
if (rs.wasNull()) {
hm.put(column,new Integer(0));
}
break;
case TypeNames.STRING:
hm.put(column,rs.getString(i));
if (rs.wasNull()) {
hm.put(column,"String_Node_Str");
}
break;
case TypeNames.CHAR:
hm.put(column,rs.getString(i));
if (rs.wasNull()) {
char x='x';
hm.put(column,new Character(x));
}
break;
default :
}
}
}
al.add(hm);
}
}
 catch (SQLException sqle) {
if (logger.isWarnEnabled()) {
logger.warn("String_Node_Str" + "String_Node_Str" + sqle.getMessage() + "String_Node_Str"+ al.size());
sqle.printStackTrace();
}
}
return al;
}