Program: 188271
Project: 188271
Buggy source:
private void updateLayout(final AIPState state,final boolean justActive){
  aipState.setHTML(HtmlSnippetUtils.getAIPStateHTML(state));
  aipState.setVisible(!justActive);
  HTMLPanel representationIconHtmlPanel=new HTMLPanel(DescriptionLevelUtils.getRepresentationTypeIcon(representation.getType(),false));
  representationIconHtmlPanel.addStyleName("String_Node_Str");
  representationIcon.setWidget(representationIconHtmlPanel);
  String type=representation.getType() != null ? representation.getType() : representation.getId();
  representationType.setHTML(HtmlSnippetUtils.getRepresentationTypeHTML(type,representation.getRepresentationStates()));
  representationId.setText(representation.getId());
  if (representation.getCreatedOn() != null) {
    dateCreated.setText(messages.dateCreated(Humanize.formatDateTime(representation.getCreatedOn()),representation.getCreatedBy()));
  }
  if (representation.getUpdatedOn() != null) {
    dateUpdated.setText(messages.dateUpdated(Humanize.formatDateTime(representation.getUpdatedOn()),representation.getUpdatedBy()));
  }
  actionsSidebar.setWidget(RepresentationActions.get(aipId).createActionsLayout(representation,new AsyncCallback<Actionable.ActionImpact>(){
    @Override public void onFailure(    Throwable caught){
      AsyncCallbackUtils.defaultFailureTreatment(caught);
    }
    @Override public void onSuccess(    Actionable.ActionImpact impact){
      if (Actionable.ActionImpact.UPDATED.equals(impact)) {
        BrowserService.Util.getInstance().retrieve(IndexedRepresentation.class.getName(),representation.getUUID(),representationFields,new AsyncCallback<IndexedRepresentation>(){
          @Override public void onFailure(          Throwable caught){
            AsyncCallbackUtils.defaultFailureTreatment(caught);
          }
          @Override public void onSuccess(          IndexedRepresentation rep){
            representation=rep;
            updateLayout(state,justActive);
          }
        }
);
      }
    }
  }
));
}

Fixed version (ground truth):
private void updateLayout(final AIPState state,final boolean justActive){
  aipState.setHTML(HtmlSnippetUtils.getAIPStateHTML(state));
  aipState.setVisible(!justActive);
  HTMLPanel representationIconHtmlPanel=new HTMLPanel(DescriptionLevelUtils.getRepresentationTypeIcon(representation.getType(),false));
  representationIconHtmlPanel.addStyleName("String_Node_Str");
  representationIcon.setWidget(representationIconHtmlPanel);
  String type=representation.getType() != null ? representation.getType() : representation.getId();
  representationType.setHTML(HtmlSnippetUtils.getRepresentationTypeHTML(type,representation.getRepresentationStates()));
  representationId.setText(representation.getId());
  if (!breadcrumbItems.isEmpty()) {
    breadcrumbItems.remove(breadcrumbItems.size() - 1);
    breadcrumbItems.add(BreadcrumbUtils.getBreadcrumbItem(representation));
    breadcrumb.updatePath(breadcrumbItems);
  }
  if (representation.getCreatedOn() != null) {
    dateCreated.setText(messages.dateCreated(Humanize.formatDateTime(representation.getCreatedOn()),representation.getCreatedBy()));
  }
  if (representation.getUpdatedOn() != null) {
    dateUpdated.setText(messages.dateUpdated(Humanize.formatDateTime(representation.getUpdatedOn()),representation.getUpdatedBy()));
  }
  actionsSidebar.setWidget(RepresentationActions.get(aipId).createActionsLayout(representation,new AsyncCallback<Actionable.ActionImpact>(){
    @Override public void onFailure(    Throwable caught){
      AsyncCallbackUtils.defaultFailureTreatment(caught);
    }
    @Override public void onSuccess(    Actionable.ActionImpact impact){
      if (Actionable.ActionImpact.UPDATED.equals(impact)) {
        BrowserService.Util.getInstance().retrieve(IndexedRepresentation.class.getName(),representation.getUUID(),representationFields,new AsyncCallback<IndexedRepresentation>(){
          @Override public void onFailure(          Throwable caught){
            AsyncCallbackUtils.defaultFailureTreatment(caught);
          }
          @Override public void onSuccess(          IndexedRepresentation rep){
            representation=rep;
            updateLayout(state,justActive);
          }
        }
);
      }
    }
  }
));
}