nus-yam/ex-repair huggingface dataset:
Program: 139419
Project: 139419
Buggy source:
public void openIndicatorOptionDialog(Shell shell,TreeItem indicatorItem){
  if (isDirty()) {
    masterPage.doSave(null);
  }
  IndicatorUnit indicatorUnit=(IndicatorUnit)indicatorItem.getData(INDICATOR_UNIT_KEY);
  IndicatorOptionsWizard wizard=new IndicatorOptionsWizard(indicatorUnit);
  if (FormEnum.isExsitingForm(indicatorUnit)) {
    String href=FormEnum.getFirstFormHelpHref(indicatorUnit);
    OpeningHelpWizardDialog optionDialog=new OpeningHelpWizardDialog(shell,wizard,href);
    optionDialog.create();
    if (Window.OK == optionDialog.open()) {
      setDirty(wizard.isDirty());
      createIndicatorParameters(indicatorItem,indicatorUnit);
    }
  }
 else {
    MessageDialogWithToggle.openInformation(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
  }
}

Fixed version (ground truth):
public void openIndicatorOptionDialog(Shell shell,TreeItem indicatorItem){
  if (isDirty()) {
    masterPage.doSave(null);
  }
  IndicatorUnit indicatorUnit=(IndicatorUnit)indicatorItem.getData(INDICATOR_UNIT_KEY);
  IndicatorOptionsWizard wizard=new IndicatorOptionsWizard(indicatorUnit);
  if (FormEnum.isExsitingForm(indicatorUnit)) {
    String href=FormEnum.getFirstFormHelpHref(indicatorUnit);
    OpeningHelpWizardDialog optionDialog=new OpeningHelpWizardDialog(shell,wizard,href);
    if (Window.OK == optionDialog.open()) {
      setDirty(wizard.isDirty());
      createIndicatorParameters(indicatorItem,indicatorUnit);
    }
  }
 else {
    MessageDialogWithToggle.openInformation(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
  }
}
Program: 139420
Project: 139420
Buggy source:
public void showHelp(){
  getShell().setFocus();
  if (href != null) {
    IContext context=HelpSystem.getContext(HelpPlugin.getDefault().getIndicatorHelpContextID());
    IWorkbenchHelpSystem helpSystem=PlatformUI.getWorkbench().getHelpSystem();
    if (href.endsWith(HelpPlugin.HELP_FILE_SUFFIX) && context != null) {
      helpSystem.displayHelp(context);
      ReusableHelpPart lastActiveInstance=ReusableHelpPart.getLastActiveInstance();
      if (lastActiveInstance != null) {
        lastActiveInstance.showURL(href);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "showHelp".
 */
public void showHelp(){
  if (isValidHref(href)) {
    if (getTray() == null) {
      openTray(new HelpTray());
    }
    ((HelpTray)getTray()).getHelpPart().showURL(href);
  }
}
Program: 139421
Project: 139421
Buggy source:
@Override public void create(){
  super.create();
  if (this.page == null) {
    getShell().addShellListener(new ShellAdapter(){
      public void shellActivated(      ShellEvent e){
        showHelp();
      }
    }
);
  }
}

Fixed version (ground truth):
@Override public void create(){
  super.create();
  if (href != null) {
    showHelp();
  }
}
Program: 139422
Project: 139422
Buggy source:
public OpeningHelpWizardDialog(Shell parentShell,IWizard newWizard,String href,WizardPage page){
  super(parentShell,newWizard);
  this.href=href;
  this.page=page;
}

Fixed version (ground truth):
/** 
 * DOC bZhou OpeningHelpWizardDialog constructor comment.
 * @param parentShell
 * @param newWizard
 * @param href
 * @param page
 */
public OpeningHelpWizardDialog(Shell parentShell,IWizard newWizard,String href,WizardPage page){
  super(parentShell,newWizard);
  this.href=href;
  this.page=page;
}
Program: 139423
Project: 139423
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  Object formObject=e.item.getData();
  if (formObject != null) {
    AbstractIndicatorForm form=(AbstractIndicatorForm)formObject;
    form.showHelp();
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  Object formObject=e.item.getData();
  if (formObject != null && getCurrentDialog() != null) {
    AbstractIndicatorForm form=(AbstractIndicatorForm)formObject;
    String helpHref=form.getFormEnum().getHelpHref();
    getCurrentDialog().setHref(helpHref);
    getCurrentDialog().showHelp();
  }
}
Program: 139424
Project: 139424
Buggy source:
public void createControl(Composite parent){
  Composite container=new Composite(parent,SWT.NONE);
  container.setLayout(new FillLayout());
  tabFolder=new TabFolder(container,SWT.FLAT);
  tabFolder.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      Object formObject=e.item.getData();
      if (formObject != null) {
        AbstractIndicatorForm form=(AbstractIndicatorForm)formObject;
        form.showHelp();
      }
    }
  }
);
  FormEnum[] forms=FormEnum.getForms(indicatorUnit);
  if (forms != null) {
    validFroms=createForm(tabFolder,listener,forms);
    setControl(createView(validFroms));
  }
}

Fixed version (ground truth):
public void createControl(Composite parent){
  Composite container=new Composite(parent,SWT.NONE);
  container.setLayout(new FillLayout());
  tabFolder=new TabFolder(container,SWT.FLAT);
  tabFolder.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      Object formObject=e.item.getData();
      if (formObject != null && getCurrentDialog() != null) {
        AbstractIndicatorForm form=(AbstractIndicatorForm)formObject;
        String helpHref=form.getFormEnum().getHelpHref();
        getCurrentDialog().setHref(helpHref);
        getCurrentDialog().showHelp();
      }
    }
  }
);
  FormEnum[] forms=FormEnum.getForms(indicatorUnit);
  if (forms != null) {
    validFroms=createForm(tabFolder,listener,forms);
    setControl(createView(validFroms));
  }
}
Program: 139425
Project: 139425
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  Object formObject=e.item.getData();
  if (formObject != null) {
    AbstractIndicatorForm form=(AbstractIndicatorForm)formObject;
    form.showHelp();
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  Object formObject=e.item.getData();
  if (formObject != null && getCurrentDialog() != null) {
    AbstractIndicatorForm form=(AbstractIndicatorForm)formObject;
    String helpHref=form.getFormEnum().getHelpHref();
    getCurrentDialog().setHref(helpHref);
    getCurrentDialog().showHelp();
  }
}
Program: 139426
Project: 139426
Buggy source:
public void createControl(Composite parent){
  Composite container=new Composite(parent,SWT.NONE);
  container.setLayout(new FillLayout());
  tabFolder=new TabFolder(container,SWT.FLAT);
  tabFolder.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      Object formObject=e.item.getData();
      if (formObject != null) {
        AbstractIndicatorForm form=(AbstractIndicatorForm)formObject;
        form.showHelp();
      }
    }
  }
);
  FormEnum[] forms=FormEnum.getForms(indicatorUnit);
  if (forms != null) {
    validFroms=createForm(tabFolder,listener,forms);
    setControl(createView(validFroms));
  }
}

