nus-yam/ex-repair huggingface dataset:
Program: 148355
Project: 148355
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 == 0) {
      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);
      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: 148357
Project: 148357
Buggy source:
public void widgetSelected(SelectionEvent e){
  if (serviceNameCombo.getText().trim().length() == 0)   return;
  String msg="String_Node_Str";
  boolean isok=false;
  try {
    WSCheckServiceConfigResponse result=port.checkServiceConfiguration(new WSCheckServiceConfigRequest(serviceNameCombo.getText().trim(),serviceConfigurationsText.getText()));
    isok=result.getCheckResult();
    if (isok) {
      msg="String_Node_Str";
    }
 else {
      msg="String_Node_Str";
    }
  }
 catch (  RemoteException e1) {
    log.error(e1.getMessage(),e1);
    msg=e1.getLocalizedMessage();
  }
  errorLabel.setForeground(isok ? errorLabel.getDisplay().getSystemColor(SWT.COLOR_BLUE) : errorLabel.getDisplay().getSystemColor(SWT.COLOR_RED));
  errorLabel.setText(msg);
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  String msg=getContentsCheckResult();
  boolean isok=msg.equals(CHECKMSG_SUCCESSFULCONN);
  errorLabel.setForeground(isok ? errorLabel.getDisplay().getSystemColor(SWT.COLOR_BLUE) : errorLabel.getDisplay().getSystemColor(SWT.COLOR_RED));
  errorLabel.setText(msg);
}
Program: 148358
Project: 148358
Buggy source:
@Override protected void commit(){
  saveChanges();
}

Fixed version (ground truth):
@Override protected void commit(){
}
Program: 148360
Project: 148360
Buggy source:
public String getEndpointAddress(){
  return getServerRoot().getWsKey().toString();
}

Fixed version (ground truth):
public String getEndpointAddress(){
  if (getServerRoot() != null)   return getServerRoot().getWsKey().toString();
  return null;
}
Program: 148361
Project: 148361
Buggy source:
public String getUsername(){
  return getServerRoot().getUser().getUsername();
}

