Buggy code:
public class LIRTranslationVisitor implements Visitor { private int c = 0 ; private int strCounter = 0 ; private int labelCounter = 0 ; private Map < String , String > strings = new HashMap < String , String > ( ) ; private List < String > str = new ArrayList < String > ( ) ; private String target = "" ; private boolean isInCondition ; private String whileConditionLabel ; private String whileExitLabel ; private Program program ; private void Emit ( String label , String string ) { } private String freshRegister ( ) { } private String freshLabel ( ) { } @ Override public Object visit ( Program program ) { } private void buildLayout ( ASTNode node , ClassLayout parentLayout ) { ICClass cl = ( ( ICClass ) ( node ) ) ; ClassLayout current = new ClassLayout ( ) ; current . methodToOffset . putAll ( parentLayout . methodToOffset ) ; int currentMethodNum = parentLayout . methodToOffset . size ( ) ; for ( Method m : cl . getMethods ( ) ) { MethodTableType methodType = ( ( MethodTableType ) ( m . getTableType ( ) ) ) ; if ( ! ( ( methodType . getRawName ( ) . equals ( "main" ) ) && ( methodType . getName ( ) . equals ( "{string[]<seq2seq4repair_space>-><seq2seq4repair_space>void}" ) ) ) ) { <START_BUG> current . methodToOffset . put ( m , currentMethodNum ) ; <END_BUG> currentMethodNum += 1 ; } } current . fieldToOffset . putAll ( parentLayout . fieldToOffset ) ; int currentFieldNum = current . fieldToOffset . size ( ) ; for ( Field f : cl . getFields ( ) ) { current . fieldToOffset . put ( f . getName ( ) , currentFieldNum ) ; currentFieldNum += 1 ; } cl . setClassLayout ( current ) ; for ( SymbolTable tbl : node . getEnclosingScope ( ) . getChildren ( ) ) { if ( tbl instanceof ClassScope ) { buildLayout ( tbl . getNode ( ) , current ) ; } } } @ Override public Object visit ( ICClass icClass ) { } @ Override public Object visit ( Field field ) { } @ Override public Object visit ( VirtualMethod method ) { } @ Override public Object visit ( StaticMethod method ) { } @ Override public Object visit ( LibraryMethod method ) { } @ Override public Object visit ( Formal formal ) { } @ Override public Object visit ( PrimitiveType type ) { } @ Override public Object visit ( UserType type ) { } @ Override public Object visit ( Assignment assignment ) { } @ Override public Object visit ( CallStatement callStatement ) { } @ Override public Object visit ( Return returnStatement ) { } @ Override public Object visit ( If ifStatement ) { } @ Override public Object visit ( While whileStatement ) { } @ Override public Object visit ( Break breakStatement ) { } @ Override public Object visit ( Continue continueStatement ) { } @ Override public Object visit ( StatementsBlock statementsBlock ) { } @ Override public Object visit ( LocalVariable localVariable ) { } @ Override public Object visit ( VariableLocation location ) { } @ Override public Object visit ( ArrayLocation location ) { } @ Override public Object visit ( StaticCall call ) { } @ Override public Object visit ( VirtualCall call ) { } @ Override public Object visit ( This thisExpression ) { } @ Override public Object visit ( NewClass newClass ) { } @ Override public Object visit ( NewArray newArray ) { } @ Override public Object visit ( Length length ) { } @ Override public Object visit ( MathBinaryOp binaryOp ) { } public String getLirOperator ( BinaryOps binOp ) { } @ Override public Object visit ( LogicalBinaryOp binaryOp ) { } @ Override public Object visit ( MathUnaryOp unaryOp ) { } @ Override public Object visit ( LogicalUnaryOp unaryOp ) { } @ Override public Object visit ( Literal literal ) { } @ Override public Object visit ( ExpressionBlock expressionBlock ) { } }

Fix:
current . methodToOffset . put ( m . getName ( ) , currentMethodNum ) ;