Program: 86737
Project: 86737
Buggy source:
/** 
 * @param dir
 * @throws IOException
 */
public FileSystemAssetWatcher(File dir) throws IOException {
  FileSystem fileSystem=FileSystems.getDefault();
  this.isActive=new AtomicBoolean(false);
  this.watchedAssets=new ConcurrentHashMap<File,WatchedAsset<?>>();
  this.pathToWatch=dir.toPath();
  this.watchService=fileSystem.newWatchService();
  this.watchThread=new Thread(new Runnable(){
    @SuppressWarnings("String_Node_Str") @Override public void run(){
      while (isActive.get()) {
        try {
          WatchKey key=watchService.take();
          if (key.isValid()) {
            List<WatchEvent<?>> events=key.pollEvents();
            for (int i=0; i < events.size(); i++) {
              WatchEvent<?> event=events.get(i);
              WatchEvent.Kind<?> kind=event.kind();
              if (kind == StandardWatchEventKinds.OVERFLOW) {
                continue;
              }
              WatchEvent<Path> ev=(WatchEvent<Path>)event;
              Path filename=ev.context();
              WatchedAsset<?> watchedAsset=watchedAssets.get(new File(pathToWatch.toFile(),filename.toString()));
              if (watchedAsset != null) {
                try {
                  watchedAsset.onAssetChanged();
                }
 catch (                IOException e) {
                  e.printStackTrace();
                }
              }
            }
          }
          key.reset();
        }
 catch (        InterruptedException e) {
          break;
        }
      }
    }
  }
,"String_Node_Str");
  this.watchThread.setDaemon(true);
  this.pathToWatch.register(watchService,StandardWatchEventKinds.ENTRY_MODIFY);
}

Fixed version (ground truth):
/** 
 * @param dir
 * @throws IOException
 */
public FileSystemAssetWatcher(File dir) throws IOException {
  FileSystem fileSystem=FileSystems.getDefault();
  this.isActive=new AtomicBoolean(false);
  this.watchedAssets=new ConcurrentHashMap<File,WatchedAsset<?>>();
  this.pathToWatch=dir.toPath();
  this.watchService=fileSystem.newWatchService();
  this.watchThread=new Thread(new Runnable(){
    @SuppressWarnings("String_Node_Str") @Override public void run(){
      while (isActive.get()) {
        try {
          WatchKey key=watchService.take();
          if (key.isValid()) {
            List<WatchEvent<?>> events=key.pollEvents();
            for (int i=0; i < events.size(); i++) {
              WatchEvent<?> event=events.get(i);
              WatchEvent.Kind<?> kind=event.kind();
              if (kind == StandardWatchEventKinds.OVERFLOW) {
                continue;
              }
              WatchEvent<Path> ev=(WatchEvent<Path>)event;
              Path filename=ev.context();
              WatchedAsset<?> watchedAsset=watchedAssets.get(new File(pathToWatch.toFile(),filename.toString()));
              if (watchedAsset != null) {
                try {
                  watchedAsset.onAssetChanged();
                }
 catch (                IOException e) {
                  e.printStackTrace();
                }
              }
            }
          }
          key.reset();
        }
 catch (        ClosedWatchServiceException e) {
          break;
        }
catch (        InterruptedException e) {
          break;
        }
      }
    }
  }
,"String_Node_Str");
  this.watchThread.setDaemon(true);
  this.pathToWatch.register(watchService,StandardWatchEventKinds.ENTRY_MODIFY);
}