Program: 60629
Project: 60629
Buggy source:
private Object getPropertyValue(final ConnConfProperty property){
  Object value=null;
  final List<Object> values=property.getValues();
  if (values != null && !values.isEmpty()) {
    try {
      final Class propertySchemaClass=ClassUtils.forName(property.getSchema().getType(),ClassUtils.getDefaultClassLoader());
      if (GuardedString.class.equals(propertySchemaClass)) {
        value=new GuardedString((values.get(0).toString()).toCharArray());
      }
 else       if (GuardedByteArray.class.equals(propertySchemaClass)) {
        value=new GuardedByteArray((byte[])values.get(0));
      }
 else       if (Character.class.equals(propertySchemaClass) || char.class.equals(propertySchemaClass)) {
        value=StringUtils.hasText((String)values.get(0)) ? values.get(0).toString().charAt(0) : null;
      }
 else       if (Integer.class.equals(propertySchemaClass) || int.class.equals(propertySchemaClass)) {
        value=Integer.parseInt(values.get(0).toString());
      }
 else       if (Long.class.equals(propertySchemaClass) || long.class.equals(propertySchemaClass)) {
        value=Long.parseLong(values.get(0).toString());
      }
 else       if (Float.class.equals(propertySchemaClass) || float.class.equals(propertySchemaClass)) {
        value=Float.parseFloat(values.get(0).toString());
      }
 else       if (Double.class.equals(propertySchemaClass) || double.class.equals(propertySchemaClass)) {
        value=Double.parseDouble(values.get(0).toString());
      }
 else       if (Boolean.class.equals(propertySchemaClass) || boolean.class.equals(propertySchemaClass)) {
        value=Boolean.parseBoolean(values.get(0).toString());
      }
 else       if (URI.class.equals(propertySchemaClass)) {
        value=URI.create(values.get(0).toString());
      }
 else       if (File.class.equals(propertySchemaClass)) {
        value=new File(values.get(0).toString());
      }
 else       if (String[].class.equals(propertySchemaClass)) {
        value=values.toArray(new String[]{});
      }
 else {
        value=values.get(0).toString();
      }
    }
 catch (    Throwable t) {
      LOG.error("String_Node_Str",property,t);
    }
  }
  return value;
}

Fixed version (ground truth):
private Object getPropertyValue(final ConnConfProperty property){
  Object value=null;
  final List<Object> values=property.getValues();
  if (values != null && !values.isEmpty()) {
    try {
      final Class propertySchemaClass=ClassUtils.forName(property.getSchema().getType(),ClassUtils.getDefaultClassLoader());
      if (GuardedString.class.equals(propertySchemaClass)) {
        value=new GuardedString((values.get(0).toString()).toCharArray());
      }
 else       if (GuardedByteArray.class.equals(propertySchemaClass)) {
        value=new GuardedByteArray((byte[])values.get(0));
      }
 else       if (Character.class.equals(propertySchemaClass) || Character.TYPE.equals(propertySchemaClass)) {
        value=values.get(0) != null && !values.get(0).toString().isEmpty() ? values.get(0).toString().charAt(0) : null;
      }
 else       if (Integer.class.equals(propertySchemaClass) || Integer.TYPE.equals(propertySchemaClass)) {
        value=Integer.parseInt(values.get(0).toString());
      }
 else       if (Long.class.equals(propertySchemaClass) || Long.TYPE.equals(propertySchemaClass)) {
        value=Long.parseLong(values.get(0).toString());
      }
 else       if (Float.class.equals(propertySchemaClass) || Float.TYPE.equals(propertySchemaClass)) {
        value=Float.parseFloat(values.get(0).toString());
      }
 else       if (Double.class.equals(propertySchemaClass) || Double.TYPE.equals(propertySchemaClass)) {
        value=Double.parseDouble(values.get(0).toString());
      }
 else       if (Boolean.class.equals(propertySchemaClass) || Boolean.TYPE.equals(propertySchemaClass)) {
        value=Boolean.parseBoolean(values.get(0).toString());
      }
 else       if (URI.class.equals(propertySchemaClass)) {
        value=URI.create(values.get(0).toString());
      }
 else       if (File.class.equals(propertySchemaClass)) {
        value=new File(values.get(0).toString());
      }
 else       if (String[].class.equals(propertySchemaClass)) {
        value=values.toArray(new String[]{});
      }
 else {
        value=values.get(0).toString();
      }
    }
 catch (    Throwable t) {
      LOG.error("String_Node_Str",property,t);
    }
  }
  return value;
}