private static int system_depth(Stack<SootMethod> stack){
  for (int ii=stack.size() - 1; ii > 0; ii--) {
    SootMethod m=stack.get(ii);
    if (!is_system(m))     return stack.size() - ii;
  }
  return stack.size();
}

private static int system_depth ( Stack < SootMethod > stack ) { for ( int ii = stack . size ( ) - 1 ; ii > 0 ; ii -- ) { SootMethod m = stack . get ( ii ) ; if ( ! is_system ( m ) ) return stack . size ( ) - ii ; } return stack . size ( ) ; }
returns the number of calls back to the last non - system call
