Program: 161884
Project: 161884
Buggy source:
public static void main(String[] args) throws IOException {
  String TestFile="String_Node_Str";
  String languageTag="String_Node_Str";
  String dataDirectory="String_Node_Str";
  CorpusXmlReader reader=new CorpusXmlReader(new File(TestFile));
  Corpus corpus=reader.getCorpus();
  NEDAlgo_HITS algo=new NEDAlgo_HITS(corpus.getNumberOfDocuments(),languageTag,dataDirectory,"String_Node_Str");
  for (int maxDepth=1; maxDepth <= 3; ++maxDepth) {
    BufferedWriter bw=new BufferedWriter(new FileWriter("String_Node_Str" + TestFile + "String_Node_Str"+ maxDepth+ "String_Node_Str",true));
    bw.write("String_Node_Str" + TestFile + "String_Node_Str");
    for (double threshholdTrigram=0.9; threshholdTrigram > 0.7; threshholdTrigram-=0.01) {
      double t=0, n=0;
      int documentId=0;
      for (      Document document : corpus) {
        try {
          System.gc();
          log.info("String_Node_Str" + documentId);
          if (0 < document.getProperty(DocumentText.class).getText().length()) {
            algo.run(document,threshholdTrigram,maxDepth);
            NamedEntitiesInText namedEntities=document.getProperty(NamedEntitiesInText.class);
            for (            NamedEntityInText namedEntity : namedEntities) {
              if (namedEntity.getLength() > 2) {
                String correctVotingURL=namedEntity.getNamedEntityUri();
                if (correctVotingURL.startsWith("String_Node_Str"))                 correctVotingURL=correctVotingURL.replace("String_Node_Str","String_Node_Str");
                if (correctVotingURL.startsWith("String_Node_Str"))                 correctVotingURL=correctVotingURL.replace("String_Node_Str","String_Node_Str");
                correctVotingURL=algo.getCu().redirect(correctVotingURL);
                String disambiguatedURL=algo.getCu().redirect(algo.findResult(namedEntity));
                if (correctVotingURL != null) {
                  if (correctVotingURL.equals(disambiguatedURL)) {
                    t++;
                    log.info("String_Node_Str" + correctVotingURL + "String_Node_Str"+ disambiguatedURL);
                  }
 else                   if (languageTag.equals("String_Node_Str")) {
                    if (correctVotingURL.equals("String_Node_Str") || correctVotingURL.startsWith("String_Node_Str") || correctVotingURL.startsWith("String_Node_Str")) {
                      log.info("String_Node_Str" + correctVotingURL + "String_Node_Str"+ disambiguatedURL);
                    }
 else {
                      n++;
                      log.info("String_Node_Str" + correctVotingURL + "String_Node_Str"+ disambiguatedURL);
                    }
                  }
 else                   if (languageTag.equals("String_Node_Str")) {
                    if (correctVotingURL.equals("String_Node_Str") || correctVotingURL.startsWith("String_Node_Str")) {
                      log.info("String_Node_Str" + correctVotingURL + "String_Node_Str"+ disambiguatedURL);
                    }
 else {
                      n++;
                      log.info("String_Node_Str" + correctVotingURL + "String_Node_Str"+ disambiguatedURL);
                    }
                  }
                }
 else                 if (disambiguatedURL == null) {
                  int start=namedEntity.getStartPos();
                  int end=namedEntity.getEndPos();
                  String label=document.getProperty(DocumentText.class).getText().substring(start,end);
                  n++;
                  log.info("String_Node_Str" + label + "String_Node_Str"+ correctVotingURL);
                }
 else {
                  log.info("String_Node_Str" + correctVotingURL + "String_Node_Str"+ disambiguatedURL);
                }
              }
            }
          }
 else {
            log.error("String_Node_Str");
          }
          documentId++;
        }
 catch (        Exception e) {
          log.error("String_Node_Str" + documentId);
          log.error(e.getLocalizedMessage());
        }
      }
      bw.write((t / (t + n)) + "String_Node_Str" + threshholdTrigram+ "String_Node_Str");
      bw.flush();
      log.error("String_Node_Str" + t / (t + n) + "String_Node_Str" + threshholdTrigram);
    }
    bw.close();
  }
  algo.close();
}

