nus-yam/ex-repair huggingface dataset:
Program: 91218
Project: 91218
Buggy source:
@Override public void onResume(){
  super.onResume();
  addTextChangedListeners();
}

Fixed version (ground truth):
@Override public void onResume(){
  super.onResume();
  String value=etBuyBtc.getText().toString();
  if (!value.isEmpty()) {
    BigDecimal btc;
    try {
      btc=new BigDecimal(value);
      queryPricing(btc,null);
    }
 catch (    NumberFormatException numberFormatException) {
    }
  }
  addTextChangedListeners();
}
Program: 91220
Project: 91220
Buggy source:
@Override public void onResume(){
  super.onResume();
  addTextChangedListeners();
}

Fixed version (ground truth):
@Override public void onResume(){
  super.onResume();
  String value=etSellBtc.getText().toString();
  if (!value.isEmpty()) {
    BigDecimal btc;
    try {
      btc=new BigDecimal(value);
      queryPricing(btc,null);
    }
 catch (    NumberFormatException numberFormatException) {
    }
  }
  addTextChangedListeners();
}
Program: 91222
Project: 91222
Buggy source:
/** 
 * Show a dialog with a buttons that displays a message. Click the message or the back button to make it disappear.
 */
public static void showSimpleMessageDialog(final Context context,String message,final Runnable okayRunner,@StringRes int okayButtonText,final Runnable postRunner){
  LayoutInflater inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  final View layout=inflater.inflate(R.layout.simple_message_dialog,null);
  AlertDialog.Builder builder=new AlertDialog.Builder(context).setView(layout);
  final AlertDialog dialog=builder.create();
  TextView tvMessage=((TextView)layout.findViewById(R.id.tvMessage));
  tvMessage.setText(message);
  TextView okButton=(TextView)layout.findViewById(R.id.btOk);
  okButton.setText(okayButtonText);
  okButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      dialog.dismiss();
      if (okayRunner != null) {
        okayRunner.run();
      }
    }
  }
);
  dialog.setOnDismissListener(new DialogInterface.OnDismissListener(){
    @Override public void onDismiss(    DialogInterface dialog){
      if (postRunner != null) {
        postRunner.run();
      }
    }
  }
);
  dialog.show();
}

Fixed version (ground truth):
/** 
 * Show a dialog with a buttons that displays a message. Click the message or the back button to make it disappear.
 */
public static void showSimpleMessageDialog(final Context context,String message,final Runnable okayRunner,int okayButtonText,final Runnable postRunner){
  LayoutInflater inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  final View layout=inflater.inflate(R.layout.simple_message_dialog,null);
  AlertDialog.Builder builder=new AlertDialog.Builder(context).setView(layout);
  final AlertDialog dialog=builder.create();
  TextView tvMessage=((TextView)layout.findViewById(R.id.tvMessage));
  tvMessage.setText(message);
  TextView okButton=(TextView)layout.findViewById(R.id.btOk);
  okButton.setText(okayButtonText);
  okButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      dialog.dismiss();
      if (okayRunner != null) {
        okayRunner.run();
      }
    }
  }
);
  dialog.setOnDismissListener(new DialogInterface.OnDismissListener(){
    @Override public void onDismiss(    DialogInterface dialog){
      if (postRunner != null) {
        postRunner.run();
      }
    }
  }
);
  dialog.show();
}
Program: 91223
Project: 91223
Buggy source:
private UnsignedTransaction(List<TransactionOutput> outputs,List<UnspentTransactionOutput> funding,IPublicKeyRing keyRing,boolean isPop,NetworkParameters network){
  _network=network;
  _outputs=outputs.toArray(new TransactionOutput[]{});
  _funding=funding.toArray(new UnspentTransactionOutput[]{});
  _signingRequests=new SigningRequest[_funding.length];
  _isPop=isPop;
  TransactionInput[] inputs=new TransactionInput[_funding.length];
  for (int i=0; i < _funding.length; i++) {
    inputs[i]=new TransactionInput(_funding[i].outPoint,ScriptInput.EMPTY);
    if (isPop) {
      inputs[i].sequence=0;
    }
  }
  Transaction transaction=new Transaction(1,inputs,_outputs,isPop ? MAX_LOCK_TIME : 0);
  for (int i=0; i < _funding.length; i++) {
    UnspentTransactionOutput f=_funding[i];
    if (!(f.script instanceof ScriptOutputStandard)) {
      throw new RuntimeException("String_Node_Str");
    }
    byte[] addressBytes=((ScriptOutputStandard)f.script).getAddressBytes();
    Address address=Address.fromStandardBytes(addressBytes,_network);
    PublicKey publicKey=keyRing.findPublicKeyByAddress(address);
    if (publicKey == null) {
      throw new RuntimeException("String_Node_Str");
    }
    inputs[i].script=ScriptInput.fromOutputScript(_funding[i].script);
    Sha256Hash hash=hashTransaction(transaction);
    inputs[i]=new TransactionInput(_funding[i].outPoint,ScriptInput.EMPTY);
    _signingRequests[i]=new SigningRequest(publicKey,hash);
  }
}

