nus-yam/ex-repair huggingface dataset:
Program: 148095
Project: 148095
Buggy source:
@Override public Object getAdapter(Class adapter){
  if (adapter == TreeParent.class) {
    return Util.getServerTreeParent(getXObject());
  }
  if (adapter == XSDSetAnnotationWriteAction.class) {
    return new XSDSetAnnotationWriteAction(this);
  }
  if (adapter == XSDSetAnnotationNoAction.class) {
    return new XSDSetAnnotationNoAction(this,dataModelName);
  }
  return super.getAdapter(adapter);
}

Fixed version (ground truth):
@Override public Object getAdapter(Class adapter){
  if (adapter == TreeParent.class) {
    return Util.getServerTreeParent(getXObject());
  }
  if (adapter == XSDSetAnnotationWriteAction.class) {
    return new XSDSetAnnotationWriteAction(this);
  }
  if (adapter == XSDSetAnnotationNoAction.class) {
    return new XSDSetAnnotationNoAction(this,dataModelName);
  }
  if (adapter == XSDSetAnnotationWrapWriteAction.class) {
    return new XSDSetAnnotationWrapWriteAction(this);
  }
  return super.getAdapter(adapter);
}
Program: 148097
Project: 148097
Buggy source:
@Override public Object getAdapter(Class cls){
  if (cls == GenerateWorkflowWizard.class) {
    return new GenerateWorkflowWizardR(this);
  }
  if (cls == AddBrowseItemsWizard.class) {
    return new AddBrowseItemsWizardR(this);
  }
  return super.getAdapter(cls);
}

Fixed version (ground truth):
@Override public Object getAdapter(Class cls){
  if (cls == GenerateWorkflowWizard.class) {
    return new GenerateWorkflowWizardR(this);
  }
  if (cls == AddBrowseItemsWizard.class) {
    return new AddBrowseItemsWizardR(this);
  }
  if (cls == XSDSetAnnotationWriteAction.class) {
    return new XSDSetAnnotationWriteActionR(this);
  }
  return super.getAdapter(cls);
}
Program: 148100
Project: 148100
Buggy source:
@Override public Object getAdapter(Class adapter){
  if (adapter == TreeParent.class) {
    return Util.getServerTreeParent(getXObject());
  }
  return super.getAdapter(adapter);
}

Fixed version (ground truth):
@Override public Object getAdapter(Class adapter){
  if (adapter == TreeParent.class) {
    return Util.getServerTreeParent(getXObject());
  }
  if (adapter == XSDSetAnnotationWriteAction.class) {
    return new XSDSetAnnotationWriteAction(this);
  }
  return super.getAdapter(adapter);
}
Program: 148102
Project: 148102
Buggy source:
public void run(IAction action){
  if (serverExplorer != null) {
    serverExplorer.refreshServerDefs();
  }
}

Fixed version (ground truth):
public void run(IAction action){
  if (serverExplorer != null) {
    addServerDef();
    serverExplorer.refreshServerDefs();
  }
}
Program: 148104
Project: 148104
Buggy source:
@Override public List<AbstractRepositoryAction> getActions(IRepositoryViewObject viewObj){
  List<AbstractRepositoryAction> actions=super.getActions(viewObj);
  if (viewObj.getProperty().getItem() instanceof MDMServerObjectItem) {
    actions.add(deployToAction);
    addAction(actions,deployToLastServerAction,viewObj);
  }
  return actions;
}

Fixed version (ground truth):
@Override public List<AbstractRepositoryAction> getActions(IRepositoryViewObject viewObj){
  List<AbstractRepositoryAction> actions=super.getActions(viewObj);
  if (viewObj.getProperty().getItem() instanceof MDMServerObjectItem) {
  }
  return actions;
}
Program: 148105
Project: 148105
Buggy source:
private WSUniverseE newWSUniverse(String key){
  List<WSUniverseXtentisObjectsRevisionIDsE> objectsId=new ArrayList<WSUniverseXtentisObjectsRevisionIDsE>();
  List<String> objects=new ArrayList<String>();
  objects.add("String_Node_Str");
  objects.add("String_Node_Str");
  objects.add("String_Node_Str");
  objects.add("String_Node_Str");
  objects.add("String_Node_Str");
  objects.add("String_Node_Str");
  objects.add("String_Node_Str");
  objects.add("String_Node_Str");
  for (  String name : objects) {
    WSUniverseXtentisObjectsRevisionIDsE objectIdE=MdmserverobjectFactory.eINSTANCE.createWSUniverseXtentisObjectsRevisionIDsE();
    objectIdE.setRevisionID("String_Node_Str");
    objectIdE.setXtentisObjectName(name);
    objectsId.add(objectIdE);
  }
  WSUniverseItemsRevisionIDsE itemRId=MdmserverobjectFactory.eINSTANCE.createWSUniverseItemsRevisionIDsE();
  WSUniverseE universe=MdmserverobjectFactory.eINSTANCE.createWSUniverseE();
  universe.setName(key);
  universe.setDescription("String_Node_Str");
  universe.getXtentisObjectsRevisionIDs().addAll(objectsId);
  universe.setDefaultItemsRevisionID("String_Node_Str");
  universe.getItemsRevisionIDs().add(itemRId);
  return universe;
}

Fixed version (ground truth):
private WSUniverseE newWSUniverse(String key){
  List<WSUniverseXtentisObjectsRevisionIDsE> objectsId=new ArrayList<WSUniverseXtentisObjectsRevisionIDsE>();
  List<String> objects=new ArrayList<String>();
  objects.add("String_Node_Str");
  objects.add("String_Node_Str");
  objects.add("String_Node_Str");
  objects.add("String_Node_Str");
  objects.add("String_Node_Str");
  objects.add("String_Node_Str");
  objects.add("String_Node_Str");
  objects.add("String_Node_Str");
  for (  String name : objects) {
    WSUniverseXtentisObjectsRevisionIDsE objectIdE=MdmserverobjectFactory.eINSTANCE.createWSUniverseXtentisObjectsRevisionIDsE();
    objectIdE.setRevisionID("String_Node_Str");
    objectIdE.setXtentisObjectName(name);
    objectsId.add(objectIdE);
  }
  WSUniverseE universe=MdmserverobjectFactory.eINSTANCE.createWSUniverseE();
  universe.setName(key);
  universe.setDescription("String_Node_Str");
  universe.getXtentisObjectsRevisionIDs().addAll(objectsId);
  universe.setDefaultItemsRevisionID("String_Node_Str");
  return universe;
}
Program: 148107
Project: 148107
Buggy source:
private void updateUniverseValues(){
  if (Util.IsEnterPrise()) {
    try {
      XtentisPort port=Util.getPort(new URL(serverDef.getUrl()),null,serverDef.getUser(),serverDef.getPasswd());
      WSUniversePK[] universePKs=port.getUniversePKs(new WSGetUniversePKs("String_Node_Str")).getWsUniversePK();
      universeCombo.removeAll();
      universeCombo.add("String_Node_Str");
      if (universePKs != null && universePKs.length > 0) {
        for (int i=0; i < universePKs.length; i++) {
          String universe=universePKs[i].getPk();
          universeCombo.add(universe);
        }
      }
    }
 catch (    Exception e) {
      if (log.isDebugEnabled())       log.debug(e.getMessage(),e);
      universeCombo.removeAll();
    }
  }
}

