nus-yam/ex-repair huggingface dataset:
Program: 138571
Project: 138571
Buggy source:
public static List<IRepositoryNode> getUdisRepositoryNodes(){
  RepositoryNode node=getRootNode(EResourceConstant.LIBRARIES.getName());
  List<IRepositoryNode> udisNodes=new ArrayList<IRepositoryNode>();
  if (node != null) {
    List<IRepositoryNode> childrens=node.getChildren();
    for (    IRepositoryNode subNode : childrens) {
      if (EResourceConstant.INDICATORS.getName().equals((subNode.getObject().getLabel()))) {
        List<IRepositoryNode> subChildren=subNode.getChildren();
        for (        IRepositoryNode udisNode : subChildren) {
          if (udisNode instanceof UserDefIndicatorFolderRepNode) {
            udisNodes.addAll(getModelElementFromFolder(udisNode));
          }
        }
        return udisNodes;
      }
    }
  }
  return udisNodes;
}

Fixed version (ground truth):
public static List<IRepositoryNode> getUdisRepositoryNodes(){
  RepositoryNode node=getRootNode(EResourceConstant.LIBRARIES.getName());
  List<IRepositoryNode> udisNodes=new ArrayList<IRepositoryNode>();
  if (node != null) {
    List<IRepositoryNode> childrens=node.getChildren();
    for (    IRepositoryNode subNode : childrens) {
      if (EResourceConstant.INDICATORS.getName().equals((subNode.getObject().getLabel())) || EResourceConstant.RULES.getName().equals((subNode.getObject().getLabel()))) {
        List<IRepositoryNode> subChildren=subNode.getChildren();
        for (        IRepositoryNode udisNode : subChildren) {
          if (udisNode instanceof UserDefIndicatorFolderRepNode || udisNode instanceof RulesFolderRepNode) {
            udisNodes.addAll(getModelElementFromFolder(udisNode));
          }
        }
      }
    }
  }
  return udisNodes;
}
Program: 138573
Project: 138573
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void run(){
  hasDateColumn=false;
  hasNumberColumn=false;
  if (openStandardAnalysisDialog(AnalysisType.COLUMN_CORRELATION) == Window.OK) {
    AnalysisEditor editor=(AnalysisEditor)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
    if (editor != null) {
      ColumnCorrelationNominalAndIntervalMasterPage page=(ColumnCorrelationNominalAndIntervalMasterPage)editor.getMasterPage();
      if (!this.selection.isEmpty()) {
        TdColumn[] columns=new TdColumn[selection.size()];
        Iterator it=this.selection.iterator();
        int i=0;
        while (it.hasNext()) {
          columns[i]=(TdColumn)it.next();
          i++;
        }
        page.getTreeViewer().setInput(columns);
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void run(){
  hasDateColumn=false;
  hasNumberColumn=false;
  if (openStandardAnalysisDialog(AnalysisType.COLUMN_CORRELATION) == Window.OK) {
    AnalysisEditor editor=(AnalysisEditor)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
    if (editor != null) {
      ColumnCorrelationNominalAndIntervalMasterPage page=(ColumnCorrelationNominalAndIntervalMasterPage)editor.getMasterPage();
      if (!this.selection.isEmpty()) {
        DBColumnRepNode[] columns=new DBColumnRepNode[selection.size()];
        Iterator it=this.selection.iterator();
        int i=0;
        while (it.hasNext()) {
          columns[i]=(DBColumnRepNode)it.next();
          i++;
        }
        page.getTreeViewer().setInput(columns);
      }
    }
  }
}
Program: 138574
Project: 138574
Buggy source:
private void checkSelectedColumn(){
  if (!selection.isEmpty()) {
    Iterator it=selection.iterator();
    while (it.hasNext()) {
      TdColumn column=(TdColumn)it.next();
      if (Java2SqlType.isNumbericInSQL(column.getSqlDataType().getJavaDataType())) {
        hasNumberColumn=true;
      }
 else       if (Java2SqlType.isDateInSQL(column.getSqlDataType().getJavaDataType()) || Java2SqlType.isDateTimeSQL(column.getSqlDataType().getJavaDataType())) {
        hasDateColumn=true;
      }
    }
  }
}

Fixed version (ground truth):
private void checkSelectedColumn(){
  if (!selection.isEmpty()) {
    Iterator it=selection.iterator();
    while (it.hasNext()) {
      Object theObject=it.next();
      TdColumn column=null;
      if (theObject instanceof DBColumnRepNode) {
        column=((DBColumnRepNode)theObject).getTdColumn();
      }
      if (Java2SqlType.isNumbericInSQL(column.getSqlDataType().getJavaDataType())) {
        hasNumberColumn=true;
      }
 else       if (Java2SqlType.isDateInSQL(column.getSqlDataType().getJavaDataType()) || Java2SqlType.isDateTimeSQL(column.getSqlDataType().getJavaDataType())) {
        hasDateColumn=true;
      }
    }
  }
}
Program: 138575
Project: 138575
Buggy source:
/** 
 * ADD mzhao 15750 , build dq metadata tree, get connection root node.
 */
public static List<IRepositoryNode> getConnectionRepositoryNodes(){
  RepositoryNode node=getRootNode(EResourceConstant.METADATA.getName());
  List<IRepositoryNode> connNodes=new ArrayList<IRepositoryNode>();
  if (node != null) {
    List<IRepositoryNode> childrens=node.getChildren();
    for (    IRepositoryNode subNode : childrens) {
      if (subNode instanceof DBConnectionFolderRepNode || subNode instanceof DFConnectionFolderRepNode) {
        connNodes.addAll(subNode.getChildren());
      }
    }
  }
  return connNodes;
}

Fixed version (ground truth):
/** 
 * ADD mzhao 15750 , build dq metadata tree, get connection root node.
 */
public static List<IRepositoryNode> getConnectionRepositoryNodes(){
  RepositoryNode node=getRootNode(EResourceConstant.METADATA.getName());
  List<IRepositoryNode> connNodes=new ArrayList<IRepositoryNode>();
  if (node != null) {
    List<IRepositoryNode> childrens=node.getChildren();
    for (    IRepositoryNode subNode : childrens) {
      if (subNode instanceof DBConnectionFolderRepNode || subNode instanceof DFConnectionFolderRepNode) {
        connNodes.addAll(getConnectionFromFolder(subNode));
      }
    }
  }
  return connNodes;
}
Program: 138576
Project: 138576
Buggy source:
public ReturnCode save(Item item){
  ReturnCode rc=new ReturnCode();
  try {
    TDQAnalysisItem anaItem=(TDQAnalysisItem)item;
    if (anaItem != null && anaItem.eIsProxy()) {
      anaItem=(TDQAnalysisItem)EObjectHelper.resolveObject(anaItem);
      anaItem.getProperty().setLabel(anaItem.getAnalysis().getName());
    }
    Analysis analysis=anaItem.getAnalysis();
    addDependencies(analysis);
    addResourceContent(analysis.eResource(),analysis);
    ProxyRepositoryFactory.getInstance().save(anaItem);
  }
 catch (  PersistenceException e) {
    log.error(e,e);
    rc.setOk(Boolean.FALSE);
    rc.setMessage(e.getMessage());
  }
  return rc;
}

Fixed version (ground truth):
public ReturnCode save(Item item){
  ReturnCode rc=new ReturnCode();
  try {
    TDQAnalysisItem anaItem=(TDQAnalysisItem)item;
    if (anaItem != null && anaItem.eIsProxy()) {
      anaItem=(TDQAnalysisItem)EObjectHelper.resolveObject(anaItem);
      anaItem.getProperty().setLabel(anaItem.getAnalysis().getName());
    }
    Analysis analysis=anaItem.getAnalysis();
    addDependencies(analysis);
    addResourceContent(analysis.eResource(),analysis);
    anaItem.setAnalysis(analysis);
    ProxyRepositoryFactory.getInstance().save(anaItem);
  }
 catch (  PersistenceException e) {
    log.error(e,e);
    rc.setOk(Boolean.FALSE);
    rc.setMessage(e.getMessage());
  }
  return rc;
}
Program: 138577
Project: 138577
Buggy source:
protected void reloadDataproviderAndFillConnCombo(){
  List<IRepositoryNode> allConnectionReposNodes=DQStructureManager.getInstance().getConnectionRepositoryNodes();
  int index=0;
  connCombo.removeAll();
  for (  IRepositoryNode repNode : allConnectionReposNodes) {
    connCombo.add(repNode.getObject().getProperty().getLabel(),index);
    connCombo.setData(repNode.getObject().getProperty().getLabel(),index);
    connCombo.setData(index + "String_Node_Str",repNode);
    index++;
  }
  if (index > 0) {
    connCombo.select(0);
  }
}

Fixed version (ground truth):
protected void reloadDataproviderAndFillConnCombo(){
  List<IRepositoryNode> allConnectionReposNodes=RepositoryNodeHelper.getConnectionRepositoryNodes();
  int index=0;
  connCombo.removeAll();
  for (  IRepositoryNode repNode : allConnectionReposNodes) {
    connCombo.add(repNode.getObject().getProperty().getLabel(),index);
    connCombo.setData(repNode.getObject().getProperty().getLabel(),index);
    connCombo.setData(index + "String_Node_Str",repNode);
    index++;
  }
  if (index > 0) {
    connCombo.select(0);
  }
}
Program: 138585
Project: 138585
Buggy source:
/** 
 * DOC bZhou Comment method "initialize".
 */
private void initialize(){
  URI itemURI=URI.createFileURI(file.getAbsolutePath());
  URI propURI=itemURI.trimFileExtension().appendFileExtension(FactoriesUtil.PROPERTIES_EXTENSION);
  elementEName=EElementEName.findENameByExt(itemURI.fileExtension());
  try {
    if (property == null) {
      Resource resource=resourceSet.getResource(propURI,true);
      property=(Property)EcoreUtil.getObjectByType(resource.getContents(),PropertiesPackage.eINSTANCE.getProperty());
    }
    if (element == null && !isJRXml()) {
      Resource resource=resourceSet.getResource(itemURI,true);
      EList<EObject> contents=resource.getContents();
      if (contents != null && !contents.isEmpty()) {
        if (property.getItem() instanceof ConnectionItem) {
          element=((ConnectionItem)property.getItem()).getConnection();
        }
 else {
          EObject object=contents.get(0);
          element=(ModelElement)object;
        }
      }
    }
    computeDependencies();
  }
 catch (  Exception e) {
    log.error("String_Node_Str" + getName() + "String_Node_Str"+ e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "initialize".
 */
private void initialize(){
  URI itemURI=URI.createFileURI(file.getAbsolutePath());
  URI propURI=itemURI.trimFileExtension().appendFileExtension(FactoriesUtil.PROPERTIES_EXTENSION);
  elementEName=EElementEName.findENameByExt(itemURI.fileExtension());
  try {
    if (property == null) {
      Resource resource=resourceSet.getResource(propURI,true);
      property=(Property)EcoreUtil.getObjectByType(resource.getContents(),PropertiesPackage.eINSTANCE.getProperty());
    }
    if (element == null && !isJRXml()) {
      Resource resource=resourceSet.getResource(itemURI,true);
      EList<EObject> contents=resource.getContents();
      if (contents != null && !contents.isEmpty()) {
        if (property.getItem() instanceof ConnectionItem) {
          element=((ConnectionItem)property.getItem()).getConnection();
        }
 else {
          EObject object=contents.get(0);
          element=(ModelElement)object;
        }
      }
    }
    computeDependencies();
  }
 catch (  Exception e) {
    if (!isSQL()) {
      log.error("String_Node_Str" + getName() + "String_Node_Str"+ e.getMessage(),e);
    }
  }
}
Program: 138587
Project: 138587
Buggy source:
/** 
 * DOC klliu Comment method "copyFileToFolder".
 * @param inputStream
 * @param fileName
 * @param folder
 * @throws CoreException
 * @throws IOException
 */
private void copyFileToFolder(InputStream inputStream,String fileName,IFolder folder) throws CoreException, IOException {
  if (inputStream == null) {
    return;
  }
  IFile element=folder.getFile(fileName);
  if (!element.exists()) {
    element.create(inputStream,false,null);
    ModelElement modelElement=ModelElementFileFactory.getModelElement(element);
    if (modelElement != null) {
      AElementPersistance writer=ElementWriterFactory.getInstance().create(element.getFileExtension());
      if (writer != null) {
        writer.create(modelElement,folder);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC klliu Comment method "copyFileToFolder".
 * @param inputStream
 * @param fileName
 * @param folder
 * @throws CoreException
 * @throws IOException
 */
private void copyFileToFolder(InputStream inputStream,String fileName,IFolder folder) throws CoreException, IOException {
  if (inputStream == null) {
    return;
  }
  IFile element=folder.getFile(fileName);
  if (!element.exists()) {
    element.create(inputStream,false,null);
    ModelElement modelElement=ModelElementFileFactory.getModelElement(element);
    if (modelElement != null) {
      AElementPersistance writer=ElementWriterFactory.getInstance().create(element.getFileExtension());
      if (writer != null) {
        writer.create(modelElement,folder);
        element.delete(true,null);
      }
    }
  }
}
Program: 138588
Project: 138588
Buggy source:
private List<String> doCollectChildNames(final RepositoryNode node){
  List<String> names=new ArrayList<String>();
  for (  IRepositoryNode sibling : node.getChildren()) {
    names.add((String)sibling.getProperties(EProperties.LABEL));
  }
  return names;
}

Fixed version (ground truth):
private List<String> doCollectChildNames(final RepositoryNode node){
  List<String> names=new ArrayList<String>();
  for (  IRepositoryNode sibling : node.getChildren()) {
    names.add(sibling.getObject().getProperty().getLabel());
  }
  return names;
}
Program: 138589
Project: 138589
Buggy source:
protected String[] collectSiblingNames(final RepositoryNode node){
  List<String> names=doCollectChildNames(node.getParent());
  names.remove((String)node.getProperties(EProperties.LABEL));
  return names.toArray(new String[names.size()]);
}

Fixed version (ground truth):
protected String[] collectSiblingNames(final RepositoryNode node){
  List<String> names=doCollectChildNames(node.getParent());
  names.remove(node.getObject().getProperty().getLabel());
  return names.toArray(new String[names.size()]);
}
Program: 138590
Project: 138590
Buggy source:
/** 
 * DOC klliu DBCatalogRepNode constructor comment.
 * @param object
 * @param parent
 * @param type
 */
public DBCatalogRepNode(IRepositoryViewObject object,RepositoryNode parent,ENodeType type){
  super(object,parent,type);
  parentObject=object;
}

Fixed version (ground truth):
/** 
 * DOC klliu DBCatalogRepNode constructor comment.
 * @param object
 * @param parent
 * @param type
 */
public DBCatalogRepNode(IRepositoryViewObject object,RepositoryNode parent,ENodeType type){
  super(object,parent,type);
  parentObject=object;
  schemaChildren=new ArrayList<IRepositoryNode>();
}
Program: 138591
Project: 138591
Buggy source:
/** 
 * Create SchemaRepositoryNode under CatalogRepositoryNode.
 * @param node parent CatalogRepositoryNode
 * @param metadataCatalog parent CatalogViewObject
 * @param schema the schema should to be added under the catalog
 */
private List<IRepositoryNode> createRepositoryNodeSchema(List<Schema> schemas){
  List<IRepositoryNode> repsNodes=new ArrayList<IRepositoryNode>();
  for (  Schema schema : schemas) {
    MetadataSchemaRepositoryObject metadataSchema=new MetadataSchemaRepositoryObject(((MetadataCatalogRepositoryObject)getObject()).getViewObject(),schema);
    RepositoryNode schemaNode=new DBSchemaRepNode((IRepositoryViewObject)metadataSchema,this,ENodeType.TDQ_REPOSITORY_ELEMENT);
    schemaNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_CON_SCHEMA);
    schemaNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_CON_SCHEMA);
    metadataSchema.setRepositoryNode(schemaNode);
    repsNodes.add(schemaNode);
  }
  return repsNodes;
}

Fixed version (ground truth):
/** 
 * Create SchemaRepositoryNode under CatalogRepositoryNode.
 * @param node parent CatalogRepositoryNode
 * @param metadataCatalog parent CatalogViewObject
 * @param schema the schema should to be added under the catalog
 */
private List<IRepositoryNode> createRepositoryNodeSchema(List<Schema> schemas){
  if (!schemaChildren.isEmpty()) {
    return schemaChildren;
  }
  for (  Schema schema : schemas) {
    MetadataSchemaRepositoryObject metadataSchema=new MetadataSchemaRepositoryObject(((MetadataCatalogRepositoryObject)getObject()).getViewObject(),schema);
    RepositoryNode schemaNode=new DBSchemaRepNode((IRepositoryViewObject)metadataSchema,this,ENodeType.TDQ_REPOSITORY_ELEMENT);
    schemaNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_CON_SCHEMA);
    schemaNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_CON_SCHEMA);
    metadataSchema.setRepositoryNode(schemaNode);
    schemaChildren.add(schemaNode);
  }
  return schemaChildren;
}
Program: 138592
Project: 138592
Buggy source:
@Override public List<IRepositoryNode> getChildren(){
  List<IRepositoryNode> repsNodes=new ArrayList<IRepositoryNode>();
  List<TdColumn> tdcolumns=new ArrayList<TdColumn>();
  IRepositoryViewObject meataColumnSetObject=this.getObject();
  if (meataColumnSetObject instanceof TdTableRepositoryObject) {
    TdTableRepositoryObject tdTableRepositoryObject=(TdTableRepositoryObject)meataColumnSetObject;
    object=tdTableRepositoryObject.getViewObject();
    tdTable=tdTableRepositoryObject.getTdTable();
    columns=tdTable.getColumns();
  }
 else   if (meataColumnSetObject instanceof TdViewRepositoryObject) {
    TdViewRepositoryObject tdViewRepositoryObject=(TdViewRepositoryObject)meataColumnSetObject;
    object=tdViewRepositoryObject.getViewObject();
    tdView=tdViewRepositoryObject.getTdView();
    columns=tdView.getColumns();
  }
  item=(ConnectionItem)object.getProperty().getItem();
  connection=item.getConnection();
  if (columns.size() <= 0) {
    try {
      if (tdTable != null) {
        tdcolumns=DqRepositoryViewService.getColumns(connection,tdTable,null,true);
      }
 else       if (tdView != null) {
        tdcolumns=DqRepositoryViewService.getColumns(connection,tdView,null,true);
      }
    }
 catch (    Exception e) {
      log.error(e,e);
    }
  }
 else {
    for (    MetadataColumn mec : columns) {
      tdcolumns.add((TdColumn)mec);
    }
  }
  createTdcolumnsNode(tdcolumns,repsNodes);
  return repsNodes;
}

Fixed version (ground truth):
@Override public List<IRepositoryNode> getChildren(){
  if (!children.isEmpty()) {
    return children;
  }
  List<TdColumn> tdcolumns=new ArrayList<TdColumn>();
  IRepositoryViewObject meataColumnSetObject=this.getObject();
  if (meataColumnSetObject instanceof TdTableRepositoryObject) {
    TdTableRepositoryObject tdTableRepositoryObject=(TdTableRepositoryObject)meataColumnSetObject;
    object=tdTableRepositoryObject.getViewObject();
    tdTable=tdTableRepositoryObject.getTdTable();
    columns=tdTable.getColumns();
  }
 else   if (meataColumnSetObject instanceof TdViewRepositoryObject) {
    TdViewRepositoryObject tdViewRepositoryObject=(TdViewRepositoryObject)meataColumnSetObject;
    object=tdViewRepositoryObject.getViewObject();
    tdView=tdViewRepositoryObject.getTdView();
    columns=tdView.getColumns();
  }
  item=(ConnectionItem)object.getProperty().getItem();
  connection=item.getConnection();
  if (columns.size() <= 0) {
    try {
      if (tdTable != null) {
        tdcolumns=DqRepositoryViewService.getColumns(connection,tdTable,null,true);
      }
 else       if (tdView != null) {
        tdcolumns=DqRepositoryViewService.getColumns(connection,tdView,null,true);
      }
    }
 catch (    Exception e) {
      log.error(e,e);
    }
  }
 else {
    for (    MetadataColumn mec : columns) {
      tdcolumns.add((TdColumn)mec);
    }
  }
  createTdcolumnsNode(tdcolumns,children);
  return children;
}
Program: 138593
Project: 138593
Buggy source:
/** 
 * DOC klliu DBColumnFolderRepNode constructor comment.
 * @param object
 * @param parent
 * @param type
 */
public DBColumnFolderRepNode(IRepositoryViewObject object,RepositoryNode parent,ENodeType type){
  super(object,parent,type);
}

Fixed version (ground truth):
/** 
 * DOC klliu DBColumnFolderRepNode constructor comment.
 * @param object
 * @param parent
 * @param type
 */
public DBColumnFolderRepNode(IRepositoryViewObject object,RepositoryNode parent,ENodeType type){
  super(object,parent,type);
  children=new ArrayList<IRepositoryNode>();
}
Program: 138594
Project: 138594
Buggy source:
/** 
 * DOC klliu FolderRepNode constructor comment.
 * @param object
 * @param parent
 * @param type
 */
public DBTableFolderRepNode(IRepositoryViewObject object,RepositoryNode parent,ENodeType type){
  super(object,parent,type);
}

Fixed version (ground truth):
/** 
 * DOC klliu FolderRepNode constructor comment.
 * @param object
 * @param parent
 * @param type
 */
public DBTableFolderRepNode(IRepositoryViewObject object,RepositoryNode parent,ENodeType type){
  super(object,parent,type);
  children=new ArrayList<IRepositoryNode>();
}
Program: 138595
Project: 138595
Buggy source:
@Override public List<IRepositoryNode> getChildren(){
  List<IRepositoryNode> repsNodes=new ArrayList<IRepositoryNode>();
  IRepositoryViewObject object=this.getParent().getObject();
  createRepositoryNodeTableFolderNode(repsNodes,object);
  return repsNodes;
}

Fixed version (ground truth):
@Override public List<IRepositoryNode> getChildren(){
  if (!children.isEmpty()) {
    return children;
  }
  IRepositoryViewObject object=this.getParent().getObject();
  createRepositoryNodeTableFolderNode(children,object);
  return children;
}
Program: 138598
Project: 138598
Buggy source:
public static final Connection getTdDataProvider(ModelElementIndicator indicator){
  Item connItem=indicator.getModelElementRepositoryNode().getObject().getProperty().getItem();
  if (connItem instanceof ConnectionItem) {
    return ((ConnectionItem)connItem).getConnection();
  }
  return null;
}

Fixed version (ground truth):
public static final Connection getTdDataProvider(ModelElementIndicator indicator){
  Property property=indicator.getModelElementRepositoryNode().getObject().getProperty();
  if (property != null && property.getItem() instanceof ConnectionItem) {
    return ((ConnectionItem)property.getItem()).getConnection();
  }
  return null;
}
Program: 138599
Project: 138599
Buggy source:
public String[] getAvailableLanguages(){
  String[] languages={ECodeLanguage.JAVA.getName(),ECodeLanguage.PERL.getName()};
  return languages;
}

Fixed version (ground truth):
public String[] getAvailableLanguages(){
  String[] languages;
  if (GlobalServiceRegister.getDefault().isServiceRegistered(ICorePerlService.class)) {
    languages=new String[]{ECodeLanguage.JAVA.getName(),ECodeLanguage.PERL.getName()};
  }
 else {
    languages=new String[]{ECodeLanguage.JAVA.getName()};
  }
  return languages;
}
Program: 138600
Project: 138600
Buggy source:
@Override public void handleUnload(Resource toBeUnloadedResource){
  for (  EObject eObject : toBeUnloadedResource.getContents()) {
    if (eObject instanceof DatabaseConnection) {
    }
 else     if (eObject instanceof MDMConnection) {
      if (xmiResourceManager != null) {
        try {
          xmiResourceManager.saveResource(toBeUnloadedResource);
        }
 catch (        PersistenceException e) {
          log.error(e,e);
        }
      }
    }
  }
  super.handleUnload(toBeUnloadedResource);
}

Fixed version (ground truth):
@Override public void handleUnload(Resource toBeUnloadedResource){
  for (  EObject eObject : toBeUnloadedResource.getContents()) {
    if (eObject instanceof DatabaseConnection) {
    }
 else     if (eObject instanceof MDMConnection) {
    }
  }
  super.handleUnload(toBeUnloadedResource);
}
Program: 138602
Project: 138602
Buggy source:
@Override public IndicatorParameters getParameters(){
  parameters=super.getParameters();
  if (parameters == null) {
    parameters=IndicatorsFactory.eINSTANCE.createIndicatorParameters();
  }
  TextParameters textParameters=parameters.getTextParameter();
  if (textParameters == null) {
    textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
  }
  textParameters.setUseNulls(false);
  textParameters.setUseBlank(true);
  parameters.setTextParameter(textParameters);
  return parameters;
}

Fixed version (ground truth):
@Override public IndicatorParameters getParameters(){
  if (parameters != null) {
    TextParameters textParameters=parameters.getTextParameter();
    if (textParameters == null) {
      textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
    }
    textParameters.setUseNulls(false);
    textParameters.setUseBlank(true);
    parameters.setTextParameter(textParameters);
  }
  return parameters;
}
Program: 138603
Project: 138603
Buggy source:
@Override public IndicatorParameters getParameters(){
  parameters=super.getParameters();
  if (parameters == null) {
    parameters=IndicatorsFactory.eINSTANCE.createIndicatorParameters();
  }
  TextParameters textParameters=parameters.getTextParameter();
  if (textParameters == null) {
    textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
  }
  textParameters.setUseNulls(true);
  textParameters.setUseBlank(true);
  parameters.setTextParameter(textParameters);
  return parameters;
}

Fixed version (ground truth):
@Override public IndicatorParameters getParameters(){
  if (parameters != null) {
    TextParameters textParameters=parameters.getTextParameter();
    if (textParameters == null) {
      textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
    }
    textParameters.setUseNulls(true);
    textParameters.setUseBlank(true);
    parameters.setTextParameter(textParameters);
  }
  return parameters;
}
Program: 138604
Project: 138604
Buggy source:
@Override public IndicatorParameters getParameters(){
  parameters=super.getParameters();
  if (parameters == null) {
    parameters=IndicatorsFactory.eINSTANCE.createIndicatorParameters();
  }
  TextParameters textParameters=parameters.getTextParameter();
  if (textParameters == null) {
    textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
  }
  textParameters.setUseNulls(true);
  textParameters.setUseBlank(false);
  parameters.setTextParameter(textParameters);
  return parameters;
}

Fixed version (ground truth):
@Override public IndicatorParameters getParameters(){
  if (parameters != null) {
    TextParameters textParameters=parameters.getTextParameter();
    if (textParameters == null) {
      textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
    }
    textParameters.setUseNulls(true);
    textParameters.setUseBlank(false);
    parameters.setTextParameter(textParameters);
  }
  return parameters;
}
Program: 138605
Project: 138605
Buggy source:
@Override public IndicatorParameters getParameters(){
  parameters=super.getParameters();
  if (parameters == null) {
    parameters=IndicatorsFactory.eINSTANCE.createIndicatorParameters();
  }
  TextParameters textParameters=parameters.getTextParameter();
  if (textParameters == null) {
    textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
  }
  textParameters.setUseNulls(false);
  textParameters.setUseBlank(true);
  parameters.setTextParameter(textParameters);
  return parameters;
}

Fixed version (ground truth):
@Override public IndicatorParameters getParameters(){
  if (parameters != null) {
    TextParameters textParameters=parameters.getTextParameter();
    if (textParameters == null) {
      textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
    }
    textParameters.setUseNulls(false);
    textParameters.setUseBlank(true);
    parameters.setTextParameter(textParameters);
  }
  return parameters;
}
Program: 138606
Project: 138606
Buggy source:
@Override public IndicatorParameters getParameters(){
  parameters=super.getParameters();
  if (parameters == null) {
    parameters=IndicatorsFactory.eINSTANCE.createIndicatorParameters();
  }
  TextParameters textParameters=parameters.getTextParameter();
  if (textParameters == null) {
    textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
  }
  textParameters.setUseNulls(true);
  textParameters.setUseBlank(true);
  parameters.setTextParameter(textParameters);
  return parameters;
}

Fixed version (ground truth):
@Override public IndicatorParameters getParameters(){
  if (parameters != null) {
    TextParameters textParameters=parameters.getTextParameter();
    if (textParameters == null) {
      textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
    }
    textParameters.setUseNulls(true);
    textParameters.setUseBlank(true);
    parameters.setTextParameter(textParameters);
  }
  return parameters;
}
Program: 138607
Project: 138607
Buggy source:
@Override public IndicatorParameters getParameters(){
  parameters=super.getParameters();
  if (parameters == null) {
    parameters=IndicatorsFactory.eINSTANCE.createIndicatorParameters();
  }
  TextParameters textParameters=parameters.getTextParameter();
  if (textParameters == null) {
    textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
  }
  textParameters.setUseNulls(true);
  textParameters.setUseBlank(false);
  parameters.setTextParameter(textParameters);
  return parameters;
}

Fixed version (ground truth):
@Override public IndicatorParameters getParameters(){
  if (parameters != null) {
    TextParameters textParameters=parameters.getTextParameter();
    if (textParameters == null) {
      textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
    }
    textParameters.setUseNulls(true);
    textParameters.setUseBlank(false);
    parameters.setTextParameter(textParameters);
  }
  return parameters;
}
Program: 138608
Project: 138608
Buggy source:
@Override public IndicatorParameters getParameters(){
  parameters=super.getParameters();
  if (parameters == null) {
    parameters=IndicatorsFactory.eINSTANCE.createIndicatorParameters();
  }
  TextParameters textParameters=parameters.getTextParameter();
  if (textParameters == null) {
    textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
  }
  textParameters.setUseNulls(false);
  textParameters.setUseBlank(true);
  parameters.setTextParameter(textParameters);
  return parameters;
}

Fixed version (ground truth):
@Override public IndicatorParameters getParameters(){
  if (parameters != null) {
    TextParameters textParameters=parameters.getTextParameter();
    if (textParameters == null) {
      textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
    }
    textParameters.setUseNulls(false);
    textParameters.setUseBlank(true);
    parameters.setTextParameter(textParameters);
  }
  return parameters;
}
Program: 138609
Project: 138609
Buggy source:
@Override public IndicatorParameters getParameters(){
  parameters=super.getParameters();
  if (parameters == null) {
    parameters=IndicatorsFactory.eINSTANCE.createIndicatorParameters();
  }
  TextParameters textParameters=parameters.getTextParameter();
  if (textParameters == null) {
    textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
  }
  textParameters.setUseNulls(true);
  textParameters.setUseBlank(true);
  parameters.setTextParameter(textParameters);
  return parameters;
}

Fixed version (ground truth):
@Override public IndicatorParameters getParameters(){
  if (parameters != null) {
    TextParameters textParameters=parameters.getTextParameter();
    if (textParameters == null) {
      textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
    }
    textParameters.setUseNulls(true);
    textParameters.setUseBlank(true);
    parameters.setTextParameter(textParameters);
  }
  return parameters;
}
Program: 138610
Project: 138610
Buggy source:
@Override public IndicatorParameters getParameters(){
  parameters=super.getParameters();
  if (parameters == null) {
    parameters=IndicatorsFactory.eINSTANCE.createIndicatorParameters();
  }
  TextParameters textParameters=parameters.getTextParameter();
  if (textParameters == null) {
    textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
  }
  textParameters.setUseNulls(true);
  textParameters.setUseBlank(false);
  parameters.setTextParameter(textParameters);
  return parameters;
}

Fixed version (ground truth):
@Override public IndicatorParameters getParameters(){
  if (parameters != null) {
    TextParameters textParameters=parameters.getTextParameter();
    if (textParameters == null) {
      textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
    }
    textParameters.setUseNulls(true);
    textParameters.setUseBlank(false);
    parameters.setTextParameter(textParameters);
  }
  return parameters;
}
Program: 138611
Project: 138611
Buggy source:
@Override public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
  monitor.beginTask(DefaultMessagesImpl.getString("String_Node_Str",analysis.getName()),IProgressMonitor.UNKNOWN);
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      if (listener != null) {
        listener.fireRuningItemChanged(false);
      }
    }
  }
);
  ReturnCode executed=null;
  AnalysisExecutorThread aet=new AnalysisExecutorThread(analysis,monitor);
  new Thread(aet).start();
  while (true) {
    if (aet.getExecuted() != null) {
      executed=aet.getExecuted();
      break;
    }
    if (monitor.isCanceled()) {
      executed=new ReturnCode(DefaultMessagesImpl.getString("String_Node_Str"),false);
      break;
    }
  }
  aet=null;
  monitor.done();
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      if (listener != null) {
        listener.fireRuningItemChanged(true);
      }
    }
  }
);
  displayResultStatus(executed);
  return Status.OK_STATUS;
}

