Program: 129788
Project: 129788
Buggy source:
@Override public void setVisible(boolean visible){
  super.setVisible(visible);
  if (visible) {
    if (this.linker != null) {
      this.linker.removeAllLinks();
    }
    String selectedEntity=null;
    if (wizardPage != null && wizardPage.getPreviousPage() instanceof MdmConceptWizardPage2) {
      selectedEntity=((MdmConceptWizardPage2)wizardPage.getPreviousPage()).getSelectedEntity();
    }
    this.treePopulator.populateTree(xsdFilePath,treeNode,selectedEntity);
    ScrollBar verticalBar=availableXmlTree.getVerticalBar();
    if (verticalBar != null) {
      verticalBar.setSelection(0);
    }
    resetStatusIfNecessary(selectedEntity);
    if (this.linker == null) {
      this.linker=new MDMLinker(this.xmlToSchemaSash,isTemplateExist);
      this.linker.init(availableXmlTree,loopTableEditorView,fieldsTableEditorView,treePopulator);
      loopTableEditorView.setLinker(this.linker);
      fieldsTableEditorView.setLinker(this.linker);
    }
 else {
      this.linker.init(treePopulator);
      this.linker.createLinks();
    }
    checkFilePathAndManageIt();
    if (xsdFilePath != null && XmlUtil.isXSDFile(xsdFilePath)) {
      previewButton.setEnabled(false);
      previewButton.setText(Messages.getString("String_Node_Str"));
      previewButton.computeSize(SWT.DEFAULT,SWT.DEFAULT);
      previewButton.getParent().layout();
    }
    if (isContextMode()) {
      adaptFormToEditable();
    }
  }
}

Fixed version (ground truth):
@Override public void setVisible(boolean visible){
  super.setVisible(visible);
  if (visible) {
    if (this.linker != null) {
      this.linker.removeAllLinks();
    }
    String selectedEntity=null;
    if (wizardPage != null && wizardPage.getPreviousPage() instanceof MdmConceptWizardPage2) {
      selectedEntity=((MdmConceptWizardPage2)wizardPage.getPreviousPage()).getSelectedEntity();
    }
    ATreeNode selectedTreeNode=getSelectedTreeNode(xsdFilePath,selectedEntity);
    List<ATreeNode> treeNodes=new ArrayList<ATreeNode>();
    CreateConceptWizard wizard=((CreateConceptWizard)getPage().getWizard());
    this.treePopulator.populateTree(wizard.getXSDSchema(),selectedTreeNode,treeNodes);
    if (!treeNodes.isEmpty()) {
      treeNode=treeNodes.get(0);
    }
    ScrollBar verticalBar=availableXmlTree.getVerticalBar();
    if (verticalBar != null) {
      verticalBar.setSelection(0);
    }
    resetStatusIfNecessary(selectedEntity);
    if (this.linker == null) {
      this.linker=new MDMLinker(this.xmlToSchemaSash,isTemplateExist);
      this.linker.init(availableXmlTree,loopTableEditorView,fieldsTableEditorView,treePopulator);
      loopTableEditorView.setLinker(this.linker);
      fieldsTableEditorView.setLinker(this.linker);
    }
 else {
      this.linker.init(treePopulator);
      this.linker.createLinks();
    }
    checkFilePathAndManageIt();
    if (xsdFilePath != null && XmlUtil.isXSDFile(xsdFilePath)) {
      previewButton.setEnabled(false);
      previewButton.setText(Messages.getString("String_Node_Str"));
      previewButton.computeSize(SWT.DEFAULT,SWT.DEFAULT);
      previewButton.getParent().layout();
    }
    if (isContextMode()) {
      adaptFormToEditable();
    }
  }
}