Fixed version (ground truth):
protected UnsignedTransaction(List<TransactionOutput> outputs,List<UnspentTransactionOutput> funding,IPublicKeyRing keyRing,NetworkParameters network){
  _network=network;
  _outputs=outputs.toArray(new TransactionOutput[]{});
  _funding=funding.toArray(new UnspentTransactionOutput[]{});
  _signingRequests=new SigningRequest[_funding.length];
  TransactionInput[] inputs=new TransactionInput[_funding.length];
  for (int i=0; i < _funding.length; i++) {
    inputs[i]=new TransactionInput(_funding[i].outPoint,ScriptInput.EMPTY,getDefaultSequenceNumber());
  }
  Transaction transaction=new Transaction(1,inputs,_outputs,getLockTime());
  for (int i=0; i < _funding.length; i++) {
    UnspentTransactionOutput f=_funding[i];
    if (!(f.script instanceof ScriptOutputStandard)) {
      throw new RuntimeException("String_Node_Str");
    }
    byte[] addressBytes=((ScriptOutputStandard)f.script).getAddressBytes();
    Address address=Address.fromStandardBytes(addressBytes,_network);
    PublicKey publicKey=keyRing.findPublicKeyByAddress(address);
    if (publicKey == null) {
      throw new RuntimeException("String_Node_Str");
    }
    inputs[i].script=ScriptInput.fromOutputScript(_funding[i].script);
    Sha256Hash hash=hashTransaction(transaction);
    inputs[i]=new TransactionInput(_funding[i].outPoint,ScriptInput.EMPTY);
    _signingRequests[i]=new SigningRequest(publicKey,hash);
  }
}
Program: 91224
Project: 91224
Buggy source:
public static Transaction finalizeTransaction(UnsignedTransaction unsigned,List<byte[]> signatures){
  TransactionInput[] inputs=new TransactionInput[unsigned._funding.length];
  for (int i=0; i < unsigned._funding.length; i++) {
    ScriptInputStandard script=new ScriptInputStandard(signatures.get(i),unsigned._signingRequests[i].publicKey.getPublicKeyBytes());
    inputs[i]=new TransactionInput(unsigned._funding[i].outPoint,script);
    if (unsigned._isPop) {
      inputs[i].sequence=0;
    }
  }
  Transaction transaction=new Transaction(1,inputs,unsigned._outputs,unsigned._isPop ? MAX_LOCK_TIME : 0);
  return transaction;
}

Fixed version (ground truth):
public static Transaction finalizeTransaction(UnsignedTransaction unsigned,List<byte[]> signatures){
  TransactionInput[] inputs=new TransactionInput[unsigned._funding.length];
  for (int i=0; i < unsigned._funding.length; i++) {
    ScriptInputStandard script=new ScriptInputStandard(signatures.get(i),unsigned._signingRequests[i].publicKey.getPublicKeyBytes());
    inputs[i]=new TransactionInput(unsigned._funding[i].outPoint,script,unsigned.getDefaultSequenceNumber());
  }
  Transaction transaction=new Transaction(1,inputs,unsigned._outputs,unsigned.getLockTime());
  return transaction;
}
Program: 91225
Project: 91225
Buggy source:
@Override public boolean handle(StringHandlerActivity handlerActivity,String content){
  if (!isBtcpopURI(content)) {
    return false;
  }
  PopRequest popRequest;
  try {
    popRequest=new PopRequest(content);
  }
 catch (  IllegalArgumentException e) {
    handlerActivity.finishError(R.string.invalid_pop_uri,content);
    return false;
  }
  Intent intent=new Intent(handlerActivity,PopActivity.class);
  intent.putExtra("String_Node_Str",popRequest);
  intent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
  handlerActivity.startActivity(intent);
  handlerActivity.finishOk();
  return true;
}

