nus-yam/ex-repair huggingface dataset:
Program: 138225
Project: 138225
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public EList<ModelElement> getNominalColumns(){
  EList<ModelElement> nominalColumns=new BasicElistExtend<ModelElement>();
  if (analyzedColumns != null) {
    for (    ModelElement column : analyzedColumns) {
      final MetadataColumn mdColumn=SwitchHelpers.METADATA_COLUMN_SWITCH.doSwitch(column);
      final TdColumn tdColumn=SwitchHelpers.COLUMN_SWITCH.doSwitch(column);
      final TdXmlElementType tdXmlElement=SwitchHelpers.XMLELEMENTTYPE_SWITCH.doSwitch(column);
      if (tdXmlElement != null) {
        break;
      }
      if (tdColumn == null && mdColumn == null && tdXmlElement == null) {
        if (column == null) {
          log.error("String_Node_Str");
        }
 else {
          log.error("String_Node_Str" + column.getName());
        }
        continue;
      }
      DataminingType dataminingType=null;
      if (tdColumn != null) {
        dataminingType=MetadataHelper.getDataminingType(column);
      }
 else       if (mdColumn != null) {
        int javaType=TalendTypeConvert.convertToJDBCType(mdColumn.getTalendType());
        dataminingType=MetadataHelper.getDefaultDataminingType(javaType);
      }
      if (dataminingType != null && DataminingType.NOMINAL.equals(dataminingType)) {
        nominalColumns.add(column);
      }
 else       if (null != mdColumn) {
        nominalColumns.add(column);
      }
    }
  }
  return nominalColumns;
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public EList<ModelElement> getNominalColumns(){
  EList<ModelElement> nominalColumns=new BasicElistExtend<ModelElement>();
  if (analyzedColumns != null) {
    for (    ModelElement column : analyzedColumns) {
      final MetadataColumn mdColumn=SwitchHelpers.METADATA_COLUMN_SWITCH.doSwitch(column);
      final TdColumn tdColumn=SwitchHelpers.COLUMN_SWITCH.doSwitch(column);
      final TdXmlElementType tdXmlElement=SwitchHelpers.XMLELEMENTTYPE_SWITCH.doSwitch(column);
      if (tdXmlElement != null) {
        break;
      }
      if (tdColumn == null && mdColumn == null && tdXmlElement == null) {
        if (column == null) {
          log.error("String_Node_Str");
        }
 else {
          log.error("String_Node_Str" + column.getName());
        }
        continue;
      }
      DataminingType dataminingType=null;
      if (tdColumn != null) {
        dataminingType=MetadataHelper.getDataminingType(column);
      }
 else       if (mdColumn != null) {
        int javaType=TalendTypeConvert.convertToJDBCType(mdColumn.getTalendType());
        dataminingType=MetadataHelper.getDefaultDataminingType(javaType);
      }
      if (dataminingType != null && DataminingType.NOMINAL.equals(dataminingType)) {
        nominalColumns.add(column);
      }
    }
  }
  return nominalColumns;
}
Program: 138226
Project: 138226
Buggy source:
/** 
 * DOC bZhou Comment method "checkConflict".
 * @param record
 */
private void checkConflict(ItemRecord record){
  Property property=record.getProperty();
  if (property != null) {
    try {
      List<IRepositoryViewObject> allObjects=DqRepositoryViewService.getAllRepositoryResourceObjects(true);
      for (      IRepositoryViewObject object : allObjects) {
        if (record.getProperty() != null && record.getProperty().getId().equals(object.getProperty().getId())) {
          record.setConflictObject(object);
          record.addError("String_Node_Str" + record.getName() + "String_Node_Str");
          break;
        }
      }
    }
 catch (    Exception e) {
      record.addError("String_Node_Str" + record.getName() + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "checkConflict".
 * @param record
 */
private void checkConflict(ItemRecord record){
  Property property=record.getProperty();
  if (property != null) {
    try {
      List<IRepositoryViewObject> allObjects=DqRepositoryViewService.getAllRepositoryResourceObjects(true);
      for (      IRepositoryViewObject object : allObjects) {
        if (isConflict(property,object.getProperty())) {
          record.setConflictObject(object);
          record.addError("String_Node_Str" + record.getName() + "String_Node_Str");
          break;
        }
      }
    }
 catch (    Exception e) {
      record.addError("String_Node_Str" + record.getName() + "String_Node_Str");
    }
  }
}
Program: 138227
Project: 138227
Buggy source:
public ItemRecord[] populate(ItemRecord[] elements,boolean checkExisted){
  List<ItemRecord> inValidRecords=new ArrayList<ItemRecord>();
  for (  ItemRecord record : elements) {
    record.getErrors().clear();
    checkDependency(record);
    if (checkExisted) {
      checkExisted(record);
    }
    if (!record.isValid()) {
      inValidRecords.add(record);
    }
  }
  return inValidRecords.toArray(new ItemRecord[inValidRecords.size()]);
}

Fixed version (ground truth):
public ItemRecord[] populate(ItemRecord[] elements,boolean checkExisted){
  List<ItemRecord> inValidRecords=new ArrayList<ItemRecord>();
  for (  ItemRecord record : elements) {
    record.getErrors().clear();
    checkDependency(record);
    if (checkExisted) {
      checkConflict(record);
    }
    if (!record.isValid()) {
      inValidRecords.add(record);
    }
  }
  return inValidRecords.toArray(new ItemRecord[inValidRecords.size()]);
}
Program: 138228
Project: 138228
Buggy source:
public void finish(ItemRecord[] records,IProgressMonitor monitor) throws IOException, CoreException {
  ItemRecord.clear();
  handleDefinitionFile();
  doMigration(monitor);
  deleteTempProjectFolder();
  clearUnloadResources();
  syncConnectionWithExplorer();
}

Fixed version (ground truth):
public void finish(ItemRecord[] records,IProgressMonitor monitor) throws IOException, CoreException {
  ItemRecord.clear();
  handleDefinitionFile();
  doMigration(monitor);
  deleteTempProjectFolder();
}
Program: 138230
Project: 138230
Buggy source:
public int getJavaType(){
  return super.getJavaType();
}

Fixed version (ground truth):
public int getJavaType(){
  return TalendTypeConvert.convertToJDBCType(getXmlElementType().getJavaType());
}
Program: 138234
Project: 138234
Buggy source:
@Override public void mouseDown(MouseEvent e){
  DataManager dm=analysis.getContext().getConnection();
  if (dm == null) {
    masterPage.doSave(null);
  }
  if (dm != null && dm instanceof Connection) {
    Connection dp=(Connection)dm;
    if (ConnectionUtils.isMdmConnection(dp)) {
      MessageUI.openWarning(DefaultMessagesImpl.getString("String_Node_Str"));
      return;
    }
  }
  IRepositoryNode patternFolderNode=RepositoryNodeHelper.getLibrariesFolderNode(EResourceConstant.PATTERN_REGEX);
  CheckedTreeSelectionDialog dialog=PatternUtilities.createPatternCheckedTreeSelectionDialog(patternFolderNode);
  if (null != filters) {
    for (    ViewerFilter filter : filters) {
      dialog.addFilter(filter);
    }
  }
  if (dialog.open() == Window.OK) {
    for (    Object obj : dialog.getResult()) {
      if (obj instanceof PatternRepNode) {
        PatternRepNode patternNode=(PatternRepNode)obj;
        TypedReturnCode<IndicatorUnit> trc=PatternUtilities.createIndicatorUnit(patternNode.getPattern(),meIndicator,analysis);
        if (trc.isOk()) {
          columnDropTree.createOneUnit(treeItem,trc.getObject());
          columnDropTree.setDirty(true);
        }
 else         if (trc.getMessage() != null && !trc.getMessage().trim().equals("String_Node_Str")) {
          MessageUI.openError(trc.getMessage());
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void mouseDown(MouseEvent e){
  DataManager dm=analysis.getContext().getConnection();
  if (dm == null) {
    masterPage.doSave(null);
  }
  IRepositoryNode patternFolderNode=RepositoryNodeHelper.getLibrariesFolderNode(EResourceConstant.PATTERN_REGEX);
  CheckedTreeSelectionDialog dialog=PatternUtilities.createPatternCheckedTreeSelectionDialog(patternFolderNode);
  if (null != filters) {
    for (    ViewerFilter filter : filters) {
      dialog.addFilter(filter);
    }
  }
  if (dialog.open() == Window.OK) {
    for (    Object obj : dialog.getResult()) {
      if (obj instanceof PatternRepNode) {
        PatternRepNode patternNode=(PatternRepNode)obj;
        TypedReturnCode<IndicatorUnit> trc=PatternUtilities.createIndicatorUnit(patternNode.getPattern(),meIndicator,analysis);
        if (trc.isOk()) {
          columnDropTree.createOneUnit(treeItem,trc.getObject());
          columnDropTree.setDirty(true);
        }
 else         if (trc.getMessage() != null && !trc.getMessage().trim().equals("String_Node_Str")) {
          MessageUI.openError(trc.getMessage());
        }
      }
    }
  }
}
Program: 138235
Project: 138235
Buggy source:
/** 
 * DOC xqliu Comment method "getDataminingType".
 * @param modelElement
 * @return
 */
public static DataminingType getDataminingType(ModelElement modelElement){
  if (modelElement != null) {
    if (modelElement instanceof TdColumn) {
      return getDataminingType((TdColumn)modelElement);
    }
 else     if (modelElement instanceof TdXmlElementType) {
      DataminingType.get(((TdXmlElementType)modelElement).getContentType());
    }
  }
  return getDefaultDataminingType(0);
}

Fixed version (ground truth):
/** 
 * DOC xqliu Comment method "getDataminingType".
 * @param modelElement
 * @return
 */
public static DataminingType getDataminingType(ModelElement modelElement){
  if (modelElement != null) {
    if (modelElement instanceof TdColumn) {
      return getDataminingType((TdColumn)modelElement);
    }
 else     if (modelElement instanceof TdXmlElementType) {
      return DataminingType.get(((TdXmlElementType)modelElement).getContentType());
    }
  }
  return getDefaultDataminingType(0);
}
Program: 138236
Project: 138236
Buggy source:
/** 
 * DOC xqliu Comment method "getPath".
 * @param element
 * @param itemPath
 * @return
 */
private IPath getPath(ModelElement element,IPath itemPath){
  IPath path=new Path(PluginConstant.EMPTY_STRING);
  if (element instanceof DatabaseConnection) {
    path=itemPath.makeRelativeTo(ResourceManager.getTDQConnectionFolder().getFullPath());
  }
 else   if (element instanceof MDMConnection) {
    path=itemPath.makeRelativeTo(ResourceManager.getMDMConnectionFolder().getFullPath());
  }
 else   if (element instanceof Analysis) {
    path=itemPath.makeRelativeTo(ResourceManager.getAnalysisFolder().getFullPath());
  }
 else   if (element instanceof Report) {
    path=itemPath.makeRelativeTo(ResourceManager.getReportsFolder().getFullPath());
  }
 else   if (element instanceof IndicatorDefinition) {
    if (element instanceof WhereRule) {
      path=itemPath.makeRelativeTo(ResourceManager.getRulesFolder().getFullPath());
    }
 else {
      path=itemPath.makeRelativeTo(ResourceManager.getIndicatorFolder().getFullPath());
    }
  }
 else   if (element instanceof Pattern) {
    path=itemPath.makeRelativeTo(ResourceManager.getPatternFolder().getFullPath());
  }
  return path;
}

Fixed version (ground truth):
/** 
 * DOC xqliu Comment method "getPath".
 * @param element
 * @param itemPath
 * @return
 */
private IPath getPath(ModelElement element,IPath itemPath){
  IPath path=new Path(PluginConstant.EMPTY_STRING);
  if (element instanceof DatabaseConnection) {
    path=itemPath.makeRelativeTo(ResourceManager.getConnectionFolder().getFullPath());
  }
 else   if (element instanceof MDMConnection) {
    path=itemPath.makeRelativeTo(ResourceManager.getMDMConnectionFolder().getFullPath());
  }
 else   if (element instanceof Analysis) {
    path=itemPath.makeRelativeTo(ResourceManager.getAnalysisFolder().getFullPath());
  }
 else   if (element instanceof Report) {
    path=itemPath.makeRelativeTo(ResourceManager.getReportsFolder().getFullPath());
  }
 else   if (element instanceof IndicatorDefinition) {
    if (element instanceof WhereRule) {
      path=itemPath.makeRelativeTo(ResourceManager.getRulesSQLFolder().getFullPath());
    }
 else {
      path=itemPath.makeRelativeTo(ResourceManager.getIndicatorFolder().getFullPath());
    }
  }
 else   if (element instanceof Pattern) {
    path=itemPath.makeRelativeTo(ResourceManager.getPatternFolder().getFullPath());
  }
  return path;
}
Program: 138237
Project: 138237
Buggy source:
/** 
 * DOC xqliu Comment method "getDataminingType".
 * @param modelElement
 * @return
 */
public static DataminingType getDataminingType(ModelElement modelElement){
  if (modelElement != null) {
    if (modelElement instanceof TdColumn) {
      return getDataminingType((TdColumn)modelElement);
    }
 else     if (modelElement instanceof TdXmlElementType) {
      return DataminingType.get(((TdXmlElementType)modelElement).getContentType());
    }
  }
  return getDefaultDataminingType(0);
}

Fixed version (ground truth):
/** 
 * DOC xqliu Comment method "getDataminingType".
 * @param modelElement
 * @return
 */
public static DataminingType getDataminingType(ModelElement modelElement){
  if (modelElement != null) {
    if (modelElement instanceof TdColumn) {
      return getDataminingType((TdColumn)modelElement);
    }
 else     if (modelElement instanceof TdXmlElementType) {
      return DataminingType.get(((TdXmlElementType)modelElement).getContentType());
    }
 else     if (modelElement instanceof MetadataColumn) {
      int javaType=TalendTypeConvert.convertToJDBCType(((MetadataColumn)modelElement).getTalendType());
      return MetadataHelper.getDefaultDataminingType(javaType);
    }
  }
  return getDefaultDataminingType(0);
}
Program: 138238
Project: 138238
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public EList<String> getColumnHeaders(){
  EList<String> headers=new BasicEList<String>();
  for (  ModelElement column : this.getNominalColumns()) {
    headers.add(getColumnName(column));
  }
  for (  ModelElement column : this.getNumericColumns()) {
    for (    String f : this.getNumericFunctions()) {
      headers.add(MessageFormat.format(f,getColumnName(column)));
    }
  }
  for (  ModelElement column : this.getDateColumns()) {
    for (    String f : this.getDateFunctions()) {
      headers.add(MessageFormat.format(f,getColumnName(column)));
    }
  }
  if (analyzedColumns != null) {
    for (    ModelElement modEle : analyzedColumns) {
      TdXmlElementType tdXmlElemnt=SwitchHelpers.XMLELEMENTTYPE_SWITCH.doSwitch(modEle);
      if (tdXmlElemnt != null) {
        headers.add(tdXmlElemnt.getName());
      }
    }
  }
  headers.add(this.getCountAll());
  return headers;
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public EList<String> getColumnHeaders(){
  EList<String> headers=new BasicEList<String>();
  for (  ModelElement column : this.getNominalColumns()) {
    headers.add(column.getName());
  }
  for (  ModelElement column : this.getNumericColumns()) {
    for (    String f : this.getNumericFunctions()) {
      headers.add(MessageFormat.format(f,column.getName()));
    }
  }
  for (  ModelElement column : this.getDateColumns()) {
    for (    String f : this.getDateFunctions()) {
      headers.add(MessageFormat.format(f,column.getName()));
    }
  }
  if (analyzedColumns != null) {
    for (    ModelElement modEle : analyzedColumns) {
      TdXmlElementType tdXmlElemnt=SwitchHelpers.XMLELEMENTTYPE_SWITCH.doSwitch(modEle);
      if (tdXmlElemnt != null) {
        headers.add(tdXmlElemnt.getName());
      }
    }
  }
  headers.add(this.getCountAll());
  return headers;
}
Program: 138239
Project: 138239
Buggy source:
public Map<String,String> getQueryMap(){
  boolean isSqlEngine=ExecutionLanguage.SQL.equals(this.analysis.getParameters().getExecutionLanguage());
  Map<String,String> map=new HashMap<String,String>();
switch (this.indicatorEnum) {
case MinLengthIndicatorEnum:
case MaxLengthIndicatorEnum:
case AverageLengthIndicatorEnum:
case MinLengthWithBlankIndicatorEnum:
case MinLengthWithBlankNullIndicatorEnum:
case MinLengthWithNullIndicatorEnum:
case MaxLengthWithBlankIndicatorEnum:
case MaxLengthWithBlankNullIndicatorEnum:
case MaxLengthWithNullIndicatorEnum:
case AverageLengthWithBlankIndicatorEnum:
case AverageLengthWithNullBlankIndicatorEnum:
case AverageLengthWithNullIndicatorEnum:
    map.put(MENU_VIEW_ROWS,isSqlEngine ? getComment(MENU_VIEW_ROWS) + getTextRowsStatement() : null);
  break;
default :
}
return map;
}

Fixed version (ground truth):
public Map<String,String> getQueryMap(){
  boolean isSqlEngine=ExecutionLanguage.SQL.equals(this.analysis.getParameters().getExecutionLanguage());
  Map<String,String> map=new HashMap<String,String>();
switch (this.indicatorEnum) {
case AverageLengthIndicatorEnum:
    map.put(MENU_VIEW_ROWS,isSqlEngine ? getComment(MENU_VIEW_ROWS) + getAverageLengthRowsStatement() : null);
  break;
case MinLengthIndicatorEnum:
case MaxLengthIndicatorEnum:
case MinLengthWithBlankIndicatorEnum:
case MinLengthWithBlankNullIndicatorEnum:
case MinLengthWithNullIndicatorEnum:
case MaxLengthWithBlankIndicatorEnum:
case MaxLengthWithBlankNullIndicatorEnum:
case MaxLengthWithNullIndicatorEnum:
case AverageLengthWithBlankIndicatorEnum:
case AverageLengthWithNullBlankIndicatorEnum:
case AverageLengthWithNullIndicatorEnum:
map.put(MENU_VIEW_ROWS,isSqlEngine ? getComment(MENU_VIEW_ROWS) + getTextRowsStatement() : null);
break;
default :
}
return map;
}
Program: 138240
Project: 138240
Buggy source:
/** 
 * DOC bZhou Comment method "computePath".
 * @param property
 * @param file
 * @return
 */
public static String computePath(Property property,File file){
  IPath filePath=new Path(file.getAbsolutePath()).setDevice(null);
  int flag=0;
  EResourceConstant typedConstant=EResourceConstant.getTypedConstant(property.getItem());
  if (typedConstant != null) {
    String typedName=typedConstant.getName();
    for (int i=0; i < filePath.segmentCount(); i++) {
      String seg=filePath.segment(i);
      if (seg.equals(typedName)) {
        flag=i + 1;
        break;
      }
    }
  }
 else {
    List<EResourceConstant> typedConstantList=EResourceConstant.getTypedConstantList();
    typedConstantList.add(EResourceConstant.OLD_DB_CONNECTIONS);
    typedConstantList.add(EResourceConstant.MDM_CONNECTIONS);
    for (int i=0; i < filePath.segmentCount() && flag == 0; i++) {
      String seg=filePath.segment(i);
      for (      EResourceConstant constant : typedConstantList) {
        if (seg.equals(constant.getName())) {
          flag=i + 1;
          break;
        }
      }
    }
  }
  IPath statPath=filePath.removeFirstSegments(flag).removeLastSegments(1);
  return statPath.toString();
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "computePath".
 * @param property
 * @param file
 * @return
 */
public static String computePath(Property property,File file){
  IPath filePath=new Path(file.getAbsolutePath()).setDevice(null);
  boolean isConnFromOld=file.getAbsolutePath().contains(EResourceConstant.OLD_METADATA.getName());
  int flag=0;
  EResourceConstant typedConstant=EResourceConstant.getTypedConstant(property.getItem());
  if (typedConstant != null && !isConnFromOld) {
    String typedName=typedConstant.getName();
    for (int i=0; i < filePath.segmentCount(); i++) {
      String seg=filePath.segment(i);
      if (seg.equals(typedName)) {
        flag=i + 1;
        break;
      }
    }
  }
 else {
    List<EResourceConstant> typedConstantList=EResourceConstant.getTypedConstantList();
    typedConstantList.add(EResourceConstant.OLD_DB_CONNECTIONS);
    typedConstantList.add(EResourceConstant.OLD_MDM_CONNECTIONS);
    for (int i=0; i < filePath.segmentCount() && flag == 0; i++) {
      String seg=filePath.segment(i);
      for (      EResourceConstant constant : typedConstantList) {
        if (seg.equals(constant.getName())) {
          flag=i + 1;
          break;
        }
      }
    }
  }
  IPath statPath=filePath.removeFirstSegments(flag).removeLastSegments(1);
  return statPath.toString();
}
Program: 138242
Project: 138242
Buggy source:
public List<IRepositoryNode> getHiddenRepositoryCategory(IRepositoryNode parent){
  List<IRepositoryNode> nodes=new ArrayList<IRepositoryNode>();
  return nodes;
}

Fixed version (ground truth):
public List<IRepositoryNode> getHiddenRepositoryCategory(IRepositoryNode parent,String type){
  List<IRepositoryNode> nodes=new ArrayList<IRepositoryNode>();
  return nodes;
}
Program: 138243
Project: 138243
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void fillContextMenu(IMenuManager menu){
  if (!isShowMenu()) {
    return;
  }
  TreeSelection currentSelection=((TreeSelection)this.getContext().getSelection());
  if (isSelectedColumnLevel(currentSelection)) {
    IMenuManager submenu=new MenuManager(DefaultMessagesImpl.getString("String_Node_Str"),NEW_MENU_NAME);
    menu.insertAfter(ICommonMenuConstants.GROUP_NEW,submenu);
    analyzeColumnAction.setColumnSelection(currentSelection);
    submenu.add(analyzeColumnAction);
  }
  if (isSelectedTdColumn(currentSelection)) {
    analyzeColumnSetAction.setColumnSelection(currentSelection);
    menu.add(analyzeColumnSetAction);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void fillContextMenu(IMenuManager menu){
  if (!isShowMenu()) {
    return;
  }
  TreeSelection currentSelection=((TreeSelection)this.getContext().getSelection());
  if (isSelectedColumnLevel(currentSelection) || isSelectedMdmColumn(currentSelection)) {
    IMenuManager submenu=new MenuManager(DefaultMessagesImpl.getString("String_Node_Str"),NEW_MENU_NAME);
    menu.insertAfter(ICommonMenuConstants.GROUP_NEW,submenu);
    analyzeColumnAction.setColumnSelection(currentSelection);
    submenu.add(analyzeColumnAction);
  }
  if (isSelectedTdColumn(currentSelection)) {
    analyzeColumnSetAction.setColumnSelection(currentSelection);
    menu.add(analyzeColumnSetAction);
  }
}
Program: 138244
Project: 138244
Buggy source:
private boolean hideParameters(IndicatorUnit indicatorUnit){
  EClass indicatorEclass=indicatorUnit.getIndicator().eClass();
  if (indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getMinLengthWithNullIndicator()) || indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getMinLengthWithBlankIndicator()) || indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getMinLengthWithBlankNullIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getMaxLengthWithNullIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getMaxLengthWithBlankIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getMaxLengthWithBlankNullIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getAvgLengthWithNullIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getAvgLengthWithBlankIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getAvgLengthWithBlankNullIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getDateFrequencyIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getWeekFrequencyIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getMonthFrequencyIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getQuarterFrequencyIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getYearFrequencyIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getDateLowFrequencyIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getWeekLowFrequencyIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getMonthLowFrequencyIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getQuarterLowFrequencyIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getYearLowFrequencyIndicator())) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean hideParameters(IndicatorUnit indicatorUnit){
  EClass indicatorEclass=indicatorUnit.getIndicator().eClass();
  if (indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getDateFrequencyIndicator()) || indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getWeekFrequencyIndicator()) || indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getMonthFrequencyIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getQuarterFrequencyIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getYearFrequencyIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getDateLowFrequencyIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getWeekLowFrequencyIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getMonthLowFrequencyIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getQuarterLowFrequencyIndicator())|| indicatorEclass.equals(IndicatorsPackage.eINSTANCE.getYearLowFrequencyIndicator())) {
    return true;
  }
  return false;
}
Program: 138245
Project: 138245
Buggy source:
public ExecutiveAnalysisJob(ColumnAnalysisSqlExecutor parent,Connection connection,Map<ModelElement,List<Indicator>> elementToIndicator,Indicator indicator){
  super(PluginConstant.EMPTY_STRING);
  this.parent=parent;
  this.connection=connection;
  this.elementToIndicator=elementToIndicator;
  this.indicator=indicator;
}

Fixed version (ground truth):
public ExecutiveAnalysisJob(ColumnAnalysisSqlExecutor parent,Connection connection,Map<ModelElement,List<Indicator>> elementToIndicator,Indicator indicator,ConnectionPool connPool){
  super(PluginConstant.EMPTY_STRING);
  this.connPool=connPool;
  this.parent=parent;
  this.connection=connection;
  this.elementToIndicator=elementToIndicator;
  this.indicator=indicator;
}
Program: 138246
Project: 138246
Buggy source:
@Override protected IStatus run(IProgressMonitor monitor){
  ColumnAnalysisSqlParallelExecutor columnSqlParallel=ColumnAnalysisSqlParallelExecutor.createInstance(parent,connection,elementToIndicator,indicator);
  columnSqlParallel.run();
  if (columnSqlParallel.ok) {
    return Status.OK_STATUS;
  }
 else {
    this.errorMessage=Messages.getString("String_Node_Str");
    return Status.CANCEL_STATUS;
  }
}

Fixed version (ground truth):
@Override protected IStatus run(IProgressMonitor monitor){
  ColumnAnalysisSqlParallelExecutor columnSqlParallel=ColumnAnalysisSqlParallelExecutor.createInstance(parent,connection,elementToIndicator,indicator,connPool);
  columnSqlParallel.run();
  if (columnSqlParallel.ok) {
    return Status.OK_STATUS;
  }
 else {
    this.errorMessage=Messages.getString("String_Node_Str");
    return Status.CANCEL_STATUS;
  }
}
Program: 138247
Project: 138247
Buggy source:
@Override protected boolean runAnalysis(Analysis analysis,String sqlStatement){
  boolean ok=true;
  TypedReturnCode<Connection> trc=this.getConnection(analysis);
  if (!trc.isOk()) {
    return traceError("String_Node_Str" + analysis.getName() + "String_Node_Str"+ trc.getMessage());
  }
  Connection connection=trc.getObject();
  try {
    Map<ModelElement,List<Indicator>> elementToIndicator=new HashMap<ModelElement,List<Indicator>>();
    Collection<Indicator> indicators=IndicatorHelper.getIndicatorLeaves(analysis.getResults());
    if (canParallel()) {
      ok=runAnalysisIndicatorsParallel(analysis,elementToIndicator,indicators);
    }
 else {
      ok=runAnalysisIndicators(connection,elementToIndicator,indicators);
    }
    connection.close();
    setRowCountAndNullCount(elementToIndicator);
  }
 catch (  SQLException e) {
    log.error(e,e);
    this.errorMessage=e.getMessage();
    ok=false;
  }
 finally {
    ConnectionUtils.closeConnection(connection);
  }
  return ok;
}

Fixed version (ground truth):
@Override protected boolean runAnalysis(Analysis analysis,String sqlStatement){
  boolean ok=true;
  TypedReturnCode<Connection> trc=this.getConnection(analysis);
  if (!trc.isOk()) {
    return traceError("String_Node_Str" + analysis.getName() + "String_Node_Str"+ trc.getMessage());
  }
  Connection connection=null;
  ConnectionPool connPool=null;
  try {
    Map<ModelElement,List<Indicator>> elementToIndicator=new HashMap<ModelElement,List<Indicator>>();
    Collection<Indicator> indicators=IndicatorHelper.getIndicatorLeaves(analysis.getResults());
    if (canParallel()) {
      connPool=new ConnectionPool(trc);
      try {
        connPool.createPool();
      }
 catch (      Exception e1) {
        log.error(e1);
      }
      ok=runAnalysisIndicatorsParallel(analysis,elementToIndicator,indicators,connPool);
    }
 else {
      connection=trc.getObject();
      ok=runAnalysisIndicators(connection,elementToIndicator,indicators);
    }
    setRowCountAndNullCount(elementToIndicator);
  }
 catch (  SQLException e) {
    log.error(e,e);
    this.errorMessage=e.getMessage();
    ok=false;
  }
 finally {
    if (null != connection) {
      ConnectionUtils.closeConnection(connection);
    }
    if (null != connPool) {
      try {
        connPool.closeConnectionPool();
      }
 catch (      SQLException e) {
        log.error("String_Node_Str" + e);
      }
    }
  }
  return ok;
}
Program: 138248
Project: 138248
Buggy source:
/** 
 * The original method have been removed,this is the rewriting method. The logic of the new approach by Job to executive indicators,replace the original thread in the thread way nested. Each indicator corresponds to a job, after all the indicators executed and then running the main thread.
 * @param analysis
 * @param elementToIndicator
 * @param indicators
 * @return ok(execution results)
 * @throws SQLException
 */
private boolean runAnalysisIndicatorsParallel(Analysis analysis,Map<ModelElement,List<Indicator>> elementToIndicator,Collection<Indicator> indicators) throws SQLException {
  boolean ok=true;
  List<ExecutiveAnalysisJob> excuteAnalysisJober=new ArrayList<ExecutiveAnalysisJob>();
  TypedReturnCode<Connection> trcConn=null;
  for (  Indicator indicator : indicators) {
    if (null == trcConn || !trcConn.isOk()) {
      trcConn=this.getConnection(analysis);
    }
    if (trcConn.isOk()) {
      ExecutiveAnalysisJob eaj=new ExecutiveAnalysisJob(this,trcConn.getObject(),elementToIndicator,indicator);
      excuteAnalysisJober.add(eaj);
      eaj.schedule();
    }
  }
  for (  ExecutiveAnalysisJob exeAnaJober : excuteAnalysisJober) {
    try {
      exeAnaJober.join();
    }
 catch (    InterruptedException e) {
      log.warn(e,e);
    }
    if (exeAnaJober.errorMessage != null) {
      this.errorMessage=exeAnaJober.errorMessage;
      ok=false;
    }
  }
  if (null != trcConn && null != trcConn.getObject() && !trcConn.getObject().isClosed()) {
    trcConn.getObject().close();
  }
  return ok;
}

Fixed version (ground truth):
/** 
 * The original method have been removed,this is the rewriting method. The logic of the new approach by Job to executive indicators,replace the original thread in the thread way nested. Each indicator corresponds to a job, after all the indicators executed and then running the main thread.
 * @param analysis
 * @param elementToIndicator
 * @param indicators
 * @return ok(execution results)
 * @throws SQLException
 */
private boolean runAnalysisIndicatorsParallel(Analysis analysis,Map<ModelElement,List<Indicator>> elementToIndicator,Collection<Indicator> indicators,ConnectionPool connPool) throws SQLException {
  List<ExecutiveAnalysisJob> excuteAnalysisJober=new ArrayList<ExecutiveAnalysisJob>();
  try {
    for (    Indicator indicator : indicators) {
      if (connPool.isOK()) {
        Connection conn=connPool.getConnection();
        ExecutiveAnalysisJob eaj=new ExecutiveAnalysisJob(ColumnAnalysisSqlExecutor.this,conn,elementToIndicator,indicator,connPool);
        excuteAnalysisJober.add(eaj);
        eaj.schedule();
      }
    }
    for (    ExecutiveAnalysisJob exeAnaJober : excuteAnalysisJober) {
      try {
        exeAnaJober.join();
      }
 catch (      InterruptedException e) {
        log.error(e);
      }
      if (exeAnaJober.errorMessage != null) {
        ColumnAnalysisSqlExecutor.this.errorMessage=exeAnaJober.errorMessage;
        ColumnAnalysisSqlExecutor.this.parallelExeStatus=false;
      }
    }
  }
 catch (  Throwable thr) {
    log.error(thr);
  }
  return parallelExeStatus;
}
Program: 138249
Project: 138249
Buggy source:
public static ColumnAnalysisSqlParallelExecutor createInstance(ColumnAnalysisSqlExecutor parent,Connection connection,Map<ModelElement,List<Indicator>> elementToIndicator,Indicator indicator){
  ColumnAnalysisSqlParallelExecutor inst=createInstance(parent);
  if (inst != null) {
    inst.connection=connection;
    inst.elementToIndicator=elementToIndicator;
    inst.indicator=indicator;
  }
  return inst;
}

Fixed version (ground truth):
public static ColumnAnalysisSqlParallelExecutor createInstance(ColumnAnalysisSqlExecutor parent,Connection connection,Map<ModelElement,List<Indicator>> elementToIndicator,Indicator indicator,ConnectionPool connPool){
  ColumnAnalysisSqlParallelExecutor inst=createInstance(parent);
  if (inst != null) {
    inst.connection=connection;
    inst.elementToIndicator=elementToIndicator;
    inst.indicator=indicator;
    inst.connPool=connPool;
  }
  return inst;
}
Program: 138250
Project: 138250
Buggy source:
public void run(){
  try {
    if (indicator instanceof CompositeIndicator) {
      return;
    }
synchronized (schemata) {
      String catalogName=getCatalogOrSchemaName(indicator.getAnalyzedElement());
      if (catalogName != null) {
        changeCatalog(catalogName,connection);
      }
    }
    Expression query=dbms().getInstantiatedExpression(indicator);
    if (query == null || !executeQuery(indicator,connection,query.getBody())) {
      ok=traceError("String_Node_Str" + indicator.getName() + "String_Node_Str"+ ((query == null) ? "String_Node_Str" : "String_Node_Str" + query.getBody()));
    }
 else {
      indicator.setComputed(true);
    }
synchronized (elementToIndicator) {
      MultiMapHelper.addUniqueObjectToListMap(indicator.getAnalyzedElement(),indicator,elementToIndicator);
    }
  }
 catch (  SQLException e) {
    this.setException(e);
  }
}

Fixed version (ground truth):
public void run(){
  try {
    if (indicator instanceof CompositeIndicator) {
      return;
    }
synchronized (schemata) {
      String catalogName=getCatalogOrSchemaName(indicator.getAnalyzedElement());
      if (catalogName != null) {
        changeCatalog(catalogName,connection);
      }
    }
    Expression query=dbms().getInstantiatedExpression(indicator);
    if (query == null || !executeQuery(indicator,connection,query.getBody())) {
      ok=traceError("String_Node_Str" + indicator.getName() + "String_Node_Str"+ ((query == null) ? "String_Node_Str" : "String_Node_Str" + query.getBody()));
    }
 else {
      indicator.setComputed(true);
    }
synchronized (elementToIndicator) {
      MultiMapHelper.addUniqueObjectToListMap(indicator.getAnalyzedElement(),indicator,elementToIndicator);
    }
  }
 catch (  SQLException e) {
    this.setException(e);
  }
 finally {
    connPool.returnConnection(connection);
  }
}
Program: 138252
Project: 138252
Buggy source:
@Override protected boolean doExecute() throws Exception {
  String categorie="String_Node_Str";
  String accessQuery="String_Node_Str";
  TalendDefinitionFileUpdate talendDefinitionFileUpdate=new TalendDefinitionFileUpdate();
  if (-1 == talendDefinitionFileUpdate.indexOf(accessQuery)) {
    talendDefinitionFileUpdate.add(categorie,categorie + System.getProperty("String_Node_Str") + accessQuery);
    return talendDefinitionFileUpdate.replace(this.getClass().getName());
  }
  return false;
}

Fixed version (ground truth):
@Override protected boolean doExecute() throws Exception {
  boolean rc=true;
  String categorie="String_Node_Str";
  String accessQuery="String_Node_Str";
  TalendDefinitionFileUpdate talendDefinitionFileUpdate=new TalendDefinitionFileUpdate();
  if (-1 == talendDefinitionFileUpdate.indexOf(accessQuery)) {
    talendDefinitionFileUpdate.add(categorie,categorie + System.getProperty("String_Node_Str") + accessQuery);
    rc=talendDefinitionFileUpdate.replace(this.getClass().getName());
  }
  return rc;
}
Program: 138255
Project: 138255
Buggy source:
/** 
 */
private static Map<String,DateValueAggregate> fillGanttDataset(final EList<ModelElement> nominalColumns,final List<Object[]> listRows,final int firstDateColumnIdx){
  Map<String,DateValueAggregate> valueAggregators=new TreeMap<String,DateValueAggregate>();
  int minPos=firstDateColumnIdx;
  int maxPos=firstDateColumnIdx + 1;
  for (int i=nominalColumns.size(); i > 0; i--) {
    String key=createKey(nominalColumns,i);
    for (    Object[] row : listRows) {
      final Object minObj=row[minPos];
      final Date minDate=minObj != null ? (Date)minObj : null;
      final Object maxobj=row[maxPos];
      final Date maxDate=maxobj != null ? (Date)maxobj : null;
      DateValueAggregate valueAggregator=valueAggregators.get(key);
      if (valueAggregator == null) {
        valueAggregator=new DateValueAggregate();
        valueAggregators.put(key,valueAggregator);
      }
      MultipleKey multipleKey=new MultipleKey(row,i);
      valueAggregator.addValue(multipleKey,new Date[]{minDate,maxDate});
    }
  }
  return valueAggregators;
}

Fixed version (ground truth):
/** 
 */
private static Map<String,DateValueAggregate> fillGanttDataset(final EList<ModelElement> nominalColumns,final List<Object[]> listRows,final int firstDateColumnIdx){
  Map<String,DateValueAggregate> valueAggregators=new TreeMap<String,DateValueAggregate>();
  int minPos=firstDateColumnIdx;
  int maxPos=firstDateColumnIdx + 1;
  for (int i=nominalColumns.size(); i > 0; i--) {
    String key=createKey(nominalColumns,i);
    if (null != listRows) {
      for (      Object[] row : listRows) {
        final Object minObj=row[minPos];
        final Date minDate=minObj != null ? (Date)minObj : null;
        final Object maxobj=row[maxPos];
        final Date maxDate=maxobj != null ? (Date)maxobj : null;
        DateValueAggregate valueAggregator=valueAggregators.get(key);
        if (valueAggregator == null) {
          valueAggregator=new DateValueAggregate();
          valueAggregators.put(key,valueAggregator);
        }
        MultipleKey multipleKey=new MultipleKey(row,i);
        valueAggregator.addValue(multipleKey,new Date[]{minDate,maxDate});
      }
    }
  }
  return valueAggregators;
}
Program: 138256
Project: 138256
Buggy source:
/** 
 * The original method have been removed,this is the rewriting method. The logic of the new approach by Job to executive indicators,replace the original thread in the thread way nested. Each indicator corresponds to a job, after all the indicators executed and then running the main thread.
 * @param analysis
 * @param elementToIndicator
 * @param indicators
 * @return ok(execution results)
 * @throws SQLException
 */
private boolean runAnalysisIndicatorsParallel(Analysis analysis,Map<ModelElement,List<Indicator>> elementToIndicator,Collection<Indicator> indicators) throws SQLException {
  boolean ok=true;
  List<ExecutiveAnalysisJob> excuteAnalysisJober=new ArrayList<ExecutiveAnalysisJob>();
  for (  Indicator indicator : indicators) {
    TypedReturnCode<Connection> trcConn=this.getConnection(analysis);
    if (trcConn.isOk()) {
      ExecutiveAnalysisJob eaj=new ExecutiveAnalysisJob(this,trcConn.getObject(),elementToIndicator,indicator);
      excuteAnalysisJober.add(eaj);
      eaj.schedule();
    }
  }
  for (  ExecutiveAnalysisJob exeAnaJober : excuteAnalysisJober) {
    try {
      exeAnaJober.join();
    }
 catch (    InterruptedException e) {
      log.warn(e,e);
    }
    if (exeAnaJober.errorMessage != null) {
      this.errorMessage=exeAnaJober.errorMessage;
      ok=false;
    }
  }
  return ok;
}

Fixed version (ground truth):
/** 
 * The original method have been removed,this is the rewriting method. The logic of the new approach by Job to executive indicators,replace the original thread in the thread way nested. Each indicator corresponds to a job, after all the indicators executed and then running the main thread.
 * @param analysis
 * @param elementToIndicator
 * @param indicators
 * @return ok(execution results)
 * @throws SQLException
 */
private boolean runAnalysisIndicatorsParallel(Analysis analysis,Map<ModelElement,List<Indicator>> elementToIndicator,Collection<Indicator> indicators) throws SQLException {
  boolean ok=true;
  List<ExecutiveAnalysisJob> excuteAnalysisJober=new ArrayList<ExecutiveAnalysisJob>();
  TypedReturnCode<Connection> trcConn=null;
  for (  Indicator indicator : indicators) {
    if (null == trcConn || !trcConn.isOk()) {
      trcConn=this.getConnection(analysis);
    }
    if (trcConn.isOk()) {
      ExecutiveAnalysisJob eaj=new ExecutiveAnalysisJob(this,trcConn.getObject(),elementToIndicator,indicator);
      excuteAnalysisJober.add(eaj);
      eaj.schedule();
    }
  }
  for (  ExecutiveAnalysisJob exeAnaJober : excuteAnalysisJober) {
    try {
      exeAnaJober.join();
    }
 catch (    InterruptedException e) {
      log.warn(e,e);
    }
    if (exeAnaJober.errorMessage != null) {
      this.errorMessage=exeAnaJober.errorMessage;
      ok=false;
    }
  }
  if (null != trcConn && null != trcConn.getObject() && !trcConn.getObject().isClosed()) {
    trcConn.getObject().close();
  }
  return ok;
}
Program: 138257
Project: 138257
Buggy source:
public void run(){
  try {
    if (indicator instanceof CompositeIndicator) {
      return;
    }
synchronized (schemata) {
      String catalogName=getCatalogOrSchemaName(indicator.getAnalyzedElement());
      if (catalogName != null) {
        changeCatalog(catalogName,connection);
      }
    }
    Expression query=dbms().getInstantiatedExpression(indicator);
    if (query == null || !executeQuery(indicator,connection,query.getBody())) {
      ok=traceError("String_Node_Str" + indicator.getName() + "String_Node_Str"+ ((query == null) ? "String_Node_Str" : "String_Node_Str" + query.getBody()));
    }
 else {
      indicator.setComputed(true);
    }
synchronized (elementToIndicator) {
      MultiMapHelper.addUniqueObjectToListMap(indicator.getAnalyzedElement(),indicator,elementToIndicator);
    }
  }
 catch (  SQLException e) {
    this.setException(e);
  }
 finally {
    try {
      if (connection != null && !connection.isClosed()) {
        connection.close();
      }
    }
 catch (    SQLException e) {
      this.setException(e);
    }
  }
}

Fixed version (ground truth):
public void run(){
  try {
    if (indicator instanceof CompositeIndicator) {
      return;
    }
synchronized (schemata) {
      String catalogName=getCatalogOrSchemaName(indicator.getAnalyzedElement());
      if (catalogName != null) {
        changeCatalog(catalogName,connection);
      }
    }
    Expression query=dbms().getInstantiatedExpression(indicator);
    if (query == null || !executeQuery(indicator,connection,query.getBody())) {
      ok=traceError("String_Node_Str" + indicator.getName() + "String_Node_Str"+ ((query == null) ? "String_Node_Str" : "String_Node_Str" + query.getBody()));
    }
 else {
      indicator.setComputed(true);
    }
synchronized (elementToIndicator) {
      MultiMapHelper.addUniqueObjectToListMap(indicator.getAnalyzedElement(),indicator,elementToIndicator);
    }
  }
 catch (  SQLException e) {
    this.setException(e);
  }
}
Program: 138258
Project: 138258
Buggy source:
protected String getInstantiatedClause(){
  String colName=columnName;
  String function=null;
  TdColumn column=(TdColumn)indicator.getAnalyzedElement();
  int javaType=column.getSqlDataType().getJavaDataType();
  if (!Java2SqlType.isNumbericInSQL(javaType)) {
    function=getFunction();
  }
 else {
    colName=columnNameConvert();
  }
  Object value=null;
  if (Java2SqlType.isNumbericInSQL(javaType) && dbmsLanguage instanceof DB2DbmsLanguage) {
    value=entity.getKey();
  }
 else {
    value="String_Node_Str" + entity.getKey() + "String_Node_Str";
  }
  String clause=entity.isLabelNull() ? columnName + dbmsLanguage.isNull() : ((function == null ? colName : function) + dbmsLanguage.equal() + value);
  return clause;
}

Fixed version (ground truth):
protected String getInstantiatedClause(){
  String colName=columnName;
  String function=null;
  TdColumn column=(TdColumn)indicator.getAnalyzedElement();
  int javaType=column.getSqlDataType().getJavaDataType();
  if (!Java2SqlType.isNumbericInSQL(javaType)) {
    function=getFunction();
  }
 else {
    colName=columnNameConvert();
  }
  Object value=null;
  if (Java2SqlType.isNumbericInSQL(javaType) && dbmsLanguage instanceof DB2DbmsLanguage) {
    value=entity.getKey();
  }
 else {
    value="String_Node_Str" + entity.getKey() + "String_Node_Str";
  }
  String clause=entity.isLabelNull() ? columnName + dbmsLanguage.isNull() : ((function == null ? colName : function) + dbmsLanguage.equal() + value);
  if (dbmsLanguage instanceof InfomixDbmsLanguage) {
    clause=clause.replaceAll(InfomixDbmsLanguage.AS_REPLACE_COLUMN,PluginConstant.EMPTY_STRING);
  }
  return clause;
}
Program: 138259
Project: 138259
Buggy source:
@Override protected void addFieldsListeners(){
  lowerText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String min=lowerText.getText();
      String max=higherText.getText();
      if (!min.equals("String_Node_Str") && !CheckValueUtils.isNumberWithNegativeValue(min)) {
        updateStatus(IStatus.ERROR,MSG_ONLY_NUMBER);
      }
 else       if (CheckValueUtils.isAoverB(min,max)) {
        updateStatus(IStatus.ERROR,UIMessages.MSG_LOWER_LESS_HIGHER);
      }
 else {
        updateStatus(IStatus.OK,MSG_OK);
      }
    }
  }
);
  higherText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String max=higherText.getText();
      String min=lowerText.getText();
      if (!max.equals("String_Node_Str") && !CheckValueUtils.isNumberWithNegativeValue(max)) {
        updateStatus(IStatus.ERROR,MSG_ONLY_NUMBER);
      }
 else       if (CheckValueUtils.isAoverB(min,max)) {
        updateStatus(IStatus.ERROR,UIMessages.MSG_LOWER_LESS_HIGHER);
      }
 else {
        updateStatus(IStatus.OK,MSG_OK);
      }
    }
  }
);
}

Fixed version (ground truth):
@Override protected void addFieldsListeners(){
  lowerText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String min=lowerText.getText();
      String max=higherText.getText();
      if (!min.equals("String_Node_Str") && !CheckValueUtils.isRealNumberValue(min)) {
        updateStatus(IStatus.ERROR,MSG_ONLY_NUMBER);
      }
 else       if (CheckValueUtils.isAoverB(min,max)) {
        updateStatus(IStatus.ERROR,UIMessages.MSG_LOWER_LESS_HIGHER);
      }
 else {
        updateStatus(IStatus.OK,MSG_OK);
      }
    }
  }
);
  higherText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String max=higherText.getText();
      String min=lowerText.getText();
      if (!max.equals("String_Node_Str") && !CheckValueUtils.isRealNumberValue(max)) {
        updateStatus(IStatus.ERROR,MSG_ONLY_NUMBER);
      }
 else       if (CheckValueUtils.isAoverB(min,max)) {
        updateStatus(IStatus.ERROR,UIMessages.MSG_LOWER_LESS_HIGHER);
      }
 else {
        updateStatus(IStatus.OK,MSG_OK);
      }
    }
  }
);
}
Program: 138260
Project: 138260
Buggy source:
public void modifyText(ModifyEvent e){
  String max=higherText.getText();
  String min=lowerText.getText();
  if (!max.equals("String_Node_Str") && !CheckValueUtils.isNumberWithNegativeValue(max)) {
    updateStatus(IStatus.ERROR,MSG_ONLY_NUMBER);
  }
 else   if (CheckValueUtils.isAoverB(min,max)) {
    updateStatus(IStatus.ERROR,UIMessages.MSG_LOWER_LESS_HIGHER);
  }
 else {
    updateStatus(IStatus.OK,MSG_OK);
  }
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
  String max=higherText.getText();
  String min=lowerText.getText();
  if (!max.equals("String_Node_Str") && !CheckValueUtils.isRealNumberValue(max)) {
    updateStatus(IStatus.ERROR,MSG_ONLY_NUMBER);
  }
 else   if (CheckValueUtils.isAoverB(min,max)) {
    updateStatus(IStatus.ERROR,UIMessages.MSG_LOWER_LESS_HIGHER);
  }
 else {
    updateStatus(IStatus.OK,MSG_OK);
  }
}
Program: 138263
Project: 138263
Buggy source:
public void run(){
  tree.getColumn(0).setWidth(tree.getColumn(0).getWidth() - 1);
}

Fixed version (ground truth):
public void run(){
  tree.setFocus();
}