nus-yam/ex-repair huggingface dataset:
Program: 123713
Project: 123713
Buggy source:
/** 
 * load project settings to no-opened process
 * @param elemParam
 * @param projectPaType
 */
public static void loadElementParameters(ParametersType processType,ParametersType projectPaType,EParameterName paramName){
  EList listParamType=projectPaType.getElementParameter();
  for (int j=0; j < listParamType.size(); j++) {
    ElementParameterType pType=(ElementParameterType)listParamType.get(j);
    EList processParameters=processType.getElementParameter();
    ElementParameterType processParam=null;
    for (int i=0; i < processParameters.size(); i++) {
      ElementParameterType paramType=(ElementParameterType)processParameters.get(i);
      if (paramType.getName().equals(pType.getName()) && paramType.getField().equals(pType.getField())) {
        processParam=paramType;
      }
 else       if (pType.getName().contains("String_Node_Str")) {
        StringTokenizer token=new StringTokenizer(pType.getName(),"String_Node_Str");
        String parentId=token.nextToken();
        String childId=token.nextToken();
        String[] split=paramType.getName().split("String_Node_Str");
        if (split.length != 2) {
          continue;
        }
        String complexName=paramName + "String_Node_Str" + childId;
        if (complexName.equals(paramType.getName())) {
          processParam=paramType;
        }
      }
      if (processParam != null) {
        break;
      }
    }
    if (processParam != null) {
      processParam.setValue(pType.getValue());
    }
  }
}

Fixed version (ground truth):
/** 
 * load project settings to no-opened process
 * @param elemParam
 * @param projectPaType
 */
public static void loadElementParameters(ParametersType processType,ParametersType projectPaType,EParameterName paramName){
  EList listParamType=projectPaType.getElementParameter();
  for (int j=0; j < listParamType.size(); j++) {
    ElementParameterType pType=(ElementParameterType)listParamType.get(j);
    EList processParameters=processType.getElementParameter();
    ElementParameterType processParam=null;
    for (int i=0; i < processParameters.size(); i++) {
      ElementParameterType paramType=(ElementParameterType)processParameters.get(i);
      if (paramType.getName().equals(pType.getName()) && paramType.getField() != null && paramType.getField().equals(pType.getField())) {
        processParam=paramType;
      }
 else       if (pType.getName().contains("String_Node_Str")) {
        StringTokenizer token=new StringTokenizer(pType.getName(),"String_Node_Str");
        String parentId=token.nextToken();
        String childId=token.nextToken();
        String[] split=paramType.getName().split("String_Node_Str");
        if (split.length != 2) {
          continue;
        }
        String complexName=paramName + "String_Node_Str" + childId;
        if (complexName.equals(paramType.getName())) {
          processParam=paramType;
        }
      }
      if (processParam != null) {
        break;
      }
    }
    if (processParam != null) {
      processParam.setValue(pType.getValue());
    }
  }
}
Program: 123715
Project: 123715
Buggy source:
public void applyEditorValue(){
  String text=getControl().getText();
  onValueChanged(text,true,property);
}

Fixed version (ground truth):
public void applyEditorValue(){
  getControl().setBackground(getControl().getDisplay().getSystemColor(SWT.COLOR_WHITE));
  String text=getControl().getText();
  onValueChanged(text,validate,property);
  validate=false;
}
Program: 123716
Project: 123716
Buggy source:
public void editorValueChanged(boolean oldValidState,boolean newValidState){
  onValueChanged(getControl().getText(),false,property);
}

Fixed version (ground truth):
public void editorValueChanged(boolean oldValidState,boolean newValidState){
  validate=true;
}
Program: 123717
Project: 123717
Buggy source:
public void cancelEditor(){
}

