Program: 49830
Project: 49830
Buggy source:
@POST @Produces("String_Node_Str") public Response getJson(@QueryParam("String_Node_Str") String subject,@QueryParam("String_Node_Str") List<String> slabels,@QueryParam("String_Node_Str") List<String> sAltLabels,@QueryParam("String_Node_Str") String object,@QueryParam("String_Node_Str") List<String> olabels,@QueryParam("String_Node_Str") List<String> oAltLabels,@QueryParam("String_Node_Str") String property,@QueryParam("String_Node_Str") String from,@QueryParam("String_Node_Str") String to,@QueryParam("String_Node_Str") List<String> languages){
  DefactoServer.log.log(Level.INFO,"String_Node_Str" + subject + "String_Node_Str"+ property+ "String_Node_Str"+ object+ "String_Node_Str");
  if (olabels != null && slabels != null)   DefactoServer.log.log(Level.INFO,"String_Node_Str" + slabels + "String_Node_Str"+ property+ "String_Node_Str"+ olabels+ "String_Node_Str");
  try {
    org.apache.log4j.PropertyConfigurator.configure("String_Node_Str");
    Defacto.init();
    Model model=ModelFactory.createDefaultModel();
    Resource subj=model.createResource(subject);
    for (    String labelToLang : slabels) {
      String label=labelToLang.substring(0,labelToLang.length() - 3);
      String lang=labelToLang.substring(labelToLang.length() - 2);
      subj.addProperty(RDFS.label,label,lang);
    }
    for (    String altLabel : sAltLabels) {
      String label=altLabel.substring(0,altLabel.length() - 3);
      String lang=altLabel.substring(altLabel.length() - 2);
      subj.addProperty(Constants.SKOS_ALT_LABEL,label,lang);
    }
    Resource obj=model.createResource(object);
    for (    String labelToLang : olabels) {
      String label=labelToLang.substring(0,labelToLang.length() - 3);
      String lang=labelToLang.substring(labelToLang.length() - 2);
      obj.addProperty(RDFS.label,label,lang);
    }
    for (    String altLabel : oAltLabels) {
      String label=altLabel.substring(0,altLabel.length() - 3);
      String lang=altLabel.substring(altLabel.length() - 2);
      obj.addProperty(Constants.SKOS_ALT_LABEL,label,lang);
    }
    Resource bnode=model.createResource("String_Node_Str");
    subj.addProperty(ResourceFactory.createProperty("String_Node_Str"),bnode);
    bnode.addProperty(model.createProperty(property),obj);
    bnode.addProperty(Constants.DEFACTO_FROM,from == null ? "String_Node_Str" : from);
    bnode.addProperty(Constants.DEFACTO_TO,to == null ? "String_Node_Str" : to);
    Evidence ev=Defacto.checkFact(new DefactoModel(model,subject + "String_Node_Str" + property+ "String_Node_Str"+ object,true,languages),Defacto.TIME_DISTRIBUTION_ONLY.YES);
    JSONObject result=new JSONObject();
    result.put("String_Node_Str",subject);
    result.put("String_Node_Str",StringUtils.join(slabels,"String_Node_Str"));
    result.put("String_Node_Str",subject);
    result.put("String_Node_Str",subject);
    result.put("String_Node_Str",StringUtils.join(olabels,"String_Node_Str"));
    result.put("String_Node_Str",from == null ? "String_Node_Str" : from);
    result.put("String_Node_Str",to == null ? "String_Node_Str" : to);
    buildYearOccurrences(result,ev);
    return Response.ok(result.toString()).header("String_Node_Str","String_Node_Str").build();
  }
 catch (  Exception e) {
    DefactoServer.log.log(Level.WARNING,"String_Node_Str" + subject + "String_Node_Str"+ property+ "String_Node_Str"+ object+ "String_Node_Str");
    DefactoServer.log.log(Level.WARNING,e.getMessage());
    e.printStackTrace();
  }
  return Response.serverError().build();
}

