Program: 8468
Project: 8468
Buggy source:
@SuppressWarnings({"String_Node_Str"}) @RequestMapping(value="String_Node_Str",method=RequestMethod.DELETE) @ResponseBody public ResponseEntity<Resource<?>> deletePropertyReference(final RepositoryRestRequest repoRequest,@PathVariable String id,@PathVariable String property,final @PathVariable String propertyId) throws ResourceNotFoundException, NoSuchMethodException {
  final RepositoryMethodInvoker repoMethodInvoker=repoRequest.getRepositoryMethodInvoker();
  if (!repoMethodInvoker.hasDeleteOne()) {
    throw new NoSuchMethodException();
  }
  Function<ReferencedProperty,Resource<?>> handler=new Function<ReferencedProperty,Resource<?>>(){
    @Override public Resource<?> apply(    ReferencedProperty prop){
      if (null == prop.propertyValue) {
        return null;
      }
      if (prop.property.isCollectionLike()) {
        Collection coll=new ArrayList();
        for (        Object obj : (Collection)prop.propertyValue) {
          BeanWrapper propValWrapper=BeanWrapper.create(obj,conversionService);
          String s=(String)propValWrapper.getProperty(prop.entity.getIdProperty(),String.class,false);
          if (!propertyId.equals(s)) {
            coll.add(obj);
          }
        }
        prop.wrapper.setProperty(prop.property,coll);
      }
 else       if (prop.property.isMap()) {
        Map m=new HashMap();
        for (        Map.Entry<Object,Object> entry : ((Map<Object,Object>)prop.propertyValue).entrySet()) {
          BeanWrapper propValWrapper=BeanWrapper.create(entry.getValue(),conversionService);
          String s=(String)propValWrapper.getProperty(prop.entity.getIdProperty(),String.class,false);
          if (!propertyId.equals(s)) {
            m.put(entry.getKey(),entry.getValue());
          }
        }
        prop.wrapper.setProperty(prop.property,m);
      }
 else {
        prop.wrapper.setProperty(prop.property,null);
      }
      applicationContext.publishEvent(new BeforeLinkDeleteEvent(prop.wrapper.getBean(),prop.propertyValue));
      Object result=repoMethodInvoker.save(prop.wrapper.getBean());
      applicationContext.publishEvent(new AfterLinkDeleteEvent(result,prop.propertyValue));
      return null;
    }
  }
;
  doWithReferencedProperty(repoRequest,id,property,handler);
  return resourceResponse(null,EMPTY_RESOURCE,HttpStatus.NO_CONTENT);
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str"}) @RequestMapping(value="String_Node_Str",method=RequestMethod.DELETE) @ResponseBody @Transactional public ResponseEntity<Resource<?>> deletePropertyReference(final RepositoryRestRequest repoRequest,@PathVariable String id,@PathVariable String property,final @PathVariable String propertyId) throws ResourceNotFoundException, NoSuchMethodException {
  final RepositoryMethodInvoker repoMethodInvoker=repoRequest.getRepositoryMethodInvoker();
  if (!repoMethodInvoker.hasDeleteOne()) {
    throw new NoSuchMethodException();
  }
  Function<ReferencedProperty,Resource<?>> handler=new Function<ReferencedProperty,Resource<?>>(){
    @Override public Resource<?> apply(    ReferencedProperty prop){
      if (null == prop.propertyValue) {
        return null;
      }
      if (prop.property.isCollectionLike()) {
        Collection coll=new ArrayList();
        for (        Object obj : (Collection)prop.propertyValue) {
          BeanWrapper propValWrapper=BeanWrapper.create(obj,conversionService);
          String s=(String)propValWrapper.getProperty(prop.entity.getIdProperty(),String.class,false);
          if (!propertyId.equals(s)) {
            coll.add(obj);
          }
        }
        prop.wrapper.setProperty(prop.property,coll);
      }
 else       if (prop.property.isMap()) {
        Map m=new HashMap();
        for (        Map.Entry<Object,Object> entry : ((Map<Object,Object>)prop.propertyValue).entrySet()) {
          BeanWrapper propValWrapper=BeanWrapper.create(entry.getValue(),conversionService);
          String s=(String)propValWrapper.getProperty(prop.entity.getIdProperty(),String.class,false);
          if (!propertyId.equals(s)) {
            m.put(entry.getKey(),entry.getValue());
          }
        }
        prop.wrapper.setProperty(prop.property,m);
      }
 else {
        prop.wrapper.setProperty(prop.property,null);
      }
      applicationContext.publishEvent(new BeforeLinkDeleteEvent(prop.wrapper.getBean(),prop.propertyValue));
      Object result=repoMethodInvoker.save(prop.wrapper.getBean());
      applicationContext.publishEvent(new AfterLinkDeleteEvent(result,prop.propertyValue));
      return null;
    }
  }
;
  doWithReferencedProperty(repoRequest,id,property,handler);
  return resourceResponse(null,EMPTY_RESOURCE,HttpStatus.NO_CONTENT);
}