Buggy code:
@ AutoService ( Processor . class ) public class PaperParcelProcessor extends AbstractProcessor { private static final String DATA_VARIABLE_NAME = "data" ; private static final ClassName PARCEL = ClassName . get ( "android.os" , "Parcel" ) ; private static final ClassName PARCELABLE = ClassName . get ( "android.os" , "Parcelable" ) ; private static final ClassName TYPED_PARCELABLE = ClassName . get ( "nz.bradcampbell.paperparcel" , "TypedParcelable" ) ; private Filer filer ; private Types typeUtil ; private Elements elementUtils ; private Map < TypeName , TypeName > globalTypeAdapters = new HashMap < > ( ) ; private Map < String , TypeMirror > allWrapperTypes = new HashMap < > ( ) ; @ Override public synchronized void init ( ProcessingEnvironment env ) { } @ Override public SourceVersion getSupportedSourceVersion ( ) { } @ Override public Set < String > getSupportedAnnotationTypes ( ) { } @ Override public boolean process ( Set < ? extends TypeElement > annotations , RoundEnvironment roundEnvironment ) { } private JavaFile generateParcelableWrapper ( DataClass dataClass ) throws IOException { } private DataClass createParcel ( TypeMirror typeMirror ) { } private List < VariableElement > filterNonConstructorFields ( List < VariableElement > variableElements , TypeElement typeElement ) { for ( Element e : typeElement . getEnclosedElements ( ) ) { if ( e instanceof ExecutableElement ) { if ( e . getSimpleName ( ) . toString ( ) . equals ( "<init>" ) ) { ExecutableElement constructor = ( ( ExecutableElement ) ( e ) ) ; List < VariableElement > params = new ArrayList < > ( constructor . getParameters ( ) ) ; List < VariableElement > result = new ArrayList < > ( ) ; Iterator < VariableElement > iterator = params . iterator ( ) ; if ( iterator . hasNext ( ) ) { VariableElement currentParam = iterator . next ( ) ; for ( VariableElement field : variableElements ) { <START_BUG> if ( typeUtil . isSameType ( field . asType ( ) , currentParam . asType ( ) ) ) { <END_BUG> iterator . remove ( ) ; result . add ( field ) ; if ( iterator . hasNext ( ) ) { currentParam = iterator . next ( ) ; } else { break ; } } } } if ( ( params . size ( ) ) == 0 ) { return result ; } } } } throw new PaperParcelProcessor . NoValidConstructorFoundException ( ( ( ( "No<seq2seq4repair_space>valid<seq2seq4repair_space>constructor<seq2seq4repair_space>found<seq2seq4repair_space>while<seq2seq4repair_space>processing<seq2seq4repair_space>" + ( typeElement . getQualifiedName ( ) ) ) + ".<seq2seq4repair_space>The<seq2seq4repair_space>constructor<seq2seq4repair_space>parameters<seq2seq4repair_space>and<seq2seq4repair_space>" ) + "member<seq2seq4repair_space>variables<seq2seq4repair_space>need<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>order." ) ) ; } private ExecutableElement getAccessorMethod ( TypeElement typeElement , VariableElement variableElement ) throws PaperParcelProcessor . PropertyValidationException { } private Map < TypeName , TypeName > getTypeAdapterMapForVariable ( Map < TypeName , TypeName > classScopedTypeAdapters , VariableElement variableElement , ExecutableElement accessorMethod ) { } private Type parsePropertyType ( TypeMirror variable , TypeMirror dataClass , Map < TypeName , TypeName > typeAdapters ) { } private String autoValueClassName ( TypeElement type ) { } private void findNonParcelableDependencies ( TypeMirror typeMirror ) { } private void findNonParcelableDependencies ( TypeMirror variable , TypeMirror dataClass ) { } private TypeMirror getActualTypeParameter ( TypeMirror variable , TypeMirror dataClass ) { } private FieldSpec generateClassLoaderField ( TypeName className ) { } private FieldSpec generateCreator ( TypeName typeName , ClassName wrapperClassName , boolean isSingleton , List < Property > properties , FieldSpec classLoader ) { } private FieldSpec generateContentsField ( TypeName className ) { } private MethodSpec generateWrapMethod ( DataClass dataClass ) { } private MethodSpec generateContentsConstructor ( TypeName className ) { } private MethodSpec generateGetter ( TypeName className ) { } private MethodSpec generateDescribeContents ( ) { } private MethodSpec generateWriteToParcel ( List < Property > properties , Map < String , String > getterMethods ) { } private static void error ( ProcessingEnvironment processingEnv , String message , Element element ) { } static class NoValidConstructorFoundException extends IllegalStateException { public NoValidConstructorFoundException ( String s ) { } } static class PropertyValidationException extends IllegalStateException { final VariableElement source ; public PropertyValidationException ( String message , VariableElement source ) { } } }

Fix:
if ( typeUtil . isAssignable ( field . asType ( ) , currentParam . asType ( ) ) ) {