nus-yam/ex-repair huggingface dataset:
Program: 140472
Project: 140472
Buggy source:
@Override protected void initialize(){
  minValue.setText(String.valueOf(parameter.getMinValue()));
  maxValue.setText(String.valueOf(parameter.getMaxValue()));
  numbOfBins.setText(String.valueOf(parameter.getNumOfBins()));
}

Fixed version (ground truth):
@Override protected void initialize(){
  minValue.setText(String.valueOf(parameter.getMinValue()));
  maxValue.setText(String.valueOf(parameter.getMaxValue()));
  numbOfBins.setText(String.valueOf(parameter.getNumOfBins()));
  if (parameter.getBinsDataFromExsitingDomain().size() > 0) {
    addSlice.setEnabled(true);
    delSlice.setEnabled(true);
    minValue.setEnabled(false);
    maxValue.setEnabled(false);
    numbOfBins.setEnabled(false);
    isSetRange.setSelection(true);
    tableViewer.setInput(parameter.getBinsDataFromExsitingDomain());
  }
}
Program: 140474
Project: 140474
Buggy source:
@SuppressWarnings("String_Node_Str") public Domain getUserDomian(){
  if (getBinsData() != null) {
    List<SliceEntity> tableData=(List<SliceEntity>)getBinsData();
    Domain domain=DomainHelper.createDomain("String_Node_Str");
    for (    SliceEntity entity : tableData) {
      double min=Double.parseDouble(entity.getLowValue());
      double max=Double.parseDouble(entity.getHighValue());
      RangeRestriction rangeRestriction=DomainHelper.createRealRangeRestriction(min,max);
      domain.getRanges().add(rangeRestriction);
    }
    return domain;
  }
  return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public Domain getUserDomian(){
  if (getBinsData() != null) {
    List<SliceEntity> tableData=(List<SliceEntity>)getBinsData();
    Domain userDomain=DomainHelper.createDomain("String_Node_Str");
    for (    SliceEntity entity : tableData) {
      double min=Double.parseDouble(entity.getLowValue());
      double max=Double.parseDouble(entity.getHighValue());
      RangeRestriction rangeRestriction=DomainHelper.createRealRangeRestriction(min,max);
      userDomain.getRanges().add(rangeRestriction);
    }
    return userDomain;
  }
  return null;
}
Program: 140475
Project: 140475
Buggy source:
private static Domain setDataFilterPattern(final Collection<Domain> dataFilters,String type,String tablePattern){
  RegularExpression tableFilter=BooleanExpressionHelper.createRegularExpression(null,tablePattern);
  for (  Domain domain : dataFilters) {
    if (!ANALYSIS_DATA_FILTER.equals(domain.getName())) {
      continue;
    }
    boolean exists=false;
    EList<Pattern> patterns=domain.getPatterns();
    for (    Pattern pattern : patterns) {
      if (type.equals(pattern.getName())) {
        exists=true;
        pattern.getComponents().clear();
        pattern.getComponents().add(tableFilter);
      }
    }
    if (!exists) {
      addPatternToDomain(domain,tableFilter,tablePattern);
    }
    return domain;
  }
  Domain domain=DomainFactory.eINSTANCE.createDomain();
  dataFilters.add(domain);
  domain.setName(ANALYSIS_DATA_FILTER);
  addPatternToDomain(domain,tableFilter,tablePattern);
  return domain;
}

Fixed version (ground truth):
private static Domain setDataFilterPattern(final Collection<Domain> dataFilters,String type,String tablePattern){
  RegularExpression tableFilter=BooleanExpressionHelper.createRegularExpression(null,tablePattern);
  for (  Domain domain : dataFilters) {
    if (!ANALYSIS_DATA_FILTER.equals(domain.getName())) {
      continue;
    }
    boolean exists=false;
    EList<Pattern> patterns=domain.getPatterns();
    for (    Pattern pattern : patterns) {
      if (type.equals(pattern.getName())) {
        exists=true;
        pattern.getComponents().clear();
        pattern.getComponents().add(tableFilter);
      }
    }
    if (!exists) {
      addPatternToDomain(domain,tableFilter,tablePattern,type);
    }
    return domain;
  }
  Domain domain=DomainFactory.eINSTANCE.createDomain();
  dataFilters.add(domain);
  domain.setName(ANALYSIS_DATA_FILTER);
  addPatternToDomain(domain,tableFilter,tablePattern,type);
  return domain;
}
Program: 140476
Project: 140476
Buggy source:
/** 
 * DOC scorreia Comment method "addPatternToDomain".
 * @param domain
 * @param tableFilter
 * @param tablePattern
 */
private static void addPatternToDomain(Domain domain,RegularExpression tableFilter,String tablePattern){
  Pattern pattern=createPattern(tablePattern);
  pattern.setName(TABLE_PATTERN);
  pattern.getComponents().add(tableFilter);
  domain.getPatterns().add(pattern);
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "addPatternToDomain".
 * @param domain
 * @param tableFilter
 * @param tablePattern
 */
private static void addPatternToDomain(Domain domain,RegularExpression tableFilter,String tablePattern,String type){
  Pattern pattern=createPattern(tablePattern);
  pattern.setName(type);
  pattern.getComponents().add(tableFilter);
  domain.getPatterns().add(pattern);
}
Program: 140479
Project: 140479
Buggy source:
@Override protected void addFieldsListeners(){
  lowerText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String lowerStr=lowerText.getText();
      String higherStr=higherText.getText();
      if (lowerStr != "String_Node_Str" && !CheckValueUtils.isNumberWithNegativeValue(lowerStr)) {
        updateStatus(IStatus.ERROR,MSG_ONLY_NUMBER);
      }
 else       if (lowerStr != "String_Node_Str" && higherStr != "String_Node_Str" && Double.valueOf(lowerStr) > Double.valueOf(higherStr)) {
        updateStatus(IStatus.ERROR,"String_Node_Str");
      }
 else {
        updateStatus(IStatus.OK,MSG_OK);
      }
      parameter.setMinThreshold(lowerStr);
    }
  }
);
  higherText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String lowerStr=lowerText.getText();
      String higherStr=higherText.getText();
      if (higherStr != "String_Node_Str" && !CheckValueUtils.isNumberWithNegativeValue(higherStr)) {
        updateStatus(IStatus.ERROR,MSG_ONLY_NUMBER);
      }
 else       if (lowerStr != "String_Node_Str" && higherStr != "String_Node_Str" && Double.valueOf(lowerStr) > Double.valueOf(higherStr)) {
        updateStatus(IStatus.ERROR,"String_Node_Str");
      }
 else {
        updateStatus(IStatus.OK,MSG_OK);
      }
      parameter.setMaxThreshold(higherText.getText());
    }
  }
);
}