Fixed version (ground truth):
public void cancelEditor(){
  getControl().setBackground(getControl().getDisplay().getSystemColor(SWT.COLOR_WHITE));
}
Program: 123719
Project: 123719
Buggy source:
@Override public ExecutionResult execute(Item item){
  try {
    boolean modified=updateStatus(item);
    if (modified) {
      return ExecutionResult.SUCCESS_NO_ALERT;
    }
 else {
      return ExecutionResult.NOTHING_TO_DO;
    }
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
    return ExecutionResult.FAILURE;
  }
}

Fixed version (ground truth):
@Override public ExecutionResult execute(Item item){
  if (ERepositoryObjectType.getItemType(item).isDQItemType() && !ERepositoryObjectType.getItemType(item).isDIItemType()) {
    return ExecutionResult.NOTHING_TO_DO;
  }
  try {
    boolean modified=updateStatus(item);
    if (modified) {
      return ExecutionResult.SUCCESS_NO_ALERT;
    }
 else {
      return ExecutionResult.NOTHING_TO_DO;
    }
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
    return ExecutionResult.FAILURE;
  }
}
Program: 123720
Project: 123720
Buggy source:
public void applyEditorValue(){
  String text=getControl().getText();
  onValueChanged(text,true,property);
}

Fixed version (ground truth):
public void applyEditorValue(){
  getControl().setBackground(getControl().getDisplay().getSystemColor(SWT.COLOR_WHITE));
  String text=getControl().getText();
  onValueChanged(text,validate,property);
  validate=false;
}
Program: 123721
Project: 123721
Buggy source:
public void editorValueChanged(boolean oldValidState,boolean newValidState){
  onValueChanged(getControl().getText(),false,property);
}

Fixed version (ground truth):
public void editorValueChanged(boolean oldValidState,boolean newValidState){
  validate=true;
}
Program: 123722
Project: 123722
Buggy source:
public void cancelEditor(){
}

Fixed version (ground truth):
public void cancelEditor(){
  getControl().setBackground(getControl().getDisplay().getSystemColor(SWT.COLOR_WHITE));
}
Program: 123728
Project: 123728
Buggy source:
/** 
 * DOC hcw Comment method "createItemList".
 * @param workArea
 */
private void createItemList(Composite workArea){
  Composite itemComposite=new Composite(workArea,SWT.NONE);
  GridLayoutFactory.swtDefaults().numColumns(2).applyTo(itemComposite);
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).hint(500,300).applyTo(itemComposite);
  Label label=new Label(itemComposite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  GridDataFactory.swtDefaults().span(2,1).applyTo(label);
  createTreeViewer(itemComposite);
  createSelectionButton(itemComposite);
  CheckboxTreeViewer exportItemsTreeViewer=getItemsTreeViewer();
  exportItemsTreeViewer.refresh();
  exportItemsTreeViewer.expandAll();
  exportItemsTreeViewer.collapseAll();
  exportItemsTreeViewer.expandToLevel(2);
  addTreeCheckedSelection();
  if (!selection.isEmpty()) {
    Set<RepositoryNode> newSelection=new HashSet<RepositoryNode>();
    for (    RepositoryNode currentNode : (List<RepositoryNode>)selection.toList()) {
      newSelection.add(currentNode);
    }
    repositoryNodes.addAll(newSelection);
    repositoryNodes.addAll(checkedNodes);
    Set<RepositoryNode> nodes=new HashSet<RepositoryNode>();
    for (    RepositoryNode node : repositoryNodes) {
      expandRoot(node);
      expandParent(exportItemsTreeViewer,node);
      checkElement(node,nodes);
    }
    exportItemsTreeViewer.setCheckedElements(nodes.toArray());
  }
}

Fixed version (ground truth):
/** 
 * DOC hcw Comment method "createItemList".
 * @param workArea
 */
