nus-yam/ex-repair huggingface dataset:
Program: 140373
Project: 140373
Buggy source:
public TdReport findReport(IFile file){
  TdReport report=allRepMap.get(file);
  if (report != null) {
    return report;
  }
  Resource fileResource=getFileResource(file);
  report=retireReport(fileResource);
  if (report != null) {
    allRepMap.put(file,report);
  }
  return report;
}

Fixed version (ground truth):
public TdReport findReport(IFile file){
  TdReport report=allRepMap.get(file);
  if (report != null) {
    return report;
  }
  return readFromFile(file);
}
Program: 140374
Project: 140374
Buggy source:
public Collection<TdReport> getAllReports(){
  allRepMap.clear();
  IFolder defaultAnalysFolder=ResourcesPlugin.getWorkspace().getRoot().getProject(PluginConstant.DATA_PROFILING_PROJECTNAME).getFolder(DQStructureManager.REPORTS);
  try {
    searchAllReports(defaultAnalysFolder);
  }
 catch (  CoreException e) {
    e.printStackTrace();
  }
  return allRepMap.values();
}

Fixed version (ground truth):
public Collection<TdReport> getAllReports(){
  IFolder defaultAnalysFolder=ResourcesPlugin.getWorkspace().getRoot().getProject(PluginConstant.DATA_PROFILING_PROJECTNAME).getFolder(DQStructureManager.REPORTS);
  try {
    searchAllReports(defaultAnalysFolder);
  }
 catch (  CoreException e) {
    e.printStackTrace();
  }
  return allRepMap.values();
}
Program: 140378
Project: 140378
Buggy source:
protected IFile createEmptyAnalysisFile() throws DataprofilerCoreException {
  AnalysisBuilder analysisBuilder=new AnalysisBuilder();
  boolean analysisInitialized=analysisBuilder.initializeAnalysis(analysisName,analysisType);
  if (!analysisInitialized) {
    throw new DataprofilerCoreException(analysisName + "String_Node_Str");
  }
  Analysis analysis=analysisBuilder.getAnalysis();
  fillAnalysisBuilder(analysisBuilder);
  AnalysisWriter writer=new AnalysisWriter();
  TypedReturnCode<IFile> saved=writer.createAnalysisFile(analysis,folderResource);
  IFile file;
  if (saved.isOk()) {
    log.info("String_Node_Str" + folderResource.getFullPath().toString());
    file=saved.getObject();
    Resource anaResource=analysis.eResource();
    AnaResourceFileHelper.getInstance().register(file,anaResource);
    AnaResourceFileHelper.getInstance().setResourceChanged(true);
  }
 else {
    throw new DataprofilerCoreException("String_Node_Str" + folderResource.getFullPath().toString() + "String_Node_Str"+ saved.getMessage());
  }
  CorePlugin.getDefault().refreshWorkSpace();
  ((DQRespositoryView)CorePlugin.getDefault().findView(DQRespositoryView.ID)).getCommonViewer().refresh();
  return file;
}

Fixed version (ground truth):
protected IFile createEmptyAnalysisFile() throws DataprofilerCoreException {
  AnalysisBuilder analysisBuilder=new AnalysisBuilder();
  boolean analysisInitialized=analysisBuilder.initializeAnalysis(analysisName,analysisType);
  if (!analysisInitialized) {
    throw new DataprofilerCoreException(analysisName + "String_Node_Str");
  }
  Analysis analysis=analysisBuilder.getAnalysis();
  fillAnalysisBuilder(analysisBuilder);
  AnalysisWriter writer=new AnalysisWriter();
  TypedReturnCode<IFile> saved=writer.createAnalysisFile(analysis,folderResource);
  IFile file;
  if (saved.isOk()) {
    log.info("String_Node_Str" + folderResource.getFullPath().toString());
    file=saved.getObject();
    Resource anaResource=analysis.eResource();
    AnaResourceFileHelper.getInstance().register(file,anaResource);
    AnaResourceFileHelper.getInstance().setResourcesNumberChanged(true);
  }
 else {
    throw new DataprofilerCoreException("String_Node_Str" + folderResource.getFullPath().toString() + "String_Node_Str"+ saved.getMessage());
  }
  CorePlugin.getDefault().refreshWorkSpace();
  ((DQRespositoryView)CorePlugin.getDefault().findView(DQRespositoryView.ID)).getCommonViewer().refresh();
  return file;
}
Program: 140380
Project: 140380
Buggy source:
/** 
 * This method is called when 'Finish' button is pressed in the wizard. Save metadata close Lock Strategy and close wizard.
 */
public boolean performFinish(){
  TypedReturnCode<TdDataProvider> rc=ConnectionService.createConnection(this.connectionParam);
  if (!rc.isOk()) {
    MessageDialog.openInformation(getShell(),"String_Node_Str","String_Node_Str" + rc.getMessage());
    return false;
  }
  TdDataProvider dataProvider=rc.getObject();
  IFile returnFile=DqRepositoryViewService.saveDataProviderAndStructure(dataProvider,this.connectionParam.getFolderProvider());
  if (returnFile != null) {
    CorePlugin.getDefault().refreshWorkSpace();
    ((DQRespositoryView)CorePlugin.getDefault().findView(DQRespositoryView.ID)).getCommonViewer().refresh();
    CorePlugin.getDefault().openEditor(returnFile,ConnectionEditor.class.getName());
  }
  return true;
}

Fixed version (ground truth):
/** 
 * This method is called when 'Finish' button is pressed in the wizard. Save metadata close Lock Strategy and close wizard.
 */
public boolean performFinish(){
  TypedReturnCode<TdDataProvider> rc=ConnectionService.createConnection(this.connectionParam);
  if (!rc.isOk()) {
    MessageDialog.openInformation(getShell(),"String_Node_Str","String_Node_Str" + rc.getMessage());
    return false;
  }
  TdDataProvider dataProvider=rc.getObject();
  IFile returnFile=DqRepositoryViewService.saveDataProviderAndStructure(dataProvider,this.connectionParam.getFolderProvider());
  PrvResourceFileHelper.getInstance().register(returnFile,dataProvider.eResource());
  if (returnFile != null) {
    CorePlugin.getDefault().refreshWorkSpace();
    ((DQRespositoryView)CorePlugin.getDefault().findView(DQRespositoryView.ID)).getCommonViewer().refresh();
    CorePlugin.getDefault().openEditor(returnFile,ConnectionEditor.class.getName());
  }
  return true;
}
Program: 140381
Project: 140381
Buggy source:
public DataprofilerCoreException(String message){
  super(message);
}