Fixed version (ground truth):
@Override protected void addFieldsListeners(){
  lowerText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String lowerStr=lowerText.getText();
      String higherStr=higherText.getText();
      if (lowerStr != "String_Node_Str" && !CheckValueUtils.isNumberWithNegativeValue(lowerStr)) {
        updateStatus(IStatus.ERROR,MSG_ONLY_NUMBER);
      }
 else       if (!lowerStr.equals("String_Node_Str") && !higherStr.equals("String_Node_Str") && Double.valueOf(lowerStr) > Double.valueOf(higherStr)) {
        updateStatus(IStatus.ERROR,"String_Node_Str");
      }
 else {
        updateStatus(IStatus.OK,MSG_OK);
      }
      parameter.setMinThreshold(lowerStr);
    }
  }
);
  higherText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String lowerStr=lowerText.getText();
      String higherStr=higherText.getText();
      if (higherStr != "String_Node_Str" && !CheckValueUtils.isNumberWithNegativeValue(higherStr)) {
        updateStatus(IStatus.ERROR,MSG_ONLY_NUMBER);
      }
 else       if (lowerStr != "String_Node_Str" && higherStr != "String_Node_Str" && Double.valueOf(lowerStr) > Double.valueOf(higherStr)) {
        updateStatus(IStatus.ERROR,"String_Node_Str");
      }
 else {
        updateStatus(IStatus.OK,MSG_OK);
      }
      parameter.setMaxThreshold(higherText.getText());
    }
  }
);
}
Program: 140480
Project: 140480
Buggy source:
@Override protected void addFieldsListeners(){
  lowerText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String lowerStr=lowerText.getText();
      String higherStr=higherText.getText();
      if (lowerStr != "String_Node_Str" && !CheckValueUtils.isNumberWithNegativeValue(lowerStr)) {
        updateStatus(IStatus.ERROR,MSG_ONLY_NUMBER);
      }
 else       if (!lowerStr.equals("String_Node_Str") && !higherStr.equals("String_Node_Str") && Double.valueOf(lowerStr) > Double.valueOf(higherStr)) {
        updateStatus(IStatus.ERROR,"String_Node_Str");
      }
 else {
        updateStatus(IStatus.OK,MSG_OK);
      }
      parameter.setMinThreshold(lowerStr);
    }
  }
);
  higherText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String lowerStr=lowerText.getText();
      String higherStr=higherText.getText();
      if (higherStr != "String_Node_Str" && !CheckValueUtils.isNumberWithNegativeValue(higherStr)) {
        updateStatus(IStatus.ERROR,MSG_ONLY_NUMBER);
      }
 else       if (lowerStr != "String_Node_Str" && higherStr != "String_Node_Str" && Double.valueOf(lowerStr) > Double.valueOf(higherStr)) {
        updateStatus(IStatus.ERROR,"String_Node_Str");
      }
 else {
        updateStatus(IStatus.OK,MSG_OK);
      }
      parameter.setMaxThreshold(higherText.getText());
    }
  }
);
}

Fixed version (ground truth):
@Override protected void addFieldsListeners(){
  lowerText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String lowerStr=lowerText.getText();
      String higherStr=higherText.getText();
      if (!lowerStr.equals("String_Node_Str") && !CheckValueUtils.isNumberWithNegativeValue(lowerStr)) {
        updateStatus(IStatus.ERROR,MSG_ONLY_NUMBER);
      }
 else       if (!lowerStr.equals("String_Node_Str") && !higherStr.equals("String_Node_Str") && Double.valueOf(lowerStr) > Double.valueOf(higherStr)) {
        updateStatus(IStatus.ERROR,"String_Node_Str");
      }
 else {
        updateStatus(IStatus.OK,MSG_OK);
      }
      parameter.setMinThreshold(lowerStr);
    }
  }
);
  higherText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String lowerStr=lowerText.getText();
      String higherStr=higherText.getText();
      if (!higherStr.equals("String_Node_Str") && !CheckValueUtils.isNumberWithNegativeValue(higherStr)) {
        updateStatus(IStatus.ERROR,MSG_ONLY_NUMBER);
      }
 else       if (!lowerStr.equals("String_Node_Str") && !higherStr.equals("String_Node_Str") && Double.valueOf(lowerStr) > Double.valueOf(higherStr)) {
        updateStatus(IStatus.ERROR,"String_Node_Str");
      }
 else {
        updateStatus(IStatus.OK,MSG_OK);
      }
      parameter.setMaxThreshold(higherText.getText());
    }
  }
);
}
Program: 140481
Project: 140481
Buggy source:
public void modifyText(ModifyEvent e){
  String lowerStr=lowerText.getText();
  String higherStr=higherText.getText();
  if (higherStr != "String_Node_Str" && !CheckValueUtils.isNumberWithNegativeValue(higherStr)) {
    updateStatus(IStatus.ERROR,MSG_ONLY_NUMBER);
  }
 else   if (lowerStr != "String_Node_Str" && higherStr != "String_Node_Str" && Double.valueOf(lowerStr) > Double.valueOf(higherStr)) {
    updateStatus(IStatus.ERROR,"String_Node_Str");
  }
 else {
    updateStatus(IStatus.OK,MSG_OK);
  }
  parameter.setMaxThreshold(higherText.getText());
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
  String lowerStr=lowerText.getText();
  String higherStr=higherText.getText();
  if (!higherStr.equals("String_Node_Str") && !CheckValueUtils.isNumberWithNegativeValue(higherStr)) {
    updateStatus(IStatus.ERROR,MSG_ONLY_NUMBER);
  }
 else   if (!lowerStr.equals("String_Node_Str") && !higherStr.equals("String_Node_Str") && Double.valueOf(lowerStr) > Double.valueOf(higherStr)) {
    updateStatus(IStatus.ERROR,"String_Node_Str");
  }
 else {
    updateStatus(IStatus.OK,MSG_OK);
  }
  parameter.setMaxThreshold(higherText.getText());
}
Program: 140482
Project: 140482
Buggy source:
private static CategoryDataset createSimpleDataset(List<IndicatorUnit> indicatorUnitList,boolean isCreate){
  DefaultCategoryDataset dataset=new DefaultCategoryDataset();
  if (isCreate) {
    for (int index=0; index < indicatorUnitList.size(); index++) {
      IndicatorUnit unit=indicatorUnitList.get(index);
      IndicatorCommonUtil.compositeIndicatorMap(unit);
      Object object=unit.getValue();
      String label=unit.getIndicatorName();
      if (object == null) {
        dataset.addValue(0,label,"String_Node_Str");
      }
 else {
        String valueStr=String.valueOf(object);
        double value=Double.parseDouble(valueStr);
        renderer3d.setSeriesPaint(index,unit.getColor());
        dataset.addValue(value,label,"String_Node_Str");
      }
    }
  }
 else {
    for (    IndicatorUnit indicator : indicatorUnitList) {
      dataset.addValue(150,indicator.getIndicatorName(),"String_Node_Str");
    }
  }
  return dataset;
}

