Program: 148992
Project: 148992
Buggy source:
protected void addPages(){
  try {
    updateTitle();
    TreeObject xobject=(TreeObject)((XObjectEditorInput)this.getEditorInput()).getModel();
    this.initialXObject=new TreeObject(xobject.getDisplayName(),xobject.getServerRoot(),xobject.getType(),xobject.getWsKey(),xobject.getWsObject(),xobject.getAdditionalInfo());
    if (!xobject.isXObject())     return;
    xobject.addListener(this);
    java.util.List<IAvailableModel> availablemodels=AvailableModelUtil.getAvailableModels();
    for (    IAvailableModel model : availablemodels) {
      model.addPage(xobject,this);
    }
switch (xobject.getType()) {
case TreeObject.DATA_MODEL:
      addPage(new DataModelMainPage(this));
    WSDataModel wsObject=(WSDataModel)(xobject.getWsObject());
  Document doc=new Document(wsObject.getXsdSchema());
xmlEditor=new XMLEditor(this,xobject);
addPage(xmlEditor,new XMLEditorInput(doc));
this.setPageText(1,"String_Node_Str");
break;
case TreeObject.INBOUND_PLUGIN:
break;
case TreeObject.OUTBOUND_PLUGIN:
break;
case TreeObject.VIEW:
addPage(new ViewMainPage(this));
break;
case TreeObject.DATA_CLUSTER:
addPage(new DataClusterMainPage(this));
break;
case TreeObject.STORED_PROCEDURE:
addPage(new StoredProcedureMainPage(this));
break;
case TreeObject.MENU:
addPage(new MenuMainPage(this));
break;
case TreeObject.SERVICE_CONFIGURATION:
addPage(new ServiceConfigrationMainPage(this));
break;
case TreeObject.RESOURCES:
case TreeObject.DATA_MODEL_RESOURCE:
case TreeObject.DATA_MODEL_TYPES_RESOURCE:
case TreeObject.CUSTOM_TYPES_RESOURCE:
case TreeObject.PICTURES_RESOURCE:
addPage(new ResourceMainPage(this));
break;
case TreeObject.CUSTOM_TYPE:
break;
default :
MessageDialog.openError(this.getSite().getShell(),"String_Node_Str","String_Node_Str" + IConstants.TALEND + "String_Node_Str"+ xobject.getType());
return;
}
}
 catch (PartInitException e) {
MessageDialog.openError(this.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
}
}

Fixed version (ground truth):
protected void addPages(){
  try {
    updateTitle();
    TreeObject xobject=(TreeObject)((XObjectEditorInput)this.getEditorInput()).getModel();
    this.initialXObject=new TreeObject(xobject.getDisplayName(),xobject.getServerRoot(),xobject.getType(),xobject.getWsKey(),xobject.getWsObject(),xobject.getAdditionalInfo());
    if (!xobject.isXObject())     return;
    xobject.addListener(this);
    java.util.List<IAvailableModel> availablemodels=AvailableModelUtil.getAvailableModels();
    for (    IAvailableModel model : availablemodels) {
      model.addPage(xobject,this);
    }
switch (xobject.getType()) {
case TreeObject.DATA_MODEL:
      addPage(new DataModelMainPage(this));
    WSDataModel wsObject=(WSDataModel)(xobject.getWsObject());
  Document doc=new Document(wsObject.getXsdSchema());
xmlEditor=new XMLEditor(this,xobject);
addPage(xmlEditor,new XMLEditorInput(doc));
this.setPageText(1,"String_Node_Str");
break;
case TreeObject.INBOUND_PLUGIN:
break;
case TreeObject.OUTBOUND_PLUGIN:
break;
case TreeObject.VIEW:
addPage(new ViewMainPage(this));
break;
case TreeObject.DATA_CLUSTER:
addPage(new DataClusterMainPage(this));
break;
case TreeObject.STORED_PROCEDURE:
addPage(new StoredProcedureMainPage(this));
break;
case TreeObject.MENU:
addPage(new MenuMainPage(this));
break;
case TreeObject.SERVICE_CONFIGURATION:
addPage(new ServiceConfigrationMainPage(this));
break;
case TreeObject.RESOURCES:
case TreeObject.DATA_MODEL_RESOURCE:
case TreeObject.DATA_MODEL_TYPES_RESOURCE:
case TreeObject.CUSTOM_TYPES_RESOURCE:
case TreeObject.PICTURES_RESOURCE:
addPage(new ResourceMainPage(this));
break;
case TreeObject.CUSTOM_TYPE:
break;
default :
return;
}
}
 catch (PartInitException e) {
MessageDialog.openError(this.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
}
}