Buggy code:
public class MethodGeneratorFromDom { private StatementDom body ; private GenerateScope methodScope ; public MethodGeneratorFromDom ( StatementDom body ) { } public void generate ( GeneratorAdapter generator ) { } public String populateMethodStatement ( GeneratorAdapter generator , StatementDom statement , Label breakLabel , LabelScope labelScope ) { statement . accept ( new StatementDomVisitor ( ) { @ Override public void visitVariableDeclaration ( String type , String name ) { methodScope . declareVar ( generator , type , name ) ; } @ Override public void visitVariableAssignment ( String name , ExpressionDom value ) { String valueType = populateMethodExpression ( generator , value , null , true ) ; int id = methodScope . getVarId ( name ) ; generator . storeLocal ( id , Type . getType ( valueType ) ) ; } @ Override public void visitIncrement ( String name , int amount ) { int id = methodScope . getVarId ( name ) ; generator . iinc ( id , amount ) ; } @ Override public void visitReturnValue ( ExpressionDom expression ) { String resultType = populateMethodExpression ( generator , expression , null , true ) ; if ( resultType . equals ( VOID ) ) throw new IllegalArgumentException ( "Expression<seq2seq4repair_space>of<seq2seq4repair_space>return<seq2seq4repair_space>statement<seq2seq4repair_space>results<seq2seq4repair_space>in<seq2seq4repair_space>void." ) ; generator . returnValue ( ) ; } @ Override public void visitBlock ( List < StatementDom > statements ) { statements . forEach ( ( s ) -> populateMethodStatement ( generator , s , breakLabel , labelScope ) ) ; } @ Override public void visitIfElse ( ExpressionDom condition , StatementDom ifTrue , StatementDom ifFalse ) { Label endLabel = generator . newLabel ( ) ; Label ifFalseLabel = generator . newLabel ( ) ; String resultType = populateMethodExpression ( generator , condition , ifFalseLabel , false ) ; populateMethodStatement ( generator , ifTrue , breakLabel , labelScope ) ; generator . goTo ( endLabel ) ; generator . visitLabel ( ifFalseLabel ) ; populateMethodStatement ( generator , ifFalse , breakLabel , labelScope ) ; generator . visitLabel ( endLabel ) ; } @ Override public void visitBreakCase ( ) { generator . goTo ( breakLabel ) ; } @ Override public void visitReturn ( ) { generator . visitInsn ( RETURN ) ; } @ Override public void visitInvocation ( int invocation , ExpressionDom target , String type , String name , String descriptor , List < ExpressionDom > arguments ) { populateMethodInvocation ( generator , methodScope , invocation , target , type , name , descriptor , arguments , MethodGeneratorFromDom . CODE_LEVEL_STATEMENT ) ; } @ Override public void visitNewInstance ( String type , List < String > parameterTypes , List < ExpressionDom > arguments ) { <START_BUG> populateMethodNewInstance ( generator , methodScope , type , parameterTypes , arguments , MethodGeneratorFromDom . CODE_LEVEL_EXPRESSION ) ; <END_BUG> } @ Override public void visitLabel ( String name ) { labelScope . label ( generator , name ) ; } @ Override public void visitGoTo ( String name ) { labelScope . goTo2 ( generator , name ) ; } @ Override public void visitSwitch ( ExpressionDom expression , Map < Integer , StatementDom > cases , StatementDom defaultBody ) { populateMethodExpression ( generator , expression , null , true ) ; Map < Integer , StatementDom > keyToBodyMap = cases ; int [ ] keys = keyToBodyMap . keySet ( ) . stream ( ) . mapToInt ( ( x ) -> ( ( int ) ( x ) ) ) . toArray ( ) ; generator . tableSwitch ( keys , new TableSwitchGenerator ( ) { Label switchEnd ; @ Override public void generateCase ( int key , Label end ) { switchEnd = end ; StatementDom body = keyToBodyMap . get ( key ) ; populateMethodStatement ( generator , body , end , labelScope ) ; } @ Override public void generateDefault ( ) { populateMethodStatement ( generator , defaultBody , switchEnd , labelScope ) ; } } ) ; } } ) ; return Descriptor . VOID ; } public String populateMethodExpression ( GeneratorAdapter generator , ExpressionDom expression , Label ifFalseLabel , boolean reifyCondition ) { } private static final int CODE_LEVEL_STATEMENT = 0 ; private static final int CODE_LEVEL_EXPRESSION = 1 ; private String populateMethodInvocation ( GeneratorAdapter generator , GenerateScope methodScope , int invocation , ExpressionDom target , String type , String name , String descriptor , List < ExpressionDom > arguments , int codeLevel ) { } private String populateMethodNewInstance ( GeneratorAdapter generator , GenerateScope methodScope , String type , List < String > parameterTypes , List < ExpressionDom > arguments , int codeLevel ) { } }

Fix:
populateMethodNewInstance ( generator , methodScope , type , parameterTypes , arguments , MethodGeneratorFromDom . CODE_LEVEL_STATEMENT ) ;