nus-yam/ex-repair huggingface dataset:
Program: 148158
Project: 148158
Buggy source:
private boolean checkNameIsDuplicated(XSDAnnotationsStructure struc,String inputName){
  for (  String eachValidationRule : struc.getSchematrons().values()) {
    String name=getValidationRuleName(eachValidationRule);
    if (name.equals(inputName)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean checkNameIsDuplicated(XSDAnnotationsStructure struc,String inputName){
  for (  String eachValidationRule : struc.getSchematrons().values()) {
    String name=getValidationRuleName(eachValidationRule);
    if (name.equals(inputName) && !name.equals(ckName)) {
      return true;
    }
  }
  return false;
}
Program: 148159
Project: 148159
Buggy source:
private List<Line> parseRules(){
  List<Line> lines=new ArrayList<Line>();
  pattern=pattern.replaceAll("String_Node_Str","String_Node_Str");
  String context="String_Node_Str";
  String type="String_Node_Str";
  String express="String_Node_Str";
  String msg="String_Node_Str";
  Element e=null;
  try {
    e=Util.parse(pattern).getDocumentElement();
  }
 catch (  Exception e1) {
    log.error(e1.getMessage(),e1);
  }
  if (e.getAttributes().getNamedItem("String_Node_Str") != null)   name=e.getAttributes().getNamedItem("String_Node_Str").getTextContent();
  text.setText("String_Node_Str".equals(name) ? "String_Node_Str" : name);
  NodeList rulelist=e.getElementsByTagName("String_Node_Str");
  for (int i=0; i < rulelist.getLength(); i++) {
    Node r=rulelist.item(i);
    context=r.getAttributes().getNamedItem("String_Node_Str").getTextContent();
    for (int j=0; j < r.getChildNodes().getLength(); j++) {
      if (r.getChildNodes().item(j).getNodeType() == Node.ELEMENT_NODE) {
        type=r.getChildNodes().item(j).getNodeName();
        express=r.getChildNodes().item(j).getAttributes().getNamedItem("String_Node_Str").getTextContent();
        msg=r.getChildNodes().item(j).getTextContent();
        break;
      }
    }
    Line l=new Line(columns,new String[]{type,context,express,msg});
    lines.add(l);
  }
  return lines;
}

Fixed version (ground truth):
private List<Line> parseRules(){
  List<Line> lines=new ArrayList<Line>();
  pattern=pattern.replaceAll("String_Node_Str","String_Node_Str");
  String context="String_Node_Str";
  String type="String_Node_Str";
  String express="String_Node_Str";
  String msg="String_Node_Str";
  Element e=null;
  try {
    e=Util.parse(pattern).getDocumentElement();
  }
 catch (  Exception e1) {
    log.error(e1.getMessage(),e1);
  }
  if (e.getAttributes().getNamedItem("String_Node_Str") != null)   name=e.getAttributes().getNamedItem("String_Node_Str").getTextContent();
  text.setText("String_Node_Str".equals(name) ? "String_Node_Str" : name);
  ckName=name;
  NodeList rulelist=e.getElementsByTagName("String_Node_Str");
  for (int i=0; i < rulelist.getLength(); i++) {
    Node r=rulelist.item(i);
    context=r.getAttributes().getNamedItem("String_Node_Str").getTextContent();
    for (int j=0; j < r.getChildNodes().getLength(); j++) {
      if (r.getChildNodes().item(j).getNodeType() == Node.ELEMENT_NODE) {
        type=r.getChildNodes().item(j).getNodeName();
        express=r.getChildNodes().item(j).getAttributes().getNamedItem("String_Node_Str").getTextContent();
        msg=r.getChildNodes().item(j).getTextContent();
        break;
      }
    }
    Line l=new Line(columns,new String[]{type,context,express,msg});
    lines.add(l);
  }
  return lines;
}
Program: 148162
Project: 148162
Buggy source:
public DataModelSelectDialog(Shell parentShell){
  super(parentShell);
}

Fixed version (ground truth):
public DataModelSelectDialog(Shell parentShell,TreeParent treeParent){
  super(parentShell);
  this.treeParent=treeParent;
}
Program: 148163
Project: 148163
Buggy source:
private void changeToResource(){
  TreeParent parent=null;
  for (int i=0; i < ((TreeParent)ServerView.show().getRoot().getChildren()[0]).getChildren().length; i++) {
    parent=(TreeParent)((TreeParent)ServerView.show().getRoot().getChildren()[0]).getChildren()[i];
    if (parent.getType() == TreeObject.DATA_MODEL)     break;
  }
  contentProvider=new ServerTreeContentProvider(ServerView.show().getSite(),parent);
  setTreeContentProvider(contentProvider);
  domViewer.setLabelProvider(new ServerTreeLabelProvider());
  domViewer.setSorter(new ViewerSorter(){
    public int category(    Object element){
      if (element instanceof TreeParent) {
        TreeParent category=(TreeParent)element;
        if (category.getType() == TreeObject.CATEGORY_FOLDER)         return -1;
      }
      return 0;
    }
  }
);
  domViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent e){
      StructuredSelection sel=(StructuredSelection)e.getSelection();
      TreeObject selectNode=(TreeObject)sel.getFirstElement();
      if (selectNode != null && selectNode.getType() == TreeObject.DATA_MODEL)       xpath=selectNode.getDisplayName();
 else       xpath="String_Node_Str";
      sel.getFirstElement();
      getButton(IDialogConstants.OK_ID).setEnabled(xpath.length() > 0);
    }
  }
);
  domViewer.setInput(ServerView.show().getSite());
}

