nus-yam/ex-repair huggingface dataset:
Program: 149033
Project: 149033
Buggy source:
public static void getforeignKeyOfElement(Set<String> list,XSDElementDeclaration element){
  if (element.getAnnotation() != null) {
    getForeignKeyofParcle(list,element.getAnnotation());
  }
  if (element.getTypeDefinition() instanceof XSDComplexTypeDefinition) {
    XSDComplexTypeContent fromcomplexType=((XSDComplexTypeDefinition)element.getTypeDefinition()).getContent();
    if (fromcomplexType instanceof XSDParticle) {
      XSDParticle particle=(XSDParticle)fromcomplexType;
      if (((XSDParticle)particle).getTerm() instanceof XSDModelGroup) {
        XSDModelGroup modelGroup=((XSDModelGroup)particle.getTerm());
        EList fromlist=modelGroup.getContents();
        for (        XSDParticle el : (XSDParticle[])fromlist.toArray(new XSDParticle[fromlist.size()])) {
          XSDTerm term=el.getTerm();
          if (term instanceof XSDElementDeclaration) {
            XSDAnnotation annotation=((XSDElementDeclaration)term).getAnnotation();
            if (annotation != null) {
              getForeignKeyofParcle(list,annotation);
            }
            getforeignKeyOfElement(list,(XSDElementDeclaration)term);
          }
        }
      }
    }
  }
}

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

Fixed version (ground truth):
/** 
 * set the list with foreign concept names in the schema
 * @author ymli
 * @param list
 * @param schema
 * @return
 */
public static Set<String> getForeingKeyInSchema(Set<String> list,XSDSchema schema){
  EList<XSDSchemaContent> contents=schema.getContents();
  for (  XSDSchemaContent content : contents) {
    if (content instanceof XSDElementDeclaration)     getforeignKeyOfElement(list,(XSDElementDeclaration)content);
  }
  return list;
}
Program: 149035
Project: 149035
Buggy source:
public void onMessage(Message msg){
  if (msg instanceof TextMessage) {
    try {
      TextMessage tm=(TextMessage)msg;
      Logger.getLogger(this.getClass()).info("String_Node_Str" + tm.getText());
      AutoCommitToSvnMsg msg1=AutoCommitToSvnMsg.unmarshal(tm.getText());
      Util.getVersioningSystemCtrlLocal().commitItem(new VersioningSystemPOJOPK(msg1.getVersionSystemPk()),msg1.getItemPk(),msg1.getComment());
    }
 catch (    Throwable t) {
      t.printStackTrace();
    }
  }
}

Fixed version (ground truth):
public void onMessage(Message msg){
  TextMessage tm=null;
  if (msg instanceof TextMessage) {
    try {
      tm=(TextMessage)msg;
      Logger.getLogger(this.getClass()).info("String_Node_Str" + tm.getText());
      AutoCommitToSvnMsg msg1=AutoCommitToSvnMsg.unmarshal(tm.getText());
      Util.getVersioningSystemCtrlLocal().commitItem(new VersioningSystemPOJOPK(msg1.getVersionSystemPk()),msg1.getItemPk(),msg1.getComment());
    }
 catch (    Throwable t) {
      Logger.getLogger(this.getClass()).info("String_Node_Str");
      try {
        Util.getXmlServerCtrlLocal().putDocumentFromString(tm.getText(),tm.getJMSMessageID(),AutoCommitToSvnSendBean.FailedAutoCommitSvnMessage,null);
      }
 catch (      Exception e) {
      }
    }
  }
}
Program: 149038
Project: 149038
Buggy source:
protected void pageChange(int newPageIndex){
  AFormPage page=(AFormPage)formPages.get(0);
  boolean isdirty=page.isDirty();
  super.pageChange(newPageIndex);
  if (xmlEditor != null)   xmlEditor.refresh();
  if (xmlEditor.isDirty())   page.refreshPage();
  linkDirty(page,isdirty);
}

Fixed version (ground truth):
protected void pageChange(int newPageIndex){
  AFormPage page=(AFormPage)formPages.get(0);
  boolean isdirty=page.isDirty();
  super.pageChange(newPageIndex);
  if (xmlEditor != null)   xmlEditor.refresh();
  if (xmlEditor.isDirty() || xmlEditor.isModified())   page.refreshPage();
  linkDirty(page,isdirty);
}
Program: 149039
Project: 149039
Buggy source:
@Override public void doSave(IProgressMonitor progressMonitor){
  WSDataModel wsObject=(WSDataModel)(xobject.getWsObject());
  IDocument doc=((XMLEditorInput)this.getEditorInput()).getDocument();
  String schema=doc.get();
  schema=schema.replaceAll("String_Node_Str","String_Node_Str");
  schema=schema.replaceAll("String_Node_Str","String_Node_Str");
  wsObject.setXsdSchema(schema);
  SaveXObjectAction action=new SaveXObjectAction(editor);
  action.run();
  state=action.getState();
  super.doSave(progressMonitor);
}

Fixed version (ground truth):
@Override public void doSave(IProgressMonitor progressMonitor){
  WSDataModel wsObject=(WSDataModel)(xobject.getWsObject());
  IDocument doc=((XMLEditorInput)this.getEditorInput()).getDocument();
  String schema=doc.get();
  schema=schema.replaceAll("String_Node_Str","String_Node_Str");
  schema=schema.replaceAll("String_Node_Str","String_Node_Str");
  wsObject.setXsdSchema(schema);
  setModified(true);
  SaveXObjectAction action=new SaveXObjectAction(editor);
  action.run();
  state=action.getState();
  super.doSave(progressMonitor);
}
Program: 149042
Project: 149042
Buggy source:
@Override protected void doSetValue(Object value){
  xpath.setText(value.toString());
}

