Program: 11267
Project: 11267
Buggy source:
public Backend(){
  locations=new HashMap<>();
  executorPool=new ExecutorPool();
  contentExtractor=new ContentExtractor();
  progressMonitor=new ProgressMonitor(new ProgressListener(){
    public void newFileFound(    String aFilename,    long aNumNewFiles,    long aNumIndexedFiles){
      if (progressListener != null) {
        progressListener.newFileFound(aFilename,aNumNewFiles,aNumIndexedFiles);
      }
    }
    public void indexingProgress(    long aNumNewFiles,    long aNumIndexedFiles){
      if (progressListener != null) {
        progressListener.indexingProgress(aNumNewFiles,aNumIndexedFiles);
      }
    }
    public void crawlingFinished(){
      if (progressListener != null) {
        progressListener.crawlingFinished();
      }
    }
  }
);
  directoryListener=new DirectoryListener(){
    @Override public void fileDeleted(    FilesystemLocation aFileSystemLocation,    Path aFile){
      try {
        luceneIndexHandler.removeFromIndex(aFile.toString());
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
    @Override public void fileCreatedOrModified(    FilesystemLocation aFileSystemLocation,    Path aFile){
      String theFileName=aFile.toString();
      if (contentExtractor.supportsFile(theFileName)) {
        try {
          progressMonitor.addNewFileFound(theFileName);
          BasicFileAttributes theAttributes=Files.readAttributes(aFile,BasicFileAttributes.class);
          UpdateCheckResult theUpdateCheckResult=luceneIndexHandler.checkIfModified(theFileName,theAttributes.size());
          if (theUpdateCheckResult == UpdateCheckResult.UPDATED) {
            Content theContent=contentExtractor.extractContentFrom(aFile,theAttributes);
            if (theContent != null) {
              luceneIndexHandler.addToIndex(aFileSystemLocation.getId(),theContent);
              progressMonitor.addFilesIndexed();
            }
          }
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
    }
  }
;
}

Fixed version (ground truth):
public Backend(Notifier aNotifier){
  notifier=aNotifier;
  locations=new HashMap<>();
  executorPool=new ExecutorPool();
  contentExtractor=new ContentExtractor();
  progressMonitor=new ProgressMonitor(new ProgressListener(){
    public void newFileFound(    String aFilename,    long aNumNewFiles,    long aNumIndexedFiles){
      if (progressListener != null) {
        progressListener.newFileFound(aFilename,aNumNewFiles,aNumIndexedFiles);
      }
    }
    public void indexingProgress(    long aNumNewFiles,    long aNumIndexedFiles){
      if (progressListener != null) {
        progressListener.indexingProgress(aNumNewFiles,aNumIndexedFiles);
      }
    }
    public void crawlingFinished(){
      if (progressListener != null) {
        progressListener.crawlingFinished();
      }
    }
  }
);
  directoryListener=new DirectoryListener(){
    @Override public void fileDeleted(    FilesystemLocation aFileSystemLocation,    Path aFile){
      try {
        luceneIndexHandler.removeFromIndex(aFile.toString());
        aNotifier.showInformation("String_Node_Str" + aFile);
      }
 catch (      Exception e) {
        aNotifier.showError("String_Node_Str" + aFile,e);
      }
    }
    @Override public void fileCreatedOrModified(    FilesystemLocation aFileSystemLocation,    Path aFile){
      String theFileName=aFile.toString();
      if (contentExtractor.supportsFile(theFileName)) {
        try {
          progressMonitor.addNewFileFound(theFileName);
          BasicFileAttributes theAttributes=Files.readAttributes(aFile,BasicFileAttributes.class);
          UpdateCheckResult theUpdateCheckResult=luceneIndexHandler.checkIfModified(theFileName,theAttributes.size());
          if (theUpdateCheckResult == UpdateCheckResult.UPDATED) {
            notifier.showInformation("String_Node_Str" + aFile);
            Content theContent=contentExtractor.extractContentFrom(aFile,theAttributes);
            if (theContent != null) {
              luceneIndexHandler.addToIndex(aFileSystemLocation.getId(),theContent);
              progressMonitor.addFilesIndexed();
            }
          }
        }
 catch (        Exception e) {
          aNotifier.showError("String_Node_Str" + aFile,e);
        }
      }
    }
    @Override public void newWatchablePathDetected(    Path aDirectory){
      aNotifier.showInformation("String_Node_Str" + aDirectory);
    }
  }
;
}