Fixed version (ground truth):
public void createControl(Composite parent){
  Composite container=new Composite(parent,SWT.NONE);
  container.setLayout(new FillLayout());
  tabFolder=new TabFolder(container,SWT.FLAT);
  tabFolder.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      Object formObject=e.item.getData();
      if (formObject != null && getCurrentDialog() != null) {
        AbstractIndicatorForm form=(AbstractIndicatorForm)formObject;
        String helpHref=form.getFormEnum().getHelpHref();
        getCurrentDialog().setHref(helpHref);
        getCurrentDialog().showHelp();
      }
    }
  }
);
  FormEnum[] forms=FormEnum.getForms(indicatorUnit);
  if (forms != null) {
    validFroms=createForm(tabFolder,listener,forms);
    setControl(createView(validFroms));
  }
}
Program: 139427
Project: 139427
Buggy source:
/** 
 * DOC qzhang AddSqlFileAction constructor comment.
 * @param selectedFiles
 */
public DeleteSqlFileAction(List<IFile> selectedFiles){
  setText(DefaultMessagesImpl.getString("String_Node_Str"));
  setImageDescriptor(ImageLib.getImageDescriptor(ImageLib.DELETE_ACTION));
  this.folder=selectedFiles;
}

Fixed version (ground truth):
/** 
 * DOC qzhang AddSqlFileAction constructor comment.
 * @param selectedFiles
 */
public DeleteSqlFileAction(List<IFile> selectedFiles){
  setText("String_Node_Str");
  setImageDescriptor(ImageLib.getImageDescriptor(ImageLib.DELETE_ACTION));
  this.folder=selectedFiles;
}
Program: 139428
Project: 139428
Buggy source:
public DeleteDQRuleAction(List<IFile> selectedFiles){
  setText(DefaultMessagesImpl.getString("String_Node_Str"));
  setImageDescriptor(ImageLib.getImageDescriptor(ImageLib.DELETE_ACTION));
  this.folder=selectedFiles;
}

Fixed version (ground truth):
public DeleteDQRuleAction(List<IFile> selectedFiles){
  setText("String_Node_Str");
  setImageDescriptor(ImageLib.getImageDescriptor(ImageLib.DELETE_ACTION));
  this.folder=selectedFiles;
}
Program: 139429
Project: 139429
Buggy source:
/** 
 * Method "getColumnSets" returns tables or views. MOD xqliu 2009-04-27 bug 6507
 * @param catalogName a catalog name; must match the catalog name as it is stored in the database; "" retrievesthose without a catalog; null means that the catalog name should not be used to narrow the search
 * @param schemaPattern a schema name pattern; must match the schema name as it is stored in the database; ""retrieves those without a schema; null means that the schema name should not be used to narrow the search
 * @param tablePattern table name patterns separated by a comma; must match the table name as it is stored in thedatabase
 * @return the tables with for the given catalog, schemas, table name pattern.
 * @throws SQLException
 */
public List<T> getColumnSets(String catalogName,String schemaPattern,String tablePattern) throws SQLException {
  List<T> tables=new ArrayList<T>();
  ResultSet tablesSet=getConnectionMetadata(connection).getTables(catalogName,schemaPattern,tablePattern,this.tableType);
  while (tablesSet.next()) {
    T table=createTable(catalogName,schemaPattern,tablesSet);
    tables.add(table);
  }
  tablesSet.close();
  return tables;
}

Fixed version (ground truth):
/** 
 * Method "getColumnSets" returns tables or views. MOD xqliu 2009-04-27 bug 6507
 * @param catalogName a catalog name; must match the catalog name as it is stored in the database; "" retrievesthose without a catalog; null means that the catalog name should not be used to narrow the search
 * @param schemaPattern a schema name pattern; must match the schema name as it is stored in the database; ""retrieves those without a schema; null means that the schema name should not be used to narrow the search
 * @param tablePattern table name patterns separated by a comma; must match the table name as it is stored in thedatabase
 * @return the tables with for the given catalog, schemas, table name pattern.
 * @throws SQLException
 */
public List<T> getColumnSets(String catalogName,String schemaPattern,String tablePattern) throws SQLException {
  List<T> tables=new ArrayList<T>();
  ResultSet tablesSet=getConnectionMetadata(connection).getTables(catalogName,schemaPattern,tablePattern,this.tableType);
  try {
    while (tablesSet.next()) {
      T table=createTable(catalogName,schemaPattern,tablesSet);
      tables.add(table);
    }
  }
 catch (  SQLException e) {
    throw e;
  }
catch (  Exception e) {
    log.error(e,e);
  }
 finally {
    if (tablesSet != null) {
      tablesSet.close();
    }
  }
  return tables;
}
Program: 139430
Project: 139430
Buggy source:
private void initializeSchemaLow() throws SQLException {
  if (!catalogsInitialized) {
    initializeCatalog();
  }
  Map<String,List<TdSchema>> catalog2schemas=null;
  if (connection.getMetaData().getDriverName().equals(MSSQL_JDBC2_0)) {
    catalog2schemas=DatabaseContentRetriever.getMSSQLSchemas(connection);
  }
 else {
    catalog2schemas=DatabaseContentRetriever.getSchemas(connection);
  }
  Set<String> catNames=catalog2schemas.keySet();
  for (  String catName : catNames) {
    List<TdSchema> schemas=catalog2schemas.get(catName);
    if (catName != null) {
      if (schemas != null) {
        TdCatalog catalog=name2catalog.get(catName);
        if (catalog != null && schemas != null) {
          if (!(schemas.size() == 1 && schemas.get(0) == null)) {
            CatalogHelper.addSchemas(schemas,catalog);
          }
        }
      }
    }
 else {
      this.schemata.addAll(schemas);
      if (catNames.size() == 1) {
        if (this.name2catalog.size() == 1) {
          TdCatalog cat=this.name2catalog.values().iterator().next();
          CatalogHelper.addSchemas(schemas,cat);
        }
      }
    }
  }
  schemaInitialized=true;
}

