function indexer in JSInterpreter.java, more blocks with license comments added