Fixed version (ground truth):
private void changeToResource(){
  TreeParent parent=null;
  TreeObject[] children=treeParent.getChildren();
  for (int i=0; i < children.length; i++) {
    parent=(TreeParent)children[i];
    if (parent.getType() == TreeObject.DATA_MODEL)     break;
  }
  contentProvider=new ServerTreeContentProvider(ServerView.show().getSite(),parent);
  setTreeContentProvider(contentProvider);
  domViewer.setLabelProvider(new ServerTreeLabelProvider());
  domViewer.setSorter(new ViewerSorter(){
    public int category(    Object element){
      if (element instanceof TreeParent) {
        TreeParent category=(TreeParent)element;
        if (category.getType() == TreeObject.CATEGORY_FOLDER)         return -1;
      }
      return 0;
    }
  }
);
  domViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent e){
      StructuredSelection sel=(StructuredSelection)e.getSelection();
      TreeObject selectNode=(TreeObject)sel.getFirstElement();
      if (selectNode != null && selectNode.getType() == TreeObject.DATA_MODEL)       xpath=selectNode.getDisplayName();
 else       xpath="String_Node_Str";
      sel.getFirstElement();
      getButton(IDialogConstants.OK_ID).setEnabled(xpath.length() > 0);
    }
  }
);
  domViewer.setInput(ServerView.show().getSite());
}
Program: 148167
Project: 148167
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  parent.getShell().setText(this.title);
  Composite composite=(Composite)super.createDialogArea(parent);
  builder=new SchematronExpressBuilder(composite,value,conceptName,isAbsoluteXPath);
  return composite;
}

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

Fixed version (ground truth):
public ValidationRuleExcpressDialog(Shell parentShell,TreeParent treeParent,String title,String value,String conceptName,boolean isAbsoluteXPath){
  super(parentShell);
  this.treeParent=treeParent;
  this.title=title;
  this.value=value;
  this.conceptName=conceptName;
  this.isAbsoluteXPath=isAbsoluteXPath;
}
Program: 148176
Project: 148176
Buggy source:
private void initUIContentsForComboCustomTypes(){
  List<String> allCustomTypeNames=Util.getAllCustomTypeNames(xsdSimpleType.getSchema());
  allCustomTypeNames.remove(xsdSimpleType.getName());
  comboCustomTypes.setInput(allCustomTypeNames);
  comboCustomTypes.setSelection(new StructuredSelection(xsdSimpleType.getBaseType().getName()));
  radCustomTypes.setSelection(!comboCustomTypes.getSelection().isEmpty());
}

Fixed version (ground truth):
private void initUIContentsForComboCustomTypes(){
  comboCustomTypes.removeSelectionChangedListener(customChangedListener);
  List<String> allCustomTypeNames=Util.getAllCustomTypeNames(xsdSimpleType.getSchema());
  allCustomTypeNames.remove(xsdSimpleType.getName());
  comboCustomTypes.setInput(allCustomTypeNames);
  comboCustomTypes.setSelection(new StructuredSelection(xsdSimpleType.getBaseType().getName()));
  radCustomTypes.setSelection(!comboCustomTypes.getSelection().isEmpty());
  comboCustomTypes.addSelectionChangedListener(customChangedListener);
}
Program: 148177
Project: 148177
Buggy source:
private void initUIListenerForBaseTypeCombos(){
  comboCustomTypes.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      if (section != null && getSelectedBaseTypeName().length() > 0) {
        section.autoCommit();
      }
    }
  }
);
  comboCustomTypes.getCombo().addMouseListener(new MouseAdapter(){
    @Override public void mouseDown(    MouseEvent e){
      ISelection oldSelection=comboCustomTypes.getSelection();
      List<String> allCustomTypeNames=Util.getAllCustomTypeNames(xsdSimpleType.getSchema());
      allCustomTypeNames.remove(xsdSimpleType.getName());
      comboCustomTypes.setInput(allCustomTypeNames);
      comboCustomTypes.setSelection(oldSelection);
    }
  }
);
  comboBuildInTypes.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      if (section != null && getSelectedBaseTypeName().length() > 0) {
        section.autoCommit();
      }
    }
  }
);
  comboBuildInTypes.getCombo().addMouseListener(new MouseAdapter(){
    public void mouseDown(    MouseEvent e){
      ISelection oldSelection=comboBuildInTypes.getSelection();
      comboBuildInTypes.setInput(Util.getAllBuildInTypes(xsdSimpleType.getSchema()));
      comboBuildInTypes.setSelection(oldSelection);
    }
  }
);
}

Fixed version (ground truth):
private void initUIListenerForBaseTypeCombos(){
  customChangedListener=new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      if (section != null && getSelectedBaseTypeName().length() > 0) {
        section.autoCommit();
      }
    }
  }
;
  comboCustomTypes.getCombo().addMouseListener(new MouseAdapter(){
    @Override public void mouseDown(    MouseEvent e){
      ISelection oldSelection=comboCustomTypes.getSelection();
      List<String> allCustomTypeNames=Util.getAllCustomTypeNames(xsdSimpleType.getSchema());
      allCustomTypeNames.remove(xsdSimpleType.getName());
      comboCustomTypes.setInput(allCustomTypeNames);
      comboCustomTypes.setSelection(oldSelection);
    }
  }
);
  buildInChangedListener=new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      if (section != null && getSelectedBaseTypeName().length() > 0) {
        section.autoCommit();
      }
    }
  }
