Program: 8456
Project: 8456
Buggy source:
@SuppressWarnings({"String_Node_Str"}) @RequestMapping(value="String_Node_Str",method=RequestMethod.DELETE) @ResponseBody public ResponseEntity<?> deleteEntity(final RepositoryRestRequest repoRequest,@PathVariable final String id) throws ResourceNotFoundException {
  final RepositoryMethodInvoker repoMethodInvoker=repoRequest.getRepositoryMethodInvoker();
  if (null == repoMethodInvoker || (!repoMethodInvoker.hasFindOne() && !(repoMethodInvoker.hasDeleteOne() || repoMethodInvoker.hasDeleteOneById()))) {
    throw new NoSuchMethodError();
  }
  final Object domainObj=domainClassConverter.convert(id,STRING_TYPE,TypeDescriptor.valueOf(repoRequest.getPersistentEntity().getType()));
  if (null == domainObj) {
    throw new ResourceNotFoundException();
  }
  applicationContext.publishEvent(new BeforeDeleteEvent(domainObj));
  TransactionCallbackWithoutResult callback=new TransactionCallbackWithoutResult(){
    @Override protected void doInTransactionWithoutResult(    TransactionStatus status){
      if (repoMethodInvoker.hasDeleteOneById()) {
        Class<? extends Serializable> idType=(Class<? extends Serializable>)repoRequest.getPersistentEntity().getIdProperty().getType();
        final Serializable idVal=conversionService.convert(id,idType);
        repoMethodInvoker.delete(idVal);
      }
 else       if (repoMethodInvoker.hasDeleteOne()) {
        repoMethodInvoker.delete(domainObj);
      }
    }
  }
;
  if (null != txTmpl) {
    txTmpl.execute(callback);
  }
 else {
    callback.doInTransaction(null);
  }
  applicationContext.publishEvent(new AfterDeleteEvent(domainObj));
  return new ResponseEntity<Object>(HttpStatus.NO_CONTENT);
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str"}) @RequestMapping(value="String_Node_Str",method=RequestMethod.DELETE) @ResponseBody public ResponseEntity<?> deleteEntity(final RepositoryRestRequest repoRequest,@PathVariable final String id) throws ResourceNotFoundException, HttpRequestMethodNotSupportedException {
  final RepositoryMethodInvoker repoMethodInvoker=repoRequest.getRepositoryMethodInvoker();
  if (null == repoMethodInvoker || (!repoMethodInvoker.hasFindOne() && !(repoMethodInvoker.hasDeleteOne() || repoMethodInvoker.hasDeleteOneById()))) {
    throw new HttpRequestMethodNotSupportedException("String_Node_Str");
  }
  ResourceMapping methodMapping=repoRequest.getRepositoryResourceMapping().getResourceMappingFor("String_Node_Str");
  if (null != methodMapping && !methodMapping.isExported()) {
    throw new HttpRequestMethodNotSupportedException("String_Node_Str");
  }
  final Object domainObj=domainClassConverter.convert(id,STRING_TYPE,TypeDescriptor.valueOf(repoRequest.getPersistentEntity().getType()));
  if (null == domainObj) {
    throw new ResourceNotFoundException();
  }
  applicationContext.publishEvent(new BeforeDeleteEvent(domainObj));
  TransactionCallbackWithoutResult callback=new TransactionCallbackWithoutResult(){
    @Override protected void doInTransactionWithoutResult(    TransactionStatus status){
      if (repoMethodInvoker.hasDeleteOneById()) {
        Class<? extends Serializable> idType=(Class<? extends Serializable>)repoRequest.getPersistentEntity().getIdProperty().getType();
        final Serializable idVal=conversionService.convert(id,idType);
        repoMethodInvoker.delete(idVal);
      }
 else       if (repoMethodInvoker.hasDeleteOne()) {
        repoMethodInvoker.delete(domainObj);
      }
    }
  }
;
  if (null != txTmpl) {
    txTmpl.execute(callback);
  }
 else {
    callback.doInTransaction(null);
  }
  applicationContext.publishEvent(new AfterDeleteEvent(domainObj));
  return new ResponseEntity<Object>(HttpStatus.NO_CONTENT);
}