Fixed version (ground truth):
@POST @Produces("String_Node_Str") public Response getJson(@QueryParam("String_Node_Str") String subject,@QueryParam("String_Node_Str") List<String> slabels,@QueryParam("String_Node_Str") List<String> sAltLabels,@QueryParam("String_Node_Str") String object,@QueryParam("String_Node_Str") List<String> olabels,@QueryParam("String_Node_Str") List<String> oAltLabels,@QueryParam("String_Node_Str") String property,@QueryParam("String_Node_Str") String from,@QueryParam("String_Node_Str") String to,@QueryParam("String_Node_Str") List<String> languages){
  DefactoServer.log.log(Level.INFO,"String_Node_Str" + subject + "String_Node_Str"+ property+ "String_Node_Str"+ object+ "String_Node_Str");
  if (olabels != null && slabels != null)   DefactoServer.log.log(Level.INFO,"String_Node_Str" + slabels + "String_Node_Str"+ property+ "String_Node_Str"+ olabels+ "String_Node_Str");
  try {
    org.apache.log4j.PropertyConfigurator.configure("String_Node_Str");
    Defacto.init();
    Model model=ModelFactory.createDefaultModel();
    Resource subj=model.createResource(subject);
    for (    String labelToLang : slabels) {
      String label=labelToLang.substring(0,labelToLang.length() - 3);
      String lang=labelToLang.substring(labelToLang.length() - 2);
      subj.addProperty(RDFS.label,label,lang);
    }
    for (    String altLabel : sAltLabels) {
      String label=altLabel.substring(0,altLabel.length() - 3);
      String lang=altLabel.substring(altLabel.length() - 2);
      subj.addProperty(Constants.SKOS_ALT_LABEL,label,lang);
    }
    Resource obj=model.createResource(object);
    for (    String labelToLang : olabels) {
      String label=labelToLang.substring(0,labelToLang.length() - 3);
      String lang=labelToLang.substring(labelToLang.length() - 2);
      obj.addProperty(RDFS.label,label,lang);
    }
    for (    String altLabel : oAltLabels) {
      String label=altLabel.substring(0,altLabel.length() - 3);
      String lang=altLabel.substring(altLabel.length() - 2);
      obj.addProperty(Constants.SKOS_ALT_LABEL,label,lang);
    }
    Resource bnode=model.createResource("String_Node_Str");
    subj.addProperty(ResourceFactory.createProperty("String_Node_Str"),bnode);
    bnode.addProperty(model.createProperty(property),obj);
    bnode.addProperty(Constants.DEFACTO_FROM,from == null ? "String_Node_Str" : from);
    bnode.addProperty(Constants.DEFACTO_TO,to == null ? "String_Node_Str" : to);
    Evidence ev=Defacto.checkFact(new DefactoModel(model,subject + "String_Node_Str" + property+ "String_Node_Str"+ object,true,languages),Defacto.TIME_DISTRIBUTION_ONLY.YES);
    JSONObject result=new JSONObject();
    result.put("String_Node_Str",subject);
    result.put("String_Node_Str",StringUtils.join(slabels,"String_Node_Str"));
    result.put("String_Node_Str",property);
    result.put("String_Node_Str",object);
    result.put("String_Node_Str",StringUtils.join(olabels,"String_Node_Str"));
    result.put("String_Node_Str",from == null ? "String_Node_Str" : from);
    result.put("String_Node_Str",to == null ? "String_Node_Str" : to);
    buildYearOccurrences(result,ev);
    return Response.ok(result.toString()).header("String_Node_Str","String_Node_Str").build();
  }
 catch (  Exception e) {
    DefactoServer.log.log(Level.WARNING,"String_Node_Str" + subject + "String_Node_Str"+ property+ "String_Node_Str"+ object+ "String_Node_Str");
    DefactoServer.log.log(Level.WARNING,e.getMessage());
    e.printStackTrace();
  }
  return Response.serverError().build();
}