Program: 148009
Project: 148009
Buggy source:
@Override protected void createPages(){
  super.createPages();
  XSDEditorInput2 editorInput=(XSDEditorInput2)getEditorInput();
  TreeObject treeObject=editorInput.getTreeObject();
  xobjectEditorinput=new XObjectEditorInput2(editorInput.getViewObject(),treeObject,treeObject.getDisplayName());
  DataModelMainPage2 dMainPage=new DataModelMainPage2(treeObject);
  try {
    addPage(dMainPage,xobjectEditorinput);
  }
 catch (  PartInitException e) {
    log.error(e.getMessage(),e);
  }
  IRepositoryViewObject repositoryViewObj=editorInput.getViewObject();
  CompositeViewersSelectionProvider selectionProvider=(CompositeViewersSelectionProvider)dMainPage.getSelectionProvider();
  selectionProvider.setRepositoryViewObj(repositoryViewObj);
  getSite().setSelectionProvider(dMainPage.getSelectionProvider());
  XSDSelectionListener xsdListener=new XSDSelectionListener(this,dMainPage.getXSDSchema());
  dMainPage.getTypesViewer().addSelectionChangedListener(xsdListener);
  dMainPage.getElementsViewer().addSelectionChangedListener(xsdListener);
  setXSDInput(xobjectEditorinput);
  setXObject(treeObject);
  CTabFolder folder=(CTabFolder)dMainPage.getMainControl().getParent();
  folder.getItem(2).setText(treeObject.getDisplayName() + "String_Node_Str" + Util.getRevision(treeObject));
  folder.getItem(0).setText(Messages.XSDEditor2_schemaDesign);
  folder.getItem(1).setText(Messages.XSDEditor2_schemaSource);
  setActiveEditor(dMainPage);
  if (hasSvnHistory()) {
    curContributionID=CONTRUIBUTIONID_SVNHISTORY;
  }
}

Fixed version (ground truth):
@Override protected void createPages(){
  super.createPages();
  XSDEditorInput2 editorInput=(XSDEditorInput2)getEditorInput();
  TreeObject treeObject=editorInput.getTreeObject();
  xobjectEditorinput=new XObjectEditorInput2(editorInput.getViewObject(),treeObject,treeObject.getDisplayName());
  IFile xsdFile=null;
  try {
    xsdFile=getXSDFile(treeObject);
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  DataModelMainPage2 dMainPage=new DataModelMainPage2(treeObject,xsdFile);
  try {
    addPage(dMainPage,xobjectEditorinput);
  }
 catch (  PartInitException e) {
    log.error(e.getMessage(),e);
  }
  IRepositoryViewObject repositoryViewObj=editorInput.getViewObject();
  CompositeViewersSelectionProvider selectionProvider=(CompositeViewersSelectionProvider)dMainPage.getSelectionProvider();
  selectionProvider.setRepositoryViewObj(repositoryViewObj);
  getSite().setSelectionProvider(dMainPage.getSelectionProvider());
  XSDSelectionListener xsdListener=new XSDSelectionListener(this,dMainPage.getXSDSchema());
  dMainPage.getTypesViewer().addSelectionChangedListener(xsdListener);
  dMainPage.getElementsViewer().addSelectionChangedListener(xsdListener);
  setXSDInput(xobjectEditorinput);
  setXObject(treeObject);
  CTabFolder folder=(CTabFolder)dMainPage.getMainControl().getParent();
  folder.getItem(2).setText(treeObject.getDisplayName() + "String_Node_Str" + Util.getRevision(treeObject));
  folder.getItem(0).setText(Messages.XSDEditor2_schemaDesign);
  folder.getItem(1).setText(Messages.XSDEditor2_schemaSource);
  setActiveEditor(dMainPage);
  if (hasSvnHistory()) {
    curContributionID=CONTRUIBUTIONID_SVNHISTORY;
  }
}