add a getCode() method in ScriptBuilder