Fixed version (ground truth):
@Override public boolean handle(StringHandlerActivity handlerActivity,String content){
  if (!isBtcpopURI(content)) {
    return false;
  }
  PopRequest popRequest;
  try {
    popRequest=new PopRequest(content);
  }
 catch (  IllegalArgumentException e) {
    handlerActivity.finishError(R.string.pop_invalid_pop_uri,content);
    return false;
  }
  Intent intent=new Intent(handlerActivity,PopActivity.class);
  intent.putExtra("String_Node_Str",popRequest);
  intent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
  handlerActivity.startActivity(intent);
  handlerActivity.finishOk();
  return true;
}
Program: 91226
Project: 91226
Buggy source:
private void clicked(int digit){
  if (digit == DEL) {
    if (_entry.length() == 0) {
      return;
    }
    _entry=_entry.substring(0,_entry.length() - 1);
  }
 else   if (digit == DOT) {
    if (hasDot()) {
      return;
    }
    if (_maxDecimals == 0) {
      return;
    }
    if (_entry.length() == 0) {
      _entry="String_Node_Str";
    }
 else {
      _entry=_entry + '.';
    }
  }
 else {
    if (digit == 0 && _entry.startsWith("String_Node_Str") && !hasDot()) {
      return;
    }
    if (hasDot()) {
      if (decimalsAfterDot() >= _maxDecimals) {
        return;
      }
    }
 else {
      if (decimalsBeforeDot() >= MAX_DIGITS_BEFORE_DOT) {
        return;
      }
    }
    _entry=_entry + (digit);
  }
  _listener.onEntryChanged(_entry);
  if (hasDot()) {
  }
}

Fixed version (ground truth):
private void clicked(int digit){
  if (digit == DEL) {
    if (_entry.length() == 0) {
      return;
    }
    _entry=_entry.substring(0,_entry.length() - 1);
  }
 else   if (digit == DOT) {
    if (hasDot()) {
      return;
    }
    if (_maxDecimals == 0) {
      return;
    }
    if (_entry.length() == 0) {
      _entry="String_Node_Str";
    }
 else {
      _entry=_entry + '.';
    }
  }
 else {
    if (digit == 0 && _entry.equals("String_Node_Str")) {
      return;
    }
    if (hasDot()) {
      if (decimalsAfterDot() >= _maxDecimals) {
        return;
      }
    }
 else {
      if (decimalsBeforeDot() >= MAX_DIGITS_BEFORE_DOT) {
        return;
      }
    }
    _entry=_entry + (digit);
  }
  _listener.onEntryChanged(_entry);
  if (hasDot()) {
  }
}
Program: 91227
Project: 91227
Buggy source:
public FortunaRandomSource(){
  fortuna=Fortuna.createInstance(Iterables.concat(jmxSources(),defaultSources(),linuxSource()));
}

Fixed version (ground truth):
public FortunaRandomSource(){
  fortuna=Fortuna.createInstance(Iterables.concat(jmxSources(),defaultSources(),platformSource()));
}
Program: 91228
Project: 91228
Buggy source:
private static Iterable<EntropySource> defaultSources(){
  ImmutableList.Builder<EntropySource> b=ImmutableList.builder();
  b.add(new SchedulingEntropySource(),new GarbageCollectorEntropySource(),new LoadAverageEntropySource(),new FreeMemoryEntropySource(),new ThreadTimeEntropySource(),new UptimeEntropySource());
  if (new File("String_Node_Str").exists()) {
    b.add(new URandomEntropySource());
  }
  return b.build();
}