Fixed version (ground truth):
public static void main(String[] args) throws IOException {
  String TestFile="String_Node_Str";
  String languageTag="String_Node_Str";
  String dataDirectory="String_Node_Str";
  CorpusXmlReader reader=new CorpusXmlReader(new File(TestFile));
  Corpus corpus=reader.getCorpus();
  NEDAlgo_HITS algo=new NEDAlgo_HITS(corpus.getNumberOfDocuments(),languageTag,dataDirectory,"String_Node_Str");
  for (int maxDepth=1; maxDepth <= 3; ++maxDepth) {
    BufferedWriter bw=new BufferedWriter(new FileWriter("String_Node_Str" + TestFile + "String_Node_Str"+ maxDepth+ "String_Node_Str",true));
    bw.write("String_Node_Str" + TestFile + "String_Node_Str");
    for (double threshholdTrigram=1; threshholdTrigram > 0.7; threshholdTrigram-=0.01) {
      double t=0, n=0;
      int documentId=0;
      for (      Document document : corpus) {
        try {
          System.gc();
          log.info("String_Node_Str" + documentId);
          if (0 < document.getProperty(DocumentText.class).getText().length()) {
            algo.run(document,threshholdTrigram,maxDepth);
            NamedEntitiesInText namedEntities=document.getProperty(NamedEntitiesInText.class);
            for (            NamedEntityInText namedEntity : namedEntities) {
              if (namedEntity.getLength() > 2) {
                String correctVotingURL=namedEntity.getNamedEntityUri();
                if (correctVotingURL.startsWith("String_Node_Str"))                 correctVotingURL=correctVotingURL.replace("String_Node_Str","String_Node_Str");
                if (correctVotingURL.startsWith("String_Node_Str"))                 correctVotingURL=correctVotingURL.replace("String_Node_Str","String_Node_Str");
                correctVotingURL=algo.getCu().redirect(correctVotingURL);
                String disambiguatedURL=algo.getCu().redirect(algo.findResult(namedEntity));
                if (correctVotingURL != null) {
                  if (correctVotingURL.equals(disambiguatedURL)) {
                    t++;
                    log.info("String_Node_Str" + correctVotingURL + "String_Node_Str"+ disambiguatedURL);
                  }
 else                   if (languageTag.equals("String_Node_Str")) {
                    if (correctVotingURL.equals("String_Node_Str") || correctVotingURL.startsWith("String_Node_Str") || correctVotingURL.startsWith("String_Node_Str")) {
                      log.info("String_Node_Str" + correctVotingURL + "String_Node_Str"+ disambiguatedURL);
                    }
 else {
                      n++;
                      log.info("String_Node_Str" + correctVotingURL + "String_Node_Str"+ disambiguatedURL);
                    }
                  }
 else                   if (languageTag.equals("String_Node_Str")) {
                    if (correctVotingURL.equals("String_Node_Str") || correctVotingURL.startsWith("String_Node_Str")) {
                      log.info("String_Node_Str" + correctVotingURL + "String_Node_Str"+ disambiguatedURL);
                    }
 else {
                      n++;
                      log.info("String_Node_Str" + correctVotingURL + "String_Node_Str"+ disambiguatedURL);
                    }
                  }
                }
 else                 if (disambiguatedURL == null) {
                  int start=namedEntity.getStartPos();
                  int end=namedEntity.getEndPos();
                  String label=document.getProperty(DocumentText.class).getText().substring(start,end);
                  n++;
                  log.info("String_Node_Str" + label + "String_Node_Str"+ correctVotingURL);
                }
 else {
                  log.info("String_Node_Str" + correctVotingURL + "String_Node_Str"+ disambiguatedURL);
                }
              }
            }
          }
 else {
            log.error("String_Node_Str");
          }
          documentId++;
        }
 catch (        Exception e) {
          log.error("String_Node_Str" + documentId);
          log.error(e.getLocalizedMessage());
        }
      }
      bw.write((t / (t + n)) + "String_Node_Str" + threshholdTrigram+ "String_Node_Str");
      bw.flush();
      log.error("String_Node_Str" + t / (t + n) + "String_Node_Str" + threshholdTrigram);
    }
    bw.close();
  }
  algo.close();
}