nus-yam/ex-repair huggingface dataset:
Program: 172480
Project: 172480
Buggy source:
@GET @Path("String_Node_Str") @APIResponse(responseCode="String_Node_Str",description="String_Node_Str",content=@Content(schema=@Schema(implementation=Review.class))) @APIResponse(responseCode="String_Node_Str",description="String_Node_Str") @Operation(operationId="String_Node_Str",summary="String_Node_Str") @Produces("String_Node_Str") public Response getReviewById(@Parameter(name="String_Node_Str",description="String_Node_Str",required=true,in=ParameterIn.PATH,content=@Content(examples=@ExampleObject(value="String_Node_Str"))) @PathParam("String_Node_Str") int id){
  Review review=reviews.get(id);
  if (review != null) {
    return Response.ok().entity(review).build();
  }
 else {
    return Response.status(Status.NOT_FOUND).build();
  }
}

Fixed version (ground truth):
@GET @Path("String_Node_Str") @APIResponse(responseCode="String_Node_Str",description="String_Node_Str",content=@Content(schema=@Schema(implementation=Review.class)),headers={@Header(name="String_Node_Str",description="String_Node_Str",schema=@Schema(type=SchemaType.INTEGER),required=true,allowEmptyValue=true,deprecated=true),@Header(name="String_Node_Str",description="String_Node_Str",schema=@Schema(type=SchemaType.STRING),required=true,allowEmptyValue=true,deprecated=true)}) @APIResponse(responseCode="String_Node_Str",description="String_Node_Str") @Operation(operationId="String_Node_Str",summary="String_Node_Str") @Produces("String_Node_Str") public Response getReviewById(@Parameter(name="String_Node_Str",description="String_Node_Str",required=true,in=ParameterIn.PATH,content=@Content(examples=@ExampleObject(value="String_Node_Str"))) @PathParam("String_Node_Str") int id){
  Review review=reviews.get(id);
  if (review != null) {
    return Response.ok().entity(review).build();
  }
 else {
    return Response.status(Status.NOT_FOUND).build();
  }
}
Program: 172481
Project: 172481
Buggy source:
@Path("String_Node_Str") @PUT @RequestBody(name="String_Node_Str",description="String_Node_Str",content=@Content(mediaType="String_Node_Str",schema=@Schema(implementation=User.class),examples=@ExampleObject(name="String_Node_Str",summary="String_Node_Str",value="String_Node_Str"))) @Operation(summary="String_Node_Str",description="String_Node_Str",operationId="String_Node_Str") @APIResponses(value={@APIResponse(responseCode="String_Node_Str",description="String_Node_Str",content=@Content(schema=@Schema(name="String_Node_Str",implementation=User.class),encoding=@Encoding(name="String_Node_Str",contentType="String_Node_Str",style="String_Node_Str",allowReserved=true,explode=true))),@APIResponse(responseCode="String_Node_Str",description="String_Node_Str"),@APIResponse(responseCode="String_Node_Str",description="String_Node_Str")}) @Tag(ref="String_Node_Str") public Response updateUser(@Parameter(name="String_Node_Str",description="String_Node_Str",schema=@Schema(type=SchemaType.STRING),required=true) @PathParam("String_Node_Str") String username,User user){
  userData.addUser(user);
  return Response.ok().entity("String_Node_Str").build();
}