Fixed version (ground truth):
private void initializeSchemaLow() throws SQLException {
  if (!catalogsInitialized) {
    initializeCatalog();
  }
  Map<String,List<TdSchema>> catalog2schemas=null;
  if (connection.getMetaData().getDriverName().equals(DatabaseConstant.MSSQL_DRIVER_NAME_JDBC2_0)) {
    catalog2schemas=DatabaseContentRetriever.getMSSQLSchemas(connection);
  }
 else {
    catalog2schemas=DatabaseContentRetriever.getSchemas(connection);
  }
  Set<String> catNames=catalog2schemas.keySet();
  for (  String catName : catNames) {
    List<TdSchema> schemas=catalog2schemas.get(catName);
    if (catName != null) {
      if (schemas != null) {
        TdCatalog catalog=name2catalog.get(catName);
        if (catalog != null && schemas != null) {
          if (!(schemas.size() == 1 && schemas.get(0) == null)) {
            CatalogHelper.addSchemas(schemas,catalog);
          }
        }
      }
    }
 else {
      this.schemata.addAll(schemas);
      if (catNames.size() == 1) {
        if (this.name2catalog.size() == 1) {
          TdCatalog cat=this.name2catalog.values().iterator().next();
          CatalogHelper.addSchemas(schemas,cat);
        }
      }
    }
  }
  schemaInitialized=true;
}
Program: 139432
Project: 139432
Buggy source:
public List<ForeignKey> getForeignKeys(String catalogName,String schemaPattern,String tableName) throws SQLException {
  List<ForeignKey> pks=new ArrayList<ForeignKey>();
  ResultSet foreignKeys=null;
  try {
    foreignKeys=ConnectionUtils.getConnectionMetadata(connection).getImportedKeys(catalogName,schemaPattern,tableName);
    try {
      while (foreignKeys.next()) {
        ForeignKey pk=createForeignKey(foreignKeys);
        pks.add(pk);
      }
    }
 catch (    SQLException e) {
      throw e;
    }
 finally {
      foreignKeys.close();
    }
  }
 catch (  Exception e1) {
    log.warn("String_Node_Str",e1);
  }
  return pks;
}

Fixed version (ground truth):
public List<ForeignKey> getForeignKeys(String catalogName,String schemaPattern,String tableName) throws SQLException {
  List<ForeignKey> pks=new ArrayList<ForeignKey>();
  ResultSet foreignKeys=null;
  try {
    foreignKeys=ConnectionUtils.getConnectionMetadata(connection).getImportedKeys(catalogName,schemaPattern,tableName);
    try {
      while (foreignKeys.next()) {
        ForeignKey pk=createForeignKey(foreignKeys);
        pks.add(pk);
      }
    }
 catch (    SQLException e) {
      throw e;
    }
 finally {
      if (foreignKeys != null) {
        foreignKeys.close();
      }
    }
  }
 catch (  Exception e1) {
    log.warn("String_Node_Str",e1);
  }
  return pks;
}
Program: 139433
Project: 139433
Buggy source:
/** 
 * DOC scorreia Comment method "getPrimaryKeys".
 * @param catalogName
 * @param schemaPattern
 * @param table
 * @throws SQLException
 */
public List<PrimaryKey> getPrimaryKeys(String catalogName,String schemaPattern,String tableName) throws SQLException {
  List<PrimaryKey> pks=new ArrayList<PrimaryKey>();
  ResultSet primaryKeys=null;
  try {
    primaryKeys=ConnectionUtils.getConnectionMetadata(connection).getPrimaryKeys(catalogName,schemaPattern,tableName);
    try {
      while (primaryKeys.next()) {
        PrimaryKey pk=createPrimaryKey(primaryKeys);
        pks.add(pk);
      }
    }
 catch (    SQLException e) {
      throw e;
    }
 finally {
      primaryKeys.close();
    }
  }
 catch (  Exception e1) {
    log.warn("String_Node_Str",e1);
  }
  return pks;
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "getPrimaryKeys".
 * @param catalogName
 * @param schemaPattern
 * @param table
 * @throws SQLException
 */
public List<PrimaryKey> getPrimaryKeys(String catalogName,String schemaPattern,String tableName) throws SQLException {
  List<PrimaryKey> pks=new ArrayList<PrimaryKey>();
  ResultSet primaryKeys=null;
  try {
    primaryKeys=ConnectionUtils.getConnectionMetadata(connection).getPrimaryKeys(catalogName,schemaPattern,tableName);
    try {
      while (primaryKeys.next()) {
        PrimaryKey pk=createPrimaryKey(primaryKeys);
        pks.add(pk);
      }
    }
 catch (    SQLException e) {
      throw e;
    }
 finally {
      if (primaryKeys != null) {
        primaryKeys.close();
      }
    }
  }
 catch (  Exception e1) {
    log.warn("String_Node_Str",e1);
  }
  return pks;
}
Program: 139434
Project: 139434
Buggy source:
/** 
 * DOC xqliu Comment method "getConnectionMetadata". 2009-07-13 bug 7888.
 * @param conn
 * @return
 * @throws SQLException
 */
public static DatabaseMetaData getConnectionMetadata(Connection conn) throws SQLException {
  DatabaseMetaData dbMetaData=conn.getMetaData();
  if (dbMetaData == null || dbMetaData.getConnection() == null || dbMetaData.getConnection() != conn) {
    dbMetaData=createFakeDatabaseMetaData(conn);
  }
  return dbMetaData;
}

Fixed version (ground truth):
/** 
 * DOC xqliu Comment method "getConnectionMetadata". 2009-07-13 bug 7888.
 * @param conn
 * @return
 * @throws SQLException
 */
public static DatabaseMetaData getConnectionMetadata(Connection conn) throws SQLException {
  DatabaseMetaData dbMetaData=conn.getMetaData();
  if (dbMetaData != null && dbMetaData.getDatabaseProductName() != null && dbMetaData.getDatabaseProductName().equals(DatabaseConstant.IBM_DB2_ZOS_PRODUCT_NAME)) {
    dbMetaData=createFakeDatabaseMetaData(conn);
    log.info("String_Node_Str");
  }
  return dbMetaData;
}
Program: 139435
Project: 139435
Buggy source:
public void start(BundleContext context) throws Exception {
  super.start(context);
  plugin=this;
}

Fixed version (ground truth):
public void start(BundleContext context) throws Exception {
  super.start(context);
  plugin=this;
  initEcosTimeout();
}
Program: 139436
Project: 139436
Buggy source:
/** 
 * DOC bZhou Comment method "update".
 * @param oldObject
 * @param newObject
 * @return
 */
private 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);
  }
  if (newObject instanceof TdReport) {
    List<Analysis> anaLs=ReportHelper.getAnalyses((TdReport)oldObject);
    for (    Analysis analysis : anaLs) {
      DependenciesHandler.getInstance().setDependencyOn((TdReport)newObject,analysis);
      ((TdReport)newObject).addAnalysis(analysis);
    }
  }
  return newObject;
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "update".
 * @param oldObject
 * @param newObject
 * @return
 */
