Program: 14210
Project: 14210
Buggy source:
public DescribeStackResourceResponseType describeStackResource(DescribeStackResourceType request) throws CloudFormationException {
  DescribeStackResourceResponseType reply=request.getReply();
  try {
    final Context ctx=Contexts.lookup();
    checkActionPermission(PolicySpec.CLOUDFORMATION_DESCRIBESTACKRESOURCE,ctx);
    User user=ctx.getUser();
    String userId=user.getUserId();
    String accountId=user.getAccount().getAccountNumber();
    String stackName=request.getStackName();
    if (stackName == null)     throw new ValidationErrorException("String_Node_Str");
    String logicalResourceId=request.getLogicalResourceId();
    if (logicalResourceId == null)     throw new ValidationErrorException("String_Node_Str");
    StackResourceEntity stackResourceEntity=StackResourceEntityManager.describeStackResource(accountId,stackName,logicalResourceId);
    StackResourceDetail stackResourceDetail=new StackResourceDetail();
    stackResourceDetail.setDescription(stackResourceEntity.getDescription());
    stackResourceDetail.setLastUpdatedTimestamp(stackResourceEntity.getLastUpdateTimestamp());
    stackResourceDetail.setLogicalResourceId(stackResourceEntity.getLogicalResourceId());
    stackResourceDetail.setMetadata(stackResourceEntity.getMetadataJson());
    stackResourceDetail.setPhysicalResourceId(stackResourceEntity.getPhysicalResourceId());
    stackResourceDetail.setResourceStatus(stackResourceEntity.getResourceStatus() == null ? null : stackResourceEntity.getResourceStatus().toString());
    stackResourceDetail.setResourceStatusReason(stackResourceEntity.getResourceStatusReason());
    stackResourceDetail.setResourceType(stackResourceEntity.getResourceType());
    stackResourceDetail.setStackId(stackResourceEntity.getStackId());
    stackResourceDetail.setStackName(stackResourceEntity.getStackName());
    DescribeStackResourceResult describeStackResourceResult=new DescribeStackResourceResult();
    describeStackResourceResult.setStackResourceDetail(stackResourceDetail);
    reply.setDescribeStackResourceResult(describeStackResourceResult);
  }
 catch (  Exception ex) {
    handleException(ex);
  }
  return reply;
}

Fixed version (ground truth):
public DescribeStackResourceResponseType describeStackResource(DescribeStackResourceType request) throws CloudFormationException {
  DescribeStackResourceResponseType reply=request.getReply();
  try {
    final Context ctx=Contexts.lookup();
    checkActionPermission(PolicySpec.CLOUDFORMATION_DESCRIBESTACKRESOURCE,ctx);
    User user=ctx.getUser();
    String userId=user.getUserId();
    String accountId=user.getAccount().getAccountNumber();
    String stackName=request.getStackName();
    if (stackName == null)     throw new ValidationErrorException("String_Node_Str");
    String logicalResourceId=request.getLogicalResourceId();
    if (logicalResourceId == null)     throw new ValidationErrorException("String_Node_Str");
    StackResourceEntity stackResourceEntity=StackResourceEntityManager.describeStackResource(accountId,stackName,logicalResourceId);
    StackResourceDetail stackResourceDetail=new StackResourceDetail();
    stackResourceDetail.setDescription(stackResourceEntity.getDescription());
    stackResourceDetail.setLastUpdatedTimestamp(stackResourceEntity.getLastUpdateTimestamp());
    stackResourceDetail.setLogicalResourceId(stackResourceEntity.getLogicalResourceId());
    stackResourceDetail.setMetadata(stackResourceEntity.getMetadataJson());
    stackResourceDetail.setPhysicalResourceId(stackResourceEntity.getPhysicalResourceId());
    stackResourceDetail.setResourceStatus(stackResourceEntity.getResourceStatus() == null ? null : stackResourceEntity.getResourceStatus().toString());
    stackResourceDetail.setResourceStatusReason(stackResourceEntity.getResourceStatusReason());
    stackResourceDetail.setResourceType(stackResourceEntity.getResourceType());
    stackResourceDetail.setStackId(stackResourceEntity.getStackId());
    stackResourceDetail.setStackName(stackResourceEntity.getStackName());
    DescribeStackResourceResult describeStackResourceResult=new DescribeStackResourceResult();
    describeStackResourceResult.setStackResourceDetail(stackResourceDetail);
    reply.setDescribeStackResourceResult(describeStackResourceResult);
  }
 catch (  Exception ex) {
    LOG.error(ex,ex);
    handleException(ex);
  }
  return reply;
}