Fixed version (ground truth):
private static Iterable<EntropySource> defaultSources(){
  ImmutableList.Builder<EntropySource> b=ImmutableList.builder();
  b.add(new SchedulingEntropySource(),new GarbageCollectorEntropySource(),new LoadAverageEntropySource(),new FreeMemoryEntropySource(),new ThreadTimeEntropySource(),new UptimeEntropySource());
  if (new File("String_Node_Str").exists()) {
    b.add(new PlatformEntropySource());
  }
  return b.build();
}
Program: 91231
Project: 91231
Buggy source:
@Override public void delete(PushApplication pushApplication){
  PushApplication entity=entityManager.find(PushApplication.class,pushApplication.getId());
  final List<Variant> variants=entity.getVariants();
  if (!variants.isEmpty()) {
    createQuery("String_Node_Str").setParameter("String_Node_Str",variants).executeUpdate();
  }
  super.delete(entity);
}

Fixed version (ground truth):
@Override public void delete(PushApplication pushApplication){
  PushApplication entity=entityManager.find(PushApplication.class,pushApplication.getId());
  final List<Variant> variants=entity.getVariants();
  if (!variants.isEmpty()) {
    entityManager.createQuery("String_Node_Str").setParameter("String_Node_Str",variants).executeUpdate();
  }
  super.delete(entity);
}
Program: 91232
Project: 91232
Buggy source:
@Override public void deletePushInformationOlderThan(Date oldest){
  createQuery("String_Node_Str").setParameter("String_Node_Str",oldest).executeUpdate();
  int affectedRows=createQuery("String_Node_Str").setParameter("String_Node_Str",oldest).executeUpdate();
  logger.info("String_Node_Str" + affectedRows + "String_Node_Str");
}

Fixed version (ground truth):
@Override public void deletePushInformationOlderThan(Date oldest){
  entityManager.createQuery("String_Node_Str").setParameter("String_Node_Str",oldest).executeUpdate();
  int affectedRows=entityManager.createQuery("String_Node_Str").setParameter("String_Node_Str",oldest).executeUpdate();
  logger.info("String_Node_Str" + affectedRows + "String_Node_Str");
}
Program: 91233
Project: 91233
Buggy source:
@DELETE @Path("String_Node_Str") public Response deleteVariant(@PathParam("String_Node_Str") String variantId){
  Variant variant=searchManager.getSearchService().findByVariantIDForDeveloper(variantId);
  if (variant != null) {
    logger.log(Level.FINEST,"String_Node_Str" + variant.getClass().getSimpleName());
    variantService.removeVariant(variant);
    return Response.noContent().build();
  }
  return Response.status(Response.Status.NOT_FOUND).entity("String_Node_Str").build();
}

Fixed version (ground truth):
@DELETE @Path("String_Node_Str") public Response deleteVariant(@PathParam("String_Node_Str") String variantId){
  Variant variant=variantService.findByVariantID(variantId);
  if (variant != null) {
    logger.log(Level.FINEST,"String_Node_Str" + variant.getClass().getSimpleName());
    variantService.removeVariant(variant);
    return Response.noContent().build();
  }
  return Response.status(Response.Status.NOT_FOUND).entity("String_Node_Str").build();
}
Program: 91234
Project: 91234
Buggy source:
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) public javax.ws.rs.core.Response resetSecret(@PathParam("String_Node_Str") String variantId){
  Variant variant=searchManager.getSearchService().findByVariantIDForDeveloper(variantId);
  if (variant != null) {
    logger.log(Level.FINEST,"String_Node_Str" + variant.getClass().getSimpleName());
    String newSecret=UUID.randomUUID().toString();
    variant.setSecret(newSecret);
    variantService.updateVariant(variant);
    return Response.ok(variant).build();
  }
  return Response.status(Response.Status.NOT_FOUND).entity("String_Node_Str").build();
}

Fixed version (ground truth):
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) public javax.ws.rs.core.Response resetSecret(@PathParam("String_Node_Str") String variantId){
  Variant variant=variantService.findByVariantID(variantId);
  if (variant != null) {
    logger.log(Level.FINEST,"String_Node_Str" + variant.getClass().getSimpleName());
    String newSecret=UUID.randomUUID().toString();
    variant.setSecret(newSecret);
    variantService.updateVariant(variant);
    return Response.ok(variant).build();
  }
  return Response.status(Response.Status.NOT_FOUND).entity("String_Node_Str").build();
}
Program: 91235
Project: 91235
Buggy source:
@GET @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response findVariantById(@PathParam("String_Node_Str") String variantId){
  Variant variant=searchManager.getSearchService().findByVariantIDForDeveloper(variantId);
  if (variant != null) {
    return Response.ok(variant).build();
  }
  return Response.status(Response.Status.NOT_FOUND).entity("String_Node_Str").build();
}

