Program: 101321
Project: 101321
Buggy source:
@Override protected void addChildren() throws OpsException {
  if (!Strings.isNullOrEmpty(dnsName)) {
    EndpointDnsRecord dns=injected(EndpointDnsRecord.class);
    dns.destinationPort=publicPort;
    dns.endpointProvider=new Provider<PublicEndpointBase>(){
      @Override public PublicEndpointBase get(){
        return endpoint;
      }
    }
;
    dns.dnsName=dnsName;
    addChild(dns);
  }
  if (tagItem != null) {
    Tagger tagger=injected(Tagger.class);
    OpsProvider<TagChanges> tagChanges=new OpsProvider<TagChanges>(){
      @Override public TagChanges get() throws OpsException {
        TagChanges tagChanges=new TagChanges();
        EndpointInfo endpointInfo=endpointHelpers.findEndpoint(endpoint.getTags(),publicPort);
        if (endpointInfo == null) {
          throw new OpsException("String_Node_Str" + publicPort);
        }
        tagChanges.addTags.add(new Tag(Tag.PUBLIC_ENDPOINT,endpointInfo.publicIp + "String_Node_Str" + endpointInfo.port));
        return tagChanges;
      }
    }
;
    tagger.platformLayerKey=tagItem;
    tagger.tagChangesProvider=tagChanges;
    addChild(tagger);
  }
  if (defaultBlocked) {
    addChild(FirewallEntry.build(FirewallRecord.buildBlockPort(protocol,backendPort)));
  }
{
    OwnedEndpoint endpoint=injected(OwnedEndpoint.class);
    endpoint.publicPort=publicPort;
    endpoint.backendPort=backendPort;
    endpoint.parentItem=parentItem;
    addChild(endpoint);
  }
}

Fixed version (ground truth):
@Override protected void addChildren() throws OpsException {
  final OwnedEndpoint endpoint;
{
    endpoint=injected(OwnedEndpoint.class);
    endpoint.publicPort=publicPort;
    endpoint.backendPort=backendPort;
    endpoint.parentItem=parentItem;
    addChild(endpoint);
  }
  if (!Strings.isNullOrEmpty(dnsName)) {
    EndpointDnsRecord dns=injected(EndpointDnsRecord.class);
    dns.destinationPort=publicPort;
    dns.endpointProvider=new Provider<PublicEndpointBase>(){
      @Override public PublicEndpointBase get(){
        return endpoint.getItem();
      }
    }
;
    dns.dnsName=dnsName;
    addChild(dns);
  }
  if (tagItem != null) {
    Tagger tagger=injected(Tagger.class);
    OpsProvider<TagChanges> tagChanges=new OpsProvider<TagChanges>(){
      @Override public TagChanges get() throws OpsException {
        TagChanges tagChanges=new TagChanges();
        PublicEndpointBase item=endpoint.getItem();
        if (item == null) {
          if (!OpsContext.isDelete()) {
            throw new OpsException("String_Node_Str");
          }
 else {
            log.warn("String_Node_Str");
            return null;
          }
        }
        EndpointInfo endpointInfo=endpointHelpers.findEndpoint(item.getTags(),publicPort);
        if (endpointInfo == null) {
          throw new OpsException("String_Node_Str" + publicPort);
        }
        tagChanges.addTags.add(new Tag(Tag.PUBLIC_ENDPOINT,endpointInfo.publicIp + "String_Node_Str" + endpointInfo.port));
        return tagChanges;
      }
    }
;
    tagger.platformLayerKey=tagItem;
    tagger.tagChangesProvider=tagChanges;
    addChild(tagger);
  }
  if (defaultBlocked) {
    addChild(FirewallEntry.build(FirewallRecord.buildBlockPort(protocol,backendPort)));
  }
}