Fixed version (ground truth):
@Path("String_Node_Str") @PUT @RequestBody(name="String_Node_Str",description="String_Node_Str",content=@Content(mediaType="String_Node_Str",schema=@Schema(implementation=User.class),examples=@ExampleObject(name="String_Node_Str",summary="String_Node_Str",value="String_Node_Str"))) @Operation(summary="String_Node_Str",description="String_Node_Str",operationId="String_Node_Str") @APIResponses(value={@APIResponse(responseCode="String_Node_Str",description="String_Node_Str",content=@Content(schema=@Schema(name="String_Node_Str",implementation=User.class),encoding=@Encoding(name="String_Node_Str",contentType="String_Node_Str",style="String_Node_Str",allowReserved=true,explode=true,headers=@Header(ref="String_Node_Str")))),@APIResponse(responseCode="String_Node_Str",description="String_Node_Str"),@APIResponse(responseCode="String_Node_Str",description="String_Node_Str")}) @Tag(ref="String_Node_Str") public Response updateUser(@Parameter(name="String_Node_Str",description="String_Node_Str",schema=@Schema(type=SchemaType.STRING),required=true) @PathParam("String_Node_Str") String username,User user){
  userData.addUser(user);
  return Response.ok().entity("String_Node_Str").build();
}
Program: 172483
Project: 172483
Buggy source:
@Test @RunAsClient public void testSchema() throws InterruptedException {
  Response response=given().when().get("String_Node_Str");
  System.out.println("String_Node_Str" + response.asString());
  ValidatableResponse vr=response.then().parser("String_Node_Str",Parser.JSON).statusCode(200);
  vr.body("String_Node_Str",equalTo("String_Node_Str"));
  vr.body("String_Node_Str",hasItems("String_Node_Str","String_Node_Str","String_Node_Str"));
  vr.body("String_Node_Str",equalTo("String_Node_Str"));
  vr.body("String_Node_Str",equalTo(true));
  vr.body("String_Node_Str",nullValue());
  vr.body("String_Node_Str",equalTo(101));
  vr.body("String_Node_Str",equalTo(true));
  vr.body("String_Node_Str",equalTo(9));
  vr.body("String_Node_Str",equalTo(true));
  vr.body("String_Node_Str",equalTo(10));
  vr.body("String_Node_Str",equalTo(256));
  vr.body("String_Node_Str",equalTo(32));
  vr.body("String_Node_Str",equalTo(true));
  vr.body("String_Node_Str",hasItems("String_Node_Str","String_Node_Str"));
  vr.body("String_Node_Str",hasItems("String_Node_Str","String_Node_Str"));
  vr.body("String_Node_Str",hasItems("String_Node_Str","String_Node_Str","String_Node_Str"));
  vr.body("String_Node_Str",equalTo("String_Node_Str"));
  vr.body("String_Node_Str",equalTo("String_Node_Str"));
  vr.body("String_Node_Str",hasEntry("String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
@Test @RunAsClient public void testSchema() throws InterruptedException {
  Response response=given().when().get("String_Node_Str");
  System.out.println("String_Node_Str" + response.asString());
  ValidatableResponse vr=response.then().parser("String_Node_Str",Parser.JSON).statusCode(200);
  vr.body("String_Node_Str",equalTo("String_Node_Str"));
  vr.body("String_Node_Str",hasItems("String_Node_Str","String_Node_Str","String_Node_Str"));
  vr.body("String_Node_Str",equalTo("String_Node_Str"));
  vr.body("String_Node_Str",equalTo(true));
  vr.body("String_Node_Str",nullValue());
  vr.body("String_Node_Str",equalTo(101));
  vr.body("String_Node_Str",equalTo(true));
  vr.body("String_Node_Str",equalTo(9));
  vr.body("String_Node_Str",equalTo(true));
  vr.body("String_Node_Str",equalTo(10));
  vr.body("String_Node_Str",equalTo(256));
  vr.body("String_Node_Str",equalTo(32));
  String storeOrderResponses="String_Node_Str";
  vr.body("String_Node_Str",equalTo(true));
  vr.body(storeOrderResponses + "String_Node_Str",hasItems("String_Node_Str","String_Node_Str"));
  vr.body(storeOrderResponses + "String_Node_Str",hasItems("String_Node_Str","String_Node_Str"));
  vr.body("String_Node_Str",hasItems("String_Node_Str","String_Node_Str","String_Node_Str"));
  vr.body(storeOrderResponses + "String_Node_Str",equalTo("String_Node_Str"));
  vr.body(storeOrderResponses + "String_Node_Str",equalTo("String_Node_Str"));
  vr.body(storeOrderResponses + "String_Node_Str",hasEntry("String_Node_Str","String_Node_Str"));
}
Program: 172484
Project: 172484
Buggy source:
/** 
 * Style describes how the encoding value will be serialized depending on the type of the parameter value. <p> This method returns the style property from a Encoding instance. </p>
 * @return String style
 */
StyleEnum getStyle();

Fixed version (ground truth):
/** 
 * Style describes how the encoding value will be serialized depending on the type of the parameter value. <p> This method returns the style property from a Encoding instance. </p>
 * @return String style
 */
Style getStyle();
Program: 172485
Project: 172485
Buggy source:
/** 
 * Style describes how the encoding value will be serialized depending on the type of the parameter value. <p> This method sets the style property of Encoding instance to the given style argument. </p>
 * @param style a string that descibes how encoding value will be serialized
 */
void setStyle(StyleEnum style);

Fixed version (ground truth):
/** 
 * Style describes how the encoding value will be serialized depending on the type of the parameter value. <p> This method sets the style property of Encoding instance to the given style argument. </p>
 * @param style a string that descibes how encoding value will be serialized
 */
void setStyle(Style style);
Program: 172486
Project: 172486
Buggy source:
/** 
 * Style describes how the encoding value will be serialized depending on the type of the parameter value. <p> This method sets the style property of Encoding instance to the passed style argument and returns the modified instance </p>
 * @param style a string that descibes how encoding value will be serialized
 * @return Encoding
 */
Encoding style(StyleEnum style);

Fixed version (ground truth):
/** 
 * Style describes how the encoding value will be serialized depending on the type of the parameter value. <p> This method sets the style property of Encoding instance to the passed style argument and returns the modified instance </p>
 * @param style a string that descibes how encoding value will be serialized
 * @return Encoding
 */
Encoding style(Style style);
Program: 172487
Project: 172487
Buggy source:
@Consumes("String_Node_Str") @Produces("String_Node_Str") public Response createBooking(@Parameter(description="String_Node_Str",required=true,content=@Content(mediaType="String_Node_Str",schema=@Schema(implementation=Booking.class))) Booking task){
  bookings.put(currentId,task);
  return Response.status(Status.CREATED).entity("String_Node_Str" + currentId++ + "String_Node_Str").build();
}

Fixed version (ground truth):
@POST @Callback(name="String_Node_Str",callbackUrlExpression="String_Node_Str",operation=@Operation(summary="String_Node_Str",responses={@APIResponse(responseCode="String_Node_Str",description="String_Node_Str",content=@Content(schema=@Schema(type="String_Node_Str",implementation=Booking.class))),@APIResponse(responseCode="String_Node_Str",description="String_Node_Str")})) @Operation(method="String_Node_Str",summary="String_Node_Str",description="String_Node_Str",operationId="String_Node_Str",tags={"String_Node_Str"},security=@SecurityRequirement(name="String_Node_Str",scopes={"String_Node_Str","String_Node_Str"}),requestBody=@RequestBody(description="String_Node_Str",content=@Content(mediaType="String_Node_Str",schema=@Schema(implementation=Booking.class),examples=@ExampleObject(name="String_Node_Str",summary="String_Node_Str",externalValue="String_Node_Str"))),responses={@APIResponse(responseCode="String_Node_Str",description="String_Node_Str",content=@Content(schema=@Schema(name="String_Node_Str",description="String_Node_Str",type="String_Node_Str")))}) @Consumes("String_Node_Str") @Produces("String_Node_Str") public Response createBooking(@Parameter(description="String_Node_Str",required=true,content=@Content(mediaType="String_Node_Str",schema=@Schema(implementation=Booking.class))) Booking task){
  bookings.put(currentId,task);
  return Response.status(Status.CREATED).entity("String_Node_Str" + currentId++ + "String_Node_Str").build();
}
Program: 172488
Project: 172488
Buggy source:
/** 
 * Sets this Link's parameters property to the given map.
 * @param parameters a map representing parameters to pass to this link's operation as specified with operationId or identified via operationRef
 */
void setParameters(Map<String,String> parameters);

Fixed version (ground truth):
/** 
 * Sets this Link's parameters property to the given map.
 * @param parameters a map representing parameters to pass to this link's operation as specified with operationId or identified via operationRef
 */
void setParameters(Map<String,Object> parameters);
Program: 172489
Project: 172489
Buggy source:
/** 
 * Returns the parameters property from this instance of Link. The key is the parameter name and the value is a constant or a runtime expression to be passed to the linked operation.
 * @return a map representing parameters to pass to this link's operation
 */
Map<String,String> getParameters();

Fixed version (ground truth):
/** 
 * Returns the parameters property from this instance of Link. The key is the parameter name and the value is a constant or a runtime expression to be passed to the linked operation.
 * @return a map representing parameters to pass to this link's operation
 */
Map<String,Object> getParameters();
Program: 172490
Project: 172490
Buggy source:
/** 
 * Add a new parameter to the parameters property of this instance of Link.
 * @param name The name of the parameter. Can be qualified using the parameter location [{in}.]{name} for operations that use the same parametername in different locations (e.g. path.id).
 * @param parameter a constant or an expression to be evaluated at runtime and passed to the linked operation
 * @return the current Link instance
 */
Link parameters(String name,String parameter);

Fixed version (ground truth):
/** 
 * Add a new parameter to the parameters property of this instance of Link.
 * @param name The name of the parameter. Can be qualified using the parameter location [{in}.]{name} for operations that use the same parametername in different locations (e.g. path.id).
 * @param parameter a constant or an expression to be evaluated at runtime and passed to the linked operation
 * @return the current Link instance
 */
Link parameters(String name,Object parameter);
Program: 172491
Project: 172491
Buggy source:
/** 
 * Returns the in property from a Parameter instance.
 * @return the location of the parameter
 */
String getIn();

Fixed version (ground truth):
/** 
 * Returns the in property from a Parameter instance.
 * @return the location of the parameter
 */
In getIn();
Program: 172492
Project: 172492
Buggy source:
/** 
 * Sets the in property of a Parameter instance to the given string. If the in property is set to "path" then also sets the required property to true.
 * @param in the location of the parameter
 */
void setIn(String in);

Fixed version (ground truth):
/** 
 * Sets the in property of a Parameter instance to the given string. If the in property is set to "path" then also sets the required property to true.
 * @param in the location of the parameter
 */
void setIn(In in);
Program: 172493
Project: 172493
Buggy source:
/** 
 * Sets the in property of a Parameter instance to the given string. If the in property is set to "path" then also sets the required property to true.
 * @param in the location of the parameter
 * @return the current Parameter instance
 */
Parameter in(String in);

Fixed version (ground truth):
/** 
 * Sets the in property of a Parameter instance to the given string. If the in property is set to "path" then also sets the required property to true.
 * @param in the location of the parameter
 * @return the current Parameter instance
 */
Parameter in(In in);
Program: 172494
Project: 172494
Buggy source:
/** 
 * Allows filtering of a particular SecurityScheme.  Implementers of this method can choose to update the given SecurityScheme, pass it back as-is, or return null if removing this SecurityScheme.
 * @return the SecurityScheme to be used or null 
 */
SecurityScheme filterSecurityScheme(SecurityScheme securityScheme);

Fixed version (ground truth):
/** 
 * Allows filtering of a particular SecurityScheme.  Implementers of this method can choose to update the given SecurityScheme, pass it back as-is, or return null if removing this SecurityScheme.
 * @param securityScheme the current SecurityScheme element
 * @return the SecurityScheme to be used or null 
 */
SecurityScheme filterSecurityScheme(SecurityScheme securityScheme);
Program: 172495
Project: 172495
Buggy source:
/** 
 * Allows filtering of a particular Callback.  Implementers of this method can choose to update the given Callback, pass it back as-is, or return null if removing this Callback.
 * @return the Callback to be used or null 
 */
Callback filterCallback(Callback callback);

Fixed version (ground truth):
/** 
 * Allows filtering of a particular Callback.  Implementers of this method can choose to update the given Callback, pass it back as-is, or return null if removing this Callback.
 * @param callback the current Callback element
 * @return the Callback to be used or null 
 */
Callback filterCallback(Callback callback);
Program: 172496
Project: 172496
Buggy source:
/** 
 * Allows filtering of a particular Operation.  Implementers of this method can choose to update the given Operation, pass it back as-is, or return null if removing this Operation.
 * @return the Operation to be used or null 
 */
Operation filterOperation(Operation operation);

Fixed version (ground truth):
/** 
 * Allows filtering of a particular Operation.  Implementers of this method can choose to update the given Operation, pass it back as-is, or return null if removing this Operation.
 * @param operation the current Operation element
 * @return the Operation to be used or null 
 */
Operation filterOperation(Operation operation);
Program: 172497
Project: 172497
Buggy source:
/** 
 * Allows filtering of a particular Server.  Implementers of this method can choose to update the given Server, pass it back as-is, or return null if removing this Server.
 * @return the Server to be used or null 
 */
Server filterServer(Server server);

Fixed version (ground truth):
/** 
 * Allows filtering of a particular Server.  Implementers of this method can choose to update the given Server, pass it back as-is, or return null if removing this Server.
 * @param server the current Server element
 * @return the Server to be used or null 
 */
Server filterServer(Server server);
Program: 172498
Project: 172498
Buggy source:
/** 
 * Allows filtering of a particular Header.  Implementers of this method can choose to update the given Header, pass it back as-is, or return null if removing this Header.
 * @return the Header to be used or null 
 */
Header filterHeader(Header header);

Fixed version (ground truth):
/** 
 * Allows filtering of a particular Header.  Implementers of this method can choose to update the given Header, pass it back as-is, or return null if removing this Header.
 * @param header the current Header element
 * @return the Header to be used or null 
 */
Header filterHeader(Header header);
Program: 172499
Project: 172499
Buggy source:
/** 
 * Allows filtering of a particular Schema.  Implementers of this method can choose to update the given Schema, pass it back as-is, or return null if removing this Schema.
 * @return the Schema to be used or null 
 */
Schema<?> filterSchema(Schema<?> schema);

Fixed version (ground truth):
/** 
 * Allows filtering of a particular Schema.  Implementers of this method can choose to update the given Schema, pass it back as-is, or return null if removing this Schema.
 * @param schema the current Schema element
 * @return the Schema to be used or null 
 */
Schema<?> filterSchema(Schema<?> schema);
Program: 172500
Project: 172500
Buggy source:
/** 
 * Allows filtering of a particular Tag.  Implementers of this method can choose to update the given Tag, pass it back as-is, or return null if removing this Tag.
 * @return the Tag to be used or null 
 */
Tag filterTag(Tag tag);

Fixed version (ground truth):
/** 
 * Allows filtering of a particular Tag.  Implementers of this method can choose to update the given Tag, pass it back as-is, or return null if removing this Tag.
 * @param tag the current Tag element
 * @return the Tag to be used or null 
 */
Tag filterTag(Tag tag);
Program: 172501
Project: 172501
Buggy source:
/** 
 * Allows filtering of a particular RequestBody.  Implementers of this method can choose to update the given RequestBody, pass it back as-is, or return null if removing this RequestBody.
 * @return the RequestBody to be used or null 
 */
RequestBody filterRequestBody(RequestBody requestBody);

Fixed version (ground truth):
/** 
 * Allows filtering of a particular RequestBody.  Implementers of this method can choose to update the given RequestBody, pass it back as-is, or return null if removing this RequestBody.
 * @param requestBody the current RequestBody element
 * @return the RequestBody to be used or null 
 */
RequestBody filterRequestBody(RequestBody requestBody);
Program: 172502
Project: 172502
Buggy source:
/** 
 * Allows filtering of a particular Parameter.  Implementers of this method can choose to update the given Parameter, pass it back as-is, or return null if removing this Parameter.
 * @return the Parameter to be used or null 
 */
Parameter filterParameter(Parameter parameter);

Fixed version (ground truth):
/** 
 * Allows filtering of a particular Parameter.  Implementers of this method can choose to update the given Parameter, pass it back as-is, or return null if removing this Parameter.
 * @param parameter the current Parameter element
 * @return the Parameter to be used or null 
 */
Parameter filterParameter(Parameter parameter);
Program: 172503
Project: 172503
Buggy source:
/** 
 * Allows filtering of a particular Link.  Implementers of this method can choose to update the given Link, pass it back as-is, or return null if removing this Link.
 * @return the Link to be used or null 
 */
Link filterLink(Link link);

Fixed version (ground truth):
/** 
 * Allows filtering of a particular Link.  Implementers of this method can choose to update the given Link, pass it back as-is, or return null if removing this Link.
 * @param link the current Link element
 * @return the Link to be used or null 
 */
Link filterLink(Link link);
Program: 172504
Project: 172504
Buggy source:
/** 
 * Allows filtering of a particular PathItem.  Implementers of this method can choose to update the given PathItem, pass it back as-is, or return null if removing this PathItem.
 * @return the PathItem to be used or null 
 */
PathItem filterPathItem(PathItem pathItem);

Fixed version (ground truth):
/** 
 * Allows filtering of a particular PathItem.  Implementers of this method can choose to update the given PathItem, pass it back as-is, or return null if removing this PathItem.
 * @param pathItem the current PathItem element
 * @return the PathItem to be used or null 
 */
PathItem filterPathItem(PathItem pathItem);
Program: 172505
Project: 172505
Buggy source:
/** 
 * Allows filtering of a particular APIResponse.  Implementers of this method can choose to update the given APIResponse, pass it back as-is, or return null if removing this APIResponse.
 * @return the APIResponse to be used or null 
 */
APIResponse filterAPIResponse(APIResponse apiResponse);

Fixed version (ground truth):
/** 
 * Allows filtering of a particular APIResponse.  Implementers of this method can choose to update the given APIResponse, pass it back as-is, or return null if removing this APIResponse.
 * @param apiResponse the current APIResponse element
 * @return the APIResponse to be used or null 
 */
APIResponse filterAPIResponse(APIResponse apiResponse);
Program: 172506
Project: 172506
Buggy source:
/** 
 * Allows filtering of the singleton OpenAPI element.  Implementers of this method can choose to update this element, or do nothing if no change is required.  Note that one cannot remove this element from the model tree, hence the return type of void.  
 * @return the OpenAPI object to be used
 */
void filterOpenAPI(OpenAPI openAPI);

Fixed version (ground truth):
/** 
 * Allows filtering of the singleton OpenAPI element.  Implementers of this method can choose to update this element, or do nothing if no change is required.  Note that one cannot remove this element from the model tree, hence the return type of void.  
 * @param openAPI the current OpenAPI element
 */
void filterOpenAPI(OpenAPI openAPI);
Program: 172507
Project: 172507
Buggy source:
/** 
 * Returns the requestBody property from a Link instance.
 * @return a literal value or runtime expression to use as a request body when calling the target operation
 */
RequestBody getRequestBody();

Fixed version (ground truth):
/** 
 * Returns the requestBody property from a Link instance.
 * @return a literal value or runtime expression to use as a request body when calling the target operation
 */
Object getRequestBody();
Program: 172508
Project: 172508
Buggy source:
/** 
 * Sets this Link's requestBody property to the given object.
 * @param requestBody a literal value or runtime expression to use as a request body when calling the target operation
 */
void setRequestBody(RequestBody requestBody);

Fixed version (ground truth):
/** 
 * Sets this Link's requestBody property to the given object.
 * @param requestBody a literal value or runtime expression to use as a request body when calling the target operation
 */
void setRequestBody(Object requestBody);
Program: 172509
Project: 172509
Buggy source:
/** 
 * Sets this Link's requestBody property to the given object.
 * @param requestBody a literal value or runtime expression to use as a request body when calling the target operation
 * @return the current Link instance
 */
Link requestBody(RequestBody requestBody);

Fixed version (ground truth):
/** 
 * Sets this Link's requestBody property to the given object.
 * @param requestBody a literal value or runtime expression to use as a request body when calling the target operation
 * @return the current Link instance
 */
Link requestBody(Object requestBody);
Program: 172511
Project: 172511
Buggy source:
/** 
 * Setting all necessary parameters
 * @param access_token Access token of user or group
 * @param need_pts     param, info: <a href="https://vk.com/dev/using_longpoll">link</a>
 * @param version      param, info: <a href="https://vk.com/dev/using_longpoll">link</a>
 * @param API          param, info: <a href="https://vk.com/dev/using_longpoll">link</a>
 * @param wait         param, info: <a href="https://vk.com/dev/using_longpoll">link</a>
 * @param mode         param, info: <a href="https://vk.com/dev/using_longpoll">link</a>
 */
private void setData(String access_token,Integer need_pts,Integer version,Double API,Integer wait,Integer mode){
  this.access_token=(access_token != null && access_token.length() > 5) ? access_token : this.access_token;
  this.need_pts=need_pts == null ? this.need_pts : need_pts;
  this.version=version == null ? this.version : version;
  this.API=API == null ? this.API : API;
  this.wait=wait == null ? this.wait : wait;
  this.mode=mode == null ? this.mode : mode;
  GetLongPollServerResponse serverResponse=getLongPollServer(this.access_token);
  if (serverResponse == null) {
    LOG.error("String_Node_Str");
    return;
  }
  this.server=serverResponse.getServer();
  this.key=serverResponse.getKey();
  this.ts=serverResponse.getTs();
  this.pts=serverResponse.getPts();
}

Fixed version (ground truth):
/** 
 * Setting all necessary parameters
 * @param need_pts     param, info: <a href="https://vk.com/dev/using_longpoll">link</a>
 * @param version      param, info: <a href="https://vk.com/dev/using_longpoll">link</a>
 * @param API          param, info: <a href="https://vk.com/dev/using_longpoll">link</a>
 * @param wait         param, info: <a href="https://vk.com/dev/using_longpoll">link</a>
 * @param mode         param, info: <a href="https://vk.com/dev/using_longpoll">link</a>
 */
private void setData(Integer need_pts,Integer version,Double API,Integer wait,Integer mode){
  this.need_pts=need_pts == null ? this.need_pts : need_pts;
  this.version=version == null ? this.version : version;
  this.API=API == null ? this.API : API;
  this.wait=wait == null ? this.wait : wait;
  this.mode=mode == null ? this.mode : mode;
  GetLongPollServerResponse serverResponse=getLongPollServer(client.getAccessToken());
  if (serverResponse == null) {
    LOG.error("String_Node_Str");
    return;
  }
  this.server=serverResponse.getServer();
  this.key=serverResponse.getKey();
  this.ts=serverResponse.getTs();
  this.pts=serverResponse.getPts();
}
Program: 172512
Project: 172512
Buggy source:
/** 
 * Custom constructor
 * @param client   client with your access token key, more: <a href="https://vk.com/dev/access_token">link</a>
 * @param need_pts more: <a href="https://vk.com/dev/using_longpoll">link</a>
 * @param version  more: <a href="https://vk.com/dev/using_longpoll">link</a>
 * @param API      more: <a href="https://vk.com/dev/using_longpoll">link</a>
 * @param wait     more: <a href="https://vk.com/dev/using_longpoll">link</a>
 * @param mode     more: <a href="https://vk.com/dev/using_longpoll">link</a>
 */
public LongPoll(Client client,Integer need_pts,Integer version,Double API,Integer wait,Integer mode){
  this.client=client;
  setData(client.getAccessToken(),need_pts,version,API,wait,mode);
  if (!on) {
    on=true;
    new Thread(this::startListening).start();
  }
}

Fixed version (ground truth):
/** 
 * Custom constructor
 * @param client   client with your access token key, more: <a href="https://vk.com/dev/access_token">link</a>
 * @param need_pts more: <a href="https://vk.com/dev/using_longpoll">link</a>
 * @param version  more: <a href="https://vk.com/dev/using_longpoll">link</a>
 * @param API      more: <a href="https://vk.com/dev/using_longpoll">link</a>
 * @param wait     more: <a href="https://vk.com/dev/using_longpoll">link</a>
 * @param mode     more: <a href="https://vk.com/dev/using_longpoll">link</a>
 */
public LongPoll(Client client,Integer need_pts,Integer version,Double API,Integer wait,Integer mode){
  this.updatesHandler=new UpdatesHandler(client);
  this.updatesHandler.start();
  this.client=client;
  setData(need_pts,version,API,wait,mode);
  if (!on) {
    on=true;
    new Thread(this::startListening).start();
  }
}
Program: 172513
Project: 172513
Buggy source:
/** 
 * Add callback to the map
 * @param name     Callback name
 * @param callback Callback
 */
public void registerCallback(String name,Callback callback){
  this.callbacks.put(name,callback);
}

Fixed version (ground truth):
/** 
 * Add callback to the map
 * @param name     Callback name
 * @param callback Callback
 */
public void registerCallback(String name,Callback callback){
  updatesHandler.registerCallback(name,callback);
}
Program: 172515
Project: 172515
Buggy source:
/** 
 * Attach doc to message
 * @param doc Doc link: url, from disk or already uploaded to VK as doc{owner_id}_{id}
 */
public Message docAsync(String doc){
  if (Pattern.matches("String_Node_Str",doc)) {
    this.attachments.add(doc);
    return this;
  }
  this.docsToUpload.add(doc);
  return this;
}

Fixed version (ground truth):
/** 
 * Attach doc to message
 * @param doc Doc link: url, from disk or already uploaded to VK as doc{owner_id}_{id}
 */
public Message docAsync(String doc,String... type){
  if (Pattern.matches("String_Node_Str",doc)) {
    this.attachments.add(doc);
    return this;
  }
  this.docsToUpload.add(new JSONObject().put("String_Node_Str",doc).put("String_Node_Str",type));
  return this;
}
Program: 172520
Project: 172520
Buggy source:
/** 
 * Adds a upload file section to the request
 * @param fieldName  name of field in body of POST-request
 * @param bytes     an array of bytes to be uploaded
 */
public void addBytesPart(String fieldName,String fileName,byte[] bytes){
  try {
    request.writeBytes(this.twoHyphens + this.boundary + this.crlf);
    request.writeBytes("String_Node_Str" + fieldName + "String_Node_Str"+ fileName+ "String_Node_Str"+ this.crlf);
    request.writeBytes(this.crlf);
    request.write(bytes);
  }
 catch (  IOException ignored) {
    LOG.error("String_Node_Str",fieldName,fileName);
  }
}

Fixed version (ground truth):
/** 
 * Adds a upload file section to the request
 * @param fieldName  name of field in body of POST-requestx
 * @param bytes     an array of bytes to be uploaded
 */
public void addBytesPart(String fieldName,String fileName,byte[] bytes){
  try {
    request.writeBytes(this.twoHyphens + this.boundary + this.crlf);
    request.writeBytes("String_Node_Str" + fieldName + "String_Node_Str"+ fileName+ "String_Node_Str"+ this.crlf);
    request.writeBytes(this.crlf);
    request.write(bytes);
  }
 catch (  IOException ignored) {
    LOG.error("String_Node_Str",fieldName,fileName);
  }
}
Program: 172522
Project: 172522
Buggy source:
void putAll(JSONArray elements){
  for (int i=0; i < elements.length(); i++) {
    updates.add(elements.getJSONArray(i));
  }
}

Fixed version (ground truth):
/** 
 * We add all of updates from longpoll server to queue
 * @param elements Array of updates
 */
void putAll(JSONArray elements){
  for (int i=0; i < elements.length(); i++) {
    updates.add(elements.getJSONArray(i));
  }
}
Program: 172523
Project: 172523
Buggy source:
JSONArray shift(){
  JSONArray answer=new JSONArray();
  if (this.updates.size() > 0) {
    answer=this.updates.get(0);
    this.updates.remove(0);
  }
  return answer;
}

Fixed version (ground truth):
/** 
 * Analog method of 'shift()' method from javascript
 * @return First element of list, and then remove it
 */
JSONArray shift(){
  JSONArray answer=new JSONArray();
  if (this.updates.size() > 0) {
    answer=this.updates.get(0);
    this.updates.remove(0);
  }
  return answer;
}
Program: 172524
Project: 172524
Buggy source:
public void setCarrierNameFilter(String carrierNameFilter){
  presenter.setCarrierNameFilter(carrierNameFilter);
}

Fixed version (ground truth):
/** 
 * Carrier name filter works for sdk >21
 * @param carrierNameFilter
 */
public void setCarrierNameFilter(String carrierNameFilter){
  presenter.setCarrierNameFilter(carrierNameFilter);
}
Program: 172526
Project: 172526
Buggy source:
@Override public void afterDelivered(int smsId){
  callBack.afterDelivered(smsId);
}

Fixed version (ground truth):
@Override public void afterDelivered(int smsId){
  if (mySmsId == smsId && view != null) {
    view.endView();
  }
  callBack.afterDelivered(smsId);
}
Program: 172527
Project: 172527
Buggy source:
@Override public void afterSuccessfulSMS(int smsId){
  callBack.afterSuccessfulSMS(smsId);
}

Fixed version (ground truth):
@Override public void afterSuccessfulSMS(int smsId){
  if (mySmsId == smsId && view != null) {
    view.endView();
  }
  callBack.afterSuccessfulSMS(smsId);
}
Program: 172528
Project: 172528
Buggy source:
@Override public void afterUnSuccessfulSMS(int smsId,String message){
  callBack.afterUnSuccessfulSMS(smsId,message);
}

Fixed version (ground truth):
@Override public void afterUnSuccessfulSMS(int smsId,String message){
  if (mySmsId == smsId && view != null) {
    view.endView();
  }
  callBack.afterUnSuccessfulSMS(smsId,message);
}
Program: 172529
Project: 172529
Buggy source:
private void sendSmsForOldPhones(){
  model.generateSMSForSingleSimCard(mySmsId,body,carrierNameFilter,new MySmsManager.SMSManagerCallBack(){
    @Override public void afterSuccessfulSMS(    int smsId){
      callBack.afterSuccessfulSMS(smsId);
    }
    @Override public void afterDelivered(    int smsId){
      callBack.afterDelivered(smsId);
    }
    @Override public void afterUnSuccessfulSMS(    int smsId,    String message){
      callBack.afterUnSuccessfulSMS(smsId,message);
    }
    @Override public void onCarrierNameNotMatch(    int smsId,    String message){
      callBack.onCarrierNameNotMatch(smsId,message);
    }
  }
);
}

Fixed version (ground truth):
private void sendSmsForOldPhones(){
  model.generateSMSForSingleSimCard(mySmsId,body,carrierNameFilter,new MySmsManager.SMSManagerCallBack(){
    @Override public void afterSuccessfulSMS(    int smsId){
      if (mySmsId == smsId && view != null) {
        view.endView();
      }
      callBack.afterSuccessfulSMS(smsId);
    }
    @Override public void afterDelivered(    int smsId){
      if (mySmsId == smsId && view != null) {
        view.endView();
      }
      callBack.afterDelivered(smsId);
    }
    @Override public void afterUnSuccessfulSMS(    int smsId,    String message){
      if (mySmsId == smsId && view != null) {
        view.endView();
      }
      callBack.afterUnSuccessfulSMS(smsId,message);
    }
    @Override public void onCarrierNameNotMatch(    int smsId,    String message){
      callBack.onCarrierNameNotMatch(smsId,message);
    }
  }
);
}
Program: 172530
Project: 172530
Buggy source:
@Override public void endView(){
  progressBar.setVisibility(View.INVISIBLE);
  dialog.dismiss();
}

Fixed version (ground truth):
@Override public void endView(){
  if (progressBar != null) {
    progressBar.setVisibility(View.INVISIBLE);
  }
  if (dialog != null) {
    dialog.dismiss();
  }
}
Program: 172531
Project: 172531
Buggy source:
@Override public boolean onTouchEvent(MotionEvent event){
  if (!isEnabled() || event.getPointerCount() > 1 || mSourceImage == null || mGraffitiLayer == null) {
    return super.onTouchEvent(event);
  }
switch (event.getActionMasked()) {
case MotionEvent.ACTION_DOWN:
    mTouchPoint.set(event);
  mIsTouching=true;
mTouchPartHolder=new TouchPartHolder(mIsErase,mTouchMode);
mTouchPartHolder.onTouchDown(event,mPathWidth);
mGraffitiLayer.mTouchPartHolders.add(mTouchPartHolder);
if (mIsErase) {
for (GraffitiLayer layer : mGraffitiLayers) {
if (layer.equals(mGraffitiLayer)) {
layer.mTouchPartHolders.add(mTouchPartHolder);
}
}
}
break;
case MotionEvent.ACTION_MOVE:
mTouchPoint.set(event);
if (mTouchPartHolder != null) {
mTouchPartHolder.onTouchMove(event);
}
break;
case MotionEvent.ACTION_UP:
mTouchPoint.reset();
mIsTouching=false;
mTouchPartHolder=null;
break;
}
postInvalidate();
return true;
}

Fixed version (ground truth):
@Override public boolean onTouchEvent(MotionEvent event){
  if (!isEnabled() || event.getPointerCount() > 1 || mSourceImage == null || mGraffitiLayer == null) {
    return super.onTouchEvent(event);
  }
switch (event.getActionMasked()) {
case MotionEvent.ACTION_DOWN:
    mTouchPoint.set(event);
  mIsTouching=true;
mTouchPartHolder=new TouchPartHolder(mIsErase,mTouchMode);
mTouchPartHolder.onTouchDown(event,mPathWidth);
mGraffitiLayer.mTouchPartHolders.add(mTouchPartHolder);
if (mIsErase) {
for (GraffitiLayer layer : mGraffitiLayers) {
if (!layer.equals(mGraffitiLayer)) {
layer.mTouchPartHolders.add(mTouchPartHolder);
}
}
}
break;
case MotionEvent.ACTION_MOVE:
mTouchPoint.set(event);
if (mTouchPartHolder != null) {
mTouchPartHolder.onTouchMove(event);
}
break;
case MotionEvent.ACTION_UP:
mTouchPoint.reset();
mIsTouching=false;
mTouchPartHolder=null;
break;
}
postInvalidate();
return true;
}
Program: 172532
Project: 172532
Buggy source:
@Override public void onResourceReady(File resource,GlideAnimation<? super File> glideAnimation){
  Bitmap bitmap=BitmapFactory.decodeFile(resource.getAbsolutePath());
  addSticker(bitmap);
  addSticker(bitmap);
  addSticker(bitmap);
}

Fixed version (ground truth):
@Override public void onResourceReady(File resource,GlideAnimation<? super File> glideAnimation){
  addSticker(BitmapFactory.decodeFile(resource.getAbsolutePath()));
}
Program: 172533
Project: 172533
Buggy source:
@Subscribe(threadMode=ThreadMode.MAIN) public void onEvent(StickerSourceActivity.StickerSourceEvent event){
  Glide.with(mContext).load(event.mStickerSource.getSourceUrl()).downloadOnly(new SimpleTarget<File>(){
    @Override public void onResourceReady(    File resource,    GlideAnimation<? super File> glideAnimation){
      Bitmap bitmap=BitmapFactory.decodeFile(resource.getAbsolutePath());
      addSticker(bitmap);
      addSticker(bitmap);
      addSticker(bitmap);
    }
  }
);
}

Fixed version (ground truth):
@Subscribe(threadMode=ThreadMode.MAIN) public void onEvent(StickerSourceActivity.StickerSourceEvent event){
  Glide.with(mContext).load(event.mStickerSource.getSourceUrl()).downloadOnly(new SimpleTarget<File>(){
    @Override public void onResourceReady(    File resource,    GlideAnimation<? super File> glideAnimation){
      addSticker(BitmapFactory.decodeFile(resource.getAbsolutePath()));
    }
  }
);
}
Program: 172534
Project: 172534
Buggy source:
private StickerBaseTouchHandler getTouchHandler(int touchType){
  StickerBaseTouchHandler handler=mTouchHandlerMap.get(touchType);
  if (handler == null) {
switch (touchType) {
case StickerBaseTouchHandler.MOVE:
      handler=new MoveHandler();
    break;
case StickerBaseTouchHandler.BOTTOM_RIGHT_CORNER:
  handler=new BottomRightCornerHandler();
break;
case StickerBaseTouchHandler.TWO_FINGER:
handler=new TwoFingersHandler();
break;
}
}
return handler;
}

Fixed version (ground truth):
private StickerBaseTouchHandler getTouchHandler(int touchType){
  StickerBaseTouchHandler handler=mTouchHandlerMap.get(touchType);
  if (handler == null) {
switch (touchType) {
case StickerBaseTouchHandler.MOVE:
      handler=new MoveHandler();
    break;
case StickerBaseTouchHandler.BOTTOM_RIGHT_CORNER:
  handler=new BottomRightCornerHandler();
break;
case StickerBaseTouchHandler.TWO_FINGER:
handler=new TwoFingersHandler();
break;
}
if (handler != null) {
mTouchHandlerMap.put(touchType,handler);
}
}
return handler;
}
Program: 172535
Project: 172535
Buggy source:
@Override public void addMessage(final String id,final SseMessageDTO dto){
  logger.debug("String_Node_Str");
  if (id != null) {
    clients.get(id).getMessages().add(dto.getBody());
    return;
  }
  clients.values().forEach((data) -> {
    if (data.getPath().equals(dto.getPath())) {
      data.getMessages().add(dto.getBody());
    }
  }
);
}

Fixed version (ground truth):
@Override public void addMessage(final String id,final SseMessageDTO dto){
  logger.debug("String_Node_Str");
  dto.setBody(GeneralUtils.removeAllLineBreaks(dto.getBody()));
  if (id != null) {
    clients.get(id).getMessages().add(dto.getBody());
    return;
  }
  clients.values().forEach((data) -> {
    if (data.getPath().equals(dto.getPath())) {
      data.getMessages().add(dto.getBody());
    }
  }
);
}
Program: 172536
Project: 172536
Buggy source:
public void sendMessage(final String id,final WebSocketDTO dto) throws IOException {
  logger.debug("String_Node_Str");
  final Set<SessionIdWrapper> sessions=sessionMap.get(dto.getPath());
  if (sessions == null) {
    return;
  }
  if (id != null) {
    for (    SessionIdWrapper s : sessions) {
      if (s.getId().equals(id)) {
        s.getSession().getRemote().sendString(dto.getBody());
        return;
      }
    }
  }
 else {
    for (    SessionIdWrapper s : sessions) {
      s.getSession().getRemote().sendString(dto.getBody());
    }
  }
}

Fixed version (ground truth):
public void sendMessage(final String id,final WebSocketDTO dto) throws IOException {
  logger.debug("String_Node_Str");
  dto.setBody(GeneralUtils.removeAllLineBreaks(dto.getBody()));
  final Set<SessionIdWrapper> sessions=sessionMap.get(dto.getPath());
  if (sessions == null) {
    return;
  }
  if (id != null) {
    for (    SessionIdWrapper s : sessions) {
      if (s.getId().equals(id)) {
        s.getSession().getRemote().sendString(dto.getBody());
        return;
      }
    }
  }
 else {
    for (    SessionIdWrapper s : sessions) {
      s.getSession().getRemote().sendString(dto.getBody());
    }
  }
}
Program: 172537
Project: 172537
Buggy source:
@RequestMapping(path="String_Node_Str",method=RequestMethod.GET,produces=MediaType.APPLICATION_JSON_VALUE) public @ResponseBody ResponseEntity<List<JmsMockResponseDTO>> get(){
  return new ResponseEntity<List<JmsMockResponseDTO>>(new ArrayList<JmsMockResponseDTO>(),HttpStatus.OK);
}

Fixed version (ground truth):
@RequestMapping(path="String_Node_Str",method=RequestMethod.GET,produces=MediaType.APPLICATION_JSON_VALUE) public @ResponseBody ResponseEntity<List<JmsMockResponseDTO>> get(){
  return new ResponseEntity<List<JmsMockResponseDTO>>(jmsMockService.loadAll(),HttpStatus.OK);
}
Program: 172538
Project: 172538
Buggy source:
@RequestMapping(path="String_Node_Str",method=RequestMethod.POST,consumes=MediaType.APPLICATION_JSON_VALUE,produces=MediaType.APPLICATION_JSON_VALUE) public @ResponseBody ResponseEntity<SimpleMessageResponseDTO<String>> create(@RequestBody final JmsMockDTO dto){
  return new ResponseEntity<SimpleMessageResponseDTO<String>>(new SimpleMessageResponseDTO<String>(null),HttpStatus.CREATED);
}

Fixed version (ground truth):
@RequestMapping(path="String_Node_Str",method=RequestMethod.POST,consumes=MediaType.APPLICATION_JSON_VALUE,produces=MediaType.APPLICATION_JSON_VALUE) public @ResponseBody ResponseEntity<SimpleMessageResponseDTO<String>> create(@RequestBody final JmsMockDTO dto){
  return new ResponseEntity<SimpleMessageResponseDTO<String>>(new SimpleMessageResponseDTO<String>(jmsMockService.createEndpoint(dto)),HttpStatus.CREATED);
}
Program: 172539
Project: 172539
Buggy source:
@RequestMapping(path="String_Node_Str",method=RequestMethod.PUT,consumes=MediaType.APPLICATION_JSON_VALUE,produces=MediaType.APPLICATION_JSON_VALUE) public @ResponseBody ResponseEntity<String> update(@PathVariable("String_Node_Str") final String extId,@RequestBody final JmsMockDTO dto) throws RecordNotFoundException {
  return new ResponseEntity<String>(HttpStatus.NO_CONTENT);
}

Fixed version (ground truth):
@RequestMapping(path="String_Node_Str",method=RequestMethod.PUT,consumes=MediaType.APPLICATION_JSON_VALUE,produces=MediaType.APPLICATION_JSON_VALUE) public @ResponseBody ResponseEntity<String> update(@PathVariable("String_Node_Str") final String extId,@RequestBody final JmsMockDTO dto) throws RecordNotFoundException {
  jmsMockService.updateEndpoint(extId,dto);
  return new ResponseEntity<String>(HttpStatus.NO_CONTENT);
}
Program: 172540
Project: 172540
Buggy source:
@RequestMapping(path="String_Node_Str",method=RequestMethod.DELETE,produces=MediaType.APPLICATION_JSON_VALUE) public @ResponseBody ResponseEntity<String> delete(@PathVariable("String_Node_Str") final String extId) throws RecordNotFoundException {
  return new ResponseEntity<String>(HttpStatus.NO_CONTENT);
}

Fixed version (ground truth):
@RequestMapping(path="String_Node_Str",method=RequestMethod.DELETE,produces=MediaType.APPLICATION_JSON_VALUE) public @ResponseBody ResponseEntity<String> delete(@PathVariable("String_Node_Str") final String extId) throws RecordNotFoundException {
  jmsMockService.deleteEndpoint(extId);
  return new ResponseEntity<String>(HttpStatus.NO_CONTENT);
}
Program: 172541
Project: 172541
Buggy source:
@RequestMapping(path="String_Node_Str",method=RequestMethod.PATCH,consumes=MediaType.APPLICATION_JSON_VALUE,produces=MediaType.APPLICATION_JSON_VALUE) public @ResponseBody ResponseEntity<?> postJms(@RequestBody final QueueDTO dto) throws ValidationException {
  jmsProxyService.clearQueue(dto.getName());
  return new ResponseEntity<String>(HttpStatus.NO_CONTENT);
}

Fixed version (ground truth):
@RequestMapping(path="String_Node_Str",method=RequestMethod.POST,consumes=MediaType.APPLICATION_JSON_VALUE,produces=MediaType.APPLICATION_JSON_VALUE) public @ResponseBody ResponseEntity<?> postJms(@RequestBody final JmsProxiedDTO dto) throws ValidationException {
  jmsProxyService.pushToQueue(dto.getQueueName(),dto.getBody(),0);
  return new ResponseEntity<String>(HttpStatus.NO_CONTENT);
}
Program: 172542
Project: 172542
Buggy source:
public JmsMockDTO(String name,RecordStatusEnum status,JmsMockTypeEnum mockType){
  this.name=name;
  this.status=status;
  this.mockType=mockType;
}

Fixed version (ground truth):
public JmsMockDTO(final String name,final RecordStatusEnum status,final JmsMockTypeEnum jmsMockType){
  this.name=name;
  this.status=status;
  this.jmsMockType=jmsMockType;
}
Program: 172543
Project: 172543
Buggy source:
@ResponseStatus(value=HttpStatus.BAD_REQUEST) @ExceptionHandler(DataIntegrityViolationException.class) public void badRequest(){
}

Fixed version (ground truth):
@ExceptionHandler(DataIntegrityViolationException.class) public ResponseEntity<String> badRequest(){
  return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
}
Program: 172544
Project: 172544
Buggy source:
@ResponseStatus(value=HttpStatus.BAD_REQUEST) @ExceptionHandler(ValidationException.class) public String ValidationBadRequest(ValidationException ex){
  return ex.getMessage();
}

Fixed version (ground truth):
@ExceptionHandler(ValidationException.class) public ResponseEntity<String> ValidationBadRequest(ValidationException ex){
  return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(ex.getMessage());
}
Program: 172545
Project: 172545
Buggy source:
@ResponseStatus(value=HttpStatus.NOT_FOUND) @ExceptionHandler(RecordNotFoundException.class) public void notFound(){
}

Fixed version (ground truth):
@ExceptionHandler(RecordNotFoundException.class) public ResponseEntity<String> notFound(){
  return ResponseEntity.status(HttpStatus.NOT_FOUND).build();
}