public int runDx(Arguments arguments) throws IOException {

    // Reset the error count to start fresh.
    errors.set(0);
    // empty the list, so that  tools that load dx and keep it around
    // for multiple runs don't reuse older buffers.
    libraryDexBuffers.clear();

    args = arguments;
    args.makeOptionsObjects();

    OutputStream humanOutRaw = null;
    if (args.humanOutName != null) {
      humanOutRaw = openOutput(args.humanOutName);
      humanOutWriter = new OutputStreamWriter(humanOutRaw);
    }

    try {
      if (args.multiDex) {
        return runMultiDex();
      } else {
        return runMonoDex();
      }
    } finally {
      closeOutput(humanOutRaw);
    }
  }
Returns the "fixed" version of a given file path, suitable for use as a path within a {@code
.jar} file and for checking against a classfile-internal "this class" name. This looks for the
last instance of the substring {@code "/./"} within the path, and if it finds it, it takes the
portion after to be the fixed path. If that isn't found but the path starts with {@code "./"},
then that prefix is removed and the rest is return. If neither of these is the case, this
method returns its argument.

@param path {@code non-null;} the path to "fix"
@return {@code non-null;} the fixed version (which might be the same as the given {@code path})
android/android_framework/dex-maker/src/main/java/com/android/dx/command/dexer/Main.java