Fixed version (ground truth):
private void updateUniverseValues(){
  if (serverDef.getUser().equals("String_Node_Str") || serverDef.getPasswd().equals("String_Node_Str"))   return;
  if (Util.IsEnterPrise()) {
    try {
      XtentisPort port=Util.getPort(new URL(serverDef.getUrl()),null,serverDef.getUser(),serverDef.getPasswd());
      WSUniversePK[] universePKs=port.getUniversePKs(new WSGetUniversePKs("String_Node_Str")).getWsUniversePK();
      universeCombo.removeAll();
      universeCombo.add("String_Node_Str");
      if (universePKs != null && universePKs.length > 0) {
        for (int i=0; i < universePKs.length; i++) {
          String universe=universePKs[i].getPk();
          universeCombo.add(universe);
        }
      }
    }
 catch (    Exception e) {
      if (log.isDebugEnabled())       log.debug(e.getMessage(),e);
      universeCombo.removeAll();
    }
  }
}
Program: 148108
Project: 148108
Buggy source:
private String getText(Item item){
  if (item instanceof ContainerItem) {
    return getConainerItemText(item);
  }
  if (item instanceof MDMServerObjectItem) {
    return getServerObjectItemText(item);
  }
  String label=item.getProperty().getLabel();
  if (label != null) {
    return label;
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
private String getText(Item item){
  if (item instanceof ContainerItem) {
    return getConainerItemText(item);
  }
  if (item instanceof MDMServerObjectItem) {
    String label=getServerObjectItemText(item);
    if (label == null)     return item.getProperty().getLabel();
  }
  String label=item.getProperty().getLabel();
  if (label != null) {
    return label;
  }
  return "String_Node_Str";
}
Program: 148109
Project: 148109
Buggy source:
private WSViewE newView(String key){
  WSWhereConditionE condi=MdmserverobjectFactory.eINSTANCE.createWSWhereConditionE();
  WSBooleanE bol=MdmserverobjectFactory.eINSTANCE.createWSBooleanE();
  bol.set_true(false);
  WSViewE view=MdmserverobjectFactory.eINSTANCE.createWSViewE();
  view.setName(key);
  view.setDescription("String_Node_Str");
  view.setViewableBusinessElements(new String[]{});
  view.getWhereConditions().add(condi);
  view.setSearchableBusinessElements(new String[]{});
  view.setTransformerPK(null);
  view.setIsTransformerActive(bol);
  return view;
}

Fixed version (ground truth):
private WSViewE newView(String key){
  WSWhereConditionE condi=MdmserverobjectFactory.eINSTANCE.createWSWhereConditionE();
  WSBooleanE bol=MdmserverobjectFactory.eINSTANCE.createWSBooleanE();
  bol.set_true(false);
  WSViewE view=MdmserverobjectFactory.eINSTANCE.createWSViewE();
  view.setName(key);
  view.setDescription("String_Node_Str");
  view.getWhereConditions().add(condi);
  view.setTransformerPK(null);
  view.setIsTransformerActive(bol);
  return view;
}
Program: 148112
Project: 148112
Buggy source:
private boolean isJavaClass(Class cls){
  if (cls.isPrimitive())   return true;
  return getComponentType(cls).getName().startsWith("String_Node_Str");
}

Fixed version (ground truth):
public boolean isJavaClass(Class cls){
  if (cls.isPrimitive())   return true;
  return getComponentType(cls).getName().startsWith("String_Node_Str");
}
Program: 148113
Project: 148113
Buggy source:
private static String serializeConfiguration(SmtpConfigurationBean configuration) throws Exception {
  try {
    String xml="String_Node_Str";
    xml+="String_Node_Str" + ("String_Node_Str".equals(StringEscapeUtils.escapeXml(configuration.getSmtpServer())) ? "String_Node_Str" : StringEscapeUtils.escapeXml(configuration.getSmtpServer())) + "String_Node_Str";
    xml+="String_Node_Str" + ((configuration.getSmtpPort() <= 0) ? "String_Node_Str" : String.valueOf(configuration.getSmtpPort())) + "String_Node_Str";
    xml+="String_Node_Str" + (("String_Node_Str".equals(StringEscapeUtils.escapeXml(configuration.getSmtpUsername()))) ? "String_Node_Str" : StringEscapeUtils.escapeXml(configuration.getSmtpUsername())) + "String_Node_Str"+ "String_Node_Str"+ (("String_Node_Str".equals(StringEscapeUtils.escapeXml(configuration.getSmtpPassword()))) ? "String_Node_Str" : StringEscapeUtils.escapeXml(configuration.getSmtpPassword()))+ "String_Node_Str"+ "String_Node_Str"+ (("String_Node_Str".equals(StringEscapeUtils.escapeXml(configuration.getSmtpBCC()))) ? "String_Node_Str" : StringEscapeUtils.escapeXml(configuration.getSmtpBCC()).replaceAll("String_Node_Str","String_Node_Str"));
    xml+="String_Node_Str";
    return xml;
  }
 catch (  Exception e) {
    Matcher m=Pattern.compile("String_Node_Str",Pattern.DOTALL).matcher(e.getLocalizedMessage());
    if (m.matches())     throw new Exception(m.group(2));
    throw new Exception(e.getClass().getName() + "String_Node_Str" + e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
private static String serializeConfiguration(SmtpConfigurationBean configuration) throws Exception {
  try {
    String xml="String_Node_Str";
    xml+="String_Node_Str" + ("String_Node_Str".equals(configuration.getSmtpServer()) ? "String_Node_Str" : configuration.getSmtpServer()) + "String_Node_Str";
    xml+="String_Node_Str" + ((configuration.getSmtpPort() <= 0) ? "String_Node_Str" : String.valueOf(configuration.getSmtpPort())) + "String_Node_Str";
    xml+="String_Node_Str" + (("String_Node_Str".equals(configuration.getSmtpUsername())) ? "String_Node_Str" : configuration.getSmtpUsername()) + "String_Node_Str"+ "String_Node_Str"+ (("String_Node_Str".equals(configuration.getSmtpPassword())) ? "String_Node_Str" : configuration.getSmtpPassword())+ "String_Node_Str"+ "String_Node_Str"+ (("String_Node_Str".equals(configuration.getSmtpBCC())) ? "String_Node_Str" : configuration.getSmtpBCC()).replaceAll("String_Node_Str","String_Node_Str");
    xml+="String_Node_Str";
    return xml;
  }
 catch (  Exception e) {
    Matcher m=Pattern.compile("String_Node_Str",Pattern.DOTALL).matcher(e.getLocalizedMessage());
    if (m.matches())     throw new Exception(m.group(2));
    throw new Exception(e.getClass().getName() + "String_Node_Str" + e.getLocalizedMessage());
  }
}
Program: 148114
Project: 148114
Buggy source:
public IRepositoryNodeLabelProvider getLabelProvider(){
  return this.labelProvider;
}

Fixed version (ground truth):
public IRepositoryNodeLabelProvider getLabelProvider(){
  if (labelProvider == null) {
    initLabelProvider();
  }
  return this.labelProvider;
}
Program: 148115
Project: 148115
Buggy source:
public IRepositoryNodeContentProvider getContentProvider(){
  return this.contentProvider;
}

Fixed version (ground truth):
public IRepositoryNodeContentProvider getContentProvider(){
  if (contentProvider == null) {
    initContentProvider();
  }
  return this.contentProvider;
}
Program: 148116
Project: 148116
Buggy source:
public DataClusterNodeConfiguration(){
  setResourceProvider(new DataClusterNodeResourceProvider());
  setLabelProvider(new DataClusterLabelProvider());
  setContentProvider(new DataClusterContentProvider());
  setActionProvider(new DataClusterActionProvider());
}

Fixed version (ground truth):
public DataClusterNodeConfiguration(){
  setResourceProvider(new DataClusterNodeResourceProvider());
  setActionProvider(new DataClusterActionProvider());
}
Program: 148117
Project: 148117
Buggy source:
public DataModelNodeConfiguration(){
  setResourceProvider(new DataModelNodeResourceProvider());
  setLabelProvider(new DataModelLabelProvider());
  setContentProvider(new DataModelContentProvider());
  setActionProvider(new DataModelActionProvider());
}

Fixed version (ground truth):
public DataModelNodeConfiguration(){
  setResourceProvider(new DataModelNodeResourceProvider());
  setActionProvider(new DataModelActionProvider());
}
Program: 148118
Project: 148118
Buggy source:
@Override protected List<IRepositoryViewObject> getViewObjFromSystemFolder(Item parentItem){
  return result;
}

Fixed version (ground truth):
@Override protected List<IRepositoryViewObject> getViewObjFromSystemFolder(Item parentItem){
  if (result == null) {
    result=new LinkedList<IRepositoryViewObject>();
    IRepositoryNodeConfiguration processConf=RepositoryNodeConfigurationManager.getConfiguration(IServerObjectRepositoryType.TYPE_TRANSFORMERV2);
    IRepositoryNodeConfiguration triggerConf=RepositoryNodeConfigurationManager.getConfiguration(IServerObjectRepositoryType.TYPE_ROUTINGRULE);
    addCategoryViewObject(result,processConf);
    addCategoryViewObject(result,triggerConf);
  }
  return result;
}
Program: 148119
Project: 148119
Buggy source:
/** 
 * DOC hbhong EventManagerContentProvider constructor comment.
 */
public EventManagerContentProvider(){
  result=new LinkedList<IRepositoryViewObject>();
  IRepositoryNodeConfiguration processConf=RepositoryNodeConfigurationManager.getConfiguration(IServerObjectRepositoryType.TYPE_TRANSFORMERV2);
  IRepositoryNodeConfiguration triggerConf=RepositoryNodeConfigurationManager.getConfiguration(IServerObjectRepositoryType.TYPE_ROUTINGRULE);
  addCategoryViewObject(result,processConf);
  addCategoryViewObject(result,triggerConf);
}

Fixed version (ground truth):
/** 
 * DOC hbhong EventManagerContentProvider constructor comment.
 */
public EventManagerContentProvider(){
}
Program: 148120
Project: 148120
Buggy source:
public EventManagerNodeConfiguration(){
  setResourceProvider(new EventManagerNodeResourceProvider());
  setLabelProvider(new EventManagerLabelProvider());
  setContentProvider(new EventManagerContentProvider());
  setActionProvider(new EventManagerActionProvider());
}

Fixed version (ground truth):
public EventManagerNodeConfiguration(){
  setResourceProvider(new EventManagerNodeResourceProvider());
  setActionProvider(new EventManagerActionProvider());
}
Program: 148121
Project: 148121
Buggy source:
public TISProcessNodeConfiguration(){
  setResourceProvider(new TISProcessNodeResourceProvider());
  setLabelProvider(new TISProcessLabelProvider());
  setContentProvider(new TISProcessContentProvider());
  setActionProvider(new TISProcessActionProvider());
}

Fixed version (ground truth):
public TISProcessNodeConfiguration(){
  setResourceProvider(new TISProcessNodeResourceProvider());
  setActionProvider(new TISProcessActionProvider());
}
Program: 148122
Project: 148122
Buggy source:
public MenuNodeConfiguration(){
  setResourceProvider(new MenuNodeResourceProvider());
  setLabelProvider(new MenuLabelProvider());
  setContentProvider(new MenuContentProvider());
  setActionProvider(new MenuActionProvider());
}

Fixed version (ground truth):
public MenuNodeConfiguration(){
  setResourceProvider(new MenuNodeResourceProvider());
  setActionProvider(new MenuActionProvider());
}
Program: 148123
Project: 148123
Buggy source:
public RoleNodeConfiguration(){
  setResourceProvider(new RoleNodeResourceProvider());
  setLabelProvider(new RoleLabelProvider());
  setContentProvider(new RoleContentProvider());
  setActionProvider(new RoleActionProvider());
}

Fixed version (ground truth):
public RoleNodeConfiguration(){
  setResourceProvider(new RoleNodeResourceProvider());
  setActionProvider(new RoleActionProvider());
}
Program: 148124
Project: 148124
Buggy source:
public RoutingRuleNodeConfiguration(){
  setResourceProvider(new RoutingRuleNodeResourceProvider());
  setLabelProvider(new RoutingRuleLabelProvider());
  setContentProvider(new RoutingRuleContentProvider());
  setActionProvider(new RoutingRuleActionProvider());
}

Fixed version (ground truth):
public RoutingRuleNodeConfiguration(){
  setResourceProvider(new RoutingRuleNodeResourceProvider());
  setActionProvider(new RoutingRuleActionProvider());
}
Program: 148125
Project: 148125
Buggy source:
public StoredProcedureNodeConfiguration(){
  setResourceProvider(new StoredProcedureNodeResourceProvider());
  setLabelProvider(new StoredProcedureLabelProvider());
  setContentProvider(new StoredProcedureContentProvider());
  setActionProvider(new StoredProcedureActionProvider());
}

Fixed version (ground truth):
public StoredProcedureNodeConfiguration(){
  setResourceProvider(new StoredProcedureNodeResourceProvider());
  setActionProvider(new StoredProcedureActionProvider());
}
Program: 148126
Project: 148126
Buggy source:
public SynchronizationPlanNodeConfiguration(){
  setResourceProvider(new SynchronizationPlanNodeResourceProvider());
  setLabelProvider(new SynchronizationPlanLabelProvider());
  setContentProvider(new SynchronizationPlanContentProvider());
  setActionProvider(new SynchronizationPlanActionProvider());
}

Fixed version (ground truth):
public SynchronizationPlanNodeConfiguration(){
  setResourceProvider(new SynchronizationPlanNodeResourceProvider());
  setActionProvider(new SynchronizationPlanActionProvider());
}
Program: 148127
Project: 148127
Buggy source:
public TransformerV2NodeConfiguration(){
  setResourceProvider(new TransformerV2NodeResourceProvider());
  setLabelProvider(new TransformerV2LabelProvider());
  setContentProvider(new TransformerV2ContentProvider());
  setActionProvider(new TransformerV2ActionProvider());
}

Fixed version (ground truth):
public TransformerV2NodeConfiguration(){
  setResourceProvider(new TransformerV2NodeResourceProvider());
  setActionProvider(new TransformerV2ActionProvider());
}
Program: 148128
Project: 148128
Buggy source:
public UniverseNodeConfiguration(){
  setResourceProvider(new UniverseNodeResourceProvider());
  setLabelProvider(new UniverseLabelProvider());
  setContentProvider(new UniverseContentProvider());
  setActionProvider(new UniverseActionProvider());
}

Fixed version (ground truth):
public UniverseNodeConfiguration(){
  setResourceProvider(new UniverseNodeResourceProvider());
  setActionProvider(new UniverseActionProvider());
}
Program: 148129
Project: 148129
Buggy source:
public ViewNodeConfiguration(){
  setResourceProvider(new ViewNodeResourceProvider());
  setLabelProvider(new ViewLabelProvider());
  setContentProvider(new ViewContentProvider());
  setActionProvider(new ViewActionProvider());
}

Fixed version (ground truth):
public ViewNodeConfiguration(){
  setResourceProvider(new ViewNodeResourceProvider());
  setActionProvider(new ViewActionProvider());
}
Program: 148130
Project: 148130
Buggy source:
public WorkflowNodeConfiguration(){
  setResourceProvider(new WorkflowNodeResourceProvider());
  setLabelProvider(new WorkflowLabelProvider());
  setContentProvider(new WorkflowContentProvider());
  setActionProvider(new WorkflowActionProvider());
}

Fixed version (ground truth):
public WorkflowNodeConfiguration(){
  setResourceProvider(new WorkflowNodeResourceProvider());
  setActionProvider(new WorkflowActionProvider());
}
Program: 148131
Project: 148131
Buggy source:
public static List<IRepositoryNodeConfiguration> getConfigurations(){
  if (!inited) {
    initTemplateDefine();
  }
  return configurations;
}

Fixed version (ground truth):
public static List<IRepositoryNodeConfiguration> getConfigurations(){
  if (!inited) {
    initTemplateDefine();
  }
  if (!initedBean) {
    initBeanMap();
  }
  return configurations;
}
Program: 148132
Project: 148132
Buggy source:
private static void initTemplateDefine(){
  if (!inited) {
    IExtensionRegistry registry=Platform.getExtensionRegistry();
    IExtensionPoint extensionPoint=registry.getExtensionPoint(RepositoryPlugin.PLUGIN_ID,EXTENSION_POINT_TEMPLATE);
    if (extensionPoint != null && extensionPoint.isValid()) {
      IExtension[] extensions=extensionPoint.getExtensions();
      for (      IExtension s : extensions) {
        IConfigurationElement[] elements=s.getConfigurationElements();
        for (        IConfigurationElement element : elements) {
          if (element.getAttribute(PROP_CLASS) != null) {
            try {
              IRepositoryNodeConfiguration configuration=(IRepositoryNodeConfiguration)element.createExecutableExtension(PROP_CLASS);
              configurations.add(configuration);
              Class wsObjectClass=configuration.getContentProvider().getWSObjectClass();
              Bean2EObjUtil.getInstance().registerClassMap(wsObjectClass);
            }
 catch (            CoreException e) {
              log.error(e.getMessage(),e);
            }
          }
        }
      }
    }
    inited=true;
  }
}

Fixed version (ground truth):
private static void initTemplateDefine(){
  if (!inited) {
    IExtensionRegistry registry=Platform.getExtensionRegistry();
    IExtensionPoint extensionPoint=registry.getExtensionPoint(RepositoryPlugin.PLUGIN_ID,EXTENSION_POINT_TEMPLATE);
    if (extensionPoint != null && extensionPoint.isValid()) {
      IExtension[] extensions=extensionPoint.getExtensions();
      for (      IExtension s : extensions) {
        IConfigurationElement[] elements=s.getConfigurationElements();
        for (        IConfigurationElement element : elements) {
          if (element.getAttribute(PROP_CLASS) != null) {
            try {
              IRepositoryNodeConfiguration configuration=(IRepositoryNodeConfiguration)element.createExecutableExtension(PROP_CLASS);
              configurations.add(configuration);
            }
 catch (            CoreException e) {
              log.error(e.getMessage(),e);
            }
          }
        }
      }
    }
    inited=true;
  }
}
Program: 148135
Project: 148135
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  parent.getShell().setText(this.title);
  Composite composite=(Composite)super.createDialogArea(parent);
  builder=new SchematronExpressBuilder(composite,value,conceptName,isAbsoluteXPath);
  builder.setTreeParent(treeParent);
  return composite;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(Composite parent){
  parent.getShell().setText(this.title);
  Composite composite=(Composite)super.createDialogArea(parent);
  builder=new SchematronExpressBuilder(composite,value,conceptName,isAbsoluteXPath,isSchematron);
  builder.setTreeParent(treeParent);
  return composite;
}
Program: 148136
Project: 148136
Buggy source:
public ValidationRuleExcpressDialog(Shell parentShell,TreeParent treeParent,String title,String value,String conceptName,boolean isAbsoluteXPath){
  super(parentShell);
  this.treeParent=treeParent;
  this.title=title;
  this.value=value;
  this.conceptName=conceptName;
  this.isAbsoluteXPath=isAbsoluteXPath;
}

Fixed version (ground truth):
public ValidationRuleExcpressDialog(Shell parentShell,TreeParent treeParent,String title,String value,String conceptName,boolean isAbsoluteXPath,boolean isSchematron){
  super(parentShell);
  this.treeParent=treeParent;
  this.title=title;
  this.value=value;
  this.isSchematron=isSchematron;
  this.conceptName=conceptName;
  this.isAbsoluteXPath=isAbsoluteXPath;
}
Program: 148138
Project: 148138
Buggy source:
public SchematronExpressBuilder(Composite parent,String value,String conceptName,boolean isAbsoluteXPath){
  this.parent=parent;
  this.value=value;
  this.conceptName=conceptName;
  this.isAbsoluteXPath=isAbsoluteXPath;
  try {
    parseFunxml();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  create();
}

Fixed version (ground truth):
public SchematronExpressBuilder(Composite parent,String value,String conceptName,boolean isAbsoluteXPath,boolean isSchematron){
  this.parent=parent;
  this.value=value;
  this.conceptName=conceptName;
  this.isAbsoluteXPath=isAbsoluteXPath;
  this.isSchematron=isSchematron;
  try {
    parseFunxml();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  create();
}
Program: 148140
Project: 148140
Buggy source:
public void doubleClick(DoubleClickEvent event){
  ISelection selection=ServerView.this.getViewer().getSelection();
  TreeObject xo=(TreeObject)((IStructuredSelection)selection).getFirstElement();
  if (xo.getType() == TreeObject._ACTION_) {
    Class<?> actionClass=(Class<?>)xo.getWsKey();
    try {
      AServerViewAction action=(AServerViewAction)actionClass.newInstance();
      action.setServerView(ServerView.this);
      action.run();
    }
 catch (    Exception ex) {
      MessageDialog.openError(viewer.getControl().getShell(),"String_Node_Str","String_Node_Str");
    }
    return;
  }
  if (xo.getType() == TreeObject._SERVER_) {
    if (((TreeParent)xo).getChildrenList().size() == 1)     initServer((TreeParent)xo);
  }
  if (xo.getType() == TreeObject.WORKFLOW)   return;
  if (xo.getWsObject() instanceof Action) {
    ((Action)xo.getWsObject()).run();
    return;
  }
  if (xo.getType() == TreeObject.SUBSCRIPTION_ENGINE || (xo.getType() == TreeObject.DATA_CLUSTER && xo.isXObject()) || xo.getType() == TreeObject.WORKFLOW_PROCESS)   browseViewAction.run();
 else   editXObjectAction.run();
}

Fixed version (ground truth):
public void doubleClick(DoubleClickEvent event){
  ISelection selection=ServerView.this.getViewer().getSelection();
  TreeObject xo=(TreeObject)((IStructuredSelection)selection).getFirstElement();
  if (xo == null)   return;
  if (xo.getType() == TreeObject._ACTION_) {
    Class<?> actionClass=(Class<?>)xo.getWsKey();
    try {
      AServerViewAction action=(AServerViewAction)actionClass.newInstance();
      action.setServerView(ServerView.this);
      action.run();
    }
 catch (    Exception ex) {
      MessageDialog.openError(viewer.getControl().getShell(),"String_Node_Str","String_Node_Str");
    }
    return;
  }
  if (xo.getType() == TreeObject._SERVER_) {
    if (((TreeParent)xo).getChildrenList().size() == 1)     initServer((TreeParent)xo);
  }
  if (xo.getType() == TreeObject.WORKFLOW)   return;
  if (xo.getWsObject() instanceof Action) {
    ((Action)xo.getWsObject()).run();
    return;
  }
  if (xo.getType() == TreeObject.SUBSCRIPTION_ENGINE || (xo.getType() == TreeObject.DATA_CLUSTER && xo.isXObject()) || xo.getType() == TreeObject.WORKFLOW_PROCESS)   browseViewAction.run();
 else   editXObjectAction.run();
}
Program: 148141
Project: 148141
Buggy source:
private void hookDoubleClickAction(){
  viewer.addDoubleClickListener(new IDoubleClickListener(){
    public void doubleClick(    DoubleClickEvent event){
      ISelection selection=ServerView.this.getViewer().getSelection();
      TreeObject xo=(TreeObject)((IStructuredSelection)selection).getFirstElement();
      if (xo.getType() == TreeObject._ACTION_) {
        Class<?> actionClass=(Class<?>)xo.getWsKey();
        try {
          AServerViewAction action=(AServerViewAction)actionClass.newInstance();
          action.setServerView(ServerView.this);
          action.run();
        }
 catch (        Exception ex) {
          MessageDialog.openError(viewer.getControl().getShell(),"String_Node_Str","String_Node_Str");
        }
        return;
      }
      if (xo.getType() == TreeObject._SERVER_) {
        if (((TreeParent)xo).getChildrenList().size() == 1)         initServer((TreeParent)xo);
      }
      if (xo.getType() == TreeObject.WORKFLOW)       return;
      if (xo.getWsObject() instanceof Action) {
        ((Action)xo.getWsObject()).run();
        return;
      }
      if (xo.getType() == TreeObject.SUBSCRIPTION_ENGINE || (xo.getType() == TreeObject.DATA_CLUSTER && xo.isXObject()) || xo.getType() == TreeObject.WORKFLOW_PROCESS)       browseViewAction.run();
 else       editXObjectAction.run();
    }
  }
);
}

Fixed version (ground truth):
private void hookDoubleClickAction(){
  viewer.addDoubleClickListener(new IDoubleClickListener(){
    public void doubleClick(    DoubleClickEvent event){
      ISelection selection=ServerView.this.getViewer().getSelection();
      TreeObject xo=(TreeObject)((IStructuredSelection)selection).getFirstElement();
      if (xo == null)       return;
      if (xo.getType() == TreeObject._ACTION_) {
        Class<?> actionClass=(Class<?>)xo.getWsKey();
        try {
          AServerViewAction action=(AServerViewAction)actionClass.newInstance();
          action.setServerView(ServerView.this);
          action.run();
        }
 catch (        Exception ex) {
          MessageDialog.openError(viewer.getControl().getShell(),"String_Node_Str","String_Node_Str");
        }
        return;
      }
      if (xo.getType() == TreeObject._SERVER_) {
        if (((TreeParent)xo).getChildrenList().size() == 1)         initServer((TreeParent)xo);
      }
      if (xo.getType() == TreeObject.WORKFLOW)       return;
      if (xo.getWsObject() instanceof Action) {
        ((Action)xo.getWsObject()).run();
        return;
      }
      if (xo.getType() == TreeObject.SUBSCRIPTION_ENGINE || (xo.getType() == TreeObject.DATA_CLUSTER && xo.isXObject()) || xo.getType() == TreeObject.WORKFLOW_PROCESS)       browseViewAction.run();
 else       editXObjectAction.run();
    }
  }
);
}
Program: 148143
Project: 148143
Buggy source:
private void setAnnotationActions(Object obj,IMenuManager manager){
  if (obj instanceof XSDElementDeclaration) {
    manager.add(setAnnotationDescriptionsAction);
    manager.add(setAnnotationLookupFieldsAction);
    manager.add(setAnnotationPrimaryKeyInfoAction);
  }
  if (obj instanceof XSDParticle) {
    manager.add(setAnnotationDescriptionsAction);
    manager.add(setAnnotationLabelAction);
    manager.add(setAnnotationForeignKeyAction);
    manager.add(setAnnotationFKFilterAction);
    manager.add(setAnnotationForeignKeyInfoAction);
  }
  if (Util.IsEnterPrise()) {
    manager.add(new Separator());
    manager.add(setAnnotationWriteAction);
    manager.add(setAnnotationNoAction);
    if (obj instanceof XSDParticle) {
      manager.add(visibleRuleAction);
      manager.add(defaultValueRuleAction);
    }
  }
  java.util.List<IAvailableModel> availablemodels=AvailableModelUtil.getAvailableModels();
  for (int i=0; i < availablemodels.size(); i++) {
    IAvailableModel model=availablemodels.get(i);
    model.fillContextMenu(obj,manager,this,dataModelName);
    if (i == 1) {
      manager.add(new Separator());
    }
  }
}

Fixed version (ground truth):
private void setAnnotationActions(Object obj,IMenuManager manager){
  if (obj instanceof XSDElementDeclaration) {
    manager.add(setAnnotationDescriptionsAction);
    manager.add(setAnnotationLookupFieldsAction);
    manager.add(setAnnotationPrimaryKeyInfoAction);
  }
  if (obj instanceof XSDParticle) {
    manager.add(setAnnotationDescriptionsAction);
    manager.add(setAnnotationLabelAction);
    manager.add(setAnnotationForeignKeyAction);
    manager.add(setAnnotationFKFilterAction);
    manager.add(setAnnotationForeignKeyInfoAction);
  }
  if (Util.IsEnterPrise()) {
    manager.add(new Separator());
    manager.add(setAnnotationWriteAction);
    manager.add(setAnnotationNoAction);
    if (obj instanceof XSDParticle) {
      manager.add(visibleRuleAction);
      XSDParticle xsdParticle=(XSDParticle)obj;
      XSDTerm xsdTerm=xsdParticle.getTerm();
      if (xsdTerm instanceof XSDElementDeclaration) {
        if (Util.getKeyInfo(xsdTerm) == null || Util.getKeyInfo(xsdTerm).size() == 0) {
          manager.add(defaultValueRuleAction);
        }
      }
    }
  }
  java.util.List<IAvailableModel> availablemodels=AvailableModelUtil.getAvailableModels();
  for (int i=0; i < availablemodels.size(); i++) {
    IAvailableModel model=availablemodels.get(i);
    model.fillContextMenu(obj,manager,this,dataModelName);
    if (i == 1) {
      manager.add(new Separator());
    }
  }
}
Program: 148144
Project: 148144
Buggy source:
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  monitor.beginTask("String_Node_Str" + IConstants.TALEND + "String_Node_Str","String_Node_Str".equals(username) ? 12 : 9);
  try {
switch (parentObject.getType()) {
case TreeObject.WORKFLOW:
      objectName="String_Node_Str";
    break;
case TreeObject.JOB_REGISTRY:
  objectName="String_Node_Str";
break;
}
XtentisPort port=Util.getPort(new URL(endpointaddress),universe,username,password);
parentObject.getServerRoot().removeChildFromUI(parentObject);
List<IAvailableModel> availablemodels=AvailableModelUtil.getAvailableModels();
for (IAvailableModel model : availablemodels) {
if (model.toString().indexOf(objectName) > 0) {
model.addTreeObjects(port,monitor,parentObject.getServerRoot());
}
}
}
 catch (MalformedURLException e) {
log.error(e.getMessage(),e);
}
catch (XtentisException e) {
log.error(e.getMessage(),e);
}
}

Fixed version (ground truth):
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  monitor.beginTask("String_Node_Str" + IConstants.TALEND + "String_Node_Str","String_Node_Str".equals(username) ? 12 : 9);
  try {
switch (parentObject.getType()) {
case TreeObject.WORKFLOW:
      objectName="String_Node_Str";
    break;
case TreeObject.JOB_REGISTRY:
  objectName="String_Node_Str";
break;
}
XtentisPort port=Util.getPort(new URL(endpointaddress),universe,username,password);
List<IAvailableModel> availablemodels=AvailableModelUtil.getAvailableModels();
for (IAvailableModel model : availablemodels) {
if (model.toString().indexOf(objectName) > 0) {
model.addTreeObjects(port,monitor,parentObject.getServerRoot());
}
}
}
 catch (MalformedURLException e) {
log.error(e.getMessage(),e);
}
catch (XtentisException e) {
log.error(e.getMessage(),e);
}
}
Program: 148145
Project: 148145
Buggy source:
public static List<XSDSimpleTypeDefinition> getAllBuildInTypes(XSDSchema schema){
  List<XSDSimpleTypeDefinition> builtInTypes=new ArrayList<XSDSimpleTypeDefinition>();
  for (  XSDTypeDefinition eachBuildInTypeDef : schema.getSchemaForSchema().getTypeDefinitions()) {
    if (!(eachBuildInTypeDef instanceof XSDSimpleTypeDefinition))     continue;
    builtInTypes.add((XSDSimpleTypeDefinition)eachBuildInTypeDef);
  }
  return builtInTypes;
}

Fixed version (ground truth):
public static List<XSDSimpleTypeDefinition> getAllBuildInTypes(XSDSchema schema){
  if (schema == null)   return new ArrayList<XSDSimpleTypeDefinition>();
  List<XSDSimpleTypeDefinition> builtInTypes=new ArrayList<XSDSimpleTypeDefinition>();
  for (  XSDTypeDefinition eachBuildInTypeDef : schema.getSchemaForSchema().getTypeDefinitions()) {
    if (!(eachBuildInTypeDef instanceof XSDSimpleTypeDefinition))     continue;
    builtInTypes.add((XSDSimpleTypeDefinition)eachBuildInTypeDef);
  }
  return builtInTypes;
}
Program: 148147
Project: 148147
Buggy source:
public void keyPressed(KeyEvent e){
  ISelection selection=ServerView.this.getViewer().getSelection();
  TreeObject xo=(TreeObject)((IStructuredSelection)selection).getFirstElement();
  if ((e.stateMask == 0) && (e.keyCode == SWT.DEL)) {
switch (xo.getType()) {
case TreeObject.JOB:
      new DeleteJobAction().run();
    break;
case TreeObject._SERVER_:
  logoutAndRemoveAction.run();
break;
default :
deleteXObjectAction.run();
return;
}
}
}

Fixed version (ground truth):
public void keyPressed(KeyEvent e){
  ISelection selection=ServerView.this.getViewer().getSelection();
  TreeObject xo=(TreeObject)((IStructuredSelection)selection).getFirstElement();
  if (xo == null)   return;
  if ((e.stateMask == 0) && (e.keyCode == SWT.DEL)) {
switch (xo.getType()) {
case TreeObject.JOB:
      new DeleteJobAction().run();
    break;
case TreeObject._SERVER_:
  logoutAndRemoveAction.run();
break;
default :
deleteXObjectAction.run();
return;
}
}
}
Program: 148148
Project: 148148
Buggy source:
private void hookKeyPressAction(){
  viewer.getTree().addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent e){
      ISelection selection=ServerView.this.getViewer().getSelection();
      TreeObject xo=(TreeObject)((IStructuredSelection)selection).getFirstElement();
      if ((e.stateMask == 0) && (e.keyCode == SWT.DEL)) {
switch (xo.getType()) {
case TreeObject.JOB:
          new DeleteJobAction().run();
        break;
case TreeObject._SERVER_:
      logoutAndRemoveAction.run();
    break;
default :
  deleteXObjectAction.run();
return;
}
}
}
public void keyReleased(KeyEvent e){
if (e.keyCode == 'c' && e.stateMask == SWT.CTRL) {
copyAction.run();
}
 else if (e.keyCode == 'v' && e.stateMask == SWT.CTRL) {
TreeObject xobject=(TreeObject)((IStructuredSelection)viewer.getSelection()).getFirstElement();
((PasteXObjectAction)pasteAction).setXtentisPort(xobject);
((PasteXObjectAction)pasteAction).setParent(xobject instanceof TreeParent ? (TreeParent)xobject : xobject.getParent());
pasteAction.run();
}
}
}
);
}

Fixed version (ground truth):
private void hookKeyPressAction(){
  viewer.getTree().addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent e){
      ISelection selection=ServerView.this.getViewer().getSelection();
      TreeObject xo=(TreeObject)((IStructuredSelection)selection).getFirstElement();
      if (xo == null)       return;
      if ((e.stateMask == 0) && (e.keyCode == SWT.DEL)) {
switch (xo.getType()) {
case TreeObject.JOB:
          new DeleteJobAction().run();
        break;
case TreeObject._SERVER_:
      logoutAndRemoveAction.run();
    break;
default :
  deleteXObjectAction.run();
return;
}
}
}
public void keyReleased(KeyEvent e){
if (e.keyCode == 'c' && e.stateMask == SWT.CTRL) {
copyAction.run();
}
 else if (e.keyCode == 'v' && e.stateMask == SWT.CTRL) {
TreeObject xobject=(TreeObject)((IStructuredSelection)viewer.getSelection()).getFirstElement();
if (xobject == null) return;
((PasteXObjectAction)pasteAction).setXtentisPort(xobject);
((PasteXObjectAction)pasteAction).setParent(xobject instanceof TreeParent ? (TreeParent)xobject : xobject.getParent());
pasteAction.run();
}
}
}
);
}
Program: 148149
Project: 148149
Buggy source:
public void keyReleased(KeyEvent e){
  if (e.keyCode == 'c' && e.stateMask == SWT.CTRL) {
    copyAction.run();
  }
 else   if (e.keyCode == 'v' && e.stateMask == SWT.CTRL) {
    TreeObject xobject=(TreeObject)((IStructuredSelection)viewer.getSelection()).getFirstElement();
    ((PasteXObjectAction)pasteAction).setXtentisPort(xobject);
    ((PasteXObjectAction)pasteAction).setParent(xobject instanceof TreeParent ? (TreeParent)xobject : xobject.getParent());
    pasteAction.run();
  }
}

