nus-yam/ex-repair huggingface dataset:
Program: 91257
Project: 91257
Buggy source:
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) public Response updateSimplePushVariation(@PathParam("String_Node_Str") String id,@PathParam("String_Node_Str") String simplePushID,SimplePushVariant updatedSimplePushApplication){
  SimplePushVariant spVariant=(SimplePushVariant)variantService.findByVariantIDForDeveloper(simplePushID,loginName.get());
  if (spVariant != null) {
    try {
      validateModelClass(updatedSimplePushApplication);
    }
 catch (    ConstraintViolationException cve) {
      ResponseBuilder builder=createBadRequestResponse(cve.getConstraintViolations());
      return builder.build();
    }
    spVariant.setName(updatedSimplePushApplication.getName());
    spVariant.setDescription(updatedSimplePushApplication.getDescription());
    variantService.updateVariant(spVariant);
    return Response.noContent().build();
  }
  return Response.status(Status.NOT_FOUND).entity("String_Node_Str").build();
}

Fixed version (ground truth):
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response updateSimplePushVariation(@PathParam("String_Node_Str") String id,@PathParam("String_Node_Str") String simplePushID,SimplePushVariant updatedSimplePushApplication){
  SimplePushVariant spVariant=(SimplePushVariant)variantService.findByVariantIDForDeveloper(simplePushID,loginName.get());
  if (spVariant != null) {
    try {
      validateModelClass(updatedSimplePushApplication);
    }
 catch (    ConstraintViolationException cve) {
      ResponseBuilder builder=createBadRequestResponse(cve.getConstraintViolations());
      return builder.build();
    }
    spVariant.setName(updatedSimplePushApplication.getName());
    spVariant.setDescription(updatedSimplePushApplication.getDescription());
    variantService.updateVariant(spVariant);
    return Response.noContent().build();
  }
  return Response.status(Status.NOT_FOUND).entity("String_Node_Str").build();
}
Program: 91258
Project: 91258
Buggy source:
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) public Response updateAndroidVariation(@PathParam("String_Node_Str") String id,@PathParam("String_Node_Str") String androidID,AndroidVariant updatedAndroidApplication){
  AndroidVariant androidVariant=(AndroidVariant)variantService.findByVariantIDForDeveloper(androidID,loginName.get());
  if (androidVariant != null) {
    try {
      validateModelClass(updatedAndroidApplication);
    }
 catch (    ConstraintViolationException cve) {
      ResponseBuilder builder=createBadRequestResponse(cve.getConstraintViolations());
      return builder.build();
    }
    androidVariant.setGoogleKey(updatedAndroidApplication.getGoogleKey());
    androidVariant.setProjectNumber(updatedAndroidApplication.getProjectNumber());
    androidVariant.setName(updatedAndroidApplication.getName());
    androidVariant.setDescription(updatedAndroidApplication.getDescription());
    variantService.updateVariant(androidVariant);
    return Response.noContent().build();
  }
  return Response.status(Status.NOT_FOUND).entity("String_Node_Str").build();
}

Fixed version (ground truth):
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response updateAndroidVariation(@PathParam("String_Node_Str") String id,@PathParam("String_Node_Str") String androidID,AndroidVariant updatedAndroidApplication){
  AndroidVariant androidVariant=(AndroidVariant)variantService.findByVariantIDForDeveloper(androidID,loginName.get());
  if (androidVariant != null) {
    try {
      validateModelClass(updatedAndroidApplication);
    }
 catch (    ConstraintViolationException cve) {
      ResponseBuilder builder=createBadRequestResponse(cve.getConstraintViolations());
      return builder.build();
    }
    androidVariant.setGoogleKey(updatedAndroidApplication.getGoogleKey());
    androidVariant.setProjectNumber(updatedAndroidApplication.getProjectNumber());
    androidVariant.setName(updatedAndroidApplication.getName());
    androidVariant.setDescription(updatedAndroidApplication.getDescription());
    variantService.updateVariant(androidVariant);
    return Response.noContent().build();
  }
  return Response.status(Status.NOT_FOUND).entity("String_Node_Str").build();
}
Program: 91259
Project: 91259
Buggy source:
@POST @Consumes(MediaType.APPLICATION_JSON) public Response registerAndroidVariant(AndroidVariant androidVariant,@PathParam("String_Node_Str") String pushApplicationID,@Context UriInfo uriInfo){
  PushApplication pushApp=pushAppService.findByPushApplicationIDForDeveloper(pushApplicationID,loginName.get());
  if (pushApp == null) {
    return Response.status(Status.NOT_FOUND).entity("String_Node_Str").build();
  }
  try {
    validateModelClass(androidVariant);
  }
 catch (  ConstraintViolationException cve) {
    ResponseBuilder builder=createBadRequestResponse(cve.getConstraintViolations());
    return builder.build();
  }
  androidVariant.setDeveloper(loginName.get());
  androidVariant=(AndroidVariant)variantService.addVariant(androidVariant);
  pushAppService.addAndroidVariant(pushApp,androidVariant);
  return Response.created(uriInfo.getAbsolutePathBuilder().path(String.valueOf(androidVariant.getVariantID())).build()).entity(androidVariant).build();
}

Fixed version (ground truth):
@POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response registerAndroidVariant(AndroidVariant androidVariant,@PathParam("String_Node_Str") String pushApplicationID,@Context UriInfo uriInfo){
  PushApplication pushApp=pushAppService.findByPushApplicationIDForDeveloper(pushApplicationID,loginName.get());
  if (pushApp == null) {
    return Response.status(Status.NOT_FOUND).entity("String_Node_Str").build();
  }
  try {
    validateModelClass(androidVariant);
  }
 catch (  ConstraintViolationException cve) {
    ResponseBuilder builder=createBadRequestResponse(cve.getConstraintViolations());
    return builder.build();
  }
  androidVariant.setDeveloper(loginName.get());
  androidVariant=(AndroidVariant)variantService.addVariant(androidVariant);
  pushAppService.addAndroidVariant(pushApp,androidVariant);
  return Response.created(uriInfo.getAbsolutePathBuilder().path(String.valueOf(androidVariant.getVariantID())).build()).entity(androidVariant).build();
}
Program: 91260
Project: 91260
Buggy source:
@POST @Consumes(MediaType.APPLICATION_JSON) public Response registerChromePackagedAppVariant(ChromePackagedAppVariant chromePackagedAppVariant,@PathParam("String_Node_Str") String pushApplicationID,@Context UriInfo uriInfo){
  PushApplication pushApp=pushAppService.findByPushApplicationIDForDeveloper(pushApplicationID,loginName.get());
  if (pushApp == null) {
    return Response.status(Response.Status.NOT_FOUND).entity("String_Node_Str").build();
  }
  if (chromePackagedAppVariant.getClientSecret() == null) {
    return Response.status(Response.Status.BAD_REQUEST).build();
  }
  chromePackagedAppVariant.setVariantID(UUID.randomUUID().toString());
  chromePackagedAppVariant.setDeveloper(loginName.get());
  chromePackagedAppVariant=(ChromePackagedAppVariant)variantService.addVariant(chromePackagedAppVariant);
  pushAppService.addChromePackagedAppVariant(pushApp,chromePackagedAppVariant);
  return Response.created(uriInfo.getAbsolutePathBuilder().path(String.valueOf(chromePackagedAppVariant.getVariantID())).build()).entity(chromePackagedAppVariant).build();
}