Fixed version (ground truth):
@Override public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
  monitor.beginTask(DefaultMessagesImpl.getString("String_Node_Str",analysis.getName()),IProgressMonitor.UNKNOWN);
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      if (listener != null) {
        listener.fireRuningItemChanged(false);
      }
    }
  }
);
  ReturnCode executed=null;
  AnalysisExecutorThread aet=new AnalysisExecutorThread(analysis,monitor);
  new Thread(aet).start();
  while (true) {
    if (aet.getExecuted() != null) {
      executed=aet.getExecuted();
      break;
    }
    if (monitor.isCanceled()) {
      executed=new ReturnCode(DefaultMessagesImpl.getString("String_Node_Str"),false);
      break;
    }
  }
  aet=null;
  monitor.done();
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      if (listener != null) {
        listener.fireRuningItemChanged(true);
      }
      CorePlugin.getDefault().refreshDQView();
    }
  }
);
  displayResultStatus(executed);
  return Status.OK_STATUS;
}
Program: 138612
Project: 138612
Buggy source:
@Override protected void createFormContent(IManagedForm managedForm){
  this.form=managedForm.getForm();
  Composite body=form.getBody();
  body.setLayout(new GridLayout());
  final SashForm sForm=new SashForm(body,SWT.NULL);
  sForm.setLayoutData(new GridData(GridData.FILL_BOTH));
  topComp=toolkit.createComposite(sForm);
  topComp.setLayoutData(new GridData(GridData.FILL_BOTH));
  topComp.setLayout(new GridLayout());
  metadataSection=creatMetadataSection(form,topComp);
  metadataSection.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  metadataSection.setDescription(DefaultMessagesImpl.getString("String_Node_Str"));
  form.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  createAnalysisColumnsSection(form,topComp);
  createIndicatorsSection(form,topComp);
  createDataFilterSection(form,topComp);
  Composite previewComp=toolkit.createComposite(sForm);
  previewComp.setLayoutData(new GridData(GridData.FILL_BOTH));
  previewComp.setLayout(new GridLayout());
  previewComp.addControlListener(new ControlAdapter(){
    @Override public void controlResized(    ControlEvent e){
      super.controlResized(e);
      sForm.redraw();
      form.reflow(true);
    }
  }
);
  createPreviewSection(form,previewComp);
}

