Program: 7311
Project: 7311
Buggy source:
/** 
 * Returns the status for all programs that are passed into the data. The data is an array of Json objects where each object must contain the following three elements: appId, programType, and programId (flow name, service name, etc.). <p/> Example input: [{"appId": "App1", "programType": "Service", "programId": "Service1"}, {"appId": "App1", "programType": "Procedure", "programId": "Proc2"}, {"appId": "App2", "programType": "Flow", "programId": "Flow1"}] <p/> The response will be an array of JsonObjects each of which will contain the three input parameters as well as 2 fields, "status" which maps to the status of the program and "statusCode" which maps to the status code for the data in that JsonObjects. If an error occurs in the input (i.e. in the example above, App2 does not exist), then all JsonObjects for which the parameters have a valid status will have the status field but all JsonObjects for which the parameters do not have a valid status will have an error message and statusCode. <p/> For example, if there is no App2 in the data above, then the response would be 200 OK with following possible data: [{"appId": "App1", "programType": "Service", "programId": "Service1", "statusCode": 200, "status": "RUNNING"}, {"appId": "App1", "programType": "Procedure", "programId": "Proc2"}, "statusCode": 200, "status": "STOPPED"}, {"appId":"App2", "programType":"Flow", "programId":"Flow1", "statusCode":404, "error": "App: App2 not found"}]
 * @param request
 * @param responder
 */
@POST @Path("String_Node_Str") public void getStatuses(HttpRequest request,HttpResponder responder){
  programLifecycleHttpHandler.getStatuses(rewriteRequest(request),responder,Constants.DEFAULT_NAMESPACE);
}

Fixed version (ground truth):
/** 
 * Returns the status for all programs that are passed into the data. The data is an array of Json objects where each object must contain the following three elements: appId, programType, and programId (flow name, service name, etc.). <p/> Example input: [{"appId": "App1", "programType": "Service", "programId": "Service1"}, {"appId": "App1", "programType": "Procedure", "programId": "Proc2"}, {"appId": "App2", "programType": "Flow", "programId": "Flow1"}] <p/> The response will be an array of JsonObjects each of which will contain the three input parameters as well as 2 fields, "status" which maps to the status of the program and "statusCode" which maps to the status code for the data in that JsonObjects. If an error occurs in the input (i.e. in the example above, App2 does not exist), then all JsonObjects for which the parameters have a valid status will have the status field but all JsonObjects for which the parameters do not have a valid status will have an error message and statusCode. <p/> For example, if there is no App2 in the data above, then the response would be 200 OK with following possible data: [{"appId": "App1", "programType": "Service", "programId": "Service1", "statusCode": 200, "status": "RUNNING"}, {"appId": "App1", "programType": "Procedure", "programId": "Proc2"}, "statusCode": 200, "status": "STOPPED"}, {"appId":"App2", "programType":"Flow", "programId":"Flow1", "statusCode":404, "error": "App: App2 not found"}]
 * @param request
 * @param responder
 */
@POST @Path("String_Node_Str") public void getStatuses(HttpRequest request,HttpResponder responder){
  programLifecycleHttpHandler.getStatuses(RESTMigrationUtils.rewriteV2RequestToV3(request),responder,Constants.DEFAULT_NAMESPACE);
}