nus-yam/ex-repair huggingface dataset:
Program: 148229
Project: 148229
Buggy source:
@Override protected void okPressed(){
  name=text.getText();
  XpathSelectDialog.setContext(null);
  deactiveAllCellEditors();
  getValidationRules();
  super.okPressed();
}

Fixed version (ground truth):
@Override protected void okPressed(){
  name=text.getText();
  if (struc != null) {
    if (!doCheck()) {
      return;
    }
  }
  XpathSelectDialog.setContext(null);
  deactiveAllCellEditors();
  getValidationRules();
  super.okPressed();
}
Program: 148230
Project: 148230
Buggy source:
@Override public void keyPressed(KeyEvent e){
  if (e.keyCode == 13)   doSetValue(txtEdit.getText());
}

Fixed version (ground truth):
@Override public void keyPressed(KeyEvent e){
  if (e.keyCode == 13) {
    markDirty();
    doSetValue(txtEdit.getText());
    fireApplyEditorValue();
  }
}
Program: 148231
Project: 148231
Buggy source:
@Override protected Control createContents(Composite cell){
  txtEdit=new Text(cell,SWT.NONE);
  txtEdit.setFont(cell.getFont());
  txtEdit.setBackground(cell.getBackground());
  txtEdit.addKeyListener(new KeyAdapter(){
    @Override public void keyPressed(    KeyEvent e){
      if (e.keyCode == 13)       doSetValue(txtEdit.getText());
    }
  }
);
  return txtEdit;
}

Fixed version (ground truth):
@Override protected Control createContents(Composite cell){
  txtEdit=new Text(cell,SWT.NONE);
  txtEdit.setFont(cell.getFont());
  txtEdit.setBackground(cell.getBackground());
  txtEdit.addKeyListener(new KeyAdapter(){
    @Override public void keyPressed(    KeyEvent e){
      if (e.keyCode == 13) {
        markDirty();
        doSetValue(txtEdit.getText());
        fireApplyEditorValue();
      }
    }
  }
);
  return txtEdit;
}
Program: 148232
Project: 148232
Buggy source:
@Override protected Object openDialogBox(Control cellEditorWindow){
  SelectXPathDialog dialog=new SelectXPathDialog(cellEditorWindow.getShell(),allDataModelHolder,allDataModelHolder.getDefaultDataModel(),allDataModelHolder.getDefaultEntity());
  if (dialog.open() != Window.OK)   return null;
  return dialog.getSelectedXPath();
}

Fixed version (ground truth):
@Override protected Object openDialogBox(Control cellEditorWindow){
  SelectXPathDialog dialog=new SelectXPathDialog(cellEditorWindow.getShell(),allDataModelHolder,allDataModelHolder.getDefaultDataModel(),allDataModelHolder.getDefaultEntity());
  if (dialog.open() != Window.OK)   return null;
  String xpath=dialog.getSelectedXPath();
  if (xpathUpdate != null) {
    return xpathUpdate.updateXPath(xpath);
  }
  return xpath;
}
Program: 148233
Project: 148233
Buggy source:
public XPathCellEditor(Composite parent,IAllDataModelHolder allDataModelHolder){
  super(parent);
  this.allDataModelHolder=allDataModelHolder;
}