Fixed version (ground truth):
@Override protected void createFormContent(IManagedForm managedForm){
  this.form=managedForm.getForm();
  Composite body=form.getBody();
  body.setLayout(new GridLayout());
  final SashForm sForm=new SashForm(body,SWT.NULL);
  sForm.setLayoutData(new GridData(GridData.FILL_BOTH));
  topComp=toolkit.createComposite(sForm);
  topComp.setLayoutData(new GridData(GridData.FILL_BOTH));
  topComp.setLayout(new GridLayout());
  metadataSection=creatMetadataSection(form,topComp);
  metadataSection.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  metadataSection.setDescription(DefaultMessagesImpl.getString("String_Node_Str"));
  form.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  createAnalysisColumnsSection(form,topComp);
  createIndicatorsSection(form,topComp);
  createDataFilterSection(form,topComp);
  createAnalysisParamSection(form,topComp);
  Composite previewComp=toolkit.createComposite(sForm);
  previewComp.setLayoutData(new GridData(GridData.FILL_BOTH));
  previewComp.setLayout(new GridLayout());
  previewComp.addControlListener(new ControlAdapter(){
    @Override public void controlResized(    ControlEvent e){
      super.controlResized(e);
      sForm.redraw();
      form.reflow(true);
    }
  }
);
  createPreviewSection(form,previewComp);
}
Program: 138615
Project: 138615
Buggy source:
/** 
 * DOC bZhou Comment method "isWithRowCountIndicator". If have RowCountIndicator in the indicator list, return true, otherwise, return false.
 * @return
 */