Fixed version (ground truth):
@Override protected void doSetValue(Object value){
  xpath.setText(value.toString().trim());
}
Program: 149043
Project: 149043
Buggy source:
public void keyReleased(KeyEvent e){
  if (e.character == SWT.CR) {
    xpath.setText(xpath.getText());
    deactive();
  }
}

Fixed version (ground truth):
public void keyReleased(KeyEvent e){
  if (e.character == SWT.CR) {
    xpath.setText(xpath.getText().trim());
    deactive();
  }
}
Program: 149044
Project: 149044
Buggy source:
@Override protected Control createControl(Composite parent){
  xpath=new XpathWidget(parent,mainPage,false);
  ((GridData)xpath.getComposite().getChildren()[0].getLayoutData()).heightHint=15;
  ((GridData)xpath.getComposite().getChildren()[1].getLayoutData()).heightHint=15;
  if (parent instanceof Table) {
    ((Table)parent).addMouseListener(new MouseListener(){
      public void mouseDoubleClick(      MouseEvent e){
      }
      public void mouseDown(      MouseEvent e){
      }
      public void mouseUp(      MouseEvent e){
        if (!isMouseInControl(e)) {
          deactive();
        }
      }
    }
);
    xpath.getTextWidget().addKeyListener(new KeyListener(){
      public void keyPressed(      KeyEvent e){
      }
      public void keyReleased(      KeyEvent e){
        if (e.character == SWT.CR) {
          xpath.setText(xpath.getText());
          deactive();
        }
      }
    }
);
  }
  return xpath.getComposite();
}

Fixed version (ground truth):
@Override protected Control createControl(Composite parent){
  xpath=new XpathWidget(parent,mainPage,false);
  ((GridData)xpath.getComposite().getChildren()[0].getLayoutData()).heightHint=15;
  ((GridData)xpath.getComposite().getChildren()[1].getLayoutData()).heightHint=15;
  if (parent instanceof Table) {
    ((Table)parent).addMouseListener(new MouseListener(){
      public void mouseDoubleClick(      MouseEvent e){
      }
      public void mouseDown(      MouseEvent e){
      }
      public void mouseUp(      MouseEvent e){
        if (!isMouseInControl(e)) {
          deactive();
        }
      }
    }
);
    xpath.getTextWidget().addKeyListener(new KeyListener(){
      public void keyPressed(      KeyEvent e){
      }
      public void keyReleased(      KeyEvent e){
        if (e.character == SWT.CR) {
          xpath.setText(xpath.getText().trim());
          deactive();
        }
      }
    }
);
  }
  return xpath.getComposite();
}
Program: 149045
Project: 149045
Buggy source:
public void setOutFocus(){
  descriptionText.setFocus();
  descriptionText.setText(descriptionText.getText());
  int start=descriptionText.getText().length();
  int end=descriptionText.getSelection().y;
  descriptionText.setSelection(start);
}

Fixed version (ground truth):
public void setOutFocus(){
  descriptionText.setFocus();
  descriptionText.setText(descriptionText.getText().trim());
  int start=descriptionText.getText().length();
  descriptionText.setSelection(start);
}
Program: 149046
Project: 149046
Buggy source:
@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  org.apache.log4j.Logger.getLogger(this.getClass()).debug("String_Node_Str");
  try {
    XtentisPort port=Util.getPort(null,null,Util._FORCE_RMI_);
    if (!port.existsDataCluster(new WSExistsDataCluster(new WSDataClusterPK(Configuration.datacluster))).is_true()) {
      port.putDataCluster(new WSPutDataCluster(new WSDataCluster(Configuration.datacluster,"String_Node_Str","String_Node_Str")));
    }
    if (!port.existsDataModel(new WSExistsDataModel(new WSDataModelPK(Configuration.datamodel))).is_true()) {
      port.putDataModel(new WSPutDataModel(new WSDataModel(Configuration.datamodel,"String_Node_Str","String_Node_Str")));
    }
  }
 catch (  Exception e) {
    String err="String_Node_Str";
    org.apache.log4j.Logger.getLogger(this.getClass()).error(err,e);
    throw new ServletException(err);
  }
}

Fixed version (ground truth):
@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
}
Program: 149047
Project: 149047
Buggy source:
public XSDChangeToComplexTypeAction(DataModelMainPage page,XSDElementDeclaration dec,String name,boolean choice,boolean all){
  this(page);
  declNew=dec;
  showDlg=false;
  typeName=name;
  isChoice=choice;
  isAll=all;
}

Fixed version (ground truth):
public XSDChangeToComplexTypeAction(DataModelMainPage page,XSDElementDeclaration dec,String name,boolean choice,boolean all){
  this(page,false);
  declNew=dec;
  showDlg=false;
  typeName=name;
  isChoice=choice;
  isAll=all;
}
Program: 149049
Project: 149049
Buggy source:
public void run(){
  IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
  declList.clear();
  List list=selection.toList();
  for (  Object obj : list) {
    if (obj instanceof XSDElementDeclaration) {
      XSDElementDeclaration declaration=(XSDElementDeclaration)obj;
      if (Util.getParent(obj) == obj)       declList.add(declaration);
    }
  }
  AddBrowseItemsWizard wizard=new AddBrowseItemsWizard(page,declList,new XSDAnnotationsStructure((XSDComponent)selection.getFirstElement()).getLabels());
  WizardDialog dialog=new WizardDialog(page.getSite().getShell(),wizard);
  dialog.open();
}