Fixed version (ground truth):
public void keyReleased(KeyEvent e){
  if (e.keyCode == 'c' && e.stateMask == SWT.CTRL) {
    copyAction.run();
  }
 else   if (e.keyCode == 'v' && e.stateMask == SWT.CTRL) {
    TreeObject xobject=(TreeObject)((IStructuredSelection)viewer.getSelection()).getFirstElement();
    if (xobject == null)     return;
    ((PasteXObjectAction)pasteAction).setXtentisPort(xobject);
    ((PasteXObjectAction)pasteAction).setParent(xobject instanceof TreeParent ? (TreeParent)xobject : xobject.getParent());
    pasteAction.run();
  }
}
Program: 148150
Project: 148150
Buggy source:
public void validateSchema() throws IllegalAccessException {
  final String msg_omit[]={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  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());
      }
    }
  }
  if (!error.equals("String_Node_Str")) {
    throw new IllegalAccessException(error);
  }
  validateType();
  validateElementation();
}

Fixed version (ground truth):
public void validateSchema() throws IllegalAccessException {
  final String msg_omit[]={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  final String msg_shouldRefresh[]={"String_Node_Str"};
  String error=validateDiagnoses(msg_omit);
  for (  String msg : msg_shouldRefresh) {
    if (error.indexOf(msg) != -1) {
      refreshModelPageSchema();
    }
  }
  error=validateDiagnoses(msg_omit);
  if (!error.equals("String_Node_Str")) {
    throw new IllegalAccessException(error);
  }
  validateType();
  validateElementation();
}
Program: 148151
Project: 148151
Buggy source:
@Override public boolean equals(Object obj){
  if (obj instanceof TreeObject) {
    TreeObject o=(TreeObject)obj;
    if (o.getParent() == null)     return o.getName().equals(getName()) && getType() == o.getType();
 else {
      if (o.getName().equals(getName()) && getType() == o.getType()) {
        if (o.getParent() != null && getParent() != null) {
          if (o.getParent().getName().equals(getParent().getName())) {
            return true;
          }
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (obj instanceof TreeObject) {
    TreeObject o=(TreeObject)obj;
    if (o.getParent() == null || getParent() == null)     return o.getName().equals(getName()) && getType() == o.getType();
 else {
      if (o.getName().equals(getName()) && getType() == o.getType()) {
        if (o.getParent() != null && getParent() != null) {
          if (o.getParent().getName().equals(getParent().getName())) {
            return true;
          }
        }
      }
    }
  }
  return false;
}
Program: 148152
Project: 148152
Buggy source:
@Override public boolean equals(Object obj){
  if (obj instanceof TreeObject) {
    TreeObject o=(TreeObject)obj;
    if (o.getParent() == null)     return o.getDisplayName().equals(getDisplayName()) && getType() == o.getType();
 else {
      if (o.getDisplayName().equals(getDisplayName()) && getType() == o.getType()) {
        if (o.getParent() != null && getParent() != null) {
          if (o.getParent().getDisplayName().equals(getParent().getDisplayName())) {
            return true;
          }
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (obj instanceof TreeObject) {
    TreeObject o=(TreeObject)obj;
    if (o.getParent() == null)     return o.getName().equals(getName()) && getType() == o.getType();
 else {
      if (o.getName().equals(getName()) && getType() == o.getType()) {
        if (o.getParent() != null && getParent() != null) {
          if (o.getParent().getName().equals(getParent().getName())) {
            return true;
          }
        }
      }
    }
  }
  return false;
}
Program: 148153
Project: 148153
Buggy source:
private void initUIContentsForComboCustomTypes(){
  comboCustomTypes.removeSelectionChangedListener(customChangedListener);
  List<String> allCustomTypeNames=Util.getAllCustomTypeNames(xsdSimpleType.getSchema());
  allCustomTypeNames.remove(xsdSimpleType.getName());
  comboCustomTypes.setInput(allCustomTypeNames);
  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.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);
}
Program: 148154
Project: 148154
Buggy source:
private void initUIContentForComboBuildInTypes(){
  comboBuildInTypes.removeSelectionChangedListener(buildInChangedListener);
  comboBuildInTypes.setInput(Util.getAllBuildInTypes(xsdSimpleType.getSchema()));
  comboBuildInTypes.setSelection(new StructuredSelection(xsdSimpleType.getBaseType()));
  radBuildInTypes.setSelection(!comboBuildInTypes.getSelection().isEmpty());
  comboBuildInTypes.addSelectionChangedListener(buildInChangedListener);
}

Fixed version (ground truth):
private void initUIContentForComboBuildInTypes(){
  comboBuildInTypes.removeSelectionChangedListener(buildInChangedListener);
  comboBuildInTypes.setInput(Util.getAllBuildInTypes(xsdSimpleType.getSchema()));
  if (xsdSimpleType.getBaseType() != null) {
    comboBuildInTypes.setSelection(new StructuredSelection(xsdSimpleType.getBaseType()));
  }
  radBuildInTypes.setSelection(!comboBuildInTypes.getSelection().isEmpty());
  comboBuildInTypes.addSelectionChangedListener(buildInChangedListener);
}
Program: 148156
Project: 148156
Buggy source:
public synchronized void fireEvent(int eventType,TreeObject objectParent,TreeObject child){
  TreeObject current=this;
  do {
    if (current.listeners != null) {
      for (Iterator<IXObjectModelListener> iter=current.listeners.iterator(); iter.hasNext(); ) {
        IXObjectModelListener listener=iter.next();
        listener.handleEvent(eventType,objectParent,child);
      }
    }
 else {
    }
    current=current.getParent();
  }
 while ((current != null));
}

Fixed version (ground truth):
public synchronized void fireEvent(int eventType,TreeObject objectParent,TreeObject child){
  TreeObject current=this;
  do {
    if (current.listeners != null) {
      for (Iterator<IXObjectModelListener> iter=current.listeners.iterator(); iter.hasNext(); ) {
        IXObjectModelListener listener=iter.next();
        listener.handleEvent(eventType,objectParent,child);
      }
    }
    current=current.getParent();
  }
 while ((current != null));
}
Program: 148157
Project: 148157
Buggy source:
public void setDisplayName(String displayName){
  this.displayName=displayName;
}

Fixed version (ground truth):
public void setDisplayName(String displayName){
  this.displayName=displayName;
  if (name == null) {
    this.name=displayName;
  }
}