Fixed version (ground truth):
@POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response registerChromePackagedAppVariant(ChromePackagedAppVariant chromePackagedAppVariant,@PathParam("String_Node_Str") String pushApplicationID,@Context UriInfo uriInfo){
  PushApplication pushApp=pushAppService.findByPushApplicationIDForDeveloper(pushApplicationID,loginName.get());
  if (pushApp == null) {
    return Response.status(Response.Status.NOT_FOUND).entity("String_Node_Str").build();
  }
  if (chromePackagedAppVariant.getClientSecret() == null) {
    return Response.status(Response.Status.BAD_REQUEST).build();
  }
  chromePackagedAppVariant.setVariantID(UUID.randomUUID().toString());
  chromePackagedAppVariant.setDeveloper(loginName.get());
  chromePackagedAppVariant=(ChromePackagedAppVariant)variantService.addVariant(chromePackagedAppVariant);
  pushAppService.addChromePackagedAppVariant(pushApp,chromePackagedAppVariant);
  return Response.created(uriInfo.getAbsolutePathBuilder().path(String.valueOf(chromePackagedAppVariant.getVariantID())).build()).entity(chromePackagedAppVariant).build();
}
Program: 91261
Project: 91261
Buggy source:
@DELETE @Path("String_Node_Str") public Response removeInstallation(@PathParam("String_Node_Str") String variantId,@PathParam("String_Node_Str") String installationId){
  InstallationImpl installation=clientInstallationService.findById(installationId);
  if (installation == null) {
    return Response.status(Response.Status.NOT_FOUND).entity("String_Node_Str").build();
  }
  clientInstallationService.removeInstallation(installation);
  return Response.noContent().build();
}

Fixed version (ground truth):
@DELETE @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response removeInstallation(@PathParam("String_Node_Str") String variantId,@PathParam("String_Node_Str") String installationId){
  InstallationImpl installation=clientInstallationService.findById(installationId);
  if (installation == null) {
    return Response.status(Response.Status.NOT_FOUND).entity("String_Node_Str").build();
  }
  clientInstallationService.removeInstallation(installation);
  return Response.noContent().build();
}
Program: 91262
Project: 91262
Buggy source:
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) public Response updateInstallation(InstallationImpl entity,@PathParam("String_Node_Str") String variantId,@PathParam("String_Node_Str") String installationId){
  InstallationImpl installation=clientInstallationService.findById(installationId);
  if (installation == null) {
    return Response.status(Response.Status.NOT_FOUND).entity("String_Node_Str").build();
  }
  clientInstallationService.updateInstallation(installation,entity);
  return Response.noContent().build();
}

Fixed version (ground truth):
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response updateInstallation(InstallationImpl entity,@PathParam("String_Node_Str") String variantId,@PathParam("String_Node_Str") String installationId){
  InstallationImpl installation=clientInstallationService.findById(installationId);
  if (installation == null) {
    return Response.status(Response.Status.NOT_FOUND).entity("String_Node_Str").build();
  }
  clientInstallationService.updateInstallation(installation,entity);
  return Response.noContent().build();
}
Program: 91263
Project: 91263
Buggy source:
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) public Response resetMasterSecret(@PathParam("String_Node_Str") String pushApplicationID){
  PushApplication pushApp=pushAppService.findByPushApplicationIDForDeveloper(pushApplicationID,loginName.get());
  if (pushApp != null) {
    String newMasterSecret=UUID.randomUUID().toString();
    pushApp.setMasterSecret(newMasterSecret);
    pushAppService.updatePushApplication(pushApp);
    return Response.ok(pushApp).build();
  }
  return Response.status(Status.NOT_FOUND).entity("String_Node_Str").build();
}

Fixed version (ground truth):
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response resetMasterSecret(@PathParam("String_Node_Str") String pushApplicationID){
  PushApplication pushApp=pushAppService.findByPushApplicationIDForDeveloper(pushApplicationID,loginName.get());
  if (pushApp != null) {
    String newMasterSecret=UUID.randomUUID().toString();
    pushApp.setMasterSecret(newMasterSecret);
    pushAppService.updatePushApplication(pushApp);
    return Response.ok(pushApp).build();
  }
  return Response.status(Status.NOT_FOUND).entity("String_Node_Str").build();
}
Program: 91264
Project: 91264
Buggy source:
@POST @Consumes(MediaType.APPLICATION_JSON) public Response registerPushApplication(PushApplication pushApp){
  try {
    validateModelClass(pushApp);
  }
 catch (  ConstraintViolationException cve) {
    ResponseBuilder builder=createBadRequestResponse(cve.getConstraintViolations());
    return builder.build();
  }
  pushApp.setDeveloper(loginName.get());
  pushAppService.addPushApplication(pushApp);
  return Response.created(UriBuilder.fromResource(PushApplicationEndpoint.class).path(String.valueOf(pushApp.getPushApplicationID())).build()).entity(pushApp).build();
}

