Program: 14220
Project: 14220
Buggy source:
public ListStackResourcesResponseType listStackResources(ListStackResourcesType request) throws CloudFormationException {
  ListStackResourcesResponseType reply=request.getReply();
  try {
    final Context ctx=Contexts.lookup();
    checkActionPermission(PolicySpec.CLOUDFORMATION_LISTSTACKRESOURCES,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");
    }
    ArrayList<StackResourceSummary> stackResourceSummaryList=Lists.newArrayList();
    List<StackResourceEntity> stackResourceEntityList=StackResourceEntityManager.listStackResources(accountId,stackName);
    if (stackResourceEntityList != null) {
      for (      StackResourceEntity stackResourceEntity : stackResourceEntityList) {
        StackResourceSummary stackResourceSummary=new StackResourceSummary();
        stackResourceSummary.setLogicalResourceId(stackResourceEntity.getLogicalResourceId());
        stackResourceSummary.setPhysicalResourceId(stackResourceEntity.getPhysicalResourceId());
        stackResourceSummary.setResourceStatus(stackResourceEntity.getResourceStatus().toString());
        stackResourceSummary.setResourceStatusReason(stackResourceEntity.getResourceStatusReason());
        stackResourceSummary.setResourceType(stackResourceEntity.getResourceType());
        stackResourceSummary.setLastUpdatedTimestamp(stackResourceEntity.getLastUpdateTimestamp());
        stackResourceSummaryList.add(stackResourceSummary);
      }
    }
    ListStackResourcesResult listStackResourcesResult=new ListStackResourcesResult();
    StackResourceSummaries stackResourceSummaries=new StackResourceSummaries();
    stackResourceSummaries.setMember(stackResourceSummaryList);
    listStackResourcesResult.setStackResourceSummaries(stackResourceSummaries);
    reply.setListStackResourcesResult(listStackResourcesResult);
  }
 catch (  Exception ex) {
    handleException(ex);
  }
  return reply;
}

Fixed version (ground truth):
public ListStackResourcesResponseType listStackResources(ListStackResourcesType request) throws CloudFormationException {
  ListStackResourcesResponseType reply=request.getReply();
  try {
    final Context ctx=Contexts.lookup();
    checkActionPermission(PolicySpec.CLOUDFORMATION_LISTSTACKRESOURCES,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");
    }
    ArrayList<StackResourceSummary> stackResourceSummaryList=Lists.newArrayList();
    List<StackResourceEntity> stackResourceEntityList=StackResourceEntityManager.listStackResources(accountId,stackName);
    if (stackResourceEntityList != null) {
      for (      StackResourceEntity stackResourceEntity : stackResourceEntityList) {
        StackResourceSummary stackResourceSummary=new StackResourceSummary();
        stackResourceSummary.setLogicalResourceId(stackResourceEntity.getLogicalResourceId());
        stackResourceSummary.setPhysicalResourceId(stackResourceEntity.getPhysicalResourceId());
        stackResourceSummary.setResourceStatus(stackResourceEntity.getResourceStatus().toString());
        stackResourceSummary.setResourceStatusReason(stackResourceEntity.getResourceStatusReason());
        stackResourceSummary.setResourceType(stackResourceEntity.getResourceType());
        stackResourceSummary.setLastUpdatedTimestamp(stackResourceEntity.getLastUpdateTimestamp());
        stackResourceSummaryList.add(stackResourceSummary);
      }
    }
    ListStackResourcesResult listStackResourcesResult=new ListStackResourcesResult();
    StackResourceSummaries stackResourceSummaries=new StackResourceSummaries();
    stackResourceSummaries.setMember(stackResourceSummaryList);
    listStackResourcesResult.setStackResourceSummaries(stackResourceSummaries);
    reply.setListStackResourcesResult(listStackResourcesResult);
  }
 catch (  Exception ex) {
    LOG.error(ex,ex);
    handleException(ex);
  }
  return reply;
}