Program: 35361
Project: 35361
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void onBind(){
  view.getSubMenuWidget().addListener(new SubMenuListener(){
    @Override public void onSubMenuClick(    final SubMenuItem menuItem){
      final PageRequest currentPageRequest=injector.getPageManager().getCurrentPageRequest(false);
      Profiler.INSTANCE.startScenario(Scenario.AGENDA);
      Profiler.INSTANCE.markCheckpoint(Scenario.AGENDA,"String_Node_Str");
      eventBus.navigateRequest(menuItem.getRequest().addAllParameters(currentPageRequest.getParameters(false)));
    }
  }
);
  view.getCoreVersionActionComboBox().addSelectionChangedListener(new SelectionChangedListener<CoreVersionAction>(){
    @Override public void selectionChanged(    SelectionChangedEvent<CoreVersionAction> se){
      final CoreVersionAction action=se.getSelectedItem();
      if (action == currentCoreVersion) {
        return;
      }
switch (action.getType()) {
case FUNCTION_COMPARE:
        eventBus.navigateRequest(Page.PROJECT_AMENDMENT_DIFF.request().addData(RequestParameter.DTO,project));
      view.getCoreVersionActionComboBox().setValue(currentCoreVersion);
    break;
case FUNCTION_RENAME:
  eventBus.navigateRequest(Page.PROJECT_AMENDMENT_RENAME.request().addData(RequestParameter.DTO,project));
view.getCoreVersionActionComboBox().setValue(currentCoreVersion);
break;
case CORE_VERSION:
onDisplayCoreVersion((AmendmentDTO)action);
break;
default :
view.getCoreVersionActionComboBox().setValue(currentCoreVersion);
break;
}
}
}
);
view.getLockProjectCoreButton().addSelectionListener(new SelectionListener<ButtonEvent>(){
@Override public void componentSelected(final ButtonEvent event){
onCoreVersionAction(project,AmendmentAction.LOCK,view.getLockProjectCoreButton());
}
}
);
view.getUnlockProjectCoreButton().addSelectionListener(new SelectionListener<ButtonEvent>(){
@Override public void componentSelected(final ButtonEvent event){
onCoreVersionAction(project,AmendmentAction.UNLOCK,view.getUnlockProjectCoreButton());
}
}
);
view.getValidateVersionButton().addListener(Events.OnClick,new Listener<BaseEvent>(){
@Override public void handleEvent(BaseEvent be){
view.buildCreateCoreVersionDialog(new SelectionListener<ButtonEvent>(){
@Override public void componentSelected(ButtonEvent ce){
final String name=(String)ce.getSource();
onCoreVersionAction(project,AmendmentAction.VALIDATE,view.getValidateVersionButton(),name);
}
}
);
}
}
);
view.getBackToWorkingVersionButton().addListener(Events.OnClick,new Listener<BaseEvent>(){
@Override public void handleEvent(BaseEvent be){
final PageRequest currentPageRequest=injector.getPageManager().getCurrentPageRequest();
eventBus.navigateRequest(currentPageRequest.removeParameter(RequestParameter.VERSION),view.getBackToWorkingVersionButton());
currentCoreVersion=null;
}
}
);
view.getExportButton().addSelectionListener(new SelectionListener<ButtonEvent>(){
@Override public void componentSelected(final ButtonEvent ce){
onExportProject(project);
}
}
);
view.getDeleteButton().addSelectionListener(new SelectionListener<ButtonEvent>(){
@Override public void componentSelected(final ButtonEvent ce){
onDeleteProject(project);
}
}
);
registerHandler(eventBus.addHandler(UpdateEvent.getType(),new UpdateHandler(){
@Override public void onUpdate(final UpdateEvent event){
if (event.concern(UpdateEvent.PROJECT_BANNER_UPDATE)) {
refreshBanner(project);
}
 else if (event.concern(UpdateEvent.AMENDMENT_RENAME)) {
loadAmendments(project,currentCoreVersion != null ? currentCoreVersion.getId() : null);
}
 else if (event.concern(UpdateEvent.CORE_VERSION_UPDATED)) {
eventBus.navigateRequest(injector.getPageManager().getCurrentPageRequest(),new LoadingMask(view.getProjectCoreVersionPanel()));
}
}
}
));
view.getSubMenuWidget().setRequiredPermissions(Page.PROJECT_LOGFRAME,GlobalPermissionEnum.VIEW_LOGFRAME);
view.getSubMenuWidget().setRequiredPermissions(Page.PROJECT_INDICATORS_MANAGEMENT,GlobalPermissionEnum.VIEW_INDICATOR);
view.getSubMenuWidget().setRequiredPermissions(Page.PROJECT_INDICATORS_MAP,GlobalPermissionEnum.VIEW_MAPTAB);
view.getSubMenuWidget().setRequiredPermissions(Page.PROJECT_INDICATORS_ENTRIES,GlobalPermissionEnum.VIEW_INDICATOR);
view.getSubMenuWidget().setRequiredPermissions(Page.PROJECT_CALENDAR,GlobalPermissionEnum.VIEW_PROJECT_AGENDA);
view.getSubMenuWidget().setRequiredPermissions(Page.PROJECT_TEAM_MEMBERS,GlobalPermissionEnum.VIEW_PROJECT_TEAM_MEMBERS);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void onBind(){
  view.getSubMenuWidget().addListener(new SubMenuListener(){
    @Override public void onSubMenuClick(    final SubMenuItem menuItem){
      final PageRequest currentPageRequest=injector.getPageManager().getCurrentPageRequest(false);
      Profiler.INSTANCE.startScenario(Scenario.AGENDA);
      Profiler.INSTANCE.markCheckpoint(Scenario.AGENDA,"String_Node_Str");
      eventBus.navigateRequest(menuItem.getRequest().addAllParameters(currentPageRequest.getParameters(false)));
    }
  }
);
  view.getCoreVersionActionComboBox().addSelectionChangedListener(new SelectionChangedListener<CoreVersionAction>(){
    @Override public void selectionChanged(    SelectionChangedEvent<CoreVersionAction> se){
      final CoreVersionAction action=se.getSelectedItem();
      if (action == currentCoreVersion || action == null) {
        return;
      }
switch (action.getType()) {
case FUNCTION_COMPARE:
        eventBus.navigateRequest(Page.PROJECT_AMENDMENT_DIFF.request().addData(RequestParameter.DTO,project));
      view.getCoreVersionActionComboBox().setValue(currentCoreVersion);
    break;
case FUNCTION_RENAME:
  eventBus.navigateRequest(Page.PROJECT_AMENDMENT_RENAME.request().addData(RequestParameter.DTO,project));
view.getCoreVersionActionComboBox().setValue(currentCoreVersion);
break;
case CORE_VERSION:
onDisplayCoreVersion((AmendmentDTO)action);
break;
default :
view.getCoreVersionActionComboBox().setValue(currentCoreVersion);
break;
}
}
}
);
view.getLockProjectCoreButton().addSelectionListener(new SelectionListener<ButtonEvent>(){
@Override public void componentSelected(final ButtonEvent event){
onCoreVersionAction(project,AmendmentAction.LOCK,view.getLockProjectCoreButton());
}
}
);
view.getUnlockProjectCoreButton().addSelectionListener(new SelectionListener<ButtonEvent>(){
@Override public void componentSelected(final ButtonEvent event){
onCoreVersionAction(project,AmendmentAction.UNLOCK,view.getUnlockProjectCoreButton());
}
}
);
view.getValidateVersionButton().addListener(Events.OnClick,new Listener<BaseEvent>(){
@Override public void handleEvent(BaseEvent be){
view.buildCreateCoreVersionDialog(new SelectionListener<ButtonEvent>(){
@Override public void componentSelected(ButtonEvent ce){
final String name=(String)ce.getSource();
onCoreVersionAction(project,AmendmentAction.VALIDATE,view.getValidateVersionButton(),name);
}
}
);
}
}
);
view.getBackToWorkingVersionButton().addListener(Events.OnClick,new Listener<BaseEvent>(){
@Override public void handleEvent(BaseEvent be){
final PageRequest currentPageRequest=injector.getPageManager().getCurrentPageRequest();
eventBus.navigateRequest(currentPageRequest.removeParameter(RequestParameter.VERSION),view.getBackToWorkingVersionButton());
currentCoreVersion=null;
}
}
);
view.getExportButton().addSelectionListener(new SelectionListener<ButtonEvent>(){
@Override public void componentSelected(final ButtonEvent ce){
onExportProject(project);
}
}
);
view.getDeleteButton().addSelectionListener(new SelectionListener<ButtonEvent>(){
@Override public void componentSelected(final ButtonEvent ce){
onDeleteProject(project);
}
}
);
registerHandler(eventBus.addHandler(UpdateEvent.getType(),new UpdateHandler(){
@Override public void onUpdate(final UpdateEvent event){
if (event.concern(UpdateEvent.PROJECT_BANNER_UPDATE)) {
refreshBanner(project);
}
 else if (event.concern(UpdateEvent.AMENDMENT_RENAME)) {
loadAmendments(project,currentCoreVersion != null ? currentCoreVersion.getId() : null);
}
 else if (event.concern(UpdateEvent.CORE_VERSION_UPDATED)) {
eventBus.navigateRequest(injector.getPageManager().getCurrentPageRequest(),new LoadingMask(view.getProjectCoreVersionPanel()));
}
}
}
));
view.getSubMenuWidget().setRequiredPermissions(Page.PROJECT_LOGFRAME,GlobalPermissionEnum.VIEW_LOGFRAME);
view.getSubMenuWidget().setRequiredPermissions(Page.PROJECT_INDICATORS_MANAGEMENT,GlobalPermissionEnum.VIEW_INDICATOR);
view.getSubMenuWidget().setRequiredPermissions(Page.PROJECT_INDICATORS_MAP,GlobalPermissionEnum.VIEW_MAPTAB);
view.getSubMenuWidget().setRequiredPermissions(Page.PROJECT_INDICATORS_ENTRIES,GlobalPermissionEnum.VIEW_INDICATOR);
view.getSubMenuWidget().setRequiredPermissions(Page.PROJECT_CALENDAR,GlobalPermissionEnum.VIEW_PROJECT_AGENDA);
view.getSubMenuWidget().setRequiredPermissions(Page.PROJECT_TEAM_MEMBERS,GlobalPermissionEnum.VIEW_PROJECT_TEAM_MEMBERS);
}