Fixed version (ground truth):
private static CategoryDataset createSimpleDataset(List<IndicatorUnit> indicatorUnitList,boolean isCreate){
  DefaultCategoryDataset dataset=new DefaultCategoryDataset();
  if (isCreate) {
    for (int index=0; index < indicatorUnitList.size(); index++) {
      IndicatorUnit unit=indicatorUnitList.get(index);
      IndicatorCommonUtil.compositeIndicatorMap(unit);
      Object object=unit.getValue();
      String label=unit.getIndicatorName();
      if (object != null && !unit.getIndicator().getInstantiatedExpressions().isEmpty()) {
        String valueStr=String.valueOf(object);
        double value=Double.parseDouble(valueStr);
        renderer3d.setSeriesPaint(index,unit.getColor());
        dataset.addValue(value,label,"String_Node_Str");
      }
    }
  }
 else {
    for (    IndicatorUnit indicator : indicatorUnitList) {
      dataset.addValue(150,indicator.getIndicatorName(),"String_Node_Str");
    }
  }
  return dataset;
}
Program: 140484
Project: 140484
Buggy source:
private static CategoryDataset createFrequenceDataset(List<IndicatorUnit> indicatorUnitList,boolean isCreate){
  DefaultCategoryDataset dataset=new DefaultCategoryDataset();
  for (  IndicatorUnit indicatorUnit : indicatorUnitList) {
    Object object=null;
    try {
      IndicatorCommonUtil.compositeIndicatorMap(indicatorUnit);
      object=indicatorUnit.getValue();
    }
 catch (    UnsupportedOperationException ue) {
      object=null;
    }
    if (object != null) {
      FrequencyExt[] frequencyExt=(FrequencyExt[])object;
      Arrays.sort(frequencyExt);
      if (isCreate) {
        int numOfShown=frequencyExt.length;
        IndicatorParameters parameters=indicatorUnit.getIndicator().getParameters();
        if (parameters != null) {
          if (parameters.getTopN() < frequencyExt.length) {
            numOfShown=parameters.getTopN();
          }
        }
        for (int i=0; i < numOfShown; i++) {
          dataset.addValue(frequencyExt[i].getValue(),"String_Node_Str",String.valueOf(frequencyExt[i].getKey()));
        }
      }
 else {
        dataset.addValue(70,"String_Node_Str","String_Node_Str");
        dataset.addValue(150,"String_Node_Str","String_Node_Str");
        dataset.addValue(180,"String_Node_Str","String_Node_Str");
        dataset.addValue(185,"String_Node_Str","String_Node_Str");
        dataset.addValue(224,"String_Node_Str","String_Node_Str");
      }
    }
  }
  return dataset;
}

Fixed version (ground truth):
private static CategoryDataset createFrequenceDataset(List<IndicatorUnit> indicatorUnitList,boolean isCreate){
  DefaultCategoryDataset dataset=new DefaultCategoryDataset();
  for (  IndicatorUnit indicatorUnit : indicatorUnitList) {
    IndicatorCommonUtil.compositeIndicatorMap(indicatorUnit);
    Object object=indicatorUnit.getValue();
    if (object != null) {
      FrequencyExt[] frequencyExt=(FrequencyExt[])object;
      Arrays.sort(frequencyExt);
      if (isCreate) {
        int numOfShown=frequencyExt.length;
        IndicatorParameters parameters=indicatorUnit.getIndicator().getParameters();
        if (parameters != null) {
          if (parameters.getTopN() < frequencyExt.length) {
            numOfShown=parameters.getTopN();
          }
        }
        for (int i=0; i < numOfShown; i++) {
          dataset.addValue(frequencyExt[i].getValue(),"String_Node_Str",String.valueOf(frequencyExt[i].getKey()));
        }
      }
 else {
        dataset.addValue(70,"String_Node_Str","String_Node_Str");
        dataset.addValue(150,"String_Node_Str","String_Node_Str");
        dataset.addValue(180,"String_Node_Str","String_Node_Str");
        dataset.addValue(185,"String_Node_Str","String_Node_Str");
        dataset.addValue(224,"String_Node_Str","String_Node_Str");
      }
    }
  }
  return dataset;
}
Program: 140486
Project: 140486
Buggy source:
/** 
 * Getter for value.
 * @return the value
 */
public Long getValue(){
  return this.value;
}

Fixed version (ground truth):
/** 
 * Getter for value.
 * @return the value
 */
public long getValue(){
  return this.value;
}
Program: 140487
Project: 140487
Buggy source:
public Double getFrequency(){
  return frequency;
}

Fixed version (ground truth):
public double getFrequency(){
  return frequency;
}
Program: 140488
Project: 140488
Buggy source:
/** 
 * Sets the value.
 * @param value the value to set
 */
public void setValue(Long value){
  this.value=value;
}

Fixed version (ground truth):
/** 
 * Sets the value.
 * @param value the value to set
 */
public void setValue(long value){
  this.value=value;
}
Program: 140489
Project: 140489
Buggy source:
public void setFrequency(Double frequency){
  this.frequency=frequency;
}

Fixed version (ground truth):
public void setFrequency(double frequency){
  this.frequency=frequency;
}
Program: 140490
Project: 140490
Buggy source:
/** 
 * DOC qzhang Comment method "isPatternValid".
 * @param pattern
 * @return
 */
public static boolean isPatternValid(Pattern pattern){
  boolean valid=true;
  EList<PatternComponent> components=pattern.getComponents();
  for (int i=0; i < components.size(); i++) {
    RegularExpressionImpl regularExpress=(RegularExpressionImpl)components.get(i);
    String body=regularExpress.getExpression().getBody();
    valid=((body != null) && (body.matches("String_Node_Str")));
    if (!valid) {
      break;
    }
 else {
      if (body.charAt(0) == '^') {
        body="String_Node_Str" + body.substring(1);
      }
 else {
        body="String_Node_Str" + body;
      }
      regularExpress.getExpression().setBody(body);
    }
  }
  return valid;
}

