Buggy code:
public class FormattingConversionService implements ConversionService , FormatterRegistry { private GenericConversionService conversionService = new GenericConversionService ( ) ; public FormattingConversionService ( ) { } public FormattingConversionService ( ConversionService parent ) { } public void addFormatterForFieldType ( Class < ? > fieldType , Printer < ? > printer , Parser < ? > parser ) { } public void addFormatterForFieldType ( Class < ? > fieldType , Formatter < ? > formatter ) { } @ SuppressWarnings ( "unchecked" ) public void addFormatterForFieldAnnotation ( final AnnotationFormatterFactory annotationFormatterFactory ) { final Class < ? extends Annotation > annotationType = resolveAnnotationType ( annotationFormatterFactory ) ; if ( annotationType == null ) { throw new IllegalArgumentException ( ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>extract<seq2seq4repair_space>parameterized<seq2seq4repair_space>Annotation<seq2seq4repair_space>type<seq2seq4repair_space>argument<seq2seq4repair_space>from<seq2seq4repair_space>AnnotationFormatterFactory<seq2seq4repair_space>[" + ( annotationFormatterFactory . getClass ( ) . getName ( ) ) ) + "];<seq2seq4repair_space>does<seq2seq4repair_space>the<seq2seq4repair_space>factory<seq2seq4repair_space>parameterize<seq2seq4repair_space>the<seq2seq4repair_space><A<seq2seq4repair_space>extends<seq2seq4repair_space>Annotation><seq2seq4repair_space>generic<seq2seq4repair_space>type?" ) ) ; } Set < Class < ? > > fieldTypes = annotationFormatterFactory . getFieldTypes ( ) ; for ( final Class < ? > fieldType : fieldTypes ) { this . conversionService . addGenericConverter ( fieldType , String . class , new ConditionalGenericConverter ( ) { public boolean matches ( TypeDescriptor sourceFieldType , TypeDescriptor targetFieldType ) { return ( sourceFieldType . getAnnotation ( annotationType ) ) != null ; } public Object convert ( Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { <START_BUG> Printer < ? > printer = annotationFormatterFactory . getPrinter ( sourceType . getAnnotation ( annotationType ) , targetType . getType ( ) ) ; <END_BUG> return new FormattingConversionService . PrinterConverter ( printer , conversionService ) . convert ( source , sourceType , targetType ) ; } public String toString ( ) { return ( ( ( ( "@" + ( annotationType . getName ( ) ) ) + "<seq2seq4repair_space>" ) + ( fieldType . getName ( ) ) ) + "<seq2seq4repair_space>-><seq2seq4repair_space>" ) + ( String . class . getName ( ) ) ; } } ) ; this . conversionService . addGenericConverter ( String . class , fieldType , new ConditionalGenericConverter ( ) { public boolean matches ( TypeDescriptor sourceFieldType , TypeDescriptor targetFieldType ) { return ( targetFieldType . getAnnotation ( annotationType ) ) != null ; } public Object convert ( Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { Parser < ? > parser = annotationFormatterFactory . getParser ( targetType . getAnnotation ( annotationType ) , targetType . getType ( ) ) ; return new FormattingConversionService . ParserConverter ( parser , conversionService ) . convert ( source , sourceType , targetType ) ; } public String toString ( ) { return ( ( ( ( String . class . getName ( ) ) + "<seq2seq4repair_space>-><seq2seq4repair_space>@" ) + ( annotationType . getName ( ) ) ) + "<seq2seq4repair_space>" ) + ( fieldType . getName ( ) ) ; } } ) ; } } public ConverterRegistry getConverterRegistry ( ) { } public boolean canConvert ( Class < ? > sourceType , Class < ? > targetType ) { } @ SuppressWarnings ( "unchecked" ) public < T > T convert ( Object source , Class < T > targetType ) { } public boolean canConvert ( TypeDescriptor sourceType , TypeDescriptor targetType ) { } public Object convert ( Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { } public String toString ( ) { } @ SuppressWarnings ( "unchecked" ) private Class < ? extends Annotation > resolveAnnotationType ( AnnotationFormatterFactory < ? > annotationFormatterFactory ) { } private static class PrinterConverter implements GenericConverter { private TypeDescriptor printerObjectType ; @ SuppressWarnings ( "unchecked" ) private Printer printer ; private ConversionService conversionService ; public PrinterConverter ( Printer < ? > printer , ConversionService conversionService ) { } @ SuppressWarnings ( "unchecked" ) public Object convert ( Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { } private Class < ? > resolvePrinterObjectType ( Printer < ? > printer ) { } } private static class ParserConverter implements GenericConverter { private Parser < ? > parser ; private ConversionService conversionService ; public ParserConverter ( Parser < ? > parser , ConversionService conversionService ) { } public Object convert ( Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { } } }

Fix:
Printer < ? > printer = annotationFormatterFactory . getPrinter ( sourceType . getAnnotation ( annotationType ) , sourceType . getType ( ) ) ;