Program: 101313
Project: 101313
Buggy source:
@Override protected void addChildren() throws OpsException {
  final CloudInstanceMapper cloudHost;
{
    cloudHost=injected(CloudInstanceMapper.class);
    cloudHost.createInstance=false;
    cloudHost.instance=backendItem;
    addChild(cloudHost);
  }
  final SocketAddressPoolAssignment assignPublicAddress;
{
    assignPublicAddress=addChild(SocketAddressPoolAssignment.class);
    assignPublicAddress.holder=DirectCloudUtils.getInstanceDir(backendItem);
    if (Objects.equal(transport,Transport.Ipv6)) {
      assignPublicAddress.poolProvider=DirectCloudUtils.getAddressPool6();
    }
 else {
      assignPublicAddress.poolProvider=DirectCloudUtils.getPublicAddressPool4(publicPort);
    }
  }
{
    ForwardPort forward=injected(ForwardPort.class);
    forward.publicAddress=assignPublicAddress;
    forward.uuid=uuid;
    forward.privateAddress=new OpsProvider<String>(){
      @Override public String get() throws OpsException {
        backendItem=platformLayerClient.getItem(OpsSystem.toKey(backendItem),DirectInstance.class);
        PlatformLayerCloudMachine instanceMachine=(PlatformLayerCloudMachine)instanceHelpers.getMachine(backendItem);
        DirectInstance instance=(DirectInstance)instanceMachine.getInstance();
        return DirectCloudUtils.getNetworkAddress(instance);
      }
    }
;
    forward.privatePort=backendPort;
    cloudHost.addChild(forward);
  }
{
    OpsProvider<TagChanges> tagChanges=new OpsProvider<TagChanges>(){
      @Override public TagChanges get(){
        TagChanges tagChanges=new TagChanges();
        InetSocketAddress socketAddress=assignPublicAddress.get();
        if (socketAddress.getPort() != publicPort) {
          throw new IllegalStateException();
        }
        EndpointInfo endpoint=new EndpointInfo(socketAddress);
        tagChanges.addTags.add(endpoint.toTag());
        return tagChanges;
      }
    }
;
    for (    ItemBase tagItem : tagItems) {
      Tagger tagger=addChild(Tagger.class);
      tagger.platformLayerKey=OpsSystem.toKey(tagItem);
      tagger.tagChangesProvider=tagChanges;
    }
  }
}

Fixed version (ground truth):
@Override protected void addChildren() throws OpsException {
  final CloudInstanceMapper cloudHost;
{
    cloudHost=injected(CloudInstanceMapper.class);
    cloudHost.createInstance=false;
    cloudHost.instance=backendItem;
    addChild(cloudHost);
  }
  final SocketAddressPoolAssignment assignPublicAddress;
{
    assignPublicAddress=cloudHost.addChild(SocketAddressPoolAssignment.class);
    assignPublicAddress.holder=DirectCloudUtils.getInstanceDir(backendItem);
    if (Objects.equal(transport,Transport.Ipv6)) {
      assignPublicAddress.poolProvider=DirectCloudUtils.getAddressPool6();
    }
 else {
      assignPublicAddress.poolProvider=DirectCloudUtils.getPublicAddressPool4(publicPort);
    }
  }
{
    ForwardPort forward=injected(ForwardPort.class);
    forward.publicAddress=assignPublicAddress;
    forward.uuid=uuid;
    forward.privateAddress=new OpsProvider<String>(){
      @Override public String get() throws OpsException {
        backendItem=platformLayerClient.getItem(OpsSystem.toKey(backendItem),DirectInstance.class);
        PlatformLayerCloudMachine instanceMachine=(PlatformLayerCloudMachine)instanceHelpers.getMachine(backendItem);
        DirectInstance instance=(DirectInstance)instanceMachine.getInstance();
        return DirectCloudUtils.getNetworkAddress(instance);
      }
    }
;
    forward.privatePort=backendPort;
    cloudHost.addChild(forward);
  }
{
    OpsProvider<TagChanges> tagChanges=new OpsProvider<TagChanges>(){
      @Override public TagChanges get(){
        TagChanges tagChanges=new TagChanges();
        InetSocketAddress socketAddress=assignPublicAddress.get();
        if (socketAddress.getPort() != publicPort) {
          throw new IllegalStateException();
        }
        EndpointInfo endpoint=new EndpointInfo(socketAddress);
        tagChanges.addTags.add(endpoint.toTag());
        return tagChanges;
      }
    }
;
    for (    ItemBase tagItem : tagItems) {
      Tagger tagger=addChild(Tagger.class);
      tagger.platformLayerKey=OpsSystem.toKey(tagItem);
      tagger.tagChangesProvider=tagChanges;
    }
  }
}