Fixed version (ground truth):
/** 
 * DOC qzhang Comment method "isPatternValid".
 * @param pattern
 * @return
 */
public static boolean isPatternValid(Pattern pattern){
  boolean valid=true;
  EList<PatternComponent> components=pattern.getComponents();
  for (int i=0; i < components.size(); i++) {
    RegularExpressionImpl regularExpress=(RegularExpressionImpl)components.get(i);
    String body=regularExpress.getExpression().getBody();
    valid=((body != null) && (body.matches("String_Node_Str")));
    if (!valid) {
      break;
    }
 else {
      body="String_Node_Str" + body;
      regularExpress.getExpression().setBody(body);
    }
  }
  return valid;
}
Program: 140491
Project: 140491
Buggy source:
public void doSave(IProgressMonitor monitor){
  this.isDirty=false;
  firePropertyChange(IEditorPart.PROP_DIRTY);
  CorePlugin.getDefault().refreshWorkSpace();
}

Fixed version (ground truth):
public void doSave(IProgressMonitor monitor){
  refreshDQView();
  this.isDirty=false;
  firePropertyChange(IEditorPart.PROP_DIRTY);
  CorePlugin.getDefault().refreshWorkSpace();
}
Program: 140492
Project: 140492
Buggy source:
public void doSave(IProgressMonitor monitor){
  if (columnMasterPage != null && columnMasterPage.isDirty()) {
    columnMasterPage.doSave(monitor);
  }
  if (connectionMasterPage != null && connectionMasterPage.isDirty()) {
    connectionMasterPage.doSave(monitor);
  }
  IFile efile=((FileEditorInput)getEditorInput()).getFile();
  refreshDQView(efile);
  super.doSave(monitor);
}

Fixed version (ground truth):
public void doSave(IProgressMonitor monitor){
  if (columnMasterPage != null && columnMasterPage.isDirty()) {
    columnMasterPage.doSave(monitor);
  }
  if (connectionMasterPage != null && connectionMasterPage.isDirty()) {
    connectionMasterPage.doSave(monitor);
  }
  super.doSave(monitor);
}
Program: 140493
Project: 140493
Buggy source:
void createAnalysisColumnsSection(final ScrolledForm form,Composite anasisDataComp){
  Section section=createSection(form,anasisDataComp,"String_Node_Str",false,null);
  Composite topComp=toolkit.createComposite(section);
  topComp.setLayout(new GridLayout());
  Hyperlink clmnBtn=toolkit.createHyperlink(topComp,"String_Node_Str",SWT.NONE);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.TOP).applyTo(clmnBtn);
  clmnBtn.addHyperlinkListener(new HyperlinkAdapter(){
    public void linkActivated(    HyperlinkEvent e){
      openColumnsSelectionDialog();
    }
  }
);
  Hyperlink indcBtn=toolkit.createHyperlink(topComp,"String_Node_Str",SWT.NONE);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.TOP).applyTo(indcBtn);
  indcBtn.addHyperlinkListener(new HyperlinkAdapter(){
    public void linkActivated(    HyperlinkEvent e){
      treeViewer.openIndicatorSelectDialog(null);
    }
  }
);
  Composite tree=toolkit.createComposite(topComp,SWT.BORDER);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(tree);
  tree.setLayout(new GridLayout());
  ((GridData)tree.getLayoutData()).heightHint=TREE_MAX_LENGTH;
  treeViewer=new AnalysisColumnTreeViewer(tree,this);
  treeViewer.setDirty(false);
  treeViewer.addPropertyChangeListener(this);
  section.setClient(topComp);
}

Fixed version (ground truth):
void createAnalysisColumnsSection(final ScrolledForm form,Composite anasisDataComp){
  Section section=createSection(form,anasisDataComp,"String_Node_Str",false,null);
  Composite topComp=toolkit.createComposite(section);
  topComp.setLayout(new GridLayout());
  Hyperlink clmnBtn=toolkit.createHyperlink(topComp,"String_Node_Str",SWT.NONE);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.TOP).applyTo(clmnBtn);
  clmnBtn.addHyperlinkListener(new HyperlinkAdapter(){
    public void linkActivated(    HyperlinkEvent e){
      openColumnsSelectionDialog();
    }
  }
);
  Hyperlink indcBtn=toolkit.createHyperlink(topComp,"String_Node_Str",SWT.NONE);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.TOP).applyTo(indcBtn);
  indcBtn.addHyperlinkListener(new HyperlinkAdapter(){
    public void linkActivated(    HyperlinkEvent e){
      treeViewer.openIndicatorSelectDialog(null);
    }
  }
);
  Composite tree=toolkit.createComposite(topComp,SWT.NONE);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(tree);
  tree.setLayout(new GridLayout());
  ((GridData)tree.getLayoutData()).heightHint=TREE_MAX_LENGTH;
  treeViewer=new AnalysisColumnTreeViewer(tree,this);
  treeViewer.setDirty(false);
  treeViewer.addPropertyChangeListener(this);
  section.setClient(topComp);
}
Program: 140494
Project: 140494
Buggy source:
/** 
 * @param parent
 */
private Tree createTree(Composite parent){
  final Tree newTree=new Tree(parent,SWT.MULTI);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(newTree);
  newTree.setHeaderVisible(false);
  TreeColumn column1=new TreeColumn(newTree,SWT.CENTER);
  column1.setWidth(190);
  TreeColumn column2=new TreeColumn(newTree,SWT.CENTER);
  column2.setWidth(80);
  TreeColumn column3=new TreeColumn(newTree,SWT.CENTER);
  column3.setWidth(120);
  TreeColumn column4=new TreeColumn(newTree,SWT.CENTER);
  column4.setWidth(120);
  parent.layout();
  menu=new Menu(newTree);
  MenuItem deleteMenuItem=new MenuItem(menu,SWT.CASCADE);
  deleteMenuItem.setText("String_Node_Str");
  deleteMenuItem.setImage(ImageLib.getImage(ImageLib.DELETE_ACTION));
  deleteMenuItem.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      removeSelectedElements(newTree);
    }
  }
);
  newTree.setMenu(menu);
  AbstractAnalysisActionHandler actionHandler=new AbstractAnalysisActionHandler(parent){
    @Override protected void handleRemove(){
      removeSelectedElements(newTree);
    }
  }
