Buggy code:
public final class TypePropagation { private final ModuleLoader loader ; private final Resolver resolver ; private ArrayList < TypePropagation . Scope > scopes = new ArrayList < TypePropagation . Scope > ( ) ; private String filename ; private FunctionOrMethodOrMessage current ; public TypePropagation ( ModuleLoader loader , Resolver resolver ) { } public void propagate ( WhileyFile wf ) { } public void propagate ( Constant cd , WhileyFile wf , ArrayList < WhileyFile . Import > imports ) throws ResolveError { } public void propagate ( TypeDef td , ArrayList < WhileyFile . Import > imports ) throws ResolveError { } public void propagate ( FunctionOrMethodOrMessage d , ArrayList < WhileyFile . Import > imports ) throws ResolveError { } private RefCountedHashMap < String , Nominal > propagate ( ArrayList < Stmt > body , RefCountedHashMap < String , Nominal > environment , ArrayList < WhileyFile . Import > imports ) { } private RefCountedHashMap < String , Nominal > propagate ( Stmt stmt , RefCountedHashMap < String , Nominal > environment , ArrayList < WhileyFile . Import > imports ) { } private RefCountedHashMap < String , Nominal > propagate ( Stmt . Assert stmt , RefCountedHashMap < String , Nominal > environment , ArrayList < WhileyFile . Import > imports ) { } private RefCountedHashMap < String , Nominal > propagate ( Stmt . Assign stmt , RefCountedHashMap < String , Nominal > environment , ArrayList < WhileyFile . Import > imports ) throws ResolveError { } private AssignedVariable inferAfterType ( Expr . LVal lv , Nominal afterType ) { if ( lv instanceof Expr . AssignedVariable ) { Expr . AssignedVariable v = ( ( Expr . AssignedVariable ) ( lv ) ) ; v . afterType = afterType ; return v ; } else if ( lv instanceof Expr . Dereference ) { Expr . Dereference pa = ( ( Expr . Dereference ) ( lv ) ) ; checkIsSubtype ( pa . srcType , Nominal . Reference ( afterType ) , lv ) ; return inferAfterType ( ( ( Expr . LVal ) ( pa . src ) ) , pa . srcType ) ; } else if ( lv instanceof Expr . StringAccess ) { Expr . StringAccess la = ( ( Expr . StringAccess ) ( lv ) ) ; checkIsSubtype ( T_CHAR , afterType , lv ) ; return inferAfterType ( ( ( Expr . LVal ) ( la . src ) ) , T_STRING ) ; } else if ( lv instanceof Expr . ListAccess ) { Expr . ListAccess la = ( ( Expr . ListAccess ) ( lv ) ) ; Nominal . EffectiveList srcType = la . srcType ; afterType = ( ( Nominal ) ( srcType . update ( afterType ) ) ) ; return inferAfterType ( ( ( Expr . LVal ) ( la . src ) ) , afterType ) ; } else if ( lv instanceof Expr . DictionaryAccess ) { Expr . DictionaryAccess da = ( ( Expr . DictionaryAccess ) ( lv ) ) ; Nominal . EffectiveDictionary srcType = da . srcType ; <START_BUG> afterType = ( ( Nominal ) ( srcType . update ( srcType . key ( ) , afterType ) ) ) ; <END_BUG> return inferAfterType ( ( ( Expr . LVal ) ( da . src ) ) , afterType ) ; } else if ( lv instanceof Expr . RecordAccess ) { Expr . RecordAccess la = ( ( Expr . RecordAccess ) ( lv ) ) ; Nominal . EffectiveRecord srcType = la . srcType ; afterType = ( ( Nominal ) ( srcType . update ( la . name , afterType ) ) ) ; return inferAfterType ( ( ( Expr . LVal ) ( la . src ) ) , afterType ) ; } else { internalFailure ( ( "unknown<seq2seq4repair_space>lval:<seq2seq4repair_space>" + ( lv . getClass ( ) . getName ( ) ) ) , filename , lv ) ; return null ; } } private RefCountedHashMap < String , Nominal > propagate ( Stmt . Break stmt , RefCountedHashMap < String , Nominal > environment , ArrayList < WhileyFile . Import > imports ) { } private RefCountedHashMap < String , Nominal > propagate ( Stmt . Debug stmt , RefCountedHashMap < String , Nominal > environment , ArrayList < WhileyFile . Import > imports ) { } private RefCountedHashMap < String , Nominal > propagate ( Stmt . DoWhile stmt , RefCountedHashMap < String , Nominal > environment , ArrayList < WhileyFile . Import > imports ) { } private RefCountedHashMap < String , Nominal > propagate ( Stmt . ForAll stmt , RefCountedHashMap < String , Nominal > environment , ArrayList < WhileyFile . Import > imports ) throws ResolveError { } private RefCountedHashMap < String , Nominal > propagate ( Stmt . IfElse stmt , RefCountedHashMap < String , Nominal > environment , ArrayList < WhileyFile . Import > imports ) { } private RefCountedHashMap < String , Nominal > propagate ( Stmt . Return stmt , RefCountedHashMap < String , Nominal > environment , ArrayList < WhileyFile . Import > imports ) throws ResolveError { } private RefCountedHashMap < String , Nominal > propagate ( Stmt . Skip stmt , RefCountedHashMap < String , Nominal > environment , ArrayList < WhileyFile . Import > imports ) { } private RefCountedHashMap < String , Nominal > propagate ( Stmt . Switch stmt , RefCountedHashMap < String , Nominal > environment , ArrayList < WhileyFile . Import > imports ) throws ResolveError { } private RefCountedHashMap < String , Nominal > propagate ( Stmt . Throw stmt , RefCountedHashMap < String , Nominal > environment , ArrayList < WhileyFile . Import > imports ) { }

Fix:
afterType = ( ( Nominal ) ( srcType . update ( da . index . result ( ) , afterType ) ) ) ;