Program: 149002
Project: 149002
Buggy source:
public void run(){
  if (this.server != null) {
    ISelection selection=server.getViewer().getSelection();
    xobject=(TreeParent)((IStructuredSelection)selection).getFirstElement();
  }
  if (xobject.getType() != TreeObject.JOB_REGISTRY)   return;
  try {
    XtentisPort port=Util.getPort(new URL(xobject.getEndpointAddress()),xobject.getUniverse(),xobject.getUsername(),xobject.getPassword());
    FileDialog fileDialog=new FileDialog(server.getSite().getShell(),SWT.OPEN);
    fileDialog.setFilterExtensions(new String[]{"String_Node_Str"});
    String name=fileDialog.open();
    if (name != null) {
      JobInfo info=getJobInfo(name);
      String endpointaddress=xobject.getEndpointAddress();
      String uploadURL=new URL(endpointaddress).getProtocol() + "String_Node_Str" + new URL(endpointaddress).getHost()+ "String_Node_Str"+ new URL(endpointaddress).getPort()+ "String_Node_Str";
      String remoteFile=Util.uploadFileToAppServer(uploadURL,info,name,"String_Node_Str","String_Node_Str");
      port.putMDMJob(new WSPUTMDMJob(info.getJobname(),info.getJobversion()));
      TreeObject obj=new TreeObject(info.getJobname() + "String_Node_Str" + info.getJobversion(),xobject.getServerRoot(),TreeObject.JOB,info,null);
      xobject.addChild(obj);
      LocalTreeObjectRepository.getInstance().mergeNewTreeObject(obj);
      XObjectEditor editpart=(XObjectEditor)server.getSite().getWorkbenchWindow().getActivePage().openEditor(new XObjectEditorInput(obj,obj.getDisplayName()),"String_Node_Str");
      if (editpart.getSelectedPage() instanceof AMainPageV2) {
        ((AMainPageV2)editpart.getSelectedPage()).markDirty();
      }
      if (editpart.getSelectedPage() instanceof AMainPage)       ((AMainPage)editpart.getSelectedPage()).markDirty();
    }
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
public void run(){
  if (this.server != null) {
    ISelection selection=server.getViewer().getSelection();
    xobject=(TreeParent)((IStructuredSelection)selection).getFirstElement();
  }
  if (xobject.getType() != TreeObject.JOB_REGISTRY)   return;
  try {
    XtentisPort port=Util.getPort(new URL(xobject.getEndpointAddress()),xobject.getUniverse(),xobject.getUsername(),xobject.getPassword());
    FileDialog fileDialog=new FileDialog(server.getSite().getShell(),SWT.OPEN);
    fileDialog.setFilterExtensions(new String[]{"String_Node_Str"});
    String name=fileDialog.open();
    if (name != null) {
      JobInfo info=getJobInfo(name);
      WSMDMJobArray array=port.getMDMJob(new WSMDMNULL());
      if (checkExist(array,info)) {
        MessageDialog.openWarning(this.server.getSite().getShell(),"String_Node_Str","String_Node_Str");
        return;
      }
      String fileName=info.getJobname() + "String_Node_Str" + info.getJobversion()+ "String_Node_Str";
      String endpointaddress=xobject.getEndpointAddress();
      String uploadURL=new URL(endpointaddress).getProtocol() + "String_Node_Str" + new URL(endpointaddress).getHost()+ "String_Node_Str"+ new URL(endpointaddress).getPort()+ "String_Node_Str"+ fileName;
      String remoteFile=Util.uploadFileToAppServer(uploadURL,name,"String_Node_Str","String_Node_Str");
      port.putMDMJob(new WSPUTMDMJob(info.getJobname(),info.getJobversion()));
      TreeObject obj=new TreeObject(info.getJobname() + "String_Node_Str" + info.getJobversion(),xobject.getServerRoot(),TreeObject.JOB,info,null);
      xobject.addChild(obj);
      LocalTreeObjectRepository.getInstance().mergeNewTreeObject(obj);
      XObjectEditor editpart=(XObjectEditor)server.getSite().getWorkbenchWindow().getActivePage().openEditor(new XObjectEditorInput(obj,obj.getDisplayName()),"String_Node_Str");
      if (editpart.getSelectedPage() instanceof AMainPageV2) {
        ((AMainPageV2)editpart.getSelectedPage()).markDirty();
      }
      if (editpart.getSelectedPage() instanceof AMainPage)       ((AMainPage)editpart.getSelectedPage()).markDirty();
    }
  }
 catch (  Exception e) {
  }
}