public boolean is_terminal(MethodOrMethodContext mc){
  Stack<SootMethod> sys_stack=new Stack<SootMethod>();
  boolean result;
  if (!is_system(mc.method()))   result=false;
 else {
    if (!process_callbacks)     result=true;
 else {
      if ((stack.size() > 0) && is_system(stack.peek()))       result=!calls_app_method(mc,sys_stack);
 else {
        if (can_have_callbacks(mc.method()))         result=!calls_app_method(mc,sys_stack);
 else         result=true;
      }
    }
  }
  logger.info("  {} terminal = {}",mc.method(),result);
  return result;
}

public boolean is_terminal ( MethodOrMethodContext mc ) { Stack < SootMethod > sys_stack = new Stack < SootMethod > ( ) ; boolean result ; if ( ! is_system ( mc . method ( ) ) ) result = false ; else { if ( ! process_callbacks ) result = true ; else { if ( ( stack . size ( ) > 0 ) && is_system ( stack . peek ( ) ) ) result = ! calls_app_method ( mc , sys_stack ) ; else { if ( can_have_callbacks ( mc . method ( ) ) ) result = ! calls_app_method ( mc , sys_stack ) ; else result = true ; } } } logger . info ( "  {} terminal = {}" , mc . method ( ) , result ) ; return result ; }
returns true if the specified method should terminate the call graph the call graph is terminated on system calls that do not have callbacks into application code .
