nus-yam/ex-repair huggingface dataset:
Program: 120087
Project: 120087
Buggy source:
public void selectionChanged(SelectionChangedEvent event){
  getButton(IDialogConstants.OK_ID).setEnabled(isValidSelection(event));
}

Fixed version (ground truth):
@Override public void selectionChanged(SelectionChangedEvent event){
  getButton(IDialogConstants.OK_ID).setEnabled(isValidSelection(event));
}
Program: 120088
Project: 120088
Buggy source:
private static List<String> getColumnList(IElement element,String context){
  List<String> columnList=new ArrayList<String>();
  IMetadataTable table=null;
  if (element instanceof INode) {
    table=((INode)element).getMetadataFromConnector(context);
    if (table == null) {
      List<IMetadataTable> tableList=((INode)element).getMetadataList();
      if (tableList.size() == 1) {
        table=tableList.get(0);
      }
 else {
        for (        IMetadataTable itable : tableList) {
          if (!itable.getAttachedConnector().equals("String_Node_Str")) {
            table=itable;
            break;
          }
        }
      }
    }
  }
 else   if (element instanceof IConnection) {
    table=((IConnection)element).getMetadataTable();
  }
  if (table != null) {
    for (    IMetadataColumn column : table.getListColumns()) {
      String label=column.getLabel();
      columnList.add(label);
    }
  }
  return columnList;
}

Fixed version (ground truth):
private static List<String> getColumnList(IElement element,String context){
  List<String> columnList=new ArrayList<String>();
  IMetadataTable table=null;
  if (element instanceof INode) {
    table=((INode)element).getMetadataFromConnector(context);
    if (table == null) {
      List<IMetadataTable> tableList=((INode)element).getMetadataList();
      if (tableList.size() == 1) {
        table=tableList.get(0);
      }
 else {
        for (        IMetadataTable itable : tableList) {
          if (itable.getAttachedConnector() != null && !itable.getAttachedConnector().equals("String_Node_Str")) {
            table=itable;
            break;
          }
        }
      }
    }
  }
 else   if (element instanceof IConnection) {
    table=((IConnection)element).getMetadataTable();
  }
  if (table != null) {
    for (    IMetadataColumn column : table.getListColumns()) {
      String label=column.getLabel();
      columnList.add(label);
    }
  }
  return columnList;
}
Program: 120090
Project: 120090
Buggy source:
public static List<String> getColumnListFromTargetNode(Node target){
  List<String> columnKeyValues=new ArrayList<String>();
  IElementParameter parTableNode=target.getElementParameterFromField(EParameterFieldType.TABLE);
  if (parTableNode != null) {
    Object[] itemNode=parTableNode.getListItemsValue();
    ElementParameter clumnNodeList=null;
    for (    Object itemList : itemNode) {
      if (((ElementParameter)itemList).getFieldType().equals(EParameterFieldType.PREV_COLUMN_LIST) || ((ElementParameter)itemList).getFieldType().equals(EParameterFieldType.COLUMN_LIST)) {
        clumnNodeList=((ElementParameter)itemList);
        break;
      }
    }
    if (clumnNodeList != null) {
      for (      Map nodeColumnListMap : (List<Map>)parTableNode.getValue()) {
        Object value=nodeColumnListMap.get(clumnNodeList.getName());
        if (nodeColumnListMap.get(clumnNodeList.getName()) instanceof String) {
          columnKeyValues.add((String)value);
        }
 else         if (value instanceof Integer) {
          Integer index=(Integer)value;
          if (clumnNodeList.getListItemsDisplayName().length > index) {
            columnKeyValues.add((String)clumnNodeList.getListItemsDisplayName()[index]);
          }
        }
      }
    }
  }
  return columnKeyValues;
}

Fixed version (ground truth):
public static List<String> getColumnListFromTargetNode(Node target){
  List<String> columnKeyValues=new ArrayList<String>();
  IElementParameter parTableNode=target.getElementParameterFromField(EParameterFieldType.TABLE);
  if (parTableNode != null) {
    Object[] itemNode=parTableNode.getListItemsValue();
    ElementParameter clumnNodeList=null;
    for (    Object itemList : itemNode) {
      if (((ElementParameter)itemList).getFieldType().equals(EParameterFieldType.PREV_COLUMN_LIST) || ((ElementParameter)itemList).getFieldType().equals(EParameterFieldType.COLUMN_LIST)) {
        clumnNodeList=((ElementParameter)itemList);
        break;
      }
    }
    if (clumnNodeList != null) {
      for (      Map nodeColumnListMap : (List<Map>)parTableNode.getValue()) {
        Object value=nodeColumnListMap.get(clumnNodeList.getName());
        if (nodeColumnListMap.get(clumnNodeList.getName()) instanceof String) {
          columnKeyValues.add((String)value);
        }
 else         if (value instanceof Integer) {
          Integer index=(Integer)value;
          if (clumnNodeList.getListItemsDisplayName().length > index) {
            columnKeyValues.add(clumnNodeList.getListItemsDisplayName()[index]);
          }
        }
      }
    }
  }
  return columnKeyValues;
}
Program: 120092
Project: 120092
Buggy source:
public static List<String> getColumnListFromTargetNode(Node target){
  List<String> columnKeyValues=new ArrayList<String>();
  IElementParameter parTableNode=target.getElementParameterFromField(EParameterFieldType.TABLE);
  if (parTableNode != null) {
    Object[] itemNode=parTableNode.getListItemsValue();
    ElementParameter clumnNodeList=null;
    for (    Object itemList : itemNode) {
      if (((ElementParameter)itemList).getFieldType().equals(EParameterFieldType.PREV_COLUMN_LIST) || ((ElementParameter)itemList).getFieldType().equals(EParameterFieldType.COLUMN_LIST)) {
        clumnNodeList=((ElementParameter)itemList);
        break;
      }
    }
    if (clumnNodeList != null) {
      for (      Map nodeColumnListMap : (List<Map>)parTableNode.getValue()) {
        Object value=nodeColumnListMap.get(clumnNodeList.getName());
        if (nodeColumnListMap.get(clumnNodeList.getName()) instanceof String) {
          columnKeyValues.add((String)value);
        }
 else         if (value instanceof Integer) {
          Integer index=(Integer)value;
          if (clumnNodeList.getListItemsDisplayName().length > index) {
            columnKeyValues.add((String)clumnNodeList.getListItemsDisplayName()[index]);
          }
        }
      }
    }
  }
  return columnKeyValues;
}

