nus-yam/ex-repair huggingface dataset:
Program: 139616
Project: 139616
Buggy source:
public TableViewerDNDDecorate(){
  final LocalSelectionTransfer transfer=LocalSelectionTransfer.getTransfer();
  transferTypes=new Transfer[]{transfer,TextTransfer.getInstance()};
}

Fixed version (ground truth):
public TableViewerDNDDecorate(boolean allowDuplication){
  final LocalSelectionTransfer transfer=LocalSelectionTransfer.getTransfer();
  transferTypes=new Transfer[]{transfer,TextTransfer.getInstance()};
  this.allowDuplication=allowDuplication;
}
Program: 139617
Project: 139617
Buggy source:
@SuppressWarnings("String_Node_Str") private static boolean validateColumnType(StructuredSelection selection,TableViewer targetViewer){
  boolean isValidation=true;
  List selectionList=selection.toList();
  List elements=(List)targetViewer.getInput();
  for (  Object element : elements) {
    if (selectionList.contains(element)) {
      isValidation=false;
      break;
    }
  }
  for (  Object obj : selectionList) {
    if (!(obj instanceof Column)) {
      isValidation=false;
      break;
    }
  }
  return isValidation;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private boolean validateColumnType(StructuredSelection selection,TableViewer targetViewer){
  boolean isValidation=true;
  List selectionList=selection.toList();
  if (!allowDuplication) {
    List elements=(List)targetViewer.getInput();
    for (    Object element : elements) {
      if (selectionList.contains(element)) {
        isValidation=false;
        break;
      }
    }
  }
  for (  Object obj : selectionList) {
    if (!(obj instanceof Column)) {
      isValidation=false;
      break;
    }
  }
  return isValidation;
}
Program: 139618
Project: 139618
Buggy source:
/** 
 * DOC hcheng Comment method "createAnalysisParamSection".
 * @param form
 * @param anasisDataComp
 */
void createAnalysisParamSection(final ScrolledForm form,Composite anasisDataComp){
  analysisParamSection=createSection(form,anasisDataComp,DefaultMessagesImpl.getString("String_Node_Str"),false,null);
  Composite sectionClient=toolkit.createComposite(analysisParamSection);
  sectionClient.setLayout(new GridLayout(2,false));
  toolkit.createLabel(sectionClient,DefaultMessagesImpl.getString("String_Node_Str"));
  final CCombo execCombo=new CCombo(sectionClient,SWT.BORDER);
  execCombo.setEditable(false);
  for (  ExecutionLanguage language : ExecutionLanguage.VALUES) {
    String temp=language.getLiteral();
    execCombo.add(temp);
  }
  ExecutionLanguage executionLanguage=analysis.getParameters().getExecutionLanguage();
  execCombo.setText(executionLanguage.getLiteral());
  treeViewer.setLanguage(ExecutionLanguage.get(executionLanguage.getLiteral()));
  execCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      execLang=execCombo.getText();
      if (ExecutionLanguage.JAVA.equals(ExecutionLanguage.get(execLang)) && includeUDI()) {
        MessageUI.openWarning(DefaultMessagesImpl.getString("String_Node_Str"));
        execCombo.setText(ExecutionLanguage.SQL.getLiteral());
        return;
      }
      setDirty(true);
      treeViewer.setLanguage(ExecutionLanguage.get(execLang));
    }
  }
);
  analysisParamSection.setClient(sectionClient);
}

Fixed version (ground truth):
/** 
 * DOC hcheng Comment method "createAnalysisParamSection".
 * @param form
 * @param anasisDataComp
 */