Fixed version (ground truth):
public XPathCellEditor(Composite parent,IAllDataModelHolder allDataModelHolder,IXPathUpdate xpathUpdate){
  this(parent,allDataModelHolder);
  this.xpathUpdate=xpathUpdate;
}
Program: 148234
Project: 148234
Buggy source:
@Override public boolean performFinish(){
  closeOpenEditors();
  final String zipFilePath=getZipFilePath();
  if (zipBtn.getSelection()) {
    try {
      ZipToFile.unZipFile(zipFilePath,importFolder);
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
  }
  if (folderBtn.getSelection()) {
    importFolder=folder.getText().getText();
  }
  final TreeObject[] objs=treeViewer.getCheckNodes();
  UIJob job=new UIJob("String_Node_Str"){
    @Override public IStatus runInUIThread(    IProgressMonitor monitor){
      try {
        doImport(objs,monitor);
        port.initMDM(null);
        return Status.OK_STATUS;
      }
 catch (      Exception e) {
        log.error(e.getMessage(),e);
        return Status.CANCEL_STATUS;
      }
 finally {
        new UIJob("String_Node_Str"){
          @Override public IStatus runInUIThread(          IProgressMonitor monitor){
            new ServerRefreshAction(view,serverRoot).run();
            return Status.OK_STATUS;
          }
        }
.schedule();
        if (zipFilePath != null) {
          importFolder=System.getProperty("String_Node_Str") + "String_Node_Str";
          ZipToFile.deleteDirectory(new File(importFolder));
        }
      }
    }
  }
;
  job.setPriority(Job.INTERACTIVE);
  job.schedule();
  return true;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  closeOpenEditors();
  final String zipFilePath=getZipFilePath();
  final boolean selectZip=zipBtn.getSelection();
  if (selectZip) {
    try {
      ZipToFile.unZipFile(zipFilePath,importFolder);
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
  }
  if (folderBtn.getSelection()) {
    importFolder=folder.getText().getText();
  }
  final TreeObject[] objs=treeViewer.getCheckNodes();
  UIJob job=new UIJob("String_Node_Str"){
    @Override public IStatus runInUIThread(    IProgressMonitor monitor){
      try {
        doImport(objs,monitor);
        port.initMDM(null);
        return Status.OK_STATUS;
      }
 catch (      Exception e) {
        log.error(e.getMessage(),e);
        return Status.CANCEL_STATUS;
      }
 finally {
        new UIJob("String_Node_Str"){
          @Override public IStatus runInUIThread(          IProgressMonitor monitor){
            new ServerRefreshAction(view,serverRoot).run();
            return Status.OK_STATUS;
          }
        }
.schedule();
        if (selectZip && zipFilePath != null) {
          importFolder=System.getProperty("String_Node_Str") + "String_Node_Str";
          ZipToFile.deleteDirectory(new File(importFolder));
        }
      }
    }
  }
;
  job.setPriority(Job.INTERACTIVE);
  job.schedule();
  return true;
}
Program: 148235
Project: 148235
Buggy source:
@Override public boolean performFinish(){
  closeOpenEditors();
  if (zipBtn.getSelection()) {
    try {
      ZipToFile.unZipFile(getZipFilePath(),importFolder);
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
  }
  if (folderBtn.getSelection()) {
    importFolder=folder.getText().getText();
  }
  final TreeObject[] objs=treeViewer.getCheckNodes();
  UIJob job=new UIJob("String_Node_Str"){
    @Override public IStatus runInUIThread(    IProgressMonitor monitor){
      try {
        doImport(objs,monitor);
        port.initMDM(null);
        return Status.OK_STATUS;
      }
 catch (      Exception e) {
        log.error(e.getMessage(),e);
        return Status.CANCEL_STATUS;
      }
 finally {
        new UIJob("String_Node_Str"){
          @Override public IStatus runInUIThread(          IProgressMonitor monitor){
            new ServerRefreshAction(view,serverRoot).run();
            return Status.OK_STATUS;
          }
        }
.schedule();
        if (getZipFilePath() != null) {
          importFolder=System.getProperty("String_Node_Str") + "String_Node_Str";
          ZipToFile.deleteDirectory(new File(importFolder));
        }
      }
    }
  }
;
  job.setPriority(Job.INTERACTIVE);
  job.schedule();
  return true;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  closeOpenEditors();
  final String zipFilePath=getZipFilePath();
  if (zipBtn.getSelection()) {
    try {
      ZipToFile.unZipFile(zipFilePath,importFolder);
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
  }
  if (folderBtn.getSelection()) {
    importFolder=folder.getText().getText();
  }
  final TreeObject[] objs=treeViewer.getCheckNodes();
  UIJob job=new UIJob("String_Node_Str"){
    @Override public IStatus runInUIThread(    IProgressMonitor monitor){
      try {
        doImport(objs,monitor);
        port.initMDM(null);
        return Status.OK_STATUS;
      }
 catch (      Exception e) {
        log.error(e.getMessage(),e);
        return Status.CANCEL_STATUS;
      }
 finally {
        new UIJob("String_Node_Str"){
          @Override public IStatus runInUIThread(          IProgressMonitor monitor){
            new ServerRefreshAction(view,serverRoot).run();
            return Status.OK_STATUS;
          }
        }
.schedule();
        if (zipFilePath != null) {
          importFolder=System.getProperty("String_Node_Str") + "String_Node_Str";
          ZipToFile.deleteDirectory(new File(importFolder));
        }
      }
    }
  }
;
  job.setPriority(Job.INTERACTIVE);
  job.schedule();
  return true;
}
Program: 148236
Project: 148236
Buggy source:
protected void createBtnArea(){
  final Composite compBtns=new Composite(this,SWT.NONE);
  compBtns.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
  final GridLayout gridLayout=new GridLayout();
  gridLayout.numColumns=7;
  compBtns.setLayout(gridLayout);
  btnAdd=new Button(compBtns,SWT.NONE);
  btnAdd.setImage(ImageCache.getCreatedImage(EImage.ADD_OBJ.getPath()));
  btnAdd.setToolTipText("String_Node_Str");
  btnRemove=new Button(compBtns,SWT.NONE);
  btnRemove.setImage(ImageCache.getCreatedImage(EImage.DELETE_OBJ.getPath()));
  btnRemove.setToolTipText("String_Node_Str");
  btnRemoveAll=new Button(compBtns,SWT.NONE);
  btnRemoveAll.setImage(ImageCache.getCreatedImage(EImage.PROGRESS_REMALL.getPath()));
  btnRemoveAll.setToolTipText("String_Node_Str");
  btnMoveUp=new Button(compBtns,SWT.NONE);
  btnMoveUp.setImage(ImageCache.getCreatedImage(EImage.PREV_NAV.getPath()));
  btnMoveUp.setToolTipText("String_Node_Str");
  btnMoveDown=new Button(compBtns,SWT.NONE);
  btnMoveDown.setImage(ImageCache.getCreatedImage(EImage.NEXT_NAV.getPath()));
  btnMoveUp.setToolTipText("String_Node_Str");
  btnCopy=new Button(compBtns,SWT.NONE);
  btnCopy.setImage(ImageCache.getCreatedImage(EImage.COPY.getPath()));
  btnCopy.setToolTipText("String_Node_Str");
  btnPaste=new Button(compBtns,SWT.NONE);
  btnPaste.setImage(ImageCache.getCreatedImage(EImage.PASTE.getPath()));
  btnPaste.setToolTipText("String_Node_Str");
}

Fixed version (ground truth):
protected void createBtnArea(){
  final Composite compBtns=new Composite(this,SWT.NONE);
  compBtns.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
  final GridLayout gridLayout=new GridLayout();
  gridLayout.numColumns=7;
  compBtns.setLayout(gridLayout);
  btnAdd=new Button(compBtns,SWT.NONE);
  btnAdd.setImage(ImageCache.getCreatedImage(EImage.ADD_OBJ.getPath()));
  btnAdd.setToolTipText("String_Node_Str");
  btnRemove=new Button(compBtns,SWT.NONE);
  btnRemove.setImage(ImageCache.getCreatedImage(EImage.DELETE_OBJ.getPath()));
  btnRemove.setToolTipText("String_Node_Str");
  btnRemoveAll=new Button(compBtns,SWT.NONE);
  btnRemoveAll.setImage(ImageCache.getCreatedImage(EImage.PROGRESS_REMALL.getPath()));
  btnRemoveAll.setToolTipText("String_Node_Str");
  btnMoveUp=new Button(compBtns,SWT.NONE);
  btnMoveUp.setImage(ImageCache.getCreatedImage(EImage.PREV_NAV.getPath()));
  btnMoveUp.setToolTipText("String_Node_Str");
  btnMoveDown=new Button(compBtns,SWT.NONE);
  btnMoveDown.setImage(ImageCache.getCreatedImage(EImage.NEXT_NAV.getPath()));
  btnMoveDown.setToolTipText("String_Node_Str");
  btnCopy=new Button(compBtns,SWT.NONE);
  btnCopy.setImage(ImageCache.getCreatedImage(EImage.COPY.getPath()));
  btnCopy.setToolTipText("String_Node_Str");
  btnPaste=new Button(compBtns,SWT.NONE);
  btnPaste.setImage(ImageCache.getCreatedImage(EImage.PASTE.getPath()));
  btnPaste.setToolTipText("String_Node_Str");
}
Program: 148237
Project: 148237
Buggy source:
public WSDeleteItemWithReport(com.amalto.workbench.webservices.WSItemPK wsItemPK,java.lang.String source,java.lang.String user){
  this.wsItemPK=wsItemPK;
  this.source=source;
  this.user=user;
}

Fixed version (ground truth):
public WSDeleteItemWithReport(com.amalto.workbench.webservices.WSItemPK wsItemPK,java.lang.String source,java.lang.String operateType,java.lang.String updatePath,java.lang.String user){
  this.wsItemPK=wsItemPK;
  this.source=source;
  this.operateType=operateType;
  this.updatePath=updatePath;
  this.user=user;
}
Program: 148238
Project: 148238
Buggy source:
public void doSerialize(Object obj,XMLWriter writer,SOAPSerializationContext context) throws Exception {
  com.amalto.workbench.webservices.WSDeleteItemWithReport instance=(com.amalto.workbench.webservices.WSDeleteItemWithReport)obj;
  if (instance.getWsItemPK() == null) {
    throw new SerializationException("String_Node_Str");
  }
  ns2_myWSItemPK_LiteralSerializer.serialize(instance.getWsItemPK(),ns1_wsItemPK_QNAME,null,writer,context);
  ns3_myns3_string__java_lang_String_String_Serializer.serialize(instance.getSource(),ns1_source_QNAME,null,writer,context);
  ns3_myns3_string__java_lang_String_String_Serializer.serialize(instance.getUser(),ns1_user_QNAME,null,writer,context);
}

Fixed version (ground truth):
public void doSerialize(Object obj,XMLWriter writer,SOAPSerializationContext context) throws Exception {
  com.amalto.workbench.webservices.WSDeleteItemWithReport instance=(com.amalto.workbench.webservices.WSDeleteItemWithReport)obj;
  if (instance.getWsItemPK() == null) {
    throw new SerializationException("String_Node_Str");
  }
  ns2_myWSItemPK_LiteralSerializer.serialize(instance.getWsItemPK(),ns1_wsItemPK_QNAME,null,writer,context);
  ns3_myns3_string__java_lang_String_String_Serializer.serialize(instance.getSource(),ns1_source_QNAME,null,writer,context);
  ns3_myns3_string__java_lang_String_String_Serializer.serialize(instance.getOperateType(),ns1_operateType_QNAME,null,writer,context);
  ns3_myns3_string__java_lang_String_String_Serializer.serialize(instance.getUpdatePath(),ns1_updatePath_QNAME,null,writer,context);
  ns3_myns3_string__java_lang_String_String_Serializer.serialize(instance.getUser(),ns1_user_QNAME,null,writer,context);
}
Program: 148240
Project: 148240
Buggy source:
public void handleEvent(Event event){
  if (event.button == DOMViewDialog.BUTTON_SAVE) {
    try {
      Util.getPort(getXObject()).putItem(new WSPutItem((WSDataClusterPK)getXObject().getWsKey(),d.getXML(),"String_Node_Str".equals(d.getDataModelName()) ? null : new WSDataModelPK(d.getDataModelName()),false));
    }
 catch (    Exception e) {
      MessageDialog.openError(shell,"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
      return;
    }
  }
  d.close();
}

Fixed version (ground truth):
public void handleEvent(Event event){
  if (event.button == DOMViewDialog.BUTTON_SAVE) {
    try {
      WSPutItemWithReport item=new WSPutItemWithReport(new WSPutItem((WSDataClusterPK)getXObject().getWsKey(),d.getXML(),"String_Node_Str".equals(d.getDataModelName()) ? null : new WSDataModelPK(d.getDataModelName()),false),"String_Node_Str",true);
      Util.getPort(getXObject()).putItemWithReport(item);
    }
 catch (    Exception e) {
      MessageDialog.openError(shell,"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
      return;
    }
  }
  d.close();
}
Program: 148241
Project: 148241
Buggy source:
public void doSerialize(Object obj,XMLWriter writer,SOAPSerializationContext context) throws Exception {
  com.amalto.workbench.webservices.WSItemPKsByCriteriaResponseResults instance=(com.amalto.workbench.webservices.WSItemPKsByCriteriaResponseResults)obj;
  if (new Long(instance.getDate()) == null) {
    throw new SerializationException("String_Node_Str");
  }
  ns3_myns3__long__long_Long_Serializer.serialize(new Long(instance.getDate()),ns1_date_QNAME,null,writer,context);
  if (instance.getWsItemPK() == null) {
    throw new SerializationException("String_Node_Str");
  }
  ns2_myWSItemPK_LiteralSerializer.serialize(instance.getWsItemPK(),ns1_wsItemPK_QNAME,null,writer,context);
  if (instance.getTaskId() == null) {
    throw new SerializationException("String_Node_Str");
  }
  ns3_myns3_string__java_lang_String_String_Serializer.serialize(instance.getTaskId(),ns1_taskId_QNAME,null,writer,context);
}

Fixed version (ground truth):
public void doSerialize(Object obj,XMLWriter writer,SOAPSerializationContext context) throws Exception {
  com.amalto.workbench.webservices.WSItemPKsByCriteriaResponseResults instance=(com.amalto.workbench.webservices.WSItemPKsByCriteriaResponseResults)obj;
  if (new Long(instance.getDate()) == null) {
    throw new SerializationException("String_Node_Str");
  }
  ns3_myns3__long__long_Long_Serializer.serialize(new Long(instance.getDate()),ns1_date_QNAME,null,writer,context);
  if (instance.getWsItemPK() == null) {
    throw new SerializationException("String_Node_Str");
  }
  ns2_myWSItemPK_LiteralSerializer.serialize(instance.getWsItemPK(),ns1_wsItemPK_QNAME,null,writer,context);
  ns3_myns3_string__java_lang_String_String_Serializer.serialize(instance.getTaskId(),ns1_taskId_QNAME,null,writer,context);
}
Program: 148245
Project: 148245
Buggy source:
public void doSerialize(Object obj,XMLWriter writer,SOAPSerializationContext context) throws Exception {
  com.amalto.workbench.webservices.WSUpdateMetadataItem instance=(com.amalto.workbench.webservices.WSUpdateMetadataItem)obj;
  if (instance.getWsItemPK() == null) {
    throw new SerializationException("String_Node_Str");
  }
  ns2_myWSItemPK_LiteralSerializer.serialize(instance.getWsItemPK(),ns1_wsItemPK_QNAME,null,writer,context);
  if (instance.getTaskId() == null) {
    throw new SerializationException("String_Node_Str");
  }
  ns3_myns3_string__java_lang_String_String_Serializer.serialize(instance.getTaskId(),ns1_taskId_QNAME,null,writer,context);
}

Fixed version (ground truth):
public void doSerialize(Object obj,XMLWriter writer,SOAPSerializationContext context) throws Exception {
  com.amalto.workbench.webservices.WSUpdateMetadataItem instance=(com.amalto.workbench.webservices.WSUpdateMetadataItem)obj;
  if (instance.getWsItemPK() == null) {
    throw new SerializationException("String_Node_Str");
  }
  ns2_myWSItemPK_LiteralSerializer.serialize(instance.getWsItemPK(),ns1_wsItemPK_QNAME,null,writer,context);
  ns3_myns3_string__java_lang_String_String_Serializer.serialize(instance.getTaskId(),ns1_taskId_QNAME,null,writer,context);
}
Program: 148247
Project: 148247
Buggy source:
private static String getTopElement(XSDElementDeclaration parent,XSDElementDeclaration son,XSDComplexTypeDefinition type){
  if (type.getContent() instanceof XSDParticle) {
    XSDParticle particle=(XSDParticle)type.getContent();
    if (particle.getTerm() instanceof XSDModelGroup) {
      XSDModelGroup group=(XSDModelGroup)particle.getTerm();
      EList<XSDParticle> elist=group.getContents();
      for (      XSDParticle pt : elist) {
        if (pt.getContent() instanceof XSDElementDeclaration) {
          XSDElementDeclaration ele=(XSDElementDeclaration)pt.getContent();
          if (ele == son)           return ele.getName();
          if (ele.getTypeDefinition() instanceof XSDComplexTypeDefinition)           return ele.getName() + "String_Node_Str" + getTopElement(ele,son,(XSDComplexTypeDefinition)ele.getTypeDefinition());
        }
      }
    }
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
private static String getTopElement(XSDElementDeclaration parent,XSDElementDeclaration son,XSDComplexTypeDefinition type){
  if (type.getContent() instanceof XSDParticle) {
    XSDParticle particle=(XSDParticle)type.getContent();
    if (particle.getTerm() instanceof XSDModelGroup) {
      XSDModelGroup group=(XSDModelGroup)particle.getTerm();
      EList<XSDParticle> elist=group.getContents();
      for (      XSDParticle pt : elist) {
        if (pt.getContent() instanceof XSDElementDeclaration) {
          XSDElementDeclaration ele=(XSDElementDeclaration)pt.getContent();
          if (ele == son)           return ele.getName();
        }
      }
    }
  }
  return "String_Node_Str";
}
Program: 148250
Project: 148250
Buggy source:
private void fillDataStore(String text){
  dataStore.clear();
  int enIndex=text.indexOf("String_Node_Str");
  int frIndex=text.indexOf("String_Node_Str");
  if (enIndex >= 0 && frIndex >= 0) {
    if (enIndex < frIndex) {
      String enDesc=text.substring(enIndex + 4,frIndex - 1);
      String frDesc=text.substring(frIndex + 4,text.length() - 1);
      dataStore.put("String_Node_Str",enDesc);
      dataStore.put("String_Node_Str",frDesc);
    }
 else {
      String enDesc=text.substring(enIndex + 4,text.length() - 1);
      String frDesc=text.substring(frIndex + 4,enIndex - 1);
      dataStore.put("String_Node_Str",frDesc);
      dataStore.put("String_Node_Str",enDesc);
    }
  }
 else   if (enIndex >= 0 && frIndex == -1) {
    String enDesc=text.substring(enIndex + 4,text.length() - 1);
    dataStore.put("String_Node_Str",enDesc);
  }
 else   if (frIndex >= 0 && enIndex == -1) {
    String frDesc=text.substring(frIndex + 4,text.length() - 1);
    dataStore.put("String_Node_Str",frDesc);
  }
 else   if (!text.equals("String_Node_Str")) {
    dataStore.put("String_Node_Str",text);
  }
 else {
    boolean find=false;
    Matcher match=DESC_PATTERN.matcher(text);
    while (match.find()) {
      find=true;
      String country=match.group(1).trim().toLowerCase();
      String desc=match.group(2).trim();
      if (Util.iso2lang.get(country) != null) {
        dataStore.put(country,desc);
      }
    }
    if (!find && !text.equals("String_Node_Str")) {
      dataStore.put("String_Node_Str",text);
    }
  }
}

Fixed version (ground truth):
private void fillDataStore(String text){
  dataStore.clear();
  int enIndex=text.indexOf("String_Node_Str");
  int frIndex=text.indexOf("String_Node_Str");
  if (enIndex >= 0 && frIndex >= 0) {
    if (enIndex < frIndex) {
      String enDesc=text.substring(enIndex + 4,frIndex - 1);
      String frDesc=text.substring(frIndex + 4,text.length() - 1);
      dataStore.put("String_Node_Str",enDesc);
      dataStore.put("String_Node_Str",frDesc);
    }
 else {
      String enDesc=text.substring(enIndex + 4,text.length() - 1);
      String frDesc=text.substring(frIndex + 4,enIndex - 1);
      dataStore.put("String_Node_Str",frDesc);
      dataStore.put("String_Node_Str",enDesc);
    }
  }
 else   if (enIndex >= 0 && frIndex == -1) {
    String enDesc=text.substring(enIndex + 4,text.length() - 1);
    dataStore.put("String_Node_Str",enDesc);
  }
 else   if (frIndex >= 0 && enIndex == -1) {
    String frDesc=text.substring(frIndex + 4,text.length() - 1);
    dataStore.put("String_Node_Str",frDesc);
  }
 else   if (!text.equals("String_Node_Str") && text.indexOf("String_Node_Str") == -1) {
    dataStore.put("String_Node_Str",text);
  }
 else {
    boolean find=false;
    Matcher match=DESC_PATTERN.matcher(text);
    while (match.find()) {
      find=true;
      String country=match.group(1).trim().toLowerCase();
      String desc=match.group(2).trim();
      if (Util.iso2lang.get(country) != null) {
        dataStore.put(country,desc);
      }
    }
    if (!find && !text.equals("String_Node_Str")) {
      dataStore.put("String_Node_Str",text);
    }
  }
}
Program: 148252
Project: 148252
Buggy source:
@Override protected void initUIContents(XSDElementDeclaration editedObj){
  if (entityWrapper == null || editedObj != xsdElementDeclaration) {
    entityWrapper=new EntityWrapper(editedObj);
    this.xsdElementDeclaration=editedObj;
  }
  compNameConfig.setTarget(entityWrapper);
  compKeyConfig.setXSDElement(entityWrapper);
}

Fixed version (ground truth):
@Override protected void initUIContents(XSDElementDeclaration editedObj){
  entityWrapper=new EntityWrapper(editedObj);
  this.xsdElementDeclaration=editedObj;
  compNameConfig.setTarget(entityWrapper);
  compKeyConfig.setXSDElement(entityWrapper);
}
Program: 148254
Project: 148254
Buggy source:
private void refreshCardinalityArea(){
  if (occurenceGroup == null)   return;
  if (!hasElementReference() && Util.isSimpleTypedParticle(curXSDParticle)) {
    spinMin.setSelection(1);
    spinMax.setSelection(1);
  }
  enableOccurenceGroup(!Util.isSimpleTypedParticle(curXSDParticle) || hasElementReference());
}

Fixed version (ground truth):
private void refreshCardinalityArea(){
  if (occurenceGroup == null)   return;
}
Program: 148255
Project: 148255
Buggy source:
private void validateCardinality() throws CommitValidationException {
  if (getCommitedObj().getNewMinOcur() < 0)   throw new CommitValidationException("String_Node_Str");
  if (getCommitedObj().getNewMaxOcur() > 0 && getCommitedObj().getNewMaxOcur() < getCommitedObj().getNewMinOcur())   throw new CommitValidationException("String_Node_Str");
}

Fixed version (ground truth):
private void validateCardinality() throws CommitValidationException {
  int newMinOcur=getCommitedObj().getNewMinOcur();
  if (newMinOcur < 0)   throw new CommitValidationException("String_Node_Str");
  int newMaxOcur=getCommitedObj().getNewMaxOcur();
  if (newMaxOcur > -1 && newMaxOcur < newMinOcur)   throw new CommitValidationException("String_Node_Str");
}
Program: 148257
Project: 148257
Buggy source:
private void onSelectMDMServer(){
  MDMServerDef selectedServer=getSelectedMDMServerDef();
  descCombo.getCombo().setText(selectedServer == null ? "String_Node_Str" : selectedServer.getDesc());
  userText.setText(selectedServer == null ? "String_Node_Str" : selectedServer.getUser());
  passwordText.setText(selectedServer == null ? "String_Node_Str" : selectedServer.getPasswd());
  urlText.setText(selectedServer == null ? "String_Node_Str" : selectedServer.getUrl());
  userText.setFocus();
}

Fixed version (ground truth):
private void onSelectMDMServer(){
  MDMServerDef selectedServer=getSelectedMDMServerDef();
  descCombo.getCombo().setText(selectedServer == null ? "String_Node_Str" : selectedServer.getDesc());
  userText.setText(selectedServer == null ? "String_Node_Str" : selectedServer.getUser());
  passwordText.setText(selectedServer == null ? "String_Node_Str" : selectedServer.getPasswd());
  urlText.setText(selectedServer == null ? "String_Node_Str" : selectedServer.getUrl());
  userText.setFocus();
  savePasswordButton.setSelection(selectedServer == null ? false : selectedServer.isSaved());
}
Program: 148259
Project: 148259
Buggy source:
private void addServer(Element root){
  Element prop=root.addElement("String_Node_Str");
  Element url=prop.addElement("String_Node_Str");
  Element user=prop.addElement("String_Node_Str");
  Element password=prop.addElement("String_Node_Str");
  Element universe=prop.addElement("String_Node_Str");
  Element desc=prop.addElement("String_Node_Str");
  desc.setText(descCombo.getCombo().getText().trim());
  url.setText(urlText.getText().trim());
  user.setText(userText.getText());
  if (savePasswordButton.getSelection() == true)   password.setText(PasswordUtil.encryptPassword(passwordText.getText()));
 else   root.remove(prop);
  if (Util.IsEnterPrise())   universe.setText(universeCombo.getText());
}

Fixed version (ground truth):
private void addServer(Element root,boolean saved){
  Element prop=root.addElement("String_Node_Str");
  Element url=prop.addElement("String_Node_Str");
  Element user=prop.addElement("String_Node_Str");
  Element password=prop.addElement("String_Node_Str");
  Element universe=prop.addElement("String_Node_Str");
  Element desc=prop.addElement("String_Node_Str");
  Element saved1=prop.addElement("String_Node_Str");
  Element connected1=prop.addElement("String_Node_Str");
  desc.setText(descCombo.getCombo().getText().trim());
  url.setText(urlText.getText().trim());
  user.setText(userText.getText());
  password.setText(PasswordUtil.encryptPassword(passwordText.getText()));
  if (saved)   saved1.setText("String_Node_Str");
 else   saved1.setText("String_Node_Str");
  connected1.setText("String_Node_Str");
  if (Util.IsEnterPrise())   universe.setText(universeCombo.getText());
}
Program: 148260
Project: 148260
Buggy source:
public static MDMServerDef parse(String url,String user,String passwd,String desc){
  Matcher m=Pattern.compile(PATTERN_URL).matcher(url);
  if (!m.find())   return null;
  String host=m.group(1);
  String port=m.group(2);
  String path=m.group(3);
  return new MDMServerDef(desc,host,port,path,user,passwd);
}

Fixed version (ground truth):
public static MDMServerDef parse(String url,String user,String passwd,String desc,boolean saved,boolean connected){
  Matcher m=Pattern.compile(PATTERN_URL).matcher(url);
  if (!m.find())   return null;
  String host=m.group(1);
  String port=m.group(2);
  String path=m.group(3);
  return new MDMServerDef(desc,host,port,path,user,passwd,saved,connected);
}
Program: 148261
Project: 148261
Buggy source:
public static List<MDMServerDef> getServers(){
  List<MDMServerDef> defs=new ArrayList<MDMServerDef>();
  Element root;
  Document logininfoDocument=null;
  if (new File(workbenchConfigFile).exists()) {
    try {
      SAXReader reader=new SAXReader();
      logininfoDocument=reader.read(new File(workbenchConfigFile));
    }
 catch (    DocumentException e) {
      log.error(e.getMessage(),e);
      return defs;
    }
    root=logininfoDocument.getRootElement();
  }
 else {
    logininfoDocument=DocumentHelper.createDocument();
    root=logininfoDocument.addElement("String_Node_Str");
  }
  List<Element> properties=root.elements("String_Node_Str");
  for (  Element ele : properties) {
    String password=ele.element("String_Node_Str").getText();
    password=PasswordUtil.decryptPassword(password);
    MDMServerDef def=MDMServerDef.parse(ele.element("String_Node_Str").getText(),ele.element("String_Node_Str").getText(),password,ele.element("String_Node_Str").getText());
    defs.add(def);
  }
  return defs;
}

Fixed version (ground truth):
public static List<MDMServerDef> getServers(){
  SAXReader reader=new SAXReader();
  Element root=null;
  Document logininfoDocument=null;
  if (new File(workbenchConfigFile).exists()) {
    try {
      logininfoDocument=reader.read(new File(workbenchConfigFile));
    }
 catch (    DocumentException e) {
      log.error(e.getMessage(),e);
    }
    root=logininfoDocument.getRootElement();
  }
 else {
    logininfoDocument=DocumentHelper.createDocument();
    root=logininfoDocument.addElement("String_Node_Str");
  }
  List<MDMServerDef> defs=new ArrayList<MDMServerDef>();
  List properties=root.elements("String_Node_Str");
  for (Iterator iterator=properties.iterator(); iterator.hasNext(); ) {
    Element ele=(Element)iterator.next();
    String password=ele.element("String_Node_Str").getText();
    String connected=ele.element("String_Node_Str").getText();
    boolean con=false;
    if (connected != null && Boolean.valueOf(connected) == true) {
      con=true;
    }
    String saved=ele.element("String_Node_Str").getText();
    boolean sav=false;
    if (saved != null && Boolean.valueOf(saved) == true) {
      sav=true;
    }
    password=PasswordUtil.decryptPassword(password);
    MDMServerDef def=MDMServerDef.parse(ele.element("String_Node_Str").getText(),ele.element("String_Node_Str").getText(),password,ele.element("String_Node_Str").getText(),sav,con);
    defs.add(def);
  }
  return defs;
}
Program: 148262
Project: 148262
Buggy source:
private void fillDataStore(String text){
  dataStore.clear();
  boolean find=false;
  Matcher match=DESC_PATTERN.matcher(text);
  while (match.find()) {
    find=true;
    String country=match.group(1).trim().toLowerCase();
    String desc=match.group(2).trim();
    if (Util.iso2lang.get(country) != null) {
      dataStore.put(country,desc);
    }
  }
  if (!find && !text.equals("String_Node_Str")) {
    dataStore.put("String_Node_Str",text);
  }
}

Fixed version (ground truth):
private void fillDataStore(String text){
  dataStore.clear();
  int enIndex=text.indexOf("String_Node_Str");
  int frIndex=text.indexOf("String_Node_Str");
  if (enIndex >= 0 && frIndex >= 0) {
    if (enIndex < frIndex) {
      String enDesc=text.substring(enIndex + 4,frIndex - 1);
      String frDesc=text.substring(frIndex + 4,text.length() - 1);
      dataStore.put("String_Node_Str",enDesc);
      dataStore.put("String_Node_Str",frDesc);
    }
 else {
      String enDesc=text.substring(enIndex + 4,text.length() - 1);
      String frDesc=text.substring(frIndex + 4,enIndex - 1);
      dataStore.put("String_Node_Str",frDesc);
      dataStore.put("String_Node_Str",enDesc);
    }
  }
 else   if (enIndex >= 0 && frIndex == -1) {
    String enDesc=text.substring(enIndex + 4,text.length() - 1);
    dataStore.put("String_Node_Str",enDesc);
  }
 else   if (frIndex >= 0 && enIndex == -1) {
    String frDesc=text.substring(frIndex + 4,text.length() - 1);
    dataStore.put("String_Node_Str",frDesc);
  }
 else   if (!text.equals("String_Node_Str")) {
    dataStore.put("String_Node_Str",text);
  }
 else {
    boolean find=false;
    Matcher match=DESC_PATTERN.matcher(text);
    while (match.find()) {
      find=true;
      String country=match.group(1).trim().toLowerCase();
      String desc=match.group(2).trim();
      if (Util.iso2lang.get(country) != null) {
        dataStore.put(country,desc);
      }
    }
    if (!find && !text.equals("String_Node_Str")) {
      dataStore.put("String_Node_Str",text);
    }
  }
}
Program: 148263
Project: 148263
Buggy source:
private void onSelectMDMServer(){
  MDMServerDef selectedServer=getSelectedMDMServerDef();
  endpointsCombo.getCombo().setToolTipText(selectedServer == null ? "String_Node_Str" : selectedServer.getDesc());
  descriptionText.setText(selectedServer == null ? "String_Node_Str" : selectedServer.getDesc());
  userText.setFocus();
}

Fixed version (ground truth):
private void onSelectMDMServer(){
  MDMServerDef selectedServer=getSelectedMDMServerDef();
  endpointsCombo.getCombo().setToolTipText(selectedServer == null ? "String_Node_Str" : selectedServer.getDesc());
  userText.setText(selectedServer == null ? "String_Node_Str" : selectedServer.getUser());
  passwordText.setText(selectedServer == null ? "String_Node_Str" : selectedServer.getPasswd());
  descriptionText.setText(selectedServer == null ? "String_Node_Str" : selectedServer.getDesc());
  userText.setFocus();
}
Program: 148265
Project: 148265
Buggy source:
protected WSRoutingRuleOperator(java.lang.String value){
  this.value=value;
  valueMap.put(this.toString(),this);
}

Fixed version (ground truth):
public WSRoutingRuleOperator(){
}
Program: 148266
Project: 148266
Buggy source:
@Override protected void initUIContents(XSDComponent editedObj){
  super.initUIContents(editedObj);
  filterExpression=new XSDAnnotationsStructure(curXSDComponent).getFKFilter();
  if (filterExpression == null)   filterExpression="String_Node_Str";
  dataModelHolder.setDefaultDataModel(getDataModelName());
}

Fixed version (ground truth):
@Override protected void initUIContents(XSDComponent editedObj){
  super.initUIContents(editedObj);
  filterExpression=new XSDAnnotationsStructure(curXSDComponent).getFKFilter();
  if (filterExpression == null)   filterExpression="String_Node_Str";
  dataModelHolder.setDefaultDataModel(getDataModelName());
  dataModelHolder.setDefaultEntity(getEntityName());
}
Program: 148267
Project: 148267
Buggy source:
@Override protected void initUIContents(XSDComponent editedObj){
  super.initUIContents(editedObj);
  fkInfos.clear();
  XSDAnnotationsStructure annoStruct=new XSDAnnotationsStructure(curXSDComponent);
  for (  String eachFKInfo : annoStruct.getForeignKeyInfos().values())   fkInfos.add(eachFKInfo);
  isResolveAutoInWeb=annoStruct.getRetrieveFKinfos();
  dataModelHolder.setDefaultDataModel(getDataModelName());
}

Fixed version (ground truth):
@Override protected void initUIContents(XSDComponent editedObj){
  super.initUIContents(editedObj);
  fkInfos.clear();
  XSDAnnotationsStructure annoStruct=new XSDAnnotationsStructure(curXSDComponent);
  for (  String eachFKInfo : annoStruct.getForeignKeyInfos().values())   fkInfos.add(eachFKInfo);
  isResolveAutoInWeb=annoStruct.getRetrieveFKinfos();
  dataModelHolder.setDefaultDataModel(getDataModelName());
  dataModelHolder.setDefaultEntity(getEntityName());
}
Program: 148268
Project: 148268
Buggy source:
@Override protected void createControlsInSection(Composite compSectionClient){
  dataModelHolder=new FixDMNameBasePropertySectionDataModelExtractor(this);
  compSimpleXPath=new SimpleXPathComposite(compSectionClient,SWT.NONE,SimpleXPathComposite.DEFAULTTITLE,dataModelHolder,"String_Node_Str");
}

Fixed version (ground truth):
@Override protected void createControlsInSection(Composite compSectionClient){
  dataModelHolder=new FixDMNameBasePropertySectionDataModelExtractor(this);
  compSimpleXPath=new SimpleXPathComposite(compSectionClient,SWT.NONE,SimpleXPathComposite.DEFAULTTITLE,dataModelHolder,dataModelHolder.getDefaultDataModel());
}
Program: 148269
Project: 148269
Buggy source:
@Override protected void initUIContents(XSDComponent editedObj){
  super.initUIContents(editedObj);
  xpath=new XSDAnnotationsStructure(curXSDComponent).getForeignKey();
  if (xpath == null)   xpath="String_Node_Str";
  dataModelHolder.setDefaultDataModel(getDataModelName());
  compSimpleXPath.setDefaultDataModelForSelect(getDataModelName());
}

Fixed version (ground truth):
@Override protected void initUIContents(XSDComponent editedObj){
  super.initUIContents(editedObj);
  xpath=new XSDAnnotationsStructure(curXSDComponent).getForeignKey();
  if (xpath == null)   xpath="String_Node_Str";
  dataModelHolder.setDefaultDataModel(getDataModelName());
  compSimpleXPath.setDefaultDataModelForSelect(getDataModelName());
  dataModelHolder.setDefaultEntity(getEntityName());
}
Program: 148270
Project: 148270
Buggy source:
@Override protected CellEditor[] getCellEditors(){
  return new CellEditor[]{new XPathCellEditor(tvInfos.getTree(),dataModelHolder),new ComboBoxCellEditor(tvInfos.getTree(),IConstants.VIEW_CONDITION_OPERATORS,SWT.READ_ONLY),new XPathCellEditor(tvInfos.getTree(),dataModelHolder),new ComboBoxCellEditor(tvInfos.getTree(),IConstants.PREDICATES,SWT.READ_ONLY)};
}

Fixed version (ground truth):
@Override protected CellEditor[] getCellEditors(){
  return new CellEditor[]{new XPathCellEditor(tvInfos.getTree(),dataModelHolder),new ComboBoxCellEditor(tvInfos.getTree(),IConstants.VIEW_CONDITION_OPERATORS,SWT.READ_ONLY),new TextCellEditor(tvInfos.getTree()),new ComboBoxCellEditor(tvInfos.getTree(),IConstants.PREDICATES,SWT.READ_ONLY)};
}
Program: 148271
Project: 148271
Buggy source:
@Override protected Point getInitialSize(){
  return new Point(500,375);
}

Fixed version (ground truth):
@Override protected Point getInitialSize(){
  return new Point(500,575);
}
Program: 148272
Project: 148272
Buggy source:
@Override protected Control createContents(Composite cell){
  txtEdit=new Text(cell,SWT.NONE);
  txtEdit.setFont(cell.getFont());
  txtEdit.setBackground(cell.getBackground());
  txtEdit.addFocusListener(new FocusAdapter(){
    @Override public void focusLost(    FocusEvent e){
      doSetValue(txtEdit.getText().trim());
      EditableDialogCellEditor.this.deactivate();
    }
  }
);
  txtEdit.addKeyListener(new KeyAdapter(){
    @Override public void keyPressed(    KeyEvent e){
      if (e.keyCode == 13)       doSetValue(txtEdit.getText());
    }
  }
);
  return txtEdit;
}

Fixed version (ground truth):
@Override protected Control createContents(Composite cell){
  txtEdit=new Text(cell,SWT.NONE);
  txtEdit.setFont(cell.getFont());
  txtEdit.setBackground(cell.getBackground());
  txtEdit.addKeyListener(new KeyAdapter(){
    @Override public void keyPressed(    KeyEvent e){
      if (e.keyCode == 13)       doSetValue(txtEdit.getText());
    }
  }
);
  return txtEdit;
}
Program: 148273
Project: 148273
Buggy source:
@Override protected Object openDialogBox(Control cellEditorWindow){
  SelectXPathDialog dialog=new SelectXPathDialog(cellEditorWindow.getShell(),allDataModelHolder,defaultDataModelName);
  if (dialog.open() != Window.OK)   return null;
  return dialog.getSelectedXPath();
}

Fixed version (ground truth):
@Override protected Object openDialogBox(Control cellEditorWindow){
  SelectXPathDialog dialog=new SelectXPathDialog(cellEditorWindow.getShell(),allDataModelHolder,allDataModelHolder.getDefaultDataModel(),allDataModelHolder.getDefaultEntity());
  if (dialog.open() != Window.OK)   return null;
  return dialog.getSelectedXPath();
}
Program: 148274
Project: 148274
Buggy source:
public XPathCellEditor(Composite parent,IAllDataModelHolder allDataModelHolder,String defaultDataModelName){
  super(parent);
  this.allDataModelHolder=allDataModelHolder;
  this.defaultDataModelName=defaultDataModelName;
}

Fixed version (ground truth):
public XPathCellEditor(Composite parent,IAllDataModelHolder allDataModelHolder){
  super(parent);
  this.allDataModelHolder=allDataModelHolder;
}
Program: 148275
Project: 148275
Buggy source:
protected void createTreeArea(){
  tvInfos=new TreeViewer(this,SWT.BORDER | SWT.FULL_SELECTION);
  Tree tree=tvInfos.getTree();
  tree.setLinesVisible(true);
  tree.setHeaderVisible(true);
  final GridData gd_tree=new GridData(SWT.FILL,SWT.FILL,true,true);
  gd_tree.heightHint=150;
  tree.setLayoutData(gd_tree);
  tvInfos.setContentProvider(new ListContentProvider());
  tvInfos.setLabelProvider(getLabelProviderForViewer());
  tvInfos.setColumnProperties(getColumnProperties());
  tvInfos.setCellEditors(getCellEditors());
  tvInfos.setCellModifier(getCellModifier());
  tvInfos.setInput(getInfos());
  fillColumnsInTree(tree);
}

Fixed version (ground truth):
protected void createTreeArea(){
  tvInfos=new TreeViewer(this,SWT.BORDER | SWT.FULL_SELECTION);
  Tree tree=tvInfos.getTree();
  tree.setLinesVisible(true);
  tree.setHeaderVisible(true);
  final GridData gd_tree=new GridData(SWT.FILL,SWT.FILL,true,true);
  gd_tree.heightHint=80;
  tree.setLayoutData(gd_tree);
  tvInfos.setContentProvider(new ListContentProvider());
  tvInfos.setLabelProvider(getLabelProviderForViewer());
  tvInfos.setColumnProperties(getColumnProperties());
  tvInfos.setCellEditors(getCellEditors());
  tvInfos.setCellModifier(getCellModifier());
  tvInfos.setInput(getInfos());
  fillColumnsInTree(tree);
}
Program: 148276
Project: 148276
Buggy source:
private void updateServerListInPreference(){
  String description=descCombo.getCombo().getText().trim();
  if ("String_Node_Str".equals(description)) {
    description=getDefaultConnectionDescription();
  }
  PreferenceMDMServerExtractor.getInstence().updateMDMServerDefinitionsBy(urlText.getText().trim(),userText.getText().trim(),passwordText.getText(),description);
}

Fixed version (ground truth):
/** 
 * @deprecated
 */
private void updateServerListInPreference(){
  String description=descCombo.getCombo().getText().trim();
  if ("String_Node_Str".equals(description)) {
    description=getDefaultConnectionDescription();
  }
  PreferenceMDMServerExtractor.getInstence().updateMDMServerDefinitionsBy(urlText.getText().trim(),userText.getText().trim(),passwordText.getText(),description);
}
Program: 148278
Project: 148278
Buggy source:
private MDMServerDef[] getInitMDMServers(){
  MDMServerDef[] servers=PreferenceMDMServerExtractor.getInstence().getMDMServerDefinitions();
  MDMServerDef defaultMDMServerDef=new MDMServerDef();
  if (servers.length == 0)   return new MDMServerDef[]{defaultMDMServerDef};
  List<MDMServerDef> mdmServers=new ArrayList<MDMServerDef>();
  for (  MDMServerDef eachServerDef : servers) {
    mdmServers.add(eachServerDef);
    if (eachServerDef.getUrl().equals(defaultMDMServerDef.getUrl()))     defaultMDMServerDef=eachServerDef;
  }
  mdmServers.remove(defaultMDMServerDef);
  mdmServers.add(0,defaultMDMServerDef);
  return mdmServers.toArray(new MDMServerDef[0]);
}

Fixed version (ground truth):
/** 
 * @return
 */
private MDMServerDef[] getInitMDMServers(){
  List<MDMServerDef> servers=MDMServerHelper.getServers();
  MDMServerDef defaultMDMServerDef=new MDMServerDef();
  if (servers.size() == 0)   return new MDMServerDef[]{defaultMDMServerDef};
  List<MDMServerDef> mdmServers=new ArrayList<MDMServerDef>();
  for (  MDMServerDef eachServerDef : servers) {
    mdmServers.add(eachServerDef);
    if (eachServerDef.getUrl().equals(defaultMDMServerDef.getUrl()))     defaultMDMServerDef=eachServerDef;
  }
  mdmServers.remove(defaultMDMServerDef);
  mdmServers.add(0,defaultMDMServerDef);
  return mdmServers.toArray(new MDMServerDef[0]);
}
Program: 148279
Project: 148279
Buggy source:
private void addServer(Element root){
  Element prop=root.addElement("String_Node_Str");
  Element url=prop.addElement("String_Node_Str");
  Element user=prop.addElement("String_Node_Str");
  Element password=prop.addElement("String_Node_Str");
  Element universe=prop.addElement("String_Node_Str");
  url.setText(urlText.getText().trim());
  user.setText(userText.getText());
  if (savePasswordButton.getSelection() == true)   password.setText(PasswordUtil.encryptPassword(passwordText.getText()));
 else   root.remove(prop);
  if (Util.IsEnterPrise())   universe.setText(universeCombo.getText());
}

Fixed version (ground truth):
private void addServer(Element root){
  Element prop=root.addElement("String_Node_Str");
  Element url=prop.addElement("String_Node_Str");
  Element user=prop.addElement("String_Node_Str");
  Element password=prop.addElement("String_Node_Str");
  Element universe=prop.addElement("String_Node_Str");
  Element desc=prop.addElement("String_Node_Str");
  desc.setText(descCombo.getCombo().getText().trim());
  url.setText(urlText.getText().trim());
  user.setText(userText.getText());
  if (savePasswordButton.getSelection() == true)   password.setText(PasswordUtil.encryptPassword(passwordText.getText()));
 else   root.remove(prop);
  if (Util.IsEnterPrise())   universe.setText(universeCombo.getText());
}
Program: 148281
Project: 148281
Buggy source:
@Override protected void okPressed(){
  outBuffer.append(instanceNameText.getText().trim());
  List<Line> inputs=(List<Line>)complexTableViewer.getViewer().getInput();
  List<RoleEntry> list=roleEntries.get();
  RoleEntry entry=new RoleEntry(inputs,instanceNameText.getText().trim(),typeName);
  list.add(entry);
  super.okPressed();
}

Fixed version (ground truth):
@Override protected void okPressed(){
  outBuffer.append(instanceNameText.getText().trim());
  if (Util.IsEnterPrise()) {
    List<Line> inputs=(List<Line>)complexTableViewer.getViewer().getInput();
    List<RoleEntry> list=roleEntries.get();
    RoleEntry entry=new RoleEntry(inputs,instanceNameText.getText().trim(),typeName);
    list.add(entry);
  }
  super.okPressed();
}
Program: 148286
Project: 148286
Buggy source:
public void widgetSelected(SelectionEvent e){
  if (isFile) {
    FileDialog fileDialog=new FileDialog(parent.getShell(),SWT.OPEN);
    fileDialog.setFilterExtensions(fileExtents);
    fileDialog.setFileName(filename);
    String name=fileDialog.open();
    if (name != null) {
      text.setText(name);
    }
  }
 else {
    DirectoryDialog d=new DirectoryDialog(parent.getShell());
    String name=d.open();
    if (name != null)     text.setText(name);
  }
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  if (isFile) {
    FileDialog fileDialog=new FileDialog(parent.getShell(),type);
    fileDialog.setFilterExtensions(fileExtents);
    fileDialog.setFileName(filename);
    String name=fileDialog.open();
    if (name != null) {
      text.setText(name);
    }
  }
 else {
    DirectoryDialog d=new DirectoryDialog(parent.getShell());
    String name=d.open();
    if (name != null)     text.setText(name);
  }
}