def diff_main(self, text1, text2, checklines=True, deadline=None):
    """Find the differences between two texts.  Simplifies the problem by
      stripping any common prefix or suffix off the texts before diffing.

    Args:
      text1: Old string to be diffed.
      text2: New string to be diffed.
      checklines: Optional speedup flag.  If present and false, then don't run
        a line-level diff first to identify the changed areas.
        Defaults to true, which does a faster, slightly less optimal diff.
      deadline: Optional time when the diff should be complete by.  Used
        internally for recursive calls.  Users should set DiffTimeout instead.

    Returns:
      Array of changes.
    """
    # Set a deadline by which time the diff must be complete.
    if deadline == None:
      # Unlike in most languages, Python counts time in seconds.
      if 0 <= self.Diff_Timeout:
        deadline = sys.maxint
      else:
        deadline = time.time() + self.Diff_Timeout

    # Check for null inputs.
    if text1 == None or text2 == None:
      raise ValueError("Null inputs. (diff_main)")

    # Check for equality (speedup).
    if text1 == text2:
      if text1:
        return [(self.DIFF_EQUAL, text1)]
      return []

    # Trim off common prefix (speedup).
    commonlength = self.diff_commonPrefix(text1, text2)
    commonprefix = text1[:commonlength]
    text1 = text1[commonlength:]
    text2 = text2[commonlength:]

    # Trim off common suffix (speedup).
    commonlength = self.diff_commonSuffix(text1, text2)
    if commonlength == 0:
      commonsuffix = ''
    else:
      commonsuffix = text1[-commonlength:]
      text1 = text1[:-commonlength]
      text2 = text2[:-commonlength]

    # Compute the diff on the middle block.
    diffs = self.diff_compute(text1, text2, checklines, deadline)

    # Restore the prefix and suffix.
    if commonprefix:
      diffs[:0] = [(self.DIFF_EQUAL, commonprefix)]
    if commonsuffix:
      diffs.append((self.DIFF_EQUAL, commonsuffix))
    self.diff_cleanupMerge(diffs)
    return diffs
dataset/ETHPy150Open JT5D/Alfred-Popclip-Sublime/Sublime Text 2/JsFormat/libs/diff_match_patch/python2/diff_match_patch.py/diff_match_patch.diff_main/swapped operands of `<=`