private 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);
  }
  if (newObject instanceof TdReport) {
    List<Analysis> anaLs=ReportHelper.getAnalyses((TdReport)oldObject);
    for (    Analysis analysis : anaLs) {
      DependenciesHandler.getInstance().setDependencyOn((TdReport)newObject,analysis);
      ((TdReport)newObject).addAnalysis(analysis);
    }
  }
  if (newObject instanceof Analysis) {
    AnalysisHelper.getDataFilter((Analysis)newObject).clear();
    AnalysisHelper.setStringDataFilter((Analysis)newObject,AnalysisHelper.getStringDataFilter((Analysis)oldObject));
  }
  return newObject;
}
Program: 139437
Project: 139437
Buggy source:
@Override public void create(){
  super.create();
  if (href != null) {
    showHelp();
  }
}

Fixed version (ground truth):
@Override public void create(){
  super.create();
  if (href != null && page == null) {
    showHelp();
  }
}
Program: 139438
Project: 139438
Buggy source:
/** 
 * DOC bZhou Comment method "getPatternes".
 * @param folder
 * @param allPattern
 */
public void getPatternes(IFolder folder,List<Pattern> allPattern){
  try {
    for (    IResource resource : folder.members()) {
      if (resource.getType() == IResource.FOLDER) {
        getPatternes(folder.getFolder(resource.getName()),allPattern);
        continue;
      }
      IFile file=(IFile)resource;
      if (FactoriesUtil.isPatternFile(file)) {
        Resource fileResource=getFileResource(file);
        Pattern pattern=retirePattern(fileResource);
        if (pattern != null) {
          allPattern.add(pattern);
        }
      }
    }
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "getPatternes".
 * @param folder
 * @param allPattern
 */
public void getPatternes(IFolder folder,List<Pattern> allPattern){
  try {
    for (    IResource resource : folder.members()) {
      if (resource.getType() == IResource.FOLDER) {
        getPatternes(folder.getFolder(resource.getName()),allPattern);
        continue;
      }
      IFile file=(IFile)resource;
      if (file.exists() && FactoriesUtil.isPatternFile(file)) {
        Resource fileResource=getFileResource(file);
        Pattern pattern=retirePattern(fileResource);
        if (pattern != null) {
          allPattern.add(pattern);
        }
      }
    }
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
}
Program: 139439
Project: 139439
Buggy source:
/** 
 * DataProviderBuilder constructor.
 * @param conn the connection
 * @param driver the JDBC driver
 * @param databaseUrl the database connection string (must not be null)
 * @param driverProperties the properties passed to the driver (could be null)
 * @throws SQLException
 */
public DataProviderBuilder(Connection conn,Driver driver,String databaseUrl,Properties driverProperties) throws SQLException {
  super(conn);
  this.dataProvider=DatabaseContentRetriever.getDataProvider(driver,databaseUrl,driverProperties);
  String identifierQuote=ConnectionUtils.getConnectionMetadata(conn).getIdentifierQuoteString();
  DataProviderHelper.setIdentifierQuoteString(identifierQuote,dataProvider);
}

Fixed version (ground truth):
/** 
 * DataProviderBuilder constructor.
 * @param conn the connection
 * @param driver the JDBC driver
 * @param databaseUrl the database connection string (must not be null)
 * @param driverProperties the properties passed to the driver (could be null)
 * @throws SQLException
 */
public DataProviderBuilder(Connection conn,Driver driver,String databaseUrl,Properties driverProperties) throws SQLException {
  super(conn);
  this.dataProvider=DatabaseContentRetriever.getDataProvider(driver,databaseUrl,driverProperties);
  String identifierQuote=ConnectionUtils.getConnectionMetadata(conn).getIdentifierQuoteString();
  DataProviderHelper.setIdentifierQuoteString(identifierQuote == null ? "String_Node_Str" : identifierQuote,dataProvider);
}
Program: 139440
Project: 139440
Buggy source:
private void initializeSchemaLow() throws SQLException {
  if (!catalogsInitialized) {
    initializeCatalog();
  }
  Map<String,List<TdSchema>> catalog2schemas=null;
  if (connection.getMetaData().getDriverName().equals(MSSQL_JDBC2_0)) {
    catalog2schemas=DatabaseContentRetriever.getMSSQLSchemas(connection);
  }
 else {
    catalog2schemas=DatabaseContentRetriever.getSchemas(connection);
  }
  Set<String> catNames=catalog2schemas.keySet();
  for (  String catName : catNames) {
    List<TdSchema> schemas=catalog2schemas.get(catName);
    if (catName != null) {
      TdCatalog catalog=name2catalog.get(catName);
      if (catalog != null && schemas != null) {
        CatalogHelper.addSchemas(schemas,catalog);
      }
    }
 else {
      this.schemata.addAll(schemas);
      if (catNames.size() == 1) {
        if (this.name2catalog.size() == 1) {
          TdCatalog cat=this.name2catalog.values().iterator().next();
          CatalogHelper.addSchemas(schemas,cat);
        }
      }
    }
  }
  schemaInitialized=true;
}

Fixed version (ground truth):
private void initializeSchemaLow() throws SQLException {
  if (!catalogsInitialized) {
    initializeCatalog();
  }
  Map<String,List<TdSchema>> catalog2schemas=null;
  if (connection.getMetaData().getDriverName().equals(MSSQL_JDBC2_0)) {
    catalog2schemas=DatabaseContentRetriever.getMSSQLSchemas(connection);
  }
 else {
    catalog2schemas=DatabaseContentRetriever.getSchemas(connection);
  }
  Set<String> catNames=catalog2schemas.keySet();
  for (  String catName : catNames) {
    List<TdSchema> schemas=catalog2schemas.get(catName);
    if (catName != null) {
      if (schemas != null) {
        TdCatalog catalog=name2catalog.get(catName);
        if (catalog != null && schemas != null) {
          if (!(schemas.size() == 1 && schemas.get(0) == null)) {
            CatalogHelper.addSchemas(schemas,catalog);
          }
        }
      }
    }
 else {
      this.schemata.addAll(schemas);
      if (catNames.size() == 1) {
        if (this.name2catalog.size() == 1) {
          TdCatalog cat=this.name2catalog.values().iterator().next();
          CatalogHelper.addSchemas(schemas,cat);
        }
      }
    }
  }
  schemaInitialized=true;
}
Program: 139441
Project: 139441
Buggy source:
/** 
 * DOC xqliu Comment method "getRowsStatement".
 * @param valid
 * @return
 */
private String getRowsStatement(boolean valid){
  String non=valid ? "String_Node_Str" : "String_Node_Str";
  Table table=(Table)indicator.getAnalyzedElement();
  String whereClause=((WhereRule)((WhereRuleIndicator)indicator).getIndicatorDefinition()).getWhereExpression();
  return "String_Node_Str" + getFullyQualifiedTableName(table) + dbmsLanguage.where()+ non+ "String_Node_Str"+ whereClause+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * DOC xqliu Comment method "getRowsStatement".
 * @param valid
 * @return
 */
private String getRowsStatement(boolean valid){
  String dataFilterClause=this.getDataFilterClause();
  Indicator indicator2=this.indicator;
  TableAnalysisSqlExecutor tasExecutor=new TableAnalysisSqlExecutor();
  tasExecutor.setCachedAnalysis(this.analysis);
  if (valid) {
    return tasExecutor.getValidStatement(dataFilterClause,indicator2);
  }
 else {
    String non=valid ? "String_Node_Str" : "String_Node_Str";
    Table table=(Table)indicator2.getAnalyzedElement();
    String whereClause=((WhereRule)indicator2.getIndicatorDefinition()).getWhereExpression();
    return "String_Node_Str" + getFullyQualifiedTableName(table) + dbmsLanguage.where()+ non+ "String_Node_Str"+ whereClause+ "String_Node_Str";
  }
}
Program: 139442
Project: 139442
Buggy source:
public Map<String,String> getQueryMap(){
  Map<String,String> map=new HashMap<String,String>();
switch (this.indicatorEnum) {
case WhereRuleIndicatorEnum:
    map.put(MENU_VIEW_INVALID_ROWS,getRowsStatement(false));
  map.put(MENU_VIEW_VALID_ROWS,getRowsStatement(true));
break;
default :
}
return map;
}

Fixed version (ground truth):
public Map<String,String> getQueryMap(){
  Map<String,String> map=new HashMap<String,String>();
switch (this.indicatorEnum) {
case WhereRuleIndicatorEnum:
    if (!includeJoinCondition(this.indicator)) {
      map.put(MENU_VIEW_INVALID_ROWS,getRowsStatement(false));
    }
  map.put(MENU_VIEW_VALID_ROWS,getRowsStatement(true));
break;
default :
}
return map;
}
Program: 139443
Project: 139443
Buggy source:
/** 
 * DOC bZhou Comment method "initEcosTimeout".
 */
private void initEcosTimeout(){
  getPluginPreferences().setDefault(PreferenceConstants.ECOS_TIME_OUT_VALUE,EcosConstants.DEFAULT_TIME_OUT_VALUE);
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "initEcosTimeout".
 */
private void initEcosTimeout(){
  String defaultString=getPluginPreferences().getString(PreferenceConstants.ECOS_TIME_OUT_VALUE);
  if (StringUtils.isEmpty(defaultString)) {
    getPluginPreferences().setValue(PreferenceConstants.ECOS_TIME_OUT_VALUE,EcosConstants.DEFAULT_TIME_OUT_VALUE);
    if (getPluginPreferences().needsSaving()) {
      savePluginPreferences();
    }
  }
}
Program: 139446
Project: 139446
Buggy source:
/** 
 * DOC yyi Comment method "varifyImportFile".
 * @param importFile
 */
private static boolean verifyImportFile(File importFile){
  CsvReader reader;
  try {
    reader=new CsvReader(new FileReader(importFile),CURRENT_SEPARATOR);
    reader.setEscapeMode(ESCAPE_MODE_BACKSLASH);
    reader.setTextQualifier(TEXT_QUAL);
    reader.setUseTextQualifier(false);
    while (reader.readRecord()) {
      if (!checkQuotes(reader.getValues())) {
        return false;
      }
    }
    reader.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * DOC yyi Comment method "varifyImportFile".
 * @param importFile
 */
private static ReturnCode verifyImportFile(File importFile){
  ReturnCode rc=new ReturnCode(true);
  CsvReader reader;
  try {
    reader=new CsvReader(new FileReader(importFile),CURRENT_SEPARATOR);
    reader.setEscapeMode(ESCAPE_MODE_BACKSLASH);
    reader.setTextQualifier(TEXT_QUAL);
    reader.setUseTextQualifier(true);
    reader.readHeaders();
    if (!checkFileHeader(reader.getHeaders())) {
      rc.setReturnCode(DefaultMessagesImpl.getString("String_Node_Str"),false);
      return rc;
    }
    reader.setUseTextQualifier(false);
    while (reader.readRecord()) {
      if (!checkQuotes(reader.getValues())) {
        rc.setReturnCode(DefaultMessagesImpl.getString("String_Node_Str"),false);
        return rc;
      }
    }
    reader.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return rc;
}
Program: 139447
Project: 139447
Buggy source:
@Override protected String getInstantiatedClause(){
  String function=getFunction();
  String clause=entity.isLabelNull() || function == null ? columnName + dbmsLanguage.isNull() : function + dbmsLanguage.equal() + "String_Node_Str"+ entity.getKey()+ "String_Node_Str";
  return clause;
}

Fixed version (ground truth):
@Override protected String getInstantiatedClause(){
  String function=getFunction();
  String clause=entity.isLabelNull() || function == null ? columnName + dbmsLanguage.isNull() : SOUNDEX_PREFIX + "String_Node_Str" + function+ "String_Node_Str"+ dbmsLanguage.equal()+ SOUNDEX_PREFIX+ "String_Node_Str"+ entity.getKey()+ "String_Node_Str";
  return clause;
}
Program: 139448
Project: 139448
Buggy source:
/** 
 * Save the resource to destinationUri and saved the related resources.
 * @param res
 * @param destinationUri
 * @return
 */
public URI saveToUri(Resource res,URI destinationUri){
  EcoreUtil.resolveAll(res);
  Map<EObject,Collection<Setting>> find=EcoreUtil.ExternalCrossReferencer.find(res);
  List<Resource> needSaves=new ArrayList<Resource>();
  for (  EObject object : find.keySet()) {
    Resource resource=object.eResource();
    if (resource == null) {
      continue;
    }
    EcoreUtil.resolveAll(resource);
    needSaves.add(resource);
  }
  URI changeUri=EMFUtil.changeUri(res,destinationUri);
  needSaves.add(res);
  for (  Resource toSave : needSaves) {
    EMFUtil.saveResource(toSave);
  }
  return changeUri;
}

Fixed version (ground truth):
/** 
 * Save the resource to destinationUri and saved the related resources.
 * @param res
 * @param destinationUri
 * @return
 */
public URI saveToUri(Resource res,URI destinationUri){
  EcoreUtil.resolveAll(res);
  Map<EObject,Collection<Setting>> find=EcoreUtil.ExternalCrossReferencer.find(res);
  List<Resource> needSaves=new ArrayList<Resource>();
  for (  EObject object : find.keySet()) {
    Resource resource=object.eResource();
    if (resource == null) {
      continue;
    }
    EcoreUtil.resolveAll(resource);
    needSaves.add(resource);
  }
  URI changeUri=EMFUtil.changeUri(res,destinationUri);
  needSaves.add(res);
  for (  Resource toSave : needSaves) {
    saveResource(toSave);
  }
  return changeUri;
}
Program: 139449
Project: 139449
Buggy source:
public boolean saveResource(Resource resource){
  return EMFUtil.saveResource(resource);
}

Fixed version (ground truth):
/** 
 * Method "saveResource" saves the resources of the resourceSet.
 * @return true when ok
 */
public boolean saveResource(Resource resource){
  String oldProp=System.getProperty("String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  boolean status=EMFUtil.saveResource(resource);
  System.setProperty("String_Node_Str",oldProp);
  return status;
}
Program: 139450
Project: 139450
Buggy source:
private static String createAndStorePattern(PatternParameters parameters,IFolder selectionFolder,ExpressionType type){
  Pattern pattern=PatternResourceFileHelper.getInstance().createPattern(parameters.name,parameters.auther,parameters.description,parameters.purpose,parameters.status);
  for (  String key : parameters.regex.keySet()) {
    RegularExpression regularExpr=BooleanExpressionHelper.createRegularExpression(key,parameters.regex.get(key),type);
    pattern.getComponents().add(regularExpr);
  }
  boolean validStatus=PatternUtilities.isPatternValid(pattern);
  TaggedValueHelper.setValidStatus(validStatus,pattern);
  String fname=DqRepositoryViewService.createFilename(parameters.name,NewSourcePatternActionProvider.EXTENSION_PATTERN);
  try {
    String[] folderNames=parameters.relativePath.split("String_Node_Str");
    for (    String folderName : folderNames) {
      IFolder folder=selectionFolder.getFolder(folderName);
      if (!folder.exists()) {
        folder.create(false,true,null);
      }
      selectionFolder=folder;
    }
  }
 catch (  CoreException e) {
    log.error(e,e);
  }
  IFile pfile=selectionFolder.getFile(fname);
  EMFSharedResources.getInstance().addEObjectToResourceSet(pfile.getFullPath().toString(),pattern);
  EMFSharedResources.getInstance().saveLastResource();
  return ResourceManager.getPatternFolder().getLocationURI().relativize(selectionFolder.getLocationURI()).toString();
}

Fixed version (ground truth):
private static String createAndStorePattern(PatternParameters parameters,IFolder selectionFolder,ExpressionType type){
  Pattern pattern=PatternResourceFileHelper.getInstance().createPattern(parameters.name,parameters.auther,parameters.description,parameters.purpose,parameters.status);
  for (  String key : parameters.regex.keySet()) {
    RegularExpression regularExpr=BooleanExpressionHelper.createRegularExpression(key,parameters.regex.get(key),type);
    pattern.getComponents().add(regularExpr);
  }
  boolean validStatus=PatternUtilities.isPatternValid(pattern);
  TaggedValueHelper.setValidStatus(validStatus,pattern);
  String fname=DqRepositoryViewService.createFilename(parameters.name,NewSourcePatternActionProvider.EXTENSION_PATTERN);
  try {
    String[] folderNames=parameters.relativePath.split("String_Node_Str");
    for (    String folderName : folderNames) {
      IFolder folder=selectionFolder.getFolder(folderName);
      if (!folder.exists()) {
        folder.create(false,true,null);
      }
      selectionFolder=folder;
    }
  }
 catch (  CoreException e) {
    log.error(e,e);
  }
  IFile pfile=selectionFolder.getFile(fname);
  ElementWriterFactory.getInstance().createPatternWriter().save(pattern,pfile);
  return ResourceManager.getPatternFolder().getLocationURI().relativize(selectionFolder.getLocationURI()).toString();
}
Program: 139451
Project: 139451
Buggy source:
/** 
 * DOC xqliu Comment method "createAndStoreUDI".
 * @param parameters
 * @param selectionFolder
 */
private static void createAndStoreUDI(UDIParameters parameters,IFolder selectionFolder){
  IndicatorDefinition id=UDIHelper.createUDI(parameters.name,parameters.auther,parameters.description,parameters.purpose,parameters.status,parameters.category);
  for (  String key : parameters.regex.keySet()) {
    Expression expression=BooleanExpressionHelper.createExpression(key,parameters.regex.get(key));
    id.getSqlGenericExpression().add(expression);
  }
  boolean validStatus=UDIHelper.isUDIValid(id);
  TaggedValueHelper.setValidStatus(validStatus,id);
  String fname=DqRepositoryViewService.createFilename(parameters.name,FactoriesUtil.UDI);
  try {
    String[] folderNames=parameters.relativePath.split("String_Node_Str");
    for (    String folderName : folderNames) {
      IFolder folder=selectionFolder.getFolder(folderName);
      if (!folder.exists()) {
        folder.create(false,true,null);
      }
      selectionFolder=folder;
    }
  }
 catch (  CoreException e) {
    log.error(e,e);
  }
  IFile pfile=selectionFolder.getFile(fname);
  EMFSharedResources.getInstance().addEObjectToResourceSet(pfile.getFullPath().toString(),id);
  EMFSharedResources.getInstance().saveLastResource();
}

Fixed version (ground truth):
/** 
 * DOC xqliu Comment method "createAndStoreUDI".
 * @param parameters
 * @param selectionFolder
 */
private static void createAndStoreUDI(UDIParameters parameters,IFolder selectionFolder){
  IndicatorDefinition id=UDIHelper.createUDI(parameters.name,parameters.auther,parameters.description,parameters.purpose,parameters.status,parameters.category);
  for (  String key : parameters.regex.keySet()) {
    Expression expression=BooleanExpressionHelper.createExpression(key,parameters.regex.get(key));
    id.getSqlGenericExpression().add(expression);
  }
  boolean validStatus=UDIHelper.isUDIValid(id);
  TaggedValueHelper.setValidStatus(validStatus,id);
  String fname=DqRepositoryViewService.createFilename(parameters.name,FactoriesUtil.UDI);
  try {
    String[] folderNames=parameters.relativePath.split("String_Node_Str");
    for (    String folderName : folderNames) {
      IFolder folder=selectionFolder.getFolder(folderName);
      if (!folder.exists()) {
        folder.create(false,true,null);
      }
      selectionFolder=folder;
    }
  }
 catch (  CoreException e) {
    log.error(e,e);
  }
  IFile pfile=selectionFolder.getFile(fname);
  ElementWriterFactory.getInstance().createUDIndicatorWriter().save(id,pfile);
}
Program: 139452
Project: 139452
Buggy source:
/** 
 * Method "getDataProvider".
 * @param driver the driver for the database connection
 * @param databaseUrl the database url
 * @param driverProperties the properties given to the driver
 * @return the data provider with a null name. Its name has to be set elsewhere.
 * @throws SQLException
 */
public static TdDataProvider getDataProvider(Driver driver,String databaseUrl,Properties driverProperties) throws SQLException {
  TdDataProvider provider=DataProviderHelper.createTdDataProvider(null);
  DriverPropertyInfo[] driverProps=driver.getPropertyInfo(databaseUrl,driverProperties);
  if (driverProps != null) {
    for (int i=0; i < driverProps.length; i++) {
      DriverPropertyInfo prop=driverProps[i];
      if (TaggedValueHelper.PASSWORD.equals(prop.name)) {
        continue;
      }
      if (log.isDebugEnabled()) {
        log.debug("String_Node_Str" + prop.description);
        log.debug(prop.name + "String_Node_Str" + prop.value);
      }
      if (log.isDebugEnabled()) {
        if (prop.choices != null) {
          for (int j=0; j < prop.choices.length; j++) {
            log.debug("String_Node_Str" + j + "String_Node_Str"+ prop.choices[j]);
          }
        }
      }
    }
  }
  return provider;
}

Fixed version (ground truth):
/** 
 * Method "getDataProvider".
 * @param driver the driver for the database connection
 * @param databaseUrl the database url
 * @param driverProperties the properties given to the driver
 * @return the data provider with a null name. Its name has to be set elsewhere.
 * @throws SQLException
 */
public static TdDataProvider getDataProvider(Driver driver,String databaseUrl,Properties driverProperties) throws SQLException {
  TdDataProvider provider=DataProviderHelper.createTdDataProvider(null);
  DriverPropertyInfo[] driverProps=null;
  if (!databaseUrl.toLowerCase().startsWith("String_Node_Str")) {
    driverProps=driver.getPropertyInfo(databaseUrl,driverProperties);
  }
  if (driverProps != null) {
    for (int i=0; i < driverProps.length; i++) {
      DriverPropertyInfo prop=driverProps[i];
      if (TaggedValueHelper.PASSWORD.equals(prop.name)) {
        continue;
      }
      if (log.isDebugEnabled()) {
        log.debug("String_Node_Str" + prop.description);
        log.debug(prop.name + "String_Node_Str" + prop.value);
      }
      if (log.isDebugEnabled()) {
        if (prop.choices != null) {
          for (int j=0; j < prop.choices.length; j++) {
            log.debug("String_Node_Str" + j + "String_Node_Str"+ prop.choices[j]);
          }
        }
      }
    }
  }
  return provider;
}
Program: 139453
Project: 139453
Buggy source:
/** 
 * DOC yyi 2009-09-23 Feature 9059
 * @param composite
 */
protected void updateDetailList(){
  if (!"String_Node_Str".equals(comboCategory.getText())) {
    IndicatorCategory ic=UDIHelper.getUDICategory(definition);
    for (    TaggedValue value : ic.getTaggedValue()) {
      if ("String_Node_Str".equals(value.getTag())) {
        labelPurpose.setText(DefaultMessagesImpl.getString("String_Node_Str") + value.getValue());
      }
 else       if (DefaultMessagesImpl.getString("String_Node_Str").equals(value.getTag())) {
        labelDescription.setText(DefaultMessagesImpl.getString("String_Node_Str") + value.getValue());
      }
    }
    labelPurpose.getParent().layout();
  }
}

Fixed version (ground truth):
/** 
 * DOC yyi 2009-09-23 Feature 9059
 * @param composite
 */
protected void updateDetailList(){
  if (!"String_Node_Str".equals(comboCategory.getText())) {
    IndicatorCategory ic=UDIHelper.getUDICategory(definition);
    String purposeText="String_Node_Str";
    String descriptionText="String_Node_Str";
    for (    TaggedValue value : ic.getTaggedValue()) {
      if ("String_Node_Str".equals(value.getTag())) {
        purposeText=DefaultMessagesImpl.getString("String_Node_Str") + value.getValue();
      }
 else       if (DefaultMessagesImpl.getString("String_Node_Str").equals(value.getTag())) {
        descriptionText=DefaultMessagesImpl.getString("String_Node_Str") + value.getValue();
      }
    }
    labelDetail.setText(purposeText + System.getProperty("String_Node_Str") + System.getProperty("String_Node_Str")+ descriptionText);
  }
}
Program: 139454
Project: 139454
Buggy source:
/** 
 * DOC yyi 2009-09-23 Feature 9059
 * @param composite
 */
private void createDetailList(Composite composite){
  Composite compoDetail=new Composite(composite,SWT.NONE);
  compoDetail.setLayout(new GridLayout(1,false));
  GridData data=new GridData(SWT.FILL,SWT.FILL,true,true);
  data.heightHint=100;
  data.horizontalIndent=20;
  compoDetail.setLayoutData(data);
  Font font0=new Font(null,"String_Node_Str",9,SWT.None);
  data=new GridData();
  data.horizontalAlignment=GridData.FILL;
  data.grabExcessHorizontalSpace=true;
  labelPurpose=new Label(compoDetail,SWT.WRAP | SWT.HORIZONTAL);
  labelPurpose.setLayoutData(data);
  labelPurpose.setFont(font0);
  labelDescription=new Label(compoDetail,SWT.WRAP | SWT.HORIZONTAL);
  labelDescription.setLayoutData(data);
  labelDescription.setFont(font0);
}

Fixed version (ground truth):
/** 
 * DOC yyi 2009-09-23 Feature 9059
 * @param composite
 */
private void createDetailList(Composite composite){
  Composite compoDetail=new Composite(composite,SWT.NONE);
  compoDetail.setLayout(new GridLayout(1,false));
  GridData data=new GridData(SWT.FILL,SWT.FILL,true,true);
  data.heightHint=300;
  data.widthHint=300;
  compoDetail.setLayoutData(data);
  labelDetail=new Label(compoDetail,SWT.WRAP);
  labelDetail.setLayoutData(data);
}
Program: 139455
Project: 139455
Buggy source:
@Override protected void pageChange(int newPageIndex){
  super.pageChange(newPageIndex);
  if (masterPage.isDirty() && (newPageIndex == RESULT_PAGE_INDEX)) {
    masterPage.doSave(null);
  }
  if (isRefreshResultPage && resultPage != null && newPageIndex == resultPage.getIndex() && resultPage instanceof ColumnAnalysisResultPage) {
    ((ColumnAnalysisResultPage)resultPage).refresh((ColumnMasterDetailsPage)masterPage);
    isRefreshResultPage=false;
  }
  if (isRefreshResultPage && resultPage != null && newPageIndex == resultPage.getIndex() && resultPage instanceof ColumnCorrelationNominalIntervalResultPage) {
    ((ColumnCorrelationNominalIntervalResultPage)resultPage).refresh((ColumnCorrelationNominalAndIntervalMasterPage)masterPage);
    isRefreshResultPage=false;
  }
  if (isRefreshResultPage && resultPage != null && newPageIndex == resultPage.getIndex() && resultPage instanceof ColumnsComparisonAnalysisResultPage) {
    ((ColumnsComparisonAnalysisResultPage)resultPage).refresh((ColumnsComparisonMasterDetailsPage)masterPage);
    isRefreshResultPage=false;
  }
  if (isRefreshResultPage && resultPage != null && newPageIndex == resultPage.getIndex() && resultPage instanceof ColumnDependencyResultPage) {
    ((ColumnDependencyResultPage)resultPage).refresh((ColumnDependencyMasterDetailsPage)masterPage);
    isRefreshResultPage=false;
  }
  if (isRefreshResultPage && resultPage != null && newPageIndex == resultPage.getIndex() && resultPage instanceof TableAnalysisResultPage) {
    ((TableAnalysisResultPage)resultPage).refresh((TableMasterDetailsPage)masterPage);
    isRefreshResultPage=false;
  }
  if (masterPage != null) {
    setRunActionButtonState(true);
    setSaveActionButtonState(false);
  }
}

Fixed version (ground truth):
@Override protected void pageChange(int newPageIndex){
  super.pageChange(newPageIndex);
  if (newPageIndex == RESULT_PAGE_INDEX) {
    if (masterPage.isDirty()) {
      masterPage.doSave(null);
    }
    setSaveActionButtonState(false);
  }
  if (isRefreshResultPage) {
    resultPage.refresh(masterPage);
    isRefreshResultPage=false;
  }
}
Program: 139457
Project: 139457
Buggy source:
@Override public void refresh(AbstractAnalysisMetadataPage masterPage){
  this.masterPage=(ColumnMasterDetailsPage)masterPage;
  this.summaryComp.dispose();
  this.resultComp.dispose();
  createFormContent(getManagedForm());
}

Fixed version (ground truth):
@Override public void refresh(AbstractAnalysisMetadataPage masterPage){
  this.masterPage=(ColumnMasterDetailsPage)masterPage;
  if (summaryComp != null && !summaryComp.isDisposed()) {
    summaryComp.dispose();
  }
  if (resultComp != null && !resultComp.isDisposed()) {
    resultComp.dispose();
  }
  createFormContent(getManagedForm());
}
Program: 139458
Project: 139458
Buggy source:
@Override public void refresh(AbstractAnalysisMetadataPage masterPage){
  this.masterPage=(ColumnCorrelationNominalAndIntervalMasterPage)masterPage;
  this.summaryComp.dispose();
  this.graphicsAndTableComp.dispose();
  createFormContent(getManagedForm());
}

Fixed version (ground truth):
@Override public void refresh(AbstractAnalysisMetadataPage masterPage){
  this.masterPage=(ColumnCorrelationNominalAndIntervalMasterPage)masterPage;
  if (summaryComp != null && !summaryComp.isDisposed()) {
    summaryComp.dispose();
  }
  if (graphicsAndTableComp != null && !graphicsAndTableComp.isDisposed()) {
    graphicsAndTableComp.dispose();
  }
  createFormContent(getManagedForm());
}
Program: 139459
Project: 139459
Buggy source:
@Override public void refresh(){
}

Fixed version (ground truth):
@Override public void refresh(){
  switchToResultPage();
}
Program: 139460
Project: 139460
Buggy source:
@Override public void refresh(AbstractAnalysisMetadataPage masterPage){
  this.masterPage=(ColumnDependencyMasterDetailsPage)masterPage;
  this.summaryComp.dispose();
  this.analyzedColumnSetsComp.dispose();
  this.analysisResultsComp.dispose();
  createFormContent(getManagedForm());
}

Fixed version (ground truth):
@Override public void refresh(AbstractAnalysisMetadataPage masterPage){
  this.masterPage=(ColumnDependencyMasterDetailsPage)masterPage;
  if (summaryComp != null && !summaryComp.isDisposed()) {
    summaryComp.dispose();
  }
  if (analyzedColumnSetsComp != null && !analyzedColumnSetsComp.isDisposed()) {
    analyzedColumnSetsComp.dispose();
  }
  if (analysisResultsComp != null && !analysisResultsComp.isDisposed()) {
    analysisResultsComp.dispose();
  }
  createFormContent(getManagedForm());
}