Fixed version (ground truth):
@POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response registerPushApplication(PushApplication pushApp){
  try {
    validateModelClass(pushApp);
  }
 catch (  ConstraintViolationException cve) {
    ResponseBuilder builder=createBadRequestResponse(cve.getConstraintViolations());
    return builder.build();
  }
  pushApp.setDeveloper(loginName.get());
  pushAppService.addPushApplication(pushApp);
  return Response.created(UriBuilder.fromResource(PushApplicationEndpoint.class).path(String.valueOf(pushApp.getPushApplicationID())).build()).entity(pushApp).build();
}
Program: 91265
Project: 91265
Buggy source:
@DELETE @Path("String_Node_Str") public Response deletePushApplication(@PathParam("String_Node_Str") String pushApplicationID){
  PushApplication pushApp=pushAppService.findByPushApplicationIDForDeveloper(pushApplicationID,loginName.get());
  if (pushApp != null) {
    pushAppService.removePushApplication(pushApp);
    return Response.noContent().build();
  }
  return Response.status(Status.NOT_FOUND).entity("String_Node_Str").build();
}

Fixed version (ground truth):
@DELETE @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response deletePushApplication(@PathParam("String_Node_Str") String pushApplicationID){
  PushApplication pushApp=pushAppService.findByPushApplicationIDForDeveloper(pushApplicationID,loginName.get());
  if (pushApp != null) {
    pushAppService.removePushApplication(pushApp);
    return Response.noContent().build();
  }
  return Response.status(Status.NOT_FOUND).entity("String_Node_Str").build();
}
Program: 91266
Project: 91266
Buggy source:
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) public Response updatePushApplication(@PathParam("String_Node_Str") String pushApplicationID,PushApplication updatedPushApp){
  PushApplication pushApp=pushAppService.findByPushApplicationIDForDeveloper(pushApplicationID,loginName.get());
  if (pushApp != null) {
    try {
      validateModelClass(pushApp);
    }
 catch (    ConstraintViolationException cve) {
      ResponseBuilder builder=createBadRequestResponse(cve.getConstraintViolations());
      return builder.build();
    }
    pushApp.setDescription(updatedPushApp.getDescription());
    pushApp.setName(updatedPushApp.getName());
    pushAppService.updatePushApplication(pushApp);
    return Response.noContent().build();
  }
  return Response.status(Status.NOT_FOUND).entity("String_Node_Str").build();
}

Fixed version (ground truth):
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response updatePushApplication(@PathParam("String_Node_Str") String pushApplicationID,PushApplication updatedPushApp){
  PushApplication pushApp=pushAppService.findByPushApplicationIDForDeveloper(pushApplicationID,loginName.get());
  if (pushApp != null) {
    try {
      validateModelClass(pushApp);
    }
 catch (    ConstraintViolationException cve) {
      ResponseBuilder builder=createBadRequestResponse(cve.getConstraintViolations());
      return builder.build();
    }
    pushApp.setDescription(updatedPushApp.getDescription());
    pushApp.setName(updatedPushApp.getName());
    pushAppService.updatePushApplication(pushApp);
    return Response.noContent().build();
  }
  return Response.status(Status.NOT_FOUND).entity("String_Node_Str").build();
}
Program: 91267
Project: 91267
Buggy source:
@POST @Consumes(MediaType.APPLICATION_JSON) public Response registerSimplePushVariant(SimplePushVariant simplePushVariant,@PathParam("String_Node_Str") String pushApplicationID,@Context UriInfo uriInfo){
  PushApplication pushApp=pushAppService.findByPushApplicationIDForDeveloper(pushApplicationID,loginName.get());
  if (pushApp == null) {
    return Response.status(Status.NOT_FOUND).entity("String_Node_Str").build();
  }
  try {
    validateModelClass(simplePushVariant);
  }
 catch (  ConstraintViolationException cve) {
    ResponseBuilder builder=createBadRequestResponse(cve.getConstraintViolations());
    return builder.build();
  }
  simplePushVariant.setDeveloper(loginName.get());
  simplePushVariant=(SimplePushVariant)variantService.addVariant(simplePushVariant);
  pushAppService.addSimplePushVariant(pushApp,simplePushVariant);
  return Response.created(uriInfo.getAbsolutePathBuilder().path(String.valueOf(simplePushVariant.getVariantID())).build()).entity(simplePushVariant).build();
}

Fixed version (ground truth):
@POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response registerSimplePushVariant(SimplePushVariant simplePushVariant,@PathParam("String_Node_Str") String pushApplicationID,@Context UriInfo uriInfo){
  PushApplication pushApp=pushAppService.findByPushApplicationIDForDeveloper(pushApplicationID,loginName.get());
  if (pushApp == null) {
    return Response.status(Status.NOT_FOUND).entity("String_Node_Str").build();
  }
  try {
    validateModelClass(simplePushVariant);
  }
 catch (  ConstraintViolationException cve) {
    ResponseBuilder builder=createBadRequestResponse(cve.getConstraintViolations());
    return builder.build();
  }
  simplePushVariant.setDeveloper(loginName.get());
  simplePushVariant=(SimplePushVariant)variantService.addVariant(simplePushVariant);
  pushAppService.addSimplePushVariant(pushApp,simplePushVariant);
  return Response.created(uriInfo.getAbsolutePathBuilder().path(String.valueOf(simplePushVariant.getVariantID())).build()).entity(simplePushVariant).build();
}
Program: 91268
Project: 91268
Buggy source:
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) public Response updateSimplePushVariation(@PathParam("String_Node_Str") String id,@PathParam("String_Node_Str") String simplePushID,SimplePushVariant updatedSimplePushApplication){
  SimplePushVariant spVariant=(SimplePushVariant)variantService.findByVariantIDForDeveloper(simplePushID,loginName.get());
  if (spVariant != null) {
    try {
      validateModelClass(updatedSimplePushApplication);
    }
 catch (    ConstraintViolationException cve) {
      ResponseBuilder builder=createBadRequestResponse(cve.getConstraintViolations());
      return builder.build();
    }
    spVariant.setName(updatedSimplePushApplication.getName());
    spVariant.setDescription(updatedSimplePushApplication.getDescription());
    variantService.updateVariant(spVariant);
    return Response.noContent().build();
  }
  return Response.status(Status.NOT_FOUND).entity("String_Node_Str").build();
}

