Program: 64062
Project: 64062
Buggy source:
public void disableSourceDestCheck(Stack stack){
  AwsTemplate awsTemplate=(AwsTemplate)stack.getTemplate();
  AwsCredential awsCredential=(AwsCredential)stack.getCredential();
  AmazonCloudFormationClient amazonCfClient=awsStackUtil.createCloudFormationClient(awsTemplate.getRegion(),awsCredential);
  AmazonEC2Client amazonEC2Client=awsStackUtil.createEC2Client(awsTemplate.getRegion(),awsCredential);
  AmazonAutoScalingClient amazonAutoScalingClient=awsStackUtil.createAutoScalingClient(awsTemplate.getRegion(),awsCredential);
  DescribeStackResourceResult result=amazonCfClient.describeStackResource(new DescribeStackResourceRequest().withStackName(stack.getResourcesbyType(ResourceType.CLOUDFORMATION_TEMPLATE_NAME).get(0).getResourceName()).withLogicalResourceId("String_Node_Str"));
  DescribeAutoScalingGroupsResult describeAutoScalingGroupsResult=amazonAutoScalingClient.describeAutoScalingGroups(new DescribeAutoScalingGroupsRequest().withAutoScalingGroupNames(result.getStackResourceDetail().getPhysicalResourceId()));
  describeAutoScalingGroupsResult.getAutoScalingGroups().get(0).getInstances();
  List<String> instanceIds=new ArrayList<>();
  for (  Instance instance : describeAutoScalingGroupsResult.getAutoScalingGroups().get(0).getInstances()) {
    instanceIds.add(instance.getInstanceId());
  }
  DescribeInstancesRequest instancesRequest=new DescribeInstancesRequest().withInstanceIds(instanceIds);
  DescribeInstancesResult instancesResult=amazonEC2Client.describeInstances(instancesRequest);
  List<String> enis=new ArrayList<>();
  for (  Reservation reservation : instancesResult.getReservations()) {
    for (    com.amazonaws.services.ec2.model.Instance instance : reservation.getInstances()) {
      for (      InstanceNetworkInterface instanceNetworkInterface : instance.getNetworkInterfaces()) {
        enis.add(instanceNetworkInterface.getNetworkInterfaceId());
      }
    }
  }
  for (  String eni : enis) {
    ModifyNetworkInterfaceAttributeRequest modifyNetworkInterfaceAttributeRequest=new ModifyNetworkInterfaceAttributeRequest().withNetworkInterfaceId(eni).withSourceDestCheck(false);
    amazonEC2Client.modifyNetworkInterfaceAttribute(modifyNetworkInterfaceAttributeRequest);
  }
  LOGGER.info("String_Node_Str",stack.getId(),instanceIds,enis);
}

Fixed version (ground truth):
public void disableSourceDestCheck(Stack stack){
  AwsTemplate awsTemplate=(AwsTemplate)stack.getTemplate();
  AwsCredential awsCredential=(AwsCredential)stack.getCredential();
  AmazonCloudFormationClient amazonCfClient=awsStackUtil.createCloudFormationClient(awsTemplate.getRegion(),awsCredential);
  AmazonEC2Client amazonEC2Client=awsStackUtil.createEC2Client(awsTemplate.getRegion(),awsCredential);
  AmazonAutoScalingClient amazonAutoScalingClient=awsStackUtil.createAutoScalingClient(awsTemplate.getRegion(),awsCredential);
  DescribeStackResourceResult result=amazonCfClient.describeStackResource(new DescribeStackResourceRequest().withStackName(stack.getResourcesbyType(ResourceType.CLOUDFORMATION_STACK).get(0).getResourceName()).withLogicalResourceId("String_Node_Str"));
  DescribeAutoScalingGroupsResult describeAutoScalingGroupsResult=amazonAutoScalingClient.describeAutoScalingGroups(new DescribeAutoScalingGroupsRequest().withAutoScalingGroupNames(result.getStackResourceDetail().getPhysicalResourceId()));
  describeAutoScalingGroupsResult.getAutoScalingGroups().get(0).getInstances();
  List<String> instanceIds=new ArrayList<>();
  for (  Instance instance : describeAutoScalingGroupsResult.getAutoScalingGroups().get(0).getInstances()) {
    instanceIds.add(instance.getInstanceId());
  }
  DescribeInstancesRequest instancesRequest=new DescribeInstancesRequest().withInstanceIds(instanceIds);
  DescribeInstancesResult instancesResult=amazonEC2Client.describeInstances(instancesRequest);
  List<String> enis=new ArrayList<>();
  for (  Reservation reservation : instancesResult.getReservations()) {
    for (    com.amazonaws.services.ec2.model.Instance instance : reservation.getInstances()) {
      for (      InstanceNetworkInterface instanceNetworkInterface : instance.getNetworkInterfaces()) {
        enis.add(instanceNetworkInterface.getNetworkInterfaceId());
      }
    }
  }
  for (  String eni : enis) {
    ModifyNetworkInterfaceAttributeRequest modifyNetworkInterfaceAttributeRequest=new ModifyNetworkInterfaceAttributeRequest().withNetworkInterfaceId(eni).withSourceDestCheck(false);
    amazonEC2Client.modifyNetworkInterfaceAttribute(modifyNetworkInterfaceAttributeRequest);
  }
  LOGGER.info("String_Node_Str",stack.getId(),instanceIds,enis);
}