bugs fixed at JavaScriptSampleGenerator.java