;
  parent.setData(AbstractMetadataFormPage.ACTION_HANDLER,actionHandler);
  ColumnViewerDND.installDND(newTree);
  this.addTreeListener(newTree);
  return newTree;
}

Fixed version (ground truth):
/** 
 * @param parent
 */
private Tree createTree(Composite parent){
  final Tree newTree=new Tree(parent,SWT.MULTI | SWT.BORDER);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(newTree);
  newTree.setHeaderVisible(true);
  TreeColumn column1=new TreeColumn(newTree,SWT.CENTER);
  column1.setWidth(190);
  column1.setText("String_Node_Str");
  TreeColumn column2=new TreeColumn(newTree,SWT.CENTER);
  column2.setWidth(100);
  column2.setText("String_Node_Str");
  TreeColumn column3=new TreeColumn(newTree,SWT.CENTER);
  column3.setWidth(100);
  column3.setText("String_Node_Str");
  TreeColumn column4=new TreeColumn(newTree,SWT.CENTER);
  column4.setWidth(120);
  column4.setText("String_Node_Str");
  parent.layout();
  menu=new Menu(newTree);
  MenuItem deleteMenuItem=new MenuItem(menu,SWT.CASCADE);
  deleteMenuItem.setText("String_Node_Str");
  deleteMenuItem.setImage(ImageLib.getImage(ImageLib.DELETE_ACTION));
  deleteMenuItem.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      removeSelectedElements(newTree);
    }
  }
);
  newTree.setMenu(menu);
  AbstractAnalysisActionHandler actionHandler=new AbstractAnalysisActionHandler(parent){
    @Override protected void handleRemove(){
      removeSelectedElements(newTree);
    }
  }
;
  parent.setData(AbstractMetadataFormPage.ACTION_HANDLER,actionHandler);
  ColumnViewerDND.installDND(newTree);
  this.addTreeListener(newTree);
  return newTree;
}
Program: 140496
Project: 140496
Buggy source:
public String getExecuteDuration(){
  return analysis.getResults().getResultMetadata().getExecutionDuration() / 100 + "String_Node_Str";
}

Fixed version (ground truth):
public String getExecuteDuration(){
  return resultMetadata.getExecutionDuration() / 100 + "String_Node_Str";
}
Program: 140497
Project: 140497
Buggy source:
public String getSchemaNames(){
  String str="String_Node_Str";
  for (  ColumnSet columnSet : getColumnSets()) {
    Package schema=ColumnSetHelper.getParentCatalogOrSchema(columnSet);
    if (schema != null) {
      str=str + schema.getName() + "String_Node_Str";
    }
  }
  return str;
}

Fixed version (ground truth):
public String getSchemaNames(){
  String str="String_Node_Str";
  for (  ColumnSet columnSet : getColumnSets()) {
    try {
      Package schema=ColumnSetHelper.getParentCatalogOrSchema(columnSet);
      if (schema != null) {
        str=str + schema.getName() + "String_Node_Str";
      }
    }
 catch (    NullPointerException ne) {
      return null;
    }
  }
  return str;
}
Program: 140498
Project: 140498
Buggy source:
/** 
 * Method "setAnalysis".
 * @param columnAnalysis the analysis to set
 */
public void setAnalysis(Analysis columnAnalysis){
  this.analysis=columnAnalysis;
}

Fixed version (ground truth):
/** 
 * Method "setAnalysis".
 * @param columnAnalysis the analysis to set
 */