;
  comboBuildInTypes.getCombo().addMouseListener(new MouseAdapter(){
    public void mouseDown(    MouseEvent e){
      ISelection oldSelection=comboBuildInTypes.getSelection();
      comboBuildInTypes.setInput(Util.getAllBuildInTypes(xsdSimpleType.getSchema()));
      comboBuildInTypes.setSelection(oldSelection);
    }
  }
);
}
Program: 148178
Project: 148178
Buggy source:
private void initUIContentForComboBuildInTypes(){
  comboBuildInTypes.setInput(Util.getAllBuildInTypes(xsdSimpleType.getSchema()));
  comboBuildInTypes.setSelection(new StructuredSelection(xsdSimpleType.getBaseType()));
  radBuildInTypes.setSelection(!comboBuildInTypes.getSelection().isEmpty());
}

Fixed version (ground truth):
private void initUIContentForComboBuildInTypes(){
  comboBuildInTypes.removeSelectionChangedListener(buildInChangedListener);
  comboBuildInTypes.setInput(Util.getAllBuildInTypes(xsdSimpleType.getSchema()));
  comboBuildInTypes.setSelection(new StructuredSelection(xsdSimpleType.getBaseType()));
  radBuildInTypes.setSelection(!comboBuildInTypes.getSelection().isEmpty());
  comboBuildInTypes.addSelectionChangedListener(buildInChangedListener);
}
Program: 148179
Project: 148179
Buggy source:
private void refreshRoleView(String browseItem){
  if (complexTableViewer != null) {
    List<Line> roles=browseItemToRoles.get(browseItem);
    complexTableViewer.getViewer().setInput(roles);
    complexTableViewer.getViewer().refresh();
  }
}

Fixed version (ground truth):
private void refreshRoleView(List selectObjs){
  isCommitMultiChanges=true;
  selectedMultiViews=selectObjs;
  multiChanges.clear();
  complexTableViewer.getViewer().setInput(multiChanges);
  complexTableViewer.getViewer().refresh();
}
Program: 148180
Project: 148180
Buggy source:
public void selectionChanged(SelectionChangedEvent event){
  XSDElementDeclaration decl=(XSDElementDeclaration)((IStructuredSelection)event.getSelection()).getFirstElement();
  refreshRoleView(BROWSE_ITEMS + decl.getName());
  UpdateComplexViewButton(true);
}

Fixed version (ground truth):
public void selectionChanged(SelectionChangedEvent event){
  applyChangeToRoles();
  IStructuredSelection selection=(IStructuredSelection)event.getSelection();
  if (selection.size() > 1) {
    List selectObjs=selection.toList();
    refreshRoleView(selectObjs);
    UpdateComplexViewButton(true);
  }
 else   if (selection.size() == 1) {
    XSDElementDeclaration decl=(XSDElementDeclaration)selection.getFirstElement();
    refreshRoleView(BROWSE_ITEMS + decl.getName());
    UpdateComplexViewButton(true);
  }
}
Program: 148181
Project: 148181
Buggy source:
public void addPages(){
  addPage(new ConfigureRolePage());
}