Fixed version (ground truth):
public void run(){
  IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
  declList.clear();
  List list=selection.toList();
  for (  Object obj : list) {
    if (obj instanceof XSDElementDeclaration) {
      XSDElementDeclaration declaration=(XSDElementDeclaration)obj;
      if (Util.getParent(obj) == obj)       declList.add(declaration);
    }
  }
  AddBrowseItemsWizard wizard=new AddBrowseItemsWizard(page,declList);
  WizardDialog dialog=new WizardDialog(page.getSite().getShell(),wizard);
  dialog.open();
}
Program: 149053
Project: 149053
Buggy source:
public AddBrowseItemsWizard(AMainPageV2 launchPage,List<XSDElementDeclaration> list,LinkedHashMap<String,String> labels){
  super();
  setWindowTitle("String_Node_Str");
  page=launchPage;
  declList=list;
  this.labels=labels;
  for (  XSDElementDeclaration dl : declList) {
    browseItemToRoles.put(BROWSE_ITEMS + dl.getName(),new ArrayList<Line>());
  }
}

Fixed version (ground truth):
public AddBrowseItemsWizard(AMainPageV2 launchPage,List<XSDElementDeclaration> list){
  super();
  setWindowTitle("String_Node_Str");
  page=launchPage;
  declList=list;
  for (  XSDElementDeclaration dl : declList) {
    browseItemToRoles.put(BROWSE_ITEMS + dl.getName(),new ArrayList<Line>());
  }
}
Program: 149054
Project: 149054
Buggy source:
protected Control createDialogArea(Composite parent){
  final Composite composite=(Composite)super.createDialogArea(parent);
  if (caller instanceof XSDNewComplexTypeDefinition) {
    parent.getShell().setText("String_Node_Str");
    conceptPanel=new ConceptComposite(composite,false,types,true);
  }
 else {
    parent.getShell().setText("String_Node_Str");
    conceptPanel=new ConceptComposite(composite,false,types,false);
  }
  return conceptPanel.getComposite();
}

Fixed version (ground truth):
protected Control createDialogArea(Composite parent){
  final Composite composite=(Composite)super.createDialogArea(parent);
  if (caller instanceof XSDNewComplexTypeDefinition) {
    parent.getShell().setText("String_Node_Str");
    conceptPanel=new ConceptComposite(composite,false,types,true);
  }
 else {
    if (isXSDModelGroup)     parent.getShell().setText("String_Node_Str");
 else     parent.getShell().setText("String_Node_Str");
    conceptPanel=new ConceptComposite(composite,false,types,false);
  }
  return conceptPanel.getComposite();
}
Program: 149055
Project: 149055
Buggy source:
/** 
 * @param parentShell
 */
public ComplexTypeInputDialog(SelectionListener caller,Shell parentShell,List<XSDComplexTypeDefinition> types){
  super(parentShell);
  this.caller=caller;
  this.types=types;
}

Fixed version (ground truth):
/** 
 * @param parentShell
 * @param isXSDModelGroup 
 */
public ComplexTypeInputDialog(SelectionListener caller,Shell parentShell,List<XSDComplexTypeDefinition> types,boolean isXSDModelGroup){
  super(parentShell);
  this.caller=caller;
  this.types=types;
  this.isXSDModelGroup=isXSDModelGroup;
}
Program: 149056
Project: 149056
Buggy source:
/** 
 * We need to override the method so that the schema object is serialized into xsd an stored in the wsObject via the commit method We also need to marDirty both Pages The super.markDirty() method will trigger the appropriate events to the registered listeners
 */
@Override public void markDirty(){
  super.markDirty();
  XMLEditor xmleditor=((XObjectEditor)getEditor()).getXmlEditor();
  if (xmleditor != null && xmleditor.isDirty())   xmleditor.markDirty();
}

Fixed version (ground truth):
/** 
 * We need to override the method so that the schema object is serialized into xsd an stored in the wsObject via the commit method We also need to marDirty both Pages The super.markDirty() method will trigger the appropriate events to the registered listeners
 */
@Override public void markDirty(){
  super.markDirty();
  XMLEditor xmleditor=((XObjectEditor)getEditor()).getXmlEditor();
  if (xmleditor != null && getEditor().isDirty())   xmleditor.markDirty();
}
Program: 149062
Project: 149062
Buggy source:
protected void pageChange(int newPageIndex){
  AFormPage page=(AFormPage)formPages.get(0);
  boolean isdirty=page.isDirty();
  super.pageChange(newPageIndex);
  if (xmlEditor != null) {
    xmlEditor.refresh();
    if (xmlEditor.isDirty() || xmlEditor.isModified())     page.refreshPage();
  }
  linkDirty(page,isdirty);
}

Fixed version (ground truth):
protected void pageChange(int newPageIndex){
  AFormPage page=(AFormPage)formPages.get(0);
  boolean isdirty=page.isDirty();
  super.pageChange(newPageIndex);
  if (xmlEditor != null) {
    xmlEditor.refresh();
    if (xmlEditor.isDirty() || xmlEditor.isModified()) {
      page.refreshPage();
      xmlEditor.setModified(false);
    }
  }
  linkDirty(page,isdirty);
}
Program: 149066
Project: 149066
Buggy source:
private void changeDomTree(final TreeParent pObject){
  String modelDisplay=dataModelCombo.getText();
  this.dataModelName=modelDisplay;
  xobject=pObject.findObject(TreeObject.DATA_MODEL,modelDisplay);
  XtentisPort port=null;
  try {
    port=Util.getPort(new URL(xobject.getEndpointAddress()),xobject.getUniverse(),xobject.getUsername(),xobject.getPassword());
  }
 catch (  MalformedURLException e3) {
    e3.printStackTrace();
  }
catch (  XtentisException e3) {
    e3.printStackTrace();
  }
  WSDataModel wsDataModel=null;
  try {
    wsDataModel=port.getDataModel(new WSGetDataModel((WSDataModelPK)xobject.getWsKey()));
  }
 catch (  RemoteException e2) {
    e2.printStackTrace();
  }
  try {
    XSDSchema xsdSchema=getXSDSchema(wsDataModel.getXsdSchema());
    provideViwerContent(xsdSchema);
  }
 catch (  Exception e1) {
    e1.printStackTrace();
  }
}