public void setAnalysis(Analysis columnAnalysis){
  this.analysis=columnAnalysis;
  this.resultMetadata=columnAnalysis.getResults().getResultMetadata();
}
Program: 140499
Project: 140499
Buggy source:
public String getExecuteStatus(){
  if (analysis.getResults().getResultMetadata().isLastRunOk()) {
    return "String_Node_Str";
  }
 else {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
public String getExecuteStatus(){
  if (resultMetadata.isLastRunOk()) {
    return "String_Node_Str";
  }
 else {
    return "String_Node_Str" + resultMetadata.getMessage();
  }
}
Program: 140500
Project: 140500
Buggy source:
public String getExecuteData(){
  if (analysis.getResults().getResultMetadata().getExecutionDate() != null) {
    DateFormat format=DateFormat.getDateInstance(DateFormat.DEFAULT);
    return format.format(analysis.getResults().getResultMetadata().getExecutionDate());
  }
 else {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
public String getExecuteData(){
  if (resultMetadata.getExecutionDate() != null) {
    DateFormat format=DateFormat.getDateInstance(DateFormat.DEFAULT);
    return format.format(resultMetadata.getExecutionDate());
  }
 else {
    return "String_Node_Str";
  }
}
Program: 140501
Project: 140501
Buggy source:
public String getExecuteNumber(){
  return String.valueOf(analysis.getResults().getResultMetadata().getExecutionNumber());
}

Fixed version (ground truth):
public String getExecuteNumber(){
  return String.valueOf(resultMetadata.getExecutionNumber());
}
Program: 140502
Project: 140502
Buggy source:
public String getCatalogNames(){
  String str="String_Node_Str";
  for (  ColumnSet columnSet : getColumnSets()) {
    Package schema=ColumnSetHelper.getParentCatalogOrSchema(columnSet);
    if (schema != null) {
      try {
        Package catalog=ColumnSetHelper.getParentCatalogOrSchema(schema);
        if (catalog != null) {
          str=str + catalog.getName() + "String_Node_Str";
        }
      }
 catch (      NullPointerException ne) {
        return "String_Node_Str";
      }
    }
  }
  return str;
}

Fixed version (ground truth):
public String getCatalogNames(){
  String str="String_Node_Str";
  for (  ColumnSet columnSet : getColumnSets()) {
    Package schema=ColumnSetHelper.getParentCatalogOrSchema(columnSet);
    if (schema != null) {
      try {
        Package catalog=ColumnSetHelper.getParentCatalogOrSchema(schema);
        if (catalog != null) {
          str=str + catalog.getName() + "String_Node_Str";
        }
      }
 catch (      NullPointerException ne) {
        return null;
      }
    }
  }
  return str;
}
Program: 140504
Project: 140504
Buggy source:
@Override protected void pageChange(int newPageIndex){
  super.pageChange(newPageIndex);
  if (isRefreshResultPage && columnResultPage != null && newPageIndex == columnResultPage.getIndex()) {
    ((ColumnAnalysisResultPage)columnResultPage).refresh((ColumnMasterDetailsPage)getMasterPage());
  }
  isRefreshResultPage=false;
}

Fixed version (ground truth):
@Override protected void pageChange(int newPageIndex){
  super.pageChange(newPageIndex);
  if (isRefreshResultPage && columnResultPage != null && newPageIndex == columnResultPage.getIndex()) {
    ((ColumnAnalysisResultPage)columnResultPage).refresh((ColumnMasterDetailsPage)getMasterPage());
    isRefreshResultPage=false;
  }
}
Program: 140506
Project: 140506
Buggy source:
public void run(){
  for (  ChartWithData chartData : IndicatorChartFactory.createChart(columnIndicator,true)) {
    ExpandableComposite subComp=toolkit.createExpandableComposite(comp,ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT | ExpandableComposite.EXPANDED);
    subComp.setText(chartData.getChartNamedType());
    Composite composite=toolkit.createComposite(subComp);
    composite.setLayout(new GridLayout(2,false));
    composite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
    ChartTableFactory.createTable(composite,chartData);
    ImageHyperlink image=toolkit.createImageHyperlink(composite,SWT.WRAP);
    image.setImage(chartData.getImageDescriptor().createImage());
    subComp.setClient(composite);
    subComp.addExpansionListener(new ExpansionAdapter(){
      @Override public void expansionStateChanged(      ExpansionEvent e){
        form.reflow(true);
      }
    }
);
  }
}

Fixed version (ground truth):
public void run(){
  for (  ChartWithData chartData : IndicatorChartFactory.createChart(columnIndicator,true)) {
    ExpandableComposite subComp=toolkit.createExpandableComposite(comp,ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT | ExpandableComposite.EXPANDED);
    subComp.setText(chartData.getChartNamedType());
    Composite composite=toolkit.createComposite(subComp);
    composite.setLayout(new GridLayout(2,false));
    composite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
    ChartTableFactory.createTable(composite,chartData);
    ImageDescriptor imageDescriptor=chartData.getImageDescriptor();
    if (imageDescriptor != null) {
      ImageHyperlink image=toolkit.createImageHyperlink(composite,SWT.WRAP);
      image.setImage(imageDescriptor.createImage());
    }
    subComp.setClient(composite);
    subComp.addExpansionListener(new ExpansionAdapter(){
      @Override public void expansionStateChanged(      ExpansionEvent e){
        form.reflow(true);
      }
    }
);
  }
}
Program: 140511
Project: 140511
Buggy source:
public IndicatorUnit(IndicatorEnum type,Indicator indicator,ColumnIndicator parentColumn){
  this.type=type;
  this.indicator=indicator;
  this.indicatorName=indicator.getName();
  this.parentColumn=parentColumn;
}

Fixed version (ground truth):
public IndicatorUnit(IndicatorEnum type,Indicator indicator,ColumnIndicator parentColumn){
  this.type=type;
  this.indicator=indicator;
  this.indicatorName=type.getLabel();
  this.parentColumn=parentColumn;
}
Program: 140512
Project: 140512
Buggy source:
public String getPersent(){
  if (indicator != null) {
    DecimalFormat format=(DecimalFormat)DecimalFormat.getPercentInstance();
    format.applyPattern("String_Node_Str");
    double persent;
    if (indicator instanceof FrequencyIndicator) {
      FrequencyIndicator freIndicator=(FrequencyIndicator)indicator;
      persent=Double.parseDouble(getValue()) / freIndicator.getValueToFreq().size();
    }
 else {
      persent=Double.parseDouble(getValue()) / indicator.getCount().doubleValue();
    }
    return persent == 0 ? "String_Node_Str" : format.format(persent);
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
public String getPersent(){
  DecimalFormat format=(DecimalFormat)DecimalFormat.getPercentInstance();
  format.applyPattern("String_Node_Str");
  if (percent != null) {
    return percent.equals("String_Node_Str") ? "String_Node_Str" : format.format(Double.valueOf(percent));
  }
 else {
    percent=format.format(Double.parseDouble(getValue()) / indicator.getCount().doubleValue());
    return percent.equals("String_Node_Str") ? "String_Node_Str" : percent;
  }
}
Program: 140514
Project: 140514
Buggy source:
public String getColumnText(Object element,int columnIndex){
  PatternChartDataEntity entity=(PatternChartDataEntity)element;
switch (columnIndex) {
case 0:
    return entity.getLabel();
case 1:
  return entity.getPerMatch();
case 2:
return entity.getPerNoMatch();
case 3:
return entity.getNumMatch();
case 4:
return entity.getNumNoMatch();
default :
return "String_Node_Str";
}
}

Fixed version (ground truth):
@Override public String getColumnText(Object element,int columnIndex){
  ChartDataEntity entity=(ChartDataEntity)element;
  return entity.getValue();
}
Program: 140516
Project: 140516
Buggy source:
public String getPersent(){
  return persent;
}

Fixed version (ground truth):
public String getPersent(){
  if (indicator != null) {
    DecimalFormat format=(DecimalFormat)DecimalFormat.getPercentInstance();
    format.applyPattern("String_Node_Str");
    double persent;
    if (indicator instanceof FrequencyIndicator) {
      FrequencyIndicator freIndicator=(FrequencyIndicator)indicator;
      persent=Double.parseDouble(getValue()) / freIndicator.getValueToFreq().size();
    }
 else {
      persent=Double.parseDouble(getValue()) / indicator.getCount().doubleValue();
    }
    return persent == 0 ? "String_Node_Str" : format.format(persent);
  }
  return "String_Node_Str";
}
Program: 140517
Project: 140517
Buggy source:
public ChartWithData(String chartNamedType,ImageDescriptor imageDescriptor,ChartDataEntity[] enity){
  this.chartNamedType=chartNamedType;
  this.imageDescriptor=imageDescriptor;
  this.enity=enity;
  if (chartNamedType != CompositeIndicator.PATTERN_MATCHING) {
    this.computered();
  }
}

Fixed version (ground truth):
public ChartWithData(String chartNamedType,ImageDescriptor imageDescriptor,ChartDataEntity[] enity){
  this.chartNamedType=chartNamedType;
  this.imageDescriptor=imageDescriptor;
  this.enity=enity;
}
Program: 140518
Project: 140518
Buggy source:
private Double getSum(){
  Double match=Double.parseDouble(getNumMatch());
  Double nomatch=Double.parseDouble(getNumNoMatch());
  return match + nomatch;
}

Fixed version (ground truth):
private Double getSum(){
  return getIndicator().getCount().doubleValue();
}
Program: 140519
Project: 140519
Buggy source:
protected ImageDescriptor decorateImage(ImageDescriptor input,Object element){
  if (element instanceof IFile) {
    IFile file=(IFile)element;
    if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.PATTERN)) {
      Pattern findPattern=PatternResourceFileHelper.getInstance().findPattern(file);
      ImageDescriptor imageDescriptor=ImageLib.getImageDescriptor(ImageLib.PATTERN_REG);
      if (findPattern != null) {
        boolean validStatus=TaggedValueHelper.getValidStatus(findPattern);
        if (!validStatus) {
          ImageDescriptor warnImg=PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJS_WARN_TSK);
          DecorationOverlayIcon icon=new DecorationOverlayIcon(imageDescriptor.createImage(),warnImg,IDecoration.BOTTOM_RIGHT);
          imageDescriptor=icon;
        }
      }
      return imageDescriptor;
    }
 else     if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.REP)) {
      return ImageLib.getImageDescriptor(ImageLib.REPORT_OBJECT);
    }
  }
  if (element instanceof IProject) {
    if (DQStructureManager.METADATA.equals(((IProject)element).getName())) {
      return ImageLib.getImageDescriptor(ImageLib.METADATA);
    }
  }
 else   if (element instanceof IFolder) {
    if (DQStructureManager.DB_CONNECTIONS.equals(((IFolder)element).getName())) {
      return ImageLib.getImageDescriptor(ImageLib.CONNECTION);
    }
  }
  return super.decorateImage(input,element);
}

Fixed version (ground truth):
protected ImageDescriptor decorateImage(ImageDescriptor input,Object element){
  if (element instanceof IFile) {
    IFile file=(IFile)element;
    if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.PATTERN)) {
      Pattern findPattern=PatternResourceFileHelper.getInstance().findPattern(file);
      ImageDescriptor imageDescriptor=ImageLib.getImageDescriptor(ImageLib.PATTERN_REG);
      if (findPattern != null) {
        boolean validStatus=TaggedValueHelper.getValidStatus(findPattern);
        if (!validStatus) {
          ImageDescriptor warnImg=PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJS_WARN_TSK);
          DecorationOverlayIcon icon=new DecorationOverlayIcon(imageDescriptor.createImage(),warnImg,IDecoration.BOTTOM_RIGHT);
          imageDescriptor=icon;
        }
      }
      return imageDescriptor;
    }
 else     if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.REP)) {
      return ImageLib.getImageDescriptor(ImageLib.REPORT_OBJECT);
    }
  }
  if (element instanceof IProject) {
    if (DQStructureManager.METADATA.equals(((IProject)element).getName())) {
      return ImageLib.getImageDescriptor(ImageLib.METADATA);
    }
 else     if (DQStructureManager.LIBRARIES.equals(((IProject)element).getName())) {
      return ImageLib.getImageDescriptor(ImageLib.LIBRARIES);
    }
  }
 else   if (element instanceof IFolder) {
    if (DQStructureManager.DB_CONNECTIONS.equals(((IFolder)element).getName())) {
      return ImageLib.getImageDescriptor(ImageLib.CONNECTION);
    }
  }
  return super.decorateImage(input,element);
}
Program: 140520
Project: 140520
Buggy source:
protected void firePropertyChange(final int propertyId){
  super.firePropertyChange(propertyId);
}

