Program: 109903
Project: 109903
Buggy source:
public static void analyzeRequest(HttpServletRequest request,HttpServletResponse response) throws IOException, SurveyException {
  String path=request.getPathInfo();
  if (!path.equals("String_Node_Str")) {
    response.sendError(400,"String_Node_Str");
    return;
  }
  String method=request.getMethod();
  SurveyMan.LOGGER.info("String_Node_Str" + method);
switch (method) {
case "String_Node_Str":
    break;
default :
  response.sendError(400,"String_Node_Str");
return;
}
String contentType=request.getContentType();
int semicolon=contentType.indexOf(';');
if (semicolon >= 0) {
contentType=contentType.substring(0,semicolon);
}
Survey survey;
AbstractRule.getDefaultRules();
switch (contentType) {
case "String_Node_Str":
survey=parseJSON(request);
break;
case "String_Node_Str":
survey=parseJSON(request);
break;
case "String_Node_Str":
survey=parseCSV(request);
break;
default :
response.sendError(400,"String_Node_Str");
return;
}
Map<String,String> qp=parseQueryParams(request);
Classifier classifier=Classifier.valueOf(getOrElse(qp,"String_Node_Str",DEFAULT_CLASSIFIER.name()));
int n=Integer.parseInt(getOrElse(qp,"String_Node_Str",Integer.toString(DEFAULT_N)));
double granularity=Double.parseDouble(getOrElse(qp,"String_Node_Str",Double.toString(DEFAULT_GRANULARITY)));
double alpha=Double.parseDouble(getOrElse(qp,"String_Node_Str",Double.toString(DEFAULT_ALPHA)));
StaticAnalysis.Report report=StaticAnalysis.staticAnalysis(survey,classifier,n,granularity,alpha,RandomRespondent.AdversaryType.UNIFORM);
try (OutputStream out=response.getOutputStream()){
report.print(out);
response.setStatus(200);
response.setContentType("String_Node_Str");
}
 }

Fixed version (ground truth):
public static void analyzeRequest(HttpServletRequest request,HttpServletResponse response) throws IOException, SurveyException {
  String path=request.getPathInfo();
  if (!path.equals("String_Node_Str")) {
    response.sendError(400,"String_Node_Str");
    return;
  }
  String method=request.getMethod();
  SurveyMan.LOGGER.info("String_Node_Str" + method);
switch (method) {
case "String_Node_Str":
    break;
case "String_Node_Str":
  response.setStatus(200);
response.setContentType("String_Node_Str");
return;
default :
response.sendError(400,"String_Node_Str");
return;
}
String contentType=request.getContentType();
int semicolon=contentType.indexOf(';');
if (semicolon >= 0) {
contentType=contentType.substring(0,semicolon);
}
Survey survey;
AbstractRule.getDefaultRules();
switch (contentType) {
case "String_Node_Str":
survey=parseJSON(request);
break;
case "String_Node_Str":
survey=parseJSON(request);
break;
case "String_Node_Str":
survey=parseCSV(request);
break;
default :
response.sendError(400,"String_Node_Str");
return;
}
Map<String,String> qp=parseQueryParams(request);
Classifier classifier=Classifier.valueOf(getOrElse(qp,"String_Node_Str",DEFAULT_CLASSIFIER.name()));
int n=Integer.parseInt(getOrElse(qp,"String_Node_Str",Integer.toString(DEFAULT_N)));
double granularity=Double.parseDouble(getOrElse(qp,"String_Node_Str",Double.toString(DEFAULT_GRANULARITY)));
double alpha=Double.parseDouble(getOrElse(qp,"String_Node_Str",Double.toString(DEFAULT_ALPHA)));
StaticAnalysis.Report report=StaticAnalysis.staticAnalysis(survey,classifier,n,granularity,alpha,RandomRespondent.AdversaryType.UNIFORM);
try (OutputStream out=response.getOutputStream()){
report.print(out);
response.setStatus(200);
response.setContentType("String_Node_Str");
}
 }