Fixed version (ground truth):
public DataprofilerCoreException(Throwable cause){
  super(cause);
}
Program: 140382
Project: 140382
Buggy source:
/** 
 * Utility method. Method "saveSingleResource" saves the given resource only. This method is a helper for saving quickly a given resource. It does not saved the related resources. This could result in an exception when other related resources should be saved with this resource.
 * @param resource the resource to save
 * @return true if no problem
 */
public static boolean saveSingleResource(Resource resource){
  EMFUtil util=new EMFUtil();
  util.getResourceSet().getResources().add(resource);
  boolean save=util.save();
  if (!save) {
    log.warn("String_Node_Str" + util.getLastErrorMessage());
  }
  return save;
}

Fixed version (ground truth):
/** 
 * Utility method. Method "saveSingleResource" saves the given resource only. This method is a helper for saving quickly a given resource. It does not saved the related resources. This could result in an exception when other related resources should be saved with this resource.
 * @param resource the resource to save
 * @return true if no problem
 */
public static boolean saveSingleResource(Resource resource){
  boolean save=true;
  try {
    Map<String,Object> options=new HashMap<String,Object>();
    options.put(XMIResource.OPTION_DECLARE_XML,Boolean.TRUE);
    options.put(XMIResource.OPTION_ENCODING,ENCODING);
    resource.save(options);
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str" + resource.getURI());
    }
  }
 catch (  IOException e) {
    log.error("String_Node_Str" + resource.getURI().toString(),e);
    save=false;
  }
  return save;
}
Program: 140383
Project: 140383
Buggy source:
protected void saveReloadResult(){
  DqRepositoryViewService.saveOpenDataProvider(this.oldDataProvider);
}

Fixed version (ground truth):
protected void saveReloadResult(){
  PrvResourceFileHelper.getInstance().save(oldDataProvider);
}
Program: 140384
Project: 140384
Buggy source:
@Override protected TdDataProvider findDataProvider(){
  TdDataProvider provider=DataProviderHelper.getTdDataProvider((Package)selectedObj);
  IFile file=PrvResourceFileHelper.getInstance().findCorrespondingFile(provider);
  TdDataProvider synchronizedProvider=PrvResourceFileHelper.getInstance().readFromFile(file).getObject();
  List<TdCatalog> tdCatalogs=DataProviderHelper.getTdCatalogs(synchronizedProvider);
  for (  TdCatalog catalog : tdCatalogs) {
    if (((Package)selectedObj).getName().equals(catalog.getName())) {
      selectedObj=catalog;
    }
  }
  return synchronizedProvider;
}

Fixed version (ground truth):
@Override protected TdDataProvider findDataProvider(){
  TdDataProvider provider=DataProviderHelper.getTdDataProvider((Package)selectedObj);
  return provider;
}
Program: 140385
Project: 140385
Buggy source:
@Override protected void saveReloadResult(){
  IFile selectedFile=(IFile)selectedObj;
  DqRepositoryViewService.saveDataProviderResource(oldDataProvider,(IFolder)selectedFile.getParent(),selectedFile);
  PrvResourceFileHelper.getInstance().remove(selectedFile);
  PrvResourceFileHelper.getInstance().register(selectedFile,oldDataProvider.eResource());
}

Fixed version (ground truth):
@Override protected void saveReloadResult(){
  DqRepositoryViewService.saveOpenDataProvider(oldDataProvider,true);
}
Program: 140386
Project: 140386
Buggy source:
@Override protected TdDataProvider findDataProvider(){
  TypedReturnCode<TdDataProvider> returnVlaue=PrvResourceFileHelper.getInstance().readFromFile((IFile)selectedObj);
  return returnVlaue.getObject();
}

Fixed version (ground truth):
@Override protected TdDataProvider findDataProvider(){
  TypedReturnCode<TdDataProvider> returnVlaue=PrvResourceFileHelper.getInstance().findProvider((IFile)selectedObj);
  return returnVlaue.getObject();
}
Program: 140387
Project: 140387
Buggy source:
protected void handleRemoveElement(RemoveModelElement removeElement){
  Package removePackage=packageSwitch.doSwitch(removeElement.getLeftElement());
  if (removePackage == null) {
    return;
  }
  popRemoveElementConfirm();
  oldDataProvider.getDataPackage().remove(removePackage);
}

Fixed version (ground truth):
protected void handleRemoveElement(RemoveModelElement removeElement){
  Package removePackage=packageSwitch.doSwitch(removeElement.getLeftElement());
  if (removePackage == null) {
    return;
  }
  popRemoveElementConfirm();
  oldDataProvider.getDataPackage().remove(removePackage);
  oldDataProvider.eResource().getContents().remove(removePackage);
}
Program: 140388
Project: 140388
Buggy source:
protected void createTempConnectionFile() throws ReloadCompareException {
  IFile findCorrespondingFile=PrvResourceFileHelper.getInstance().findCorrespondingFile(oldDataProvider);
  if (findCorrespondingFile == null) {
    throw new ReloadCompareException("String_Node_Str" + oldDataProvider.getName());
  }
  IFile tempConnectionFile=DQStructureComparer.copyCurrentResourceFile(findCorrespondingFile);
  URI uri=URI.createPlatformResourceURI(tempConnectionFile.getFullPath().toString(),false);
  ResourceSet rs=new EMFUtil().getResourceSet();
  Resource resource=rs.getResource(uri,true);
  Collection<TdDataProvider> tdDataProviders=DataProviderHelper.getTdDataProviders(resource.getContents());
  if (tdDataProviders.isEmpty()) {
    throw new ReloadCompareException("String_Node_Str" + tempConnectionFile.getLocation().toFile().getAbsolutePath());
  }
  if (tdDataProviders.size() > 1) {
    throw new ReloadCompareException("String_Node_Str" + tdDataProviders.size() + "String_Node_Str"+ tempConnectionFile.getLocation().toFile().getAbsolutePath());
  }
  tempReloadProvider=tdDataProviders.iterator().next();
}

