Program: 91230
Project: 91230
Buggy source:
/** 
 * RESTful API for sending Push Notifications. The Endpoint is protected using <code>HTTP Basic</code> (credentials <code>PushApplicationID:masterSecret</code>). <p/><p/> Messages are submitted as flexible JSON maps. Below is a simple example: <pre> curl -u "PushApplicationID:MasterSecret" -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{ "message": { "alert": "HELLO!", "sound": "default", "user-data": { "key": "value", } }' https://SERVER:PORT/CONTEXT/rest/sender </pre> Details about the Message Format can be found HERE! <p/><p/> <b>Request Header</b>   {@code aerogear-sender} uses to identify the used client. If the header is not present, the standard "user-agent" header is used.
 * @param message   message to send
 * @return          empty JSON body
 * @responseheader WWW-Authenticate Basic realm="AeroGear UnifiedPush Server" (only for 401 response)
 * @statuscode 202 Indicates the Job has been accepted and is being process by the AeroGear UnifiedPush Server
 * @statuscode 401 The request requires authentication
 */
@POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @BodyType("String_Node_Str") @ReturnType("String_Node_Str") public Response send(final InternalUnifiedPushMessage message,@Context HttpServletRequest request){
  final PushApplication pushApplication=loadPushApplicationWhenAuthorized(request);
  if (pushApplication == null) {
    return Response.status(Status.UNAUTHORIZED).header("String_Node_Str","String_Node_Str").entity("String_Node_Str").build();
  }
  message.setIpAddress(HttpRequestUtil.extractIPAddress(request));
  message.setClientIdentifier(HttpRequestUtil.extractAeroGearSenderInformation(request));
  notificationRouter.submit(pushApplication,message);
  logger.fine("String_Node_Str" + message.getClientIdentifier() + "String_Node_Str");
  logger.info("String_Node_Str");
  return Response.status(Status.ACCEPTED).entity(EmptyJSON.STRING).build();
}

Fixed version (ground truth):
/** 
 * RESTful API for sending Push Notifications. The Endpoint is protected using <code>HTTP Basic</code> (credentials <code>PushApplicationID:masterSecret</code>). <p> Messages are submitted as flexible JSON maps. Below is a simple example: <pre> curl -u "PushApplicationID:MasterSecret" -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{ "message": { "alert": "HELLO!", "sound": "default", "user-data": { "key": "value", } }' https://SERVER:PORT/CONTEXT/rest/sender </pre> Details about the Message Format can be found HERE! <p> <b>Request Header</b>   {@code aerogear-sender} uses to identify the used client. If the header is not present, the standard "user-agent" header is used.
 * @param message   message to send
 * @return          empty JSON body
 * @responseheader WWW-Authenticate Basic realm="AeroGear UnifiedPush Server" (only for 401 response)
 * @statuscode 202 Indicates the Job has been accepted and is being process by the AeroGear UnifiedPush Server
 * @statuscode 401 The request requires authentication
 */
@POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @BodyType("String_Node_Str") @ReturnType("String_Node_Str") public Response send(final InternalUnifiedPushMessage message,@Context HttpServletRequest request){
  final PushApplication pushApplication=loadPushApplicationWhenAuthorized(request);
  if (pushApplication == null) {
    return Response.status(Status.UNAUTHORIZED).header("String_Node_Str","String_Node_Str").entity("String_Node_Str").build();
  }
  message.setIpAddress(HttpRequestUtil.extractIPAddress(request));
  message.setClientIdentifier(HttpRequestUtil.extractAeroGearSenderInformation(request));
  notificationRouter.submit(pushApplication,message);
  logger.fine("String_Node_Str" + message.getClientIdentifier() + "String_Node_Str");
  logger.info("String_Node_Str");
  return Response.status(Status.ACCEPTED).entity(EmptyJSON.STRING).build();
}