Buggy code:
public class ClassFileBuilder { protected int CLASS_VERSION = 49 ; protected int WHILEY_MINOR_VERSION ; protected int WHILEY_MAJOR_VERSION ; protected ModuleLoader loader ; protected String filename ; protected Clazz owner ; public ClassFileBuilder ( ModuleLoader loader , int whileyMajorVersion , int whileyMinorVersion ) { } public ClassFile build ( Module module ) { } public void buildConstants ( HashMap < ClassFileBuilder . Constant , Integer > constants , ClassFile cf ) { } public void buildCoercions ( HashMap < ClassFileBuilder . Constant , Integer > constants , ClassFile cf ) { } public void buildValues ( HashMap < ClassFileBuilder . Constant , Integer > constants , ClassFile cf ) { } public Method buildMainLauncher ( JvmType . Clazz owner ) { ArrayList < Modifier > modifiers = new ArrayList < Modifier > ( ) ; modifiers . add ( ACC_PUBLIC ) ; modifiers . add ( ACC_STATIC ) ; modifiers . add ( ACC_SYNTHETIC ) ; JvmType . Function ft1 = new JvmType . Function ( T_VOID , new JvmType . Array ( JAVA_LANG_STRING ) ) ; ClassFile . Method cm = new ClassFile . Method ( "main" , ft1 , modifiers ) ; JvmType . Array strArr = new JvmType . Array ( JAVA_LANG_STRING ) ; ArrayList < Bytecode > codes = new ArrayList < Bytecode > ( ) ; ft1 = new JvmType . Function ( ClassFileBuilder . WHILEYPROCESS ) ; codes . add ( new Bytecode . Invoke ( ClassFileBuilder . WHILEYPROCESS , "systemProcess" , ft1 , Bytecode . STATIC ) ) ; codes . add ( new Bytecode . Load ( 0 , strArr ) ) ; JvmType . Function ft2 = new JvmType . Function ( ClassFileBuilder . WHILEYLIST , new JvmType . Array ( JAVA_LANG_STRING ) ) ; codes . add ( new Bytecode . Invoke ( ClassFileBuilder . WHILEYUTIL , "fromStringList" , ft2 , Bytecode . STATIC ) ) ; <START_BUG> Type . Function wyft = ( ( Type . Function ) ( Type . Method ( null , T_VOID , ClassFileBuilder . WHILEY_SYSTEM_T , Type . List ( T_STRING ) ) ) ) ; <END_BUG> JvmType . Function ft3 = convertFunType ( wyft ) ; codes . add ( new Bytecode . Invoke ( owner , ClassFileBuilder . nameMangle ( "main" , wyft ) , ft3 , Bytecode . STATIC ) ) ; ft3 = new JvmType . Function ( T_VOID ) ; codes . add ( new Bytecode . Invoke ( ClassFileBuilder . WHILEYIO , "flush" , ft3 , Bytecode . STATIC ) ) ; codes . add ( new Bytecode . Return ( null ) ) ; Code code = new Code ( codes , new ArrayList ( ) , cm ) ; cm . attributes ( ) . add ( code ) ; return cm ; } public List < ClassFile . Method > build ( Module . Method method , HashMap < ClassFileBuilder . Constant , Integer > constants ) { } public Method build ( int caseNum , Module . Case mcase , Module . Method method , HashMap < ClassFileBuilder . Constant , Integer > constants ) { } public ArrayList < Bytecode > translate ( Module . Case mcase , HashMap < ClassFileBuilder . Constant , Integer > constants , ArrayList < Handler > handlers , ArrayList < LineNumberTable . Entry > lineNumbers ) { } public void translate ( Block . Block blk , int freeSlot , HashMap < ClassFileBuilder . Constant , Integer > constants , ArrayList < Handler > handlers , ArrayList < LineNumberTable . Entry > lineNumbers , ArrayList < Bytecode > bytecodes ) { } public int translate ( Entry entry , int freeSlot , HashMap < ClassFileBuilder . Constant , Integer > constants , ArrayList < ClassFileBuilder . UnresolvedHandler > handlers , ArrayList < Bytecode > bytecodes ) { } public void translate ( wyil . lang . Code . Const c , int freeSlot , HashMap < ClassFileBuilder . Constant , Integer > constants , ArrayList < Bytecode > bytecodes ) { } public void translate ( wyil . lang . Code . Convert c , int freeSlot , HashMap < ClassFileBuilder . Constant , Integer > constants , ArrayList < Bytecode > bytecodes ) { } public void translate ( wyil . lang . Code . Store c , int freeSlot , ArrayList < Bytecode > bytecodes ) { } public void translate ( wyil . lang . Code . Update code , int freeSlot , ArrayList < Bytecode > bytecodes ) { } public void multiStoreHelper ( Type type , int level , Iterator < String > fields , int indexSlot , JvmType val_t , int freeSlot , ArrayList < Bytecode > bytecodes ) { } public void translate ( wyil . lang . Code . Return c , int freeSlot , ArrayList < Bytecode > bytecodes ) { } public void translate ( wyil . lang . Code . Throw c , int freeSlot , ArrayList < Bytecode > bytecodes ) { } public void translate ( wyil . lang . Code . Switch c , Block . Block . Entry entry , int freeSlot , ArrayList < Bytecode > bytecodes ) { } public void translate ( wyil . lang . Code . TryCatch c , Block . Block . Entry entry , int freeSlot , ArrayList < ClassFileBuilder . UnresolvedHandler > handlers , HashMap < ClassFileBuilder . Constant , Integer > constants , ArrayList < Bytecode > bytecodes ) { } public void translate ( wyil . lang . Code . IfGoto c , Entry stmt , int freeSlot , ArrayList < Bytecode > bytecodes ) { } public void translate ( wyil . lang . Code . IfType c , Entry stmt , int freeSlot , HashMap < ClassFileBuilder . Constant , Integer > constants , ArrayList < Bytecode > bytecodes ) { }

Fix:
Type . Function wyft = ( ( Type . Function ) ( Type . Method ( null , T_VOID , T_VOID , ClassFileBuilder . WHILEY_SYSTEM_T , Type . List ( T_STRING ) ) ) ) ;