Program: 37641
Project: 37641
Buggy source:
/** 
 * Executes request command
 * @param command REST request representation
 * @return Future wrapper of REST response
 * @throws RestEndpointIOException In case of error
 * @see Mono
 */
@Override public final <RQ,RS>Mono<Response<RS>> executeRequest(RestCommand<RQ,RS> command) throws RestEndpointIOException {
  URI uri=spliceUrl(command.getUri());
  HttpUriRequest rq;
  Serializer serializer;
switch (command.getHttpMethod()) {
case GET:
    rq=new HttpGet(uri);
  break;
case POST:
if (MultiPartRequest.class.equals(command.getRequest())) {
  MultiPartRequest rqData=(MultiPartRequest)command.getRequest();
  rq=buildMultipartRequest(uri,rqData);
}
 else {
  serializer=getSupportedSerializer(command.getRequest());
  rq=new HttpPost(uri);
  ((HttpPost)rq).setEntity(new ByteArrayEntity(serializer.serialize(command.getRequest()),ContentType.create(serializer.getMimeType())));
}
break;
case PUT:
serializer=getSupportedSerializer(command.getRequest());
rq=new HttpPut(uri);
((HttpPut)rq).setEntity(new ByteArrayEntity(serializer.serialize(command.getRequest()),ContentType.create(serializer.getMimeType())));
break;
case DELETE:
rq=new HttpDelete(uri);
break;
case PATCH:
serializer=getSupportedSerializer(command.getRequest());
rq=new HttpPatch(uri);
((HttpPatch)rq).setEntity(new ByteArrayEntity(serializer.serialize(command.getRequest()),ContentType.create(serializer.getMimeType())));
break;
default :
throw new IllegalArgumentException("String_Node_Str" + command.getHttpMethod() + "String_Node_Str");
}
return executeInternal(rq,new TypeConverterCallback<RS>(serializers,command.getResponseType()));
}

Fixed version (ground truth):
/** 
 * Executes request command
 * @param command REST request representation
 * @return Future wrapper of REST response
 * @throws RestEndpointIOException In case of error
 * @see Mono
 */
@Override public final <RQ,RS>Mono<Response<RS>> executeRequest(RestCommand<RQ,RS> command) throws RestEndpointIOException {
  URI uri=spliceUrl(command.getUri());
  HttpUriRequest rq;
  Serializer serializer;
switch (command.getHttpMethod()) {
case GET:
    rq=new HttpGet(uri);
  break;
case POST:
if (command.isMultipart()) {
  MultiPartRequest rqData=(MultiPartRequest)command.getRequest();
  rq=buildMultipartRequest(uri,rqData);
}
 else {
  serializer=getSupportedSerializer(command.getRequest());
  rq=new HttpPost(uri);
  ((HttpPost)rq).setEntity(new ByteArrayEntity(serializer.serialize(command.getRequest()),ContentType.create(serializer.getMimeType())));
}
break;
case PUT:
serializer=getSupportedSerializer(command.getRequest());
rq=new HttpPut(uri);
((HttpPut)rq).setEntity(new ByteArrayEntity(serializer.serialize(command.getRequest()),ContentType.create(serializer.getMimeType())));
break;
case DELETE:
rq=new HttpDelete(uri);
break;
case PATCH:
serializer=getSupportedSerializer(command.getRequest());
rq=new HttpPatch(uri);
((HttpPatch)rq).setEntity(new ByteArrayEntity(serializer.serialize(command.getRequest()),ContentType.create(serializer.getMimeType())));
break;
default :
throw new IllegalArgumentException("String_Node_Str" + command.getHttpMethod() + "String_Node_Str");
}
return executeInternal(rq,new TypeConverterCallback<RS>(serializers,command.getResponseType()));
}