Fixed version (ground truth):
@GET @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response findVariantById(@PathParam("String_Node_Str") String variantId){
  Variant variant=variantService.findByVariantID(variantId);
  if (variant != null) {
    return Response.ok(variant).build();
  }
  return Response.status(Response.Status.NOT_FOUND).entity("String_Node_Str").build();
}
Program: 91236
Project: 91236
Buggy source:
protected PushSearchService getSearch(){
  LOGGER.info("String_Node_Str");
  LOGGER.info("String_Node_Str" + httpServletRequest.isUserInRole("String_Node_Str"));
  LOGGER.info("String_Node_Str");
  return searchManager.getSearchService();
}

Fixed version (ground truth):
protected PushSearchService getSearch(){
  return searchManager.getSearchService();
}
Program: 91237
Project: 91237
Buggy source:
@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)getSearch().findByVariantIDForDeveloper(androidID);
  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.findByVariantID(androidID);
  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: 91238
Project: 91238
Buggy source:
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) public Response updateChromePackagedAppVariation(@PathParam("String_Node_Str") String id,@PathParam("String_Node_Str") String chromeAppID,ChromePackagedAppVariant updatedChromePackagedApplication){
  ChromePackagedAppVariant chromePackagedAppVariant=(ChromePackagedAppVariant)getSearch().findByVariantIDForDeveloper(chromeAppID);
  if (chromePackagedAppVariant != null) {
    if (updatedChromePackagedApplication.getClientSecret() == null) {
      return Response.status(Response.Status.BAD_REQUEST).build();
    }
    chromePackagedAppVariant.setClientId(updatedChromePackagedApplication.getClientId());
    chromePackagedAppVariant.setClientSecret(updatedChromePackagedApplication.getClientSecret());
    chromePackagedAppVariant.setRefreshToken(updatedChromePackagedApplication.getRefreshToken());
    chromePackagedAppVariant.setName(updatedChromePackagedApplication.getName());
    chromePackagedAppVariant.setDescription(updatedChromePackagedApplication.getDescription());
    variantService.updateVariant(chromePackagedAppVariant);
    return Response.noContent().build();
  }
  return Response.status(Response.Status.NOT_FOUND).entity("String_Node_Str").build();
}

Fixed version (ground truth):
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) public Response updateChromePackagedAppVariation(@PathParam("String_Node_Str") String id,@PathParam("String_Node_Str") String chromeAppID,ChromePackagedAppVariant updatedChromePackagedApplication){
  ChromePackagedAppVariant chromePackagedAppVariant=(ChromePackagedAppVariant)variantService.findByVariantID(chromeAppID);
  if (chromePackagedAppVariant != null) {
    if (updatedChromePackagedApplication.getClientSecret() == null) {
      return Response.status(Response.Status.BAD_REQUEST).build();
    }
    chromePackagedAppVariant.setClientId(updatedChromePackagedApplication.getClientId());
    chromePackagedAppVariant.setClientSecret(updatedChromePackagedApplication.getClientSecret());
    chromePackagedAppVariant.setRefreshToken(updatedChromePackagedApplication.getRefreshToken());
    chromePackagedAppVariant.setName(updatedChromePackagedApplication.getName());
    chromePackagedAppVariant.setDescription(updatedChromePackagedApplication.getDescription());
    variantService.updateVariant(chromePackagedAppVariant);
    return Response.noContent().build();
  }
  return Response.status(Response.Status.NOT_FOUND).entity("String_Node_Str").build();
}
Program: 91239
Project: 91239
Buggy source:
@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)getSearch().findByVariantIDForDeveloper(simplePushID);
  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.findByVariantID(simplePushID);
  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: 91240