Fixed version (ground truth):
protected void createTempConnectionFile() throws ReloadCompareException {
  IFile findCorrespondingFile=PrvResourceFileHelper.getInstance().findCorrespondingFile(oldDataProvider);
  if (findCorrespondingFile == null) {
    throw new ReloadCompareException("String_Node_Str" + oldDataProvider.getName());
  }
  IFile tempConnectionFile=DQStructureComparer.copyCurrentResourceFile(findCorrespondingFile);
  URI uri=URI.createPlatformResourceURI(tempConnectionFile.getFullPath().toString(),false);
  Resource resource=EMFSharedResources.getInstance().getResource(uri,true);
  Collection<TdDataProvider> tdDataProviders=DataProviderHelper.getTdDataProviders(resource.getContents());
  if (tdDataProviders.isEmpty()) {
    throw new ReloadCompareException("String_Node_Str" + tempConnectionFile.getLocation().toFile().getAbsolutePath());
  }
  if (tdDataProviders.size() > 1) {
    throw new ReloadCompareException("String_Node_Str" + tdDataProviders.size() + "String_Node_Str"+ tempConnectionFile.getLocation().toFile().getAbsolutePath());
  }
  tempReloadProvider=tdDataProviders.iterator().next();
}
Program: 140389
Project: 140389
Buggy source:
@Override protected TdDataProvider findDataProvider(){
  ColumnSet columnSet=(ColumnSet)selectedObj;
  Package parentCatalogOrSchema=ColumnSetHelper.getParentCatalogOrSchema(columnSet);
  TdDataProvider provider=DataProviderHelper.getTdDataProvider(parentCatalogOrSchema);
  IFile file=PrvResourceFileHelper.getInstance().findCorrespondingFile(provider);
  TdDataProvider synchronizedProvider=PrvResourceFileHelper.getInstance().readFromFile(file).getObject();
  List<TdCatalog> tdCatalogs=DataProviderHelper.getTdCatalogs(synchronizedProvider);
  TdCatalog newCatalog=null;
  for (  TdCatalog catalog : tdCatalogs) {
    if (parentCatalogOrSchema.getName().equals(catalog.getName())) {
      newCatalog=catalog;
    }
  }
  List<TdTable> tables=CatalogHelper.getTables(newCatalog);
  for (  TdTable table : tables) {
    if (columnSet.getName().equals(table.getName())) {
      selectedObj=table;
    }
  }
  List<TdView> views=CatalogHelper.getViews(newCatalog);
  for (  TdView view : views) {
    if (columnSet.getName().equals(view.getName())) {
      selectedObj=view;
    }
  }
  return synchronizedProvider;
}

Fixed version (ground truth):
@Override protected TdDataProvider findDataProvider(){
  ColumnSet columnSet=(ColumnSet)selectedObj;
  Package parentCatalogOrSchema=ColumnSetHelper.getParentCatalogOrSchema(columnSet);
  TdDataProvider provider=DataProviderHelper.getTdDataProvider(parentCatalogOrSchema);
  return provider;
}
Program: 140390
Project: 140390
Buggy source:
/** 
 * Method "deleteCopiedResourceFile".
 * @return true if temporary file ".refresh.prv" has been deleted (or did not exist)
 */
public static boolean deleteCopiedResourceFile(){
  boolean retValue=false;
  IFolder folder=ResourcesPlugin.getWorkspace().getRoot().getProject(DQStructureManager.METADATA).getFolder(DQStructureManager.DB_CONNECTIONS);
  String fileName=TEMP_PRV_FILE;
  IFile file=folder.getFile(fileName);
  if (file.exists()) {
    try {
      file.delete(true,new NullProgressMonitor());
      retValue=true;
    }
 catch (    CoreException e) {
      log.warn("String_Node_Str" + fileName,e);
      retValue=false;
    }
  }
 else {
    retValue=true;
  }
  return retValue;
}

Fixed version (ground truth):
/** 
 * Method "deleteCopiedResourceFile".
 * @return true if temporary file ".refresh.prv" has been deleted (or did not exist)
 */
public static boolean deleteCopiedResourceFile(){
  boolean retValue=false;
  IFolder folder=ResourcesPlugin.getWorkspace().getRoot().getProject(DQStructureManager.METADATA).getFolder(DQStructureManager.DB_CONNECTIONS);
  String fileName=TEMP_PRV_FILE;
  IFile file=folder.getFile(fileName);
  if (file.exists()) {
    URI uri=URI.createPlatformResourceURI(file.getFullPath().toString(),false);
    EMFSharedResources.getInstance().unloadResource(uri.toString());
    try {
      file.delete(true,new NullProgressMonitor());
      retValue=true;
    }
 catch (    CoreException e) {
      log.warn("String_Node_Str" + fileName,e);
      retValue=false;
    }
  }
 else {
    retValue=true;
  }
  return retValue;
}
Program: 140391
Project: 140391
Buggy source:
public ReloadCompareException(String message){
  super(message);
}

Fixed version (ground truth):
public ReloadCompareException(Throwable cause){
  super(cause);
}
Program: 140392
Project: 140392
Buggy source:
/** 
 * @param oldDataProvider
 */
