code: private static int compare(StackTraceElement[] exceptionCallStack) {
          // Weed out the very easy cases
          if (exceptionCallStack == null || exceptionCallStack.length == 0)
              return -1;
  
          StackTraceElement[] currentCallStack = Thread.currentThread().getStackTrace();
  
          // Handle the cases where the JIT has destroyed all the relevant
          // information
          if (currentCallStack == null || currentCallStack.length == 0)
              return -1;
  
          int proposedExceptionIndex = exceptionCallStack.length - 1;
          int proposedCurrentIndex = currentCallStack.length - 1;
  
          while ((proposedExceptionIndex >= 0) && (proposedCurrentIndex >= 0) && (exceptionCallStack[proposedExceptionIndex] != null)
                 && (exceptionCallStack[proposedExceptionIndex].getClassName().equals(currentCallStack[proposedCurrentIndex].getClassName()))) {
              proposedExceptionIndex--;
              proposedCurrentIndex--;
          }
  
          proposedExceptionIndex++;
  
          if (proposedExceptionIndex > exceptionCallStack.length)
              return -1; // No common point - can't ever be true? mkv
          else
              return proposedExceptionIndex;
      }
docs: Return the index in a StackTraceElement[] in exceptionCallStack that is
  the first common point with the current point of execution (i.e. elements
  with this index or higher are common with the current point of execution)
  
  @param exceptionCallStack
  The call stack to be examined
  @return The index of the first common call point (-1 if there is NO
  common point)