willow-utils/src/main/java/com/btr/proxy/selector/pac/JavaxPacScriptParser.java
private String buildFunctionCallCode(String functionName, int args) {
    StringBuilder functionCall = new StringBuilder();
    functionCall.append(SCRIPT_METHODS_OBJECT).append(".").append(functionName)
    .append("(");
    for (int i = 0; i < args; i++) {
      if (i > 0) {
        functionCall.append(",");
      }
      functionCall.append("arg").append(i);
    }
    functionCall.append(")");
    return functionCall.toString();
  }
private String buildFunctionCallCode(String functionName, int args) {
    StringBuilder functionCall = new StringBuilder();
    functionCall.append(SCRIPT_METHODS_OBJECT).append(".").append(functionName)
    .append("(");
    for (int i = 0; i < args; i++) {
      if (i > 0) {
        functionCall.append(",");
      }
      functionCall.append("arg").append(i);
    }
    functionCall.append(")");
    return functionCall.toString();
  }
***********************************************************************
Builds a JavaScript code snippet to call a function that we bind.

@param functionName
of the bound function
@param args
of the bound function
@return the JS code to invoke the method.
**********************************************************************