Fixed version (ground truth):
protected void firePropertyChange(final int propertyId){
  super.firePropertyChange(propertyId);
  isRefreshResultPage=true;
}
Program: 140521
Project: 140521
Buggy source:
@Override protected void pageChange(int newPageIndex){
  super.pageChange(newPageIndex);
  if (columnResultPage != null && newPageIndex == columnResultPage.getIndex()) {
    ((ColumnAnalysisResultPage)columnResultPage).refresh((ColumnMasterDetailsPage)getMasterPage());
  }
}

Fixed version (ground truth):
@Override protected void pageChange(int newPageIndex){
  super.pageChange(newPageIndex);
  if (isRefreshResultPage && columnResultPage != null && newPageIndex == columnResultPage.getIndex()) {
    ((ColumnAnalysisResultPage)columnResultPage).refresh((ColumnMasterDetailsPage)getMasterPage());
  }
  isRefreshResultPage=false;
}
Program: 140525
Project: 140525
Buggy source:
@Override public Image getImage(Object element){
  if (element instanceof IFolder) {
    return ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
  }
  if (element instanceof IFile) {
    return ImageLib.getImage(ImageLib.PATTERN_REG);
  }
  return null;
}

Fixed version (ground truth):
@Override public Image getImage(Object element){
  if (element instanceof IFolder) {
    return ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
  }
  if (element instanceof IFile) {
    Pattern findPattern=PatternResourceFileHelper.getInstance().findPattern((IFile)element);
    boolean validStatus=TaggedValueHelper.getValidStatus(findPattern);
    ImageDescriptor imageDescriptor=ImageLib.getImageDescriptor(ImageLib.PATTERN_REG);
    if (!validStatus) {
      ImageDescriptor warnImg=PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJS_WARN_TSK);
      DecorationOverlayIcon icon=new DecorationOverlayIcon(imageDescriptor.createImage(),warnImg,IDecoration.BOTTOM_RIGHT);
      imageDescriptor=icon;
    }
    return imageDescriptor.createImage();
  }
  return null;
}
Program: 140526
Project: 140526
Buggy source:
private boolean savePattern(){
  this.pattern.getComponents().clear();
  this.pattern.getComponents().addAll(tempPatternComponents);
  EList<PatternComponent> components=this.pattern.getComponents();
  List<String> existLanguage=new ArrayList<String>();
  for (int i=0; i < components.size(); i++) {
    RegularExpressionImpl regularExpress=(RegularExpressionImpl)components.get(i);
    String language=regularExpress.getExpression().getLanguage();
    if ((regularExpress.getExpression().getBody() == null) || (!regularExpress.getExpression().getBody().matches("String_Node_Str"))) {
      MessageDialog.openWarning(null,"String_Node_Str","String_Node_Str");
      return false;
    }
    if (existLanguage.contains(language)) {
      MessageDialog.openError(null,"String_Node_Str","String_Node_Str" + language);
      return false;
    }
 else {
      existLanguage.add(language);
    }
  }
  EMFUtil.saveSingleResource(pattern.eResource());
  return true;
}

