Program: 32346
Project: 32346
Buggy source:
protected boolean setField(Object effect,String key,ConfigurationSection section,ConfigurationSection parameterMap){
  try {
    String stringValue=section.getString(key);
    if (key.contains("String_Node_Str")) {
      key=key.replace("String_Node_Str","String_Node_Str");
    }
    if (key.contains("String_Node_Str")) {
      key=CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL,key);
    }
    String fieldKey=key;
    ConfigurationSection fieldSection=section;
    if (parameterMap != null && stringValue.startsWith("String_Node_Str") && parameterMap.contains(stringValue)) {
      fieldKey=stringValue;
      fieldSection=parameterMap;
    }
    Field field=effect.getClass().getField(key);
    if (field.getType().equals(Integer.TYPE) || field.getType().equals(Integer.class)) {
      field.set(effect,fieldSection.getInt(fieldKey));
    }
 else     if (field.getType().equals(Float.TYPE) || field.getType().equals(Float.class)) {
      field.set(effect,(float)fieldSection.getDouble(fieldKey));
    }
 else     if (field.getType().equals(Double.TYPE) || field.getType().equals(Double.class)) {
      field.set(effect,fieldSection.getDouble(fieldKey));
    }
 else     if (field.getType().equals(Boolean.TYPE) || field.getType().equals(Boolean.class)) {
      field.set(effect,fieldSection.getBoolean(fieldKey));
    }
 else     if (field.getType().equals(Long.TYPE) || field.getType().equals(Long.class)) {
      field.set(effect,fieldSection.getLong(fieldKey));
    }
 else     if (field.getType().equals(Short.TYPE) || field.getType().equals(Short.class)) {
      field.set(effect,(short)fieldSection.getInt(fieldKey));
    }
 else     if (field.getType().equals(Byte.TYPE) || field.getType().equals(Byte.class)) {
      field.set(effect,(byte)fieldSection.getInt(fieldKey));
    }
 else     if (field.getType().equals(String.class)) {
      String value=fieldSection.getString(fieldKey);
      field.set(effect,value);
    }
 else     if (field.getType().equals(Color.class)) {
      try {
        String value=fieldSection.getString(fieldKey);
        Integer rgb=Integer.parseInt(value,16);
        Color color=Color.fromRGB(rgb);
        field.set(effect,color);
      }
 catch (      Exception ex) {
        onError(ex);
      }
    }
 else     if (Map.class.isAssignableFrom(field.getType()) && section.isConfigurationSection(key)) {
      Map<String,Object> map=(Map<String,Object>)field.get(effect);
      ConfigurationSection subSection=section.getConfigurationSection(key);
      Set<String> keys=subSection.getKeys(false);
      for (      String mapKey : keys) {
        map.put(mapKey,subSection.get(mapKey));
      }
    }
 else     if (Map.class.isAssignableFrom(field.getType()) && Map.class.isAssignableFrom(section.get(key).getClass())) {
      field.set(effect,section.get(key));
    }
 else     if (ConfigurationSection.class.isAssignableFrom(field.getType())) {
      ConfigurationSection configSection=ConfigUtils.getConfigurationSection(section,key);
      if (parameterMap != null) {
        ConfigurationSection baseConfiguration=configSection;
        configSection=new MemoryConfiguration();
        Set<String> keys=baseConfiguration.getKeys(false);
        for (        String baseKey : keys) {
          String baseValue=baseConfiguration.getString(baseKey);
          if (baseValue.startsWith("String_Node_Str")) {
            String parameterValue=parameterMap.getString(baseValue);
            baseValue=parameterValue == null ? baseValue : parameterValue;
          }
          configSection.set(baseKey,baseValue);
        }
      }
      field.set(effect,configSection);
    }
 else     if (field.getType().equals(Vector.class)) {
      double x=0;
      double y=0;
      double z=0;
      try {
        String value=fieldSection.getString(fieldKey);
        String[] pieces=value.split("String_Node_Str");
        x=pieces.length > 0 ? Double.parseDouble(pieces[0]) : 0;
        y=pieces.length > 1 ? Double.parseDouble(pieces[1]) : 0;
        z=pieces.length > 2 ? Double.parseDouble(pieces[2]) : 0;
      }
 catch (      Exception ex) {
        onError(ex);
      }
      field.set(effect,new Vector(x,y,z));
    }
 else     if (field.getType().isEnum()) {
      Class<Enum> enumType=(Class<Enum>)field.getType();
      try {
        String value=fieldSection.getString(fieldKey);
        Enum enumValue=Enum.valueOf(enumType,value.toUpperCase());
        field.set(effect,enumValue);
      }
 catch (      Exception ex) {
        onError(ex);
      }
    }
 else     if (field.getType().equals(Font.class)) {
      try {
        String value=fieldSection.getString(fieldKey);
        Font font=Font.decode(value);
        field.set(effect,font);
      }
 catch (      Exception ex) {
        onError(ex);
      }
    }
 else {
      return false;
    }
    return true;
  }
 catch (  Exception ex) {
    this.onError(ex);
  }
  return false;
}

