Program: 163315
Project: 163315
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private static Conversion getConversion(Class fieldType,Field field,Annotation annotation){
  try {
    Parsed parsed=field == null ? null : findAnnotation(field,Parsed.class);
    Class annType=annotation.annotationType();
    String nullRead=getNullReadValue(parsed);
    String nullWrite=getNullWriteValue(parsed);
    if (annType == NullString.class) {
      String[] nulls=((NullString)annotation).nulls();
      return Conversions.toNull(nulls);
    }
 else     if (annType == EnumOptions.class) {
      if (!fieldType.isEnum()) {
        if (field == null) {
          throw new IllegalStateException("String_Node_Str" + EnumOptions.class.getName() + "String_Node_Str"+ fieldType.getName()+ "String_Node_Str");
        }
 else {
          throw new IllegalStateException("String_Node_Str" + EnumOptions.class.getName() + "String_Node_Str"+ field.getName()+ "String_Node_Str"+ field.getType().getName()+ "String_Node_Str");
        }
      }
      EnumOptions enumOptions=((EnumOptions)annotation);
      String element=enumOptions.customElement().trim();
      if (element.isEmpty()) {
        element=null;
      }
      Enum nullReadValue=nullRead == null ? null : Enum.valueOf(fieldType,nullRead);
      return new EnumConversion(fieldType,nullReadValue,nullWrite,element,enumOptions.selectors());
    }
 else     if (annType == Trim.class) {
      int length=((Trim)annotation).length();
      if (length == -1) {
        return Conversions.trim();
      }
 else {
        return Conversions.trim(length);
      }
    }
 else     if (annType == LowerCase.class) {
      return Conversions.toLowerCase();
    }
 else     if (annType == UpperCase.class) {
      return Conversions.toUpperCase();
    }
 else     if (annType == Replace.class) {
      Replace replace=((Replace)annotation);
      return Conversions.replace(replace.expression(),replace.replacement());
    }
 else     if (annType == BooleanString.class) {
      if (fieldType != boolean.class && fieldType != Boolean.class) {
        if (field == null) {
          throw new DataProcessingException("String_Node_Str" + BooleanString.class.getName() + "String_Node_Str"+ fieldType.getName()+ "String_Node_Str");
        }
 else {
          throw new DataProcessingException("String_Node_Str" + field.getName() + "String_Node_Str"+ fieldType.getName()+ "String_Node_Str");
        }
      }
      BooleanString boolString=((BooleanString)annotation);
      String[] falseStrings=boolString.falseStrings();
      String[] trueStrings=boolString.trueStrings();
      Boolean valueForNull=nullRead == null ? null : BooleanConversion.getBoolean(nullRead,trueStrings,falseStrings);
      if (valueForNull == null && fieldType == boolean.class) {
        valueForNull=Boolean.FALSE;
      }
      return Conversions.toBoolean(valueForNull,nullWrite,trueStrings,falseStrings);
    }
 else     if (annType == Format.class) {
      Format format=((Format)annotation);
      String[] formats=format.formats();
      Conversion conversion=null;
      if (fieldType == BigDecimal.class) {
        BigDecimal defaultForNull=nullRead == null ? null : new BigDecimal(nullRead);
        conversion=Conversions.formatToBigDecimal(defaultForNull,nullWrite,formats);
      }
 else       if (Number.class.isAssignableFrom(fieldType)) {
        conversion=Conversions.formatToNumber(formats);
        ((NumericConversion)conversion).setNumberType(fieldType);
      }
 else {
        Date dateIfNull=null;
        if (nullRead != null) {
          if ("String_Node_Str".equalsIgnoreCase(nullRead)) {
            dateIfNull=new Date();
          }
 else {
            if (formats.length == 0) {
              throw new DataProcessingException("String_Node_Str");
            }
            SimpleDateFormat sdf=new SimpleDateFormat(formats[0]);
            dateIfNull=sdf.parse(nullRead);
          }
        }
        if (Date.class == fieldType) {
          conversion=Conversions.toDate(dateIfNull,nullWrite,formats);
        }
 else         if (Calendar.class == fieldType) {
          Calendar calendarIfNull=null;
          if (dateIfNull != null) {
            calendarIfNull=Calendar.getInstance();
            calendarIfNull.setTime(dateIfNull);
          }
          conversion=Conversions.toCalendar(calendarIfNull,nullWrite,formats);
        }
      }
      if (conversion != null) {
        String[] options=format.options();
        if (options.length > 0) {
          if (conversion instanceof FormattedConversion) {
            Object[] formatters=((FormattedConversion)conversion).getFormatterObjects();
            for (            Object formatter : formatters) {
              applyFormatSettings(formatter,options);
            }
          }
 else {
            throw new DataProcessingException("String_Node_Str" + Arrays.toString(options) + "String_Node_Str"+ conversion.getClass()+ "String_Node_Str"+ FormattedConversion.class);
          }
        }
        return conversion;
      }
    }
 else     if (annType == Convert.class) {
      Convert convert=((Convert)annotation);
      String[] args=convert.args();
      Class conversionClass=convert.conversionClass();
      if (!Conversion.class.isAssignableFrom(conversionClass)) {
        throw new DataProcessingException("String_Node_Str" + conversionClass.getSimpleName() + "String_Node_Str"+ conversionClass.getName()+ ')');
      }
      try {
        Constructor constructor=conversionClass.getConstructor(String[].class);
        return (Conversion)constructor.newInstance((Object)args);
      }
 catch (      NoSuchMethodException e) {
        throw new DataProcessingException("String_Node_Str" + conversionClass.getSimpleName() + "String_Node_Str"+ conversionClass.getName()+ ')',e);
      }
catch (      Exception e) {
        throw new DataProcessingException("String_Node_Str" + conversionClass.getSimpleName() + "String_Node_Str"+ conversionClass.getName()+ ')',e);
      }
    }
    return null;
  }
 catch (  DataProcessingException ex) {
    throw ex;
  }
catch (  Throwable ex) {
    if (field == null) {
      throw new DataProcessingException("String_Node_Str" + fieldType,ex);
    }
 else {
      throw new DataProcessingException("String_Node_Str" + field.getName() + "String_Node_Str"+ field.getDeclaringClass().getName(),ex);
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private static Conversion getConversion(Class fieldType,Field field,Annotation annotation){
  try {
    Parsed parsed=field == null ? null : findAnnotation(field,Parsed.class);
    Class annType=annotation.annotationType();
    String nullRead=getNullReadValue(parsed);
    String nullWrite=getNullWriteValue(parsed);
    if (annType == NullString.class) {
      String[] nulls=((NullString)annotation).nulls();
      return Conversions.toNull(nulls);
    }
 else     if (annType == EnumOptions.class) {
      if (!fieldType.isEnum()) {
        if (field == null) {
          throw new IllegalStateException("String_Node_Str" + EnumOptions.class.getName() + "String_Node_Str"+ fieldType.getName()+ "String_Node_Str");
        }
 else {
          throw new IllegalStateException("String_Node_Str" + EnumOptions.class.getName() + "String_Node_Str"+ field.getName()+ "String_Node_Str"+ field.getType().getName()+ "String_Node_Str");
        }
      }
      EnumOptions enumOptions=((EnumOptions)annotation);
      String element=enumOptions.customElement().trim();
      if (element.isEmpty()) {
        element=null;
      }
      Enum nullReadValue=nullRead == null ? null : Enum.valueOf(fieldType,nullRead);
      return new EnumConversion(fieldType,nullReadValue,nullWrite,element,enumOptions.selectors());
    }
 else     if (annType == Trim.class) {
      int length=((Trim)annotation).length();
      if (length == -1) {
        return Conversions.trim();
      }
 else {
        return Conversions.trim(length);
      }
    }
 else     if (annType == LowerCase.class) {
      return Conversions.toLowerCase();
    }
 else     if (annType == UpperCase.class) {
      return Conversions.toUpperCase();
    }
 else     if (annType == Replace.class) {
      Replace replace=((Replace)annotation);
      return Conversions.replace(replace.expression(),replace.replacement());
    }
 else     if (annType == BooleanString.class) {
      if (fieldType != boolean.class && fieldType != Boolean.class) {
        if (field == null) {
          throw new DataProcessingException("String_Node_Str" + BooleanString.class.getName() + "String_Node_Str"+ fieldType.getName()+ "String_Node_Str");
        }
 else {
          throw new DataProcessingException("String_Node_Str" + field.getName() + "String_Node_Str"+ fieldType.getName()+ "String_Node_Str");
        }
      }
      BooleanString boolString=((BooleanString)annotation);
      String[] falseStrings=boolString.falseStrings();
      String[] trueStrings=boolString.trueStrings();
      Boolean valueForNull=nullRead == null ? null : BooleanConversion.getBoolean(nullRead,trueStrings,falseStrings);
      if (valueForNull == null && fieldType == boolean.class) {
        valueForNull=Boolean.FALSE;
      }
      return Conversions.toBoolean(valueForNull,nullWrite,trueStrings,falseStrings);
    }
 else     if (annType == Format.class) {
      Format format=((Format)annotation);
      String[] formats=format.formats();
      Conversion conversion=null;
      if (fieldType == BigDecimal.class) {
        BigDecimal defaultForNull=nullRead == null ? null : new BigDecimal(nullRead);
        conversion=Conversions.formatToBigDecimal(defaultForNull,nullWrite,formats);
      }
 else       if (Number.class.isAssignableFrom(fieldType)) {
        conversion=Conversions.formatToNumber(formats);
        ((NumericConversion)conversion).setNumberType(fieldType);
      }
 else {
        Date dateIfNull=null;
        if (nullRead != null) {
          if ("String_Node_Str".equalsIgnoreCase(nullRead)) {
            dateIfNull=new Date();
          }
 else {
            if (formats.length == 0) {
              throw new DataProcessingException("String_Node_Str");
            }
            SimpleDateFormat sdf=new SimpleDateFormat(formats[0]);
            dateIfNull=sdf.parse(nullRead);
          }
        }
        if (Date.class == fieldType) {
          conversion=Conversions.toDate(dateIfNull,nullWrite,formats);
        }
 else         if (Calendar.class == fieldType) {
          Calendar calendarIfNull=null;
          if (dateIfNull != null) {
            calendarIfNull=Calendar.getInstance();
            calendarIfNull.setTime(dateIfNull);
          }
          conversion=Conversions.toCalendar(calendarIfNull,nullWrite,formats);
        }
      }
      if (conversion != null) {
        String[] options=format.options();
        if (options.length > 0) {
          if (conversion instanceof FormattedConversion) {
            Object[] formatters=((FormattedConversion)conversion).getFormatterObjects();
            for (            Object formatter : formatters) {
              applyFormatSettings(formatter,options);
            }
          }
 else {
            throw new DataProcessingException("String_Node_Str" + Arrays.toString(options) + "String_Node_Str"+ conversion.getClass()+ "String_Node_Str"+ FormattedConversion.class);
          }
        }
        return conversion;
      }
    }
 else     if (annType == Convert.class) {
      Convert convert=((Convert)annotation);
      String[] args=convert.args();
      Class conversionClass=convert.conversionClass();
      if (!Conversion.class.isAssignableFrom(conversionClass)) {
        throw new DataProcessingException("String_Node_Str" + conversionClass.getSimpleName() + "String_Node_Str"+ conversionClass.getName()+ ')');
      }
      try {
        Constructor constructor=conversionClass.getConstructor(String[].class);
        return (Conversion)constructor.newInstance((Object)args);
      }
 catch (      NoSuchMethodException e) {
        throw new DataProcessingException("String_Node_Str" + conversionClass.getSimpleName() + "String_Node_Str"+ conversionClass.getName()+ ')',e);
      }
catch (      Exception e) {
        throw new DataProcessingException("String_Node_Str" + conversionClass.getSimpleName() + "String_Node_Str"+ conversionClass.getName()+ ')',e);
      }
    }
    if (fieldType == String.class && (nullRead != null || nullWrite != null)) {
      return new ToStringConversion(nullRead,nullWrite);
    }
    return null;
  }
 catch (  DataProcessingException ex) {
    throw ex;
  }
catch (  Throwable ex) {
    if (field == null) {
      throw new DataProcessingException("String_Node_Str" + fieldType,ex);
    }
 else {
      throw new DataProcessingException("String_Node_Str" + field.getName() + "String_Node_Str"+ field.getDeclaringClass().getName(),ex);
    }
  }
}