protected boolean isWithRowCountIndicator(){
  if (!units.isEmpty()) {
    Indicator indicator=units.get(0).getIndicator();
    ModelElement currentAnalyzedElement=indicator.getAnalyzedElement();
    InternalEObject eIndicator=(InternalEObject)indicator;
    AnalysisResult result=(AnalysisResult)eIndicator.eContainer();
    for (    Indicator indi : result.getIndicators()) {
      ModelElement analyzedElement=indi.getAnalyzedElement();
      if (indi instanceof RowCountIndicator && analyzedElement == currentAnalyzedElement) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "isWithRowCountIndicator". If have RowCountIndicator in the indicator list, return true, otherwise, return false.
 * @return
 */
protected boolean isWithRowCountIndicator(){
  if (!units.isEmpty()) {
    Indicator indicator=units.get(0).getIndicator();
    ModelElement currentAnalyzedElement=indicator.getAnalyzedElement();
    InternalEObject eIndicator=(InternalEObject)indicator;
    AnalysisResult result=(AnalysisResult)eIndicator.eContainer();
    for (    Indicator indi : result.getIndicators()) {
      ModelElement analyzedElement=indi.getAnalyzedElement();
      if (analyzedElement == currentAnalyzedElement) {
        if (indi instanceof RowCountIndicator) {
          return true;
        }
 else         if (indi instanceof CountsIndicator) {
          CountsIndicator cindi=(CountsIndicator)indi;
          return cindi.getRowCountIndicator() != null;
        }
      }
    }
  }
  return false;
}
Program: 138616
Project: 138616
Buggy source:
/** 
 * Create a new database node with the given name
 * @param name
 * @param alias
 */
public DatabaseNode(String name,MetaDataSession session) throws SQLException {
  super(name,session);
  setImageKey("String_Node_Str");
  try {
    SQLDatabaseMetaData metadata=_session.getMetaData();
    if (metadata.supportsCatalogs()) {
      _supportsCatalogs=true;
    }
    if (metadata.supportsSchemas()) {
      _supportsSchemas=true;
    }
    _databaseProductName=metadata.getDatabaseProductName();
    try {
      _databaseVersion="String_Node_Str" + metadata.getJDBCMetaData().getDatabaseMajorVersion() + "String_Node_Str"+ metadata.getJDBCMetaData().getDatabaseMinorVersion()+ "String_Node_Str";
    }
 catch (    Exception e) {
      SQLExplorerPlugin.error("String_Node_Str",e);
      _databaseVersion="String_Node_Str";
    }
  }
 catch (  AbstractMethodError e) {
    SQLExplorerPlugin.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Create a new database node with the given name
 * @param name
 * @param alias
 */
public DatabaseNode(String name,MetaDataSession session) throws SQLException {
  super(name,session);
  setImageKey("String_Node_Str");
  try {
    SQLDatabaseMetaData metadata=_session.getMetaData();
    if (metadata.supportsCatalogs()) {
      _supportsCatalogs=true;
    }
    if (metadata.supportsSchemas()) {
      _supportsSchemas=true;
    }
    _databaseProductName=metadata.getDatabaseProductName();
    try {
      _databaseVersion="String_Node_Str" + metadata.getJDBCMetaData().getDatabaseMajorVersion() + "String_Node_Str"+ metadata.getJDBCMetaData().getDatabaseMinorVersion()+ "String_Node_Str";
    }
 catch (    Exception e) {
      _databaseVersion="String_Node_Str";
    }
  }
 catch (  AbstractMethodError e) {
    SQLExplorerPlugin.error("String_Node_Str",e);
  }
}
Program: 138617
Project: 138617
Buggy source:
/** 
 * DOC bZhou Comment method "update".
 * @param oldObject
 * @param newObject
 * @return
 */
protected ModelElement update(ModelElement oldObject,ModelElement newObject){
  newObject.setName("String_Node_Str" + newObject.getName());
  String author=ReponsitoryContextBridge.getAuthor();
  if (!StringUtils.isEmpty(author)) {
    MetadataHelper.setAuthor(newObject,author);
  }
  return newObject;
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "update".
 * @param oldObject
 * @param newObject
 * @return
 */
protected ModelElement update(ModelElement oldObject,ModelElement newObject){
  newObject.setName("String_Node_Str" + newObject.getName());
  String author=ReponsitoryContextBridge.getAuthor();
  if (!StringUtils.isEmpty(author)) {
    MetadataHelper.setAuthor(newObject,author);
  }
  newObject.getClientDependency().addAll(oldObject.getClientDependency());
  return newObject;
}
Program: 138619
Project: 138619
Buggy source:
public void handleEvent(Event event){
  int columnIndex=getColumnIndex(table,column);
  TableItem[] items=table.getItems();
  int length="String_Node_Str".equals(items[items.length - 1].getText(columnIndex)) ? items.length - 1 : items.length;
  for (int i=1; i < length; i++) {
    String value2=items[i].getText(columnIndex);
    for (int j=0; j < i; j++) {
      String value1=items[j].getText(columnIndex);
      boolean isLessThan=true;
      if (StringUtils.isNumeric(value2) && StringUtils.isNumeric(value1)) {
        isLessThan=Long.valueOf(value2).compareTo(Long.valueOf(value1)) < 0;
      }
 else {
        isLessThan=comparator.compare(value2,value1) < 0;
      }
      if ((isAscend && isLessThan) || (!isAscend && !isLessThan)) {
        String[] values=getTableItemText(table,items[i]);
        Object obj=items[i].getData();
        items[i].dispose();
        TableItem item=new TableItem(table,SWT.NONE,j);
        item.setText(values);
        item.setData(obj);
        items=table.getItems();
        break;
      }
    }
  }
  table.setSortColumn(column);
  table.setSortDirection((isAscend ? SWT.UP : SWT.DOWN));
  isAscend=!isAscend;
}

Fixed version (ground truth):
public void handleEvent(Event event){
  int columnIndex=getColumnIndex(table,column);
  TableItem[] items=table.getItems();
  int length="String_Node_Str".equals(items[items.length - 1].getText(columnIndex)) ? items.length - 1 : items.length;
  for (int i=1; i < length; i++) {
    String value2=items[i].getText(columnIndex);
    for (int j=0; j < i; j++) {
      String value1=items[j].getText(columnIndex);
      boolean isLessThan=true;
      if (StringUtils.isNumeric(value2) && StringUtils.isNotEmpty(value2) && StringUtils.isNumeric(value1)&& StringUtils.isNotEmpty(value1)) {
        isLessThan=Long.valueOf(value2).compareTo(Long.valueOf(value1)) < 0;
      }
 else {
        isLessThan=comparator.compare(value2,value1) < 0;
      }
      if ((isAscend && isLessThan) || (!isAscend && !isLessThan)) {
        String[] values=getTableItemText(table,items[i]);
        Object obj=items[i].getData();
        items[i].dispose();
        TableItem item=new TableItem(table,SWT.NONE,j);
        item.setText(values);
        item.setData(obj);
        items=table.getItems();
        break;
      }
    }
  }
  table.setSortColumn(column);
  table.setSortDirection((isAscend ? SWT.UP : SWT.DOWN));
  isAscend=!isAscend;
}
Program: 138620
Project: 138620
Buggy source:
private void addSorter(final Table table,final TableColumn column){
  column.addListener(SWT.Selection,new Listener(){
    boolean isAscend=true;
    Collator comparator=Collator.getInstance(Locale.getDefault());
    public void handleEvent(    Event event){
      int columnIndex=getColumnIndex(table,column);
      TableItem[] items=table.getItems();
      int length="String_Node_Str".equals(items[items.length - 1].getText(columnIndex)) ? items.length - 1 : items.length;
      for (int i=1; i < length; i++) {
        String value2=items[i].getText(columnIndex);
        for (int j=0; j < i; j++) {
          String value1=items[j].getText(columnIndex);
          boolean isLessThan=true;
          if (StringUtils.isNumeric(value2) && StringUtils.isNumeric(value1)) {
            isLessThan=Long.valueOf(value2).compareTo(Long.valueOf(value1)) < 0;
          }
 else {
            isLessThan=comparator.compare(value2,value1) < 0;
          }
          if ((isAscend && isLessThan) || (!isAscend && !isLessThan)) {
            String[] values=getTableItemText(table,items[i]);
            Object obj=items[i].getData();
            items[i].dispose();
            TableItem item=new TableItem(table,SWT.NONE,j);
            item.setText(values);
            item.setData(obj);
            items=table.getItems();
            break;
          }
        }
      }
      table.setSortColumn(column);
      table.setSortDirection((isAscend ? SWT.UP : SWT.DOWN));
      isAscend=!isAscend;
    }
  }
);
}

Fixed version (ground truth):
private void addSorter(final Table table,final TableColumn column){
  column.addListener(SWT.Selection,new Listener(){
    boolean isAscend=true;
    Collator comparator=Collator.getInstance(Locale.getDefault());
    public void handleEvent(    Event event){
      int columnIndex=getColumnIndex(table,column);
      TableItem[] items=table.getItems();
      int length="String_Node_Str".equals(items[items.length - 1].getText(columnIndex)) ? items.length - 1 : items.length;
      for (int i=1; i < length; i++) {
        String value2=items[i].getText(columnIndex);
        for (int j=0; j < i; j++) {
          String value1=items[j].getText(columnIndex);
          boolean isLessThan=true;
          if (StringUtils.isNumeric(value2) && StringUtils.isNotEmpty(value2) && StringUtils.isNumeric(value1)&& StringUtils.isNotEmpty(value1)) {
            isLessThan=Long.valueOf(value2).compareTo(Long.valueOf(value1)) < 0;
          }
 else {
            isLessThan=comparator.compare(value2,value1) < 0;
          }
          if ((isAscend && isLessThan) || (!isAscend && !isLessThan)) {
            String[] values=getTableItemText(table,items[i]);
            Object obj=items[i].getData();
            items[i].dispose();
            TableItem item=new TableItem(table,SWT.NONE,j);
            item.setText(values);
            item.setData(obj);
            items=table.getItems();
            break;
          }
        }
      }
      table.setSortColumn(column);
      table.setSortDirection((isAscend ? SWT.UP : SWT.DOWN));
      isAscend=!isAscend;
    }
  }
);
}
Program: 138622
Project: 138622
Buggy source:
@Override public Expression getInstantiatedExpressions(String language){
  if ("String_Node_Str".equals(language)) {
    language="String_Node_Str";
  }
  return super.getInstantiatedExpressions(language);
}

Fixed version (ground truth):
@Override public Expression getInstantiatedExpressions(String language){
  return super.getInstantiatedExpressions(language);
}
Program: 138624
Project: 138624
Buggy source:
public void keyReleased(KeyEvent e){
  Long portValue=null;
  try {
    portValue=new Long(portText.getText());
  }
 catch (  NumberFormatException e1) {
  }
  if (portValue == null || portValue <= 0) {
    portText.setText(PluginConstant.EMPTY_STRING);
  }
}

Fixed version (ground truth):
public void keyReleased(KeyEvent e){
  if (!ingresdb) {
    Long portValue=null;
    try {
      portValue=new Long(portText.getText());
    }
 catch (    NumberFormatException e1) {
    }
    if (portValue == null || portValue <= 0) {
      portText.setText(PluginConstant.EMPTY_STRING);
    }
  }
}