Fixed version (ground truth):
public String getUsername(){
  if (getServerRoot() != null)   return getServerRoot().getUser().getUsername();
  return null;
}
Program: 148362
Project: 148362
Buggy source:
public String getEndpointPort(){
  String portAddress=getEndpointAddress();
  Pattern p=Pattern.compile("String_Node_Str");
  Matcher m=p.matcher(portAddress);
  if (m.find()) {
    return m.group(1);
  }
 else {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
public String getEndpointPort(){
  String portAddress=getEndpointAddress();
  if (portAddress == null)   return "String_Node_Str";
  Pattern p=Pattern.compile("String_Node_Str");
  Matcher m=p.matcher(portAddress);
  if (m.find()) {
    return m.group(1);
  }
 else {
    return "String_Node_Str";
  }
}
Program: 148363
Project: 148363
Buggy source:
public String getPassword(){
  return getServerRoot().getUser().getPassword();
}

Fixed version (ground truth):
public String getPassword(){
  if (getServerRoot() != null)   return getServerRoot().getUser().getPassword();
  return null;
}
Program: 148364
Project: 148364
Buggy source:
public String getUniverse(){
  return getServerRoot().getUser().getUniverse();
}

Fixed version (ground truth):
public String getUniverse(){
  if (getServerRoot() != null)   return getServerRoot().getUser().getUniverse();
  return null;
}
Program: 148365
Project: 148365
Buggy source:
private ArrayList<Object> getComplexTypeDefinitionChildren(XSDComplexTypeDefinition complexTypeDefinition){
  XSDComplexTypeContent xsdComplexTypeContent=complexTypeDefinition.getContent();
  ArrayList<Object> list=new ArrayList<Object>();
  if (xsdComplexTypeContent == null) {
    XSDTypeDefinition typeDefinition=complexTypeDefinition.getBaseTypeDefinition();
    if (typeDefinition instanceof XSDSimpleTypeDefinition) {
      list.add(typeDefinition);
      return list;
    }
 else {
    }
    xsdComplexTypeContent=((XSDComplexTypeDefinition)typeDefinition).getContent();
  }
  if (complexTypeDefinition.getAttributeContents() != null)   list.addAll(complexTypeDefinition.getAttributeContents());
  if (xsdComplexTypeContent instanceof XSDSimpleTypeDefinition) {
    list.add(xsdComplexTypeContent);
    return list;
  }
  if (xsdComplexTypeContent instanceof XSDParticle) {
    if (((XSDParticle)xsdComplexTypeContent).getTerm() instanceof XSDModelGroup) {
      list.add(((XSDParticle)xsdComplexTypeContent).getTerm());
      return list;
    }
 else {
      list.add(((XSDParticle)xsdComplexTypeContent).getTerm());
      return list;
    }
  }
  list.add(xsdComplexTypeContent);
  return list;
}

Fixed version (ground truth):
private ArrayList<Object> getComplexTypeDefinitionChildren(XSDComplexTypeDefinition complexTypeDefinition){
  XSDComplexTypeContent xsdComplexTypeContent=complexTypeDefinition.getContent();
  ArrayList<Object> list=new ArrayList<Object>();
  if (xsdComplexTypeContent == null) {
    XSDTypeDefinition typeDefinition=complexTypeDefinition.getBaseTypeDefinition();
    if (typeDefinition instanceof XSDSimpleTypeDefinition) {
      list.add(typeDefinition);
      return list;
    }
 else {
    }
    xsdComplexTypeContent=((XSDComplexTypeDefinition)typeDefinition).getContent();
  }
  if (complexTypeDefinition.getAttributeContents() != null) {
    list.addAll(complexTypeDefinition.getAttributeContents());
    XSDTypeDefinition baseTypeDef=complexTypeDefinition.getBaseTypeDefinition();
    while (baseTypeDef instanceof XSDComplexTypeDefinition && (baseTypeDef.getTargetNamespace() == null || !baseTypeDef.getTargetNamespace().equals(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001))) {
      XSDComplexTypeDefinition parentType=(XSDComplexTypeDefinition)baseTypeDef;
      list.addAll(((XSDComplexTypeDefinition)baseTypeDef).getAttributeContents());
      list.addAll(getComplexTypeDefinitionChildren(parentType));
      baseTypeDef=baseTypeDef.getBaseType();
    }
  }
  if (xsdComplexTypeContent instanceof XSDSimpleTypeDefinition) {
    list.add(xsdComplexTypeContent);
    return list;
  }
  if (xsdComplexTypeContent instanceof XSDParticle) {
    if (((XSDParticle)xsdComplexTypeContent).getTerm() instanceof XSDModelGroup) {
      list.add(((XSDParticle)xsdComplexTypeContent).getTerm());
      return list;
    }
 else {
      list.add(((XSDParticle)xsdComplexTypeContent).getTerm());
      return list;
    }
  }
  list.add(xsdComplexTypeContent);
  return list;
}
Program: 148366
Project: 148366
Buggy source:
private void setAnnotationActions2(Object obj,IMenuManager manager){
  if (obj instanceof XSDElementDeclaration) {
    manager.add(setAnnotationLabelAction);
    manager.add(setAnnotationDescriptionsAction);
    manager.add(setAnnotationLookupFieldsAction);
    manager.add(setAnnotationPrimaryKeyInfoAction);
  }
  if (obj instanceof XSDParticle) {
    manager.add(setAnnotationDescriptionsAction);
    manager.add(setAnnotationLabelAction);
  }
  if (Util.IsEnterPrise()) {
    manager.add(setAnnotationWriteAction);
    manager.add(setAnnotationNoAction);
    if (obj instanceof XSDParticle) {
      manager.add(visibleRuleAction);
      manager.add(defaultValueRuleAction);
    }
  }
  java.util.List<IAvailableModel> availablemodels=AvailableModelUtil.getAvailableModels();
  for (  IAvailableModel model : availablemodels) {
    model.fillContextMenu(obj,manager,this,dataModelName);
  }
}

Fixed version (ground truth):
private void setAnnotationActions2(Object obj,IMenuManager manager){
  if (obj instanceof XSDElementDeclaration) {
    manager.add(setAnnotationLabelAction);
    manager.add(setAnnotationDescriptionsAction);
    manager.add(setAnnotationLookupFieldsAction);
    manager.add(setAnnotationPrimaryKeyInfoAction);
  }
  if (obj instanceof XSDParticle) {
    manager.add(setAnnotationDescriptionsAction);
    manager.add(setAnnotationLabelAction);
  }
  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 == 0) {
      manager.add(new Separator());
    }
  }
}
Program: 148367
Project: 148367
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(setAnnotationWriteAction);
    manager.add(setAnnotationNoAction);
    if (obj instanceof XSDParticle) {
      manager.add(visibleRuleAction);
      manager.add(defaultValueRuleAction);
    }
  }
  java.util.List<IAvailableModel> availablemodels=AvailableModelUtil.getAvailableModels();
  for (  IAvailableModel model : availablemodels) {
    model.fillContextMenu(obj,manager,this,dataModelName);
  }
}

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);
      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 == 0) {
      manager.add(new Separator());
    }
  }
}
Program: 148370
Project: 148370
Buggy source:
public void run(){
  try {
    super.run();
    ISelection selection=this.server.getViewer().getSelection();
    TreeObject xobject=(TreeObject)((IStructuredSelection)selection).getFirstElement();
    server.getSite().getWorkbenchWindow().getActivePage().openEditor(new XObjectBrowserInput(xobject,xobject.getDisplayName()),XObjectRevisionBrowser.ID);
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
    ErrorExceptionDialog.openError(server.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public void run(){
  try {
    super.run();
    ISelection selection=this.server.getViewer().getSelection();
    TreeObject xobject=(TreeObject)((IStructuredSelection)selection).getFirstElement();
    server.getSite().getWorkbenchWindow().getActivePage().openEditor(new XObjectBrowserInput(xobject,xobject.getDisplayName()),XObjectRevisionBrowser.ID);
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
    ErrorExceptionDialog.openError(server.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}
Program: 148371
Project: 148371
Buggy source:
public void run(){
  try {
    super.run();
    TreeObject xobject=null;
    if (selObj == null) {
      ISelection selection=this.server.getViewer().getSelection();
      xobject=(TreeObject)((IStructuredSelection)selection).getFirstElement();
    }
 else {
      xobject=selObj;
    }
    server.getSite().getWorkbenchWindow().getActivePage().openEditor(new XObjectBrowserInput(xobject,xobject.getDisplayName()),XObjectBrowser.ID);
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
    MessageDialog.openError(server.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public void run(){
  try {
    super.run();
    TreeObject xobject=null;
    if (selObj == null) {
      ISelection selection=this.server.getViewer().getSelection();
      xobject=(TreeObject)((IStructuredSelection)selection).getFirstElement();
    }
 else {
      xobject=selObj;
    }
    server.getSite().getWorkbenchWindow().getActivePage().openEditor(new XObjectBrowserInput(xobject,xobject.getDisplayName()),XObjectBrowser.ID);
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
    MessageDialog.openError(server.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}
Program: 148372
Project: 148372
Buggy source:
public void run(){
  try {
    super.run();
    if (this.view == null) {
      MessageDialog.openError(view.getSite().getShell(),"String_Node_Str","String_Node_Str");
      return;
    }
    WorkbenchClipboard.getWorkbenchClipboard().reset();
    IStructuredSelection selection=(IStructuredSelection)view.getViewer().getSelection();
    for (Iterator<TreeObject> iter=selection.iterator(); iter.hasNext(); ) {
      TreeObject xobject=iter.next();
      if (!xobject.isXObject())       continue;
      if (XSystemObjects.isXSystemObject(xobject.getType(),xobject.getDisplayName()))       continue;
      WorkbenchClipboard.getWorkbenchClipboard().add(xobject);
    }
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
    MessageDialog.openError(view.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public void run(){
  try {
    super.run();
    if (this.view == null) {
      MessageDialog.openError(view.getSite().getShell(),"String_Node_Str","String_Node_Str");
      return;
    }
    WorkbenchClipboard.getWorkbenchClipboard().reset();
    IStructuredSelection selection=(IStructuredSelection)view.getViewer().getSelection();
    for (Iterator<TreeObject> iter=selection.iterator(); iter.hasNext(); ) {
      TreeObject xobject=iter.next();
      if (!xobject.isXObject())       continue;
      if (XSystemObjects.isXSystemObject(xobject.getType(),xobject.getDisplayName()))       continue;
      WorkbenchClipboard.getWorkbenchClipboard().add(xobject);
    }
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
    MessageDialog.openError(view.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}
Program: 148373
Project: 148373
Buggy source:
public void run(){
  if (this.server == null) {
    return;
  }
  closePage();
  IStructuredSelection selection=(IStructuredSelection)server.getViewer().getSelection();
  for (Iterator<TreeObject> iter=selection.iterator(); iter.hasNext(); ) {
    TreeObject xobject=iter.next();
    try {
      deleteJob(xobject);
    }
 catch (    Exception e) {
      log.error(e.getStackTrace());
    }
  }
}

Fixed version (ground truth):
public void run(){
  if (this.server == null) {
    return;
  }
  closePage();
  IStructuredSelection selection=(IStructuredSelection)server.getViewer().getSelection();
  for (Iterator<TreeObject> iter=selection.iterator(); iter.hasNext(); ) {
    TreeObject xobject=iter.next();
    try {
      deleteJob(xobject);
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
  }
}
Program: 148379
Project: 148379
Buggy source:
public void setXtentisPort(TreeObject remoteTreeObject){
  try {
    destPort=Util.getPort(new URL(remoteTreeObject.getEndpointAddress()),remoteTreeObject.getUniverse(),remoteTreeObject.getUsername(),remoteTreeObject.getPassword());
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
  }
}

Fixed version (ground truth):
public void setXtentisPort(TreeObject remoteTreeObject){
  try {
    destPort=Util.getPort(new URL(remoteTreeObject.getEndpointAddress()),remoteTreeObject.getUniverse(),remoteTreeObject.getUsername(),remoteTreeObject.getPassword());
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
}
Program: 148381
Project: 148381
Buggy source:
public void doRun(){
  for (  TreeParent serverRoot : view.getServers()) {
    try {
      String server=(String)serverRoot.getWsKey();
      XtentisServerObjectsRetriever retriever=new XtentisServerObjectsRetriever(server,serverRoot.getUsername(),serverRoot.getPassword(),serverRoot.getUser().getUniverse(),view);
      new ProgressMonitorDialog(view.getSite().getShell()).run(true,true,retriever);
      serverRoot.synchronizeWith(retriever.getServerRoot());
      ServerView.show().getViewer().refresh();
      LocalTreeObjectRepository.getInstance().setLazySaveStrategy(false,serverRoot);
    }
 catch (    Exception e) {
      log.error(e.getStackTrace());
    }
  }
}

Fixed version (ground truth):
public void doRun(){
  for (  TreeParent serverRoot : view.getServers()) {
    try {
      String server=(String)serverRoot.getWsKey();
      XtentisServerObjectsRetriever retriever=new XtentisServerObjectsRetriever(server,serverRoot.getUsername(),serverRoot.getPassword(),serverRoot.getUser().getUniverse(),view);
      new ProgressMonitorDialog(view.getSite().getShell()).run(true,true,retriever);
      serverRoot.synchronizeWith(retriever.getServerRoot());
      ServerView.show().getViewer().refresh();
      LocalTreeObjectRepository.getInstance().setLazySaveStrategy(false,serverRoot);
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
  }
}
Program: 148382
Project: 148382
Buggy source:
public void run(){
  try {
    TreeParent xobject=(TreeParent)selection;
    serverObject=xobject.getServerRoot();
    if (xobject == null)     return;
    String server=(String)xobject.getServerRoot().getWsKey();
    ObjectRetriever retriever=new ObjectRetriever((TreeParent)xobject,server,serverObject.getUsername(),serverObject.getPassword(),serverObject.getUser().getUniverse());
    retriever.run(new NullProgressMonitor());
  }
 catch (  InvocationTargetException e) {
    log.error(e.getStackTrace());
  }
catch (  InterruptedException e) {
    log.error(e.getStackTrace());
  }
}

Fixed version (ground truth):
public void run(){
  try {
    TreeParent xobject=(TreeParent)selection;
    serverObject=xobject.getServerRoot();
    if (xobject == null)     return;
    String server=(String)xobject.getServerRoot().getWsKey();
    ObjectRetriever retriever=new ObjectRetriever((TreeParent)xobject,server,serverObject.getUsername(),serverObject.getPassword(),serverObject.getUser().getUniverse());
    retriever.run(new NullProgressMonitor());
  }
 catch (  InvocationTargetException e) {
    log.error(e.getMessage(),e);
  }
catch (  InterruptedException e) {
    log.error(e.getMessage(),e);
  }
}
Program: 148383
Project: 148383
Buggy source:
@Override public void run(){
  ISelection selection=view.getViewer().getSelection();
  TreeObject xobject=(TreeObject)((IStructuredSelection)selection).getFirstElement();
  this.page=view.getSite().getWorkbenchWindow().getActivePage();
  page.closeEditor(page.findEditor(new XObjectEditorInput(xobject,xobject.getDisplayName())),true);
  try {
    if (TreeObjectUtil.renameTreeOjects(xobject,view))     TreeObjectUtil.deleteTreeObject(xobject,view);
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
  }
}

Fixed version (ground truth):
@Override public void run(){
  ISelection selection=view.getViewer().getSelection();
  TreeObject xobject=(TreeObject)((IStructuredSelection)selection).getFirstElement();
  this.page=view.getSite().getWorkbenchWindow().getActivePage();
  page.closeEditor(page.findEditor(new XObjectEditorInput(xobject,xobject.getDisplayName())),true);
  try {
    if (TreeObjectUtil.renameTreeOjects(xobject,view))     TreeObjectUtil.deleteTreeObject(xobject,view);
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
}
Program: 148385
Project: 148385
Buggy source:
public void run(){
  try {
    super.run();
    if (Util.IsEnterPrise()) {
      universes=new ArrayList<WSUniversePK>();
      WSUniversePK[] universePKs=null;
      List<XtentisPort> ports=view.getPorts();
      if (ports != null) {
        for (Iterator iterator=ports.iterator(); iterator.hasNext(); ) {
          XtentisPort port=(XtentisPort)iterator.next();
          universePKs=port.getUniversePKs(new WSGetUniversePKs("String_Node_Str")).getWsUniversePK();
          if (universePKs != null && universePKs.length > 0)           CollectionUtils.addAll(universes,universePKs);
        }
      }
    }
    dialog=new LoginDialog(this,view.getSite().getShell(),IConstants.TALEND + "String_Node_Str",universes);
    dialog.setBlockOnOpen(true);
    dialog.open();
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
  }
}

Fixed version (ground truth):
public void run(){
  try {
    super.run();
    if (Util.IsEnterPrise()) {
      universes=new ArrayList<WSUniversePK>();
      WSUniversePK[] universePKs=null;
      List<XtentisPort> ports=view.getPorts();
      if (ports != null) {
        for (Iterator iterator=ports.iterator(); iterator.hasNext(); ) {
          XtentisPort port=(XtentisPort)iterator.next();
          universePKs=port.getUniversePKs(new WSGetUniversePKs("String_Node_Str")).getWsUniversePK();
          if (universePKs != null && universePKs.length > 0)           CollectionUtils.addAll(universes,universePKs);
        }
      }
    }
    dialog=new LoginDialog(this,view.getSite().getShell(),IConstants.TALEND + "String_Node_Str",universes);
    dialog.setBlockOnOpen(true);
    dialog.open();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
}
Program: 148386
Project: 148386
Buggy source:
public void doRun() throws Exception {
  try {
    if (forcedRoot == null)     serverRoot=(TreeParent)((IStructuredSelection)view.getViewer().getSelection()).getFirstElement();
 else     serverRoot=forcedRoot;
    if (serverRoot == null)     return;
    server=(String)serverRoot.getWsKey();
    XtentisServerObjectsRetriever retriever=new XtentisServerObjectsRetriever(server,serverRoot.getUsername(),serverRoot.getPassword(),serverRoot.getUser().getUniverse(),view);
    new ProgressMonitorDialog(view.getSite().getShell()).run(true,true,retriever);
    ServerRefreshAction.this.serverRoot.synchronizeWith(retriever.getServerRoot());
    ServerView.show().getViewer().refresh();
    LocalTreeObjectRepository.getInstance().setLazySaveStrategy(false,serverRoot);
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
    throw new Exception("String_Node_Str" + IConstants.TALEND + "String_Node_Str"+ e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public void doRun() throws Exception {
  try {
    if (forcedRoot == null)     serverRoot=(TreeParent)((IStructuredSelection)view.getViewer().getSelection()).getFirstElement();
 else     serverRoot=forcedRoot;
    if (serverRoot == null)     return;
    server=(String)serverRoot.getWsKey();
    XtentisServerObjectsRetriever retriever=new XtentisServerObjectsRetriever(server,serverRoot.getUsername(),serverRoot.getPassword(),serverRoot.getUser().getUniverse(),view);
    new ProgressMonitorDialog(view.getSite().getShell()).run(true,true,retriever);
    ServerRefreshAction.this.serverRoot.synchronizeWith(retriever.getServerRoot());
    ServerView.show().getViewer().refresh();
    LocalTreeObjectRepository.getInstance().setLazySaveStrategy(false,serverRoot);
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
    throw new Exception("String_Node_Str" + IConstants.TALEND + "String_Node_Str"+ e.getLocalizedMessage());
  }
}
Program: 148387
Project: 148387
Buggy source:
public void run(){
  try {
    doRun();
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
    MessageDialog.openError(view.getSite().getShell(),"String_Node_Str","String_Node_Str" + IConstants.TALEND + "String_Node_Str"+ e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public void run(){
  try {
    doRun();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
    MessageDialog.openError(view.getSite().getShell(),"String_Node_Str","String_Node_Str" + IConstants.TALEND + "String_Node_Str"+ e.getLocalizedMessage());
  }
}
Program: 148388
Project: 148388
Buggy source:
protected void commitDocumentToCurrent(Document currnt){
  try {
    String value=Util.nodeToString((Node)currnt);
    redoActionTrack.keySet().size();
    redoActionTrack.put(getActionUndoPos(),value);
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
  }
}

Fixed version (ground truth):
protected void commitDocumentToCurrent(Document currnt){
  try {
    String value=Util.nodeToString((Node)currnt);
    redoActionTrack.keySet().size();
    redoActionTrack.put(getActionUndoPos(),value);
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
}
Program: 148389
Project: 148389
Buggy source:
protected String commitDocumentToHistory(Document history){
  String oldValue=null;
  try {
    String value=Util.nodeToString((Node)history);
    oldValue=undoActionTrack.get(getActionUndoPos());
    undoActionTrack.put(getActionUndoPos(),value);
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
  }
  return oldValue;
}

Fixed version (ground truth):
protected String commitDocumentToHistory(Document history){
  String oldValue=null;
  try {
    String value=Util.nodeToString((Node)history);
    oldValue=undoActionTrack.get(getActionUndoPos());
    undoActionTrack.put(getActionUndoPos(),value);
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  return oldValue;
}
Program: 148390
Project: 148390
Buggy source:
private void refresh(String content){
  XSDSchema xsd;
  try {
    xsd=Util.createXsdSchema(content,page.getXObject());
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
    return;
  }
  page.setXsdSchema(xsd);
  page.refresh();
  page.markDirtyWithoutCommit();
}

Fixed version (ground truth):
private void refresh(String content){
  XSDSchema xsd;
  try {
    xsd=Util.createXsdSchema(content,page.getXObject());
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
    return;
  }
  page.setXsdSchema(xsd);
  page.refresh();
  page.markDirtyWithoutCommit();
}
Program: 148395
Project: 148395
Buggy source:
public void run(){
  try {
    WorkbenchClipboard.getWorkbenchClipboard().conceptsReset();
    WorkbenchClipboard.getWorkbenchClipboard().particlesReset();
    IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
    if (selection.getFirstElement() instanceof XSDElementDeclaration) {
      for (Iterator<XSDElementDeclaration> iter=selection.iterator(); iter.hasNext(); ) {
        XSDElementDeclaration concept=iter.next();
        if (concept instanceof XSDElementDeclaration)         WorkbenchClipboard.getWorkbenchClipboard().add(concept);
      }
    }
 else     if (selection.getFirstElement() instanceof XSDParticle) {
      for (Iterator<XSDParticle> iter=selection.iterator(); iter.hasNext(); ) {
        XSDParticle particle=iter.next();
        if (particle instanceof XSDParticle)         WorkbenchClipboard.getWorkbenchClipboard().add(particle);
      }
    }
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public void run(){
  try {
    WorkbenchClipboard.getWorkbenchClipboard().conceptsReset();
    WorkbenchClipboard.getWorkbenchClipboard().particlesReset();
    IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
    if (selection.getFirstElement() instanceof XSDElementDeclaration) {
      for (Iterator<XSDElementDeclaration> iter=selection.iterator(); iter.hasNext(); ) {
        XSDElementDeclaration concept=iter.next();
        if (concept instanceof XSDElementDeclaration)         WorkbenchClipboard.getWorkbenchClipboard().add(concept);
      }
    }
 else     if (selection.getFirstElement() instanceof XSDParticle) {
      for (Iterator<XSDParticle> iter=selection.iterator(); iter.hasNext(); ) {
        XSDParticle particle=iter.next();
        if (particle instanceof XSDParticle)         WorkbenchClipboard.getWorkbenchClipboard().add(particle);
      }
    }
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}
Program: 148399
Project: 148399
Buggy source:
public IStatus doAction(){
  try {
    XSDElementDeclaration decl=xsdElem;
    if (decl == null) {
      ISelection selection=page.getTreeViewer().getSelection();
      decl=(XSDElementDeclaration)((IStructuredSelection)selection).getFirstElement();
    }
    ArrayList<Object> objList=new ArrayList<Object>();
    IStructuredContentProvider provider=(IStructuredContentProvider)page.getTreeViewer().getContentProvider();
    Object[] all=Util.getAllObject(page.getSite(),objList,provider);
    Util.deleteReference(decl,all);
    schema.getContents().remove(decl);
    schema.update();
    xsdElem=null;
    page.refresh();
    page.markDirtyWithoutCommit();
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}

Fixed version (ground truth):
public IStatus doAction(){
  try {
    XSDElementDeclaration decl=xsdElem;
    if (decl == null) {
      ISelection selection=page.getTreeViewer().getSelection();
      decl=(XSDElementDeclaration)((IStructuredSelection)selection).getFirstElement();
    }
    ArrayList<Object> objList=new ArrayList<Object>();
    IStructuredContentProvider provider=(IStructuredContentProvider)page.getTreeViewer().getContentProvider();
    Object[] all=Util.getAllObject(page.getSite(),objList,provider);
    Util.deleteReference(decl,all);
    schema.getContents().remove(decl);
    schema.update();
    xsdElem=null;
    page.refresh();
    page.markDirtyWithoutCommit();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}
Program: 148400
Project: 148400
Buggy source:
public IStatus doAction(){
  try {
    XSDIdentityConstraintDefinition constraint=xsdIdenty;
    XSDElementDeclaration decl=null;
    if (constraint != null) {
      decl=(XSDElementDeclaration)constraint.getContainer();
      if (decl == null)       return Status.CANCEL_STATUS;
    }
    if (decl == null) {
      IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
      constraint=(XSDIdentityConstraintDefinition)selection.getFirstElement();
      decl=(XSDElementDeclaration)constraint.getContainer();
    }
    decl.getIdentityConstraintDefinitions().remove(constraint);
    decl.updateElement();
    xsdIdenty=null;
    page.refresh();
    page.markDirty();
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}

Fixed version (ground truth):
public IStatus doAction(){
  try {
    XSDIdentityConstraintDefinition constraint=xsdIdenty;
    XSDElementDeclaration decl=null;
    if (constraint != null) {
      decl=(XSDElementDeclaration)constraint.getContainer();
      if (decl == null)       return Status.CANCEL_STATUS;
    }
    if (decl == null) {
      IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
      constraint=(XSDIdentityConstraintDefinition)selection.getFirstElement();
      decl=(XSDElementDeclaration)constraint.getContainer();
    }
    decl.getIdentityConstraintDefinitions().remove(constraint);
    decl.updateElement();
    xsdIdenty=null;
    page.refresh();
    page.markDirty();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}
Program: 148402
Project: 148402
Buggy source:
public IStatus doAction(){
  try {
    XSDXPathDefinition xpath=xsdPath;
    if (xpath == null) {
      ISelection selection=page.getTreeViewer().getSelection();
      xpath=(XSDXPathDefinition)((IStructuredSelection)selection).getFirstElement();
    }
    XSDIdentityConstraintDefinition icd=(XSDIdentityConstraintDefinition)xpath.getContainer();
    if (icd == null)     return Status.CANCEL_STATUS;
    if (xpath.getVariety().equals(XSDXPathVariety.SELECTOR_LITERAL)) {
      MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str");
      return Status.CANCEL_STATUS;
    }
    if (icd.getFields().size() == 1) {
      MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str");
      return Status.CANCEL_STATUS;
    }
    icd.getFields().remove(xpath);
    icd.updateElement();
    xsdPath=null;
    page.refresh();
    page.markDirty();
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}

Fixed version (ground truth):
public IStatus doAction(){
  try {
    XSDXPathDefinition xpath=xsdPath;
    if (xpath == null) {
      ISelection selection=page.getTreeViewer().getSelection();
      xpath=(XSDXPathDefinition)((IStructuredSelection)selection).getFirstElement();
    }
    XSDIdentityConstraintDefinition icd=(XSDIdentityConstraintDefinition)xpath.getContainer();
    if (icd == null)     return Status.CANCEL_STATUS;
    if (xpath.getVariety().equals(XSDXPathVariety.SELECTOR_LITERAL)) {
      MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str");
      return Status.CANCEL_STATUS;
    }
    if (icd.getFields().size() == 1) {
      MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str");
      return Status.CANCEL_STATUS;
    }
    icd.getFields().remove(xpath);
    icd.updateElement();
    xsdPath=null;
    page.refresh();
    page.markDirty();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}
Program: 148407
Project: 148407
Buggy source:
public IStatus doAction(){
  try {
    ISelection selection=page.getTreeViewer().getSelection();
    constraint=(XSDIdentityConstraintDefinition)((IStructuredSelection)selection).getFirstElement();
    String oldName=constraint.getName();
    InputDialog id=new InputDialog(page.getSite().getShell(),"String_Node_Str","String_Node_Str",oldName,new EditXSDIdentityConstraintNameValidator(constraint));
    id.setBlockOnOpen(true);
    int ret=id.open();
    if (ret == Dialog.CANCEL) {
      return Status.CANCEL_STATUS;
    }
    if (XSDIdentityConstraintCategory.UNIQUE_LITERAL.equals(constraint.getIdentityConstraintCategory()) && !((XSDElementDeclaration)constraint.getContainer()).getName().equals(id.getValue())) {
      MessageDialog.openWarning(page.getSite().getShell(),"String_Node_Str","String_Node_Str");
      return Status.CANCEL_STATUS;
    }
    constraint.setName(id.getValue());
    constraint.updateElement();
    page.refresh();
    page.markDirty();
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}

Fixed version (ground truth):
public IStatus doAction(){
  try {
    ISelection selection=page.getTreeViewer().getSelection();
    constraint=(XSDIdentityConstraintDefinition)((IStructuredSelection)selection).getFirstElement();
    String oldName=constraint.getName();
    InputDialog id=new InputDialog(page.getSite().getShell(),"String_Node_Str","String_Node_Str",oldName,new EditXSDIdentityConstraintNameValidator(constraint));
    id.setBlockOnOpen(true);
    int ret=id.open();
    if (ret == Dialog.CANCEL) {
      return Status.CANCEL_STATUS;
    }
    if (XSDIdentityConstraintCategory.UNIQUE_LITERAL.equals(constraint.getIdentityConstraintCategory()) && !((XSDElementDeclaration)constraint.getContainer()).getName().equals(id.getValue())) {
      MessageDialog.openWarning(page.getSite().getShell(),"String_Node_Str","String_Node_Str");
      return Status.CANCEL_STATUS;
    }
    constraint.setName(id.getValue());
    constraint.updateElement();
    page.refresh();
    page.markDirty();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}
Program: 148410
Project: 148410
Buggy source:
public IStatus doAction(){
  try {
    IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
    XSDParticle particle=(XSDParticle)selection.getFirstElement();
    XSDTerm term=particle.getTerm();
    if (!(term instanceof XSDElementDeclaration))     return Status.CANCEL_STATUS;
    Clipboard clipboard=Util.getClipboard();
    String path="String_Node_Str";
    TreeItem item=page.getTreeViewer().getTree().getSelection()[0];
    do {
      XSDConcreteComponent component=(XSDConcreteComponent)item.getData();
      if (component instanceof XSDParticle) {
        if (((XSDParticle)component).getTerm() instanceof XSDElementDeclaration)         path="String_Node_Str" + ((XSDElementDeclaration)((XSDParticle)component).getTerm()).getName() + path;
      }
 else       if (component instanceof XSDElementDeclaration) {
        path=((XSDElementDeclaration)component).getName() + path;
      }
      item=item.getParentItem();
    }
 while (item != null);
    clipboard.setContents(new Object[]{path},new Transfer[]{TextTransfer.getInstance()});
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}

Fixed version (ground truth):
public IStatus doAction(){
  try {
    IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
    XSDParticle particle=(XSDParticle)selection.getFirstElement();
    XSDTerm term=particle.getTerm();
    if (!(term instanceof XSDElementDeclaration))     return Status.CANCEL_STATUS;
    Clipboard clipboard=Util.getClipboard();
    String path="String_Node_Str";
    TreeItem item=page.getTreeViewer().getTree().getSelection()[0];
    do {
      XSDConcreteComponent component=(XSDConcreteComponent)item.getData();
      if (component instanceof XSDParticle) {
        if (((XSDParticle)component).getTerm() instanceof XSDElementDeclaration)         path="String_Node_Str" + ((XSDElementDeclaration)((XSDParticle)component).getTerm()).getName() + path;
      }
 else       if (component instanceof XSDElementDeclaration) {
        path=((XSDElementDeclaration)component).getName() + path;
      }
      item=item.getParentItem();
    }
 while (item != null);
    clipboard.setContents(new Object[]{path},new Transfer[]{TextTransfer.getInstance()});
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}
Program: 148411
Project: 148411
Buggy source:
public IStatus doAction(){
  try {
    ArrayList customTypes=new ArrayList();
    for (Iterator iter=schema.getTypeDefinitions().iterator(); iter.hasNext(); ) {
      XSDTypeDefinition type=(XSDTypeDefinition)iter.next();
      if (type instanceof XSDSimpleTypeDefinition)       customTypes.add(type.getName() + (type.getTargetNamespace() != null ? "String_Node_Str" + type.getTargetNamespace() : "String_Node_Str"));
    }
    ArrayList builtInTypes=new ArrayList();
    for (Iterator iter=schema.getSchemaForSchema().getTypeDefinitions().iterator(); iter.hasNext(); ) {
      XSDTypeDefinition type=(XSDTypeDefinition)iter.next();
      if (type instanceof XSDSimpleTypeDefinition)       builtInTypes.add(type.getName());
    }
    NewConceptOrElementDialog id=new NewConceptOrElementDialog(this,page.getSite().getShell(),schema,"String_Node_Str",customTypes,builtInTypes);
    id.setBlockOnOpen(true);
    id.open();
    if (id.getReturnCode() == Window.CANCEL) {
      return Status.CANCEL_STATUS;
    }
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}

Fixed version (ground truth):
public IStatus doAction(){
  try {
    ArrayList customTypes=new ArrayList();
    for (Iterator iter=schema.getTypeDefinitions().iterator(); iter.hasNext(); ) {
      XSDTypeDefinition type=(XSDTypeDefinition)iter.next();
      if (type instanceof XSDSimpleTypeDefinition)       customTypes.add(type.getName() + (type.getTargetNamespace() != null ? "String_Node_Str" + type.getTargetNamespace() : "String_Node_Str"));
    }
    ArrayList builtInTypes=new ArrayList();
    for (Iterator iter=schema.getSchemaForSchema().getTypeDefinitions().iterator(); iter.hasNext(); ) {
      XSDTypeDefinition type=(XSDTypeDefinition)iter.next();
      if (type instanceof XSDSimpleTypeDefinition)       builtInTypes.add(type.getName());
    }
    NewConceptOrElementDialog id=new NewConceptOrElementDialog(this,page.getSite().getShell(),schema,"String_Node_Str",customTypes,builtInTypes);
    id.setBlockOnOpen(true);
    id.open();
    if (id.getReturnCode() == Window.CANCEL) {
      return Status.CANCEL_STATUS;
    }
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}
Program: 148412
Project: 148412
Buggy source:
public IStatus doAction(){
  try {
    ArrayList customTypes=new ArrayList();
    for (Iterator iter=schema.getTypeDefinitions().iterator(); iter.hasNext(); ) {
      XSDTypeDefinition type=(XSDTypeDefinition)iter.next();
      if (type instanceof XSDSimpleTypeDefinition)       customTypes.add(type.getName() + (type.getTargetNamespace() != null ? "String_Node_Str" + type.getTargetNamespace() : "String_Node_Str"));
    }
    ArrayList builtInTypes=new ArrayList();
    for (Iterator iter=schema.getSchemaForSchema().getTypeDefinitions().iterator(); iter.hasNext(); ) {
      XSDTypeDefinition type=(XSDTypeDefinition)iter.next();
      if (type instanceof XSDSimpleTypeDefinition)       builtInTypes.add(type.getName());
    }
    NewConceptOrElementDialog id=new NewConceptOrElementDialog(this,page.getSite().getShell(),schema,"String_Node_Str",customTypes,builtInTypes);
    id.setBlockOnOpen(true);
    id.open();
    if (id.getReturnCode() == Window.CANCEL) {
      return Status.CANCEL_STATUS;
    }
  }
 catch (  Exception e) {
    log.error(e.getStackTrace());
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}

Fixed version (ground truth):
public IStatus doAction(){
  try {
    ArrayList customTypes=new ArrayList();
    for (Iterator iter=schema.getTypeDefinitions().iterator(); iter.hasNext(); ) {
      XSDTypeDefinition type=(XSDTypeDefinition)iter.next();
      if (type instanceof XSDSimpleTypeDefinition)       customTypes.add(type.getName() + (type.getTargetNamespace() != null ? "String_Node_Str" + type.getTargetNamespace() : "String_Node_Str"));
    }
    ArrayList builtInTypes=new ArrayList();
    for (Iterator iter=schema.getSchemaForSchema().getTypeDefinitions().iterator(); iter.hasNext(); ) {
      XSDTypeDefinition type=(XSDTypeDefinition)iter.next();
      if (type instanceof XSDSimpleTypeDefinition)       builtInTypes.add(type.getName());
    }
    NewConceptOrElementDialog id=new NewConceptOrElementDialog(this,page.getSite().getShell(),schema,"String_Node_Str",customTypes,builtInTypes);
    id.setBlockOnOpen(true);
    id.open();
    if (id.getReturnCode() == Window.CANCEL) {
      return Status.CANCEL_STATUS;
    }
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}
Program: 148413
Project: 148413
Buggy source:
public String getColumnText(Object element,int columnIndex){
  LineItem li=(LineItem)element;
switch (columnIndex) {
case 0:
    return sdf.format(new Date(li.getTime()));
case 1:
  return li.getConcept();
case 2:
return Util.joinStrings(li.getIds(),"String_Node_Str");
default :
return "String_Node_Str";
}
}

Fixed version (ground truth):
public String getColumnText(Object element,int columnIndex){
  LineItem li=(LineItem)element;
switch (columnIndex) {
case 0:
    return sdf.format(new Date(li.getTime()));
case 1:
  return li.getConcept();
case 2:
return Util.joinStrings(li.getIds(),"String_Node_Str");
case 3:
return li.getTaskId();
default :
return "String_Node_Str";
}
}