Fixed version (ground truth):
public static List<String> getColumnListFromTargetNode(Node target){
  List<String> columnKeyValues=new ArrayList<String>();
  IElementParameter parTableNode=target.getElementParameterFromField(EParameterFieldType.TABLE);
  if (parTableNode != null) {
    Object[] itemNode=parTableNode.getListItemsValue();
    ElementParameter clumnNodeList=null;
    for (    Object itemList : itemNode) {
      if (((ElementParameter)itemList).getFieldType().equals(EParameterFieldType.PREV_COLUMN_LIST) || ((ElementParameter)itemList).getFieldType().equals(EParameterFieldType.COLUMN_LIST)) {
        clumnNodeList=((ElementParameter)itemList);
        break;
      }
    }
    if (clumnNodeList != null) {
      for (      Map nodeColumnListMap : (List<Map>)parTableNode.getValue()) {
        Object value=nodeColumnListMap.get(clumnNodeList.getName());
        if (nodeColumnListMap.get(clumnNodeList.getName()) instanceof String) {
          columnKeyValues.add((String)value);
        }
 else         if (value instanceof Integer) {
          Integer index=(Integer)value;
          if (clumnNodeList.getListItemsDisplayName().length > index) {
            columnKeyValues.add(clumnNodeList.getListItemsDisplayName()[index]);
          }
        }
      }
    }
  }
  return columnKeyValues;
}
Program: 120093
Project: 120093
Buggy source:
public Map<String,Object> getDefaultSetting(){
  if (defaultSettingMap.isEmpty()) {
    defaultSettingMap.put(DataMapTableView.LOOKUP_MODEL_SETTING,TMAP_LOOKUP_MODE.LOAD_ONCE);
    if (isMRProcess) {
      defaultSettingMap.put(DataMapTableView.MATCH_MODEL_SETTING,new IUIMatchingMode[]{TMAP_MATCHING_MODE.ALL_ROWS,TMAP_MATCHING_MODE.ALL_MATCHES});
    }
 else {
      defaultSettingMap.put(DataMapTableView.MATCH_MODEL_SETTING,new IUIMatchingMode[]{TMAP_MATCHING_MODE.ALL_ROWS,TMAP_MATCHING_MODE.UNIQUE_MATCH});
    }
    defaultSettingMap.put(DataMapTableView.JOIN_MODEL_SETTING,false);
    defaultSettingMap.put(DataMapTableView.PERSISTENCE_MODEL_SETTING,false);
    defaultSettingMap.put(DataMapTableView.OUTPUT_REJECT,false);
    defaultSettingMap.put(DataMapTableView.LOOK_UP_INNER_JOIN_REJECT,false);
    defaultSettingMap.put(DataMapTableView.SCHEMA_TYPE,false);
    defaultSettingMap.put(DataMapTableView.SCHEMA_ID,null);
    defaultSettingMap.put(MapperSettingsManager.DIE_ON_ERROR,true);
    boolean parallel=false;
    IElementParameter paraEle=getAbstractMapComponent().getElementParameter("String_Node_Str");
    if (paraEle != null) {
      parallel=(Boolean)paraEle.getValue();
    }
    defaultSettingMap.put(MapperSettingsManager.LOOKUP_IN_PARALLEL,parallel);
    defaultSettingMap.put(MapperSettingsManager.TEMPORARY_DATA_DIRECTORY,"String_Node_Str");
    defaultSettingMap.put(MapperSettingsManager.ROWS_BUFFER_SIZE,2000000);
  }
  return defaultSettingMap;
}

Fixed version (ground truth):
public Map<String,Object> getDefaultSetting(){
  if (defaultSettingMap.isEmpty()) {
    defaultSettingMap.put(DataMapTableView.LOOKUP_MODEL_SETTING,TMAP_LOOKUP_MODE.LOAD_ONCE);
    if (isMRProcess) {
      defaultSettingMap.put(DataMapTableView.MATCH_MODEL_SETTING,new IUIMatchingMode[]{TMAP_MATCHING_MODE.ALL_ROWS,TMAP_MATCHING_MODE.ALL_MATCHES});
    }
 else {
      defaultSettingMap.put(DataMapTableView.MATCH_MODEL_SETTING,new IUIMatchingMode[]{TMAP_MATCHING_MODE.ALL_ROWS,TMAP_MATCHING_MODE.UNIQUE_MATCH});
    }
    defaultSettingMap.put(DataMapTableView.JOIN_MODEL_SETTING,false);
    defaultSettingMap.put(DataMapTableView.PERSISTENCE_MODEL_SETTING,false);
    defaultSettingMap.put(DataMapTableView.OUTPUT_REJECT,false);
    defaultSettingMap.put(DataMapTableView.LOOK_UP_INNER_JOIN_REJECT,false);
    defaultSettingMap.put(DataMapTableView.SCHEMA_TYPE,false);
    defaultSettingMap.put(DataMapTableView.SCHEMA_ID,null);
    defaultSettingMap.put(MapperSettingsManager.DIE_ON_ERROR,true);
    defaultSettingMap.put(MapperSettingsManager.LOOKUP_IN_PARALLEL,false);
    defaultSettingMap.put(MapperSettingsManager.TEMPORARY_DATA_DIRECTORY,"String_Node_Str");
    defaultSettingMap.put(MapperSettingsManager.ROWS_BUFFER_SIZE,2000000);
  }
  return defaultSettingMap;
}
Program: 120094
Project: 120094
Buggy source:
public Map<String,Object> getDefaultSetting(){
  if (defaultSettingMap.isEmpty()) {
    defaultSettingMap.put(DataMapTableView.LOOKUP_MODEL_SETTING,TMAP_LOOKUP_MODE.LOAD_ONCE);
    if (isMRProcess) {
      defaultSettingMap.put(DataMapTableView.MATCH_MODEL_SETTING,new IUIMatchingMode[]{TMAP_MATCHING_MODE.ALL_ROWS,TMAP_MATCHING_MODE.ALL_MATCHES});
    }
 else {
      defaultSettingMap.put(DataMapTableView.MATCH_MODEL_SETTING,new IUIMatchingMode[]{TMAP_MATCHING_MODE.ALL_ROWS,TMAP_MATCHING_MODE.UNIQUE_MATCH});
    }
    defaultSettingMap.put(DataMapTableView.JOIN_MODEL_SETTING,false);
    defaultSettingMap.put(DataMapTableView.PERSISTENCE_MODEL_SETTING,false);
    defaultSettingMap.put(DataMapTableView.OUTPUT_REJECT,false);
    defaultSettingMap.put(DataMapTableView.LOOK_UP_INNER_JOIN_REJECT,false);
    defaultSettingMap.put(DataMapTableView.SCHEMA_TYPE,false);
    defaultSettingMap.put(DataMapTableView.SCHEMA_ID,null);
    defaultSettingMap.put(MapperSettingsManager.DIE_ON_ERROR,true);
    boolean parallel=false;
    IElementParameter paraEle=getAbstractMapComponent().getElementParameter("String_Node_Str");
    if (paraEle != null) {
      parallel=(Boolean)paraEle.getValue();
    }
    defaultSettingMap.put(MapperSettingsManager.LOOKUP_IN_PARALLEL,parallel);
    defaultSettingMap.put(MapperSettingsManager.TEMPORARY_DATA_DIRECTORY,"String_Node_Str");
    defaultSettingMap.put(MapperSettingsManager.ROWS_BUFFER_SIZE,2000000);
  }
  return defaultSettingMap;
}

