Program: 64059
Project: 64059
Buggy source:
@Override public StackDescription describeStackWithResources(User user,Stack stack,Credential credential){
  AwsTemplate awsInfra=(AwsTemplate)stack.getTemplate();
  AwsCredential awsCredential=(AwsCredential)credential;
  DescribeStacksResult stackResult=null;
  DescribeStackResourcesResult resourcesResult=null;
  try {
    AmazonCloudFormationClient client=awsStackUtil.createCloudFormationClient(awsInfra.getRegion(),awsCredential);
    DescribeStacksRequest stackRequest=new DescribeStacksRequest().withStackName(stack.getResourcesbyType(ResourceType.CLOUDFORMATION_TEMPLATE_NAME).get(0).getResourceName());
    stackResult=client.describeStacks(stackRequest);
    DescribeStackResourcesRequest resourcesRequest=new DescribeStackResourcesRequest().withStackName(stack.getResourcesbyType(ResourceType.CLOUDFORMATION_TEMPLATE_NAME).get(0).getResourceName());
    resourcesResult=client.describeStackResources(resourcesRequest);
  }
 catch (  AmazonServiceException e) {
    if (CF_SERVICE_NAME.equals(e.getServiceName()) && e.getErrorMessage().equals(String.format("String_Node_Str",stack.getResourcesbyType(ResourceType.CLOUDFORMATION_TEMPLATE_NAME).get(0).getResourceName()))) {
      LOGGER.error("String_Node_Str",stack.getResourcesbyType(ResourceType.CLOUDFORMATION_TEMPLATE_NAME).get(0).getResourceName());
      stackResult=new DescribeStacksResult();
    }
 else {
      throw e;
    }
  }
  AmazonEC2Client ec2Client=awsStackUtil.createEC2Client(awsInfra.getRegion(),awsCredential);
  DescribeInstancesRequest instancesRequest=new DescribeInstancesRequest().withFilters(new Filter().withName("String_Node_Str" + INSTANCE_TAG_NAME).withValues(stack.getResourcesbyType(ResourceType.CLOUDFORMATION_TEMPLATE_NAME).get(0).getResourceName()));
  DescribeInstancesResult instancesResult=ec2Client.describeInstances(instancesRequest);
  return new DetailedAwsStackDescription(stackResult,resourcesResult,instancesResult);
}

Fixed version (ground truth):
@Override public StackDescription describeStackWithResources(User user,Stack stack,Credential credential){
  AwsTemplate awsInfra=(AwsTemplate)stack.getTemplate();
  AwsCredential awsCredential=(AwsCredential)credential;
  DescribeStacksResult stackResult=null;
  DescribeStackResourcesResult resourcesResult=null;
  Resource resource=stack.getResourcebyType(ResourceType.CLOUDFORMATION_STACK);
  try {
    AmazonCloudFormationClient client=awsStackUtil.createCloudFormationClient(awsInfra.getRegion(),awsCredential);
    DescribeStacksRequest stackRequest=new DescribeStacksRequest().withStackName(resource.getResourceName());
    stackResult=client.describeStacks(stackRequest);
    DescribeStackResourcesRequest resourcesRequest=new DescribeStackResourcesRequest().withStackName(resource.getResourceName());
    resourcesResult=client.describeStackResources(resourcesRequest);
  }
 catch (  AmazonServiceException e) {
    if (CF_SERVICE_NAME.equals(e.getServiceName()) && e.getErrorMessage().equals(String.format("String_Node_Str",resource.getResourceName()))) {
      LOGGER.error("String_Node_Str",resource.getResourceName());
      stackResult=new DescribeStacksResult();
    }
 else {
      throw e;
    }
  }
  AmazonEC2Client ec2Client=awsStackUtil.createEC2Client(awsInfra.getRegion(),awsCredential);
  DescribeInstancesRequest instancesRequest=new DescribeInstancesRequest().withFilters(new Filter().withName("String_Node_Str" + INSTANCE_TAG_NAME).withValues(resource.getResourceName()));
  DescribeInstancesResult instancesResult=ec2Client.describeInstances(instancesRequest);
  return new DetailedAwsStackDescription(stackResult,resourcesResult,instancesResult);
}