Fixed version (ground truth):
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response updateSimplePushVariation(@PathParam("String_Node_Str") String id,@PathParam("String_Node_Str") String simplePushID,SimplePushVariant updatedSimplePushApplication){
  SimplePushVariant spVariant=(SimplePushVariant)variantService.findByVariantIDForDeveloper(simplePushID,loginName.get());
  if (spVariant != null) {
    try {
      validateModelClass(updatedSimplePushApplication);
    }
 catch (    ConstraintViolationException cve) {
      ResponseBuilder builder=createBadRequestResponse(cve.getConstraintViolations());
      return builder.build();
    }
    spVariant.setName(updatedSimplePushApplication.getName());
    spVariant.setDescription(updatedSimplePushApplication.getDescription());
    variantService.updateVariant(spVariant);
    return Response.noContent().build();
  }
  return Response.status(Status.NOT_FOUND).entity("String_Node_Str").build();
}
Program: 91269
Project: 91269
Buggy source:
/** 
 * <p>Loads some users during the <b>first</b> construction.</p>
 */
@PostConstruct public void create(){
  this.identityManager=partitionManager.createIdentityManager();
  this.relationshipManager=partitionManager.createRelationshipManager();
  final String DEFAULT_PASSWORD="String_Node_Str";
  User adminUser=buildUser();
  Calendar calendar=expirationDate();
  Password password=new Password(DEFAULT_PASSWORD.toCharArray());
  identityManager.updateCredential(adminUser,password,new Date(),calendar.getTime());
  Role roleDeveloper=new Role(UserRoles.DEVELOPER);
  identityManager.add(roleDeveloper);
  grantRoles(adminUser,roleDeveloper);
}

Fixed version (ground truth):
/** 
 * <p>Loads some users during the <b>first</b> construction.</p>
 */
@PostConstruct public void create(){
  this.identityManager=partitionManager.createIdentityManager();
  this.relationshipManager=partitionManager.createRelationshipManager();
  final String DEFAULT_PASSWORD="String_Node_Str";
  final String DEFAULT_USER="String_Node_Str";
  User adminUser=SampleModel.getUser(identityManager,DEFAULT_USER);
  if (adminUser == null) {
    adminUser=new User(DEFAULT_USER);
    identityManager.add(adminUser);
    Calendar calendar=expirationDate();
    Password password=new Password(DEFAULT_PASSWORD.toCharArray());
    identityManager.updateCredential(adminUser,password,new Date(),calendar.getTime());
    Role roleDeveloper=new Role(UserRoles.DEVELOPER);
    identityManager.add(roleDeveloper);
    grantRoles(adminUser,roleDeveloper);
  }
}
Program: 91270
Project: 91270
Buggy source:
protected String safeBaseUrl(String baseUrl){
  if (baseUrl.endsWith("String_Node_Str")) {
    return "String_Node_Str" + baseUrl.subSequence(0,baseUrl.lastIndexOf("String_Node_Str") - 1);
  }
  return baseUrl;
}

Fixed version (ground truth):
protected String safeBaseUrl(String baseUrl){
  if (baseUrl.endsWith("String_Node_Str")) {
    return "String_Node_Str" + baseUrl.subSequence(0,baseUrl.lastIndexOf("String_Node_Str"));
  }
  return baseUrl;
}
Program: 91271
Project: 91271
Buggy source:
@Test public void test() throws InterruptedException {
  long startMem=memoryUsed();
  data1.setLongString("String_Node_Str");
  assertEquals("String_Node_Str",data1.getLongString());
  data7.setLongString("String_Node_Str");
  assertEquals("String_Node_Str",data7.getLongString());
  System.out.println("String_Node_Str");
  threads.execute(new TestTask(data1,"String_Node_Str"));
  threads.execute(new TestTask(data7,"String_Node_Str"));
  threads.shutdown();
  threads.awaitTermination(1,TimeUnit.MINUTES);
  long memUsed=memoryUsed() - startMem;
  assertEquals(1 << 20,memUsed,1 << 20);
}

Fixed version (ground truth):
@Test public void test() throws InterruptedException, ExecutionException {
  long startMem=memoryUsed();
  data1.setLongString("String_Node_Str");
  assertEquals("String_Node_Str",data1.getLongString());
  data7.setLongString("String_Node_Str");
  assertEquals("String_Node_Str",data7.getLongString());
  System.out.println("String_Node_Str");
  ExecutorService threads=Executors.newFixedThreadPool(2);
  Future<?> a=threads.submit(new TestTask(data1,"String_Node_Str"));
  Future<?> b=threads.submit(new TestTask(data7,"String_Node_Str"));
  a.get();
  b.get();
  threads.shutdown();
  long memUsed=memoryUsed() - startMem;
  System.out.printf("String_Node_Str",memUsed / 1024);
  assertEquals(1 << 20,memUsed,1 << 20);
}
Program: 91272
Project: 91272
Buggy source:
final void start(){
  executorService.execute(new Runnable(){
    @Override public void run(){
      try {
        process();
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str",e);
      }
    }
  }
);
}

Fixed version (ground truth):
final void start(){
  executorService.execute(new Runnable(){
    @Override public void run(){
      try {
        process();
      }
 catch (      ClosedSelectorException e) {
        if (LOG.isDebugEnabled())         LOG.debug("String_Node_Str",e);
      }
catch (      Exception e) {
        LOG.error("String_Node_Str",e);
      }
    }
  }
);
}
Program: 91273
Project: 91273
Buggy source:
@Override public int startSearch(int key){
  if (key == UNSET_KEY)   key=HASH_INSTEAD_OF_UNSET_KEY;
  searchPos=indexToPos(key & capacityMask);
  return searchHash=key;
}

Fixed version (ground truth):
@Override public int startSearch(int key){
  key=maskUnsetKey(key);
  searchPos=indexToPos(key & capacityMask);
  return searchHash=key;
}
Program: 91274
Project: 91274
Buggy source:
@Override public void replacePrevPos(int newValue){
  long prevPos=((searchPos - ENTRY_SIZE) & capacityMask2);
  positions.clear(prevPos);
  positions.set(newValue);
  long entry=(((long)searchHash) << 32) | (newValue & 0xFFFFFFFFL);
  bytes.writeLong(prevPos,entry);
}