Fixed version (ground truth):
public Map<String,Object> getDefaultSetting(){
  if (defaultSettingMap.isEmpty()) {
    defaultSettingMap.put(DataMapTableView.LOOKUP_MODEL_SETTING,TMAP_LOOKUP_MODE.LOAD_ONCE);
    if (isMRProcess) {
      defaultSettingMap.put(DataMapTableView.MATCH_MODEL_SETTING,new IUIMatchingMode[]{TMAP_MATCHING_MODE.ALL_ROWS,TMAP_MATCHING_MODE.ALL_MATCHES});
    }
 else {
      defaultSettingMap.put(DataMapTableView.MATCH_MODEL_SETTING,new IUIMatchingMode[]{TMAP_MATCHING_MODE.ALL_ROWS,TMAP_MATCHING_MODE.UNIQUE_MATCH});
    }
    defaultSettingMap.put(DataMapTableView.JOIN_MODEL_SETTING,false);
    defaultSettingMap.put(DataMapTableView.PERSISTENCE_MODEL_SETTING,false);
    defaultSettingMap.put(DataMapTableView.OUTPUT_REJECT,false);
    defaultSettingMap.put(DataMapTableView.LOOK_UP_INNER_JOIN_REJECT,false);
    defaultSettingMap.put(DataMapTableView.SCHEMA_TYPE,false);
    defaultSettingMap.put(DataMapTableView.SCHEMA_ID,null);
    defaultSettingMap.put(MapperSettingsManager.DIE_ON_ERROR,true);
    defaultSettingMap.put(MapperSettingsManager.LOOKUP_IN_PARALLEL,false);
    defaultSettingMap.put(MapperSettingsManager.TEMPORARY_DATA_DIRECTORY,"String_Node_Str");
    defaultSettingMap.put(MapperSettingsManager.ROWS_BUFFER_SIZE,2000000);
  }
  return defaultSettingMap;
}
Program: 120095
Project: 120095
Buggy source:
protected Node createDummyNode(NodeType nType,Hashtable<String,Node> nodesHashtable){
  DummyComponent component=new DummyComponent(nType);
  Node nc;
  nc=new Node(component,this);
  nc.setLocation(new Point(nType.getPosX(),nType.getPosY()));
  Point offset=new Point(nType.getOffsetLabelX(),nType.getOffsetLabelY());
  nc.getNodeLabel().setOffset(offset);
  if (nType.isSetSizeX()) {
    nc.setSize(new Dimension(nType.getSizeX(),nType.getSizeY()));
  }
  NodeContainer nodec=null;
  if (nc.isJoblet() || nc.isMapReduce()) {
    nodec=new JobletContainer(nc);
  }
 else {
    nodec=new NodeContainer(nc);
  }
  loadSchema(nc,nType);
  addNodeContainer(nodec);
  nodesHashtable.put(nc.getUniqueName(),nc);
  return nc;
}

Fixed version (ground truth):
protected Node createDummyNode(NodeType nType,Hashtable<String,Node> nodesHashtable){
  DummyComponent component=new DummyComponent(nType);
  Node nc;
  nc=new Node(component,this);
  nc.setLocation(new Point(nType.getPosX(),nType.getPosY()));
  Point offset=new Point(nType.getOffsetLabelX(),nType.getOffsetLabelY());
  nc.getNodeLabel().setOffset(offset);
  if (nType.isSetSizeX()) {
    nc.setSize(new Dimension(nType.getSizeX(),nType.getSizeY()));
  }
  loadElementParameters(nc,nType.getElementParameter());
  NodeContainer nodec=null;
  if (nc.isJoblet() || nc.isMapReduce()) {
    nodec=new JobletContainer(nc);
  }
 else {
    nodec=new NodeContainer(nc);
  }
  loadSchema(nc,nType);
  addNodeContainer(nodec);
  nodesHashtable.put(nc.getUniqueName(),nc);
  return nc;
}
Program: 120097
Project: 120097
Buggy source:
protected Node createDummyNode(NodeType nType,Hashtable<String,Node> nodesHashtable){
  DummyComponent component=new DummyComponent(nType);
  Node nc;
  nc=new Node(component,this);
  nc.setLocation(new Point(nType.getPosX(),nType.getPosY()));
  Point offset=new Point(nType.getOffsetLabelX(),nType.getOffsetLabelY());
  nc.getNodeLabel().setOffset(offset);
  if (nType.isSetSizeX()) {
    nc.setSize(new Dimension(nType.getSizeX(),nType.getSizeY()));
  }
  NodeContainer nodec=null;
  if (nc.isJoblet()) {
    nodec=new JobletContainer(nc);
  }
 else {
    nodec=new NodeContainer(nc);
  }
  loadSchema(nc,nType);
  addNodeContainer(nodec);
  nodesHashtable.put(nc.getUniqueName(),nc);
  return nc;
}

Fixed version (ground truth):
protected Node createDummyNode(NodeType nType,Hashtable<String,Node> nodesHashtable){
  DummyComponent component=new DummyComponent(nType);
  Node nc;
  nc=new Node(component,this);
  nc.setLocation(new Point(nType.getPosX(),nType.getPosY()));
  Point offset=new Point(nType.getOffsetLabelX(),nType.getOffsetLabelY());
  nc.getNodeLabel().setOffset(offset);
  if (nType.isSetSizeX()) {
    nc.setSize(new Dimension(nType.getSizeX(),nType.getSizeY()));
  }
  loadElementParameters(nc,nType.getElementParameter());
  NodeContainer nodec=null;
  if (nc.isJoblet()) {
    nodec=new JobletContainer(nc);
  }
 else {
    nodec=new NodeContainer(nc);
  }
  loadSchema(nc,nType);
  addNodeContainer(nodec);
  nodesHashtable.put(nc.getUniqueName(),nc);
  return nc;
}
Program: 120100
Project: 120100
Buggy source:
protected Node createDummyNode(NodeType nType,Hashtable<String,Node> nodesHashtable){
  DummyComponent component=new DummyComponent(nType);
  Node nc;
  nc=new Node(component,this);
  nc.setLocation(new Point(nType.getPosX(),nType.getPosY()));
  Point offset=new Point(nType.getOffsetLabelX(),nType.getOffsetLabelY());
  nc.getNodeLabel().setOffset(offset);
  if (nType.isSetSizeX()) {
    nc.setSize(new Dimension(nType.getSizeX(),nType.getSizeY()));
  }
  NodeContainer nodec=null;
  if (nc.isJoblet() || nc.isMapReduce()) {
    nodec=new JobletContainer(nc);
  }
 else {
    nodec=new NodeContainer(nc);
  }
  loadSchema(nc,nType);
  addNodeContainer(nodec);
  nodesHashtable.put(nc.getUniqueName(),nc);
  return nc;
}