Fixed version (ground truth):
protected boolean setField(Object effect,String key,ConfigurationSection section,ConfigurationSection parameterMap){
  try {
    String stringValue=section.getString(key);
    String fieldKey=key;
    if (key.contains("String_Node_Str")) {
      key=key.replace("String_Node_Str","String_Node_Str");
    }
    if (key.contains("String_Node_Str")) {
      key=CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL,key);
    }
    ConfigurationSection fieldSection=section;
    if (parameterMap != null && stringValue.startsWith("String_Node_Str") && parameterMap.contains(stringValue)) {
      fieldKey=stringValue;
      fieldSection=parameterMap;
    }
    Field field=effect.getClass().getField(key);
    if (field.getType().equals(Integer.TYPE) || field.getType().equals(Integer.class)) {
      field.set(effect,fieldSection.getInt(fieldKey));
    }
 else     if (field.getType().equals(Float.TYPE) || field.getType().equals(Float.class)) {
      field.set(effect,(float)fieldSection.getDouble(fieldKey));
    }
 else     if (field.getType().equals(Double.TYPE) || field.getType().equals(Double.class)) {
      field.set(effect,fieldSection.getDouble(fieldKey));
    }
 else     if (field.getType().equals(Boolean.TYPE) || field.getType().equals(Boolean.class)) {
      field.set(effect,fieldSection.getBoolean(fieldKey));
    }
 else     if (field.getType().equals(Long.TYPE) || field.getType().equals(Long.class)) {
      field.set(effect,fieldSection.getLong(fieldKey));
    }
 else     if (field.getType().equals(Short.TYPE) || field.getType().equals(Short.class)) {
      field.set(effect,(short)fieldSection.getInt(fieldKey));
    }
 else     if (field.getType().equals(Byte.TYPE) || field.getType().equals(Byte.class)) {
      field.set(effect,(byte)fieldSection.getInt(fieldKey));
    }
 else     if (field.getType().equals(String.class)) {
      String value=fieldSection.getString(fieldKey);
      field.set(effect,value);
    }
 else     if (field.getType().equals(Color.class)) {
      try {
        String value=fieldSection.getString(fieldKey);
        Integer rgb=Integer.parseInt(value,16);
        Color color=Color.fromRGB(rgb);
        field.set(effect,color);
      }
 catch (      Exception ex) {
        onError(ex);
      }
    }
 else     if (Map.class.isAssignableFrom(field.getType()) && section.isConfigurationSection(key)) {
      Map<String,Object> map=(Map<String,Object>)field.get(effect);
      ConfigurationSection subSection=section.getConfigurationSection(key);
      Set<String> keys=subSection.getKeys(false);
      for (      String mapKey : keys) {
        map.put(mapKey,subSection.get(mapKey));
      }
    }
 else     if (Map.class.isAssignableFrom(field.getType()) && Map.class.isAssignableFrom(section.get(key).getClass())) {
      field.set(effect,section.get(key));
    }
 else     if (ConfigurationSection.class.isAssignableFrom(field.getType())) {
      ConfigurationSection configSection=ConfigUtils.getConfigurationSection(section,key);
      if (parameterMap != null) {
        ConfigurationSection baseConfiguration=configSection;
        configSection=new MemoryConfiguration();
        Set<String> keys=baseConfiguration.getKeys(false);
        for (        String baseKey : keys) {
          Object baseValue=baseConfiguration.get(baseKey);
          if (baseValue instanceof String && ((String)baseValue).startsWith("String_Node_Str")) {
            String parameterValue=parameterMap.getString((String)baseValue);
            baseValue=parameterValue == null ? baseValue : parameterValue;
          }
          configSection.set(baseKey,baseValue);
        }
      }
      field.set(effect,configSection);
    }
 else     if (field.getType().equals(Vector.class)) {
      double x=0;
      double y=0;
      double z=0;
      try {
        String value=fieldSection.getString(fieldKey);
        String[] pieces=value.split("String_Node_Str");
        x=pieces.length > 0 ? Double.parseDouble(pieces[0]) : 0;
        y=pieces.length > 1 ? Double.parseDouble(pieces[1]) : 0;
        z=pieces.length > 2 ? Double.parseDouble(pieces[2]) : 0;
      }
 catch (      Exception ex) {
        onError(ex);
      }
      field.set(effect,new Vector(x,y,z));
    }
 else     if (field.getType().isEnum()) {
      Class<Enum> enumType=(Class<Enum>)field.getType();
      try {
        String value=fieldSection.getString(fieldKey);
        Enum enumValue=Enum.valueOf(enumType,value.toUpperCase());
        field.set(effect,enumValue);
      }
 catch (      Exception ex) {
        onError(ex);
      }
    }
 else     if (field.getType().equals(Font.class)) {
      try {
        String value=fieldSection.getString(fieldKey);
        Font font=Font.decode(value);
        field.set(effect,font);
      }
 catch (      Exception ex) {
        onError(ex);
      }
    }
 else {
      return false;
    }
    return true;
  }
 catch (  Exception ex) {
    this.onError(ex);
  }
  return false;
}