Fixed version (ground truth):
private boolean savePattern(){
  this.pattern.getComponents().clear();
  this.pattern.getComponents().addAll(tempPatternComponents);
  TaggedValueHelper.setValidStatus(true,pattern);
  EList<PatternComponent> components=this.pattern.getComponents();
  List<String> existLanguage=new ArrayList<String>();
  for (int i=0; i < components.size(); i++) {
    RegularExpressionImpl regularExpress=(RegularExpressionImpl)components.get(i);
    String language=regularExpress.getExpression().getLanguage();
    if ((regularExpress.getExpression().getBody() == null) || (!regularExpress.getExpression().getBody().matches("String_Node_Str"))) {
      MessageDialog.openWarning(null,"String_Node_Str","String_Node_Str");
      return false;
    }
    if (existLanguage.contains(language)) {
      MessageDialog.openError(null,"String_Node_Str","String_Node_Str" + language);
      return false;
    }
 else {
      existLanguage.add(language);
    }
  }
  EMFUtil.saveSingleResource(pattern.eResource());
  return true;
}
Program: 140527
Project: 140527
Buggy source:
protected ImageDescriptor decorateImage(ImageDescriptor input,Object element){
  if (element instanceof IFile) {
    IFile file=(IFile)element;
    if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.PATTERN)) {
      return ImageLib.getImageDescriptor(ImageLib.PATTERN_REG);
    }
 else     if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.REP)) {
      return ImageLib.getImageDescriptor(ImageLib.REPORT_OBJECT);
    }
  }
  if (element instanceof IProject) {
    if (DQStructureManager.METADATA.equals(((IProject)element).getName())) {
      return ImageLib.getImageDescriptor(ImageLib.METADATA);
    }
  }
 else   if (element instanceof IFolder) {
    if (DQStructureManager.DB_CONNECTIONS.equals(((IFolder)element).getName())) {
      return ImageLib.getImageDescriptor(ImageLib.CONNECTION);
    }
  }
  return super.decorateImage(input,element);
}

Fixed version (ground truth):
protected ImageDescriptor decorateImage(ImageDescriptor input,Object element){
  if (element instanceof IFile) {
    IFile file=(IFile)element;
    if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.PATTERN)) {
      Pattern findPattern=PatternResourceFileHelper.getInstance().findPattern(file);
      ImageDescriptor imageDescriptor=ImageLib.getImageDescriptor(ImageLib.PATTERN_REG);
      if (findPattern != null) {
        boolean validStatus=TaggedValueHelper.getValidStatus(findPattern);
        if (!validStatus) {
          ImageDescriptor warnImg=PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJS_WARN_TSK);
          DecorationOverlayIcon icon=new DecorationOverlayIcon(imageDescriptor.createImage(),warnImg,IDecoration.BOTTOM_RIGHT);
          imageDescriptor=icon;
        }
      }
      return imageDescriptor;
    }
 else     if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.REP)) {
      return ImageLib.getImageDescriptor(ImageLib.REPORT_OBJECT);
    }
  }
  if (element instanceof IProject) {
    if (DQStructureManager.METADATA.equals(((IProject)element).getName())) {
      return ImageLib.getImageDescriptor(ImageLib.METADATA);
    }
  }
 else   if (element instanceof IFolder) {
    if (DQStructureManager.DB_CONNECTIONS.equals(((IFolder)element).getName())) {
      return ImageLib.getImageDescriptor(ImageLib.CONNECTION);
    }
  }
  return super.decorateImage(input,element);
}
Program: 140528
Project: 140528
Buggy source:
private DQStructureManager(){
}

Fixed version (ground truth):
private DQStructureManager(){
  init();
}
Program: 140530
Project: 140530
Buggy source:
public boolean createDQStructure(){
  Shell shell=PlatformUI.getWorkbench().getDisplay().getActiveShell();
  try {
    IProject project=this.createNewProject(DATA_PROFILING,shell);
    this.createNewFoler(project,ANALYSIS);
    this.createNewFoler(project,REPORTS);
    project=this.createNewProject(LIBRARIES,shell);
    IFolder patternFolder=this.createNewFoler(project,PATTERNS);
    this.createNewFoler(project,SQL_PATTERNS);
    this.copyFilesToFolder(PATTERN_PATH,true,patternFolder);
    IFolder sqlSourceFolder=this.createNewFoler(project,SOURCE_FILES);
    this.copyFilesToFolder(DEMO_PATH,true,sqlSourceFolder);
    project=this.createNewProject(METADATA,shell);
    this.createNewFoler(project,DB_CONNECTIONS);
  }
 catch (  Exception ex) {
    ExceptionHandler.process(ex);
    return false;
  }
  return true;
}

Fixed version (ground truth):
public boolean createDQStructure(){
  Shell shell=PlatformUI.getWorkbench().getDisplay().getActiveShell();
  try {
    IProject project=this.createNewProject(DATA_PROFILING,shell);
    IFolder createNewFoler=this.createNewFoler(project,ANALYSIS);
    createNewFoler.setPersistentProperty(FOLDER_CLASSIFY_KEY,ANALYSIS_FOLDER_PROPERTY);
    createNewFoler=this.createNewFoler(project,REPORTS);
    createNewFoler.setPersistentProperty(FOLDER_CLASSIFY_KEY,REPORT_FOLDER_PROPERTY);
    project=this.createNewProject(LIBRARIES,shell);
    createNewFoler=this.createNewFoler(project,PATTERNS);
    createNewFoler.setPersistentProperty(FOLDER_CLASSIFY_KEY,PATTERNS_FOLDER_PROPERTY);
    this.copyFilesToFolder(PATTERN_PATH,true,createNewFoler);
    createNewFoler=this.createNewFoler(project,SQL_PATTERNS);
    createNewFoler.setPersistentProperty(FOLDER_CLASSIFY_KEY,SQLPATTERNS_FOLDER_PROPERTY);
    createNewFoler=this.createNewFoler(project,SOURCE_FILES);
    createNewFoler.setPersistentProperty(FOLDER_CLASSIFY_KEY,SOURCEFILES_FOLDER_PROPERTY);
    this.copyFilesToFolder(DEMO_PATH,true,createNewFoler);
    project=this.createNewProject(METADATA,shell);
    createNewFoler=this.createNewFoler(project,DB_CONNECTIONS);
    createNewFoler.setPersistentProperty(FOLDER_CLASSIFY_KEY,DBCONNECTION_FOLDER_PROPERTY);
  }
 catch (  Exception ex) {
    ExceptionHandler.process(ex);
    return false;
  }
  return true;
}