Program: 188566
Project: 188566
Buggy source:
private Browse(){
  viewingTop=true;
  handlers=new ArrayList<HandlerRegistration>();
  String summary=messages.listOfItems();
  boolean selectable=true;
  aipList=new AIPList(Filter.NULL,justActive,FACETS,summary,selectable);
  searchPanel=new SearchPanel(COLLECTIONS_FILTER,RodaConstants.AIP_SEARCH,messages.searchPlaceHolder(),false,false,false);
  searchPanel.setDefaultFilterIncremental(true);
  searchPanel.setList(aipList);
  initWidget(uiBinder.createAndBindUi(this));
  browseDescription.add(new HTMLWidgetWrapper("String_Node_Str"));
  aipList.getSelectionModel().addSelectionChangeHandler(new Handler(){
    @Override public void onSelectionChange(    SelectionChangeEvent event){
      IndexedAIP aip=aipList.getSelectionModel().getSelectedObject();
      if (aip != null) {
        view(aip.getId());
      }
    }
  }
);
  aipList.addValueChangeHandler(new ValueChangeHandler<IndexResult<IndexedAIP>>(){
    @Override public void onValueChange(    ValueChangeEvent<IndexResult<IndexedAIP>> event){
      if (!viewingTop && event.getValue().getTotalCount() > 0 && !searchable) {
        searchable=true;
      }
      fondsPanelTitle.setVisible(searchable);
      searchPanel.setVisible(searchable);
      aipList.setVisible(viewingTop || searchable);
    }
  }
);
  aipList.addCheckboxSelectionListener(new CheckboxSelectionListener<IndexedAIP>(){
    @Override public void onSelectionChange(    SelectedItems<IndexedAIP> selected){
      boolean empty=SelectedItemsUtils.isEmpty(selected);
      if (empty) {
        moveItem.setEnabled(false);
        editPermissions.setEnabled(false);
      }
 else {
        moveItem.setEnabled(true);
        editPermissions.setEnabled(true);
      }
    }
  }
);
  UserLogin.getInstance().getAuthenticatedUser(new AsyncCallback<User>(){
    @Override public void onFailure(    Throwable caught){
      AsyncCallbackUtils.defaultFailureTreatment(caught);
    }
    @Override public void onSuccess(    User user){
      onPermissionsUpdate(user);
    }
  }
);
}

Fixed version (ground truth):
private Browse(){
  viewingTop=true;
  handlers=new ArrayList<HandlerRegistration>();
  String summary=messages.listOfItems();
  boolean selectable=true;
  aipList=new AIPList(Filter.NULL,justActive,FACETS,summary,selectable);
  searchPanel=new SearchPanel(COLLECTIONS_FILTER,RodaConstants.AIP_SEARCH,messages.searchPlaceHolder(),false,false,false);
  searchPanel.setDefaultFilterIncremental(true);
  searchPanel.setList(aipList);
  initWidget(uiBinder.createAndBindUi(this));
  browseDescription.add(new HTMLWidgetWrapper("String_Node_Str"));
  aipList.getSelectionModel().addSelectionChangeHandler(new Handler(){
    @Override public void onSelectionChange(    SelectionChangeEvent event){
      IndexedAIP aip=aipList.getSelectionModel().getSelectedObject();
      if (aip != null) {
        view(aip.getId());
      }
    }
  }
);
  aipList.addValueChangeHandler(new ValueChangeHandler<IndexResult<IndexedAIP>>(){
    @Override public void onValueChange(    ValueChangeEvent<IndexResult<IndexedAIP>> event){
      if (!viewingTop && event.getValue().getTotalCount() > 0 && !searchable) {
        searchable=true;
      }
      fondsPanelTitle.setVisible(searchable);
      searchPanel.setVisible(searchable);
      aipList.setVisible(viewingTop || searchable);
    }
  }
);
  aipList.addCheckboxSelectionListener(new CheckboxSelectionListener<IndexedAIP>(){
    @Override public void onSelectionChange(    SelectedItems<IndexedAIP> selected){
      boolean empty=SelectedItemsUtils.isEmpty(selected);
      moveItem.setEnabled(!empty);
      editPermissions.setEnabled(!empty);
    }
  }
);
  UserLogin.getInstance().getAuthenticatedUser(new AsyncCallback<User>(){
    @Override public void onFailure(    Throwable caught){
      AsyncCallbackUtils.defaultFailureTreatment(caught);
    }
    @Override public void onSuccess(    User user){
      onPermissionsUpdate(user);
    }
  }
);
}