Program: 31026
Project: 31026
Buggy source:
private void onDirectoryChanged(Path path,WatchEvent.Kind<Path> kind){
  executor.checkOnThread();
  boolean isProject=path.toString().endsWith(PROJECT_FILE_EXTENSION);
  boolean isPledge=path.toString().endsWith(PLEDGE_FILE_EXTENSION);
  boolean isCreate=kind == StandardWatchEventKinds.ENTRY_CREATE || kind == StandardWatchEventKinds.ENTRY_MODIFY;
  boolean isDelete=kind == StandardWatchEventKinds.ENTRY_DELETE || kind == StandardWatchEventKinds.ENTRY_MODIFY;
  if (isProject || isPledge)   log.info("String_Node_Str",path,kind);
  if (isProject && path.getParent().equals(AppDirectory.dir())) {
    if (isDelete) {
      log.info("String_Node_Str",path);
      Project project=projectsByPath.get(path);
      if (project != null) {
        projects.remove(project);
        projectsByPath.remove(path);
synchronized (this) {
          projectsById.remove(project.getID());
        }
      }
      if (kind == StandardWatchEventKinds.ENTRY_MODIFY) {
        log.info("String_Node_Str");
        this.tryLoadProject(path);
      }
    }
    if (isCreate) {
      log.info("String_Node_Str",path);
      this.tryLoadProject(path);
    }
  }
 else   if (isPledge) {
    if (isDelete) {
      LHProtos.Pledge pledge=pledgesByPath.get(path);
      if (pledge != null) {
        log.info("String_Node_Str",path);
synchronized (this) {
          Project project=projectsById.get(pledge.getProjectId());
          ObservableSet<LHProtos.Pledge> projectPledges=this.getPledgesFor(project);
          checkState(projectPledges != null);
          projectPledges.remove(pledge);
        }
        pledgesByPath.remove(path);
      }
 else {
        log.error("String_Node_Str",path);
      }
    }
    if (isCreate) {
      this.tryLoadPledge(path);
    }
  }
}

Fixed version (ground truth):
private void onDirectoryChanged(Path path,WatchEvent.Kind<Path> kind){
  executor.checkOnThread();
  boolean isProject=path.toString().endsWith(PROJECT_FILE_EXTENSION);
  boolean isPledge=path.toString().endsWith(PLEDGE_FILE_EXTENSION);
  boolean isCreate=kind == StandardWatchEventKinds.ENTRY_CREATE || kind == StandardWatchEventKinds.ENTRY_MODIFY;
  boolean isDelete=kind == StandardWatchEventKinds.ENTRY_DELETE || kind == StandardWatchEventKinds.ENTRY_MODIFY;
  if (isProject || isPledge)   log.info("String_Node_Str",path,kind);
  if (isProject && path.getParent().equals(AppDirectory.dir())) {
    if (isDelete) {
      log.info("String_Node_Str",path);
      Project project=projectsByPath.get(path);
      if (project != null) {
        projects.remove(project);
        projectsByPath.remove(path);
synchronized (this) {
          projectsById.remove(project.getID());
        }
      }
      if (kind == StandardWatchEventKinds.ENTRY_MODIFY) {
        log.info("String_Node_Str");
        this.tryLoadProject(path);
      }
    }
    if (isCreate) {
      log.info("String_Node_Str",path);
      this.tryLoadProject(path);
    }
  }
 else   if (isPledge) {
    if (isDelete) {
      LHProtos.Pledge pledge=pledgesByPath.get(path);
      if (pledge != null) {
        log.info("String_Node_Str",path);
synchronized (this) {
          Project project=projectsById.get(pledge.getProjectId());
          ObservableSet<LHProtos.Pledge> projectPledges=this.getPledgesFor(project);
          checkNotNull(projectPledges);
          projectPledges.remove(pledge);
        }
        pledgesByPath.remove(path);
      }
 else {
        log.error("String_Node_Str",path);
      }
    }
    if (isCreate) {
      this.tryLoadPledge(path);
    }
  }
}