Program: 87385
Project: 87385
Buggy source:
/** 
 * Registers the event listeners on the various anchors.
 */
protected void registerListeners(){
  final ClientFactory clientFactory=amendmentController.getDocumentController().getClientFactory();
  final ServiceFactory serviceFactory=amendmentController.getDocumentController().getServiceFactory();
  anchorTable.setText(clientFactory.getCoreMessages().amendmentActionTable());
  anchorWithdraw.setText(clientFactory.getCoreMessages().amendmentActionWithdraw());
  anchorDelete.setText(clientFactory.getCoreMessages().amendmentActionDelete());
  anchorTable.addClickHandler(new ClickHandler(){
    @Override public void onClick(    ClickEvent event){
      final String oldStatus=amendmentController.getModel().getAmendmentContainerStatus();
      popupPanel.hide();
      serviceFactory.getGwtAmendmentService().tableAmendmentContainers(clientFactory.getClientContext(),new ArrayList<AmendmentContainerDTO>(Arrays.asList(amendmentController.getModel())),new AsyncCallback<AmendmentContainerDTO[]>(){
        @Override public void onFailure(        Throwable caught){
          clientFactory.getEventBus().fireEvent(new CriticalErrorEvent("String_Node_Str",caught));
        }
        @Override public void onSuccess(        AmendmentContainerDTO[] result){
          amendmentController.setModel(result[0]);
          final AmendmentContainerStatusUpdatedEvent updatedEvent=new AmendmentContainerStatusUpdatedEvent(amendmentController,oldStatus);
          final DocumentEventBus documentEventBus=amendmentController.getDocumentController().getDocumentEventBus();
          documentEventBus.fireEvent(updatedEvent);
          documentEventBus.fireEvent(new NotificationEvent(clientFactory.getCoreMessages().amendmentActionTableSuccessful(result.length)));
        }
      }
);
    }
  }
);
  anchorWithdraw.addClickHandler(new ClickHandler(){
    @Override public void onClick(    ClickEvent event){
      final String oldStatus=amendmentController.getModel().getAmendmentContainerStatus();
      popupPanel.hide();
      serviceFactory.getGwtAmendmentService().withdrawAmendmentContainers(clientFactory.getClientContext(),new ArrayList<AmendmentContainerDTO>(Arrays.asList(amendmentController.getModel())),new AsyncCallback<AmendmentContainerDTO[]>(){
        @Override public void onFailure(        Throwable caught){
          clientFactory.getEventBus().fireEvent(new CriticalErrorEvent("String_Node_Str",caught));
        }
        @Override public void onSuccess(        AmendmentContainerDTO[] result){
          amendmentController.setModel(result[0]);
          final AmendmentContainerStatusUpdatedEvent updatedEvent=new AmendmentContainerStatusUpdatedEvent(amendmentController,oldStatus);
          final DocumentEventBus documentEventBus=amendmentController.getDocumentController().getDocumentEventBus();
          documentEventBus.fireEvent(updatedEvent);
          documentEventBus.fireEvent(new NotificationEvent(clientFactory.getCoreMessages().amendmentActionWithdrawSuccessful(result.length)));
        }
      }
);
    }
  }
);
  anchorDelete.addClickHandler(new ClickHandler(){
    @Override public void onClick(    ClickEvent event){
      popupPanel.hide();
      amendmentController.getDocumentController().getDocumentEventBus().fireEvent(new ConfirmationEvent(clientFactory.getCoreMessages().confirmationAmendmentDeleteTitle(),clientFactory.getCoreMessages().confirmationAmendmentDeleteMessage(),clientFactory.getCoreMessages().confirmationAmendmentDeleteButtonConfirm(),new ClickHandler(){
        @Override public void onClick(        ClickEvent event){
          serviceFactory.getGwtAmendmentService().deleteAmendmentContainers(clientFactory.getClientContext(),new ArrayList<AmendmentContainerDTO>(Arrays.asList(amendmentController.getModel())),new AsyncCallback<AmendmentContainerDTO[]>(){
            @Override public void onFailure(            Throwable caught){
              clientFactory.getEventBus().fireEvent(new CriticalErrorEvent("String_Node_Str",caught));
            }
            @Override public void onSuccess(            AmendmentContainerDTO[] result){
              amendmentController.setModel(result[0]);
              final DocumentEventBus documentEventBus=amendmentController.getDocumentController().getDocumentEventBus();
              documentEventBus.fireEvent(new AmendmentContainerDeleteEvent(amendmentController));
              documentEventBus.fireEvent(new NotificationEvent(clientFactory.getCoreMessages().amendmentActionDeleteSuccessful(result.length)));
            }
          }
);
        }
      }
,clientFactory.getCoreMessages().confirmationAmendmentDeleteButtonCancel(),new ClickHandler(){
        @Override public void onClick(        ClickEvent event){
        }
      }
));
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Registers the event listeners on the various anchors.
 */
private void registerListeners(){
  anchorTable.addClickHandler(new ClickHandler(){
    @Override public void onClick(    ClickEvent event){
      final ClientFactory clientFactory=amendmentController.getDocumentController().getClientFactory();
      final ServiceFactory serviceFactory=amendmentController.getDocumentController().getServiceFactory();
      final String oldStatus=amendmentController.getModel().getAmendmentContainerStatus();
      popupPanel.hide();
      serviceFactory.getGwtAmendmentService().tableAmendmentContainers(clientFactory.getClientContext(),new ArrayList<AmendmentContainerDTO>(Arrays.asList(amendmentController.getModel())),new AsyncCallback<AmendmentContainerDTO[]>(){
        @Override public void onFailure(        Throwable caught){
          clientFactory.getEventBus().fireEvent(new CriticalErrorEvent("String_Node_Str",caught));
        }
        @Override public void onSuccess(        AmendmentContainerDTO[] result){
          amendmentController.setModel(result[0]);
          final AmendmentContainerStatusUpdatedEvent updatedEvent=new AmendmentContainerStatusUpdatedEvent(amendmentController,oldStatus);
          final DocumentEventBus documentEventBus=amendmentController.getDocumentController().getDocumentEventBus();
          documentEventBus.fireEvent(updatedEvent);
          documentEventBus.fireEvent(new NotificationEvent(clientFactory.getCoreMessages().amendmentActionTableSuccessful(result.length)));
        }
      }
);
    }
  }
);
  anchorWithdraw.addClickHandler(new ClickHandler(){
    @Override public void onClick(    ClickEvent event){
      final ClientFactory clientFactory=amendmentController.getDocumentController().getClientFactory();
      final ServiceFactory serviceFactory=amendmentController.getDocumentController().getServiceFactory();
      final String oldStatus=amendmentController.getModel().getAmendmentContainerStatus();
      popupPanel.hide();
      serviceFactory.getGwtAmendmentService().withdrawAmendmentContainers(clientFactory.getClientContext(),new ArrayList<AmendmentContainerDTO>(Arrays.asList(amendmentController.getModel())),new AsyncCallback<AmendmentContainerDTO[]>(){
        @Override public void onFailure(        Throwable caught){
          clientFactory.getEventBus().fireEvent(new CriticalErrorEvent("String_Node_Str",caught));
        }
        @Override public void onSuccess(        AmendmentContainerDTO[] result){
          amendmentController.setModel(result[0]);
          final AmendmentContainerStatusUpdatedEvent updatedEvent=new AmendmentContainerStatusUpdatedEvent(amendmentController,oldStatus);
          final DocumentEventBus documentEventBus=amendmentController.getDocumentController().getDocumentEventBus();
          documentEventBus.fireEvent(updatedEvent);
          documentEventBus.fireEvent(new NotificationEvent(clientFactory.getCoreMessages().amendmentActionWithdrawSuccessful(result.length)));
        }
      }
);
    }
  }
);
  anchorDelete.addClickHandler(new ClickHandler(){
    @Override public void onClick(    ClickEvent event){
      final ClientFactory clientFactory=amendmentController.getDocumentController().getClientFactory();
      final ServiceFactory serviceFactory=amendmentController.getDocumentController().getServiceFactory();
      popupPanel.hide();
      amendmentController.getDocumentController().getDocumentEventBus().fireEvent(new ConfirmationEvent(clientFactory.getCoreMessages().confirmationAmendmentDeleteTitle(),clientFactory.getCoreMessages().confirmationAmendmentDeleteMessage(),clientFactory.getCoreMessages().confirmationAmendmentDeleteButtonConfirm(),new ClickHandler(){
        @Override public void onClick(        ClickEvent event){
          serviceFactory.getGwtAmendmentService().deleteAmendmentContainers(clientFactory.getClientContext(),new ArrayList<AmendmentContainerDTO>(Arrays.asList(amendmentController.getModel())),new AsyncCallback<AmendmentContainerDTO[]>(){
            @Override public void onFailure(            Throwable caught){
              clientFactory.getEventBus().fireEvent(new CriticalErrorEvent("String_Node_Str",caught));
            }
            @Override public void onSuccess(            AmendmentContainerDTO[] result){
              amendmentController.setModel(result[0]);
              final DocumentEventBus documentEventBus=amendmentController.getDocumentController().getDocumentEventBus();
              documentEventBus.fireEvent(new AmendmentContainerDeleteEvent(amendmentController));
              documentEventBus.fireEvent(new NotificationEvent(clientFactory.getCoreMessages().amendmentActionDeleteSuccessful(result.length)));
            }
          }
);
        }
      }
,clientFactory.getCoreMessages().confirmationAmendmentDeleteButtonCancel(),new ClickHandler(){
        @Override public void onClick(        ClickEvent event){
        }
      }
));
    }
  }
);
  documentEventBus.addHandler(DocumentScrollEvent.TYPE,new DocumentScrollEventHandler(){
    @Override public void onEvent(    DocumentScrollEvent event){
      hide();
    }
  }
);
}