Program: 61194
Project: 61194
Buggy source:
@RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public ModelAndView getRoleResourcesMapping(HttpServletResponse response,@PathVariable("String_Node_Str") Long roleId) throws SyncopeClientCompositeErrorException {
  SyncopeRole role=null;
  if (roleId != null) {
    role=syncopeRoleDAO.find(roleId);
  }
  if (role == null) {
    LOG.error("String_Node_Str" + roleId + "String_Node_Str");
    SyncopeClientCompositeErrorException compositeErrorException=new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);
    SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.RequiredValuesMissing);
    ex.addElement("String_Node_Str");
    compositeErrorException.addException(ex);
    throw compositeErrorException;
  }
  List<SchemaMappingTO> roleMappings=new ArrayList<SchemaMappingTO>();
  Set<TargetResource> resources=role.getTargetResources();
  List<SchemaMappingTO> resourceMappings=null;
  for (  TargetResource resource : resources) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str" + resource + "String_Node_Str");
    }
    List<SchemaMapping> schemaMappings=resource.getMappings();
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str" + resource + "String_Node_Str"+ schemaMappings+ "String_Node_Str");
    }
    resourceMappings=binder.getSchemaMappingTOs(schemaMappings);
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str" + resource + "String_Node_Str"+ resourceMappings+ "String_Node_Str");
    }
    roleMappings.addAll(resourceMappings);
  }
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + roleMappings);
  }
  return new ModelAndView().addObject(roleMappings);
}

Fixed version (ground truth):
@RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public List<SchemaMappingTO> getRoleResourcesMapping(HttpServletResponse response,@PathVariable("String_Node_Str") Long roleId) throws SyncopeClientCompositeErrorException {
  SyncopeRole role=null;
  if (roleId != null) {
    role=syncopeRoleDAO.find(roleId);
  }
  if (role == null) {
    LOG.error("String_Node_Str" + roleId + "String_Node_Str");
    SyncopeClientCompositeErrorException compositeErrorException=new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);
    SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.RequiredValuesMissing);
    ex.addElement("String_Node_Str");
    compositeErrorException.addException(ex);
    throw compositeErrorException;
  }
  List<SchemaMappingTO> roleMappings=new ArrayList<SchemaMappingTO>();
  Set<TargetResource> resources=role.getTargetResources();
  List<SchemaMappingTO> resourceMappings=null;
  for (  TargetResource resource : resources) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str" + resource + "String_Node_Str");
    }
    List<SchemaMapping> schemaMappings=resource.getMappings();
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str" + resource + "String_Node_Str"+ schemaMappings+ "String_Node_Str");
    }
    resourceMappings=binder.getSchemaMappingTOs(schemaMappings);
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str" + resource + "String_Node_Str"+ resourceMappings+ "String_Node_Str");
    }
    roleMappings.addAll(resourceMappings);
  }
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + roleMappings);
  }
  return roleMappings;
}