Project: 91240
Buggy source:
@PUT @Path("String_Node_Str") @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.APPLICATION_JSON) public Response updateiOSVariant(@MultipartForm iOSApplicationUploadForm updatedForm,@PathParam("String_Node_Str") String pushApplicationId,@PathParam("String_Node_Str") String iOSID){
  iOSVariant iOSVariant=(iOSVariant)getSearch().findByVariantIDForDeveloper(iOSID);
  if (iOSVariant != null) {
    if (!validateCertificateAndPassphrase(updatedForm)) {
      return Response.status(Status.BAD_REQUEST).build();
    }
    iOSVariant.setName(updatedForm.getName());
    iOSVariant.setDescription(updatedForm.getDescription());
    iOSVariant.setPassphrase(updatedForm.getPassphrase());
    iOSVariant.setCertificate(updatedForm.getCertificate());
    iOSVariant.setProduction(updatedForm.getProduction());
    try {
      validateModelClass(iOSVariant);
    }
 catch (    ConstraintViolationException cve) {
      ResponseBuilder builder=createBadRequestResponse(cve.getConstraintViolations());
      return builder.build();
    }
    variantService.updateVariant(iOSVariant);
    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.MULTIPART_FORM_DATA) @Produces(MediaType.APPLICATION_JSON) public Response updateiOSVariant(@MultipartForm iOSApplicationUploadForm updatedForm,@PathParam("String_Node_Str") String pushApplicationId,@PathParam("String_Node_Str") String iOSID){
  iOSVariant iOSVariant=(iOSVariant)variantService.findByVariantID(iOSID);
  if (iOSVariant != null) {
    if (!validateCertificateAndPassphrase(updatedForm)) {
      return Response.status(Status.BAD_REQUEST).build();
    }
    iOSVariant.setName(updatedForm.getName());
    iOSVariant.setDescription(updatedForm.getDescription());
    iOSVariant.setPassphrase(updatedForm.getPassphrase());
    iOSVariant.setCertificate(updatedForm.getCertificate());
    iOSVariant.setProduction(updatedForm.getProduction());
    try {
      validateModelClass(iOSVariant);
    }
 catch (    ConstraintViolationException cve) {
      ResponseBuilder builder=createBadRequestResponse(cve.getConstraintViolations());
      return builder.build();
    }
    variantService.updateVariant(iOSVariant);
    return Response.noContent().build();
  }
  return Response.status(Status.NOT_FOUND).entity("String_Node_Str").build();
}
Program: 91241
Project: 91241
Buggy source:
@Test public void findVariantByIdForDeveloper(){
  final AndroidVariant av=new AndroidVariant();
  av.setGoogleKey("String_Node_Str");
  av.setDeveloper("String_Node_Str");
  final String uuid=av.getVariantID();
  variantDao.create(av);
  assertThat(variantDao.findByVariantIDForDeveloper(uuid,"String_Node_Str")).isNotNull();
  assertThat(variantDao.findByVariantIDForDeveloper(null,"String_Node_Str")).isNull();
  assertThat(variantDao.findByVariantIDForDeveloper(uuid,"String_Node_Str")).isNull();
}

Fixed version (ground truth):
@Test public void findVariantByIdForDeveloper(){
  final AndroidVariant av=new AndroidVariant();
  av.setGoogleKey("String_Node_Str");
  av.setDeveloper("String_Node_Str");
  final String uuid=av.getVariantID();
  variantDao.create(av);
  assertThat(variantDao.findByVariantID(uuid)).isNotNull();
  assertThat(variantDao.findByVariantID(null)).isNull();
}
Program: 91242
Project: 91242
Buggy source:
@Test public void lookupNonExistingVariant(){
  AndroidVariant variant=(AndroidVariant)variantDao.findByVariantIDForDeveloper("String_Node_Str","String_Node_Str");
  assertThat(variant).isNull();
}

Fixed version (ground truth):
@Test public void lookupNonExistingVariant(){
  AndroidVariant variant=(AndroidVariant)variantDao.findByVariantID("String_Node_Str");
  assertThat(variant).isNull();
}
Program: 91243
Project: 91243
Buggy source:
@Module public Beans getBeans(){
  final Beans beans=new Beans();
  beans.addManagedClass(ClientInstallationServiceImpl.class);
  beans.addManagedClass(JPAInstallationDao.class);
  beans.addManagedClass(GenericVariantServiceImpl.class);
  beans.addManagedClass(JPAVariantDao.class);
  beans.addManagedClass(PushSearchByDeveloperServiceImpl.class);
  beans.addManagedClass(PushApplicationServiceImpl.class);
  beans.addManagedClass(JPAPushApplicationDao.class);
  beans.addManagedClass(PushSearchServiceImpl.class);
  beans.addManagedClass(SearchManager.class);
  return beans;
}

Fixed version (ground truth):
@Module public Beans getBeans(){
  final Beans beans=new Beans();
  beans.addManagedClass(ClientInstallationServiceImpl.class);
  beans.addManagedClass(JPAPushMessageInformationDao.class);
  beans.addManagedClass(JPAInstallationDao.class);
  beans.addManagedClass(GenericVariantServiceImpl.class);
  beans.addManagedClass(JPAVariantDao.class);
  beans.addManagedClass(PushSearchByDeveloperServiceImpl.class);
  beans.addManagedClass(PushApplicationServiceImpl.class);
  beans.addManagedClass(JPAPushApplicationDao.class);
  beans.addManagedClass(PushSearchServiceImpl.class);
  beans.addManagedClass(SearchManager.class);
  return beans;
}
Program: 91244
Project: 91244
Buggy source:
@Module public Beans getBeans(){
  final Beans beans=new Beans();
  beans.addManagedClass(JPAVariantDao.class);
  beans.addManagedClass(PushApplicationServiceImpl.class);
  beans.addManagedClass(JPAPushApplicationDao.class);
  beans.addManagedClass(PushSearchByDeveloperServiceImpl.class);
  beans.addManagedClass(PushSearchServiceImpl.class);
  beans.addManagedClass(SearchManager.class);
  return beans;
}

Fixed version (ground truth):
@Module public Beans getBeans(){
  final Beans beans=new Beans();
  beans.addManagedClass(JPAVariantDao.class);
  beans.addManagedClass(JPAInstallationDao.class);
  beans.addManagedClass(JPAPushMessageInformationDao.class);
  beans.addManagedClass(PushApplicationServiceImpl.class);
  beans.addManagedClass(JPAPushApplicationDao.class);
  beans.addManagedClass(PushSearchByDeveloperServiceImpl.class);
  beans.addManagedClass(PushSearchServiceImpl.class);
  beans.addManagedClass(SearchManager.class);
  beans.addManagedClass(InstallationDao.class);
  return beans;
}
Program: 91245
Project: 91245
Buggy source:
/** 
 * Identifies the device/user-agent within its PushNetwork. <ul> <li> APNs: <code>deviceToken</code> <li> GCM: <code>registrationId</code> <li> SimplePush: <code>pushEndpoint</code> </ul>
 * @param deviceToken unique string to identify an Installation with its PushNetwork
 */
public void setDeviceToken(final String deviceToken){
  this.deviceToken=deviceToken;
}

Fixed version (ground truth):
/** 
 * Identifies the device/user-agent within its PushNetwork. <ul> <li> APNs: <code>deviceToken</code> <li> GCM: <code>registrationId</code> <li> SimplePush: <code>pushEndoint</code> </ul>
 * @param deviceToken unique string to identify an Installation with its PushNetwork
 */
public void setDeviceToken(final String deviceToken){
  this.deviceToken=deviceToken;
}
Program: 91246
Project: 91246
Buggy source:
@GET @Produces(MediaType.APPLICATION_JSON) public Response listAlliOSVariantsForPushApp(@Context HttpServletRequest request,@PathParam("String_Node_Str") String pushApplicationID){
  Set<iOSVariant> iosVariants=pushAppService.findByPushApplicationIDForDeveloper(pushApplicationID,request.getUserPrincipal().getName()).getIOSVariants();
  stripPassphraseAndCertificate(iosVariants);
  return Response.ok(iosVariants).build();
}

Fixed version (ground truth):
@GET @Produces(MediaType.APPLICATION_JSON) public Response listAlliOSVariantsForPushApp(@Context HttpServletRequest request,@PathParam("String_Node_Str") String pushApplicationID){
  Collection<iOSVariant> iosVariants=pushAppService.findByPushApplicationIDForDeveloper(pushApplicationID,request.getUserPrincipal().getName()).getIOSVariants();
  stripPassphraseAndCertificate(iosVariants);
  return Response.ok(iosVariants).build();
}
Program: 91247
Project: 91247
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: 91248
Project: 91248
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: 91249
Project: 91249
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: 91250
Project: 91250
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: 91251
Project: 91251
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: 91252
Project: 91252
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: 91253
Project: 91253
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: 91254
Project: 91254
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: 91255
Project: 91255
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: 91256
Project: 91256
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();
}