private void createItemList(Composite workArea){
  Composite itemComposite=new Composite(workArea,SWT.NONE);
  GridLayoutFactory.swtDefaults().numColumns(2).applyTo(itemComposite);
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).hint(500,300).applyTo(itemComposite);
  Label label=new Label(itemComposite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  GridDataFactory.swtDefaults().span(2,1).applyTo(label);
  createTreeViewer(itemComposite);
  createSelectionButton(itemComposite);
  CheckboxTreeViewer exportItemsTreeViewer=getItemsTreeViewer();
  exportItemsTreeViewer.getTree().setRedraw(false);
  exportItemsTreeViewer.expandAll();
  exportItemsTreeViewer.collapseAll();
  exportItemsTreeViewer.expandToLevel(3);
  exportItemsTreeViewer.getTree().setRedraw(true);
  addTreeCheckedSelection();
  if (!selection.isEmpty()) {
    Set<RepositoryNode> newSelection=new HashSet<RepositoryNode>();
    for (    RepositoryNode currentNode : (List<RepositoryNode>)selection.toList()) {
      newSelection.add(currentNode);
    }
    repositoryNodes.addAll(newSelection);
    repositoryNodes.addAll(checkedNodes);
    Set<RepositoryNode> nodes=new HashSet<RepositoryNode>();
    for (    RepositoryNode node : repositoryNodes) {
      expandRoot(node);
      expandParent(exportItemsTreeViewer,node);
      checkElement(node,nodes);
    }
    exportItemsTreeViewer.setCheckedElements(nodes.toArray());
  }
}
Program: 123729
Project: 123729
Buggy source:
private void createTreeViewer(Composite itemComposite){
  filteredCheckboxTree=new FilteredCheckboxTree(itemComposite,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL| SWT.MULTI){
    @Override protected CheckboxTreeViewer doCreateTreeViewer(    Composite parent,    int style){
      RepositoryViewerProvider provider=new RepositoryViewerProvider(){
        @Override protected RepositoryNode getInputRoot(        RepositoryContentProvider contentProvider){
          return contentProvider.getRoot();
        }
      }
;
      return (CheckboxTreeViewer)provider.createViewer(parent);
    }
    @Override protected void refreshCompleted(){
      getViewer().expandToLevel(3);
      restoreCheckedElements();
    }
    @Override protected boolean isNodeCollectable(    TreeItem item){
      Object obj=item.getData();
      if (obj instanceof RepositoryNode) {
        RepositoryNode node=(RepositoryNode)obj;
        if (node.getObjectType() == ERepositoryObjectType.METADATA_CONNECTIONS) {
          return true;
        }
      }
      return false;
    }
  }
;
}

Fixed version (ground truth):
private void createTreeViewer(Composite itemComposite){
  filteredCheckboxTree=new FilteredCheckboxTree(itemComposite,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL| SWT.MULTI){
    @Override protected CheckboxTreeViewer doCreateTreeViewer(    Composite parent,    int style){
      RepositoryViewerProvider provider=new RepositoryViewerProvider(){
        @Override protected RepositoryNode getInputRoot(        RepositoryContentProvider contentProvider){
          return contentProvider.getRoot();
        }
      }
;
      return (CheckboxTreeViewer)provider.createViewer(parent);
    }
    @Override protected void refreshCompleted(){
      getViewer().expandToLevel(3);
      restoreCheckedElements();
    }
    @Override protected boolean isNodeCollectable(    TreeItem item){
      Object obj=item.getData();
      if (obj instanceof RepositoryNode) {
        RepositoryNode node=(RepositoryNode)obj;
        if (node.getObjectType() == ERepositoryObjectType.METADATA_CONNECTIONS) {
          return true;
        }
      }
      return false;
    }
  }
;
  filteredCheckboxTree.getViewer().addFilter(new ViewerFilter(){
    @Override public boolean select(    Viewer viewer,    Object parentElement,    Object element){
      return selectRepositoryNode(viewer,(RepositoryNode)parentElement,(RepositoryNode)element);
    }
  }
);
}
Program: 123735
Project: 123735
Buggy source:
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_FTP.equals(nodeType)) {
    setEnabled(false);
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(CREATE_LABEL);
this.setImageDescriptor(createImage);
collectChildNames(node);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
break;
default :
return;
}
setEnabled(true);
}