Fixed version (ground truth):
public void addPages(){
  configureRolePage=new ConfigureRolePage();
  addPage(configureRolePage);
}
Program: 148182
Project: 148182
Buggy source:
public boolean performFinish(){
  if (saveConfiguration()) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean performFinish(){
  configureRolePage.applyChangeToRoles();
  if (saveConfiguration()) {
    return true;
  }
  return false;
}
Program: 148185
Project: 148185
Buggy source:
@SuppressWarnings("String_Node_Str") public Object[] getElements(Object inputElement){
  ArrayList<Line> lines=(ArrayList<Line>)inputElement;
  return lines.toArray(new Line[lines.size()]);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public Object[] getElements(Object inputElement){
  List<Line> lines=(List<Line>)inputElement;
  return lines.toArray(new Line[lines.size()]);
}
Program: 148187
Project: 148187
Buggy source:
public void refresh(){
  for (  TreeObject obj : checkItems) {
    if (obj instanceof TreeParent)     repositoryNodes.addAll(Util.getChildrenObj((TreeParent)obj));
 else     repositoryNodes.add(obj);
  }
  ((CheckboxTreeViewer)viewer).setCheckedElements(repositoryNodes.toArray());
}

Fixed version (ground truth):
public void refresh(){
  for (  TreeObject obj : checkItems) {
    if (obj instanceof TreeParent) {
      repositoryNodes.addAll(Util.getChildrenObj((TreeParent)obj));
      setOptimizedCheckNodes((TreeParent)obj);
    }
 else     repositoryNodes.add(obj);
  }
}
Program: 148188
Project: 148188
Buggy source:
public ServerLogoutAction(ServerView view,boolean remove){
  this.view=view;
  this.remove=remove;
  if (remove) {
    setText("String_Node_Str");
    setToolTipText("String_Node_Str" + IConstants.TALEND + "String_Node_Str");
  }
 else {
    setText("String_Node_Str");
    setToolTipText("String_Node_Str" + IConstants.TALEND + "String_Node_Str");
  }
  setImageDescriptor(ImageCache.getImage(EImage.LOGOUT.getPath()));
}

Fixed version (ground truth):
public ServerLogoutAction(ServerView view){
  this(view,true);
  needConfirm=false;
}
Program: 148189
Project: 148189
Buggy source:
private void initDefaultValues(){
  MDMServerDef defaultMDMServerDef=new MDMServerDef();
  nameText.setText(defaultMDMServerDef.getName());
  urlText.setText(defaultMDMServerDef.getUrl());
  userText.setText(defaultMDMServerDef.getUser());
  passwordText.setText(defaultMDMServerDef.getPasswd());
  if (Util.IsEnterPrise()) {
    universeCombo.setText(defaultMDMServerDef.getUniverse());
    FocusListener listener=new FocusListener(){
      public void focusGained(      FocusEvent e){
      }
      public void focusLost(      FocusEvent e){
        updateUniverseValues();
      }
    }
;
    urlText.addFocusListener(listener);
    userText.addFocusListener(listener);
    passwordText.addFocusListener(listener);
  }
}

Fixed version (ground truth):
private void initDefaultValues(){
  MDMServerDef defaultMDMServerDef=new MDMServerDef();
  if (isUpdateServerLocation()) {
    defaultMDMServerDef=selectedServerDef;
  }
  nameText.setText(defaultMDMServerDef.getName());
  urlText.setText(defaultMDMServerDef.getUrl());
  userText.setText(defaultMDMServerDef.getUser());
  passwordText.setText(defaultMDMServerDef.getPasswd());
  if (Util.IsEnterPrise()) {
    universeCombo.setText(defaultMDMServerDef.getUniverse());
    FocusListener listener=new FocusListener(){
      public void focusGained(      FocusEvent e){
      }
      public void focusLost(      FocusEvent e){
        updateUniverseValues();
      }
    }
;
    urlText.addFocusListener(listener);
    userText.addFocusListener(listener);
    passwordText.addFocusListener(listener);
  }
}
Program: 148190
Project: 148190
Buggy source:
@Override protected void okPressed(){
  String name=getName();
  if (name.length() == 0) {
    MessageDialog.openError(null,"String_Node_Str","String_Node_Str");
    nameText.setFocus();
    isOK=false;
    return;
  }
  if (MDMServerHelper.getServer(name) != null) {
    MessageDialog.openError(null,"String_Node_Str","String_Node_Str");
    isOK=false;
    return;
  }
  if (getServer().length() == 0) {
    MessageDialog.openError(null,"String_Node_Str","String_Node_Str");
    urlText.setFocus();
    isOK=false;
    return;
  }
  if (getUsernameText().length() == 0) {
    MessageDialog.openError(null,"String_Node_Str","String_Node_Str");
    userText.setFocus();
    isOK=false;
    return;
  }
  if (getPasswordText().length() == 0) {
    MessageDialog.openError(null,"String_Node_Str","String_Node_Str");
    passwordText.setFocus();
    isOK=false;
    return;
  }
  isOK=true;
  setReturnCode(OK);
}

Fixed version (ground truth):
@Override protected void okPressed(){
  String name=getName();
  if (name.length() == 0) {
    MessageDialog.openError(null,"String_Node_Str","String_Node_Str");
    nameText.setFocus();
    isOK=false;
    return;
  }
  MDMServerDef server=MDMServerHelper.getServer(name);
  if (server != null) {
    if ((!isUpdateServerLocation()) || (isUpdateServerLocation() && (!server.getName().equalsIgnoreCase(selectedServerDef.getName())))) {
      MessageDialog.openError(null,"String_Node_Str","String_Node_Str");
      isOK=false;
      return;
    }
  }
  if (getServer().length() == 0) {
    MessageDialog.openError(null,"String_Node_Str","String_Node_Str");
    urlText.setFocus();
    isOK=false;
    return;
  }
  if (getUsernameText().length() == 0) {
    MessageDialog.openError(null,"String_Node_Str","String_Node_Str");
    userText.setFocus();
    isOK=false;
    return;
  }
  if (getPasswordText().length() == 0) {
    MessageDialog.openError(null,"String_Node_Str","String_Node_Str");
    passwordText.setFocus();
    isOK=false;
    return;
  }
  isOK=true;
  setReturnCode(OK);
}
Program: 148191
Project: 148191
Buggy source:
/** 
 * @param parentShell
 */
public LoginDialog(SelectionListener caller,Shell parentShell,String title){
  super(parentShell);
  this.caller=caller;
  this.title=title;
  setDefaultImage(ImageCache.getCreatedImage(EImage.TALEND_PICTO.getPath()));
}

Fixed version (ground truth):
public LoginDialog(SelectionListener caller,Shell parentShell,String title,MDMServerDef serverDef){
  this(caller,parentShell,title);
  this.selectedServerDef=serverDef;
}
Program: 148192
Project: 148192
Buggy source:
private void makeActions(){
  loginAction=new ServerLoginAction(this);
  logoutAction=new ServerLogoutAction(this,false);
  logoutAndRemoveAction=new ServerLogoutAction(this,true);
  editXObjectAction=new EditXObjectAction(this);
  newXObjectAction=new NewXObjectAction(this);
  renameXObjectAction=new RenameXObjectAction(this);
  browseRevisionAction=new BrowseRevisionAction(this);
  deleteXObjectAction=new DeleteXObjectAction(this);
  serverRefreshAction=new ServerRefreshAction(this);
  serverRefreshCacheAction=new ServerRefreshCacheAction(this);
  refreshAllServerAction=new RefreshAllServerAction(this);
  browseViewAction=new BrowseViewAction(this);
  copyAction=new CopyXObjectAction(this);
  pasteAction=new PasteXObjectAction(this);
  duplicateAction=new DuplicateXObjectAction(this);
  exportAction=new ExportItemsAction(this);
  importAction=new ImportItemsAction(this);
  newCategoryAction=new NewCategoryAction(this);
}

Fixed version (ground truth):
private void makeActions(){
  loginAction=new ServerLoginAction(this);
  logoutAction=new ServerLogoutAction(this,false);
  logoutAndRemoveAction=new ServerLogoutAction(this,true);
  editServerAction=new ServerEditAction(this);
  editXObjectAction=new EditXObjectAction(this);
  newXObjectAction=new NewXObjectAction(this);
  renameXObjectAction=new RenameXObjectAction(this);
  browseRevisionAction=new BrowseRevisionAction(this);
  deleteXObjectAction=new DeleteXObjectAction(this);
  serverRefreshAction=new ServerRefreshAction(this);
  serverRefreshCacheAction=new ServerRefreshCacheAction(this);
  refreshAllServerAction=new RefreshAllServerAction(this);
  browseViewAction=new BrowseViewAction(this);
  copyAction=new CopyXObjectAction(this);
  pasteAction=new PasteXObjectAction(this);
  duplicateAction=new DuplicateXObjectAction(this);
  exportAction=new ExportItemsAction(this);
  importAction=new ImportItemsAction(this);
  newCategoryAction=new NewCategoryAction(this);
}
Program: 148195
Project: 148195
Buggy source:
private void refreshModelPageSchema(){
  String content=null;
  try {
    content=Util.nodeToString(xsdSchema.getDocument());
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  XSDSchema schema=null;
  try {
    schema=Util.createXsdSchema(content,xobject);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  setXsdSchema(schema);
  getTypeContentProvider().setXsdSchema(schema);
  getSchemaContentProvider().setXsdSchema(schema);
  refresh();
}

Fixed version (ground truth):
private void refreshModelPageSchema(){
  String content=null;
  try {
    content=Util.nodeToString(xsdSchema.getDocument());
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  XSDSchema schema=null;
  try {
    schema=Util.createXsdSchema(content,xobject);
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  setXsdSchema(schema);
  getTypeContentProvider().setXsdSchema(schema);
  getSchemaContentProvider().setXsdSchema(schema);
  refresh();
}
Program: 148198
Project: 148198
Buggy source:
public static List<TreeObject> getChildrenObj(TreeParent xObject){
  List<TreeObject> objs=new ArrayList<TreeObject>();
  if (xObject.getChildren() != null)   for (  TreeObject obj : xObject.getChildren()) {
    if (obj instanceof TreeParent) {
      TreeParent parent=(TreeParent)obj;
      if (parent != null)       objs.addAll(getChildrenObj(parent));
    }
 else {
      if (obj.isXObject())       objs.add(obj);
    }
  }
  return objs;
}

Fixed version (ground truth):
public static List<TreeObject> getChildrenObj(TreeParent xObject){
  List<TreeObject> objs=new ArrayList<TreeObject>();
  if (xObject.getChildren() != null)   for (  TreeObject obj : xObject.getChildren()) {
    if (obj instanceof TreeParent) {
      TreeParent parent=(TreeParent)obj;
      if (parent != null) {
        if (obj.getType() == TreeObject.CATEGORY_FOLDER) {
          if (obj.getParent().getType() == TreeObject.DATA_CLUSTER) {
            for (            TreeObject chld : ((TreeParent)obj).getChildren()) {
              if (chld.getName().equals(XSystemObjects.DC_PROVISIONING.getName()))               objs.add(chld);
              if (chld.getName().equals(XSystemObjects.DC_CONF.getName()))               objs.add(chld);
            }
            continue;
          }
 else {
            continue;
          }
        }
        if (obj.getType() == TreeObject.RESOURCES) {
          for (          TreeObject child : ((TreeParent)obj).getChildren()) {
            if (child.getType() == TreeObject.PICTURES_RESOURCE) {
              objs.add(child);
            }
          }
          continue;
        }
        objs.addAll(getChildrenObj(parent));
      }
    }
 else {
      if (obj.isXObject())       objs.add(obj);
    }
  }
  return objs;
}
Program: 148199
Project: 148199
Buggy source:
private static IStatus doChangeElementTypeToSequence(XSDComplexTypeDefinition compx,int maxOccurs){
  XSDParticleImpl partCnt=(XSDParticleImpl)compx.getContent();
  XSDModelGroupImpl mdlGrp=(XSDModelGroupImpl)partCnt.getTerm();
  if ((maxOccurs > 1 || maxOccurs == -1) && mdlGrp.getCompositor() != XSDCompositor.SEQUENCE_LITERAL) {
    if (!MessageDialog.openConfirm(null,"String_Node_Str","String_Node_Str")) {
      return Status.CANCEL_STATUS;
    }
    mdlGrp.setCompositor(XSDCompositor.SEQUENCE_LITERAL);
    compx.updateElement();
  }
  return Status.OK_STATUS;
}

Fixed version (ground truth):
private static IStatus doChangeElementTypeToSequence(XSDComplexTypeDefinition compx,int maxOccurs){
  XSDParticleImpl partCnt=(XSDParticleImpl)compx.getContent();
  XSDModelGroupImpl mdlGrp=(XSDModelGroupImpl)partCnt.getTerm();
  if ((maxOccurs > 1 || maxOccurs == -1) && mdlGrp.getCompositor() != XSDCompositor.SEQUENCE_LITERAL) {
    if (!MessageDialog.openConfirm(null,"String_Node_Str","String_Node_Str")) {
      return Status.CANCEL_STATUS;
    }
    mdlGrp.setCompositor(XSDCompositor.SEQUENCE_LITERAL);
    String ss=null;
    try {
      ss=Util.nodeToString(partCnt.getElement());
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    compx.updateElement();
  }
  return Status.OK_STATUS;
}
Program: 148200
Project: 148200
Buggy source:
public RepositoryCheckTreeViewer(IStructuredSelection selection,boolean isImport){
  this.isImport=isImport;
  this.selection=selection;
  serverRoot=((TreeObject)selection.getFirstElement()).getServerRoot();
  checkItems=selection.toList();
}

Fixed version (ground truth):
public RepositoryCheckTreeViewer(IStructuredSelection selection){
  this.selection=selection;
  serverRoot=((TreeObject)selection.getFirstElement()).getServerRoot();
  checkItems=selection.toList();
}
Program: 148201
Project: 148201
Buggy source:
public void refresh(){
  TreeObject selectedObject=null;
  boolean isRoot=false;
  if (selection.getFirstElement() instanceof TreeObject) {
    selectedObject=(TreeObject)selection.getFirstElement();
  }
  if (selectedObject.getType() == TreeObject._SERVER_) {
    isRoot=true;
  }
  for (  TreeObject obj : checkItems) {
    if (obj instanceof TreeParent) {
      if (!isImport && isRoot) {
        setOptimizedCheckNodes((TreeParent)obj);
      }
 else {
        repositoryNodes.addAll(Util.getChildrenObj((TreeParent)obj));
      }
    }
 else {
      repositoryNodes.add(obj);
    }
  }
  if (isImport || !isRoot)   ((CheckboxTreeViewer)viewer).setCheckedElements(repositoryNodes.toArray());
}

Fixed version (ground truth):
public void refresh(){
  for (  TreeObject obj : checkItems) {
    if (obj instanceof TreeParent) {
      repositoryNodes.addAll(Util.getChildrenObj((TreeParent)obj));
    }
 else {
      repositoryNodes.add(obj);
    }
  }
  ((CheckboxTreeViewer)viewer).setCheckedElements(repositoryNodes.toArray());
}
Program: 148204
Project: 148204
Buggy source:
public RepositoryCheckTreeViewer(IStructuredSelection selection){
  this.selection=selection;
  serverRoot=((TreeObject)selection.getFirstElement()).getServerRoot();
  checkItems=selection.toList();
}

Fixed version (ground truth):
public RepositoryCheckTreeViewer(IStructuredSelection selection,boolean isImport){
  this.isImport=isImport;
  this.selection=selection;
  serverRoot=((TreeObject)selection.getFirstElement()).getServerRoot();
  checkItems=selection.toList();
}
Program: 148205
Project: 148205
Buggy source:
public void refresh(){
  for (  TreeObject obj : checkItems) {
    if (obj instanceof TreeParent) {
      setOptimizedCheckNodes((TreeParent)obj);
    }
 else     repositoryNodes.add(obj);
  }
}

Fixed version (ground truth):
public void refresh(){
  TreeObject selectedObject=null;
  boolean isRoot=false;
  if (selection.getFirstElement() instanceof TreeObject) {
    selectedObject=(TreeObject)selection.getFirstElement();
  }
  if (selectedObject.getType() == TreeObject._SERVER_) {
    isRoot=true;
  }
  for (  TreeObject obj : checkItems) {
    if (obj instanceof TreeParent) {
      if (!isImport && isRoot) {
        setOptimizedCheckNodes((TreeParent)obj);
      }
 else {
        repositoryNodes.addAll(Util.getChildrenObj((TreeParent)obj));
      }
    }
 else {
      repositoryNodes.add(obj);
    }
  }
  if (isImport || !isRoot)   ((CheckboxTreeViewer)viewer).setCheckedElements(repositoryNodes.toArray());
}
Program: 148207
Project: 148207
Buggy source:
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();
}

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",d.isTriggerProcess());
      Util.getPort(getXObject()).putItemWithReport(item);
    }
 catch (    Exception e) {
      MessageDialog.openError(shell,"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
      return;
    }
  }
  d.close();
}
Program: 148208
Project: 148208
Buggy source:
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;
}

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,java.lang.Boolean invokeBeforeSaving,java.lang.Boolean pushToUpdateReport){
  this.wsItemPK=wsItemPK;
  this.source=source;
  this.operateType=operateType;
  this.updatePath=updatePath;
  this.user=user;
  this.invokeBeforeSaving=invokeBeforeSaving;
  this.pushToUpdateReport=pushToUpdateReport;
}
Program: 148209
Project: 148209
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.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);
}

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);
  ns3_myns3__boolean__java_lang_Boolean_Boolean_Serializer.serialize(instance.getInvokeBeforeSaving(),ns1_invokeBeforeSaving_QNAME,null,writer,context);
  ns3_myns3__boolean__java_lang_Boolean_Boolean_Serializer.serialize(instance.getPushToUpdateReport(),ns1_pushToUpdateReport_QNAME,null,writer,context);
}
Program: 148210
Project: 148210
Buggy source:
public void initialize(InternalTypeMappingRegistry registry) throws Exception {
  ns2_myWSItemPK_LiteralSerializer=(CombinedSerializer)registry.getSerializer("String_Node_Str",com.amalto.workbench.webservices.WSItemPK.class,ns2_WSItemPK_TYPE_QNAME);
  ns3_myns3_string__java_lang_String_String_Serializer=(CombinedSerializer)registry.getSerializer("String_Node_Str",java.lang.String.class,ns3_string_TYPE_QNAME);
}