Fixed version (ground truth):
private void changeDomTree(final TreeParent pObject){
  String modelDisplay=dataModelCombo.getText();
  this.dataModelName=modelDisplay;
  XtentisPort port=null;
  try {
    port=Util.getPort(pObject);
  }
 catch (  XtentisException e3) {
    e3.printStackTrace();
  }
catch (  Exception e3) {
    e3.printStackTrace();
  }
  WSDataModel wsDataModel=null;
  try {
    wsDataModel=port.getDataModel(new WSGetDataModel(new WSDataModelPK(dataModelName)));
  }
 catch (  RemoteException e2) {
    e2.printStackTrace();
  }
  try {
    XSDSchema xsdSchema=getXSDSchema(wsDataModel.getXsdSchema());
    provideViwerContent(xsdSchema);
  }
 catch (  Exception e1) {
    e1.printStackTrace();
  }
}
Program: 149072
Project: 149072
Buggy source:
public IStatus doAction(){
  try {
    IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
    XSDAnnotationsStructure struc=new XSDAnnotationsStructure((XSDComponent)selection.getFirstElement());
    if (struc.getAnnotation() == null) {
      throw new RuntimeException("String_Node_Str" + selection.getFirstElement().getClass().getName());
    }
    sxid=new SimpleXpathInputDialog(page,"String_Node_Str","String_Node_Str",struc.getForeignKey(),new SelectionListener(){
      public void widgetDefaultSelected(      SelectionEvent e){
      }
      public void widgetSelected(      SelectionEvent e){
        sxid.close();
      }
    }
,dataModelName);
    sxid.setBlockOnOpen(true);
    int ret=sxid.open();
    if (ret == Window.CANCEL) {
      return Status.CANCEL_STATUS;
    }
    struc.setForeignKey("String_Node_Str".equals(sxid.getXpath()) ? null : sxid.getXpath().replaceAll("String_Node_Str","String_Node_Str"));
    if (struc.hasChanged()) {
      page.refresh();
      page.getTreeViewer().expandToLevel(selection.getFirstElement(),2);
      page.markDirty();
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    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=(TreeSelection)page.getTreeViewer().getSelection();
    XSDComponent xSDCom=null;
    if (selection.getFirstElement() instanceof XSDAnnotation)     xSDCom=(XSDAnnotation)selection.getFirstElement();
 else {
      TreePath tPath=((TreeSelection)selection).getPaths()[0];
      for (int i=0; i < tPath.getSegmentCount(); i++) {
        if (tPath.getSegment(i) instanceof XSDAnnotation)         xSDCom=(XSDAnnotation)(tPath.getSegment(i));
      }
    }
    XSDAnnotationsStructure struc=new XSDAnnotationsStructure(xSDCom);
    if (struc.getAnnotation() == null) {
      throw new RuntimeException("String_Node_Str" + xSDCom.getClass().getName());
    }
    sxid=new SimpleXpathInputDialog(page,"String_Node_Str","String_Node_Str",struc.getForeignKey(),new SelectionListener(){
      public void widgetDefaultSelected(      SelectionEvent e){
      }
      public void widgetSelected(      SelectionEvent e){
        sxid.close();
      }
    }
,dataModelName);
    sxid.setBlockOnOpen(true);
    int ret=sxid.open();
    if (ret == Window.CANCEL) {
      return Status.CANCEL_STATUS;
    }
    struc.setForeignKey("String_Node_Str".equals(sxid.getXpath()) ? null : sxid.getXpath().replaceAll("String_Node_Str","String_Node_Str"));
    if (struc.hasChanged()) {
      page.refresh();
      page.getTreeViewer().expandToLevel(xSDCom,2);
      page.markDirty();
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}
Program: 149073
Project: 149073
Buggy source:
public IStatus doAction(){
  try {
    IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
    XSDAnnotationsStructure struc=new XSDAnnotationsStructure((XSDComponent)selection.getFirstElement());
    if (struc.getAnnotation() == null) {
      throw new RuntimeException("String_Node_Str" + selection.getFirstElement().getClass().getName());
    }
    dlg=new AnnotationOrderedListsDialog(new ArrayList(struc.getForeignKeyInfos().values()),new SelectionListener(){
      public void widgetDefaultSelected(      SelectionEvent e){
      }
      public void widgetSelected(      SelectionEvent e){
        dlg.close();
      }
    }
,page.getSite().getShell(),"String_Node_Str","String_Node_Str",page,AnnotationOrderedListsDialog.AnnotationForeignKeyInfo_ActionType,dataModelName);
    dlg.setBlockOnOpen(true);
    int ret=dlg.open();
    if (ret == Window.CANCEL) {
      return Status.CANCEL_STATUS;
    }
    struc.setForeignKeyInfos(dlg.getXPaths());
    if (struc.hasChanged()) {
      page.refresh();
      page.getTreeViewer().expandToLevel(selection.getFirstElement(),2);
      page.markDirty();
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    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=(TreeSelection)page.getTreeViewer().getSelection();
    XSDComponent xSDCom=null;
    if (selection.getFirstElement() instanceof Element) {
      TreePath tPath=((TreeSelection)selection).getPaths()[0];
      for (int i=0; i < tPath.getSegmentCount(); i++) {
        if (tPath.getSegment(i) instanceof XSDAnnotation)         xSDCom=(XSDAnnotation)(tPath.getSegment(i));
      }
    }
 else     xSDCom=(XSDComponent)selection.getFirstElement();
    XSDAnnotationsStructure struc=new XSDAnnotationsStructure(xSDCom);
    if (struc.getAnnotation() == null) {
      throw new RuntimeException("String_Node_Str" + xSDCom.getClass().getName());
    }
    dlg=new AnnotationOrderedListsDialog(new ArrayList(struc.getForeignKeyInfos().values()),new SelectionListener(){
      public void widgetDefaultSelected(      SelectionEvent e){
      }
      public void widgetSelected(      SelectionEvent e){
        dlg.close();
      }
    }
,page.getSite().getShell(),"String_Node_Str","String_Node_Str",page,AnnotationOrderedListsDialog.AnnotationForeignKeyInfo_ActionType,dataModelName);
    dlg.setBlockOnOpen(true);
    int ret=dlg.open();
    if (ret == Window.CANCEL) {
      return Status.CANCEL_STATUS;
    }
    struc.setForeignKeyInfos(dlg.getXPaths());
    if (struc.hasChanged()) {
      page.refresh();
      page.getTreeViewer().expandToLevel(xSDCom,2);
      page.markDirty();
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}
Program: 149077
Project: 149077
Buggy source:
public IStatus doAction(){
  try {
    IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
    XSDAnnotationsStructure struc=new XSDAnnotationsStructure((XSDComponent)selection.getFirstElement());
    if (struc.getAnnotation() == null) {
      throw new RuntimeException("String_Node_Str" + selection.getFirstElement().getClass().getName());
    }
    InputDialog id=new InputDialog(page.getSite().getShell(),"String_Node_Str","String_Node_Str",struc.getSourceSystem(),new IInputValidator(){
      public String isValid(      String newText){
        return null;
      }
    }
);
    id.setBlockOnOpen(true);
    int ret=id.open();
    if (ret == Window.CANCEL) {
      return Status.CANCEL_STATUS;
    }
    struc.setSourceSystem("String_Node_Str".equals(id.getValue()) ? null : id.getValue());
    if (struc.hasChanged()) {
      page.refresh();
      page.getTreeViewer().expandToLevel(selection.getFirstElement(),2);
      page.markDirty();
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    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=(TreeSelection)page.getTreeViewer().getSelection();
    XSDComponent xSDCom=null;
    if (selection.getFirstElement() instanceof Element) {
      TreePath tPath=((TreeSelection)selection).getPaths()[0];
      for (int i=0; i < tPath.getSegmentCount(); i++) {
        if (tPath.getSegment(i) instanceof XSDAnnotation)         xSDCom=(XSDAnnotation)(tPath.getSegment(i));
      }
    }
 else     xSDCom=(XSDComponent)selection.getFirstElement();
    XSDAnnotationsStructure struc=new XSDAnnotationsStructure(xSDCom);
    if (struc.getAnnotation() == null) {
      throw new RuntimeException("String_Node_Str" + xSDCom.getClass().getName());
    }
    InputDialog id=new InputDialog(page.getSite().getShell(),"String_Node_Str","String_Node_Str",struc.getSourceSystem(),new IInputValidator(){
      public String isValid(      String newText){
        return null;
      }
    }
);
    id.setBlockOnOpen(true);
    int ret=id.open();
    if (ret == Window.CANCEL) {
      return Status.CANCEL_STATUS;
    }
    struc.setSourceSystem("String_Node_Str".equals(id.getValue()) ? null : id.getValue());
    if (struc.hasChanged()) {
      page.refresh();
      page.getTreeViewer().expandToLevel(xSDCom,2);
      page.markDirty();
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}
Program: 149078
Project: 149078
Buggy source:
@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  try {
    Util.getAjaxSubject();
  }
 catch (  Exception e1) {
    return;
  }
  org.apache.log4j.Logger.getLogger(this.getClass()).debug("String_Node_Str");
  try {
    if (!Util.getPort().existsDataCluster(new WSExistsDataCluster(new WSDataClusterPK(Configuration.datacluster))).is_true()) {
      Util.getPort().putDataCluster(new WSPutDataCluster(new WSDataCluster(Configuration.datacluster,"String_Node_Str","String_Node_Str")));
    }
    if (!Util.getPort().existsDataModel(new WSExistsDataModel(new WSDataModelPK(Configuration.datamodel))).is_true()) {
      Util.getPort().putDataModel(new WSPutDataModel(new WSDataModel(Configuration.datamodel,"String_Node_Str","String_Node_Str")));
    }
  }
 catch (  Exception e) {
    String err="String_Node_Str";
    org.apache.log4j.Logger.getLogger(this.getClass()).error(err,e);
    throw new ServletException(err);
  }
}

Fixed version (ground truth):
@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  org.apache.log4j.Logger.getLogger(this.getClass()).debug("String_Node_Str");
  try {
    XtentisPort port=Util.getPort(null,null,Util._FORCE_RMI_);
    if (!port.existsDataCluster(new WSExistsDataCluster(new WSDataClusterPK(Configuration.datacluster))).is_true()) {
      port.putDataCluster(new WSPutDataCluster(new WSDataCluster(Configuration.datacluster,"String_Node_Str","String_Node_Str")));
    }
    if (!port.existsDataModel(new WSExistsDataModel(new WSDataModelPK(Configuration.datamodel))).is_true()) {
      port.putDataModel(new WSPutDataModel(new WSDataModel(Configuration.datamodel,"String_Node_Str","String_Node_Str")));
    }
  }
 catch (  Exception e) {
    String err="String_Node_Str";
    org.apache.log4j.Logger.getLogger(this.getClass()).error(err,e);
    throw new ServletException(err);
  }
}
Program: 149079
Project: 149079
Buggy source:
public WSRoutingOrderV2(java.lang.String name,com.amalto.workbench.webservices.WSRoutingOrderV2Status status,long timeCreated,long timeScheduled,long timeLastRunStarted,long timeLastRunCompleted,com.amalto.workbench.webservices.WSItemPK wsItemPK,java.lang.String serviceJNDI,java.lang.String serviceParameters,java.lang.String message){
  this.name=name;
  this.status=status;
  this.timeCreated=timeCreated;
  this.timeScheduled=timeScheduled;
  this.timeLastRunStarted=timeLastRunStarted;
  this.timeLastRunCompleted=timeLastRunCompleted;
  this.wsItemPK=wsItemPK;
  this.serviceJNDI=serviceJNDI;
  this.serviceParameters=serviceParameters;
  this.message=message;
}

Fixed version (ground truth):
public WSRoutingOrderV2(java.lang.String name,com.amalto.workbench.webservices.WSRoutingOrderV2Status status,long timeCreated,long timeScheduled,long timeLastRunStarted,long timeLastRunCompleted,com.amalto.workbench.webservices.WSItemPK wsItemPK,java.lang.String serviceJNDI,java.lang.String serviceParameters,java.lang.String message,java.lang.String bindingUniverseName){
  this.name=name;
  this.status=status;
  this.timeCreated=timeCreated;
  this.timeScheduled=timeScheduled;
  this.timeLastRunStarted=timeLastRunStarted;
  this.timeLastRunCompleted=timeLastRunCompleted;
  this.wsItemPK=wsItemPK;
  this.serviceJNDI=serviceJNDI;
  this.serviceParameters=serviceParameters;
  this.message=message;
  this.bindingUniverseName=bindingUniverseName;
}
Program: 149082
Project: 149082
Buggy source:
/** 
 * Model Listener
 */
public void handleEvent(int type,TreeObject parent,TreeObject child){
  TreeObject xobject=(TreeObject)((XObjectEditorInput)this.getEditorInput()).getModel();
switch (type) {
case IXObjectModelListener.DELETE:
    if (xobject.equals(child))     this.close(false);
  break;
case IXObjectModelListener.SAVE:
if (saveInProgress) this.editorDirtyStateChanged();
 else break;
case IXObjectModelListener.UPDATE:
if (xobject.equals(child)) {
AFormPage activePage=((AFormPage)getActivePageInstance());
if (activePage == null) {
  int editPos=pages.indexOf(xmlEditor);
  if (editPos >= 1) {
    activePage=(AFormPage)pages.get(editPos - 1);
  }
  xmlEditor.refresh();
}
activePage.refreshPage();
}
default :
}
}

Fixed version (ground truth):
/** 
 * Model Listener
 */
public void handleEvent(int type,TreeObject parent,TreeObject child){
  TreeObject xobject=(TreeObject)((XObjectEditorInput)this.getEditorInput()).getModel();
switch (type) {
case IXObjectModelListener.DELETE:
    if (xobject.equals(child))     this.close(false);
  break;
case IXObjectModelListener.SAVE:
if (saveInProgress) this.editorDirtyStateChanged();
 else break;
case IXObjectModelListener.UPDATE:
if (xobject.equals(child)) {
AFormPage activePage=((AFormPage)getActivePageInstance());
if (activePage == null) {
  int editPos=pages.indexOf(xmlEditor);
  if (editPos >= 1) {
    activePage=(AFormPage)pages.get(editPos - 1);
  }
  xmlEditor.refresh();
}
}
default :
}
}
Program: 149085
Project: 149085
Buggy source:
public DataModelMainPage(FormEditor editor){
  super(editor,DataModelMainPage.class.getName(),"String_Node_Str" + ((XObjectEditorInput)editor.getEditorInput()).getName() + Util.getRevision((TreeObject)((XObjectEditorInput)editor.getEditorInput()).getModel()));
  this.dataModelName=((XObjectEditorInput)editor.getEditorInput()).getName();
  this.editor=(XObjectEditor)editor;
}

Fixed version (ground truth):
public DataModelMainPage(FormEditor editor){
  super(editor,DataModelMainPage.class.getName(),"String_Node_Str" + ((XObjectEditorInput)editor.getEditorInput()).getName() + Util.getRevision((TreeObject)((XObjectEditorInput)editor.getEditorInput()).getModel()));
  modelName=((XObjectEditorInput)editor.getEditorInput()).getName();
  this.dataModelName=((XObjectEditorInput)editor.getEditorInput()).getName();
  this.editor=(XObjectEditor)editor;
}
Program: 149086
Project: 149086
Buggy source:
@Override public void widgetSelected(final SelectionEvent e){
  if (moveButton.getText().equals("String_Node_Str")) {
    sash.setWeights(new int[]{28,1,0});
    moveButton.setText("String_Node_Str");
    moveButton.setToolTipText("String_Node_Str");
  }
 else   if (moveButton.getText().equals("String_Node_Str")) {
    sash.setWeights(new int[]{14,1,14});
    moveButton.setText("String_Node_Str");
    moveButton.setToolTipText("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  FileDialog fd=new FileDialog(getSite().getShell(),SWT.SAVE);
  fd.setFilterExtensions(new String[]{"String_Node_Str"});
  fd.setText("String_Node_Str");
  String filename=fd.open();
  if (filename == null)   return;
  inferXsdFromDataModule(filename);
}
Program: 149088
Project: 149088
Buggy source:
/** 
 * checkup the  configuration
 * @throws XtentisException
 * @ejb.interface-method view-type = "local"
 * @ejb.facade-method
 */
public boolean checkConfigure(String conf) throws com.amalto.core.util.XtentisException {
  try {
    Document doc=Util.parse(conf);
    Util.validate(doc.getDocumentElement(),getConfigurationSchema());
    start();
    configuration=(SvnConfiguration)Unmarshaller.unmarshal(SvnConfiguration.class,new InputSource(new StringReader(conf)));
    new SvnHandler(configuration).list("String_Node_Str",null);
  }
 catch (  Exception e) {
    String err="String_Node_Str" + e.getClass().getName() + "String_Node_Str"+ e.getLocalizedMessage();
    org.apache.log4j.Logger.getLogger(this.getClass()).error(err,e);
    throw new XtentisException(err);
  }
  return true;
}

Fixed version (ground truth):
/** 
 * checkup the  configuration
 * @throws XtentisException
 * @ejb.interface-method view-type = "local"
 * @ejb.facade-method
 */
public boolean checkConfigure(String conf) throws com.amalto.core.util.XtentisException {
  try {
    Document doc=Util.parse(conf);
    Util.validate(doc.getDocumentElement(),getConfigurationSchema());
    configuration=(SvnConfiguration)Unmarshaller.unmarshal(SvnConfiguration.class,new InputSource(new StringReader(conf)));
    start();
    new SvnHandler(configuration).list("String_Node_Str",null);
  }
 catch (  Exception e) {
    String err="String_Node_Str" + e.getClass().getName() + "String_Node_Str"+ e.getLocalizedMessage();
    org.apache.log4j.Logger.getLogger(this.getClass()).error(err,e);
    throw new XtentisException(err);
  }
  return true;
}
Program: 149090
Project: 149090
Buggy source:
public void doubleClick(DoubleClickEvent event){
  IStructuredSelection selection=((IStructuredSelection)viewer.getSelection());
  int elem=isTopElement(selection.getFirstElement());
  if (elem == 0) {
    editConceptAction.run();
  }
 else   if (elem == 1) {
    editElementAction.run();
  }
}

Fixed version (ground truth):
public void doubleClick(DoubleClickEvent event){
  IStructuredSelection selection=((IStructuredSelection)viewer.getSelection());
  int elem=getElementType(selection.getFirstElement());
switch (elem) {
case 0:
    editConceptAction.run();
  break;
case 1:
editElementAction.run();
break;
case 2:
newComplexTypeAction.run();
break;
case 3:
editIdentityConstraintAction.run();
break;
case 4:
editXPathAction.run();
break;
case 5:
changeBaseTypeAction.run();
break;
case 6:
setAnnotationDescriptionsAction.run();
break;
case 7:
editParticleAction.run();
break;
case -1:
if (drillDownAdapter.canGoInto() == true) drillDownAdapter.goInto();
}
}
Program: 149091
Project: 149091
Buggy source:
private void hookDoubleClickAction(){
  viewer.addDoubleClickListener(new IDoubleClickListener(){
    public void doubleClick(    DoubleClickEvent event){
      IStructuredSelection selection=((IStructuredSelection)viewer.getSelection());
      int elem=isTopElement(selection.getFirstElement());
      if (elem == 0) {
        editConceptAction.run();
      }
 else       if (elem == 1) {
        editElementAction.run();
      }
    }
  }
);
}

Fixed version (ground truth):
private void hookDoubleClickAction(){
  viewer.addDoubleClickListener(new IDoubleClickListener(){
    public void doubleClick(    DoubleClickEvent event){
      IStructuredSelection selection=((IStructuredSelection)viewer.getSelection());
      int elem=getElementType(selection.getFirstElement());
switch (elem) {
case 0:
        editConceptAction.run();
      break;
case 1:
    editElementAction.run();
  break;
case 2:
newComplexTypeAction.run();
break;
case 3:
editIdentityConstraintAction.run();
break;
case 4:
editXPathAction.run();
break;
case 5:
changeBaseTypeAction.run();
break;
case 6:
setAnnotationDescriptionsAction.run();
break;
case 7:
editParticleAction.run();
break;
case -1:
if (drillDownAdapter.canGoInto() == true) drillDownAdapter.goInto();
}
}
}
);
}
Program: 149092
Project: 149092
Buggy source:
public void mouseUp(MouseEvent e){
  Role.Specification specification=role.getSpecifications().get(objectTypesCombo.getText());
  if (specification == null) {
    specification=role.new Specification();
    role.getSpecifications().put(objectTypesCombo.getText(),specification);
  }
  instancesComposite.setVisible(!isAdminButton.getSelection());
  specification.setAdmin(isAdminButton.getSelection());
  if (!isAdminButton.getSelection()) {
    instancesViewer.setInput(specification.getInstances());
    instancesViewer.setSelection(null);
  }
  paramsContainerComposite.setVisible(false);
  markDirty();
}

Fixed version (ground truth):
public void mouseUp(MouseEvent e){
  Role.Specification specification=role.getSpecifications().get(objectTypesCombo.getText());
  if (specification == null) {
    specification=role.new Specification();
    role.getSpecifications().put(objectTypesCombo.getText(),specification);
  }
  instancesComposite.setVisible(!isAdminButton.getSelection());
  specification.setAdmin(isAdminButton.getSelection());
  if (!isAdminButton.getSelection()) {
    inputList=specification.getInstances();
    instancesViewer.setInput(inputList);
    instancesViewer.setSelection(null);
  }
  paramsContainerComposite.setVisible(false);
  markDirty();
}
Program: 149093
Project: 149093
Buggy source:
private void refreshViewParameters(String instanceName){
  paramsLabel.setText("String_Node_Str" + instanceName);
  HashSet<String> parameters=role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).getParameters();
  java.util.List<Line> lines=new ArrayList<Line>();
  for (Iterator iter=parameters.iterator(); iter.hasNext(); ) {
    String marshalledWC=(String)iter.next();
    Line line=new Line(conditionsColumns,Util.convertRoleWhereCondition(RoleWhereCondition.parse(marshalledWC)));
    lines.add(line);
  }
  conditionViewer.getViewer().setInput(lines);
}

Fixed version (ground truth):
private void refreshViewParameters(String instanceName){
  paramsLabel.setText("String_Node_Str" + instanceName);
  HashSet<String> parameters=role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).getParameters();
  java.util.List<Line> lines=new ArrayList<Line>();
  for (Iterator iter=parameters.iterator(); iter.hasNext(); ) {
    String marshalledWC=(String)iter.next();
    if (marshalledWC != null) {
      Line line=new Line(conditionsColumns,Util.convertRoleWhereCondition(RoleWhereCondition.parse(marshalledWC)));
      lines.add(line);
    }
  }
  conditionViewer.getViewer().setInput(lines);
}
Program: 149095
Project: 149095
Buggy source:
public SashForm createSash(Composite parent){
  sash=new SashForm(parent,SWT.HORIZONTAL | SWT.SMOOTH);
  sash.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,2,1));
  ((GridData)sash.getLayoutData()).heightHint=1000;
  GridLayout layout=new GridLayout();
  sash.setLayout(layout);
  sash.setBackground(sash.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  createSchemaTree(sash);
  createButton();
  createTypeTree(sash);
  sash.setWeights(new int[]{28,1,0});
  return sash;
}

Fixed version (ground truth):
public SashForm createSash(Composite parent){
  sash=new SashForm(parent,SWT.HORIZONTAL);
  sash.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,2,1));
  ((GridData)sash.getLayoutData()).heightHint=1000;
  GridLayout layout=new GridLayout();
  sash.setLayout(layout);
  createSchemaTreeComp(sash);
  createTypeTreeComp(sash);
  sash.setWeights(new int[]{50,50});
  return sash;
}
Program: 149097
Project: 149097
Buggy source:
public void run(){
  IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
  declList.clear();
  List list=selection.toList();
  for (  Object obj : list) {
    if (obj instanceof XSDElementDeclaration) {
      if (Util.getParent(obj) == obj)       declList.add((XSDElementDeclaration)obj);
    }
  }
  AddBrowseItemsWizard wizard=new AddBrowseItemsWizard(page,declList);
  WizardDialog dialog=new WizardDialog(page.getSite().getShell(),wizard);
  dialog.open();
}

Fixed version (ground truth):
public void run(){
  IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
  declList.clear();
  List list=selection.toList();
  for (  Object obj : list) {
    if (obj instanceof XSDElementDeclaration) {
      XSDElementDeclaration declaration=(XSDElementDeclaration)obj;
      if (Util.getParent(obj) == obj)       declList.add(declaration);
    }
  }
  AddBrowseItemsWizard wizard=new AddBrowseItemsWizard(page,declList,new XSDAnnotationsStructure((XSDComponent)selection.getFirstElement()).getLabels());
  WizardDialog dialog=new WizardDialog(page.getSite().getShell(),wizard);
  dialog.open();
}
Program: 149099
Project: 149099
Buggy source:
public AddBrowseItemsWizard(AMainPageV2 launchPage,List<XSDElementDeclaration> list){
  super();
  setWindowTitle("String_Node_Str");
  page=launchPage;
  declList=list;
  for (  XSDElementDeclaration dl : declList) {
    browseItemToRoles.put(BROWSE_ITEMS + dl.getName(),new ArrayList<Line>());
  }
}

Fixed version (ground truth):
public AddBrowseItemsWizard(AMainPageV2 launchPage,List<XSDElementDeclaration> list,LinkedHashMap<String,String> labels){
  super();
  setWindowTitle("String_Node_Str");
  page=launchPage;
  declList=list;
  this.labels=labels;
  for (  XSDElementDeclaration dl : declList) {
    browseItemToRoles.put(BROWSE_ITEMS + dl.getName(),new ArrayList<Line>());
  }
}
Program: 149100
Project: 149100
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) {
    e.printStackTrace();
    MessageDialog.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) {
    e.printStackTrace();
    ErrorExceptionDialog.openError(server.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}
Program: 149103
Project: 149103
Buggy source:
protected void commit(){
  try {
    WSDataModel wsObject=(WSDataModel)(getXObject().getWsObject());
    wsObject.setDescription(descriptionText.getText() == null ? "String_Node_Str" : descriptionText.getText());
    String schema=((XSDTreeContentProvider)viewer.getContentProvider()).getXSDSchemaAsString();
    schema=schema.replaceAll("String_Node_Str","String_Node_Str");
    schema=schema.replaceAll("String_Node_Str","String_Node_Str");
    wsObject.setXsdSchema(schema);
    XMLEditor xmleditor=((XObjectEditor)getEditor()).getXmlEditor();
    xmleditor.refresh(getXObject());
  }
 catch (  Exception e) {
    e.printStackTrace();
    ErrorExceptionDialog.openError(this.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
protected void commit(){
  try {
    WSDataModel wsObject=(WSDataModel)(getXObject().getWsObject());
    wsObject.setDescription(descriptionText.getText() == null ? "String_Node_Str" : descriptionText.getText());
    String schema=((XSDTreeContentProvider)viewer.getContentProvider()).getXSDSchemaAsString();
    schema=schema.replaceAll("String_Node_Str","String_Node_Str");
    schema=schema.replaceAll("String_Node_Str","String_Node_Str");
    wsObject.setXsdSchema(schema);
    XMLEditor xmleditor=((XObjectEditor)getEditor()).getXmlEditor();
    xmleditor.refresh(getXObject());
  }
 catch (  Exception e) {
    e.printStackTrace();
    ErrorExceptionDialog.openError(this.getSite().getShell(),"String_Node_Str",CommonUtil.getErrMsgFromException(e));
  }
}