Fixed version (ground truth):
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_FTP.equals(nodeType)) {
    setEnabled(false);
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(CREATE_LABEL);
this.setImageDescriptor(createImage);
collectChildNames(node);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
break;
default :
return;
}
setEnabled(true);
}
Program: 123736
Project: 123736
Buggy source:
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_DELIMITED.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(CREATE_LABEL);
collectChildNames(node);
this.setImageDescriptor(createImage);
creation=true;
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}

Fixed version (ground truth):
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_DELIMITED.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(CREATE_LABEL);
collectChildNames(node);
this.setImageDescriptor(createImage);
creation=true;
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}
Program: 123737
Project: 123737
Buggy source:
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_EXCEL.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(CREATE_LABEL);
collectChildNames(node);
creation=true;
this.setImageDescriptor(createImage);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
}
setEnabled(true);
}

Fixed version (ground truth):
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_EXCEL.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(CREATE_LABEL);
collectChildNames(node);
creation=true;
this.setImageDescriptor(createImage);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
}
setEnabled(true);
}
Program: 123738
Project: 123738
Buggy source:
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_LDIF.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(CREATE_LABEL);
collectChildNames(node);
creation=true;
this.setImageDescriptor(createImage);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}

Fixed version (ground truth):
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_LDIF.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(CREATE_LABEL);
collectChildNames(node);
creation=true;
this.setImageDescriptor(createImage);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}
Program: 123739
Project: 123739
Buggy source:
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_POSITIONAL.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(CREATE_LABEL);
collectChildNames(node);
this.setImageDescriptor(createImage);
creation=true;
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
}
setEnabled(true);
}

Fixed version (ground truth):
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_POSITIONAL.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(CREATE_LABEL);
collectChildNames(node);
this.setImageDescriptor(createImage);
creation=true;
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
}
setEnabled(true);
}
Program: 123740
Project: 123740
Buggy source:
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_REGEXP.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(CREATE_LABEL);
collectChildNames(node);
creation=true;
this.setImageDescriptor(createImage);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
}
setEnabled(true);
}

Fixed version (ground truth):
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_REGEXP.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(CREATE_LABEL);
collectChildNames(node);
creation=true;
this.setImageDescriptor(createImage);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
}
setEnabled(true);
}
Program: 123741
Project: 123741
Buggy source:
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_XML.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(CREATE_LABEL);
collectChildNames(node);
creation=true;
this.setImageDescriptor(createImage);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
}
setEnabled(true);
}

Fixed version (ground truth):
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_XML.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(CREATE_LABEL);
collectChildNames(node);
creation=true;
this.setImageDescriptor(createImage);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
}
setEnabled(true);
}
Program: 123742
Project: 123742
Buggy source:
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!currentNodeType.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(createLabel);
collectChildNames(node);
this.setImageDescriptor(createImage);
creation=true;
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(editLabel);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(openLabel);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}

Fixed version (ground truth):
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!currentNodeType.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(createLabel);
collectChildNames(node);
this.setImageDescriptor(createImage);
creation=true;
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(editLabel);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(openLabel);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}
Program: 123743
Project: 123743
Buggy source:
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!currentNodeType.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(createLabel);
collectChildNames(node);
this.setImageDescriptor(createImage);
creation=true;
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(editLabel);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(openLabel);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}

Fixed version (ground truth):
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!currentNodeType.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(createLabel);
collectChildNames(node);
this.setImageDescriptor(createImage);
creation=true;
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(editLabel);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(openLabel);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}
Program: 123744
Project: 123744
Buggy source:
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_SALESFORCE_SCHEMA.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(CREATE_LABEL);
collectChildNames(node);
creation=true;
this.setImageDescriptor(createImage);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}

