Program: 8500
Project: 8500
Buggy source:
/** 
 * Retrieve a linked entity from a parent entity.
 * @param request
 * @param uriBuilder
 * @param repository
 * @param id
 * @param property
 * @param linkedId
 * @return
 * @throws IOException
 */
@SuppressWarnings({"String_Node_Str"}) @RequestMapping(value="String_Node_Str",method={RequestMethod.GET}) @ResponseBody public ResponseEntity<?> linkedEntity(ServletServerHttpRequest request,UriComponentsBuilder uriBuilder,@PathVariable String repository,@PathVariable String id,@PathVariable String property,@PathVariable String linkedId) throws IOException {
  URI baseUri=uriBuilder.build().toUri();
  RepositoryMetadata repoMeta=repositoryMetadataFor(repository);
  if (!repoMeta.exportsMethod(CrudMethod.FIND_ONE)) {
    return negotiateResponse(request,HttpStatus.METHOD_NOT_ALLOWED,new HttpHeaders(),null);
  }
  CrudRepository repo=repoMeta.repository();
  Serializable serId=stringToSerializable(id,(Class<? extends Serializable>)repoMeta.entityMetadata().idAttribute().type());
  if (!repo.exists(serId)) {
    return notFoundResponse(request);
  }
  AttributeMetadata attrMeta;
  if (null == (attrMeta=repoMeta.entityMetadata().attribute(property))) {
    return notFoundResponse(request);
  }
  RepositoryMetadata linkedRepoMeta;
  if (null == (linkedRepoMeta=repositoryMetadataFor(attrMeta))) {
    return notFoundResponse(request);
  }
  if (!linkedRepoMeta.exportsMethod(CrudMethod.FIND_ONE)) {
    return negotiateResponse(request,HttpStatus.METHOD_NOT_ALLOWED,new HttpHeaders(),null);
  }
  CrudRepository linkedRepo=linkedRepoMeta.repository();
  Serializable sChildId=stringToSerializable(linkedId,(Class<? extends Serializable>)linkedRepoMeta.entityMetadata().idAttribute().type());
  Object linkedEntity;
  if (null == (linkedEntity=linkedRepo.findOne(sChildId))) {
    return notFoundResponse(request);
  }
  MapResource res=createResource(linkedRepoMeta.rel(),linkedEntity,linkedRepoMeta.entityMetadata(),baseUri);
  URI selfUri=buildUri(baseUri,linkedRepoMeta.name(),linkedId);
  res.addLink(new SimpleLink(SELF,selfUri));
  publishEvent(new BeforeRenderResourcesEvent(request,repoMeta,res));
  HttpHeaders headers=new HttpHeaders();
  headers.add("String_Node_Str",selfUri.toString());
  return negotiateResponse(request,HttpStatus.OK,headers,res);
}

Fixed version (ground truth):
/** 
 * Retrieve a linked entity from a parent entity.
 * @param request
 * @param uriBuilder
 * @param repository
 * @param id
 * @param property
 * @param linkedId
 * @return
 * @throws IOException
 */
@SuppressWarnings({"String_Node_Str"}) @RequestMapping(value="String_Node_Str",method={RequestMethod.GET}) @ResponseBody public ResponseEntity<?> linkedEntity(ServletServerHttpRequest request,UriComponentsBuilder uriBuilder,@PathVariable String repository,@PathVariable String id,@PathVariable String property,@PathVariable String linkedId) throws IOException {
  URI baseUri=uriBuilder.build().toUri();
  RepositoryMetadata repoMeta=repositoryMetadataFor(repository);
  if (!repoMeta.exportsMethod(CrudMethod.FIND_ONE)) {
    return negotiateResponse(request,HttpStatus.METHOD_NOT_ALLOWED,new HttpHeaders(),null);
  }
  CrudRepository repo=repoMeta.repository();
  Serializable serId=stringToSerializable(id,(Class<? extends Serializable>)repoMeta.entityMetadata().idAttribute().type());
  if (!repo.exists(serId)) {
    return notFoundResponse(request);
  }
  AttributeMetadata attrMeta;
  if (null == (attrMeta=repoMeta.entityMetadata().attribute(property))) {
    return notFoundResponse(request);
  }
  RepositoryMetadata linkedRepoMeta;
  if (null == (linkedRepoMeta=repositoryMetadataFor(attrMeta))) {
    return notFoundResponse(request);
  }
  if (!linkedRepoMeta.exportsMethod(CrudMethod.FIND_ONE)) {
    return negotiateResponse(request,HttpStatus.METHOD_NOT_ALLOWED,new HttpHeaders(),null);
  }
  CrudRepository linkedRepo=linkedRepoMeta.repository();
  Serializable sChildId=stringToSerializable(linkedId,(Class<? extends Serializable>)linkedRepoMeta.entityMetadata().idAttribute().type());
  Object linkedEntity;
  if (null == (linkedEntity=linkedRepo.findOne(sChildId))) {
    return notFoundResponse(request);
  }
  URI selfUri=buildUri(baseUri,linkedRepoMeta.name(),linkedId);
  MapResource res=createResource(linkedRepoMeta.rel(),linkedEntity,linkedRepoMeta.entityMetadata(),selfUri);
  res.addLink(new SimpleLink(SELF,selfUri));
  publishEvent(new BeforeRenderResourcesEvent(request,repoMeta,res));
  HttpHeaders headers=new HttpHeaders();
  headers.add("String_Node_Str",selfUri.toString());
  return negotiateResponse(request,HttpStatus.OK,headers,res);
}