Program: 14192
Project: 14192
Buggy source:
@Override public void create(int stepNum) throws Exception {
switch (stepNum) {
case 0:
    ServiceConfiguration configuration=Topology.lookup(Compute.class);
  AssociateAddressType associateAddressType=new AssociateAddressType();
associateAddressType.setEffectiveUserId(info.getEffectiveUserId());
if (properties.getInstanceId() != null) {
DescribeInstancesType describeInstancesType=new DescribeInstancesType();
describeInstancesType.setInstancesSet(Lists.newArrayList(properties.getInstanceId()));
describeInstancesType.setEffectiveUserId(info.getEffectiveUserId());
DescribeInstancesResponseType describeInstancesResponseType=AsyncRequests.<DescribeInstancesType,DescribeInstancesResponseType>sendSync(configuration,describeInstancesType);
if (describeInstancesResponseType.getReservationSet() == null || describeInstancesResponseType.getReservationSet().isEmpty()) {
  throw new ValidationErrorException("String_Node_Str" + properties.getInstanceId());
}
associateAddressType.setInstanceId(properties.getInstanceId());
}
if (properties.getEip() != null) {
DescribeAddressesType describeAddressesType=new DescribeAddressesType();
describeAddressesType.setPublicIpsSet(Lists.newArrayList(properties.getEip()));
describeAddressesType.setEffectiveUserId(info.getEffectiveUserId());
DescribeAddressesResponseType describeAddressesResponseType=AsyncRequests.<DescribeAddressesType,DescribeAddressesResponseType>sendSync(configuration,describeAddressesType);
if (describeAddressesResponseType.getAddressesSet() == null || describeAddressesResponseType.getAddressesSet().isEmpty()) {
throw new ValidationErrorException("String_Node_Str" + properties.getEip());
}
associateAddressType.setPublicIp(properties.getEip());
}
AsyncRequests.<AssociateAddressType,AssociateAddressResponseType>sendSync(configuration,associateAddressType);
String physicalResourceId=getStackEntity().getStackName() + "String_Node_Str" + info.getLogicalResourceId()+ "String_Node_Str"+ Crypto.generateAlphanumericId(13,"String_Node_Str");
info.setPhysicalResourceId(physicalResourceId);
info.setReferenceValueJson(JsonHelper.getStringFromJsonNode(new TextNode(info.getPhysicalResourceId())));
break;
default :
throw new IllegalStateException("String_Node_Str" + stepNum);
}
}

Fixed version (ground truth):
@Override public void create(int stepNum) throws Exception {
switch (stepNum) {
case 0:
    ServiceConfiguration configuration=Topology.lookup(Compute.class);
  AssociateAddressType associateAddressType=new AssociateAddressType();
associateAddressType.setEffectiveUserId(info.getEffectiveUserId());
if (properties.getInstanceId() != null) {
DescribeInstancesType describeInstancesType=new DescribeInstancesType();
describeInstancesType.setInstancesSet(Lists.newArrayList(properties.getInstanceId()));
describeInstancesType.setEffectiveUserId(info.getEffectiveUserId());
DescribeInstancesResponseType describeInstancesResponseType=AsyncRequests.<DescribeInstancesType,DescribeInstancesResponseType>sendSync(configuration,describeInstancesType);
if (describeInstancesResponseType.getReservationSet() == null || describeInstancesResponseType.getReservationSet().isEmpty()) {
  throw new ValidationErrorException("String_Node_Str" + properties.getInstanceId());
}
associateAddressType.setInstanceId(properties.getInstanceId());
}
if (properties.getEip() != null) {
DescribeAddressesType describeAddressesType=new DescribeAddressesType();
describeAddressesType.setPublicIpsSet(Lists.newArrayList(properties.getEip()));
describeAddressesType.setEffectiveUserId(info.getEffectiveUserId());
DescribeAddressesResponseType describeAddressesResponseType=AsyncRequests.<DescribeAddressesType,DescribeAddressesResponseType>sendSync(configuration,describeAddressesType);
if (describeAddressesResponseType.getAddressesSet() == null || describeAddressesResponseType.getAddressesSet().isEmpty()) {
throw new ValidationErrorException("String_Node_Str" + properties.getEip());
}
associateAddressType.setPublicIp(properties.getEip());
}
AsyncRequests.<AssociateAddressType,AssociateAddressResponseType>sendSync(configuration,associateAddressType);
info.setPhysicalResourceId(getDefaultPhysicalResourceId());
info.setReferenceValueJson(JsonHelper.getStringFromJsonNode(new TextNode(info.getPhysicalResourceId())));
break;
default :
throw new IllegalStateException("String_Node_Str" + stepNum);
}
}