Program: 61367
Project: 61367
Buggy source:
@Transactional @RequestMapping(method=RequestMethod.POST,value="String_Node_Str") public ResourceTO create(HttpServletResponse response,@RequestBody ResourceTO resourceTO) throws IOException {
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
  ResourceDataBinder binder=new ResourceDataBinder(schemaDAO,connectorInstanceDAO);
  if (resourceTO == null) {
    if (log.isErrorEnabled()) {
      log.error("String_Node_Str");
    }
    return throwNotFoundException("String_Node_Str",response);
  }
  Resource actual=null;
  try {
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    Resource resource=binder.getResource(resourceTO);
    if (log.isInfoEnabled()) {
      log.info("String_Node_Str" + resource.getName());
    }
    actual=resourceDAO.save(resource);
    if (actual == null) {
      if (log.isErrorEnabled()) {
        log.error("String_Node_Str");
      }
      SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.Unknown);
      throw ex;
    }
  }
 catch (  SyncopeClientCompositeErrorException e) {
    return throwCompositeException(e,response);
  }
catch (  SyncopeClientException ex) {
    SyncopeClientCompositeErrorException compositeErrorException=new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);
    compositeErrorException.addException(ex);
    return throwCompositeException(compositeErrorException,response);
  }
catch (  Throwable t) {
    if (log.isErrorEnabled()) {
      log.error("String_Node_Str",t);
    }
    SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.Unknown);
    SyncopeClientCompositeErrorException compositeErrorException=new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);
    compositeErrorException.addException(ex);
    return throwCompositeException(compositeErrorException,response);
  }
  response.setStatus(HttpServletResponse.SC_CREATED);
  return binder.getResourceTO(actual);
}

Fixed version (ground truth):
@Transactional @RequestMapping(method=RequestMethod.POST,value="String_Node_Str") public ResourceTO create(HttpServletResponse response,@RequestBody ResourceTO resourceTO) throws IOException {
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
  if (resourceTO == null) {
    if (log.isErrorEnabled()) {
      log.error("String_Node_Str");
    }
    return throwNotFoundException("String_Node_Str",response);
  }
  ResourceDataBinder binder=new ResourceDataBinder(schemaDAO,connectorInstanceDAO);
  Resource actual=null;
  try {
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    Resource resource=null;
    if (resourceDAO.find(resourceTO.getName()) != null) {
      SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.AlreadyExists);
      ex.addElement(resourceTO.getName());
      throw ex;
    }
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    resource=binder.getResource(resourceTO);
    if (log.isInfoEnabled()) {
      log.info("String_Node_Str" + resource.getName());
    }
    actual=resourceDAO.save(resource);
    if (actual == null) {
      if (log.isErrorEnabled()) {
        log.error("String_Node_Str");
      }
      SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.Unknown);
      throw ex;
    }
  }
 catch (  SyncopeClientCompositeErrorException e) {
    return throwCompositeException(e,response);
  }
catch (  SyncopeClientException ex) {
    SyncopeClientCompositeErrorException compositeErrorException=new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);
    compositeErrorException.addException(ex);
    return throwCompositeException(compositeErrorException,response);
  }
catch (  Throwable t) {
    if (log.isErrorEnabled()) {
      log.error("String_Node_Str",t);
    }
    SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.Unknown);
    SyncopeClientCompositeErrorException compositeErrorException=new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);
    compositeErrorException.addException(ex);
    return throwCompositeException(compositeErrorException,response);
  }
  response.setStatus(HttpServletResponse.SC_CREATED);
  return binder.getResourceTO(actual);
}