Fixed version (ground truth):
protected Node createDummyNode(NodeType nType,Hashtable<String,Node> nodesHashtable){
  DummyComponent component=new DummyComponent(nType);
  Node nc;
  nc=new Node(component,this);
  nc.setLocation(new Point(nType.getPosX(),nType.getPosY()));
  Point offset=new Point(nType.getOffsetLabelX(),nType.getOffsetLabelY());
  nc.getNodeLabel().setOffset(offset);
  if (nType.isSetSizeX()) {
    nc.setSize(new Dimension(nType.getSizeX(),nType.getSizeY()));
  }
  loadElementParameters(nc,nType.getElementParameter());
  NodeContainer nodec=null;
  if (nc.isJoblet() || nc.isMapReduce()) {
    nodec=new JobletContainer(nc);
  }
 else {
    nodec=new NodeContainer(nc);
  }
  loadSchema(nc,nType);
  addNodeContainer(nodec);
  nodesHashtable.put(nc.getUniqueName(),nc);
  return nc;
}
Program: 120101
Project: 120101
Buggy source:
public String getExtractOption(){
  if (chkButton != null) {
    return String.valueOf(chkButton.getSelection());
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
public String getExtractOption(){
  if (chkButton != null && !chkButton.isDisposed()) {
    return String.valueOf(chkButton.getSelection());
  }
 else {
    return null;
  }
}
Program: 120103
Project: 120103
Buggy source:
@Override public boolean isAddMavenScript(){
  if (addBSButton != null) {
    return addBSButton.getSelection();
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean isAddMavenScript(){
  if (addBSButton != null && !addBSButton.isDisposed()) {
    return addBSButton.getSelection();
  }
  return false;
}
Program: 120104
Project: 120104
Buggy source:
public String getExtractOption(){
  if (chkButton != null) {
    return String.valueOf(chkButton.getSelection());
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
public String getExtractOption(){
  if (chkButton != null && !chkButton.isDisposed()) {
    return String.valueOf(chkButton.getSelection());
  }
 else {
    return null;
  }
}
Program: 120106
Project: 120106
Buggy source:
@Override public boolean isAddMavenScript(){
  if (addBSButton != null) {
    return addBSButton.getSelection();
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean isAddMavenScript(){
  if (addBSButton != null && !addBSButton.isDisposed()) {
    return addBSButton.getSelection();
  }
  return false;
}
Program: 120107
Project: 120107
Buggy source:
public String getExtractOption(){
  if (chkButton != null) {
    return String.valueOf(chkButton.getSelection());
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
public String getExtractOption(){
  if (chkButton != null && !chkButton.isDisposed()) {
    return String.valueOf(chkButton.getSelection());
  }
 else {
    return null;
  }
}
Program: 120109
Project: 120109
Buggy source:
@Override public boolean isAddMavenScript(){
  if (addBSButton != null) {
    return addBSButton.getSelection();
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean isAddMavenScript(){
  if (addBSButton != null && !addBSButton.isDisposed()) {
    return addBSButton.getSelection();
  }
  return false;
}
Program: 120110
Project: 120110
Buggy source:
public boolean hasChildren(Object element){
  return getChildren(element).length > 0;
}

Fixed version (ground truth):
@Override public boolean hasChildren(Object element){
  return getChildren(element).length > 0;
}
Program: 120111
Project: 120111
Buggy source:
public String getColumnText(Object element,int columnIndex){
  RepositoryNode node=(RepositoryNode)element;
  if (columnIndex == 0) {
    return ((SqlBuilderRepositoryObject)node.getObject()).getSourceName();
  }
 else   if (columnIndex == 1) {
    return ((SqlBuilderRepositoryObject)node.getObject()).getRepositoryName();
  }
  return null;
}

Fixed version (ground truth):
@Override public String getColumnText(Object element,int columnIndex){
  RepositoryNode node=(RepositoryNode)element;
  if (columnIndex == 0) {
    return ((SqlBuilderRepositoryObject)node.getObject()).getSourceName();
  }
 else   if (columnIndex == 1) {
    return ((SqlBuilderRepositoryObject)node.getObject()).getRepositoryName();
  }
  return null;
}
Program: 120112
Project: 120112
Buggy source:
public void inputChanged(Viewer viewer,Object oldInput,Object newInput){
}

Fixed version (ground truth):
@Override public void inputChanged(Viewer viewer,Object oldInput,Object newInput){
}
Program: 120113
Project: 120113
Buggy source:
public Object getParent(Object element){
  RepositoryNode node=(RepositoryNode)element;
  final RepositoryNode parent=node.getParent();
  if (parent != null) {
    return parent;
  }
 else {
    return node;
  }
}

Fixed version (ground truth):
@Override public Object getParent(Object element){
  RepositoryNode node=(RepositoryNode)element;
  final RepositoryNode parent=node.getParent();
  if (parent != null) {
    return parent;
  }
 else {
    return node;
  }
}
Program: 120114
Project: 120114
Buggy source:
private void createQuery(RepositoryNode queriesConnectionNode,IRepositoryViewObject repObj,QueriesConnection queriesConnection){
  displayQueries.clear();
  for (Iterator iter=queriesConnection.getQuery().iterator(); iter.hasNext(); ) {
    Query query=(Query)iter.next();
    boolean isDelete=SubItemHelper.isDeleted(query);
    boolean isReadOnly=connectionParameters.isNodeReadOnly();
    if (isDelete && !isReadOnly) {
      continue;
    }
    QueryRepositoryObject repositoryObject=new QueryRepositoryObject(repObj,query);
    repositoryObject.setImage(IMAGES_SQL_EDITOR_ICON);
    repositoryObject.setSourceName(query.getLabel());
    RepositoryNode node=new RepositoryNodeExt(repositoryObject,queriesConnectionNode,ENodeType.REPOSITORY_ELEMENT);
    node.setProperties(EProperties.CONTENT_TYPE,RepositoryNodeType.QUERY);
    queriesConnectionNode.getChildren().add(node);
    if (connectionParameters.getQueryObject() != null && query.getLabel().equals(connectionParameters.getQueryObject().getLabel())) {
      this.selectedExtReposiotryNode=node;
    }
    displayQueries.add(query);
  }
}

Fixed version (ground truth):
private void createQuery(RepositoryNode queriesConnectionNode,IRepositoryViewObject repObj,QueriesConnection queriesConnection){
  displayQueries.clear();
  for (  Object element : queriesConnection.getQuery()) {
    Query query=(Query)element;
    boolean isDelete=SubItemHelper.isDeleted(query);
    boolean isReadOnly=connectionParameters.isNodeReadOnly();
    if (isDelete && !isReadOnly) {
      continue;
    }
    QueryRepositoryObject repositoryObject=new QueryRepositoryObject(repObj,query);
    repositoryObject.setImage(IMAGES_SQL_EDITOR_ICON);
    repositoryObject.setSourceName(query.getLabel());
    RepositoryNode node=new RepositoryNodeExt(repositoryObject,queriesConnectionNode,ENodeType.REPOSITORY_ELEMENT);
    node.setProperties(EProperties.CONTENT_TYPE,RepositoryNodeType.QUERY);
    queriesConnectionNode.getChildren().add(node);
    if (connectionParameters.getQueryObject() != null && query.getLabel().equals(connectionParameters.getQueryObject().getLabel())) {
      this.selectedExtReposiotryNode=node;
    }
    displayQueries.add(query);
  }
}
Program: 120115
Project: 120115
Buggy source:
public Property getProperty(){
  return repObj.getProperty();
}

Fixed version (ground truth):
@Override public Property getProperty(){
  return repObj.getProperty();
}
Program: 120116
Project: 120116
Buggy source:
/** 
 * tguiu Comment method "createTables".
 * @param node
 * @param iMetadataConnection
 * @param metadataConnection
 */
private void createTables(RepositoryNode node,final IRepositoryViewObject repObj,Connection metadataConnection,boolean isBuildIn){
  for (  Object currentTable : ConnectionHelper.getTables(metadataConnection)) {
    org.talend.core.model.metadata.builder.connection.MetadataTable metadataTable=(org.talend.core.model.metadata.builder.connection.MetadataTable)currentTable;
    if (metadataTable.getSourceName() != null) {
      RepositoryNode tableNode=createMetatable(node,repObj,metadataTable,isBuildIn);
      if (TableHelper.isDeleted(metadataTable)) {
      }
 else {
        node.getChildren().add(tableNode);
      }
      if (connectionParameters.getMetadataTable() != null && metadataTable.getLabel().equals(connectionParameters.getMetadataTable().getLabel())) {
        this.selectedExtReposiotryNode=tableNode;
      }
      createColumns(tableNode,repObj,currentTable,isBuildIn);
    }
  }
}

Fixed version (ground truth):
/** 
 * tguiu Comment method "createTables".
 * @param node
 * @param iMetadataConnection
 * @param metadataConnection
 */
private void createTables(RepositoryNode node,final IRepositoryViewObject repObj,Connection metadataConnection,boolean isBuildIn){
  for (  Object currentTable : ConnectionHelper.getTables(metadataConnection)) {
    org.talend.core.model.metadata.builder.connection.MetadataTable metadataTable=(org.talend.core.model.metadata.builder.connection.MetadataTable)currentTable;
    if (metadataTable.getSourceName() != null) {
      RepositoryNode tableNode=createMetatable(node,repObj,metadataTable,isBuildIn);
      if (TableHelper.isDeleted(metadataTable)) {
      }
 else       if (metadataTable.getSourceName().equals("String_Node_Str")) {
      }
 else {
        node.getChildren().add(tableNode);
      }
      if (connectionParameters.getMetadataTable() != null && metadataTable.getLabel().equals(connectionParameters.getMetadataTable().getLabel())) {
        this.selectedExtReposiotryNode=tableNode;
      }
      createColumns(tableNode,repObj,currentTable,isBuildIn);
    }
  }
}
Program: 120117
Project: 120117
Buggy source:
public Color getForeground(Object element,int columnIndex){
  return null;
}

Fixed version (ground truth):
@Override public Color getForeground(Object element,int columnIndex){
  return null;
}
Program: 120118
Project: 120118
Buggy source:
@SuppressWarnings("String_Node_Str") public Object[] getChildren(Object parentElement){
  if (isRefresh) {
    RepositoryNode repositoryNode=(RepositoryNode)parentElement;
    RepositoryNode rootNode=repositoryNodeManager.getRoot(repositoryNode);
    refreshRootNode(rootNode);
    rootNode.getChildren().clear();
    DatabaseConnection metadataConnection=(DatabaseConnection)((ConnectionItem)repositoryNode.getObject().getProperty().getItem()).getConnection();
    boolean isBuildIn=((SqlBuilderRepositoryObject)rootNode.getObject()).isBuildIn();
    createTables(rootNode,rootNode.getObject(),metadataConnection,isBuildIn);
    createQueries(rootNode,rootNode.getObject(),metadataConnection,isBuildIn);
    isRefresh=false;
    return repositoryNode.getChildren().toArray();
  }
 else {
    return ((RepositoryNode)parentElement).getChildren().toArray();
  }
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public Object[] getChildren(Object parentElement){
  if (isRefresh) {
    RepositoryNode repositoryNode=(RepositoryNode)parentElement;
    RepositoryNode rootNode=repositoryNodeManager.getRoot(repositoryNode);
    refreshRootNode(rootNode);
    rootNode.getChildren().clear();
    DatabaseConnection metadataConnection=(DatabaseConnection)((ConnectionItem)repositoryNode.getObject().getProperty().getItem()).getConnection();
    boolean isBuildIn=((SqlBuilderRepositoryObject)rootNode.getObject()).isBuildIn();
    createTables(rootNode,rootNode.getObject(),metadataConnection,isBuildIn);
    createQueries(rootNode,rootNode.getObject(),metadataConnection,isBuildIn);
    isRefresh=false;
    return repositoryNode.getChildren().toArray();
  }
 else {
    return ((RepositoryNode)parentElement).getChildren().toArray();
  }
}
Program: 120119
Project: 120119
Buggy source:
public Image getColumnImage(Object element,int columnIndex){
  RepositoryNode node=(RepositoryNode)element;
  SqlBuilderRepositoryObject repositoryObject=(SqlBuilderRepositoryObject)node.getObject();
  if (columnIndex == 1) {
    return null;
  }
 else   if (columnIndex == 2) {
    if ((repositoryObject).getDiffImage() == null) {
      return null;
    }
    return ImageUtil.getImage((repositoryObject).getDiffImage());
  }
  return ImageUtil.getImage((repositoryObject).getImage());
}

Fixed version (ground truth):
@Override public Image getColumnImage(Object element,int columnIndex){
  RepositoryNode node=(RepositoryNode)element;
  SqlBuilderRepositoryObject repositoryObject=(SqlBuilderRepositoryObject)node.getObject();
  if (columnIndex == 1) {
    return null;
  }
 else   if (columnIndex == 2) {
    if ((repositoryObject).getDiffImage() == null) {
      return null;
    }
    return ImageUtil.getImage((repositoryObject).getDiffImage());
  }
  return ImageUtil.getImage((repositoryObject).getImage());
}
Program: 120120
Project: 120120
Buggy source:
public Object[] getElements(Object inputElement){
  if (!(inputElement instanceof RepositoryNode)) {
    return new Object[0];
  }
  RepositoryNode treeRoot=(RepositoryNode)inputElement;
  if (!isInitialized) {
    initialize(treeRoot);
    isInitialized=true;
  }
  return treeRoot.getChildren().toArray();
}

Fixed version (ground truth):
@Override public Object[] getElements(Object inputElement){
  if (!(inputElement instanceof RepositoryNode)) {
    return new Object[0];
  }
  RepositoryNode treeRoot=(RepositoryNode)inputElement;
  if (!isInitialized) {
    initialize(treeRoot);
    isInitialized=true;
  }
  return treeRoot.getChildren().toArray();
}
Program: 120121
Project: 120121
Buggy source:
public Color getBackground(Object element,int columnIndex){
  RepositoryNode repositoryNode=(RepositoryNode)element;
  SqlBuilderRepositoryObject repositoryObject=(SqlBuilderRepositoryObject)repositoryNode.getObject();
  if (columnIndex == 2) {
    return null;
  }
 else {
    return colors.get((repositoryObject).getColor());
  }
}

Fixed version (ground truth):
@Override public Color getBackground(Object element,int columnIndex){
  RepositoryNode repositoryNode=(RepositoryNode)element;
  SqlBuilderRepositoryObject repositoryObject=(SqlBuilderRepositoryObject)repositoryNode.getObject();
  if (columnIndex == 2) {
    return null;
  }
 else {
    return colors.get((repositoryObject).getColor());
  }
}
Program: 120122
Project: 120122
Buggy source:
/** 
 * tguiu Comment method "createTables".
 * @param node
 * @param iMetadataConnection
 * @param metadataConnection
 */
private void createTables(RepositoryNode node,final IRepositoryViewObject repObj,Connection metadataConnection,boolean isBuildIn){
  for (  Object currentTable : ConnectionHelper.getTables(metadataConnection)) {
    org.talend.core.model.metadata.builder.connection.MetadataTable metadataTable=(org.talend.core.model.metadata.builder.connection.MetadataTable)currentTable;
    if (metadataTable.getSourceName() != null) {
      RepositoryNode tableNode=createMetatable(node,repObj,metadataTable,isBuildIn);
      if (TableHelper.isDeleted(metadataTable)) {
      }
 else {
        node.getChildren().add(tableNode);
      }
      if (connectionParameters.getMetadataTable() != null && metadataTable.getLabel().equals(connectionParameters.getMetadataTable().getLabel())) {
        this.selectedExtReposiotryNode=tableNode;
      }
      createColumns(tableNode,repObj,currentTable,isBuildIn);
    }
  }
}

Fixed version (ground truth):
/** 
 * tguiu Comment method "createTables".
 * @param node
 * @param iMetadataConnection
 * @param metadataConnection
 */
private void createTables(RepositoryNode node,final IRepositoryViewObject repObj,Connection metadataConnection,boolean isBuildIn){
  for (  Object currentTable : ConnectionHelper.getTables(metadataConnection)) {
    org.talend.core.model.metadata.builder.connection.MetadataTable metadataTable=(org.talend.core.model.metadata.builder.connection.MetadataTable)currentTable;
    if (metadataTable.getSourceName() != null) {
      RepositoryNode tableNode=createMetatable(node,repObj,metadataTable,isBuildIn);
      if (TableHelper.isDeleted(metadataTable)) {
      }
 else       if (metadataTable.getSourceName().equals("String_Node_Str")) {
      }
 else {
        node.getChildren().add(tableNode);
      }
      if (connectionParameters.getMetadataTable() != null && metadataTable.getLabel().equals(connectionParameters.getMetadataTable().getLabel())) {
        this.selectedExtReposiotryNode=tableNode;
      }
      createColumns(tableNode,repObj,currentTable,isBuildIn);
    }
  }
}
Program: 120126
Project: 120126
Buggy source:
/** 
 * tguiu Comment method "createTables".
 * @param node
 * @param iMetadataConnection
 * @param metadataConnection
 */
private void createTables(RepositoryNode node,final IRepositoryViewObject repObj,Connection metadataConnection,boolean isBuildIn){
  for (  Object currentTable : ConnectionHelper.getTables(metadataConnection)) {
    org.talend.core.model.metadata.builder.connection.MetadataTable metadataTable=(org.talend.core.model.metadata.builder.connection.MetadataTable)currentTable;
    if (metadataTable.getSourceName() != null) {
      RepositoryNode tableNode=createMetatable(node,repObj,metadataTable,isBuildIn);
      if (TableHelper.isDeleted(metadataTable)) {
      }
 else {
        node.getChildren().add(tableNode);
      }
      if (connectionParameters.getMetadataTable() != null && metadataTable.getLabel().equals(connectionParameters.getMetadataTable().getLabel())) {
        this.selectedExtReposiotryNode=tableNode;
      }
      createColumns(tableNode,repObj,currentTable,isBuildIn);
    }
  }
}

Fixed version (ground truth):
/** 
 * tguiu Comment method "createTables".
 * @param node
 * @param iMetadataConnection
 * @param metadataConnection
 */
private void createTables(RepositoryNode node,final IRepositoryViewObject repObj,Connection metadataConnection,boolean isBuildIn){
  for (  Object currentTable : ConnectionHelper.getTables(metadataConnection)) {
    org.talend.core.model.metadata.builder.connection.MetadataTable metadataTable=(org.talend.core.model.metadata.builder.connection.MetadataTable)currentTable;
    if (metadataTable.getSourceName() != null) {
      RepositoryNode tableNode=createMetatable(node,repObj,metadataTable,isBuildIn);
      if (TableHelper.isDeleted(metadataTable)) {
      }
 else       if (metadataTable.getSourceName().equals("String_Node_Str")) {
      }
 else {
        node.getChildren().add(tableNode);
      }
      if (connectionParameters.getMetadataTable() != null && metadataTable.getLabel().equals(connectionParameters.getMetadataTable().getLabel())) {
        this.selectedExtReposiotryNode=tableNode;
      }
      createColumns(tableNode,repObj,currentTable,isBuildIn);
    }
  }
}
Program: 120129
Project: 120129
Buggy source:
public void drop(DropTargetEvent event){
  dragFinished();
}

Fixed version (ground truth):
@Override public void drop(DropTargetEvent event){
  dragFinished();
}
Program: 120130
Project: 120130
Buggy source:
public void dragEnter(DropTargetEvent event){
  updatePopupPosition(event);
  setPopupVisible(true);
  event.detail=mapperManager.getUiManager().getCurrentDragDetail();
}

Fixed version (ground truth):
@Override public void dragEnter(DropTargetEvent event){
  setPopupVisible(true);
  event.detail=mapperManager.getUiManager().getCurrentDragDetail();
}
Program: 120131
Project: 120131
Buggy source:
public void dropAccept(DropTargetEvent event){
}

Fixed version (ground truth):
@Override public void dropAccept(DropTargetEvent event){
}
Program: 120132
Project: 120132
Buggy source:
public void dragOperationChanged(DropTargetEvent event){
  updatePopupPosition(event);
  detectPressedKeys(event);
  AbstractUIManager uiManager=mapperManager.getUiManager();
  DraggingInfosPopup draggingInfosPopup=uiManager.getDraggingInfosPopup();
  if (uiManager.isCtrlPressed()) {
    draggingInfosPopup.setOverwriteMode(true);
  }
 else {
    draggingInfosPopup.setOverwriteMode(false);
  }
  if (uiManager.isShiftPressed()) {
    draggingInfosPopup.setMapOneToOneMode(true,true);
  }
 else {
    draggingInfosPopup.setMapOneToOneMode(false,true);
  }
  int detail=DND.DROP_NONE;
  if (uiManager.isCtrlPressed() && uiManager.isShiftPressed()) {
    detail|=DND.DROP_COPY;
  }
 else   if (uiManager.isCtrlPressed()) {
    detail|=DND.DROP_LINK;
  }
 else   if (uiManager.isShiftPressed()) {
    detail|=DND.DROP_COPY;
  }
 else {
    detail|=DND.DROP_COPY;
  }
  uiManager.setCurrentDragDetail(detail);
  event.detail=DND.DROP_NONE;
}

Fixed version (ground truth):
@Override public void dragOperationChanged(DropTargetEvent event){
  updatePopupPosition(event);
  detectPressedKeys(event);
  AbstractUIManager uiManager=mapperManager.getUiManager();
  DraggingInfosPopup draggingInfosPopup=uiManager.getDraggingInfosPopup();
  if (uiManager.isCtrlPressed()) {
    draggingInfosPopup.setOverwriteMode(true);
  }
 else {
    draggingInfosPopup.setOverwriteMode(false);
  }
  if (uiManager.isShiftPressed()) {
    draggingInfosPopup.setMapOneToOneMode(true,true);
  }
 else {
    draggingInfosPopup.setMapOneToOneMode(false,true);
  }
  int detail=DND.DROP_NONE;
  if (uiManager.isCtrlPressed() && uiManager.isShiftPressed()) {
    detail|=DND.DROP_COPY;
  }
 else   if (uiManager.isCtrlPressed()) {
    detail|=DND.DROP_LINK;
  }
 else   if (uiManager.isShiftPressed()) {
    detail|=DND.DROP_COPY;
  }
 else {
    detail|=DND.DROP_COPY;
  }
  uiManager.setCurrentDragDetail(detail);
  event.detail=DND.DROP_NONE;
}
Program: 120133
Project: 120133
Buggy source:
public Transfer getTransfer(){
  return TableEntriesTransfer.getInstance();
}

Fixed version (ground truth):
@Override public Transfer getTransfer(){
  return TableEntriesTransfer.getInstance();
}
Program: 120134
Project: 120134
Buggy source:
public boolean isEnabled(DropTargetEvent event){
  return true;
}

Fixed version (ground truth):
@Override public boolean isEnabled(DropTargetEvent event){
  return true;
}
Program: 120135
Project: 120135
Buggy source:
public void dragOver(DropTargetEvent event){
  event.detail=DND.DROP_NONE;
  autoScroll(event);
  updatePopupPosition(event);
  setPopupVisible(true);
}

Fixed version (ground truth):
@Override public void dragOver(DropTargetEvent event){
  event.detail=DND.DROP_NONE;
  autoScroll(event);
  updatePopupPosition(event);
  setPopupVisible(true);
}
Program: 120136
Project: 120136
Buggy source:
public void dragLeave(DropTargetEvent event){
  dragFinished();
}

Fixed version (ground truth):
@Override public void dragLeave(DropTargetEvent event){
  dragFinished();
}
Program: 120137
Project: 120137
Buggy source:
private void autoScroll(DropTargetEvent event){
  if (lastCursorPosition == null || lastCursorPosition.y == event.y) {
    return;
  }
  Composite currentComposite=null;
  Object source=event.getSource();
  if (source instanceof DropTarget) {
    Control control=((DropTarget)source).getControl();
    if (control instanceof Composite) {
      currentComposite=(Composite)control;
    }
  }
  if (currentComposite == null) {
    return;
  }
  ScrolledComposite parentScrolledComposite=getParentScrolledComposite(currentComposite);
  if (parentScrolledComposite == null) {
    return;
  }
  ScrollBar vBar=parentScrolledComposite.getVerticalBar();
  int increment=event.y - lastCursorPosition.y;
  if (increment > 0) {
    increment=increment + 3;
  }
 else {
    increment=increment - 3;
  }
  Control content=parentScrolledComposite.getContent();
  if (content != null) {
    Point location=content.getLocation();
    int vSelection=vBar.getSelection();
    if (vSelection >= 0 && vSelection + increment > 0 && vSelection + increment < vBar.getMaximum()) {
      vBar.setSelection(vSelection + increment);
    }
    content.setLocation(location.x,-vSelection);
    mapperManager.getUiManager().refreshBackground(true,false);
  }
}

Fixed version (ground truth):
private void autoScroll(DropTargetEvent event){
  Composite currentComposite=null;
  Object source=event.getSource();
  if (source instanceof DropTarget) {
    Control control=((DropTarget)source).getControl();
    if (control instanceof Composite) {
      currentComposite=(Composite)control;
    }
  }
  if (currentComposite == null) {
    return;
  }
  ScrolledComposite parentScrolledComposite=getParentScrolledComposite(currentComposite);
  if (parentScrolledComposite == null) {
    return;
  }
  ScrollBar vBar=parentScrolledComposite.getVerticalBar();
  Control content=parentScrolledComposite.getContent();
  if (content != null) {
    Point location=content.getLocation();
    int vSelection=vBar.getSelection();
    int increment=0;
    int thumb=vBar.getThumb();
    if (lastCursorPosition == null || lastCursorPosition.y == event.y) {
      long currentTimeMillis=System.currentTimeMillis();
      long time=currentTimeMillis - lastDragTime;
      if (lastDragTime != 0 && time > 100) {
        Point pointToScrollComposite=parentScrolledComposite.toControl(event.x,event.y);
        if (pointToScrollComposite.y < 40) {
          increment=-20;
        }
 else         if (thumb - pointToScrollComposite.y < 40) {
          increment=20;
        }
 else {
          return;
        }
      }
 else {
        return;
      }
    }
 else {
      increment=event.y - lastCursorPosition.y;
      if (increment > 0) {
        increment=increment + 3;
      }
 else {
        increment=increment - 3;
      }
    }
    if (vSelection >= 0 && vSelection + increment > 0 && vSelection + increment < vBar.getMaximum()) {
      vBar.setSelection(vSelection + increment);
    }
    content.setLocation(location.x,-(vSelection + increment));
    mapperManager.getUiManager().refreshBackground(true,false);
    lastDragTime=System.currentTimeMillis();
  }
}
Program: 120140
Project: 120140
Buggy source:
/** 
 * @param mapperManager
 * @param draggableControl
 * @param canBeSourceOfDragging
 * @param canBeTargetOfDragging
 */
public DragNDrop(MapperManager mapperManager,Control draggableControl,boolean canBeSourceOfDragging,boolean canBeTargetOfDragging){
  super();
  this.mapperManager=mapperManager;
  this.draggableControl=draggableControl;
  if (canBeSourceOfDragging) {
    createDragSource(dragSourceListener);
  }
  if (canBeTargetOfDragging) {
    TransferDropTargetListener completeDropTargetListener=null;
    if (draggableControl instanceof Table) {
      completeDropTargetListener=new CompleteDropTargetTableListener(mapperManager,(Table)draggableControl);
    }
 else     if (draggableControl instanceof StyledText) {
      completeDropTargetListener=new CompleteDropTargetStyledTextListener(mapperManager,(StyledText)draggableControl);
    }
    createDropTarget(completeDropTargetListener);
  }
}

Fixed version (ground truth):
/** 
 * @param mapperManager
 * @param draggableControl
 * @param canBeSourceOfDragging
 * @param canBeTargetOfDragging
 */
public DragNDrop(MapperManager mapperManager,Control draggableControl,boolean canBeSourceOfDragging,boolean canBeTargetOfDragging){
  super();
  this.mapperManager=mapperManager;
  this.draggableControl=draggableControl;
  if (canBeSourceOfDragging) {
    createDragSource(dragSourceListener);
  }
  if (canBeTargetOfDragging) {
    DefaultDropTargetListener completeDropTargetListener=null;
    if (draggableControl instanceof Table) {
      completeDropTargetListener=new CompleteDropTargetTableListener(mapperManager,(Table)draggableControl);
    }
 else     if (draggableControl instanceof StyledText) {
      completeDropTargetListener=new CompleteDropTargetStyledTextListener(mapperManager,(StyledText)draggableControl);
    }
 else {
      completeDropTargetListener=new DefaultDropTargetListener(mapperManager);
    }
    createDropTarget(completeDropTargetListener);
  }
}
Program: 120141
Project: 120141
Buggy source:
public boolean hasChildren(Object element){
  return getChildren(element).length > 0;
}

Fixed version (ground truth):
@Override public boolean hasChildren(Object element){
  return getChildren(element).length > 0;
}
Program: 120142
Project: 120142
Buggy source:
public String getColumnText(Object element,int columnIndex){
  RepositoryNode node=(RepositoryNode)element;
  if (columnIndex == 0) {
    return ((SqlBuilderRepositoryObject)node.getObject()).getSourceName();
  }
 else   if (columnIndex == 1) {
    return ((SqlBuilderRepositoryObject)node.getObject()).getRepositoryName();
  }
  return null;
}

Fixed version (ground truth):
@Override public String getColumnText(Object element,int columnIndex){
  RepositoryNode node=(RepositoryNode)element;
  if (columnIndex == 0) {
    return ((SqlBuilderRepositoryObject)node.getObject()).getSourceName();
  }
 else   if (columnIndex == 1) {
    return ((SqlBuilderRepositoryObject)node.getObject()).getRepositoryName();
  }
  return null;
}
Program: 120143
Project: 120143
Buggy source:
public void inputChanged(Viewer viewer,Object oldInput,Object newInput){
}

Fixed version (ground truth):
@Override public void inputChanged(Viewer viewer,Object oldInput,Object newInput){
}
Program: 120144
Project: 120144
Buggy source:
public Object getParent(Object element){
  RepositoryNode node=(RepositoryNode)element;
  final RepositoryNode parent=node.getParent();
  if (parent != null) {
    return parent;
  }
 else {
    return node;
  }
}

Fixed version (ground truth):
@Override public Object getParent(Object element){
  RepositoryNode node=(RepositoryNode)element;
  final RepositoryNode parent=node.getParent();
  if (parent != null) {
    return parent;
  }
 else {
    return node;
  }
}
Program: 120145
Project: 120145
Buggy source:
private void createQuery(RepositoryNode queriesConnectionNode,IRepositoryViewObject repObj,QueriesConnection queriesConnection){
  displayQueries.clear();
  for (Iterator iter=queriesConnection.getQuery().iterator(); iter.hasNext(); ) {
    Query query=(Query)iter.next();
    boolean isDelete=SubItemHelper.isDeleted(query);
    boolean isReadOnly=connectionParameters.isNodeReadOnly();
    if (isDelete && !isReadOnly) {
      continue;
    }
    QueryRepositoryObject repositoryObject=new QueryRepositoryObject(repObj,query);
    repositoryObject.setImage(IMAGES_SQL_EDITOR_ICON);
    repositoryObject.setSourceName(query.getLabel());
    RepositoryNode node=new RepositoryNodeExt(repositoryObject,queriesConnectionNode,ENodeType.REPOSITORY_ELEMENT);
    node.setProperties(EProperties.CONTENT_TYPE,RepositoryNodeType.QUERY);
    queriesConnectionNode.getChildren().add(node);
    if (connectionParameters.getQueryObject() != null && query.getLabel().equals(connectionParameters.getQueryObject().getLabel())) {
      this.selectedExtReposiotryNode=node;
    }
    displayQueries.add(query);
  }
}

Fixed version (ground truth):
private void createQuery(RepositoryNode queriesConnectionNode,IRepositoryViewObject repObj,QueriesConnection queriesConnection){
  displayQueries.clear();
  for (  Object element : queriesConnection.getQuery()) {
    Query query=(Query)element;
    boolean isDelete=SubItemHelper.isDeleted(query);
    boolean isReadOnly=connectionParameters.isNodeReadOnly();
    if (isDelete && !isReadOnly) {
      continue;
    }
    QueryRepositoryObject repositoryObject=new QueryRepositoryObject(repObj,query);
    repositoryObject.setImage(IMAGES_SQL_EDITOR_ICON);
    repositoryObject.setSourceName(query.getLabel());
    RepositoryNode node=new RepositoryNodeExt(repositoryObject,queriesConnectionNode,ENodeType.REPOSITORY_ELEMENT);
    node.setProperties(EProperties.CONTENT_TYPE,RepositoryNodeType.QUERY);
    queriesConnectionNode.getChildren().add(node);
    if (connectionParameters.getQueryObject() != null && query.getLabel().equals(connectionParameters.getQueryObject().getLabel())) {
      this.selectedExtReposiotryNode=node;
    }
    displayQueries.add(query);
  }
}