Buggy code:
private static final SparseArray < Object > strongInstances = new SparseArray < Object > ( ) ; private static final SparseArray < WeakReference < Object > > weakInstances = new SparseArray < WeakReference < Object > > ( ) ; private static final NativeScriptHashMap < Object , Integer > strongJavaObjectToID = new NativeScriptHashMap < Object , Integer > ( ) ; private static final NativeScriptWeakHashMap < Object , Integer > weakJavaObjectToID = new NativeScriptWeakHashMap < Object , Integer > ( ) ; private static final Runtime runtime = Runtime . getRuntime ( ) ; private static Class < ? > errorActivityClass ; private static final Object keyNotFoundObject = new Object ( ) ; public static final String ApplicationAssetsPath = "app//" ; private static Object [ ] empty = new Object [ 0 ] ; private static String [ ] methodOverrides ; private static int currentObjectId = - 1 ; private static ExtractPolicy extractPolicy ; private static Thread mainThread ; private static long lastUsedMemory = 0 ; private static ArrayList < Constructor < ? > > ctorCache = new ArrayList < Constructor < ? > > ( ) ; public static final String DefaultApplicationModuleName = ".//bootstrap" ; private static JsDebugger jsDebugger ; public static boolean IsLogEnabled = BuildConfig . DEBUG ; private static DexFactory dexFactory ; public static final String DEFAULT_LOG_TAG = "TNS.Java" ; public static Class < ? > getErrorActivityClass ( ) { } public static void setErrorActivityClass ( Class < ? > clazz ) { } public static int init ( Context context ) throws RuntimeException { } static void installSecondaryDexes ( Context context ) { } public static void enableVerboseLogging ( ) { } public static void disableVerboseLogging ( ) { } static void setDefaultUncaughtExceptionHandler ( Thread . UncaughtExceptionHandler handler ) { } static void setExtractPolicy ( ExtractPolicy policy ) { } public static void run ( String appFileName ) { } private static int cacheConstructor ( String name , String className , Object [ ] args , String [ ] methodOverrides ) throws IOException , ClassNotFoundException { } public static Object createInstance ( String name , String className , Object [ ] args , String [ ] methodOverrides , int objectId , int constructorId ) throws IOException , ClassNotFoundException , IllegalAccessException , IllegalArgumentException , InstantiationException , NoSuchMethodException , InvocationTargetException { } private static long getChangeInBytesOfUsedMemory ( ) { } private static void adjustAmountOfExternalAllocatedMemory ( ) { } public static void initInstance ( Object instance ) { } public static void initInstance ( Object instance , Object ... args ) { } private static String [ ] createJSInstance ( Object instance , Object ... args ) { } private static String [ ] getTypeMetadata ( String className , int index ) throws ClassNotFoundException { } private static String [ ] getTypeMetadata ( Class < ? > clazz , int index ) { } private static String getTypeMetadata ( Class < ? > clazz ) { } private static final Comparator < Method > methodComparator ; public static int makeClassInstanceOfTypeStrong ( String classPath ) throws ClassNotFoundException , IllegalAccessException , IllegalArgumentException , InstantiationException , NoSuchMethodException , InvocationTargetException { } private static void makeInstanceStrong ( Object instance , int objectId ) { } private static void makeInstanceWeak ( int javaObjectID , boolean keepAsWeak ) { } private static void makeInstanceWeak ( ByteBuffer buff , int length , boolean keepAsWeak ) { } private static void checkWeakObjectAreAlive ( ByteBuffer input , ByteBuffer output , int length ) { } public static Object getJavaObjectByID ( int javaObjectID ) throws Exception { } private static Integer getJavaObjectID ( Object obj ) { } public static int getorCreateJavaObjectID ( Object obj ) { } public static Object callJSMethod ( Object javaObject , String methodName , Object ... args ) throws NativeScriptException { } public static Object callJSMethodWithDelay ( Object javaObject , String methodName , long delay , Object ... args ) throws NativeScriptException { } public static Object callJSMethod ( Object javaObject , String methodName , boolean isConstructor , Object ... args ) throws NativeScriptException { } public static Object callJSMethod ( Object javaObject , String methodName , boolean isConstructor , long delay , Object ... args ) throws NativeScriptException { } private static Object [ ] packageArgs ( Object ... args ) { } public static void APP_FAIL ( String message ) { } public static String resolveMethodOverload ( String className , String methodName , Object [ ] args ) throws Exception { if ( Platform . IsLogEnabled ) Log . d ( Platform . DEFAULT_LOG_TAG , ( ( ( "resolveMethodOverload:<seq2seq4repair_space>Resolving<seq2seq4repair_space>method<seq2seq4repair_space>" + methodName ) + "<seq2seq4repair_space>on<seq2seq4repair_space>class<seq2seq4repair_space>" ) + className ) ) ; <START_BUG> String res = MethodResolver . resolveMethodOverload ( className , methodName , args ) ; <END_BUG> if ( Platform . IsLogEnabled ) Log . d ( Platform . DEFAULT_LOG_TAG , ( "resolveMethodOverload:<seq2seq4repair_space>method<seq2seq4repair_space>found<seq2seq4repair_space>:" + res ) ) ; if ( res == null ) { throw new Exception ( ( ( ( "Failed<seq2seq4repair_space>resolving<seq2seq4repair_space>method<seq2seq4repair_space>" + methodName ) + "<seq2seq4repair_space>on<seq2seq4repair_space>class<seq2seq4repair_space>" ) + className ) ) ; } return res ; } private static HashMap < String , String > map = null ; private static String readMetadata ( String name ) throws Exception { } public static boolean isJavaThrowable ( Object obj ) { } private static Object [ ] extendConstructorArgs ( String methodName , boolean isConstructor , Object [ ] args ) { } private static Object dispatchCallJSMethodNative ( final int javaObjectID , final String methodName , boolean isConstructor , final Object [ ] args ) throws NativeScriptException { } private static Object dispatchCallJSMethodNative ( final int javaObjectID , final String methodName , boolean isConstructor , long delay , final Object [ ] args ) throws NativeScriptException { } public static Context getApplicationContext ( ) { } private static Class < ? > getCachedClass ( String className ) { } private static Class < ? > findClass ( String className ) throws ClassNotFoundException { } No newline ; at end ; of file ; }

Fix:
String res = MethodResolver . resolveMethodOverload ( Platform . classCache , className , methodName , args ) ;