Fixed version (ground truth):
public void initialize(InternalTypeMappingRegistry registry) throws Exception {
  ns2_myWSItemPK_LiteralSerializer=(CombinedSerializer)registry.getSerializer("String_Node_Str",com.amalto.workbench.webservices.WSItemPK.class,ns2_WSItemPK_TYPE_QNAME);
  ns3_myns3_string__java_lang_String_String_Serializer=(CombinedSerializer)registry.getSerializer("String_Node_Str",java.lang.String.class,ns3_string_TYPE_QNAME);
  ns3_myns3__boolean__java_lang_Boolean_Boolean_Serializer=(CombinedSerializer)registry.getSerializer("String_Node_Str",java.lang.Boolean.class,ns3_boolean_TYPE_QNAME);
}
Program: 148212
Project: 148212
Buggy source:
@Override public boolean equals(Object obj){
  if (obj instanceof TreeObject) {
    TreeObject o=(TreeObject)obj;
    return o.getDisplayName().equals(getDisplayName()) && getType() == o.getType();
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (obj instanceof TreeObject) {
    TreeObject o=(TreeObject)obj;
    if (o.getParent() == null)     return o.getDisplayName().equals(getDisplayName()) && getType() == o.getType();
 else {
      if (o.getDisplayName().equals(getDisplayName()) && getType() == o.getType()) {
        if (o.getParent() != null && getParent() != null) {
          if (o.getParent().getDisplayName().equals(getParent().getDisplayName())) {
            return true;
          }
        }
      }
    }
  }
  return false;
}
Program: 148214
Project: 148214
Buggy source:
public void refresh(){
  for (  TreeObject obj : checkItems) {
    if (obj instanceof TreeParent) {
      repositoryNodes.addAll(Util.getChildrenObj((TreeParent)obj));
      setOptimizedCheckNodes((TreeParent)obj);
    }
 else     repositoryNodes.add(obj);
  }
}

Fixed version (ground truth):
public void refresh(){
  for (  TreeObject obj : checkItems) {
    if (obj instanceof TreeParent) {
      setOptimizedCheckNodes((TreeParent)obj);
    }
 else     repositoryNodes.add(obj);
  }
}
Program: 148216
Project: 148216
Buggy source:
public ImportItemsWizard(IStructuredSelection sel,ServerView view){
  this.sel=sel;
  this.view=view;
  serverRoot=((TreeObject)sel.getFirstElement()).getServerRoot();
  try {
    port=Util.getPort((TreeObject)sel.getFirstElement());
  }
 catch (  XtentisException e3) {
    log.error(e3.getMessage(),e3);
  }
}

Fixed version (ground truth):
public ImportItemsWizard(IStructuredSelection sel,ServerView view){
  setNeedsProgressMonitor(true);
  this.sel=sel;
  this.view=view;
  serverRoot=((TreeObject)sel.getFirstElement()).getServerRoot();
  try {
    port=Util.getPort((TreeObject)sel.getFirstElement());
  }
 catch (  XtentisException e3) {
    log.error(e3.getMessage(),e3);
  }
}
Program: 148218
Project: 148218
Buggy source:
@Override public boolean performFinish(){
  closeOpenEditors();
  if (zipBtn.getSelection()) {
    zipfile=zip.getText().getText();
    try {
      ZipToFile.unZipFile(zipfile,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 (zipfile != 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();
  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;
}
Program: 148219
Project: 148219
Buggy source:
@Override public void run(){
  ISelection selection=view.getViewer().getSelection();
  TreeObject xobject=(TreeObject)((IStructuredSelection)selection).getFirstElement();
  this.page=view.getSite().getWorkbenchWindow().getActivePage();
  try {
    IEditorInput input=new XObjectEditorInput(xobject,xobject.getDisplayName());
    if (xobject.getType() == TreeObject.DATA_MODEL) {
      IFile pathToTempFile=XSDEditorUtil.createFile(xobject);
      input=new XSDEditorInput(pathToTempFile);
    }
    IEditorPart part=page.findEditor(input);
    page.closeEditor(part,true);
    if (TreeObjectUtil.renameTreeOjects(xobject,view))     TreeObjectUtil.deleteTreeObject(xobject,view);
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
}

Fixed version (ground truth):
@Override public void run(){
  ISelection selection=view.getViewer().getSelection();
  TreeObject xobject=(TreeObject)((IStructuredSelection)selection).getFirstElement();
  this.page=view.getSite().getWorkbenchWindow().getActivePage();
  try {
    IEditorInput input=new XObjectEditorInput(xobject,xobject.getDisplayName());
    IEditorPart part=null;
    if (xobject.getType() == TreeObject.DATA_MODEL) {
      IFile pathToTempFile=XSDEditorUtil.createFile(xobject);
      if (pathToTempFile != null)       input=new XSDEditorInput(pathToTempFile);
    }
    part=page.findEditor(input);
    page.closeEditor(part,true);
    if (TreeObjectUtil.renameTreeOjects(xobject,view))     TreeObjectUtil.deleteTreeObject(xobject,view);
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
}
Program: 148220
Project: 148220
Buggy source:
public static IFile createFile(TreeObject xobject) throws Exception {
  WSDataModel wsDataModel=(WSDataModel)xobject.getWsObject();
  String filename=xobject.getDisplayName().replace("String_Node_Str","String_Node_Str") + "String_Node_Str";
  String content=wsDataModel.getXsdSchema();
  IProject project=createProject(xobject);
  String path=getXObjectPath(xobject);
  int pos=path.indexOf('/');
  String folder=path.substring(0,pos);
  IFolder fold=project.getFolder(folder);
  if (!fold.exists()) {
    fold.create(true,true,null);
  }
  IFile file=fold.getFile(filename);
  if (!file.exists())   file.create(new ByteArrayInputStream(content.getBytes("String_Node_Str")),IFile.FORCE,null);
 else   sycFileContents(file,content);
  return file;
}

Fixed version (ground truth):
public static IFile createFile(TreeObject xobject) throws Exception {
  WSDataModel wsDataModel=(WSDataModel)xobject.getWsObject();
  if (wsDataModel == null)   return null;
  String filename=xobject.getDisplayName().replace("String_Node_Str","String_Node_Str") + "String_Node_Str";
  String content=wsDataModel.getXsdSchema();
  IProject project=createProject(xobject);
  String path=getXObjectPath(xobject);
  int pos=path.indexOf('/');
  String folder=path.substring(0,pos);
  IFolder fold=project.getFolder(folder);
  if (!fold.exists()) {
    fold.create(true,true,null);
  }
  IFile file=fold.getFile(filename);
  if (!file.exists())   file.create(new ByteArrayInputStream(content.getBytes("String_Node_Str")),IFile.FORCE,null);
 else   sycFileContents(file,content);
  return file;
}
Program: 148221
Project: 148221
Buggy source:
@Override protected void createControlsInSection(Composite compSectionClient){
  dataModelHolder=new FixDMNameBasePropertySectionDataModelExtractor(this);
  compSimpleXPath=new SimpleXPathComposite(compSectionClient,SWT.NONE,SimpleXPathComposite.DEFAULTTITLE,dataModelHolder,dataModelHolder.getDefaultDataModel(),null);
}

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(),this);
}
Program: 148222
Project: 148222
Buggy source:
public SimpleXPathComposite(Composite parent,int style,String title,IAllDataModelHolder allDataModelHolder,String defaultDataModelForSelect,BasePropertySection section){
  super(parent,style);
  this.section=section;
  this.defaultDataModelForSelect=defaultDataModelForSelect;
  this.allDataModelHolder=allDataModelHolder;
  final GridLayout gridLayout=new GridLayout();
  gridLayout.marginWidth=0;
  gridLayout.marginHeight=0;
  gridLayout.horizontalSpacing=0;
  setLayout(gridLayout);
  if (title != null && !"String_Node_Str".trim().equals(title)) {
    lblTitle=new Label(this,SWT.NONE);
    final GridData gd_lblTitle=new GridData(SWT.FILL,SWT.CENTER,true,false);
    lblTitle.setLayoutData(gd_lblTitle);
    lblTitle.setText(title);
  }
  final Composite composite=new Composite(this,SWT.NONE);
  composite.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
  final GridLayout gridLayout_1=new GridLayout();
  gridLayout_1.marginWidth=0;
  gridLayout_1.marginHeight=0;
  gridLayout_1.numColumns=2;
  composite.setLayout(gridLayout_1);
  txtXPath=new Text(composite,SWT.BORDER);
  final GridData gd_txtXPath=new GridData(SWT.FILL,SWT.CENTER,true,false);
  txtXPath.setLayoutData(gd_txtXPath);
  btnSelectXPath=new Button(composite,SWT.NONE);
  btnSelectXPath.setImage(ImageCache.getCreatedImage(EImage.DOTS_BUTTON.getPath()));
  btnSelectXPath.setToolTipText("String_Node_Str");
  initUIListeners();
}

Fixed version (ground truth):
public SimpleXPathComposite(Composite parent,int style,String title,IAllDataModelHolder allDataModelHolder,String defaultDataModelForSelect,final BasePropertySection section){
  super(parent,style);
  this.section=section;
  this.defaultDataModelForSelect=defaultDataModelForSelect;
  this.allDataModelHolder=allDataModelHolder;
  final GridLayout gridLayout=new GridLayout();
  gridLayout.marginWidth=0;
  gridLayout.marginHeight=0;
  gridLayout.horizontalSpacing=0;
  setLayout(gridLayout);
  if (title != null && !"String_Node_Str".trim().equals(title)) {
    lblTitle=new Label(this,SWT.NONE);
    final GridData gd_lblTitle=new GridData(SWT.FILL,SWT.CENTER,true,false);
    lblTitle.setLayoutData(gd_lblTitle);
    lblTitle.setText(title);
  }
  final Composite composite=new Composite(this,SWT.NONE);
  composite.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
  final GridLayout gridLayout_1=new GridLayout();
  gridLayout_1.marginWidth=0;
  gridLayout_1.marginHeight=0;
  gridLayout_1.numColumns=2;
  composite.setLayout(gridLayout_1);
  txtXPath=new Text(composite,SWT.BORDER);
  final GridData gd_txtXPath=new GridData(SWT.FILL,SWT.CENTER,true,false);
  txtXPath.setLayoutData(gd_txtXPath);
  txtXPath.addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent e){
      if (e.character == '\r') {
        if (section != null) {
          section.autoCommit();
        }
      }
    }
    public void keyReleased(    KeyEvent e){
    }
  }
);
  btnSelectXPath=new Button(composite,SWT.NONE);
  btnSelectXPath.setImage(ImageCache.getCreatedImage(EImage.DOTS_BUTTON.getPath()));
  btnSelectXPath.setToolTipText("String_Node_Str");
  initUIListeners();
}
Program: 148224
Project: 148224
Buggy source:
public void run(){
  treeViewer.setRoot(reserverRoot);
  treeViewer.getViewer().setInput(view.getSite());
  treeViewer.setCheckItems(Arrays.asList(exports.getItems()));
  GridData gd=(GridData)treeViewer.getViewer().getControl().getLayoutData();
  gd.heightHint=300;
  treeViewer.getViewer().getControl().getParent().layout(true);
  treeViewer.getViewer().getControl().getShell().layout(true);
}

Fixed version (ground truth):
public void run(){
  treeViewer.setRoot(reserverRoot);
  treeViewer.getViewer().setInput(view.getSite());
  treeViewer.setCheckItems(Arrays.asList(exports.getItems()));
  GridData gd=(GridData)treeViewer.getViewer().getControl().getLayoutData();
  gd.heightHint=300;
  treeViewer.getViewer().getControl().getParent().layout(true);
  treeViewer.getViewer().getControl().getShell().layout(true);
  try {
    LocalTreeObjectRepository.getInstance().setOriginalXobjectsToImport(treeViewer.getCheckNodes());
  }
 catch (  Exception e) {
  }
}
Program: 148228
Project: 148228
Buggy source:
public ValidationRuleDialog(Shell parentShell,String title,String pattern,DataModelMainPage page,String conceptName){
  super(parentShell);
  this.pattern=pattern;
  this.page=page;
  this.title=title;
  this.conceptName=conceptName;
}

Fixed version (ground truth):
public ValidationRuleDialog(Shell parentShell,String title,String pattern,DataModelMainPage page,String conceptName,XSDAnnotationsStructure struc){
  super(parentShell);
  this.pattern=pattern;
  this.page=page;
  this.title=title;
  this.conceptName=conceptName;
  this.struc=struc;
}