Fixed version (ground truth):
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_SALESFORCE_SCHEMA.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(CREATE_LABEL);
collectChildNames(node);
creation=true;
this.setImageDescriptor(createImage);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}
Program: 123745
Project: 123745
Buggy source:
@Override protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!currentNodeType.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(createLabel);
collectChildNames(node);
this.setImageDescriptor(createImage);
creation=true;
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(editLabel);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(openLabel);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}

Fixed version (ground truth):
@Override protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!currentNodeType.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(createLabel);
collectChildNames(node);
this.setImageDescriptor(createImage);
creation=true;
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(editLabel);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(openLabel);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}
Program: 123746
Project: 123746
Buggy source:
@Override protected void init(RepositoryNode node){
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (nodeType == null) {
    return;
  }
  if (nodeType != ERepositoryObjectType.METADATA_GENERIC_SCHEMA) {
    return;
  }
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    collectChildNames(node);
  setEnabled(true);
break;
default :
return;
}
}

Fixed version (ground truth):
@Override protected void init(RepositoryNode node){
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (nodeType == null) {
    return;
  }
  if (nodeType != ERepositoryObjectType.METADATA_GENERIC_SCHEMA) {
    return;
  }
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  collectChildNames(node);
setEnabled(true);
break;
default :
return;
}
}
Program: 123747
Project: 123747
Buggy source:
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_FTP.equals(nodeType)) {
    setEnabled(false);
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(CREATE_LABEL);
this.setImageDescriptor(createImage);
collectChildNames(node);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
break;
default :
return;
}
setEnabled(true);
}

Fixed version (ground truth):
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_FTP.equals(nodeType)) {
    setEnabled(false);
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(CREATE_LABEL);
this.setImageDescriptor(createImage);
collectChildNames(node);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
break;
default :
return;
}
setEnabled(true);
}
Program: 123751
Project: 123751
Buggy source:
/** 
 * DOC hcw Comment method "createItemList".
 * @param workArea
 */
private void createItemList(Composite workArea){
  Composite itemComposite=new Composite(workArea,SWT.NONE);
  GridLayoutFactory.swtDefaults().numColumns(2).applyTo(itemComposite);
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).hint(500,300).applyTo(itemComposite);
  Label label=new Label(itemComposite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  GridDataFactory.swtDefaults().span(2,1).applyTo(label);
  createTreeViewer(itemComposite);
  createSelectionButton(itemComposite);
  CheckboxTreeViewer exportItemsTreeViewer=getItemsTreeViewer();
  exportItemsTreeViewer.refresh();
  exportItemsTreeViewer.expandAll();
  exportItemsTreeViewer.collapseAll();
  exportItemsTreeViewer.expandToLevel(2);
  addTreeCheckedSelection();
  if (!selection.isEmpty()) {
    Set<RepositoryNode> newSelection=new HashSet<RepositoryNode>();
    for (    RepositoryNode currentNode : (List<RepositoryNode>)selection.toList()) {
      newSelection.add(currentNode);
    }
    repositoryNodes.addAll(newSelection);
    repositoryNodes.addAll(checkedNodes);
    Set<RepositoryNode> nodes=new HashSet<RepositoryNode>();
    for (    RepositoryNode node : repositoryNodes) {
      expandRoot(node);
      expandParent(exportItemsTreeViewer,node);
      checkElement(node,nodes);
    }
    exportItemsTreeViewer.setCheckedElements(nodes.toArray());
  }
}

Fixed version (ground truth):
/** 
 * DOC hcw Comment method "createItemList".
 * @param workArea
 */
