Program: 15398
Project: 15398
Buggy source:
private void doUpgrade(String contextName,Sql conn,String entityKey,Map<String,Method> setterMap){
  List<GroovyRowResult> rowResults;
  try {
    rowResults=conn.rows("String_Node_Str" + entityKey);
    EntityWrapper db=new EntityWrapper(contextName);
    for (    GroovyRowResult rowResult : rowResults) {
      Set<String> columns=rowResult.keySet();
      Object dest;
      try {
        dest=ClassLoader.getSystemClassLoader().loadClass(entityMap.get(entityKey).getCanonicalName()).newInstance();
      }
 catch (      ClassNotFoundException e1) {
        LOG.error(e1);
        break;
      }
catch (      InstantiationException e) {
        LOG.error(e);
        break;
      }
catch (      IllegalAccessException e) {
        LOG.error(e);
        break;
      }
      for (      String column : columns) {
        Method setter=setterMap.get(column);
        if (setter != null) {
          Object o=rowResult.get(column);
          if (o != null) {
            try {
              if (dest instanceof AbstractIsomorph && (setter.getName().equals("String_Node_Str"))) {
                o=State.valueOf((String)o);
              }
              if (dest instanceof Volume && (setter.getName().equals("String_Node_Str"))) {
                ((Volume)dest).setRemoteDevice(null);
              }
 else {
                setter.invoke(dest,o);
              }
            }
 catch (            IllegalArgumentException e) {
              LOG.error(dest.getClass().getName() + "String_Node_Str" + column+ "String_Node_Str"+ e);
            }
catch (            IllegalAccessException e) {
              LOG.error(dest.getClass().getName() + "String_Node_Str" + column+ "String_Node_Str"+ e);
            }
catch (            InvocationTargetException e) {
              LOG.error(dest.getClass().getName() + "String_Node_Str" + column+ "String_Node_Str"+ e);
            }
          }
        }
      }
      LOG.debug("String_Node_Str" + dest.getClass().getName());
      db.add(dest);
    }
    db.commit();
  }
 catch (  SQLException e) {
    LOG.error(e);
    return;
  }
}

Fixed version (ground truth):
private void doUpgrade(String contextName,Sql conn,String entityKey,Map<String,Method> setterMap){
  List<GroovyRowResult> rowResults;
  try {
    rowResults=conn.rows("String_Node_Str" + entityKey);
    EntityWrapper db=EntityWrapper.get(contextName);
    for (    GroovyRowResult rowResult : rowResults) {
      Set<String> columns=rowResult.keySet();
      Object dest;
      try {
        dest=ClassLoader.getSystemClassLoader().loadClass(entityMap.get(entityKey).getCanonicalName()).newInstance();
      }
 catch (      ClassNotFoundException e1) {
        LOG.error(e1);
        break;
      }
catch (      InstantiationException e) {
        LOG.error(e);
        break;
      }
catch (      IllegalAccessException e) {
        LOG.error(e);
        break;
      }
      for (      String column : columns) {
        Method setter=setterMap.get(column);
        if (setter != null) {
          Object o=rowResult.get(column);
          if (o != null) {
            try {
              if (dest instanceof Volume && (setter.getName().equals("String_Node_Str"))) {
                ((Volume)dest).setRemoteDevice(null);
              }
 else {
                setter.invoke(dest,o);
              }
            }
 catch (            IllegalArgumentException e) {
              LOG.error(dest.getClass().getName() + "String_Node_Str" + column+ "String_Node_Str"+ e);
            }
catch (            IllegalAccessException e) {
              LOG.error(dest.getClass().getName() + "String_Node_Str" + column+ "String_Node_Str"+ e);
            }
catch (            InvocationTargetException e) {
              LOG.error(dest.getClass().getName() + "String_Node_Str" + column+ "String_Node_Str"+ e);
            }
          }
        }
      }
      LOG.debug("String_Node_Str" + dest.getClass().getName());
      db.add(dest);
    }
    db.commit();
  }
 catch (  SQLException e) {
    LOG.error(e);
    return;
  }
}