#fixed code
                              public void destroy() {
    //kill running threads
    scheduler.shutdownNow();
  }
#vulnerable code 
                              public void destroy() {
    //kill running threads
    executorService.shutdownNow();
  } 
                            #location 3 
                            #vulnerability type THREAD_SAFETY_VIOLATION