void createAnalysisParamSection(final ScrolledForm form,Composite anasisDataComp){
  analysisParamSection=createSection(form,anasisDataComp,DefaultMessagesImpl.getString("String_Node_Str"),false,null);
  Composite sectionClient=toolkit.createComposite(analysisParamSection);
  sectionClient.setLayout(new GridLayout(2,false));
  toolkit.createLabel(sectionClient,DefaultMessagesImpl.getString("String_Node_Str"));
  final CCombo execCombo=new CCombo(sectionClient,SWT.BORDER);
  execCombo.setEditable(false);
  for (  ExecutionLanguage language : ExecutionLanguage.VALUES) {
    String temp=language.getLiteral();
    execCombo.add(temp);
  }
  ExecutionLanguage executionLanguage=analysis.getParameters().getExecutionLanguage();
  execCombo.setText(executionLanguage.getLiteral());
  execLang=executionLanguage.getLiteral();
  treeViewer.setLanguage(ExecutionLanguage.get(executionLanguage.getLiteral()));
  execCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      execLang=execCombo.getText();
      if (ExecutionLanguage.JAVA.equals(ExecutionLanguage.get(execLang)) && includeUDI()) {
        MessageUI.openWarning(DefaultMessagesImpl.getString("String_Node_Str"));
        execCombo.setText(ExecutionLanguage.SQL.getLiteral());
        return;
      }
      setDirty(true);
      treeViewer.setLanguage(ExecutionLanguage.get(execLang));
    }
  }
);
  analysisParamSection.setClient(sectionClient);
}
Program: 139619
Project: 139619
Buggy source:
@Override public boolean handle(Object data){
  super.handle(data);
  if (data != null) {
    if (!this.uniqueObjects.add(data)) {
      duplicateObjects.add(data);
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean handle(Object data){
  super.handle(data);
  if (!this.uniqueObjects.add(data)) {
    duplicateObjects.add(data);
  }
  return true;
}
Program: 139620
Project: 139620
Buggy source:
/** 
 * DOC scorreia Comment method "getRegex".
 * @return
 */
private String getRegex(){
  if (this.parameters != null) {
    final Domain dataValidDomain=parameters.getDataValidDomain();
    if (dataValidDomain != null) {
      final EList<Pattern> patterns=dataValidDomain.getPatterns();
      for (      Pattern p : patterns) {
        if (p != null) {
          final String r=DomainHelper.getSQLRegexp(p);
          return r.substring(1,r.length() - 2);
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "getRegex".
 * @return
 */
private String getRegex(){
  if (this.parameters != null) {
    final Domain dataValidDomain=parameters.getDataValidDomain();
    if (dataValidDomain != null) {
      final EList<Pattern> patterns=dataValidDomain.getPatterns();
      for (      Pattern p : patterns) {
        if (p != null) {
          final String r=DomainHelper.getSQLRegexp(p);
          if (r != null) {
            int startIdx=('\'' == r.charAt(0)) ? 1 : 0;
            int endIdx=('\'' == r.charAt(r.length() - 1)) ? r.length() - 1 : r.length();
            return r.substring(startIdx,endIdx);
          }
        }
      }
    }
  }
  return null;
}
Program: 139621
Project: 139621
Buggy source:
private void buildJoinClause(StringBuilder builder,String tableA,String tableAliasA,String columnAName,boolean hasTableAliasA,String tableB,String tableAliasB,String columnBName,boolean hasTableAliasB,String operator){
  if (hasTableAliasA) {
    builder.append(surroundWithSpaces(tableAliasA));
  }
  builder.append("String_Node_Str");
  builder.append(surroundWithSpaces(quote(tableB)));
  if (hasTableAliasB) {
    builder.append(surroundWithSpaces(tableAliasB));
  }
  builder.append("String_Node_Str");
  String tA=hasTableAliasA ? tableAliasA : quote(tableA);
  String tB=hasTableAliasB ? tableAliasB : quote(tableB);
  String cA=quote(columnAName);
  String cB=quote(columnBName);
  createJoinClause(builder,tA,cA,tB,cB,operator);
}

Fixed version (ground truth):
private void buildJoinClause(StringBuilder builder,String tableA,String tableAliasA,String columnAName,boolean hasTableAliasA,String tableB,String tableAliasB,String columnBName,boolean hasTableAliasB,String operator){
  boolean hasAlreadyOneJoin=builder.toString().contains(this.join());
  if (hasTableAliasA && !hasAlreadyOneJoin) {
    builder.append(surroundWithSpaces(tableAliasA));
  }
  builder.append(join());
  builder.append(surroundWithSpaces(quote(tableB)));
  if (hasTableAliasB) {
    builder.append(surroundWithSpaces(tableAliasB));
  }
  builder.append("String_Node_Str");
  String tA=hasTableAliasA ? tableAliasA : quote(tableA);
  String tB=hasTableAliasB ? tableAliasB : quote(tableB);
  String cA=quote(columnAName);
  String cB=quote(columnBName);
  createJoinClause(builder,tA,cA,tB,cB,operator);
}
Program: 139622
Project: 139622
Buggy source:
/** 
 * Method "createJoinClause" appends a join condition to the builder.
 * @param builder
 * @param tableA the name of the table or null
 * @param columnAName a column name (or an alias)
 * @param tableB the name of the second table or null
 * @param columnBName the column name (or an alias)
 * @param operator the operator used in the joinWhen using a column alias instead of a name, the table name must be set to null (because it's not required)
 */
private void createJoinClause(StringBuilder builder,String tableA,String columnAName,String tableB,String columnBName,String operator){
  builder.append('(');
  if (tableA != null) {
    builder.append(surroundWithSpaces(tableA + "String_Node_Str"));
  }
  builder.append(surroundWithSpaces(columnAName));
  builder.append(operator);
  if (tableB != null) {
    builder.append(surroundWithSpaces(tableB + "String_Node_Str"));
  }
  builder.append(surroundWithSpaces(columnBName));
  builder.append(')');
}

Fixed version (ground truth):
/** 
 * Method "createJoinClause" appends a join condition to the builder.
 * @param builder
 * @param tableA the name of the table or null
 * @param columnAName a column name (or an alias)
 * @param tableB the name of the second table or null
 * @param columnBName the column name (or an alias)
 * @param operator the operator used in the join
 */
private void createJoinClause(StringBuilder builder,String tableA,String columnAName,String tableB,String columnBName,String operator){
  builder.append('(');
  if (tableA != null) {
    builder.append(tableA + "String_Node_Str");
  }
  builder.append(columnAName);
  builder.append(operator);
  if (tableB != null) {
    builder.append(tableB + "String_Node_Str");
  }
  builder.append(columnBName);
  builder.append(')');
}
Program: 139623
Project: 139623
Buggy source:
@Override protected void createResultSection(Composite parent){
  resultSection=createSection(form,parent,DefaultMessagesImpl.getString("String_Node_Str"),true,"String_Node_Str");
  Composite sectionClient=toolkit.createComposite(resultSection);
  sectionClient.setLayout(new GridLayout(2,false));
  sectionClient.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  resultSection.setClient(sectionClient);
  Analysis analysis=this.masterPage.getAnalysisHandler().getAnalysis();
  EList<Indicator> indicators=analysis.getResults().getIndicators();
  if (indicators.size() > 0) {
    columnDependencyIndicator=(ColumnDependencyIndicator)indicators.get(0);
  }
  createTable(sectionClient);
  creatChart(sectionClient,analysis);
  resultSection.layout();
}

Fixed version (ground truth):
@Override protected void createResultSection(Composite parent){
  resultSection=createSection(form,parent,DefaultMessagesImpl.getString("String_Node_Str"),true,"String_Node_Str");
  Composite sectionClient=toolkit.createComposite(resultSection);
  sectionClient.setLayout(new GridLayout(2,false));
  sectionClient.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  resultSection.setClient(sectionClient);
  Analysis analysis=this.masterPage.getAnalysisHandler().getAnalysis();
  EList<Indicator> indicators=analysis.getResults().getIndicators();
  if (indicators.size() > 0) {
    columnDependencyIndicator=(ColumnDependencyIndicator)indicators.get(0);
  }
  createTable(sectionClient);
  createChart(sectionClient,analysis);
  resultSection.layout();
}
Program: 139624
Project: 139624
Buggy source:
@Override protected void createFormContent(IManagedForm managedForm){
  super.createFormContent(managedForm);
  form=managedForm.getForm();
  form.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  this.metadataSection.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  this.metadataSection.setDescription(DefaultMessagesImpl.getString("String_Node_Str"));
  anaColumnCompareViewer=new AnalysisColumnCompareTreeViewer((AbstractAnalysisMetadataPage)this,topComp,getColumnLeftSet(),getColumnRightSet(),DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"),false,true);
  anaColumnCompareViewer.addPropertyChangeListener(this);
  createDataFilterSection(form,topComp);
  columnListA=anaColumnCompareViewer.getColumnListA();
  columnListB=anaColumnCompareViewer.getColumnListB();
  columnsComparisonSection=anaColumnCompareViewer.getColumnsComparisonSection();
  anaColumnCompareViewer.addPropertyChangeListener(this);
  currentEditor.registerSections(new Section[]{columnsComparisonSection,dataFilterSection});
}

Fixed version (ground truth):
@Override protected void createFormContent(IManagedForm managedForm){
  super.createFormContent(managedForm);
  form=managedForm.getForm();
  form.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  this.metadataSection.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  this.metadataSection.setDescription(DefaultMessagesImpl.getString("String_Node_Str"));
  anaColumnCompareViewer=new AnalysisColumnCompareTreeViewer((AbstractAnalysisMetadataPage)this,topComp,getColumnLeftSet(),getColumnRightSet(),DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"),false,true);
  anaColumnCompareViewer.addPropertyChangeListener(this);
  createDataFilterSection(form,topComp);
  columnListA=anaColumnCompareViewer.getColumnListA();
  columnListB=anaColumnCompareViewer.getColumnListB();
  columnsComparisonSection=anaColumnCompareViewer.getColumnsComparisonSection();
  anaColumnCompareViewer.addPropertyChangeListener(this);
  currentEditor.registerSections(new Section[]{columnsComparisonSection,dataFilterSection});
  foldingSections(new Section[]{metadataSection,columnsComparisonSection,dataFilterSection});
}
Program: 139625
Project: 139625
Buggy source:
@Override protected void createFormContent(IManagedForm managedForm){
  this.form=managedForm.getForm();
  Composite body=form.getBody();
  body.setLayout(new GridLayout());
  final SashForm sForm=new SashForm(body,SWT.NULL);
  sForm.setLayoutData(new GridData(GridData.FILL_BOTH));
  topComp=toolkit.createComposite(sForm);
  topComp.setLayoutData(new GridData(GridData.FILL_BOTH));
  topComp.setLayout(new GridLayout());
  metadataSection=creatMetadataSection(form,topComp);
  form.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  metadataSection.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  metadataSection.setDescription(DefaultMessagesImpl.getString("String_Node_Str"));
  createAnalysisColumnsSection(form,topComp);
  createDataFilterSection(form,topComp);
  createAnalysisParamSection(form,topComp);
  Composite previewComp=toolkit.createComposite(sForm);
  previewComp.setLayoutData(new GridData(GridData.FILL_BOTH));
  previewComp.setLayout(new GridLayout());
  previewComp.addControlListener(new ControlAdapter(){
    @Override public void controlResized(    ControlEvent e){
      super.controlResized(e);
      sForm.redraw();
      form.reflow(true);
    }
  }
);
  createPreviewSection(form,previewComp);
  foldingSections(new Section[]{metadataSection,analysisColumnSection,dataFilterSection});
  currentEditor.registerSections(new Section[]{analysisColumnSection,metadataSection,dataFilterSection,analysisParamSection,previewSection});
}

Fixed version (ground truth):
@Override protected void createFormContent(IManagedForm managedForm){
  this.form=managedForm.getForm();
  Composite body=form.getBody();
  body.setLayout(new GridLayout());
  final SashForm sForm=new SashForm(body,SWT.NULL);
  sForm.setLayoutData(new GridData(GridData.FILL_BOTH));
  topComp=toolkit.createComposite(sForm);
  topComp.setLayoutData(new GridData(GridData.FILL_BOTH));
  topComp.setLayout(new GridLayout());
  metadataSection=creatMetadataSection(form,topComp);
  form.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  metadataSection.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  metadataSection.setDescription(DefaultMessagesImpl.getString("String_Node_Str"));
  createAnalysisColumnsSection(form,topComp);
  createDataFilterSection(form,topComp);
  createAnalysisParamSection(form,topComp);
  Composite previewComp=toolkit.createComposite(sForm);
  previewComp.setLayoutData(new GridData(GridData.FILL_BOTH));
  previewComp.setLayout(new GridLayout());
  previewComp.addControlListener(new ControlAdapter(){
    @Override public void controlResized(    ControlEvent e){
      super.controlResized(e);
      sForm.redraw();
      form.reflow(true);
    }
  }
);
  createPreviewSection(form,previewComp);
  foldingSections(new Section[]{metadataSection,analysisColumnSection,dataFilterSection,analysisParamSection,previewSection});
  currentEditor.registerSections(new Section[]{analysisColumnSection,metadataSection,dataFilterSection,analysisParamSection,previewSection});
}
Program: 139626
Project: 139626
Buggy source:
/** 
 * yyi 2009-09-16 To check the expression is null, empty or less than 16 characters Feature : 8866
 */
public static boolean verifyExpression(IndicatorDefinition indicatorDefinition){
  if (0 == indicatorDefinition.getSqlGenericExpression().size()) {
    return false;
  }
  for (  Expression exp : indicatorDefinition.getSqlGenericExpression()) {
    if (null == exp.getBody()) {
      return false;
    }
 else     if (16 > exp.getBody().length()) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * yyi 2009-09-22 To check the expression is null, empty or less than 16 characters Feature : 8866
 */
public static boolean verifyExpression(IndicatorDefinition indicatorDefinition){
  if (0 == indicatorDefinition.getSqlGenericExpression().size()) {
    return false;
  }
  for (  Expression exp : indicatorDefinition.getSqlGenericExpression()) {
    if (null == exp.getBody()) {
      return false;
    }
 else     if (16 > exp.getBody().length() && !"String_Node_Str".equals(exp.getBody())) {
      return false;
    }
  }
  return true;
}
Program: 139627
Project: 139627
Buggy source:
public void save(){
  ImplementationHelper.getRepositoryManager().save();
}

Fixed version (ground truth):
public void save(){
}
Program: 139628
Project: 139628
Buggy source:
public void refresh(){
  ImplementationHelper.getRepositoryManager().refresh();
}

Fixed version (ground truth):
public void refresh(){
}
Program: 139629
Project: 139629
Buggy source:
@Override public boolean reset(){
  this.setValue(VALUE_EDEFAULT);
  this.frequenceTable.clear();
  return super.reset();
}

Fixed version (ground truth):
@Override public boolean reset(){
  this.computed=COMPUTED_EDEFAULT;
  this.setValue(VALUE_EDEFAULT);
  this.frequenceTable.clear();
  return super.reset();
}
Program: 139630
Project: 139630
Buggy source:
@Override public boolean handle(Object data){
  this.setComputed(COMPUTED_EDEFAULT);
  boolean ok=super.handle(data);
  if (data == null) {
    return ok;
  }
  return ok && AlgoUtils.incrementValueCounts(data,this.frequenceTable);
}

Fixed version (ground truth):
@Override public boolean handle(Object data){
  boolean ok=super.handle(data);
  if (data == null) {
    return ok;
  }
  return ok && AlgoUtils.incrementValueCounts(data,this.frequenceTable);
}
Program: 139631
Project: 139631
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public Double getMean(){
  Long c=getCount();
  if (c.compareTo(0L) == 0) {
    throw new RuntimeException("String_Node_Str");
  }
  Double sum=null;
  try {
    sum=Double.valueOf(getSumStr());
  }
 catch (  Exception e) {
    sum=Double.valueOf(0);
  }
  if (sum == null) {
    throw new RuntimeException("String_Node_Str");
  }
  return sum / c;
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public Double getMean(){
  Long c=getCount() - getNullCount();
  if (c.compareTo(0L) == 0) {
    throw new RuntimeException("String_Node_Str");
  }
  Double sum=null;
  try {
    sum=Double.valueOf(getSumStr());
  }
 catch (  Exception e) {
    return Double.NaN;
  }
  if (sum == null) {
    throw new RuntimeException("String_Node_Str");
  }
  return sum / c;
}
Program: 139632
Project: 139632
Buggy source:
@Override public boolean handle(Object data){
  medianComputed=false;
  boolean ok=super.handle(data);
  if (data == null) {
    return ok;
  }
  return ok && AlgoUtils.incrementValueCounts(data,this.getFrequenceTable());
}

Fixed version (ground truth):
@Override public boolean handle(Object data){
  boolean ok=super.handle(data);
  if (data == null) {
    return ok;
  }
  return ok && AlgoUtils.incrementValueCounts(data,this.getFrequenceTable());
}
Program: 139633
Project: 139633
Buggy source:
@Override public boolean storeSqlResults(List<Object[]> objects){
  if (!checkResults(objects,1)) {
    return false;
  }
  int javaType=this.getColumnType();
  if (objects.size() == 1) {
    String med=String.valueOf(objects.get(0)[0]);
    if (med == null) {
      log.error("String_Node_Str");
      return false;
    }
    this.setMedian(MedianIndicatorImpl.getRealValue(javaType,med));
    return true;
  }
 else   if (objects.size() == 2) {
    Double r1=MedianIndicatorImpl.getRealValue(javaType,String.valueOf(objects.get(0)[0]));
    Double r2=MedianIndicatorImpl.getRealValue(javaType,String.valueOf(objects.get(1)[0]));
    if (r1 == null || r2 == null) {
      log.error("String_Node_Str" + r1 + "String_Node_Str"+ r2);
      return false;
    }
    this.setMedian((r1 + r2) / 2);
    this.medianComputed=true;
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean storeSqlResults(List<Object[]> objects){
  if (!checkResults(objects,1)) {
    return false;
  }
  int javaType=this.getColumnType();
  if (objects.size() == 1) {
    String med=String.valueOf(objects.get(0)[0]);
    if (med == null) {
      log.error("String_Node_Str");
      return false;
    }
    this.setMedian(MedianIndicatorImpl.getRealValue(javaType,med));
    return true;
  }
 else   if (objects.size() == 2) {
    Double r1=MedianIndicatorImpl.getRealValue(javaType,String.valueOf(objects.get(0)[0]));
    Double r2=MedianIndicatorImpl.getRealValue(javaType,String.valueOf(objects.get(1)[0]));
    if (r1 == null || r2 == null) {
      log.error("String_Node_Str" + r1 + "String_Node_Str"+ r2);
      return false;
    }
    this.setMedian((r1 + r2) / 2);
    return true;
  }
  return false;
}
Program: 139634
Project: 139634
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public Double getMedian(){
  if (!medianComputed) {
    computeMedian();
  }
  return getMedianGen();
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public Double getMedian(){
  return median;
}
Program: 139635
Project: 139635
Buggy source:
@Override public boolean reset(){
  this.median=MEDIAN_EDEFAULT;
  if (frequenceTable != null) {
    this.frequenceTable.clear();
  }
  this.computed=false;
  this.medianComputed=false;
  return super.reset();
}

Fixed version (ground truth):
@Override public boolean reset(){
  this.median=MEDIAN_EDEFAULT;
  if (frequenceTable != null) {
    this.frequenceTable.clear();
  }
  this.computed=COMPUTED_EDEFAULT;
  return super.reset();
}
Program: 139636
Project: 139636
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public boolean computeMedian(){
  medianComputed=computeNumericMedian();
  return medianComputed;
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public boolean computeMedian(){
  return computeNumericMedian();
}
Program: 139637
Project: 139637
Buggy source:
@Override public boolean finalizeComputation(){
  boolean ok=super.finalizeComputation();
  if (genericSum == null) {
    return false;
  }
  this.sumStr=genericSum.getAsString();
  return ok;
}

Fixed version (ground truth):
@Override public boolean finalizeComputation(){
  boolean ok=super.finalizeComputation();
  if (genericSum == null) {
    return false;
  }
  this.sumStr=genericSum.getAsString();
  int javaType=this.getColumnType();
  this.setDatatype(javaType);
  return ok;
}
Program: 139638
Project: 139638
Buggy source:
void reset(){
  this.sum=getDefaultValue();
}

Fixed version (ground truth):
@Override public boolean reset(){
  if (genericSum != null) {
    this.genericSum.reset();
  }
  this.sumStr=SUM_STR_EDEFAULT;
  this.computed=COMPUTED_EDEFAULT;
  return super.reset();
}
Program: 139639
Project: 139639
Buggy source:
@Override public boolean reset(){
  this.setValue(VALUE_EDEFAULT);
  this.frequenceTable.clear();
  return super.reset();
}

Fixed version (ground truth):
@Override public boolean reset(){
  this.computed=COMPUTED_EDEFAULT;
  this.setValue(VALUE_EDEFAULT);
  this.frequenceTable.clear();
  return super.reset();
}
Program: 139640
Project: 139640
Buggy source:
@Override public boolean handle(Object data){
  this.setComputed(COMPUTED_EDEFAULT);
  boolean ok=super.handle(data);
  if (data == null) {
    return ok;
  }
  return ok && AlgoUtils.incrementValueCounts(data,this.frequenceTable);
}

Fixed version (ground truth):
@Override public boolean handle(Object data){
  boolean ok=super.handle(data);
  if (data == null) {
    return ok;
  }
  return ok && AlgoUtils.incrementValueCounts(data,this.frequenceTable);
}
Program: 139641
Project: 139641
Buggy source:
/** 
 * DOC scorreia Comment method "getYearCharacters".
 * @param label
 * @return
 */
private String getYearCharacters(String label){
  return label.substring(0,4);
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "getYearCharacters".
 * @param label
 * @return
 */
private String getYearCharacters(String label){
  if (label.equals("String_Node_Str")) {
    return null;
  }
 else {
    return label.substring(0,4);
  }
}
Program: 139642
Project: 139642
Buggy source:
@Override public Color getForeground(Object element,int columnIndex){
  PatternChartDataEntity entity=(PatternChartDataEntity)element;
  String currentText=getColumnText(element,columnIndex);
  boolean isCurrentCol=currentText.equals(entity.getNumMatch()) || currentText.equals(entity.getNumNoMatch()) || currentText.equals(entity.getPerMatch())|| currentText.equals(entity.getPerNoMatch());
  if (isCurrentCol && entity.isOutOfRange(currentText)) {
    return Display.getDefault().getSystemColor(SWT.COLOR_RED);
  }
  return null;
}

Fixed version (ground truth):
@Override public Color getForeground(Object element,int columnIndex){
  PatternChartDataEntity entity=(PatternChartDataEntity)element;
  String currentText=getColumnText(element,columnIndex);
  boolean isCurrentCol=currentText.equals(entity.getNumMatch()) || currentText.equals(entity.getPerMatch());
  if (isCurrentCol && entity.isOutOfRange(currentText)) {
    return Display.getDefault().getSystemColor(SWT.COLOR_RED);
  }
  return null;
}
Program: 139643
Project: 139643
Buggy source:
@Override public Image getColumnImage(Object element,int columnIndex){
  PatternChartDataEntity entity=(PatternChartDataEntity)element;
  String currentText=getColumnText(element,columnIndex);
  boolean isCurrentCol=currentText.equals(entity.getNumMatch()) || currentText.equals(entity.getNumNoMatch()) || currentText.equals(entity.getPerMatch())|| currentText.equals(entity.getPerNoMatch());
  if (isCurrentCol && entity.isOutOfRange(currentText)) {
    return ImageLib.getImage(ImageLib.LEVEL_WARNING);
  }
  return null;
}

Fixed version (ground truth):
@Override public Image getColumnImage(Object element,int columnIndex){
  PatternChartDataEntity entity=(PatternChartDataEntity)element;
  String currentText=getColumnText(element,columnIndex);
  boolean isCurrentCol=currentText.equals(entity.getNumMatch()) || currentText.equals(entity.getPerMatch());
  if (isCurrentCol && entity.isOutOfRange(currentText)) {
    return ImageLib.getImage(ImageLib.LEVEL_WARNING);
  }
  return null;
}
Program: 139646
Project: 139646
Buggy source:
/** 
 * DOC yyi 2009-09-11 Feature:9030
 * @param expressComp
 * @param patternText
 * @return
 */
private void createExpressionEditButton(Composite expressComp,final Text patternText){
  Button editButton=new Button(expressComp,SWT.PUSH);
  editButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  editButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  editButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      String[] templates=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
      ExpressionEditDialog editDialog=new ExpressionEditDialog(null,patternText.getText(),templates);
      editDialog.open();
      if (Dialog.OK == editDialog.getReturnCode()) {
        patternText.setText(editDialog.getResult());
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * DOC yyi 2009-09-11 Feature:9030
 * @param expressComp
 * @param patternText
 * @return
 */
private void createExpressionEditButton(Composite expressComp,final Text patternText){
  Button editButton=new Button(expressComp,SWT.PUSH);
  editButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  editButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  editButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      String[] templates=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
      ExpressionEditDialog editDialog=new ExpressionEditDialog(null,patternText.getText(),templates);
      editDialog.open();
      if (Dialog.OK == editDialog.getReturnCode() && !patternText.getText().equals(editDialog.getResult())) {
        patternText.setText(editDialog.getResult());
      }
    }
  }
);
}
Program: 139647
Project: 139647
Buggy source:
@Override public boolean handle(Object data){
  boolean ok=super.handle(data);
  if (isGreater(data)) {
    this.value=String.valueOf(data);
  }
  return ok;
}

Fixed version (ground truth):
@Override public boolean handle(Object data){
  boolean ok=super.handle(data);
  if (isGreater(data) || null == this.value) {
    this.value=String.valueOf(data);
  }
  return ok;
}
Program: 139648
Project: 139648
Buggy source:
@Override public boolean handle(Object data){
  boolean ok=super.handle(data);
  if (isLess(data)) {
    this.value=String.valueOf(data);
  }
  return ok;
}

Fixed version (ground truth):
@Override public boolean handle(Object data){
  boolean ok=super.handle(data);
  if (isLess(data) || null == this.value) {
    this.value=String.valueOf(data);
  }
  return ok;
}
Program: 139649
Project: 139649
Buggy source:
private void init(){
  modleElementSuffixs=new ArrayList<String>();
  modleElementSuffixs.add(FactoriesUtil.ANA);
  modleElementSuffixs.add(FactoriesUtil.REP);
  modleElementSuffixs.add(FactoriesUtil.PROV);
  modleElementSuffixs.add(FactoriesUtil.SQL);
  modleElementSuffixs.add(FactoriesUtil.DQRULE);
  modleElementSuffixs.add(FactoriesUtil.PATTERN);
}

Fixed version (ground truth):
private void init(){
  modleElementSuffixs=new ArrayList<String>();
  modleElementSuffixs.add(FactoriesUtil.ANA);
  modleElementSuffixs.add(FactoriesUtil.REP);
  modleElementSuffixs.add(FactoriesUtil.PROV);
  modleElementSuffixs.add(FactoriesUtil.SQL);
  modleElementSuffixs.add(FactoriesUtil.UDI);
  modleElementSuffixs.add(FactoriesUtil.DQRULE);
  modleElementSuffixs.add(FactoriesUtil.PATTERN);
}
Program: 139651
Project: 139651
Buggy source:
/** 
 * DOC xqliu Comment method "createTable".
 * @param parent
 */
private Table createTable(Composite parent){
  int style=SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL| SWT.V_SCROLL| SWT.FULL_SELECTION| SWT.HIDE_SELECTION;
  final Table table=new Table(parentComposite,style);
  table.setHeaderVisible(true);
  table.setLinesVisible(true);
  table.setLayoutData(new GridData(GridData.FILL_BOTH));
  for (int i=0; i < headers.length; ++i) {
    TableColumn tableColumn=new TableColumn(table,SWT.LEFT,i);
    tableColumn.setText(headers[i]);
    tableColumn.setWidth(widths[i]);
  }
  myTableViewer=new TableViewer(table);
  myTableViewer.setUseHashlookup(true);
  myTableViewer.setColumnProperties(headers);
  CellEditor[] editors=new CellEditor[headers.length];
  for (int i=0; i < editors.length; ++i) {
switch (i) {
case 1:
case 3:
case 6:
case 8:
      editors[i]=new TextCellEditor(table);
    break;
case 4:
  editors[i]=new ComboBoxCellEditor(table,OPERATORS,SWT.READ_ONLY);
break;
default :
editors[i]=null;
}
}
myTableViewer.setCellEditors(editors);
myTableViewer.setCellModifier(new JoinElementCellModifier(headers,myTableViewer));
myTableViewer.setContentProvider(new JoinElementContentProvider());
myTableViewer.setLabelProvider(new JoinElementLabelProvider());
myTableViewer.setInput(this.myJoinElement);
ColumnViewerDND.installDND(table);
table.setData(this);
GridData tableGD=new GridData(GridData.FILL_BOTH);
tableGD.heightHint=130;
table.setLayoutData(tableGD);
return table;
}

Fixed version (ground truth):
/** 
 * DOC xqliu Comment method "createTable".
 * @param parent
 */
private Table createTable(Composite parent){
  int style=SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL| SWT.V_SCROLL| SWT.FULL_SELECTION| SWT.HIDE_SELECTION;
  final Table table=new Table(parentComposite,style);
  table.setHeaderVisible(true);
  table.setLinesVisible(true);
  table.setLayoutData(new GridData(GridData.FILL_BOTH));
  for (int i=0; i < headers.length; ++i) {
    TableColumn tableColumn=new TableColumn(table,SWT.LEFT,i);
    tableColumn.setText(headers[i]);
    tableColumn.setWidth(widths[i]);
  }
  myTableViewer=new TableViewer(table);
  myTableViewer.setUseHashlookup(true);
  myTableViewer.setColumnProperties(headers);
  CellEditor[] editors=new CellEditor[headers.length];
  for (int i=0; i < editors.length; ++i) {
switch (i) {
case 1:
case 3:
case 6:
case 8:
      editors[i]=new TextCellEditor(table);
    break;
case 4:
  editors[i]=new ComboBoxCellEditor(table,OPERATORS,SWT.READ_ONLY);
break;
default :
editors[i]=null;
}
}
myTableViewer.setCellEditors(editors);
myTableViewer.setCellModifier(new JoinElementCellModifier(headers,myTableViewer));
myTableViewer.setContentProvider(new JoinElementContentProvider());
myTableViewer.setLabelProvider(new JoinElementLabelProvider());
myTableViewer.setInput(this.myJoinElement);
table.setMenu(createMenus(table));
ColumnViewerDND.installDND(table);
table.setData(this);
GridData tableGD=new GridData(GridData.FILL_BOTH);
tableGD.heightHint=130;
table.setLayoutData(tableGD);
return table;
}
Program: 139655
Project: 139655
Buggy source:
public void run(){
  ImportInfoDialog.openImportInformation(null,information);
}

Fixed version (ground truth):
public void run(){
  ImportInfoDialog.openImportInformation(null,"String_Node_Str",(String[])information.toArray(new String[0]));
}
Program: 139656
Project: 139656
Buggy source:
@Override public boolean performFinish(){
  File file=new File(page.getSourceFile());
  final StringBuffer information=new StringBuffer();
  information.append(ImportFactory.importToStucture(file,folder,type,page.getSkip(),page.getRename()));
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      ImportInfoDialog.openImportInformation(null,information);
    }
  }
);
  return true;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  File file=new File(page.getSourceFile());
  final List<String> information=ImportFactory.importToStucture(file,folder,type,page.getSkip(),page.getRename());
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      ImportInfoDialog.openImportInformation(null,"String_Node_Str",(String[])information.toArray(new String[0]));
    }
  }
);
  return true;
}
Program: 139658
Project: 139658
Buggy source:
/** 
 * DOC Administrator ImportInfoDialog constructor comment.
 * @param parentShell
 * @param dialogTitle
 * @param dialogTitleImage
 * @param dialogMessage
 * @param dialogImageType
 * @param dialogButtonLabels
 * @param defaultIndex
 */
public ImportInfoDialog(Shell parentShell,String dialogTitle,Image dialogTitleImage,String dialogMessage,int dialogImageType,String[] dialogButtonLabels,int defaultIndex,StringBuffer information){
  super(parentShell,dialogTitle,dialogTitleImage,dialogMessage,dialogImageType,dialogButtonLabels,defaultIndex);
  this.information=information;
}

Fixed version (ground truth):
/** 
 * DOC Administrator ImportInfoDialog constructor comment.
 * @param parentShell
 * @param dialogTitle
 * @param dialogTitleImage
 * @param dialogMessage
 * @param dialogImageType
 * @param dialogButtonLabels
 * @param defaultIndex
 */
public ImportInfoDialog(Shell parentShell,String dialogTitle,Image dialogTitleImage,String dialogMessage,int dialogImageType,String[] dialogButtonLabels,int defaultIndex,String[] information){
  super(parentShell,dialogTitle,dialogTitleImage,dialogMessage,dialogImageType,dialogButtonLabels,defaultIndex);
  this.information=information;
}
Program: 139659
Project: 139659
Buggy source:
/** 
 * DOC yyi Comment method "openInformationDialog".
 * @param information
 */
public static void openImportInformation(Shell parent,StringBuffer information){
  String message="String_Node_Str";
  ImportInfoDialog dialog=new ImportInfoDialog(parent,"String_Node_Str",null,message,INFORMATION,new String[]{IDialogConstants.OK_LABEL},0,information);
  dialog.setShellStyle(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.MAX| SWT.RESIZE);
  dialog.open();
  return;
}

Fixed version (ground truth):
/** 
 * DOC yyi Comment method "openInformationDialog".
 * @param information
 */
public static void openImportInformation(Shell parent,String message,String[] information){
  ImportInfoDialog dialog=new ImportInfoDialog(parent,"String_Node_Str",null,message,INFORMATION,new String[]{IDialogConstants.OK_LABEL},0,information);
  dialog.setShellStyle(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.MAX| SWT.RESIZE);
  dialog.open();
  return;
}
Program: 139660
Project: 139660
Buggy source:
@Override protected Control createCustomArea(Composite parent){
  List list=new List(parent,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
  String allinfo=this.information.toString().replaceAll("String_Node_Str","String_Node_Str");
  String[] info=allinfo.toString().split("String_Node_Str");
  list.setItems(info);
  GridData data=new GridData();
  data.heightHint=120;
  data.widthHint=350;
  data.horizontalAlignment=GridData.FILL;
  data.verticalAlignment=GridData.FILL;
  data.grabExcessHorizontalSpace=true;
  data.grabExcessVerticalSpace=true;
  list.setLayoutData(data);
  return parent;
}

Fixed version (ground truth):
@Override protected Control createCustomArea(Composite parent){
  List list=new List(parent,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
  list.setItems(this.information);
  GridData data=new GridData();
  data.heightHint=120;
  data.widthHint=350;
  data.horizontalAlignment=GridData.FILL;
  data.verticalAlignment=GridData.FILL;
  data.grabExcessHorizontalSpace=true;
  data.grabExcessVerticalSpace=true;
  list.setLayoutData(data);
  return parent;
}
Program: 139661
Project: 139661
Buggy source:
public OpenIndicatorDefinitionAction(IndicatorDefinition[] definitiones){
  super("String_Node_Str");
  setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
  this.definitiones=definitiones;
}

Fixed version (ground truth):
public OpenIndicatorDefinitionAction(IndicatorDefinition[] definitiones){
  super("String_Node_Str");
  this.definitiones=definitiones;
}
Program: 139662
Project: 139662
Buggy source:
@Override public void dropColumns(List<Column> columns,int index){
  JoinElementColumnDialog joinElementColumnDialog=new JoinElementColumnDialog(null);
  if (joinElementColumnDialog.open() == Window.OK) {
    JoinElement join=(JoinElement)this.myTableViewer.getElementAt(index);
    if (join != null) {
      for (      Column column : columns) {
        if (column != null) {
          if (COLUMN_A.equals(joinElementColumnDialog.getAb())) {
            join.setColA(column);
            join.setColumnAliasA(column.getName());
            join.setTableAliasA(ColumnHelper.getColumnSetFullName(column));
          }
 else {
            join.setColB(column);
            join.setColumnAliasB(column.getName());
            join.setTableAliasB(ColumnHelper.getColumnSetFullName(column));
          }
        }
      }
      this.setDirty(true);
      this.myTableViewer.update(join,null);
    }
  }
}

Fixed version (ground truth):
@Override public void dropColumns(List<Column> columns,int index){
  JoinElementColumnDialog joinElementColumnDialog=new JoinElementColumnDialog(null);
  if (joinElementColumnDialog.open() == Window.OK) {
    JoinElement join=(JoinElement)this.myTableViewer.getElementAt(index);
    if (join == null) {
      join=this.addJoinElement();
    }
    if (join != null) {
      for (      Column column : columns) {
        if (column != null) {
          if (COLUMN_A.equals(joinElementColumnDialog.getAb())) {
            join.setColA(column);
            join.setColumnAliasA(column.getName());
            join.setTableAliasA(ColumnHelper.getColumnSetFullName(column));
          }
 else {
            join.setColB(column);
            join.setColumnAliasB(column.getName());
            join.setTableAliasB(ColumnHelper.getColumnSetFullName(column));
          }
        }
      }
      this.setDirty(true);
      this.myTableViewer.update(join,null);
    }
  }
}
Program: 139663
Project: 139663
Buggy source:
/** 
 * DOC xqliu Comment method "addJoinElement".
 */
public void addJoinElement(){
  JoinElement newJoinElement=RulesFactory.eINSTANCE.createJoinElement();
  newJoinElement.setOperator(DEFAULT_OPERATOR);
  this.myTableViewer.add(newJoinElement);
  this.myJoinElement.add(newJoinElement);
  JoinConditionTableViewer.this.masterPage.setDirty(true);
}

Fixed version (ground truth):
/** 
 * DOC xqliu Comment method "addJoinElement".
 * @return
 */
public JoinElement addJoinElement(){
  JoinElement newJoinElement=RulesFactory.eINSTANCE.createJoinElement();
  newJoinElement.setOperator(DEFAULT_OPERATOR);
  this.myTableViewer.add(newJoinElement);
  this.myJoinElement.add(newJoinElement);
  JoinConditionTableViewer.this.masterPage.setDirty(true);
  return newJoinElement;
}
Program: 139665
Project: 139665
Buggy source:
private static void createAndStoreUDI(UDIParameters parameters,IFolder selectionFolder){
  IndicatorDefinition id=UDIHelper.createUDI(parameters.name,parameters.auther,parameters.description,parameters.purpose,parameters.status,parameters.category);
  for (  String key : parameters.regex.keySet()) {
    Expression expression=BooleanExpressionHelper.createExpression(key,parameters.regex.get(key));
    id.getSqlGenericExpression().add(expression);
  }
  String fname=DqRepositoryViewService.createFilename(parameters.name,FactoriesUtil.UDI);
  try {
    String[] folderNames=parameters.relativePath.split("String_Node_Str");
    for (    String folderName : folderNames) {
      IFolder folder=selectionFolder.getFolder(folderName);
      if (!folder.exists()) {
        folder.create(false,true,null);
      }
      folder.setPersistentProperty(DQStructureManager.FOLDER_CLASSIFY_KEY,DQStructureManager.UDI_FOLDER_PROPERTY);
      selectionFolder=folder;
    }
  }
 catch (  CoreException e) {
    log.error(e,e);
  }
  IFile pfile=selectionFolder.getFile(fname);
  EMFSharedResources.getInstance().addEObjectToResourceSet(pfile.getFullPath().toString(),id);
  EMFSharedResources.getInstance().saveLastResource();
}

Fixed version (ground truth):
/** 
 * DOC xqliu Comment method "createAndStoreUDI".
 * @param parameters
 * @param selectionFolder
 */
private static void createAndStoreUDI(UDIParameters parameters,IFolder selectionFolder){
  IndicatorDefinition id=UDIHelper.createUDI(parameters.name,parameters.auther,parameters.description,parameters.purpose,parameters.status,parameters.category);
  for (  String key : parameters.regex.keySet()) {
    Expression expression=BooleanExpressionHelper.createExpression(key,parameters.regex.get(key));
    id.getSqlGenericExpression().add(expression);
  }
  String fname=DqRepositoryViewService.createFilename(parameters.name,FactoriesUtil.UDI);
  try {
    String[] folderNames=parameters.relativePath.split("String_Node_Str");
    for (    String folderName : folderNames) {
      IFolder folder=selectionFolder.getFolder(folderName);
      if (!folder.exists()) {
        folder.create(false,true,null);
      }
      folder.setPersistentProperty(DQStructureManager.FOLDER_CLASSIFY_KEY,DQStructureManager.UDI_FOLDER_PROPERTY);
      selectionFolder=folder;
    }
  }
 catch (  CoreException e) {
    log.error(e,e);
  }
  IFile pfile=selectionFolder.getFile(fname);
  EMFSharedResources.getInstance().addEObjectToResourceSet(pfile.getFullPath().toString(),id);
  EMFSharedResources.getInstance().saveLastResource();
}
Program: 139668
Project: 139668
Buggy source:
private boolean executeQuery(Indicator indicator,Connection connection,Expression query) throws AnalysisExecutionException {
  try {
    List<Object[]> myResultSet=executeQuery(catalogOrSchema,connection,query.getBody());
    if (indicator instanceof ColumnDependencyIndicator) {
      ((ColumnDependencyIndicator)indicator).setACount(getNB(myResultSet));
      ((ColumnDependencyIndicator)indicator).setDistinctACount(getNBDistinct(myResultSet));
    }
  }
 catch (  SQLException e) {
    log.error(e,e);
    return false;
  }
  return true;
}

Fixed version (ground truth):
private boolean executeQuery(Indicator indicator,Connection connection,Expression query) throws AnalysisExecutionException {
  try {
    List<Object[]> myResultSet=executeQuery(catalogOrSchema,connection,query.getBody());
    indicator.storeSqlResults(myResultSet);
  }
 catch (  SQLException e) {
    log.error(e,e);
    return false;
  }
  return true;
}
Program: 139669
Project: 139669
Buggy source:
public String addWhereToSqlStringStatement(String completedSqlString,List<String> whereExpressions){
  String query=completedSqlString;
  String where=this.buildWhereExpression(whereExpressions);
  if (where != null) {
    query=this.addWhereToStatement(query,where);
  }
  return query;
}

Fixed version (ground truth):
/** 
 * Method "addWhereToSqlStringStatement". The list
 * @param completedSqlString a generic SQL expression in which the where clause variable will be replaced.
 * @param whereExpressions the list of where expressions to concatenate (must not be null)
 * @return the SQL statement with the where clause
 */
public String addWhereToSqlStringStatement(String completedSqlString,List<String> whereExpressions){
  String query=completedSqlString;
  String where=this.buildWhereExpression(whereExpressions);
  if (where != null) {
    query=this.addWhereToStatement(query,where);
  }
  return query;
}
Program: 139670
Project: 139670
Buggy source:
@Override public boolean storeSqlResults(List<Object[]> objects){
  return true;
}

Fixed version (ground truth):
@Override public boolean storeSqlResults(List<Object[]> objects){
  this.setACount(getNB(objects));
  this.setDistinctACount(getNBDistinct(objects));
  return true;
}
Program: 139671
Project: 139671
Buggy source:
/** 
 * DOC rli Comment method "createTempConnectionFile".
 * @throws ReloadCompareException
 */
protected void createTempConnectionFile() throws ReloadCompareException {
  IFile tempConnectionFile=DQStructureComparer.getTempRefreshFile();
  TypedReturnCode<TdDataProvider> returnProvider=DQStructureComparer.getRefreshedDataProvider(oldDataProvider);
  if (!returnProvider.isOk()) {
    throw new ReloadCompareException(returnProvider.getMessage());
  }
  tempReloadProvider=returnProvider.getObject();
  tempReloadProvider.setComponent(oldDataProvider.getComponent());
  ElementWriterFactory.getInstance().createDataProviderWriter().save(tempReloadProvider,tempConnectionFile);
  tempReloadProvider.setComponent(null);
  oldDataProvider.getComponent();
}

Fixed version (ground truth):
/** 
 * DOC rli Comment method "createTempConnectionFile".
 * @throws ReloadCompareException
 */
protected void createTempConnectionFile() throws ReloadCompareException {
  IFile tempConnectionFile=DQStructureComparer.getTempRefreshFile();
  TypedReturnCode<TdDataProvider> returnProvider=DQStructureComparer.getRefreshedDataProvider(oldDataProvider);
  if (!returnProvider.isOk()) {
    throw new ReloadCompareException(returnProvider.getMessage());
  }
  tempReloadProvider=returnProvider.getObject();
  tempReloadProvider.setComponent(oldDataProvider.getComponent());
  ElementWriterFactory.getInstance().createDataProviderWriter().saveWithoutProperty(tempReloadProvider,tempConnectionFile);
  tempReloadProvider.setComponent(null);
  oldDataProvider.getComponent();
}