private void createItemList(Composite workArea){
  Composite itemComposite=new Composite(workArea,SWT.NONE);
  GridLayoutFactory.swtDefaults().numColumns(2).applyTo(itemComposite);
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).hint(500,300).applyTo(itemComposite);
  Label label=new Label(itemComposite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  GridDataFactory.swtDefaults().span(2,1).applyTo(label);
  createTreeViewer(itemComposite);
  createSelectionButton(itemComposite);
  CheckboxTreeViewer exportItemsTreeViewer=getItemsTreeViewer();
  exportItemsTreeViewer.getTree().setRedraw(false);
  exportItemsTreeViewer.expandAll();
  exportItemsTreeViewer.collapseAll();
  exportItemsTreeViewer.expandToLevel(3);
  exportItemsTreeViewer.getTree().setRedraw(true);
  addTreeCheckedSelection();
  if (!selection.isEmpty()) {
    Set<RepositoryNode> newSelection=new HashSet<RepositoryNode>();
    for (    RepositoryNode currentNode : (List<RepositoryNode>)selection.toList()) {
      newSelection.add(currentNode);
    }
    repositoryNodes.addAll(newSelection);
    repositoryNodes.addAll(checkedNodes);
    Set<RepositoryNode> nodes=new HashSet<RepositoryNode>();
    for (    RepositoryNode node : repositoryNodes) {
      expandRoot(node);
      expandParent(exportItemsTreeViewer,node);
      checkElement(node,nodes);
    }
    exportItemsTreeViewer.setCheckedElements(nodes.toArray());
  }
}
Program: 123752
Project: 123752
Buggy source:
private void createTreeViewer(Composite itemComposite){
  filteredCheckboxTree=new FilteredCheckboxTree(itemComposite,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL| SWT.MULTI){
    @Override protected CheckboxTreeViewer doCreateTreeViewer(    Composite parent,    int style){
      RepositoryViewerProvider provider=new RepositoryViewerProvider(){
        @Override protected RepositoryNode getInputRoot(        RepositoryContentProvider contentProvider){
          return contentProvider.getRoot();
        }
      }
;
      return (CheckboxTreeViewer)provider.createViewer(parent);
    }
    @Override protected void refreshCompleted(){
      getViewer().expandToLevel(3);
      restoreCheckedElements();
    }
    @Override protected boolean isNodeCollectable(    TreeItem item){
      Object obj=item.getData();
      if (obj instanceof RepositoryNode) {
        RepositoryNode node=(RepositoryNode)obj;
        if (node.getObjectType() == ERepositoryObjectType.METADATA_CONNECTIONS) {
          return true;
        }
      }
      return false;
    }
  }
;
}

Fixed version (ground truth):
private void createTreeViewer(Composite itemComposite){
  filteredCheckboxTree=new FilteredCheckboxTree(itemComposite,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL| SWT.MULTI){
    @Override protected CheckboxTreeViewer doCreateTreeViewer(    Composite parent,    int style){
      RepositoryViewerProvider provider=new RepositoryViewerProvider(){
        @Override protected RepositoryNode getInputRoot(        RepositoryContentProvider contentProvider){
          return contentProvider.getRoot();
        }
      }
;
      return (CheckboxTreeViewer)provider.createViewer(parent);
    }
    @Override protected void refreshCompleted(){
      getViewer().expandToLevel(3);
      restoreCheckedElements();
    }
    @Override protected boolean isNodeCollectable(    TreeItem item){
      Object obj=item.getData();
      if (obj instanceof RepositoryNode) {
        RepositoryNode node=(RepositoryNode)obj;
        if (node.getObjectType() == ERepositoryObjectType.METADATA_CONNECTIONS) {
          return true;
        }
      }
      return false;
    }
  }
;
  filteredCheckboxTree.getViewer().addFilter(new ViewerFilter(){
    @Override public boolean select(    Viewer viewer,    Object parentElement,    Object element){
      return selectRepositoryNode(viewer,(RepositoryNode)parentElement,(RepositoryNode)element);
    }
  }
);
}
Program: 123753
Project: 123753
Buggy source:
public void focusGained(FocusEvent e){
  text.setText("String_Node_Str");
}

Fixed version (ground truth):
public void focusGained(FocusEvent e){
}
Program: 123754
Project: 123754
Buggy source:
/** 
 * yzhang Comment method "configListeners".
 * @param text
 */
