#vulnerable code 
                              public void addTask(GetTask task) {
    synchronized (getTasks) {
      task.startNanoTime = System.nanoTime();
      getTasks.addLast(task);
    }
    dispatcherThread.interrupt();
  } 
                            #location 6 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                              public void addTask(GetTask task) {
    try {
      // TODO: remove trace
      //LOG.trace("Adding task with state " + task.state);
      if (task.startNanoTime == null) {
        task.startNanoTime = System.nanoTime();
      }
      getTasks.put(task);
      //LOG.trace("Get Task is now " + getTasks.size());
    } catch (InterruptedException e) {
      // Someone is trying to stop Dispatcher
    }
  }