Program: 161848
Project: 161848
Buggy source:
@SuppressWarnings("String_Node_Str") @Post public String postText(Representation entity) throws IOException, Exception {
  log.info("String_Node_Str");
  Form form=new Form(entity);
  String text=form.getFirstValue("String_Node_Str");
  String type=form.getFirstValue("String_Node_Str");
  if (text == null && type == null) {
    NIFParser nifParser=new NIFParser();
    org.aksw.gerbil.transfer.nif.Document document;
    try {
      document=parser.getDocumentFromNIFString(form.toString().replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str"));
    }
 catch (    Exception e) {
      log.error("String_Node_Str",e);
      return "String_Node_Str";
    }
    log.debug("String_Node_Str" + document.toString());
    document.setMarkings(new ArrayList<Marking>(nifParser.convertNIF(document)));
    log.debug("String_Node_Str" + document.toString());
    String nifDocument=creator.getDocumentAsNIFString(document);
    log.debug(nifDocument);
    return nifDocument;
  }
  log.info("String_Node_Str" + text);
  log.info("String_Node_Str" + type);
  evaluationOptionalParameters(form);
  JSONArray arr=new org.json.simple.JSONArray();
  HashMap<NamedEntityInText,String> results=null;
  HashMap<NamedEntityInText,ArrayList<CandidatesScore>> resultsScore=null;
  if (type.equals("String_Node_Str") || type == null) {
    Document d=textToDocument(text);
    results=results(d,agdistis,type);
    for (    NamedEntityInText namedEntity : results.keySet()) {
      String disambiguatedURL=results.get(namedEntity);
      JSONObject obj=new JSONObject();
      obj.put("String_Node_Str",namedEntity.getLabel());
      obj.put("String_Node_Str",namedEntity.getStartPos());
      obj.put("String_Node_Str",namedEntity.getLength());
      obj.put("String_Node_Str",disambiguatedURL);
      arr.add(obj);
    }
    log.info("String_Node_Str" + arr.toString());
    log.info("String_Node_Str");
    return arr.toString();
  }
 else   if (type.equals("String_Node_Str")) {
    NIFParser nifParser=new NIFParser();
    org.aksw.gerbil.transfer.nif.Document document;
    try {
      document=parser.getDocumentFromNIFString(text);
    }
 catch (    Exception e) {
      log.error("String_Node_Str",e);
      return "String_Node_Str";
    }
    log.debug("String_Node_Str" + document.toString());
    document.setMarkings(new ArrayList<Marking>(nifParser.convertNIF(document)));
    log.debug("String_Node_Str" + document.toString());
    String nifDocument=creator.getDocumentAsNIFString(document);
    return nifDocument;
  }
 else   if (type.equals("String_Node_Str")) {
    Document d=textToDocument(text);
    resultsScore=resultsCandidates(d,agdistis,type);
    for (    NamedEntityInText namedEntity : resultsScore.keySet()) {
      ArrayList<CandidatesScore> candidates=resultsScore.get(namedEntity);
      JSONObject obj=new JSONObject();
      obj.put("String_Node_Str",namedEntity.getLabel());
      obj.put("String_Node_Str",candidates.toString());
      arr.add(obj);
    }
    log.info("String_Node_Str" + arr.toString());
    log.info("String_Node_Str");
    return arr.toString();
  }
 else {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Post public String postText(Representation entity) throws IOException, Exception {
  log.info("String_Node_Str");
  Form form=new Form(entity);
  String text=form.getFirstValue("String_Node_Str");
  String type=form.getFirstValue("String_Node_Str");
  if (text == null && type == null) {
    NIFParser nifParser=new NIFParser();
    org.aksw.gerbil.transfer.nif.Document document;
    try {
      document=parser.getDocumentFromNIFString(form.toString().replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str"));
    }
 catch (    Exception e) {
      log.error("String_Node_Str",e);
      return "String_Node_Str";
    }
    log.debug("String_Node_Str" + document.toString());
    document.setMarkings(new ArrayList<Marking>(nifParser.convertNIF(document)));
    log.debug("String_Node_Str" + document.toString());
    String nifDocument=creator.getDocumentAsNIFString(document);
    log.debug(nifDocument);
    return nifDocument;
  }
  log.info("String_Node_Str" + text);
  log.info("String_Node_Str" + type);
  if (type == null) {
    type="String_Node_Str";
  }
  evaluationOptionalParameters(form);
  JSONArray arr=new org.json.simple.JSONArray();
  HashMap<NamedEntityInText,String> results=null;
  HashMap<NamedEntityInText,ArrayList<CandidatesScore>> resultsScore=null;
  if (type.equals("String_Node_Str")) {
    Document d=textToDocument(text);
    results=results(d,agdistis,type);
    for (    NamedEntityInText namedEntity : results.keySet()) {
      String disambiguatedURL=results.get(namedEntity);
      JSONObject obj=new JSONObject();
      obj.put("String_Node_Str",namedEntity.getLabel());
      obj.put("String_Node_Str",namedEntity.getStartPos());
      obj.put("String_Node_Str",namedEntity.getLength());
      obj.put("String_Node_Str",disambiguatedURL);
      arr.add(obj);
    }
    log.info("String_Node_Str" + arr.toString());
    log.info("String_Node_Str");
    return arr.toString();
  }
 else   if (type.equals("String_Node_Str")) {
    NIFParser nifParser=new NIFParser();
    org.aksw.gerbil.transfer.nif.Document document;
    try {
      document=parser.getDocumentFromNIFString(text);
    }
 catch (    Exception e) {
      log.error("String_Node_Str",e);
      return "String_Node_Str";
    }
    log.debug("String_Node_Str" + document.toString());
    document.setMarkings(new ArrayList<Marking>(nifParser.convertNIF(document)));
    log.debug("String_Node_Str" + document.toString());
    String nifDocument=creator.getDocumentAsNIFString(document);
    return nifDocument;
  }
 else   if (type.equals("String_Node_Str")) {
    Document d=textToDocument(text);
    resultsScore=resultsCandidates(d,agdistis,type);
    for (    NamedEntityInText namedEntity : resultsScore.keySet()) {
      ArrayList<CandidatesScore> candidates=resultsScore.get(namedEntity);
      JSONObject obj=new JSONObject();
      obj.put("String_Node_Str",namedEntity.getLabel());
      obj.put("String_Node_Str",candidates.toString());
      arr.add(obj);
    }
    log.info("String_Node_Str" + arr.toString());
    log.info("String_Node_Str");
    return arr.toString();
  }
 else {
    return "String_Node_Str";
  }
}