protected boolean compareWithReloadObject(EObject reloadedObj){
  Map<String,Object> options=new HashMap<String,Object>();
  options.put(MatchOptions.OPTION_IGNORE_XMI_ID,true);
  MatchModel match=null;
  try {
    match=MatchService.doMatch(oldDataProvider,reloadedObj,options);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
    return false;
  }
  final DiffModel diff=DiffService.doDiff(match);
  EList<DiffElement> ownedElements=diff.getOwnedElements();
  for (  DiffElement de : ownedElements) {
    EList<DiffElement> subDiffElements=de.getSubDiffElements();
    for (    DiffElement difElement : subDiffElements) {
      handleDiffPackageElement(difElement);
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @param oldDataProvider
 */
protected boolean compareWithReloadObject(EObject reloadedObj) throws ReloadCompareException {
  Map<String,Object> options=new HashMap<String,Object>();
  options.put(MatchOptions.OPTION_IGNORE_XMI_ID,true);
  MatchModel match=null;
  try {
    match=MatchService.doMatch(oldDataProvider,reloadedObj,options);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
    return false;
  }
  final DiffModel diff=DiffService.doDiff(match);
  EList<DiffElement> ownedElements=diff.getOwnedElements();
  for (  DiffElement de : ownedElements) {
    EList<DiffElement> subDiffElements=de.getSubDiffElements();
    for (    DiffElement difElement : subDiffElements) {
      handleDiffPackageElement(difElement);
    }
  }
  return true;
}
Program: 140393
Project: 140393
Buggy source:
@Override protected boolean compareWithReloadObject(EObject reloadedObj){
  Package catalogSchemaObj=(Package)reloadedObj;
  try {
    TdCatalog catalogObj=SwitchHelpers.CATALOG_SWITCH.doSwitch(catalogSchemaObj);
    if (catalogObj != null) {
      List<TdTable> tables=DqRepositoryViewService.getTables(tempReloadProvider,catalogObj,null,true);
      CatalogHelper.addTables(tables,catalogObj);
      List<TdView> views=DqRepositoryViewService.getViews(tempReloadProvider,catalogObj,null,true);
      CatalogHelper.addViews(views,catalogObj);
    }
 else {
      List<TdTable> tables=DqRepositoryViewService.getTables(tempReloadProvider,(Schema)catalogSchemaObj,null,true);
      SchemaHelper.addTables(tables,(Schema)catalogSchemaObj);
      List<TdView> views=DqRepositoryViewService.getViews(tempReloadProvider,(Schema)catalogSchemaObj,null,true);
      SchemaHelper.addViews(views,(Schema)catalogSchemaObj);
    }
  }
 catch (  TalendException e1) {
    e1.printStackTrace();
    ExceptionHandler.process(e1);
  }
  Map<String,Object> options=new HashMap<String,Object>();
  options.put(MatchOptions.OPTION_IGNORE_XMI_ID,true);
  MatchModel match=null;
  try {
    match=MatchService.doContentMatch((Package)selectedObj,catalogSchemaObj,options);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
    return false;
  }
  final DiffModel diff=DiffService.doDiff(match,false);
  EList<DiffElement> ownedElements=diff.getOwnedElements();
  for (  DiffElement de : ownedElements) {
    handleSubDiffElement(de);
  }
  return true;
}

Fixed version (ground truth):
@Override protected boolean compareWithReloadObject(EObject reloadedObj) throws ReloadCompareException {
  Package catalogSchemaObj=(Package)reloadedObj;
  try {
    TdCatalog catalogObj=SwitchHelpers.CATALOG_SWITCH.doSwitch(catalogSchemaObj);
    if (catalogObj != null) {
      List<TdTable> tables=DqRepositoryViewService.getTables(tempReloadProvider,catalogObj,null,true);
      CatalogHelper.addTables(tables,catalogObj);
      List<TdView> views=DqRepositoryViewService.getViews(tempReloadProvider,catalogObj,null,true);
      CatalogHelper.addViews(views,catalogObj);
    }
 else {
      List<TdTable> tables=DqRepositoryViewService.getTables(tempReloadProvider,(Schema)catalogSchemaObj,null,true);
      SchemaHelper.addTables(tables,(Schema)catalogSchemaObj);
      List<TdView> views=DqRepositoryViewService.getViews(tempReloadProvider,(Schema)catalogSchemaObj,null,true);
      SchemaHelper.addViews(views,(Schema)catalogSchemaObj);
    }
  }
 catch (  TalendException e1) {
    throw new ReloadCompareException(e1);
  }
  Map<String,Object> options=new HashMap<String,Object>();
  options.put(MatchOptions.OPTION_IGNORE_XMI_ID,true);
  MatchModel match=null;
  try {
    match=MatchService.doContentMatch((Package)selectedObj,catalogSchemaObj,options);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
    return false;
  }
  final DiffModel diff=DiffService.doDiff(match,false);
  EList<DiffElement> ownedElements=diff.getOwnedElements();
  for (  DiffElement de : ownedElements) {
    handleSubDiffElement(de);
  }
  return true;
}
Program: 140394
Project: 140394
Buggy source:
@Override protected boolean compareWithReloadObject(EObject reloadedObj){
  ColumnSet columnSet=(ColumnSet)reloadedObj;
  List<TdColumn> columns=null;
  try {
    columns=DqRepositoryViewService.getColumns(tempReloadProvider,columnSet,null,true);
  }
 catch (  TalendException e1) {
    e1.printStackTrace();
  }
  ColumnSetHelper.setColumns(columnSet,columns);
  Map<String,Object> options=new HashMap<String,Object>();
  options.put(MatchOptions.OPTION_IGNORE_XMI_ID,true);
  MatchModel match=null;
  try {
    match=MatchService.doContentMatch((ColumnSet)selectedObj,columnSet,options);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
    return false;
  }
  final DiffModel diff=DiffService.doDiff(match,false);
  EList<DiffElement> ownedElements=diff.getOwnedElements();
  for (  DiffElement de : ownedElements) {
    handleSubDiffElement(de);
  }
  return true;
}

Fixed version (ground truth):
@Override protected boolean compareWithReloadObject(EObject reloadedObj) throws ReloadCompareException {
  ColumnSet columnSet=(ColumnSet)reloadedObj;
  List<TdColumn> columns=null;
  try {
    columns=DqRepositoryViewService.getColumns(tempReloadProvider,columnSet,null,true);
  }
 catch (  TalendException e1) {
    throw new ReloadCompareException(e1);
  }
  ColumnSetHelper.setColumns(columnSet,columns);
  Map<String,Object> options=new HashMap<String,Object>();
  options.put(MatchOptions.OPTION_IGNORE_XMI_ID,true);
  MatchModel match=null;
  try {
    match=MatchService.doContentMatch((ColumnSet)selectedObj,columnSet,options);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
    return false;
  }
  final DiffModel diff=DiffService.doDiff(match,false);
  EList<DiffElement> ownedElements=diff.getOwnedElements();
  for (  DiffElement de : ownedElements) {
    handleSubDiffElement(de);
  }
  return true;
}
Program: 140395
Project: 140395
Buggy source:
public void run(IProgressMonitor monitor) throws InvocationTargetException {
  IComparisonLevel creatComparisonLevel=ComparisonLevelFactory.creatComparisonLevel(selectedObject);
  try {
    creatComparisonLevel.reloadCurrentLevelElement();
  }
 catch (  ReloadCompareException e) {
    log.error(e,e);
  }
}

Fixed version (ground truth):
public void run(IProgressMonitor monitor) throws InvocationTargetException {
  IComparisonLevel creatComparisonLevel=ComparisonLevelFactory.creatComparisonLevel(selectedObject);
  try {
    creatComparisonLevel.reloadCurrentLevelElement();
  }
 catch (  ReloadCompareException e) {
    throw new InvocationTargetException(e);
  }
}
Program: 140396
Project: 140396
Buggy source:
/** 
 * Method "saveOpenDataProvider" saves a Data provider which has already a resource (has already been saved once).
 * @param dataProvider the data provider to save
 * @return true if saved without any problem.
 */
public static ReturnCode saveOpenDataProvider(TdDataProvider dataProvider){
}

Fixed version (ground truth):
/** 
 * Method "saveOpenDataProvider" saves a Data provider which has already a resource (has already been saved once).
 * @param dataProvider the data provider to save
 * @return true if saved without any problem.
 */
public static ReturnCode saveOpenDataProvider(TdDataProvider dataProvider,boolean addPackage){
}
Program: 140397
Project: 140397
Buggy source:
/** 
 * Method "readFromFile".
 * @param file the file to read
 * @return the Data provider if found.
 */
private static TypedReturnCode<TdDataProvider> readFromFile(IFile file){
  TypedReturnCode<TdDataProvider> rc=new TypedReturnCode<TdDataProvider>();
  EMFUtil util=EMFSharedResources.getSharedEmfUtil();
  ResourceSet rs=util.getResourceSet();
  Resource r=rs.getResource(URI.createPlatformResourceURI(file.getFullPath().toString(),false),true);
  Collection<TdDataProvider> tdDataProviders=DataProviderHelper.getTdDataProviders(r.getContents());
  if (tdDataProviders.isEmpty()) {
    rc.setReturnCode("String_Node_Str" + file.getFullPath().toString(),false);
  }
  if (tdDataProviders.size() > 1) {
    rc.setReturnCode("String_Node_Str" + tdDataProviders.size() + "String_Node_Str"+ file.getFullPath().toString(),false);
  }
  TdDataProvider prov=tdDataProviders.iterator().next();
  rc.setObject(prov);
  return rc;
}

Fixed version (ground truth):
/** 
 * Method "readFromFile".
 * @param file the file to read
 * @return the Data provider if found.
 */
private static TypedReturnCode<TdDataProvider> readFromFile(IFile file){
  TypedReturnCode<TdDataProvider> rc=new TypedReturnCode<TdDataProvider>();
  Resource r=EMFSharedResources.getInstance().getResource(URI.createPlatformResourceURI(file.getFullPath().toString(),false),true);
  Collection<TdDataProvider> tdDataProviders=DataProviderHelper.getTdDataProviders(r.getContents());
  if (tdDataProviders.isEmpty()) {
    rc.setReturnCode("String_Node_Str" + file.getFullPath().toString(),false);
  }
  if (tdDataProviders.size() > 1) {
    rc.setReturnCode("String_Node_Str" + tdDataProviders.size() + "String_Node_Str"+ file.getFullPath().toString(),false);
  }
  TdDataProvider prov=tdDataProviders.iterator().next();
  rc.setObject(prov);
  return rc;
}
Program: 140398
Project: 140398
Buggy source:
public void modify(Object element,String property,Object value){
  TableItem item=(TableItem)element;
  SliceEntity entity=(SliceEntity)item.getData();
  if (property.equals("String_Node_Str")) {
    entity.setLowValue(value.toString());
    parameter.setBinsData(tableViewer.getInput());
  }
 else   if (property.equals("String_Node_Str")) {
    entity.setHighValue(value.toString());
    parameter.setBinsData(tableViewer.getInput());
  }
  try {
    TextFormatFactory.createLocalFormatValue(value);
    updateStatus(IStatus.OK,MSG_OK);
  }
 catch (  Exception e) {
    updateStatus(IStatus.ERROR,MSG_ONLY_NUMBER);
  }
  tableViewer.refresh();
}

Fixed version (ground truth):
public void modify(Object element,String property,Object value){
  TableItem item=(TableItem)element;
  SliceEntity entity=(SliceEntity)item.getData();
  if (property.equals("String_Node_Str")) {
    entity.setLowValue(value.toString());
    parameter.setBinsData(tableViewer.getInput());
  }
 else   if (property.equals("String_Node_Str")) {
    entity.setHighValue(value.toString());
    parameter.setBinsData(tableViewer.getInput());
  }
  try {
    TextFormatFactory.createLocalFormatValue(value);
    updateStatus(IStatus.OK,MSG_OK);
  }
 catch (  Exception e) {
    updateStatus(IStatus.ERROR,MSG_ONLY_REAL_NUMBER);
  }
  tableViewer.refresh();
}
Program: 140401
Project: 140401
Buggy source:
public void createControl(Composite parent){
  Composite container=new Composite(parent,SWT.NONE);
  GridLayout gdLayout=new GridLayout(1,true);
  container.setLayout(gdLayout);
  PatternFilter filter=new PatternFilter();
  FilteredTree tree=new FilteredTree(container,SWT.NONE,filter);
  typeTreeViewer=tree.getViewer();
  typeTreeViewer.setContentProvider(new AnalysisTypeContentProvider());
  typeTreeViewer.setLabelProvider(new AnalysisTypeLabelProvider());
  typeTreeViewer.setInput(ViewerDataFactory.createTreeData());
  addListeners();
  setControl(container);
}

Fixed version (ground truth):
public void createControl(Composite parent){
  Composite container=new Composite(parent,SWT.NONE);
  GridLayout gdLayout=new GridLayout(1,true);
  container.setLayout(gdLayout);
  PatternFilter filter=new PatternFilter();
  FilteredTree tree=new FilteredTree(container,SWT.BORDER,filter);
  typeTreeViewer=tree.getViewer();
  typeTreeViewer.setContentProvider(new AnalysisTypeContentProvider());
  typeTreeViewer.setLabelProvider(new AnalysisTypeLabelProvider());
  typeTreeViewer.setInput(ViewerDataFactory.createTreeData());
  addListeners();
  setControl(container);
}
Program: 140403
Project: 140403
Buggy source:
/** 
 * DOC scorreia Comment method "getUnionCompletedString".
 * @param indicator
 * @param sqlExpression
 * @param colName
 * @param table
 * @param whereExpression
 * @param rangeStrings
 * @return
 * @throws ParseException
 */
private String getUnionCompletedString(Indicator indicator,Expression sqlExpression,String colName,String table,List<String> whereExpression,List<String> rangeStrings) throws ParseException {
  StringBuffer buf=new StringBuffer();
  final int last=rangeStrings.size();
  String sqlGenericExpression=sqlExpression.getBody();
  for (int i=0; i < last; i++) {
    String singleSelect=getCompletedSingleSelect(indicator,sqlGenericExpression,colName,table,whereExpression,rangeStrings.get(i));
    buf.append('(');
    buf.append(singleSelect);
    buf.append(')');
    if (i != last - 1) {
      buf.append(dbms().unionAll());
    }
  }
  return buf.toString();
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "getUnionCompletedString".
 * @param indicator
 * @param sqlExpression
 * @param colName
 * @param table
 * @param whereExpression
 * @param rangeStrings
 * @return
 * @throws ParseException
 */
private String getUnionCompletedString(Indicator indicator,Expression sqlExpression,String colName,String table,List<String> whereExpression,List<String> rangeStrings) throws ParseException {
  StringBuffer buf=new StringBuffer();
  final int last=rangeStrings.size();
  String sqlGenericExpression=sqlExpression.getBody();
  int idxOfOrderBY=sqlGenericExpression.indexOf("String_Node_Str");
  String orderBy=(idxOfOrderBY != -1) ? sqlGenericExpression.substring(idxOfOrderBY) : "String_Node_Str";
  String singleStatement=(idxOfOrderBY != -1) ? sqlGenericExpression.substring(0,idxOfOrderBY) : sqlGenericExpression;
  for (int i=0; i < last; i++) {
    String singleSelect=getCompletedSingleSelect(indicator,singleStatement,colName,table,whereExpression,rangeStrings.get(i));
    buf.append('(');
    buf.append(singleSelect);
    buf.append(')');
    if (i != last - 1) {
      buf.append(dbms().unionAll());
    }
  }
  if (idxOfOrderBY != -1) {
    buf.append(orderBy);
  }
  return buf.toString();
}
Program: 140404
Project: 140404
Buggy source:
@Override public void run(){
  IWorkbenchWindow aww=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  IWorkbenchPage ap=aww.getActivePage();
  ChangePerspectiveAction action=new ChangePerspectiveAction(SE_ID);
  action.run();
  IPath location=ResourcesPlugin.getWorkspace().getRoot().getLocation();
  for (  IFile file : folder) {
    String portableString=location.append(DQStructureManager.LIBRARIES).append(DQStructureManager.SOURCE_FILES).append(file.getName()).toPortableString();
    try {
      ap.openEditor(new SQLEditorInput(new File(portableString)),"String_Node_Str");
    }
 catch (    PartInitException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  IWorkbenchWindow aww=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  IWorkbenchPage ap=aww.getActivePage();
  ChangePerspectiveAction action=new ChangePerspectiveAction(SE_ID);
  action.run();
  IPath location=ResourcesPlugin.getWorkspace().getRoot().getLocation();
  for (  IFile file : folder) {
    String portableString=location.append(file.getFullPath()).toPortableString();
    try {
      ap.openEditor(new SQLEditorInput(new File(portableString)),"String_Node_Str");
    }
 catch (    PartInitException e) {
      e.printStackTrace();
    }
  }
}
Program: 140407
Project: 140407
Buggy source:
@SuppressWarnings("String_Node_Str") public Domain getUserDomian(){
  if (getBinsData() != null) {
    List<SliceEntity> tableData=(List<SliceEntity>)getBinsData();
    Domain userDomain=DomainHelper.createDomain("String_Node_Str");
    for (    SliceEntity entity : tableData) {
      try {
        double min=TextFormatFactory.createLocalFormatValue(entity.getLowValue()).doubleValue();
        double max=TextFormatFactory.createLocalFormatValue(entity.getHighValue()).doubleValue();
        RangeRestriction rangeRestriction=DomainHelper.createRealRangeRestriction(min,max);
        userDomain.getRanges().add(rangeRestriction);
      }
 catch (      Exception e) {
      }
    }
    return userDomain;
  }
  return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public Domain getUserDomian(){
  if (getBinsData() != null) {
    List<SliceEntity> tableData=(List<SliceEntity>)getBinsData();
    Domain userDomain=DomainHelper.createDomain("String_Node_Str");
    for (    SliceEntity entity : tableData) {
      try {
        double min=TextFormatFactory.createLocalFormatValue(entity.getLowValue()).doubleValue();
        double max=TextFormatFactory.createLocalFormatValue(entity.getHighValue()).doubleValue();
        RangeRestriction rangeRestriction=DomainHelper.createRealRangeRestriction(min,max);
        userDomain.getRanges().add(rangeRestriction);
      }
 catch (      Exception e) {
      }
    }
    return userDomain;
  }
  return DomainHelper.createContiguousClosedBinsIntoDomain("String_Node_Str",getNumOfBins(),getMinValue(),getMaxValue());
}
Program: 140408
Project: 140408
Buggy source:
private void processRowButtonSelect(boolean selection,List<Button> rowButtons){
  if (selection) {
    for (    Button btn : rowButtons) {
      ColumnIndicator columnIndicator=(ColumnIndicator)btn.getData(COLUMNINDICATORFLAG);
      IIndicatorNode node=(IIndicatorNode)btn.getData();
      if (ColumnIndicatorRule.match(node,columnIndicator)) {
        btn.setSelection(true);
        columnIndicator.addTempIndicatorEnum(node.getIndicatorEnum());
      }
    }
  }
 else {
    for (    Button btn : rowButtons) {
      ColumnIndicator columnIndicator=(ColumnIndicator)btn.getData(COLUMNINDICATORFLAG);
      IIndicatorNode node=(IIndicatorNode)btn.getData();
      btn.setSelection(false);
      columnIndicator.removeTempIndicatorEnum(node.getIndicatorEnum());
    }
  }
}

Fixed version (ground truth):
private void processRowButtonSelect(boolean selection,List<Button> rowButtons){
  for (  Button btn : rowButtons) {
    ColumnIndicator columnIndicator=(ColumnIndicator)btn.getData(COLUMNINDICATORFLAG);
    IIndicatorNode node=(IIndicatorNode)btn.getData();
    IndicatorEnum indicatorEnum=node.getIndicatorEnum();
    if (selection && ColumnIndicatorRule.match(node,columnIndicator)) {
      btn.setSelection(true);
      if (indicatorEnum != null) {
        columnIndicator.addTempIndicatorEnum(node.getIndicatorEnum());
      }
    }
 else {
      btn.setSelection(false);
      columnIndicator.removeTempIndicatorEnum(node.getIndicatorEnum());
    }
  }
}
Program: 140409
Project: 140409
Buggy source:
protected TdColumn[] getColumns(){
  Object obj=getSelection().getFirstElement();
  if (obj instanceof TdColumn) {
    TdColumn[] column=new TdColumn[getSelection().size()];
    for (int i=0; i < getSelection().size(); i++) {
      column[i]=(TdColumn)getSelection().toArray()[i];
    }
    return column;
  }
  if (obj instanceof ColumnSet) {
    List<TdColumn> list=new ArrayList<TdColumn>();
    Object[] selections=getSelection().toArray();
    for (    Object currentObj : selections) {
      ColumnSet columnSet=(ColumnSet)currentObj;
      if (ColumnSetHelper.getColumns(columnSet).size() > 0) {
        list.addAll(ColumnSetHelper.getColumns(columnSet));
      }
 else {
        Package parentCatalogOrSchema=ColumnSetHelper.getParentCatalogOrSchema(columnSet);
        TdDataProvider provider=DataProviderHelper.getTdDataProvider(parentCatalogOrSchema);
        try {
          list.addAll(DqRepositoryViewService.getColumns(provider,columnSet,null,true));
          NeedSaveDataProviderHelper.register(provider.eResource().getURI().path(),provider);
        }
 catch (        TalendException e) {
          MessageBoxExceptionHandler.process(e);
        }
      }
    }
    return list.toArray(new TdColumn[list.size()]);
  }
  return null;
}

Fixed version (ground truth):
protected TdColumn[] getColumns(){
  Object obj=getSelection().getFirstElement();
  if (obj instanceof TdColumn) {
    TdColumn[] column=new TdColumn[getSelection().size()];
    for (int i=0; i < getSelection().size(); i++) {
      column[i]=(TdColumn)getSelection().toArray()[i];
    }
    return column;
  }
  if (obj instanceof ColumnSet) {
    List<TdColumn> list=new ArrayList<TdColumn>();
    Object[] selections=getSelection().toArray();
    for (    Object currentObj : selections) {
      ColumnSet columnSet=(ColumnSet)currentObj;
      if (ColumnSetHelper.getColumns(columnSet).size() > 0) {
        list.addAll(ColumnSetHelper.getColumns(columnSet));
      }
 else {
        Package parentCatalogOrSchema=ColumnSetHelper.getParentCatalogOrSchema(columnSet);
        TdDataProvider provider=DataProviderHelper.getTdDataProvider(parentCatalogOrSchema);
        try {
          List<TdColumn> columns=DqRepositoryViewService.getColumns(provider,columnSet,null,true);
          ColumnSetHelper.addColumns(columnSet,columns);
          list.addAll(columns);
          NeedSaveDataProviderHelper.register(provider.eResource().getURI().path(),provider);
        }
 catch (        TalendException e) {
          MessageBoxExceptionHandler.process(e);
        }
      }
    }
    NeedSaveDataProviderHelper.saveAllDataProvider();
    return list.toArray(new TdColumn[list.size()]);
  }
  return null;
}
Program: 140410
Project: 140410
Buggy source:
public DQRespositoryView(){
  super();
  CorePlugin.getDefault().checkDQStructure();
}

Fixed version (ground truth):
public DQRespositoryView(){
  super();
  CorePlugin.getDefault().checkDQStructure();
  CorePlugin.getDefault().setRespositoryView(this);
}
Program: 140412
Project: 140412
Buggy source:
public Collection<AnalysisEntity> getAllAnalysis(){
  if (resourceChanged) {
    allAnalysisMap.clear();
    IFolder defaultAnalysFolder=ResourcesPlugin.getWorkspace().getRoot().getProject(PluginConstant.DATA_PROFILING_PROJECTNAME).getFolder(DQStructureManager.ANALYSIS);
    try {
      searchAllAnalysis(defaultAnalysFolder);
    }
 catch (    CoreException e) {
      e.printStackTrace();
    }
    resourceChanged=false;
  }
  return allAnalysisMap.values();
}

Fixed version (ground truth):
public Collection<AnalysisEntity> getAllAnalysis(){
  if (resourceChanged) {
    this.clear();
    IFolder defaultAnalysFolder=ResourcesPlugin.getWorkspace().getRoot().getProject(PluginConstant.DATA_PROFILING_PROJECTNAME).getFolder(DQStructureManager.ANALYSIS);
    try {
      searchAllAnalysis(defaultAnalysFolder);
    }
 catch (    CoreException e) {
      e.printStackTrace();
    }
    resourceChanged=false;
  }
  return allAnalysisMap.values();
}
Program: 140414
Project: 140414
Buggy source:
public static String createStandardNumber(Object input){
  DecimalFormat format=(DecimalFormat)DecimalFormat.getNumberInstance();
  format.applyPattern("String_Node_Str");
  try {
    return format.format(new Double(input.toString()));
  }
 catch (  Exception ne) {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
public static Number createStandardNumber(Object input){
  DecimalFormat format=(DecimalFormat)DecimalFormat.getNumberInstance();
  format.applyPattern("String_Node_Str");
  try {
    return format.parse(format.format(new Double(input.toString())));
  }
 catch (  Exception ne) {
    return 0;
  }
}
Program: 140415
Project: 140415
Buggy source:
@SuppressWarnings("String_Node_Str") public Domain getUserDomian(){
  if (getBinsData() != null) {
    List<SliceEntity> tableData=(List<SliceEntity>)getBinsData();
    Domain userDomain=DomainHelper.createDomain("String_Node_Str");
    for (    SliceEntity entity : tableData) {
      double min=Double.parseDouble(entity.getLowValue());
      double max=Double.parseDouble(entity.getHighValue());
      RangeRestriction rangeRestriction=DomainHelper.createRealRangeRestriction(min,max);
      userDomain.getRanges().add(rangeRestriction);
    }
    return userDomain;
  }
  return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public Domain getUserDomian(){
  if (getBinsData() != null) {
    List<SliceEntity> tableData=(List<SliceEntity>)getBinsData();
    Domain userDomain=DomainHelper.createDomain("String_Node_Str");
    for (    SliceEntity entity : tableData) {
      double min=TextFormatFactory.createLocalFormatValue(entity.getLowValue()).doubleValue();
      double max=TextFormatFactory.createLocalFormatValue(entity.getHighValue()).doubleValue();
      RangeRestriction rangeRestriction=DomainHelper.createRealRangeRestriction(min,max);
      userDomain.getRanges().add(rangeRestriction);
    }
    return userDomain;
  }
  return null;
}
Program: 140416
Project: 140416
Buggy source:
public CreateUserFolderAction(){
  super("String_Node_Str");
  setImageDescriptor(ImageLib.getImageDescriptor(ImageLib.FOLDER_NEW_IMAGE));
}

Fixed version (ground truth):
public CreateUserFolderAction(){
  super("String_Node_Str");
  setImageDescriptor(ImageLib.getImageDescriptor(ImageLib.FOLDER_NEW_IMAGE));
  setId("String_Node_Str");
}
Program: 140419
Project: 140419
Buggy source:
/** 
 * DOC qzhang Comment method "doSetInput".
 */
public void doSetInput(){
  List<CatalogIndicator> indicatorList=null;
  if (this.connectionAnalysis.getResults().getIndicators().size() > 0) {
    ConnectionIndicator conIndicator=(ConnectionIndicator)connectionAnalysis.getResults().getIndicators().get(0);
    indicatorList=conIndicator.getCatalogIndicators();
  }
 else {
    indicatorList=new ArrayList<CatalogIndicator>();
  }
  statisticalViewer.setInput(indicatorList);
}

Fixed version (ground truth):
/** 
 * DOC qzhang Comment method "doSetInput".
 */
public void doSetInput(){
  List<CatalogIndicator> indicatorList=null;
  if (this.connectionAnalysis.getResults().getIndicators().size() > 0) {
    ConnectionIndicator conIndicator=(ConnectionIndicator)connectionAnalysis.getResults().getIndicators().get(0);
    indicatorList=conIndicator.getCatalogIndicators();
  }
 else {
    indicatorList=new ArrayList<CatalogIndicator>();
  }
  statisticalViewer.setInput(indicatorList);
  refreshSumSection();
}
Program: 140420
Project: 140420
Buggy source:
/** 
 * Method "listTdDataProviders" list all the connections in the given folder.
 * @param folder the path to the folder containing TdDataProviders
 * @return the list of all TdDataProviders in the folder (never null).
 */
public static List<TdDataProvider> listTdDataProviders(IFolder folder){
  ArrayList<TdDataProvider> providers=new ArrayList<TdDataProvider>();
  IResource[] members=null;
  try {
    members=folder.members();
  }
 catch (  CoreException e) {
    e.printStackTrace();
    return new ArrayList<TdDataProvider>();
  }
  for (  IResource res : members) {
    if ((res instanceof IFile) && (FactoriesUtil.PROV.equals(res.getFileExtension()))) {
      TypedReturnCode<TdDataProvider> rc=readFromFile((IFile)res);
      if (rc.isOk()) {
        TdDataProvider dataProvider=rc.getObject();
        providers.add(dataProvider);
      }
 else {
        log.warn(rc.getMessage());
      }
    }
  }
  return providers;
}

Fixed version (ground truth):
/** 
 * Method "listTdDataProviders" list all the connections in the given folder.
 * @param folder the path to the folder containing TdDataProviders
 * @param containSubFolders if it contains all sub folders.
 * @return the list of all TdDataProviders in the folder (never null).
 */
public static List<TdDataProvider> listTdDataProviders(IFolder folder,boolean containSubFolders){
  ArrayList<TdDataProvider> providers=new ArrayList<TdDataProvider>();
  IResource[] members=null;
  try {
    members=folder.members();
  }
 catch (  CoreException e) {
    e.printStackTrace();
    return new ArrayList<TdDataProvider>();
  }
  for (  IResource res : members) {
    if ((res instanceof IFile) && (FactoriesUtil.PROV.equals(res.getFileExtension()))) {
      TypedReturnCode<TdDataProvider> rc=readFromFile((IFile)res);
      if (rc.isOk()) {
        TdDataProvider dataProvider=rc.getObject();
        providers.add(dataProvider);
      }
 else {
        log.warn(rc.getMessage());
      }
    }
 else {
      if (containSubFolders && (res instanceof IFolder)) {
        providers.addAll(listTdDataProviders((IFolder)res,containSubFolders));
      }
    }
  }
  return providers;
}
Program: 140423
Project: 140423
Buggy source:
public static Number createLocalFormatValue(Object input){
  DecimalFormat format=(DecimalFormat)DecimalFormat.getInstance(Locale.getDefault());
  try {
    return format.parse(input.toString());
  }
 catch (  ParseException e) {
    e.printStackTrace();
    return 0;
  }
}

Fixed version (ground truth):
public static Number createLocalFormatValue(Object input) throws ParseException {
  DecimalFormat format=(DecimalFormat)DecimalFormat.getInstance(Locale.getDefault());
  return format.parse(input.toString());
}
Program: 140424
Project: 140424
Buggy source:
public void modify(Object element,String property,Object value){
  TableItem item=(TableItem)element;
  SliceEntity entity=(SliceEntity)item.getData();
  if (property.equals("String_Node_Str")) {
    entity.setLowValue(value.toString());
    parameter.setBinsData(tableViewer.getInput());
  }
 else   if (property.equals("String_Node_Str")) {
    entity.setHighValue(value.toString());
    parameter.setBinsData(tableViewer.getInput());
  }
  tableViewer.refresh();
}

Fixed version (ground truth):
public void modify(Object element,String property,Object value){
  TableItem item=(TableItem)element;
  SliceEntity entity=(SliceEntity)item.getData();
  if (property.equals("String_Node_Str")) {
    entity.setLowValue(value.toString());
    parameter.setBinsData(tableViewer.getInput());
  }
 else   if (property.equals("String_Node_Str")) {
    entity.setHighValue(value.toString());
    parameter.setBinsData(tableViewer.getInput());
  }
  try {
    TextFormatFactory.createLocalFormatValue(value);
    updateStatus(IStatus.OK,MSG_OK);
  }
 catch (  Exception e) {
    updateStatus(IStatus.ERROR,MSG_ONLY_NUMBER);
  }
  tableViewer.refresh();
}
Program: 140425
Project: 140425
Buggy source:
@SuppressWarnings("String_Node_Str") public Domain getUserDomian(){
  if (getBinsData() != null) {
    List<SliceEntity> tableData=(List<SliceEntity>)getBinsData();
    Domain userDomain=DomainHelper.createDomain("String_Node_Str");
    for (    SliceEntity entity : tableData) {
      double min=TextFormatFactory.createLocalFormatValue(entity.getLowValue()).doubleValue();
      double max=TextFormatFactory.createLocalFormatValue(entity.getHighValue()).doubleValue();
      RangeRestriction rangeRestriction=DomainHelper.createRealRangeRestriction(min,max);
      userDomain.getRanges().add(rangeRestriction);
    }
    return userDomain;
  }
  return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public Domain getUserDomian(){
  if (getBinsData() != null) {
    List<SliceEntity> tableData=(List<SliceEntity>)getBinsData();
    Domain userDomain=DomainHelper.createDomain("String_Node_Str");
    for (    SliceEntity entity : tableData) {
      try {
        double min=TextFormatFactory.createLocalFormatValue(entity.getLowValue()).doubleValue();
        double max=TextFormatFactory.createLocalFormatValue(entity.getHighValue()).doubleValue();
        RangeRestriction rangeRestriction=DomainHelper.createRealRangeRestriction(min,max);
        userDomain.getRanges().add(rangeRestriction);
      }
 catch (      Exception e) {
      }
    }
    return userDomain;
  }
  return null;
}