Source:
public void testError1 ( ) throws java.lang.Exception { com.android.jack.test.helper.IncrementalTestHelper helper = new com.android.jack.test.helper.IncrementalTestHelper ( com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ) ; java.io.File source1 = helper.addJavaFile ( "jack.source" , "Source1.java" , ( "package jack.source; \n" + ( "public class Source1 { \n" + "public m(){} }" ) ) ) ; helper.addJavaFile ( "jack.source" , "Source2.java" , ( "package jack.source; \n" + ( "public class Source2 extends Source1 { \n" + "@Override public void m(){} }" ) ) ) ; java.io.File outputDex1 = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; java.util.List < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > excludeList = new java.util.ArrayList < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > ( 3 ) ; excludeList.add ( com.android.jack.test.toolchain.JillBasedToolchain.class ) ; excludeList.add ( com.android.jack.test.toolchain.IncrementalToolchain.class ) ; excludeList.add ( com.android.jack.test.toolchain.TwoStepsToolchain.class ) ; com.android.jack.test.toolchain.JackBasedToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackApiToolchainBase.class , excludeList ) ; java.io.File outputJack = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "output" , toolchain.getLibraryExtension ( ) ) ; java.io.File [ ] defaultClasspath = toolchain.getDefaultBootClasspath ( ) ; toolchain.setIncrementalFolder ( helper.getCompilerStateFolder ( ) ) ; toolchain.setOutputJack ( outputJack , true ) ; toolchain.setErrorStream ( com.google.common.io.ByteStreams.nullOutputStream ( ) ) ; try { toolchain.addToClasspath ( defaultClasspath ) . srcToExe ( outputDex1 , false , helper.getSourceFolder ( ) ) ; junit.framework.Assert.fail ( ) ; } catch ( com.android.jack.frontend.FrontendCompilationException e ) { } junit.framework.Assert.assertEquals ( 0 , getCount ( helper.getCompilerStateFolder ( ) , FileType.JAYCE ) ) ; source1 = helper.addJavaFile ( "jack.source" , "Source1.java" , ( "package jack.source; \n" + ( "public class Source1 { \n" + "public void m(){} }" ) ) ) ; java.io.File outputDex2 = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackBasedToolchain.class , excludeList ) ; toolchain.setIncrementalFolder ( helper.getCompilerStateFolder ( ) ) ; toolchain.setOutputJack ( outputJack , true ) ; toolchain.addToClasspath ( defaultClasspath ) . srcToExe ( outputDex2 , false , helper.getSourceFolder ( ) ) ; junit.framework.Assert.assertEquals ( 2 , getCount ( helper.getCompilerStateFolder ( ) , FileType.JAYCE ) ) ; junit.framework.Assert.assertEquals ( 2 , getCount ( outputJack , FileType.JAYCE ) ) ; }

Target:
public void testError1 ( ) throws java.lang.Exception { com.android.jack.test.helper.IncrementalTestHelper helper = new com.android.jack.test.helper.IncrementalTestHelper ( com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ) ; java.io.File source1 = helper.addJavaFile ( "jack.source" , "Source1.java" , ( "package jack.source; \n" + ( "public class Source1 { \n" + "public m(){} }" ) ) ) ; helper.addJavaFile ( "jack.source" , "Source2.java" , ( "package jack.source; \n" + ( "public class Source2 extends Source1 { \n" + "@Override public void m(){} }" ) ) ) ; java.io.File outputDex1 = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; java.util.List < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > excludeList = new java.util.ArrayList < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > ( 3 ) ; excludeList.add ( com.android.jack.test.toolchain.JillBasedToolchain.class ) ; excludeList.add ( com.android.jack.test.toolchain.IncrementalToolchain.class ) ; excludeList.add ( com.android.jack.test.toolchain.TwoStepsToolchain.class ) ; com.android.jack.test.toolchain.JackBasedToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackApiToolchainBase.class , excludeList ) ; java.io.File outputJack = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "output" , toolchain.getLibraryExtension ( ) ) ; java.io.File [ ] defaultClasspath = toolchain.getDefaultBootClasspath ( ) ; toolchain.setIncrementalFolder ( helper.getCompilerStateFolder ( ) ) ; toolchain.setOutputJack ( outputJack , true ) ; toolchain.setErrorStream ( com.google.common.io.ByteStreams.nullOutputStream ( ) ) ; try { toolchain.addToClasspath ( defaultClasspath ) . srcToExe ( outputDex1 , false , helper.getSourceFolder ( ) ) ; junit.framework.Assert.fail ( ) ; } catch ( com.android.jack.frontend.FrontendCompilationException e ) { } junit.framework.Assert.assertEquals ( 0 , getCount ( helper.getCompilerStateFolder ( ) , FileType.JAYCE ) ) ; java.lang.Thread.sleep ( 1000 ) ; source1 = helper.addJavaFile ( "jack.source" , "Source1.java" , ( "package jack.source; \n" + ( "public class Source1 { \n" + "public void m(){} }" ) ) ) ; java.io.File outputDex2 = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackBasedToolchain.class , excludeList ) ; toolchain.setIncrementalFolder ( helper.getCompilerStateFolder ( ) ) ; toolchain.setOutputJack ( outputJack , true ) ; toolchain.addToClasspath ( defaultClasspath ) . srcToExe ( outputDex2 , false , helper.getSourceFolder ( ) ) ; junit.framework.Assert.assertEquals ( 2 , getCount ( helper.getCompilerStateFolder ( ) , FileType.JAYCE ) ) ; junit.framework.Assert.assertEquals ( 2 , getCount ( outputJack , FileType.JAYCE ) ) ; }