Buggy code:
private RefCountedHashMap < String , Pair < Type , Type > > propagate ( Stmt . Skip stmt , RefCountedHashMap < String , Pair < Type , Type > > environment , ArrayList < Import > imports ) { } private RefCountedHashMap < String , Pair < Type , Type > > propagate ( Stmt . Switch stmt , RefCountedHashMap < String , Pair < Type , Type > > environment , ArrayList < Import > imports ) { } private RefCountedHashMap < String , Pair < Type , Type > > propagate ( Stmt . Throw stmt , RefCountedHashMap < String , Pair < Type , Type > > environment , ArrayList < Import > imports ) { } private RefCountedHashMap < String , Pair < Type , Type > > propagate ( Stmt . TryCatch stmt , RefCountedHashMap < String , Pair < Type , Type > > environment , ArrayList < Import > imports ) { } private RefCountedHashMap < String , Pair < Type , Type > > propagate ( Stmt . While stmt , RefCountedHashMap < String , Pair < Type , Type > > environment , ArrayList < Import > imports ) { } private LVal propagate ( Expr . LVal lval , RefCountedHashMap < String , Pair < Type , Type > > environment , ArrayList < Import > imports ) { } private Expr propagate ( Expr expr , RefCountedHashMap < String , Pair < Type , Type > > environment , ArrayList < Import > imports ) { } private Expr propagate ( Expr . BinOp expr , RefCountedHashMap < String , Pair < Type , Type > > environment , ArrayList < Import > imports ) throws ResolveError { } private Expr propagate ( Expr . UnOp expr , RefCountedHashMap < String , Pair < Type , Type > > environment , ArrayList < Import > imports ) throws ResolveError { } private Expr propagate ( Expr . Comprehension expr , RefCountedHashMap < String , Pair < Type , Type > > environment , ArrayList < Import > imports ) { } private Expr propagate ( Expr . Constant expr , RefCountedHashMap < String , Pair < Type , Type > > environment , ArrayList < Import > imports ) { } private Expr propagate ( Expr . Convert c , RefCountedHashMap < String , Pair < Type , Type > > environment , ArrayList < Import > imports ) throws ResolveError { } private Expr propagate ( Expr . Function expr , RefCountedHashMap < String , Pair < Type , Type > > environment , ArrayList < Import > imports ) { } private Expr propagate ( Expr . AbstractInvoke expr , RefCountedHashMap < String , Pair < Type , Type > > environment , ArrayList < Import > imports ) throws ResolveError { Expr receiver = expr . qualification ; if ( receiver != null ) { receiver = propagate ( receiver , environment , imports ) ; expr . qualification = receiver ; } ArrayList < Expr > exprArgs = expr . arguments ; ArrayList < Type > nominalParamTypes = new ArrayList < Type > ( ) ; ArrayList < Type > rawParamTypes = new ArrayList < Type > ( ) ; for ( int i = 0 ; i != ( exprArgs . size ( ) ) ; ++ i ) { Expr arg = propagate ( exprArgs . get ( i ) , environment , imports ) ; exprArgs . set ( i , arg ) ; nominalParamTypes . add ( arg . nominalType ( ) ) ; rawParamTypes . add ( arg . rawType ( ) ) ; } if ( receiver instanceof Expr . ModuleAccess ) { Expr . ModuleAccess ma = ( ( Expr . ModuleAccess ) ( receiver ) ) ; NameID name = new NameID ( ma . mid , expr . name ) ; Type . Function funType = bindFunctionOrMethod ( name , rawParamTypes , expr ) ; Expr . FunctionCall r = new Expr . FunctionCall ( name , ma , exprArgs , expr . attributes ( ) ) ; r . nominalReturnType = funType . ret ( ) ; r . rawFunctionType = funType ; return r ; } else { if ( receiver != null ) { Type . Process rawRecType = checkType ( expr . qualification . rawType ( ) , Process . class , receiver ) ; NameID nid = resolver . resolveAsName ( expr . name , imports ) ; Type . Method methType = bindMessage ( nid , rawRecType , rawParamTypes , expr ) ; <START_BUG> Expr . MessageSend r = new Expr . MessageSend ( nid , receiver , exprArgs , expr . attributes ( ) ) ; <END_BUG> r . nominalReturnType = methType . ret ( ) ; r . rawFunctionType = methType ; return r ; } else { NameID nid = resolver . resolveAsName ( expr . name , imports ) ; Type . Function funType = bindFunctionOrMethod ( nid , rawParamTypes , expr ) ; Expr . AbstractInvoke < Expr . ModuleAccess > r ; if ( funType instanceof Type . Method ) { r = new Expr . MethodCall ( nid , null , exprArgs , expr . attributes ( ) ) ; } else { r = new Expr . FunctionCall ( nid , null , exprArgs , expr . attributes ( ) ) ; } r . nominalReturnType = funType . ret ( ) ; r . rawFunctionType = funType ; return r ; } } } private Function bindFunctionOrMethod ( NameID nid , ArrayList < Type > paramTypes , SyntacticElement elem ) throws ResolveError { } private Method bindMessage ( NameID nid , Type . Process receiver , ArrayList < Type > paramTypes , SyntacticElement elem ) throws ResolveError { }

Fix:
Expr . MessageSend r = new Expr . MessageSend ( nid , receiver , exprArgs , expr . synchronous , expr . attributes ( ) ) ;