Fixed version (ground truth):
@Override public void replacePrevPos(int newValue){
  long prevPos=((searchPos - ENTRY_SIZE) & capacityMask2);
  long oldEntry=bytes.readLong(prevPos);
  int oldValue=(int)oldEntry;
  positions.clear(oldValue);
  positions.set(newValue);
  long newEntry=(((long)searchHash) << 32) | (newValue & 0xFFFFFFFFL);
  bytes.writeLong(prevPos,newEntry);
}
Program: 91275
Project: 91275
Buggy source:
@Override public boolean replace(int key,int oldValue,int newValue){
  if (key == UNSET_KEY)   key=HASH_INSTEAD_OF_UNSET_KEY;
  long pos=indexToPos(key & capacityMask);
  for (int i=0; i <= capacityMask; i++) {
    long entry=bytes.readLong(pos);
    int hash2=(int)(entry >> 32);
    if (hash2 == key) {
      int value2=(int)entry;
      if (value2 == oldValue) {
        positions.clear(oldValue);
        positions.set(newValue);
        bytes.writeLong(pos,(((long)key) << 32) | (newValue & 0xFFFFFFFFL));
        return true;
      }
    }
 else     if (hash2 == UNSET_KEY) {
      break;
    }
    pos=(pos + ENTRY_SIZE) & capacityMask2;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean replace(int key,int oldValue,int newValue){
  key=maskUnsetKey(key);
  long pos=indexToPos(key & capacityMask);
  for (int i=0; i <= capacityMask; i++) {
    long entry=bytes.readLong(pos);
    int hash2=(int)(entry >> 32);
    if (hash2 == key) {
      int value2=(int)entry;
      if (value2 == oldValue) {
        positions.clear(oldValue);
        positions.set(newValue);
        bytes.writeLong(pos,(((long)key) << 32) | (newValue & 0xFFFFFFFFL));
        return true;
      }
    }
 else     if (hash2 == UNSET_KEY) {
      break;
    }
    pos=(pos + ENTRY_SIZE) & capacityMask2;
  }
  return false;
}
Program: 91276
Project: 91276
Buggy source:
@Override public void put(int key,int value){
  positions.set(value);
  if (key == UNSET_KEY)   key=HASH_INSTEAD_OF_UNSET_KEY;
  long pos=indexToPos(key & capacityMask);
  for (int i=0; i <= capacityMask; i++) {
    long entry=bytes.readLong(pos);
    int hash2=(int)(entry >> 32);
    if (hash2 == UNSET_KEY) {
      bytes.writeLong(pos,(((long)key) << 32) | (value & 0xFFFFFFFFL));
      return;
    }
    if (hash2 == key) {
      int value2=(int)entry;
      if (value2 == value)       return;
    }
    pos=(pos + ENTRY_SIZE) & capacityMask2;
  }
  throw new IllegalStateException(getClass().getSimpleName() + "String_Node_Str");
}

Fixed version (ground truth):
@Override public void put(int key,int value){
  key=maskUnsetKey(key);
  long pos=indexToPos(key & capacityMask);
  for (int i=0; i <= capacityMask; i++) {
    long entry=bytes.readLong(pos);
    int hash2=(int)(entry >> 32);
    if (hash2 == UNSET_KEY) {
      bytes.writeLong(pos,(((long)key) << 32) | (value & 0xFFFFFFFFL));
      positions.set(value);
      return;
    }
    if (hash2 == key) {
      int value2=(int)entry;
      if (value2 == value)       return;
    }
    pos=(pos + ENTRY_SIZE) & capacityMask2;
  }
  throw new IllegalStateException(getClass().getSimpleName() + "String_Node_Str");
}
Program: 91277
Project: 91277
Buggy source:
@Override public boolean remove(int key,int value){
  if (key == UNSET_KEY)   key=HASH_INSTEAD_OF_UNSET_KEY;
  long pos=indexToPos(key & capacityMask);
  long posToRemove=-1;
  for (int i=0; i <= capacityMask; i++) {
    long entry=bytes.readLong(pos);
    int hash2=(int)(entry >> 32);
    if (hash2 == key) {
      int value2=(int)entry;
      if (value2 == value) {
        posToRemove=pos;
        positions.clear(value);
        break;
      }
    }
 else     if (hash2 == UNSET_KEY) {
      break;
    }
    pos=(pos + ENTRY_SIZE) & capacityMask2;
  }
  if (posToRemove < 0)   return false;
  removePos(posToRemove);
  return true;
}

Fixed version (ground truth):
@Override public boolean remove(int key,int value){
  key=maskUnsetKey(key);
  long pos=indexToPos(key & capacityMask);
  long posToRemove=-1L;
  for (int i=0; i <= capacityMask; i++) {
    long entry=bytes.readLong(pos);
    int hash2=(int)(entry >> 32);
    if (hash2 == key) {
      int value2=(int)entry;
      if (value2 == value) {
        posToRemove=pos;
        break;
      }
    }
 else     if (hash2 == UNSET_KEY) {
      break;
    }
    pos=(pos + ENTRY_SIZE) & capacityMask2;
  }
  if (posToRemove < 0)   return false;
  positions.clear(value);
  removePos(posToRemove);
  return true;
}
Program: 91278
Project: 91278
Buggy source:
public static ATSDirectBitSet newPositions(final int capacity1){
  long capacityInBits=capacity1 * 8;
  long capacityAsLongs=(capacityInBits + 7) / 8;
  return new ATSDirectBitSet(DirectStore.allocateLazy(capacityAsLongs * 8).bytes());
}

Fixed version (ground truth):
public static ATSDirectBitSet newPositions(int capacity){
  capacity=Math.max(capacity,64);
  int bitSetSizeInBytes=capacity / 8;
  return new ATSDirectBitSet(DirectStore.allocateLazy(bitSetSizeInBytes).bytes());
}
Program: 91279
Project: 91279
Buggy source:
@Override public int nextPos(){
  for (int i=0; i < capacity; i++) {
    long entry=bytes.readLong(searchPos);
    int hash2=(int)(entry >> 32);
    if (hash2 == UNSET_KEY) {
      return UNSET_VALUE;
    }
    searchPos=(searchPos + ENTRY_SIZE) & capacityMask2;
    if (hash2 == searchHash) {
      return (int)entry;
    }
  }
  throw new IllegalStateException(getClass().getSimpleName() + "String_Node_Str");
}

Fixed version (ground truth):
@Override public int nextPos(){
  long pos=searchPos;
  for (int i=0; i < capacity; i++) {
    long entry=bytes.readLong(pos);
    int hash2=(int)(entry >> 32);
    if (hash2 == UNSET_KEY) {
      return UNSET_VALUE;
    }
    pos=(pos + ENTRY_SIZE) & capacityMask2;
    if (hash2 == searchHash) {
      searchPos=pos;
      return (int)entry;
    }
  }
  throw new IllegalStateException(getClass().getSimpleName() + "String_Node_Str");
}
Program: 91280
Project: 91280
Buggy source:
public void removePrevPos(){
  removePos((searchPos - ENTRY_SIZE) & capacityMask2);
}

Fixed version (ground truth):
@Override public void removePrevPos(){
  long prevPos=(searchPos - ENTRY_SIZE) & capacityMask2;
  long entry=bytes.readLong(prevPos);
  int value=(int)entry;
  positions.clear(value);
  removePos(prevPos);
}
Program: 91281
Project: 91281
Buggy source:
@Before public void setup() throws IOException {
  final TcpReplicatorBuilder tcpReplicatorBuilder=new TcpReplicatorBuilder(8079,hostId == 0 ? NO_SERVERS : hostId == 1 ? ONE_SERVER : TWO_SERVER).deletedModIteratorFileOnExit(true).throttleBucketInterval(100,MILLISECONDS).heartBeatInterval(1,SECONDS);
  map1=new SharedHashMapBuilder().entries(1000).identifier((byte)2).tcpReplicatorBuilder(tcpReplicatorBuilder).entries(20000).create(getPersistenceFile(),Integer.class,CharSequence.class);
}

Fixed version (ground truth):
@Before public void setup() throws IOException {
  final TcpReplicatorBuilder tcpReplicatorBuilder=new TcpReplicatorBuilder(8079,hostId == 0 ? NO_SERVERS : hostId == 1 ? ONE_SERVER : TWO_SERVER).throttleBucketInterval(100,MILLISECONDS).heartBeatInterval(1,SECONDS);
  map1=new SharedHashMapBuilder().entries(1000).identifier((byte)2).tcpReplicatorBuilder(tcpReplicatorBuilder).entries(20000).create(getPersistenceFile(),Integer.class,CharSequence.class);
}
Program: 91282
Project: 91282
Buggy source:
@Before public void setup() throws IOException {
  final TcpReplicatorBuilder tcpReplicatorBuilder=new TcpReplicatorBuilder(8079).deletedModIteratorFileOnExit(true).heartBeatInterval(10,TimeUnit.SECONDS);
  map2=new SharedHashMapBuilder().entries(1000).identifier((byte)2).tcpReplicatorBuilder(tcpReplicatorBuilder).entries(20000).create(getPersistenceFile(),Integer.class,CharSequence.class);
}

Fixed version (ground truth):
@Before public void setup() throws IOException {
  final TcpReplicatorBuilder tcpReplicatorBuilder=new TcpReplicatorBuilder(8079).heartBeatInterval(10,TimeUnit.SECONDS);
  map2=new SharedHashMapBuilder().entries(1000).identifier((byte)2).tcpReplicatorBuilder(tcpReplicatorBuilder).entries(20000).create(getPersistenceFile(),Integer.class,CharSequence.class);
}
Program: 91283
Project: 91283
Buggy source:
@Before public void setup() throws IOException {
  final UdpReplicatorBuilder udpReplicatorBuilder=new UdpReplicatorBuilder(8079,"String_Node_Str");
  assertTrue(identifier >= 1 && identifier <= Byte.MAX_VALUE);
  map1=new SharedHashMapBuilder().entries(1000).identifier((byte)identifier).udpReplicatorBuilder(udpReplicatorBuilder).entries(20000).create(getPersistenceFile(),Integer.class,Integer.class);
}

Fixed version (ground truth):
@Before public void setup() throws IOException {
  final NetworkInterface interf=NetworkInterface.getByName("String_Node_Str");
  final UdpReplicatorBuilder udpReplicatorBuilder=new UdpReplicatorBuilder(8078,"String_Node_Str");
  udpReplicatorBuilder.isMultiCast(true);
  udpReplicatorBuilder.networkInterface(NetworkInterface.getByName("String_Node_Str"));
  assertTrue(identifier >= 1 && identifier <= Byte.MAX_VALUE);
  map1=new SharedHashMapBuilder().entries(1000).identifier((byte)identifier).udpReplicatorBuilder(udpReplicatorBuilder).entries(20000).create(getPersistenceFile(),Integer.class,Integer.class);
}
Program: 91284
Project: 91284
Buggy source:
public SocketAddress address(){
  return address;
}

Fixed version (ground truth):
public InetSocketAddress address(){
  return address;
}
Program: 91285
Project: 91285
Buggy source:
Details(@NotNull final SocketAddress address,final byte localIdentifier){
  this.address=address;
  this.localIdentifier=localIdentifier;
}

Fixed version (ground truth):
Details(@NotNull final InetSocketAddress address,final byte localIdentifier){
  this.address=address;
  this.localIdentifier=localIdentifier;
}
Program: 91286
Project: 91286
Buggy source:
/** 
 * @param map
 * @param externalizable
 * @param udpReplicatorBuilder
 * @param serializedEntrySize
 * @throws IOException
 */
UdpReplicator(@NotNull final ReplicatedSharedHashMap map,@NotNull final ReplicatedSharedHashMap.EntryExternalizable externalizable,@NotNull final UdpReplicatorBuilder udpReplicatorBuilder,int serializedEntrySize) throws IOException {
  super("String_Node_Str" + map.identifier());
  this.udpReplicatorBuilder=udpReplicatorBuilder;
  this.writer=new UdpReplicator.UdpSocketChannelEntryWriter(serializedEntrySize,externalizable);
  this.reader=new UdpReplicator.UdpSocketChannelEntryReader(serializedEntrySize,externalizable);
  if (udpReplicatorBuilder.throttle() > 0)   throttler=new Throttler(selector,100,serializedEntrySize,udpReplicatorBuilder.throttle());
  final InetSocketAddress address=new InetSocketAddress(udpReplicatorBuilder.broadcastAddress(),udpReplicatorBuilder.port());
  pendingRegistrations=new ConcurrentLinkedQueue<Runnable>();
  final Details connectionDetails=new Details(address,map.identifier());
  serverConnector=new ServerConnector(connectionDetails);
  this.executorService.execute(new Runnable(){
    @Override public void run(){
      try {
        process();
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str",e);
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * @param map
 * @param externalizable
 * @param udpReplicatorBuilder
 * @param serializedEntrySize
 * @throws IOException
 */
UdpReplicator(@NotNull final ReplicatedSharedHashMap map,@NotNull final ReplicatedSharedHashMap.EntryExternalizable externalizable,@NotNull final UdpReplicatorBuilder udpReplicatorBuilder,int serializedEntrySize) throws IOException {
  super("String_Node_Str" + map.identifier());
  this.udpReplicatorBuilder=udpReplicatorBuilder;
  this.writer=new UdpReplicator.UdpSocketChannelEntryWriter(serializedEntrySize,externalizable);
  this.reader=new UdpReplicator.UdpSocketChannelEntryReader(serializedEntrySize,externalizable);
  if (udpReplicatorBuilder.throttle() > 0)   throttler=new Throttler(selector,100,serializedEntrySize,udpReplicatorBuilder.throttle());
  final InetSocketAddress address=new InetSocketAddress(udpReplicatorBuilder.broadcastAddress(),udpReplicatorBuilder.port());
  pendingRegistrations=new ConcurrentLinkedQueue<Runnable>();
  final UdpDetails connectionDetails=new UdpDetails(address,map.identifier(),udpReplicatorBuilder.isMultiCast(),udpReplicatorBuilder.networkInterface());
  serverConnector=new ServerConnector(connectionDetails);
  this.executorService.execute(new Runnable(){
    @Override public void run(){
      try {
        process();
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str",e);
      }
    }
  }
);
}
Program: 91287
Project: 91287
Buggy source:
private ServerConnector(Details connectionDetails){
  super("String_Node_Str",closeables);
  this.details=connectionDetails;
}

Fixed version (ground truth):
private ServerConnector(UdpDetails connectionDetails){
  super("String_Node_Str",closeables);
  this.details=connectionDetails;
}
Program: 91288
Project: 91288
Buggy source:
SelectableChannel doConnect() throws IOException, InterruptedException {
  final DatagramChannel server=DatagramChannel.open();
  server.socket().setBroadcast(true);
  server.configureBlocking(false);
  try {
synchronized (UdpReplicator.this.closeables) {
      server.connect(details.address());
      UdpReplicator.this.closeables.add(server);
    }
  }
 catch (  IOException e) {
    connectLater();
    return null;
  }
  server.setOption(StandardSocketOptions.SO_REUSEADDR,true).setOption(StandardSocketOptions.IP_MULTICAST_LOOP,false).setOption(StandardSocketOptions.SO_BROADCAST,true).setOption(StandardSocketOptions.SO_REUSEADDR,true);
  pendingRegistrations.add(new Runnable(){
    @Override public void run(){
      try {
        server.register(selector,OP_WRITE);
        writeChannel=server;
        if (throttler != null)         throttler.add(server);
      }
 catch (      ClosedChannelException e) {
        LOG.error("String_Node_Str",e);
      }
    }
  }
);
  return server;
}

Fixed version (ground truth):
SelectableChannel doConnect() throws IOException, InterruptedException {
  final DatagramChannel server=DatagramChannel.open();
  server.configureBlocking(false);
  try {
synchronized (UdpReplicator.this.closeables) {
      if (details.isMultiCast) {
        final InetAddress group=InetAddress.getByName(details.address().getHostName());
        server.join(group,details.networkInterface);
      }
 else {
        server.socket().setBroadcast(true);
        server.connect(details.address());
      }
      if (server == null)       throw new NullPointerException("String_Node_Str");
      UdpReplicator.this.closeables.add(server);
    }
  }
 catch (  IOException e) {
    if (LOG.isDebugEnabled())     LOG.debug("String_Node_Str" + details,e);
    connectLater();
    return null;
  }
  server.setOption(StandardSocketOptions.SO_REUSEADDR,true).setOption(StandardSocketOptions.IP_MULTICAST_LOOP,false).setOption(StandardSocketOptions.SO_BROADCAST,true).setOption(StandardSocketOptions.SO_REUSEADDR,true);
  pendingRegistrations.add(new Runnable(){
    @Override public void run(){
      try {
        server.register(selector,OP_WRITE);
        writeChannel=server;
        if (throttler != null)         throttler.add(server);
      }
 catch (      ClosedChannelException e) {
        LOG.error("String_Node_Str",e);
      }
    }
  }
);
  return server;
}
Program: 91289
Project: 91289
Buggy source:
private void disableWrites(){
  try {
    final SelectionKey selectionKey=writeChannel.keyFor(this.selector);
    selectionKey.interestOps(selectionKey.interestOps() & ~OP_WRITE);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private void disableWrites(){
  if (writeChannel == null)   return;
  try {
    final SelectionKey selectionKey=writeChannel.keyFor(this.selector);
    selectionKey.interestOps(selectionKey.interestOps() & ~OP_WRITE);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
}
Program: 91290
Project: 91290
Buggy source:
private void enableWrites(){
  try {
    final SelectionKey selectionKey=writeChannel.keyFor(this.selector);
    if (selectionKey != null)     selectionKey.interestOps(selectionKey.interestOps() | OP_WRITE);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private void enableWrites(){
  if (writeChannel == null)   return;
  try {
    final SelectionKey selectionKey=writeChannel.keyFor(this.selector);
    if (selectionKey != null)     selectionKey.interestOps(selectionKey.interestOps() | OP_WRITE);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
}
Program: 91291
Project: 91291
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + actualSegments() + "String_Node_Str"+ minSegments()+ "String_Node_Str"+ actualEntriesPerSegment()+ "String_Node_Str"+ entrySize()+ "String_Node_Str"+ entryAndValueAlignment()+ "String_Node_Str"+ entries()+ "String_Node_Str"+ replicas()+ "String_Node_Str"+ transactional()+ "String_Node_Str"+ lockTimeOutMS()+ "String_Node_Str"+ metaDataBytes()+ "String_Node_Str"+ eventListener()+ "String_Node_Str"+ errorListener()+ "String_Node_Str"+ putReturnsNull()+ "String_Node_Str"+ removeReturnsNull()+ "String_Node_Str"+ generatedKeyType()+ "String_Node_Str"+ generatedValueType()+ "String_Node_Str"+ largeSegments()+ "String_Node_Str"+ canReplicate()+ "String_Node_Str"+ identifier()+ "String_Node_Str"+ tcpReplication()+ "String_Node_Str"+ udpReplication()+ "String_Node_Str"+ timeProvider()+ '}';
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + actualSegments() + "String_Node_Str"+ minSegments()+ "String_Node_Str"+ actualEntriesPerSegment()+ "String_Node_Str"+ entrySize()+ "String_Node_Str"+ entryAndValueAlignment()+ "String_Node_Str"+ entries()+ "String_Node_Str"+ replicas()+ "String_Node_Str"+ transactional()+ "String_Node_Str"+ lockTimeOutMS()+ "String_Node_Str"+ metaDataBytes()+ "String_Node_Str"+ eventListener()+ "String_Node_Str"+ errorListener()+ "String_Node_Str"+ putReturnsNull()+ "String_Node_Str"+ removeReturnsNull()+ "String_Node_Str"+ generatedKeyType()+ "String_Node_Str"+ generatedValueType()+ "String_Node_Str"+ largeSegments()+ "String_Node_Str"+ canReplicate()+ "String_Node_Str"+ identifierToString()+ "String_Node_Str"+ tcpReplication()+ "String_Node_Str"+ udpReplication()+ "String_Node_Str"+ timeProvider()+ '}';
}
Program: 91292
Project: 91292
Buggy source:
@Before public void setup() throws IOException {
  map1=newTcpSocketShmIntString((byte)1,8076,new InetSocketAddress("String_Node_Str",8077),new InetSocketAddress("String_Node_Str",8078),new InetSocketAddress("String_Node_Str",8079));
  map2=newTcpSocketShmIntString((byte)2,8077,new InetSocketAddress("String_Node_Str",8078),new InetSocketAddress("String_Node_Str",8079));
  map3=newTcpSocketShmIntString((byte)3,8078,new InetSocketAddress("String_Node_Str",8079));
  map4=newTcpSocketShmIntString((byte)4,8079);
}

Fixed version (ground truth):
@Before public void setup() throws IOException {
  map1=newTcpSocketShmIntString((byte)1,8086,new InetSocketAddress("String_Node_Str",8087),new InetSocketAddress("String_Node_Str",8088),new InetSocketAddress("String_Node_Str",8089));
  map2=newTcpSocketShmIntString((byte)2,8087,new InetSocketAddress("String_Node_Str",8088),new InetSocketAddress("String_Node_Str",8089));
  map3=newTcpSocketShmIntString((byte)3,8088,new InetSocketAddress("String_Node_Str",8089));
  map4=newTcpSocketShmIntString((byte)4,8089);
}
Program: 91293
Project: 91293
Buggy source:
@Test @Ignore public void testContinueToPublish() throws IOException, InterruptedException {
  for (; ; ) {
    for (int i=0; i < 1024; i++) {
      Thread.sleep(1000);
      System.out.println(map2);
    }
  }
}

Fixed version (ground truth):
@Test @Ignore public void testContinueToPublish() throws IOException, InterruptedException {
  for (; ; ) {
    for (int i=0; i < 1024; i++) {
      Thread.sleep(1000);
      map2.put(1 + (i * 2),"String_Node_Str");
      System.out.println(map2);
    }
  }
}
Program: 91294
Project: 91294
Buggy source:
Details(@NotNull SocketAddress address,@NotNull Set<Closeable> closeables,byte identifier,@NotNull Queue<Runnable> pendingRegistrations){
  this.address=address;
  this.pendingRegistrations=pendingRegistrations;
  this.closeables=closeables;
  this.identifier=identifier;
}

Fixed version (ground truth):
Details(@NotNull SocketAddress address,@NotNull Set<Closeable> closeables,byte identifier){
  this.address=address;
  this.closeables=closeables;
  this.identifier=identifier;
}
Program: 91297
Project: 91297
Buggy source:
/** 
 * @param map
 * @param udpReplicatorBuilder
 * @param udpModificationIterator
 * @param entrySize
 * @param externalizable
 * @throws IOException
 */
UdpReplicator(@NotNull final ReplicatedSharedHashMap map,@NotNull final UdpReplicatorBuilder udpReplicatorBuilder,@NotNull final ModificationIterator udpModificationIterator,int entrySize,@NotNull final ReplicatedSharedHashMap.EntryExternalizable externalizable) throws IOException {
  super("String_Node_Str" + map.identifier());
  this.udpReplicatorBuilder=udpReplicatorBuilder;
  this.udpModificationIterator=udpModificationIterator;
  this.writer=new UdpReplicator.UdpSocketChannelEntryWriter(entrySize,externalizable);
  this.reader=new UdpReplicator.UdpSocketChannelEntryReader(entrySize,externalizable);
  this.maxBytesInInterval=(TimeUnit.SECONDS.toMillis(udpReplicatorBuilder.throttle()) * throttleInterval * BITS_IN_A_BYTE) - entrySize;
  final InetSocketAddress address=new InetSocketAddress(udpReplicatorBuilder.broadcastAddress(),udpReplicatorBuilder.port());
  pendingRegistrations=new ConcurrentLinkedQueue<Runnable>();
  final Details connectionDetails=new Details(address,closeables,map.identifier(),pendingRegistrations);
  serverConnector=new ServerConnector(connectionDetails);
  executorService.execute(new Runnable(){
    @Override public void run(){
      try {
        process();
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str",e);
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * @param map
 * @param udpReplicatorBuilder
 * @param udpModificationIterator
 * @param entrySize
 * @param externalizable
 * @throws IOException
 */
UdpReplicator(@NotNull final ReplicatedSharedHashMap map,@NotNull final UdpReplicatorBuilder udpReplicatorBuilder,@NotNull final ModificationIterator udpModificationIterator,int entrySize,@NotNull final ReplicatedSharedHashMap.EntryExternalizable externalizable) throws IOException {
  super("String_Node_Str" + map.identifier());
  this.udpReplicatorBuilder=udpReplicatorBuilder;
  this.udpModificationIterator=udpModificationIterator;
  this.writer=new UdpReplicator.UdpSocketChannelEntryWriter(entrySize,externalizable);
  this.reader=new UdpReplicator.UdpSocketChannelEntryReader(entrySize,externalizable);
  this.maxBytesInInterval=(TimeUnit.SECONDS.toMillis(udpReplicatorBuilder.throttle()) * throttleInterval * BITS_IN_A_BYTE) - entrySize;
  final InetSocketAddress address=new InetSocketAddress(udpReplicatorBuilder.broadcastAddress(),udpReplicatorBuilder.port());
  pendingRegistrations=new ConcurrentLinkedQueue<Runnable>();
  final Details connectionDetails=new Details(address,closeables,map.identifier());
  serverConnector=new ServerConnector(connectionDetails);
  executorService.execute(new Runnable(){
    @Override public void run(){
      try {
        process();
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str",e);
      }
    }
  }
);
}