public LinkedList<Diff> diff_fromDelta(String text1, String delta)
      throws IllegalArgumentException {
    LinkedList<Diff> diffs = new LinkedList<Diff>();
    int pointer = 0;  // Cursor in text1
    String[] tokens = delta.split("\t");
    for (String token : tokens) {
      if (token.length() == 0) {
        // Blank tokens are ok (from a trailing \t).
        continue;
      }
      // Each token begins with a one character parameter which specifies the
      // operation of this token (remove, insert, equality).
      String param = token.substring(1);
      switch (token.charAt(0)) {
        case '+':
          // decode would change all "+" to " "
          param = param.replace("+", "%2B");
          try {
            param = URLDecoder.decode(param, "UTF-8");
          } catch (UnsupportedEncodingException e) {
            // Not likely on modern system.
            throw new Error("This system does not support UTF-8.", e);
          } catch (IllegalArgumentException e) {
            // Malformed URI sequence.
            throw new IllegalArgumentException(
                "Illegal escape in diff_fromDelta: " + param, e);
          }
          diffs.add(new Diff(Operation.INSERT, param));
          break;
        case '-':
          // Fall through.
        case '=':
          int n;
          try {
            n = Integer.parseInt(param);
          } catch (NumberFormatException e) {
            throw new IllegalArgumentException(
                "Invalid number in diff_fromDelta: " + param, e);
          }
          if (n < 0) {
            throw new IllegalArgumentException(
                "Negative number in diff_fromDelta: " + param);
          }
          String text;
          try {
            text = text1.substring(pointer, pointer += n);
          } catch (StringIndexOutOfBoundsException e) {
            throw new IllegalArgumentException("Delta length (" + pointer
                + ") larger than source text length (" + text1.length()
                + ").", e);
          }
          if (token.charAt(0) == '=') {
            diffs.add(new Diff(Operation.EQUAL, text));
          } else {
            diffs.add(new Diff(Operation.DELETE, text));
          }
          break;
        default:
          // Anything else is an error.
          throw new IllegalArgumentException(
              "Invalid diff operation in diff_fromDelta: " + token.charAt(0));
      }
    }
    if (pointer != text1.length()) {
      throw new IllegalArgumentException("Delta length (" + pointer
          + ") smaller than source text length (" + text1.length() + ").");
    }
    return diffs;
  }
Given the original text1, and an encoded string which describes the
operations required to transform text1 into text2, compute the full diff.

@param text1 Source string for the diff.
@param delta Delta text.
@return Array of Diff objects or null if invalid.
@throws IllegalArgumentException If invalid input.
src/burp/Utils/diff_match_patch.java