Source:
<code>private void createUnstagedToolBarComposite() { Composite unstagedToolbarComposite = toolkit .createComposite(unstagedSection); unstagedToolbarComposite.setBackground(null); unstagedToolbarComposite.setLayout(createRowLayoutWithoutMargin()); unstagedSection.setTextClient(unstagedToolbarComposite); unstagedExpandAllAction = new Action(UIText.UIUtils_ExpandAll, IAction.AS_PUSH_BUTTON) { @Override public void run() { unstagedViewer.expandAll(); enableAutoExpand(unstagedViewer); } }; unstagedExpandAllAction.setImageDescriptor(UIIcons.EXPAND_ALL); unstagedCollapseAllAction = new Action(UIText.UIUtils_CollapseAll, IAction.AS_PUSH_BUTTON) { @Override public void run() { unstagedViewer.collapseAll(); disableAutoExpand(unstagedViewer); } }; unstagedCollapseAllAction.setImageDescriptor(UIIcons.COLLAPSEALL); sortAction = new Action(UIText.StagingView_UnstagedSort, IAction.AS_CHECK_BOX) { @Override public void run() { UnstagedComparator comparator = (UnstagedComparator) unstagedViewer .getComparator(); comparator.setAlphabeticallySortActive(isChecked()); <START> comparator.sort(unstagedViewer, <END> unstagedViewer.getTree().getItems()); unstagedViewer.refresh(); } }; sortAction.setImageDescriptor(UIIcons.ALPHABETICALLY_SORT); sortAction.setId(SORT_ITEM_TOOLBAR_ID); sortAction.setChecked(getSortCheckState()); unstagedToolBarManager = new ToolBarManager(SWT.FLAT | SWT.HORIZONTAL); unstagedToolBarManager.add(sortAction); unstagedToolBarManager.add(unstagedExpandAllAction); unstagedToolBarManager.add(unstagedCollapseAllAction); unstagedToolBarManager.update(true); unstagedToolBarManager.createControl(unstagedToolbarComposite); }</code><technical_language>remove comparator.sort(...) invocation, is invoked refresh()</technical_language>

Target:
private void createUnstagedToolBarComposite() { Composite unstagedToolbarComposite = toolkit .createComposite(unstagedSection); unstagedToolbarComposite.setBackground(null); unstagedToolbarComposite.setLayout(createRowLayoutWithoutMargin()); unstagedSection.setTextClient(unstagedToolbarComposite); unstagedExpandAllAction = new Action(UIText.UIUtils_ExpandAll, IAction.AS_PUSH_BUTTON) { @Override public void run() { unstagedViewer.expandAll(); enableAutoExpand(unstagedViewer); } }; unstagedExpandAllAction.setImageDescriptor(UIIcons.EXPAND_ALL); unstagedCollapseAllAction = new Action(UIText.UIUtils_CollapseAll, IAction.AS_PUSH_BUTTON) { @Override public void run() { unstagedViewer.collapseAll(); disableAutoExpand(unstagedViewer); } }; unstagedCollapseAllAction.setImageDescriptor(UIIcons.COLLAPSEALL); sortAction = new Action(UIText.StagingView_UnstagedSort, IAction.AS_CHECK_BOX) { @Override public void run() { UnstagedComparator comparator = (UnstagedComparator) unstagedViewer .getComparator(); comparator.setAlphabeticallySortActive(isChecked()); unstagedViewer.refresh(); } }; sortAction.setImageDescriptor(UIIcons.ALPHABETICALLY_SORT); sortAction.setId(SORT_ITEM_TOOLBAR_ID); sortAction.setChecked(getSortCheckState()); unstagedToolBarManager = new ToolBarManager(SWT.FLAT | SWT.HORIZONTAL); unstagedToolBarManager.add(sortAction); unstagedToolBarManager.add(unstagedExpandAllAction); unstagedToolBarManager.add(unstagedCollapseAllAction); unstagedToolBarManager.update(true); unstagedToolBarManager.createControl(unstagedToolbarComposite); }