Source:
public void testAnnotationProcessorError005 ( ) throws java.lang.Exception { com.android.jack.errorhandling.TestingEnvironment te = new com.android.jack.errorhandling.TestingEnvironment ( ) ; buildAnnotationRequiredByAnnotationProc ( te , new java.lang.Class < ? > [ ] { com.android.jack.errorhandling.annotationprocessor.SourceAnnotationTest.class , com.android.jack.errorhandling.annotationprocessor.SourceErrorAnnotationTest.class } ) ; te.addFile ( te.getSourceFolder ( ) , "jack.incremental" , "A.java" , ( ( ( ( ( ( ( "package jack.incremental;\n" + "import " ) + ( com.android.jack.errorhandling.annotationprocessor.SourceAnnotationTest.class . getName ( ) ) ) + ";\n" ) + "@" ) + ( com.android.jack.errorhandling.annotationprocessor.SourceAnnotationTest.class . getSimpleName ( ) ) ) + "\n" ) + "public class A {}\n" ) ) ; com.android.jack.Options options = new com.android.jack.Options ( ) ; java.util.List < java.lang.String > ecjArgs = new java.util.ArrayList < java.lang.String > ( ) ; ecjArgs.add ( "-d" ) ; ecjArgs.add ( te.getTestingFolder ( ) . getAbsolutePath ( ) ) ; ecjArgs.add ( "-processor" ) ; ecjArgs.add ( com.android.jack.errorhandling.annotationprocessor.SourceAnnotationProcessor.class . getName ( ) ) ; ecjArgs.add ( te.getSourceFolder ( ) . getAbsolutePath ( ) ) ; options.setEcjArguments ( ecjArgs ) ; options.setClasspath ( ( ( ( com.android.jack.TestTools.getDefaultBootclasspathString ( ) ) + ( java.io.File.pathSeparator ) ) + ( te.getJackFolder ( ) ) ) ) ; java.io.File dexOutput = new java.io.File ( te.getTestingFolder ( ) , "classes.dex" ) ; options.setOutputFile ( dexOutput ) ; te.compile ( options ) ; org.jf.dexlib.DexFile dexFile = new org.jf.dexlib.DexFile ( dexOutput ) ; java.util.List < java.lang.String > sourceFileInDex = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.jf.dexlib.ClassDefItem classDef : dexFile.ClassDefsSection.getItems ( ) ) { sourceFileInDex.add ( classDef.getSourceFile ( ) . getStringValue ( ) ) ; } junit.framework.Assert.assertTrue ( sourceFileInDex.contains ( "ADuplicated.java" ) ) ; junit.framework.Assert.assertTrue ( sourceFileInDex.contains ( "A.java" ) ) ; }

Target:
public void testAnnotationProcessorError005 ( ) throws java.lang.Exception { com.android.jack.errorhandling.TestingEnvironment te = new com.android.jack.errorhandling.TestingEnvironment ( ) ; buildAnnotationRequiredByAnnotationProc ( te , new java.lang.Class < ? > [ ] { com.android.jack.errorhandling.annotationprocessor.SourceAnnotationTest.class , com.android.jack.errorhandling.annotationprocessor.SourceErrorAnnotationTest.class } ) ; te.addFile ( te.getSourceFolder ( ) , "jack.incremental" , "A.java" , ( ( ( ( ( ( ( "package jack.incremental;\n" + "import " ) + ( com.android.jack.errorhandling.annotationprocessor.SourceAnnotationTest.class . getName ( ) ) ) + ";\n" ) + "@" ) + ( com.android.jack.errorhandling.annotationprocessor.SourceAnnotationTest.class . getSimpleName ( ) ) ) + "\n" ) + "public class A {}\n" ) ) ; com.android.jack.Options options = new com.android.jack.Options ( ) ; java.util.List < java.lang.String > ecjArgs = new java.util.ArrayList < java.lang.String > ( ) ; ecjArgs.add ( "-d" ) ; ecjArgs.add ( te.getTestingFolder ( ) . getAbsolutePath ( ) ) ; ecjArgs.add ( "-processor" ) ; ecjArgs.add ( com.android.jack.errorhandling.annotationprocessor.SourceAnnotationProcessor.class . getName ( ) ) ; ecjArgs.add ( te.getSourceFolder ( ) . getAbsolutePath ( ) ) ; options.setEcjArguments ( ecjArgs ) ; options.setClasspath ( ( ( ( com.android.jack.TestTools.getDefaultBootclasspathString ( ) ) + ( java.io.File.pathSeparator ) ) + ( te.getJackFolder ( ) ) ) ) ; java.io.File dexOutput = new java.io.File ( te.getTestingFolder ( ) , "classes.dex" ) ; options.setOutputDir ( te.getTestingFolder ( ) ) ; te.compile ( options ) ; org.jf.dexlib.DexFile dexFile = new org.jf.dexlib.DexFile ( dexOutput ) ; java.util.List < java.lang.String > sourceFileInDex = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.jf.dexlib.ClassDefItem classDef : dexFile.ClassDefsSection.getItems ( ) ) { sourceFileInDex.add ( classDef.getSourceFile ( ) . getStringValue ( ) ) ; } junit.framework.Assert.assertTrue ( sourceFileInDex.contains ( "ADuplicated.java" ) ) ; junit.framework.Assert.assertTrue ( sourceFileInDex.contains ( "A.java" ) ) ; }