private void configListeners(final Text text){
  text.addMouseListener(new MouseListener(){
    public void mouseDoubleClick(    MouseEvent e){
    }
    public void mouseDown(    MouseEvent e){
      if (text.getText().equals(SEARCH_COMPONENT)) {
        text.setText("String_Node_Str");
      }
    }
    public void mouseUp(    MouseEvent e){
    }
  }
);
  text.addFocusListener(new FocusListener(){
    public void focusGained(    FocusEvent e){
      text.setText("String_Node_Str");
    }
    public void focusLost(    FocusEvent e){
      if (text.getText() == "String_Node_Str") {
        text.setText(SEARCH_COMPONENT);
      }
    }
  }
);
  text.addSelectionListener(new SelectionAdapter(){
    public void widgetDefaultSelected(    SelectionEvent e){
      startFiltering(text);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * yzhang Comment method "configListeners".
 * @param text
 */
private void configListeners(final Text text){
  text.addMouseListener(new MouseListener(){
    public void mouseDoubleClick(    MouseEvent e){
    }
    public void mouseDown(    MouseEvent e){
      if (text.getText().equals(SEARCH_COMPONENT)) {
        text.setText("String_Node_Str");
      }
    }
    public void mouseUp(    MouseEvent e){
    }
  }
);
  text.addFocusListener(new FocusListener(){
    public void focusGained(    FocusEvent e){
    }
    public void focusLost(    FocusEvent e){
      if (text.getText() == "String_Node_Str") {
        text.setText(SEARCH_COMPONENT);
      }
    }
  }
);
  text.addSelectionListener(new SelectionAdapter(){
    public void widgetDefaultSelected(    SelectionEvent e){
      startFiltering(text);
    }
  }
);
}
Program: 123756
Project: 123756
Buggy source:
public void focusGained(FocusEvent e){
  text.setText("String_Node_Str");
}

Fixed version (ground truth):
public void focusGained(FocusEvent e){
}
Program: 123757
Project: 123757
Buggy source:
/** 
 * yzhang Comment method "configListeners".
 * @param text
 */
private void configListeners(final Text text){
  text.addMouseListener(new MouseListener(){
    public void mouseDoubleClick(    MouseEvent e){
    }
    public void mouseDown(    MouseEvent e){
      if (text.getText().equals(SEARCH_COMPONENT)) {
        text.setText("String_Node_Str");
      }
    }
    public void mouseUp(    MouseEvent e){
    }
  }
);
  text.addFocusListener(new FocusListener(){
    public void focusGained(    FocusEvent e){
      text.setText("String_Node_Str");
    }
    public void focusLost(    FocusEvent e){
      if (text.getText() == "String_Node_Str") {
        text.setText(SEARCH_COMPONENT);
      }
    }
  }
);
  text.addSelectionListener(new SelectionAdapter(){
    public void widgetDefaultSelected(    SelectionEvent e){
      startFiltering(text);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * yzhang Comment method "configListeners".
 * @param text
 */
private void configListeners(final Text text){
  text.addMouseListener(new MouseListener(){
    public void mouseDoubleClick(    MouseEvent e){
    }
    public void mouseDown(    MouseEvent e){
      if (text.getText().equals(SEARCH_COMPONENT)) {
        text.setText("String_Node_Str");
      }
    }
    public void mouseUp(    MouseEvent e){
    }
  }
);
  text.addFocusListener(new FocusListener(){
    public void focusGained(    FocusEvent e){
    }
    public void focusLost(    FocusEvent e){
      if (text.getText() == "String_Node_Str") {
        text.setText(SEARCH_COMPONENT);
      }
    }
  }
);
  text.addSelectionListener(new SelectionAdapter(){
    public void widgetDefaultSelected(    SelectionEvent e){
      startFiltering(text);
    }
  }
);
}