Program: 143366
Project: 143366
Buggy source:
@Override public Object executeInlineScript(String script,JSONObject args,JSONArray appendingArgs){
  String decryptedScript=HTMLTagsConverter.decryptInlineScript(script,args);
  if (appendingArgs != null && decryptedScript.endsWith("String_Node_Str")) {
    ArrayList<Object> javaArguments=new ArrayList<Object>();
    Object argObj=null;
    BrowserConverterContext dataConverterContext=new BrowserConverterContext((WebFormUI)formController.getFormUI(),PushToServerEnum.allow);
    for (int i=0; i < appendingArgs.length(); i++) {
      try {
        argObj=appendingArgs.get(i);
        if (argObj instanceof JSONObject) {
          String typeHint=((JSONObject)argObj).optString("String_Node_Str",null);
          if (typeHint != null) {
            IPropertyType<?> propertyType=TypesRegistry.getType(typeHint);
            if (propertyType instanceof IPropertyConverterForBrowser<?>) {
              javaArguments.add(((IPropertyConverterForBrowser<?>)propertyType).fromJSON(argObj,null,null,dataConverterContext));
              continue;
            }
          }
        }
      }
 catch (      JSONException e) {
        Debug.error(e);
      }
      javaArguments.add(argObj);
    }
    String functionName=decryptedScript.substring(0,decryptedScript.length() - 2);
    int startIdx=functionName.lastIndexOf('.');
    String noPrefixFunctionName=functionName.substring(startIdx > -1 ? startIdx + 1 : 0,functionName.length());
    Scriptable scope=null;
    Function f=null;
    if (functionName.startsWith("String_Node_Str")) {
      FormScope formScope=formController.getFormScope();
      f=formScope.getFunctionByName(noPrefixFunctionName);
      if (f != null && f != Scriptable.NOT_FOUND) {
        scope=formScope;
      }
    }
 else     if (functionName.startsWith("String_Node_Str")) {
      scope=(Scriptable)formController.getFoundSet();
      f=(Function)scope.getPrototype().get(noPrefixFunctionName,scope);
    }
 else {
      ScriptMethod scriptMethod=formController.getApplication().getFlattenedSolution().getScriptMethod(functionName);
      if (scriptMethod != null) {
        scope=formController.getApplication().getScriptEngine().getScopesScope().getGlobalScope(scriptMethod.getScopeName());
      }
      if (scope != null) {
        f=((GlobalScope)scope).getFunctionByName(noPrefixFunctionName);
      }
    }
    try {
      return formController.getApplication().getScriptEngine().executeFunction(f,scope,scope,javaArguments.toArray(),false,false);
    }
 catch (    Exception ex) {
      Debug.error(ex);
      return null;
    }
  }
  return decryptedScript != null ? formController.eval(decryptedScript) : null;
}

Fixed version (ground truth):
@Override public Object executeInlineScript(String script,JSONObject args,JSONArray appendingArgs){
  String decryptedScript=HTMLTagsConverter.decryptInlineScript(script,args);
  if (appendingArgs != null && decryptedScript.endsWith("String_Node_Str")) {
    ArrayList<Object> javaArguments=new ArrayList<Object>();
    Object argObj=null;
    BrowserConverterContext dataConverterContext=new BrowserConverterContext((WebFormUI)formController.getFormUI(),PushToServerEnum.allow);
    for (int i=0; i < appendingArgs.length(); i++) {
      try {
        argObj=appendingArgs.get(i);
        if (argObj instanceof JSONObject) {
          String typeHint=((JSONObject)argObj).optString("String_Node_Str",null);
          if (typeHint != null) {
            IPropertyType<?> propertyType=TypesRegistry.getType(typeHint);
            if (propertyType instanceof IPropertyConverterForBrowser<?>) {
              javaArguments.add(((IPropertyConverterForBrowser<?>)propertyType).fromJSON(argObj,null,null,dataConverterContext,null));
              continue;
            }
          }
        }
      }
 catch (      JSONException e) {
        Debug.error(e);
      }
      javaArguments.add(argObj);
    }
    String functionName=decryptedScript.substring(0,decryptedScript.length() - 2);
    int startIdx=functionName.lastIndexOf('.');
    String noPrefixFunctionName=functionName.substring(startIdx > -1 ? startIdx + 1 : 0,functionName.length());
    Scriptable scope=null;
    Function f=null;
    if (functionName.startsWith("String_Node_Str")) {
      FormScope formScope=formController.getFormScope();
      f=formScope.getFunctionByName(noPrefixFunctionName);
      if (f != null && f != Scriptable.NOT_FOUND) {
        scope=formScope;
      }
    }
 else     if (functionName.startsWith("String_Node_Str")) {
      scope=(Scriptable)formController.getFoundSet();
      f=(Function)scope.getPrototype().get(noPrefixFunctionName,scope);
    }
 else {
      ScriptMethod scriptMethod=formController.getApplication().getFlattenedSolution().getScriptMethod(functionName);
      if (scriptMethod != null) {
        scope=formController.getApplication().getScriptEngine().getScopesScope().getGlobalScope(scriptMethod.getScopeName());
      }
      if (scope != null) {
        f=((GlobalScope)scope).getFunctionByName(noPrefixFunctionName);
      }
    }
    try {
      return formController.getApplication().getScriptEngine().executeFunction(f,scope,scope,javaArguments.toArray(),false,false);
    }
 catch (    Exception ex) {
      Debug.error(ex);
      return null;
    }
  }
  return decryptedScript != null ? formController.eval(decryptedScript) : null;
}