Here you can find the source of getGlobalContextForValidation()
public static Context getGlobalContextForValidation()
//package com.java2s; /*/*from ww w. ja v a 2 s. c om*/ * Copyright (c) Mirth Corporation. All rights reserved. * * http://www.mirthcorp.com * * The software in this package is published under the terms of the MPL license a copy of which has * been included with this distribution in the LICENSE.txt file. */ import org.mozilla.javascript.Context; public class Main { public static Context getGlobalContextForValidation() { Context context = Context.enter(); context.setOptimizationLevel(-1); return context; } }