nus-yam/ex-repair huggingface dataset:
Program: 147759
Project: 147759
Buggy source:
@Override public void error(FieldMetadata field,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
  if (error != ValidationError.XML_SCHEMA) {
    int group=field.getContainingType().isInstantiable() ? IComponentValidationRule.MSG_GROUP_ENTITY : IComponentValidationRule.MSG_GROUP_TYPE;
    ModelValidationMessage validationMessage=new ModelValidationMessage(IComponentValidationRule.SEV_ERROR,message,"String_Node_Str",dataModelName,lineNumber,columnNumber,group,element,getEntityName(field),getEntityName(field),getPath(field));
    addMessage(lineNumber,columnNumber,error,validationMessage);
    errorCount++;
  }
}

Fixed version (ground truth):
@Override public void error(FieldMetadata field,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
  if (error != ValidationError.XML_SCHEMA) {
    ComplexTypeMetadata containingType=field.getContainingType();
    while (containingType instanceof ContainedComplexTypeMetadata) {
      containingType=((ContainedComplexTypeMetadata)containingType).getContainerType();
    }
    int group=containingType.isInstantiable() ? IComponentValidationRule.MSG_GROUP_ENTITY : IComponentValidationRule.MSG_GROUP_TYPE;
    ModelValidationMessage validationMessage=new ModelValidationMessage(IComponentValidationRule.SEV_ERROR,message,"String_Node_Str",dataModelName,lineNumber,columnNumber,group,element,getEntityName(field),getEntityName(field),getPath(field));
    addMessage(lineNumber,columnNumber,error,validationMessage);
    errorCount++;
  }
}
Program: 147760
Project: 147760
Buggy source:
private static String getEntityName(FieldMetadata field){
  try {
    return field.getContainingType().getName();
  }
 catch (  Exception e) {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
private static String getEntityName(FieldMetadata field){
  try {
    ComplexTypeMetadata containingType=field.getContainingType();
    while (containingType instanceof ContainedComplexTypeMetadata) {
      containingType=((ContainedComplexTypeMetadata)containingType).getContainerType();
    }
    String name=containingType.getName();
    if (name.startsWith(MetadataRepository.ANONYMOUS_PREFIX)) {
      name=ANONYMOUS_TYPE_NAME;
    }
    return name;
  }
 catch (  Exception e) {
    return "String_Node_Str";
  }
}
Program: 147761
Project: 147761
Buggy source:
@Override public void error(FieldMetadata field,String message,int lineNumber,int columnNumber,ValidationError error){
  ModelValidationMessage validationMessage=new ModelValidationMessage(IComponentValidationRule.SEV_ERROR,message,"String_Node_Str",dataModelName,lineNumber,columnNumber,IComponentValidationRule.MSG_GROUP_ELEMENT,field.<Element>getData(MetadataRepository.XSD_DOM_ELEMENT),getEntityName(field),null,getPath(field));
  addMessage(lineNumber,columnNumber,error,validationMessage);
  errorCount++;
}

Fixed version (ground truth):
@Override public void error(FieldMetadata field,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
  ModelValidationMessage validationMessage=new ModelValidationMessage(IComponentValidationRule.SEV_ERROR,message,"String_Node_Str",dataModelName,lineNumber,columnNumber,IComponentValidationRule.MSG_GROUP_ELEMENT,element,getEntityName(field),null,getPath(field));
  addMessage(lineNumber,columnNumber,error,validationMessage);
  errorCount++;
}
Program: 147762
Project: 147762
Buggy source:
@Override public void fatal(FieldMetadata field,String message,int lineNumber,int columnNumber,ValidationError error){
  error(field,message,lineNumber,columnNumber,error);
}

Fixed version (ground truth):
@Override public void fatal(FieldMetadata field,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
  error(field,message,element,lineNumber,columnNumber,error);
}
Program: 147763
Project: 147763
Buggy source:
@Override public void warning(FieldMetadata field,String message,int lineNumber,int columnNumber,ValidationError error){
  ModelValidationMessage validationMessage=new ModelValidationMessage(IComponentValidationRule.SEV_WARNING,message,"String_Node_Str",dataModelName,lineNumber,columnNumber,IComponentValidationRule.MSG_GROUP_ELEMENT,field.<Element>getData(MetadataRepository.XSD_DOM_ELEMENT),getEntityName(field),null,getPath(field));
  addMessage(lineNumber,columnNumber,error,validationMessage);
}

Fixed version (ground truth):
@Override public void warning(FieldMetadata field,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
  ModelValidationMessage validationMessage=new ModelValidationMessage(IComponentValidationRule.SEV_WARNING,message,"String_Node_Str",dataModelName,lineNumber,columnNumber,IComponentValidationRule.MSG_GROUP_ELEMENT,element,getEntityName(field),null,getPath(field));
  addMessage(lineNumber,columnNumber,error,validationMessage);
}
Program: 147764
Project: 147764
Buggy source:
@Override public void warning(FieldMetadata field,String message,int lineNumber,int columnNumber){
  ModelValidationMessage validationMessage=new ModelValidationMessage(IComponentValidationRule.SEV_WARNING,message,"String_Node_Str",dataModelName,lineNumber,columnNumber,IComponentValidationRule.MSG_GROUP_ELEMENT,field.<Element>getData(MetadataRepository.XSD_DOM_ELEMENT),getFieldName(field),null,getPath(field));
  messages.add(validationMessage);
}

Fixed version (ground truth):
@Override public void warning(FieldMetadata field,String message,int lineNumber,int columnNumber){
  ModelValidationMessage validationMessage=new ModelValidationMessage(IComponentValidationRule.SEV_WARNING,message,"String_Node_Str",dataModelName,lineNumber,columnNumber,IComponentValidationRule.MSG_GROUP_ELEMENT,field.<Element>getData(MetadataRepository.XSD_DOM_ELEMENT),getEntityName(field),null,getPath(field));
  messages.add(validationMessage);
}
Program: 147765
Project: 147765
Buggy source:
@Override public void error(FieldMetadata field,String message,int lineNumber,int columnNumber){
  ModelValidationMessage validationMessage=new ModelValidationMessage(IComponentValidationRule.SEV_ERROR,message,"String_Node_Str",dataModelName,lineNumber,columnNumber,IComponentValidationRule.MSG_GROUP_ELEMENT,field.<Element>getData(MetadataRepository.XSD_DOM_ELEMENT),getFieldName(field),null,getPath(field));
  messages.add(validationMessage);
  errorCount++;
}

Fixed version (ground truth):
@Override public void error(FieldMetadata field,String message,int lineNumber,int columnNumber){
  ModelValidationMessage validationMessage=new ModelValidationMessage(IComponentValidationRule.SEV_ERROR,message,"String_Node_Str",dataModelName,lineNumber,columnNumber,IComponentValidationRule.MSG_GROUP_ELEMENT,field.<Element>getData(MetadataRepository.XSD_DOM_ELEMENT),getEntityName(field),null,getPath(field));
  messages.add(validationMessage);
  errorCount++;
}
Program: 147766
Project: 147766
Buggy source:
public void showMDMServerConsole(MDMServerDef serverDef){
  IWorkbenchWindow window=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  if (window == null) {
    return;
  }
  IWorkbenchPage page=window.getActivePage();
  if (page == null) {
    return;
  }
  Map<String,MDMServerMessageConsole> serverToConsole=MDMServerExplorerPlugin.getDefault().getServerToConsole();
  MDMServerMessageConsole mdmServerConsole=serverToConsole.get(serverDef.getName());
  if (mdmServerConsole == null) {
    mdmServerConsole=new MDMServerMessageConsole(serverDef);
    serverToConsole.put(serverDef.getName(),mdmServerConsole);
  }
  if (!containedMDMServerMessageConsole(mdmServerConsole)) {
    IConsoleManager consoleManager=ConsolePlugin.getDefault().getConsoleManager();
    consoleManager.addConsoles(new IConsole[]{mdmServerConsole});
  }
  Map<String,IConsoleView> serverToView=MDMServerExplorerPlugin.getDefault().getServerToView();
  IConsoleView consoleView=serverToView.get(serverDef.getName());
  if (consoleView == null) {
    consoleView=showConsoleView(serverDef);
    Assert.isNotNull(consoleView);
    serverToView.put(serverDef.getName(),consoleView);
  }
  mdmServerConsole.activate();
}

Fixed version (ground truth):
public void showMDMServerConsole(MDMServerDef serverDef){
  IWorkbenchWindow window=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  if (window == null) {
    return;
  }
  IWorkbenchPage page=window.getActivePage();
  if (page == null) {
    return;
  }
  Map<String,MDMServerMessageConsole> serverToConsole=MDMServerExplorerPlugin.getDefault().getServerToConsole();
  MDMServerMessageConsole mdmServerConsole=serverToConsole.get(serverDef.getName());
  if (mdmServerConsole == null) {
    mdmServerConsole=new MDMServerMessageConsole(serverDef);
    serverToConsole.put(serverDef.getName(),mdmServerConsole);
  }
  if (!containedMDMServerMessageConsole(mdmServerConsole)) {
    IConsoleManager consoleManager=ConsolePlugin.getDefault().getConsoleManager();
    consoleManager.addConsoles(new IConsole[]{mdmServerConsole});
  }
  showConsoleView(serverDef.getName());
  mdmServerConsole.activate();
}
Program: 147767
Project: 147767
Buggy source:
private IConsoleView showConsoleView(MDMServerDef serverDef){
  IWorkbenchWindow window=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  if (window == null) {
    return null;
  }
  IWorkbenchPage page=window.getActivePage();
  if (page == null) {
    return null;
  }
  try {
    return (IConsoleView)page.showView(IConsoleConstants.ID_CONSOLE_VIEW,serverDef.getName(),IWorkbenchPage.VIEW_ACTIVATE);
  }
 catch (  PartInitException e) {
    e.printStackTrace();
  }
  return null;
}

Fixed version (ground truth):
private void showConsoleView(String serverName){
  IWorkbenchWindow window=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  if (window == null) {
    return;
  }
  IWorkbenchPage page=window.getActivePage();
  if (page == null) {
    return;
  }
  try {
    page.showView(IConsoleConstants.ID_CONSOLE_VIEW,serverName,IWorkbenchPage.VIEW_ACTIVATE);
  }
 catch (  PartInitException e) {
    e.printStackTrace();
  }
}
Program: 147768
Project: 147768
Buggy source:
@Override public IPageBookViewPage createPage(IConsoleView view){
  IOConsolePage consolePage=new IOConsolePage(this,view){
    @Override protected void contextMenuAboutToShow(    IMenuManager menuManager){
      super.contextMenuAboutToShow(menuManager);
      menuManager.add(new Separator());
      menuManager.add(reloadAction);
      menuManager.add(monitorAction);
      menuManager.add(downloadAction);
    }
    @Override public void dispose(){
      disposeTimer();
      PlatformUI.getPreferenceStore().removePropertyChangeListener(MDMServerMessageConsole.this);
      MDMServerExplorerPlugin.getDefault().getServerToConsole().remove(serverDef.getName());
      MDMServerExplorerPlugin.getDefault().getServerToView().remove(serverDef.getName());
      ConsolePlugin.getDefault().getConsoleManager().removeConsoles(new IConsole[]{MDMServerMessageConsole.this});
      super.dispose();
    }
  }
;
  consolePage.setReadOnly();
  return consolePage;
}

Fixed version (ground truth):
@Override public IPageBookViewPage createPage(IConsoleView view){
  IOConsolePage consolePage=new IOConsolePage(this,view){
    @Override protected void contextMenuAboutToShow(    IMenuManager menuManager){
      super.contextMenuAboutToShow(menuManager);
      menuManager.add(new Separator());
      menuManager.add(reloadAction);
      menuManager.add(monitorAction);
      menuManager.add(downloadAction);
    }
    @Override public void dispose(){
      disposeTimer();
      PlatformUI.getPreferenceStore().removePropertyChangeListener(MDMServerMessageConsole.this);
      MDMServerExplorerPlugin.getDefault().getServerToConsole().remove(serverDef.getName());
      ConsolePlugin.getDefault().getConsoleManager().removeConsoles(new IConsole[]{MDMServerMessageConsole.this});
      super.dispose();
    }
  }
;
  consolePage.setReadOnly();
  return consolePage;
}
Program: 147769
Project: 147769
Buggy source:
@Override public void dispose(){
  disposeTimer();
  PlatformUI.getPreferenceStore().removePropertyChangeListener(MDMServerMessageConsole.this);
  MDMServerExplorerPlugin.getDefault().getServerToConsole().remove(serverDef.getName());
  MDMServerExplorerPlugin.getDefault().getServerToView().remove(serverDef.getName());
  ConsolePlugin.getDefault().getConsoleManager().removeConsoles(new IConsole[]{MDMServerMessageConsole.this});
  super.dispose();
}

Fixed version (ground truth):
@Override public void dispose(){
  disposeTimer();
  PlatformUI.getPreferenceStore().removePropertyChangeListener(MDMServerMessageConsole.this);
  MDMServerExplorerPlugin.getDefault().getServerToConsole().remove(serverDef.getName());
  ConsolePlugin.getDefault().getConsoleManager().removeConsoles(new IConsole[]{MDMServerMessageConsole.this});
  super.dispose();
}
Program: 147770
Project: 147770
Buggy source:
@Override public void stop(BundleContext context) throws Exception {
  if (serverToConsole != null) {
    serverToConsole.clear();
    serverToConsole=null;
  }
  if (serverToView != null) {
    serverToView.clear();
    serverToView=null;
  }
  plugin=null;
  super.stop(context);
}

Fixed version (ground truth):
@Override public void stop(BundleContext context) throws Exception {
  if (serverToConsole != null) {
    serverToConsole.clear();
    serverToConsole=null;
  }
  plugin=null;
  super.stop(context);
}
Program: 147771
Project: 147771
Buggy source:
@Override public void start(BundleContext context) throws Exception {
  super.start(context);
  plugin=this;
  serverToConsole=new HashMap<String,MDMServerMessageConsole>();
  serverToView=new HashMap<String,IConsoleView>();
}

Fixed version (ground truth):
@Override public void start(BundleContext context) throws Exception {
  super.start(context);
  plugin=this;
  serverToConsole=new HashMap<String,MDMServerMessageConsole>();
}
Program: 147772
Project: 147772
Buggy source:
/** 
 * set the list with foreign concept name of in the element
 * @author ymli
 * @param list
 * @param element
 */
public static void getforeignKeyOfElement(Set<String> list,XSDElementDeclaration element){
  if (element.getAnnotation() != null) {
    getForeignKeyofParcle(list,element.getAnnotation());
  }
  if (element.getTypeDefinition() instanceof XSDComplexTypeDefinition) {
    XSDComplexTypeContent fromcomplexType=((XSDComplexTypeDefinition)element.getTypeDefinition()).getContent();
    if (fromcomplexType instanceof XSDParticle) {
      XSDParticle particle=(XSDParticle)fromcomplexType;
      if (particle.getTerm() instanceof XSDModelGroup) {
        XSDModelGroup modelGroup=((XSDModelGroup)particle.getTerm());
        EList fromlist=modelGroup.getContents();
        for (        XSDParticle el : (XSDParticle[])fromlist.toArray(new XSDParticle[fromlist.size()])) {
          XSDTerm term=el.getTerm();
          if (term instanceof XSDElementDeclaration) {
            if (term.equals(element)) {
              continue;
            }
            XSDAnnotation annotation=((XSDElementDeclaration)term).getAnnotation();
            if (annotation != null) {
              getForeignKeyofParcle(list,annotation);
            }
            getforeignKeyOfElement(list,(XSDElementDeclaration)term);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * set the list with foreign concept name of in the element
 * @author ymli
 * @param list
 * @param element
 */
public static void getforeignKeyOfElement(Set<String> list,XSDElementDeclaration element){
  if (element.getAnnotation() != null) {
    getForeignKeyofParcle(list,element.getAnnotation());
  }
  if (element.getTypeDefinition() instanceof XSDComplexTypeDefinition) {
    XSDComplexTypeContent fromcomplexType=((XSDComplexTypeDefinition)element.getTypeDefinition()).getContent();
    if (fromcomplexType instanceof XSDParticle) {
      XSDParticle particle=(XSDParticle)fromcomplexType;
      if (particle.getTerm() instanceof XSDModelGroup) {
        XSDModelGroup modelGroup=((XSDModelGroup)particle.getTerm());
        EList fromlist=modelGroup.getContents();
        for (        XSDParticle el : (XSDParticle[])fromlist.toArray(new XSDParticle[fromlist.size()])) {
          XSDTerm term=el.getTerm();
          if (term instanceof XSDElementDeclaration) {
            if (isReferrenced(element,(XSDElementDeclaration)term)) {
              continue;
            }
            XSDAnnotation annotation=((XSDElementDeclaration)term).getAnnotation();
            if (annotation != null) {
              getForeignKeyofParcle(list,annotation);
            }
            getforeignKeyOfElement(list,(XSDElementDeclaration)term);
          }
        }
      }
    }
  }
}
Program: 147773
Project: 147773
Buggy source:
public ERepositoryObjectType getRepositoryObjectType(Item item){
  if (item instanceof ProcessItem || item instanceof ContainerItem) {
    return ERepositoryObjectType.PROCESS;
  }
  return null;
}

Fixed version (ground truth):
public ERepositoryObjectType getRepositoryObjectType(Item item){
  if (item.eClass().getInstanceClass() == ProcessItem.class || item instanceof ContainerItem) {
    return ERepositoryObjectType.PROCESS;
  }
  return null;
}
Program: 147774
Project: 147774
Buggy source:
public Resource save(Item item) throws PersistenceException {
  return null;
}

Fixed version (ground truth):
@Override public Resource save(Item item) throws PersistenceException {
  return null;
}
Program: 147775
Project: 147775
Buggy source:
public String getDescription(Object anElement){
  if (anElement instanceof IRepositoryViewObject) {
    Property property=((IRepositoryViewObject)anElement).getProperty();
    Item item=property.getItem();
    if (item instanceof MDMServerObjectItem) {
      MDMServerObject serverObject=((MDMServerObjectItem)item).getMDMServerObject();
      if (serverObject != null) {
        return serverObject.getName();
      }
    }
    String label=property.getLabel();
    return label;
  }
  return null;
}

Fixed version (ground truth):
public String getDescription(Object anElement){
  if (anElement instanceof IRepositoryViewObject) {
    Property property=((IRepositoryViewObject)anElement).getProperty();
    Item item=property.getItem();
    if (item instanceof MDMServerObjectItem) {
      String label=getServerObjectItemText(item);
      if (label != null) {
        return label;
      }
    }
    String label=property.getLabel();
    return label;
  }
  return null;
}
Program: 147776
Project: 147776
Buggy source:
public static List<IRepositoryViewObject> findViewObjects(ERepositoryObjectType type,Item parentItem,IFolder folder,boolean useRepositoryViewObject,boolean withDeleted){
  List<IRepositoryViewObject> viewObjects=new LinkedList<IRepositoryViewObject>();
  try {
    for (    IResource res : folder.members()) {
      if (res instanceof IFolder) {
        if (!isDeletedFolder((IFolder)res) && !isSVNFolder((IFolder)res)) {
          IRepositoryViewObject folderObject=createFolderViewObject(type,res.getName(),parentItem,false);
          viewObjects.add(folderObject);
        }
      }
    }
    List<IRepositoryViewObject> children=findViewObjectsInFolder(type,parentItem,useRepositoryViewObject,withDeleted);
    viewObjects.addAll(children);
  }
 catch (  CoreException e) {
    log.error(e.getMessage(),e);
  }
  return viewObjects;
}

Fixed version (ground truth):
public static List<IRepositoryViewObject> findViewObjects(ERepositoryObjectType type,Item parentItem,IFolder folder,boolean useRepositoryViewObject,boolean withDeleted){
  List<IRepositoryViewObject> viewObjects=new LinkedList<IRepositoryViewObject>();
  try {
    for (    IResource res : folder.members()) {
      if (res instanceof IFolder) {
        if (!isDeletedFolder((IFolder)res) && !isSVNFolder((IFolder)res)) {
          IRepositoryViewObject folderObject=null;
          String resPath=parentItem.getState().getPath() + IPath.SEPARATOR + res.getName();
          folderObject=ContainerCacheService.get(type,resPath);
          if (folderObject == null) {
            folderObject=createFolderViewObject(type,res.getName(),parentItem,false);
          }
          viewObjects.add(folderObject);
        }
      }
    }
    List<IRepositoryViewObject> children=findViewObjectsInFolder(type,parentItem,useRepositoryViewObject,withDeleted);
    viewObjects.addAll(children);
  }
 catch (  CoreException e) {
    log.error(e.getMessage(),e);
  }
  return viewObjects;
}
Program: 147777
Project: 147777
Buggy source:
public void stop(BundleContext context) throws Exception {
  if (jobResourceListener != null)   ResourcesPlugin.getWorkspace().removeResourceChangeListener(jobResourceListener);
  plugin=null;
  super.stop(context);
}

Fixed version (ground truth):
@Override public void stop(BundleContext context) throws Exception {
  if (jobListener != null) {
    ProxyRepositoryFactory.getInstance().removePropertyChangeListener(jobListener);
  }
  plugin=null;
  super.stop(context);
}
Program: 147778
Project: 147778
Buggy source:
public void start(BundleContext context) throws Exception {
  super.start(context);
  plugin=this;
  ResourcesPlugin.getWorkspace().addResourceChangeListener(jobResourceListener);
}

Fixed version (ground truth):
@Override public void start(BundleContext context) throws Exception {
  super.start(context);
  plugin=this;
  ProxyRepositoryFactory.getInstance().addPropertyChangeListener(jobListener);
}
Program: 147779
Project: 147779
Buggy source:
public void init(TreeViewer viewer,IStructuredSelection selection){
  boolean canWork=true;
  ECodeLanguage language=((RepositoryContext)CorePlugin.getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY)).getProject().getLanguage();
  if (selection.isEmpty() || language == ECodeLanguage.PERL) {
    setEnabled(false);
    return;
  }
  if (MDMServerHelper.getServers().size() == 0) {
    setEnabled(false);
    return;
  }
  List<RepositoryNode> nodes=(List<RepositoryNode>)selection.toList();
  for (  RepositoryNode node : nodes) {
    if (node.getType() != ENodeType.REPOSITORY_ELEMENT || node.getProperties(EProperties.CONTENT_TYPE) != ERepositoryObjectType.PROCESS) {
      canWork=false;
      break;
    }
  }
  setEnabled(canWork);
}

Fixed version (ground truth):
public void init(TreeViewer viewer,IStructuredSelection selection){
  boolean canWork=true;
  ECodeLanguage language=((RepositoryContext)CorePlugin.getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY)).getProject().getLanguage();
  if (selection.isEmpty() || language == ECodeLanguage.PERL) {
    setEnabled(false);
    return;
  }
  if (MDMServerHelper.getServers().size() == 0) {
    setEnabled(false);
    return;
  }
  List<RepositoryNode> nodes=(List<RepositoryNode>)selection.toList();
  for (  RepositoryNode node : nodes) {
    if (node.getType() == ENodeType.REPOSITORY_ELEMENT && node.getProperties(EProperties.CONTENT_TYPE) == ERepositoryObjectType.PROCESS) {
      continue;
    }
    canWork=false;
    break;
  }
  setEnabled(canWork);
}
Program: 147780
Project: 147780
Buggy source:
protected void doRun(){
  DeployOnMDMExportWizard publishWizard=new DeployOnMDMExportWizard();
  publishWizard.setWindowTitle(EXPORTJOBSCRIPTS);
  publishWizard.init(getWorkbench(),(IStructuredSelection)this.getSelection());
  Shell activeShell=Display.getCurrent().getActiveShell();
  WizardDialog dialog=new WizardDialog(activeShell,publishWizard);
  int returnCode=dialog.open();
  if (returnCode == IDialogConstants.OK_ID) {
    SpagoBiServer spagoBiServer=publishWizard.getMdmServer();
    MDMServerDef mdmServer=getMdmServer(spagoBiServer);
    IRepositoryViewObject viewObj=getSelectedViewObject();
    Item item=viewObj.getProperty().getItem();
    Property property=item.getProperty();
    if (property != null) {
      property.getAdditionalProperties().put(PROP_LAST_SERVER_DEF,mdmServer.getName());
    }
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    try {
      factory.save(item);
      refreshMdmRepositoryViewTree();
    }
 catch (    PersistenceException e) {
      log.error(e.getMessage(),e);
    }
  }
}

Fixed version (ground truth):
protected void doRun(){
  IRepositoryViewObject viewObj=getSelectedViewObject();
  DeployOnMDMExportWizard publishWizard=new DeployOnMDMExportWizard();
  publishWizard.setWindowTitle(EXPORTJOBSCRIPTS);
  publishWizard.init(getWorkbench(),(IStructuredSelection)this.getSelection());
  Shell activeShell=Display.getCurrent().getActiveShell();
  WizardDialog dialog=new WizardDialog(activeShell,publishWizard);
  int returnCode=dialog.open();
  if (returnCode == IDialogConstants.OK_ID) {
    SpagoBiServer spagoBiServer=publishWizard.getMdmServer();
    MDMServerDef mdmServer=getMdmServer(spagoBiServer);
    Item item=viewObj.getProperty().getItem();
    Property property=item.getProperty();
    if (property != null) {
      property.getAdditionalProperties().put(PROP_LAST_SERVER_DEF,mdmServer.getName());
    }
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    try {
      factory.save(item);
      refreshMdmRepositoryViewTree();
    }
 catch (    PersistenceException e) {
      log.error(e.getMessage(),e);
    }
  }
}
Program: 147781
Project: 147781
Buggy source:
protected void doRun(){
  DeployOnMDMExportWizard publishWizard=new DeployOnMDMExportWizard();
  publishWizard.setWindowTitle(EXPORTJOBSCRIPTS);
  publishWizard.init(getWorkbench(),(IStructuredSelection)this.getSelection());
  Shell activeShell=Display.getCurrent().getActiveShell();
  WizardDialog dialog=new WizardDialog(activeShell,publishWizard);
  int returnCode=dialog.open();
  if (returnCode == IDialogConstants.OK_ID) {
    SpagoBiServer spagoBiServer=publishWizard.getMdmServer();
    MDMServerDef mdmServer=getMdmServer(spagoBiServer);
    IRepositoryViewObject viewObj=getSelectedViewObject();
    Item item=viewObj.getProperty().getItem();
    Property property=item.getProperty();
    if (property != null) {
      property.getAdditionalProperties().put(PROP_LAST_SERVER_DEF,mdmServer.getName());
    }
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    try {
      factory.save(item);
      refreshMdmRepositoryViewTree();
    }
 catch (    PersistenceException e) {
      log.error(e.getMessage(),e);
    }
  }
}

Fixed version (ground truth):
protected void doRun(){
  IRepositoryViewObject viewObj=getSelectedViewObject();
  DeployOnMDMExportWizard publishWizard=new DeployOnMDMExportWizard();
  publishWizard.setWindowTitle(EXPORTJOBSCRIPTS);
  publishWizard.init(getWorkbench(),(IStructuredSelection)this.getSelection());
  Shell activeShell=Display.getCurrent().getActiveShell();
  WizardDialog dialog=new WizardDialog(activeShell,publishWizard);
  int returnCode=dialog.open();
  if (returnCode == IDialogConstants.OK_ID) {
    SpagoBiServer spagoBiServer=publishWizard.getMdmServer();
    MDMServerDef mdmServer=getMdmServer(spagoBiServer);
    Item item=viewObj.getProperty().getItem();
    Property property=item.getProperty();
    if (property != null) {
      property.getAdditionalProperties().put(PROP_LAST_SERVER_DEF,mdmServer.getName());
    }
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    try {
      factory.save(item);
      refreshMdmRepositoryViewTree();
    }
 catch (    PersistenceException e) {
      log.error(e.getMessage(),e);
    }
  }
}
Program: 147782
Project: 147782
Buggy source:
protected List<IRepositoryViewObject> getSelectedRepositoryViewObject(){
  List<IRepositoryViewObject> viewObjs=new LinkedList<IRepositoryViewObject>();
  for (  Object obj : getSelectedObject()) {
    if (obj instanceof IRepositoryViewObject)     viewObjs.add((IRepositoryViewObject)obj);
  }
  return viewObjs;
}

Fixed version (ground truth):
protected List<IRepositoryViewObject> getSelectedRepositoryViewObject(){
  List<IRepositoryViewObject> viewObjs=new LinkedList<IRepositoryViewObject>();
  for (  Object obj : getSelectedObject()) {
    if (obj instanceof IRepositoryViewObject)     viewObjs.add((IRepositoryViewObject)obj);
  }
  reorderRepositoryViewObjects(viewObjs);
  return viewObjs;
}
Program: 147783
Project: 147783
Buggy source:
public void runWithType(ERepositoryObjectType type){
  DeployAllDialog dialog=new DeployAllDialog(getShell(),type);
  if (dialog.open() == IDialogConstants.OK_ID) {
    List<AbstractDeployCommand> selectededCommands=dialog.getSelectedCommands();
    if (selectededCommands.size() >= 0) {
      LockedDirtyObjectDialog lockDirtyDialog=new LockedDirtyObjectDialog(getShell(),Messages.AbstractDeployAction_promptToSaveEditors,getDeployViewObject(selectededCommands));
      if (lockDirtyDialog.needShowDialog() && lockDirtyDialog.open() == IDialogConstants.CANCEL_ID) {
        return;
      }
      lockDirtyDialog.saveDirtyObjects();
      MDMServerDef serverDef=dialog.getServerDef();
      IStatus status=DeployService.getInstance().runCommands(selectededCommands,serverDef);
      updateChangedStatus(status);
      if (status.isMultiStatus()) {
        showDeployStatus(status);
      }
      updateLastServer(status,new NullProgressMonitor());
    }
  }
  commonViewer.refresh();
}

Fixed version (ground truth):
public void runWithType(ERepositoryObjectType type){
  DeployAllDialog dialog=new DeployAllDialog(getShell(),type);
  if (dialog.open() == IDialogConstants.OK_ID) {
    List<AbstractDeployCommand> selectededCommands=dialog.getSelectedCommands();
    if (selectededCommands.size() >= 0) {
      LockedDirtyObjectDialog lockDirtyDialog=new LockedDirtyObjectDialog(getShell(),Messages.AbstractDeployAction_promptToSaveEditors,getDeployViewObject(selectededCommands));
      if (lockDirtyDialog.needShowDialog() && lockDirtyDialog.open() == IDialogConstants.CANCEL_ID) {
        return;
      }
      lockDirtyDialog.saveDirtyObjects();
      MDMServerDef serverDef=dialog.getServerDef();
      reorderCommandObjects(selectededCommands);
      IStatus status=DeployService.getInstance().runCommands(selectededCommands,serverDef);
      updateChangedStatus(status);
      if (status.isMultiStatus()) {
        showDeployStatus(status);
      }
      updateLastServer(status,new NullProgressMonitor());
    }
  }
  commonViewer.refresh();
}
Program: 147784
Project: 147784
Buggy source:
public char[] getCompletionProposalAutoActivationCharacters(){
  return new char[]{'<'};
}

Fixed version (ground truth):
public char[] getCompletionProposalAutoActivationCharacters(){
  return new char[]{START};
}
Program: 147785
Project: 147785
Buggy source:
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,int offset){
  List<ICompletionProposal> proposals=new ArrayList<ICompletionProposal>();
  if (keyWordProvider != null) {
    String[] keyWords=keyWordProvider.getCurrentKeyWords();
    if (keyWords != null) {
      for (int i=0; i < keyWords.length; i++) {
        String entityName=keyWords[i];
        String replacementString="String_Node_Str" + entityName + "String_Node_Str"+ entityName+ "String_Node_Str";
        CompletionProposal proposal=new CompletionProposal(replacementString,offset - 1,1,entityName.length() + 2);
        proposals.add(proposal);
      }
    }
  }
  return proposals.toArray(new ICompletionProposal[0]);
}

Fixed version (ground truth):
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,int offset){
  List<ICompletionProposal> proposals=new ArrayList<ICompletionProposal>();
  if (keyWordProvider != null) {
    IDocument document=viewer.getDocument();
    int start=getInputPos(document,offset);
    String input=null;
    if (start > 0) {
      try {
        input=document.get(start,offset - start);
      }
 catch (      BadLocationException e) {
      }
    }
    if (input != null) {
      String[] keyWords=keyWordProvider.getCurrentKeyWords();
      int len=offset - start;
      if (keyWords != null) {
        boolean showAll=input.length() == 0;
        for (int i=0; i < keyWords.length; i++) {
          String entityName=keyWords[i];
          if (showAll || entityName.toLowerCase().startsWith(input)) {
            String replacementString=START + entityName + "String_Node_Str"+ entityName+ "String_Node_Str";
            CompletionProposal proposal=new CompletionProposal(replacementString,offset - len - 1,len + 1,entityName.length() + 2);
            proposals.add(proposal);
          }
        }
      }
    }
  }
  return proposals.toArray(new ICompletionProposal[0]);
}
Program: 147786
Project: 147786
Buggy source:
@Override public boolean isProcess(Item item){
  return false;
}

Fixed version (ground truth):
public boolean isProcess(Item item){
  return false;
}
Program: 147787
Project: 147787
Buggy source:
@Override public IImage getIcon(ERepositoryObjectType type){
  if (type == TYPE_MENU) {
    return ServerObjectImage.MENU_ICON;
  }
  if (type == TYPE_ROLE) {
    return ServerObjectImage.ROLE_ICON;
  }
  if (type == TYPE_DATACLUSTER) {
    return ServerObjectImage.DATACLUSTER_ICON;
  }
  if (type == TYPE_DATAMODEL) {
    return ServerObjectImage.DATAMODEL_ICON;
  }
  if (type == TYPE_EVENTMANAGER) {
    return ServerObjectImage.EVENTMANAGER_ICON;
  }
  if (type == TYPE_JOBMODEL) {
    return ServerObjectImage.JOBMODEL_ICON;
  }
  if (type == TYPE_RESOURCE) {
    return ServerObjectImage.RESOURCE_ICON;
  }
  if (type == TYPE_ROUTINGRULE) {
    return ServerObjectImage.ROUTINGRULE_ICON;
  }
  if (type == TYPE_SERVICECONFIGURATION) {
    return ServerObjectImage.SERVICECONFIGURATION_ICON;
  }
  if (type == TYPE_STOREPROCEDURE) {
    return ServerObjectImage.STOREPROCEDURE_ICON;
  }
  if (type == TYPE_SYNCHRONIZATIONPLAN) {
    return ServerObjectImage.SYNCHRONIZATIONPLAN_ICON;
  }
  if (type == TYPE_TRANSFORMERV2) {
    return ServerObjectImage.TRANSFORMERV2_ICON;
  }
  if (type == TYPE_UNIVERSE) {
    return ServerObjectImage.UNIVERSE_ICON;
  }
  if (type == TYPE_VIEW) {
    return ServerObjectImage.VIEW_ICON;
  }
  if (type == TYPE_WORKFLOW) {
    return ServerObjectImage.WORKFLOW_ICON;
  }
  if (type == TYPE_CUSTOM_FORM) {
    return ServerObjectImage.CUSTOMFORM_ICON;
  }
  return null;
}

Fixed version (ground truth):
public IImage getIcon(Item item){
  return null;
}
Program: 147788
Project: 147788
Buggy source:
private String rebuildItemPath(String processName){
  String path=parentItem.getState().getPath();
  if (path.isEmpty()) {
    if (processName.startsWith(ITransformerV2NodeConsDef.Prefix_BEFORESAVE))     path=IPath.SEPARATOR + ITransformerV2NodeConsDef.PATH_BEFORESAVE;
 else     if (processName.startsWith(ITransformerV2NodeConsDef.Prefix_BEFOREDEL)) {
      path=IPath.SEPARATOR + ITransformerV2NodeConsDef.PATH_BEFOREDEL;
    }
 else     if (processName.startsWith(ITransformerV2NodeConsDef.Prefix_RUNNABLE)) {
      path=IPath.SEPARATOR + ITransformerV2NodeConsDef.PATH_ENTITYACTION;
    }
 else     if (processName.startsWith(ITransformerV2NodeConsDef.Prefix_STANDLONE)) {
      path=IPath.SEPARATOR + ITransformerV2NodeConsDef.PATH_WELCOMEACTION;
    }
 else     if (processName.startsWith(ITransformerV2NodeConsDef.Prefix_SMARTVIEW)) {
      path=IPath.SEPARATOR + ITransformerV2NodeConsDef.PATH_SMARTVIEW;
    }
 else {
      path=IPath.SEPARATOR + ITransformerV2NodeConsDef.PATH_OTHER;
    }
  }
  return path;
}

Fixed version (ground truth):
private String rebuildItemPath(String processName){
  String path=parentItem.getState().getPath();
  processName=processName.toLowerCase();
  if (path.isEmpty()) {
    if (processName.startsWith(ITransformerV2NodeConsDef.Prefix_BEFORESAVE))     path=IPath.SEPARATOR + ITransformerV2NodeConsDef.PATH_BEFORESAVE;
 else     if (processName.startsWith(ITransformerV2NodeConsDef.Prefix_BEFOREDEL)) {
      path=IPath.SEPARATOR + ITransformerV2NodeConsDef.PATH_BEFOREDEL;
    }
 else     if (processName.startsWith(ITransformerV2NodeConsDef.Prefix_RUNNABLE)) {
      path=IPath.SEPARATOR + ITransformerV2NodeConsDef.PATH_ENTITYACTION;
    }
 else     if (processName.startsWith(ITransformerV2NodeConsDef.Prefix_STANDLONE)) {
      path=IPath.SEPARATOR + ITransformerV2NodeConsDef.PATH_WELCOMEACTION;
    }
 else     if (processName.startsWith(ITransformerV2NodeConsDef.Prefix_SMARTVIEW)) {
      path=IPath.SEPARATOR + ITransformerV2NodeConsDef.PATH_SMARTVIEW;
    }
 else {
      path=IPath.SEPARATOR + ITransformerV2NodeConsDef.PATH_OTHER;
    }
  }
  return path;
}
Program: 147789
Project: 147789
Buggy source:
protected Item createServerObject(String key){
  WSViewItem item=MdmpropertiesFactory.eINSTANCE.createWSViewItem();
  ItemState itemState=PropertiesFactory.eINSTANCE.createItemState();
  item.setState(itemState);
  WSViewE view=newView(key);
  item.setWsView(view);
  if (parentItem != null) {
    String path=parentItem.getState().getPath();
    if (path.isEmpty()) {
      if (key.startsWith(IViewNodeConstDef.ViewPrefix))       path=IPath.SEPARATOR + IViewNodeConstDef.PATH_WEBFILTER;
 else {
        path=IPath.SEPARATOR + IViewNodeConstDef.PATH_SEARCHFILTER;
      }
    }
    item.getState().setPath(path);
  }
 else {
    item.getState().setPath("String_Node_Str");
  }
  RepositoryResourceUtil.createItem(item,key);
  return item;
}

Fixed version (ground truth):
protected Item createServerObject(String key){
  WSViewItem item=MdmpropertiesFactory.eINSTANCE.createWSViewItem();
  ItemState itemState=PropertiesFactory.eINSTANCE.createItemState();
  item.setState(itemState);
  WSViewE view=newView(key);
  item.setWsView(view);
  if (parentItem != null) {
    String path=parentItem.getState().getPath();
    if (path.isEmpty()) {
      if (key.startsWith(IViewNodeConstDef.ViewPrefix))       path=IPath.SEPARATOR + IViewNodeConstDef.PATH_WEBFILTER;
 else {
        path=IPath.SEPARATOR + IViewNodeConstDef.PATH_SEARCHFILTER;
      }
    }
    item.getState().setPath(path);
  }
 else {
    if (key.toLowerCase().startsWith(IViewNodeConstDef.ViewPrefix))     item.getState().setPath(IViewNodeConstDef.PATH_WEBFILTER);
 else {
      item.getState().setPath(IViewNodeConstDef.PATH_SEARCHFILTER);
    }
  }
  RepositoryResourceUtil.createItem(item,key);
  return item;
}
Program: 147791
Project: 147791
Buggy source:
public void modifyText(ModifyEvent e){
  if (okBtn != null)   okBtn.setEnabled(true);
  internalLabel.setText(Messages.bind(Messages.RenameViewDialog_InternalNameX,IViewNodeConstDef.ViewPrefix + entityText.getText() + "String_Node_Str"+ filterText.getText()));
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
  if (okBtn != null)   okBtn.setEnabled(true);
  internalLabel.setText(getInternalName());
}
Program: 147793
Project: 147793
Buggy source:
private String getInternalName(){
  StringBuffer internalBuffer=new StringBuffer();
  internalBuffer.append(IViewNodeConstDef.ViewPrefix);
  internalBuffer.append(entityText.getText());
  if (!filterText1.getText().isEmpty()) {
    internalBuffer.append("String_Node_Str");
    internalBuffer.append(filterText1.getText());
  }
  return internalBuffer.toString();
}

Fixed version (ground truth):
private String getInternalName(){
  StringBuffer internalBuffer=new StringBuffer();
  internalBuffer.append(IViewNodeConstDef.ViewPrefix);
  internalBuffer.append(entityText.getText());
  if (!filterText1.getText().isEmpty() && !filterText1.getText().equalsIgnoreCase(Messages.ViewInputDialog_Default)) {
    internalBuffer.append("String_Node_Str");
    internalBuffer.append(filterText1.getText());
  }
  return internalBuffer.toString();
}
Program: 147794
Project: 147794
Buggy source:
@Override protected void buttonPressed(int buttonId){
  if (buttonId == IDialogConstants.OK_ID) {
    if (parentType == 1) {
      value=entityText.getText();
      filterName=filterText1.getText();
      if (value.isEmpty()) {
        MessageDialog.openError(getShell(),Messages.Warning,Messages.ViewInputDialog_NameCannotbeEmpty);
        return;
      }
    }
    if (parentType == 2) {
      value=filterText2.getText();
      if (value.isEmpty()) {
        MessageDialog.openError(getShell(),Messages.Warning,Messages.ViewInputDialog_NameCannotbeEmpty);
        return;
      }
    }
  }
  super.buttonPressed(buttonId);
}

Fixed version (ground truth):
@Override protected void buttonPressed(int buttonId){
  if (buttonId == IDialogConstants.OK_ID) {
    if (parentType == 1) {
      value=entityText.getText();
      filterName=filterText1.getText();
      if (filterName.equals(Messages.ViewInputDialog_Default))       filterName="String_Node_Str";
      if (value.isEmpty()) {
        MessageDialog.openError(getShell(),Messages.Warning,Messages.ViewInputDialog_NameCannotbeEmpty);
        return;
      }
    }
    if (parentType == 2) {
      value=filterText2.getText();
      if (value.isEmpty()) {
        MessageDialog.openError(getShell(),Messages.Warning,Messages.ViewInputDialog_NameCannotbeEmpty);
        return;
      }
    }
  }
  super.buttonPressed(buttonId);
}
Program: 147795
Project: 147795
Buggy source:
public static String bind(String message,String... bindings){
  return bind(message,bindings);
}

Fixed version (ground truth):
public static String bind(String message,String... bindings){
  return NLS.bind(message,bindings);
}
Program: 147796
Project: 147796
Buggy source:
public static String bind(String message,String... bindings){
  return bind(message,bindings);
}

Fixed version (ground truth):
public static String bind(String message,String... bindings){
  return NLS.bind(message,bindings);
}
Program: 147797
Project: 147797
Buggy source:
private String validateDiagnoses(String msg_omit[]){
  xsdSchema.clearDiagnostics();
  xsdSchema.validate();
  EList<XSDDiagnostic> diagnoses=xsdSchema.getAllDiagnostics();
  String error="String_Node_Str";
  Set<String> errors=new HashSet<String>();
  for (int i=0; i < diagnoses.size(); i++) {
    XSDDiagnostic dia=diagnoses.get(i);
    XSDDiagnosticSeverity servity=dia.getSeverity();
    if (servity == XSDDiagnosticSeverity.ERROR_LITERAL || servity == XSDDiagnosticSeverity.FATAL_LITERAL) {
      boolean omit=false;
      for (      String msg : msg_omit) {
        if (dia.getMessage().indexOf(msg) != -1) {
          omit=true;
          break;
        }
      }
      if (!omit && !errors.contains(dia.getMessage())) {
        error+=dia.getMessage() + "String_Node_Str";
        errors.add(dia.getMessage());
      }
    }
  }
  return error;
}

Fixed version (ground truth):
private String validateDiagnoses(String msg_omit[]){
  xsdSchema.clearDiagnostics();
  xsdSchema.getAllDiagnostics().clear();
  xsdSchema.validate();
  EList<XSDDiagnostic> diagnoses=xsdSchema.getAllDiagnostics();
  String error="String_Node_Str";
  Set<String> errors=new HashSet<String>();
  for (int i=0; i < diagnoses.size(); i++) {
    XSDDiagnostic dia=diagnoses.get(i);
    XSDDiagnosticSeverity servity=dia.getSeverity();
    if (servity == XSDDiagnosticSeverity.ERROR_LITERAL || servity == XSDDiagnosticSeverity.FATAL_LITERAL) {
      boolean omit=false;
      for (      String msg : msg_omit) {
        if (dia.getMessage().indexOf(msg) != -1) {
          omit=true;
          break;
        }
      }
      if (!omit && !errors.contains(dia.getMessage())) {
        error+=dia.getMessage() + "String_Node_Str";
        errors.add(dia.getMessage());
      }
    }
  }
  return error;
}
Program: 147800
Project: 147800
Buggy source:
private String[] getAllReferences(){
  ArrayList<String> elementDeclarations=new ArrayList<String>();
  elementDeclarations.add("String_Node_Str");
  if (curXSDParticle == null)   return elementDeclarations.toArray(new String[0]);
  for (  XSDElementDeclaration eachXSDEleDeclaration : curXSDParticle.getSchema().getElementDeclarations()) {
    if (eachXSDEleDeclaration.getTargetNamespace() != null && eachXSDEleDeclaration.getTargetNamespace().equals(IConstants.DEFAULT_NAME_SPACE))     continue;
    elementDeclarations.add(eachXSDEleDeclaration.getQName() + (eachXSDEleDeclaration.getTargetNamespace() != null ? "String_Node_Str" + eachXSDEleDeclaration.getTargetNamespace() : "String_Node_Str"));
  }
  return elementDeclarations.toArray(new String[0]);
}

Fixed version (ground truth):
private String[] getAllReferences(){
  ArrayList<String> elementDeclarations=new ArrayList<String>();
  elementDeclarations.add("String_Node_Str");
  if (curXSDParticle == null)   return elementDeclarations.toArray(new String[0]);
  if (curXSDParticle.getSchema() == null)   return new String[0];
  for (  XSDElementDeclaration eachXSDEleDeclaration : curXSDParticle.getSchema().getElementDeclarations()) {
    if (eachXSDEleDeclaration.getTargetNamespace() != null && eachXSDEleDeclaration.getTargetNamespace().equals(IConstants.DEFAULT_NAME_SPACE))     continue;
    elementDeclarations.add(eachXSDEleDeclaration.getQName() + (eachXSDEleDeclaration.getTargetNamespace() != null ? "String_Node_Str" + eachXSDEleDeclaration.getTargetNamespace() : "String_Node_Str"));
  }
  return elementDeclarations.toArray(new String[0]);
}
Program: 147801
Project: 147801
Buggy source:
private void initUIContentsForComboCustomTypes(){
  comboCustomTypes.removeSelectionChangedListener(customChangedListener);
  List<String> allCustomTypeNames=null;
  if (xsdSimpleType.getSchema() != null) {
    allCustomTypeNames=Util.getAllCustomTypeNames(xsdSimpleType.getSchema());
  }
  if (xsdSimpleType.getName() != null) {
    allCustomTypeNames.remove(xsdSimpleType.getName());
  }
  comboCustomTypes.setInput(allCustomTypeNames);
  if (xsdSimpleType.getBaseType() != null) {
    comboCustomTypes.setSelection(new StructuredSelection(xsdSimpleType.getBaseType().getName()));
  }
  radCustomTypes.setSelection(!comboCustomTypes.getSelection().isEmpty());
  comboCustomTypes.addSelectionChangedListener(customChangedListener);
}

Fixed version (ground truth):
private void initUIContentsForComboCustomTypes(){
  comboCustomTypes.removeSelectionChangedListener(customChangedListener);
  List<String> allCustomTypeNames=null;
  if (xsdSimpleType.getSchema() != null) {
    allCustomTypeNames=Util.getAllCustomTypeNames(xsdSimpleType.getSchema());
  }
  if (xsdSimpleType.getName() != null && allCustomTypeNames != null) {
    allCustomTypeNames.remove(xsdSimpleType.getName());
  }
  if (allCustomTypeNames != null)   comboCustomTypes.setInput(allCustomTypeNames);
  if (xsdSimpleType.getBaseType() != null) {
    comboCustomTypes.setSelection(new StructuredSelection(xsdSimpleType.getBaseType().getName()));
  }
  radCustomTypes.setSelection(!comboCustomTypes.getSelection().isEmpty());
  comboCustomTypes.addSelectionChangedListener(customChangedListener);
}