nus-yam/ex-repair huggingface dataset:
Program: 140082
Project: 140082
Buggy source:
@Override public boolean performFinish(){
  boolean isMinEmpty=CheckValueUtils.isEmpty(lowerText.getText());
  boolean isMaxEmpty=CheckValueUtils.isEmpty(higherText.getText());
  if (canUsed) {
    boolean isPerMinEmpty=CheckValueUtils.isEmpty(pLowerText.getText());
    boolean isPerMaxEmpty=CheckValueUtils.isEmpty(pHigherText.getText());
    if (isMinEmpty && isMaxEmpty && isPerMinEmpty&& isPerMaxEmpty) {
      parameters.setIndicatorValidDomain(null);
    }
 else {
      if (isMinEmpty && isMaxEmpty) {
        removeRange(VALUE_THRESHOLD);
      }
 else {
        IndicatorHelper.setIndicatorThreshold(parameters,lowerText.getText(),higherText.getText());
      }
      if (isPerMinEmpty && isPerMaxEmpty) {
        removeRange(PERCENTAGE_THRESHOLD);
      }
 else {
        IndicatorHelper.setIndicatorThresholdInPercent(parameters,pLowerText.getText(),pHigherText.getText());
      }
    }
  }
 else {
    if (isMinEmpty && isMaxEmpty) {
      parameters.setIndicatorValidDomain(null);
    }
 else {
      IndicatorHelper.setIndicatorThreshold(parameters,lowerText.getText(),higherText.getText());
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  boolean isMinEmpty=CheckValueUtils.isEmpty(lowerText.getText());
  boolean isMaxEmpty=CheckValueUtils.isEmpty(higherText.getText());
  if (isContainRowCount) {
    boolean isPerMinEmpty=CheckValueUtils.isEmpty(pLowerText.getText());
    boolean isPerMaxEmpty=CheckValueUtils.isEmpty(pHigherText.getText());
    if (isMinEmpty && isMaxEmpty && isPerMinEmpty&& isPerMaxEmpty) {
      parameters.setIndicatorValidDomain(null);
    }
 else {
      if (isMinEmpty && isMaxEmpty) {
        removeRange(VALUE_THRESHOLD);
      }
 else {
        IndicatorHelper.setIndicatorThreshold(parameters,lowerText.getText(),higherText.getText());
      }
      if (isPerMinEmpty && isPerMaxEmpty) {
        removeRange(PERCENTAGE_THRESHOLD);
      }
 else {
        IndicatorHelper.setIndicatorThresholdInPercent(parameters,pLowerText.getText(),pHigherText.getText());
      }
    }
  }
 else {
    if (isMinEmpty && isMaxEmpty) {
      parameters.setIndicatorValidDomain(null);
    }
 else {
      IndicatorHelper.setIndicatorThreshold(parameters,lowerText.getText(),higherText.getText());
    }
  }
  return true;
}
Program: 140083
Project: 140083
Buggy source:
/** 
 * DOC zqin NumbericNominalForm constructor comment.
 * @param parent
 * @param style
 * @param parameter
 */
public NumbericNominalForm(Composite parent,int style){
  super(parent,style);
  setupForm();
}

Fixed version (ground truth):
/** 
 * DOC zqin NumbericNominalForm constructor comment.
 * @param parent
 * @param style
 * @param parameter
 */
public NumbericNominalForm(Composite parent,int style,IndicatorParameters parameters){
  super(parent,style,parameters);
  setupForm();
}
Program: 140085
Project: 140085
Buggy source:
public void setElements(final ColumnIndicator[] elements){
  this.tree.dispose();
  this.tree=createTree(this.parentComp);
  tree.setData(VIEWER_KEY,this);
  this.columnIndicators=elements;
  addItemElements(elements);
  this.tree.addMouseListener(new MouseAdapter(){
    @Override public void mouseDoubleClick(    MouseEvent e){
      TreeItem item=tree.getSelection()[0];
      if (item != null) {
        Object indicatorobj=item.getData(INDICATOR_UNIT_KEY);
        Object columnobj=item.getData(COLUMN_INDICATOR_KEY);
        if (columnobj != null && indicatorobj == null) {
          openIndicatorSelectDialog(null);
        }
 else         if (columnobj != null && indicatorobj != null) {
          openIndicatorOptionDialog(null,item);
        }
      }
    }
  }
);
}

Fixed version (ground truth):
public void setElements(final ColumnIndicator[] elements){
  this.tree.dispose();
  this.tree=createTree(this.parentComp);
  tree.setData(VIEWER_KEY,this);
  this.columnIndicators=elements;
  addItemElements(elements);
}
Program: 140086
Project: 140086
Buggy source:
@Override public void mouseDoubleClick(MouseEvent e){
  TreeItem item=tree.getSelection()[0];
  if (item != null) {
    Object indicatorobj=item.getData(INDICATOR_UNIT_KEY);
    Object columnobj=item.getData(COLUMN_INDICATOR_KEY);
    if (columnobj != null && indicatorobj == null) {
      openIndicatorSelectDialog(null);
    }
 else     if (columnobj != null && indicatorobj != null) {
      openIndicatorOptionDialog(null,item);
    }
  }
}

Fixed version (ground truth):
@Override public void mouseDoubleClick(MouseEvent e){
  if (isDirty()) {
    masterPage.doSave(null);
  }
  TreeItem item=tree.getSelection()[0];
  if (item != null) {
    Object indicatorobj=item.getData(INDICATOR_UNIT_KEY);
    Object columnobj=item.getData(COLUMN_INDICATOR_KEY);
    if (columnobj != null && indicatorobj == null) {
      openIndicatorSelectDialog(null);
    }
 else     if (columnobj != null && indicatorobj != null) {
      openIndicatorOptionDialog(null,item);
    }
  }
}
Program: 140087
Project: 140087
Buggy source:
private boolean checkRange(String inString){
  String[] definedRange=getDefinedRange(inString);
  if (definedRange != null && definedRange.length >= 2) {
    range="String_Node_Str" + definedRange[0] + "String_Node_Str"+ definedRange[1]+ "String_Node_Str";
    int sqltype=((TdColumn)indicator.getAnalyzedElement()).getJavaType();
    if (Java2SqlType.isDateInSQL(sqltype)) {
      try {
        SimpleDateFormat format=new SimpleDateFormat("String_Node_Str");
        Date min=format.parse(definedRange[0]);
        Date max=format.parse(definedRange[1]);
        Date dValue=format.parse(value);
        return dValue.after(max) || dValue.before(min);
      }
 catch (      Exception e) {
        e.printStackTrace();
        return false;
      }
    }
 else {
      Double min=StringFormatUtil.formatDouble(definedRange[0]);
      Double max=StringFormatUtil.formatDouble(definedRange[1]);
      Double dValue=inString != null ? StringFormatUtil.parseDouble(inString) : Double.NaN;
      if (min == null || Double.isNaN(min)) {
        min=Double.NEGATIVE_INFINITY;
      }
      if (max == null || Double.isNaN(max)) {
        max=Double.POSITIVE_INFINITY;
      }
      return dValue < min || dValue > max;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean checkRange(String inString){
  String[] definedRange=getDefinedRange(inString);
  if (definedRange != null && definedRange.length >= 2) {
    range="String_Node_Str" + definedRange[0] + "String_Node_Str"+ definedRange[1]+ "String_Node_Str";
    int sqltype=((TdColumn)indicator.getAnalyzedElement()).getJavaType();
    if (Java2SqlType.isDateInSQL(sqltype) && indicator.eContainer() instanceof RangeIndicator) {
      try {
        SimpleDateFormat format=new SimpleDateFormat("String_Node_Str");
        Date dValue=format.parse(value);
        if ("String_Node_Str".equals(definedRange[0])) {
          Date max=format.parse(definedRange[1]);
          range="String_Node_Str" + definedRange[1] + "String_Node_Str";
          return dValue.after(max);
        }
 else         if ("String_Node_Str".equals(definedRange[1])) {
          Date min=format.parse(definedRange[0]);
          range="String_Node_Str" + definedRange[0] + "String_Node_Str";
          return dValue.before(min);
        }
 else {
          Date min=format.parse(definedRange[0]);
          Date max=format.parse(definedRange[1]);
          return dValue.after(max) || dValue.before(min);
        }
      }
 catch (      Exception e) {
        e.printStackTrace();
        return false;
      }
    }
 else {
      Double min=StringFormatUtil.formatDouble(definedRange[0]);
      Double max=StringFormatUtil.formatDouble(definedRange[1]);
      Double dValue=inString != null ? StringFormatUtil.parseDouble(inString) : Double.NaN;
      if (min == null || Double.isNaN(min)) {
        min=Double.NEGATIVE_INFINITY;
      }
      if (max == null || Double.isNaN(max)) {
        max=Double.POSITIVE_INFINITY;
      }
      return dValue < min || dValue > max;
    }
  }
  return false;
}
Program: 140089
Project: 140089
Buggy source:
private boolean checkRange(String inString){
  Double[] definedRange=getDefinedRange(inString);
  if (definedRange != null) {
    Double min=definedRange[0];
    Double max=definedRange[1];
    Double dValue=inString != null ? StringFormatUtil.parseDouble(inString) : Double.NaN;
    if (min == null || Double.isNaN(min)) {
      min=Double.NEGATIVE_INFINITY;
    }
    if (max == null || Double.isNaN(max)) {
      max=Double.POSITIVE_INFINITY;
    }
    if (dValue < min || dValue > max) {
      if (inString.indexOf('%') > 0) {
        range="String_Node_Str" + StringFormatUtil.formatPersent(min / 100) + "String_Node_Str"+ StringFormatUtil.formatPersent(max / 100)+ "String_Node_Str";
      }
 else {
        range="String_Node_Str" + min + "String_Node_Str"+ max+ "String_Node_Str";
      }
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean checkRange(String inString){
  String[] definedRange=getDefinedRange(inString);
  if (definedRange != null && definedRange.length >= 2) {
    range="String_Node_Str" + definedRange[0] + "String_Node_Str"+ definedRange[1]+ "String_Node_Str";
    int sqltype=((TdColumn)indicator.getAnalyzedElement()).getJavaType();
    if (Java2SqlType.isDateInSQL(sqltype)) {
      try {
        Date min=DateFormat.getDateInstance().parse(definedRange[0]);
        Date max=DateFormat.getDateInstance().parse(definedRange[1]);
        Date dValue=DateFormat.getDateInstance().parse(value);
        return dValue.after(max) || dValue.before(min);
      }
 catch (      Exception e) {
        e.printStackTrace();
        return false;
      }
    }
 else {
      Double min=StringFormatUtil.formatDouble(definedRange[0]);
      Double max=StringFormatUtil.formatDouble(definedRange[1]);
      Double dValue=inString != null ? StringFormatUtil.parseDouble(inString) : Double.NaN;
      if (min == null || Double.isNaN(min)) {
        min=Double.NEGATIVE_INFINITY;
      }
      if (max == null || Double.isNaN(max)) {
        max=Double.POSITIVE_INFINITY;
      }
      return dValue < min || dValue > max;
    }
  }
  return false;
}
Program: 140090
Project: 140090
Buggy source:
protected Double[] getDefinedRange(String inString){
  boolean flag=inString.indexOf('%') > 0;
  String[] threshold=IndicatorHelper.getDataThreshold(indicator);
  if (threshold == null) {
    if (flag) {
      threshold=IndicatorHelper.getIndicatorThresholdInPercent(indicator);
    }
 else {
      threshold=IndicatorHelper.getIndicatorThreshold(indicator);
    }
  }
  if (threshold != null) {
    Double[] returnDB=new Double[threshold.length];
    for (int i=0; i < threshold.length; i++) {
      returnDB[i]=StringFormatUtil.formatDouble(threshold[i]);
    }
    return returnDB;
  }
  return null;
}

Fixed version (ground truth):
protected String[] getDefinedRange(String inString){
  boolean flag=inString.indexOf('%') > 0;
  String[] threshold=IndicatorHelper.getDataThreshold(indicator);
  if (threshold == null) {
    if (flag) {
      threshold=IndicatorHelper.getIndicatorThresholdInPercent(indicator);
    }
 else {
      threshold=IndicatorHelper.getIndicatorThreshold(indicator);
    }
  }
  return threshold;
}
Program: 140092
Project: 140092
Buggy source:
public SummaryStatisticsState(List<IndicatorUnit> units){
  super(units);
}

Fixed version (ground truth):
public SummaryStatisticsState(List<IndicatorUnit> units){
  super(units);
  if (units != null && !units.isEmpty()) {
    sqltype=units.get(0).getParentColumn().getTdColumn().getJavaType();
  }
}
Program: 140093
Project: 140093
Buggy source:
@Override protected void addFields(){
  Group group=new Group(this,SWT.NONE);
  group.setLayout(new GridLayout(2,false));
  group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  group.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  GridData gdText=new GridData(GridData.FILL_HORIZONTAL);
  Label lowerLabel=new Label(group,SWT.NONE);
  lowerLabel.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  lowerText=new Text(group,SWT.BORDER);
  lowerText.setLayoutData(gdText);
  Label higherLabel=new Label(group,SWT.NONE);
  higherLabel.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  higherText=new Text(group,SWT.BORDER);
  higherText.setLayoutData(gdText);
  if (!(parameters.eContainer() instanceof RowCountIndicator)) {
    Group pGroup=new Group(this,SWT.NONE);
    pGroup.setLayout(new GridLayout(2,false));
    pGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    pGroup.setText(DefaultMessagesImpl.getString("String_Node_Str"));
    Label pLower=new Label(pGroup,SWT.NONE);
    pLower.setText(DefaultMessagesImpl.getString("String_Node_Str"));
    pLowerText=new Text(pGroup,SWT.BORDER);
    pLowerText.setLayoutData(gdText);
    Label pHigher=new Label(pGroup,SWT.NONE);
    pHigher.setText(DefaultMessagesImpl.getString("String_Node_Str"));
    pHigherText=new Text(pGroup,SWT.BORDER);
    pHigherText.setLayoutData(gdText);
    setPercentUIEnable();
  }
}

Fixed version (ground truth):
@Override protected void addFields(){
  Group group=new Group(this,SWT.NONE);
  group.setLayout(new GridLayout(2,false));
  group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  group.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  GridData gdText=new GridData(GridData.FILL_HORIZONTAL);
  Label lowerLabel=new Label(group,SWT.NONE);
  lowerLabel.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  lowerText=new Text(group,SWT.BORDER);
  lowerText.setLayoutData(gdText);
  Label higherLabel=new Label(group,SWT.NONE);
  higherLabel.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  higherText=new Text(group,SWT.BORDER);
  higherText.setLayoutData(gdText);
  if (!(parameters.eContainer() instanceof RowCountIndicator) && !Java2SqlType.isDateInSQL(sqltype)) {
    Group pGroup=new Group(this,SWT.NONE);
    pGroup.setLayout(new GridLayout(2,false));
    pGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    pGroup.setText(DefaultMessagesImpl.getString("String_Node_Str"));
    Label pLower=new Label(pGroup,SWT.NONE);
    pLower.setText(DefaultMessagesImpl.getString("String_Node_Str"));
    pLowerText=new Text(pGroup,SWT.BORDER);
    pLowerText.setLayoutData(gdText);
    Label pHigher=new Label(pGroup,SWT.NONE);
    pHigher.setText(DefaultMessagesImpl.getString("String_Node_Str"));
    pHigherText=new Text(pGroup,SWT.BORDER);
    pHigherText.setLayoutData(gdText);
    setPercentUIEnable();
  }
}
Program: 140094
Project: 140094
Buggy source:
/** 
 * DOC Zqin Comment method "runInDQViewer". this method open DQ responsitory view and run the specified query.
 * @param tdDataProvider
 * @param query
 */
public void runInDQViewer(TdDataProvider tdDataProvider,String query,String editorName){
  if (editorName == null) {
    editorName=String.valueOf(SQLExplorerPlugin.getDefault().getEditorSerialNo());
  }
  SQLExplorerPlugin sqlexplorer=SQLExplorerPlugin.getDefault();
  Collection<Alias> aliases=sqlexplorer.getAliasManager().getAliases();
  TypedReturnCode<TdProviderConnection> tdPc=DataProviderHelper.getTdProviderConnection(tdDataProvider);
  TdProviderConnection providerConnection=tdPc.getObject();
  String url=providerConnection.getConnectionString();
  for (  Alias alias : aliases) {
    if (alias.getUrl().equals(url)) {
      SQLEditorInput input=new SQLEditorInput("String_Node_Str" + editorName + "String_Node_Str");
      input.setUser(alias.getDefaultUser());
      try {
        IWorkbenchPage page=SQLExplorerPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
        SQLEditor editorPart=(SQLEditor)page.openEditor((IEditorInput)input,SQLEditor.class.getName());
        editorPart.setText(query);
        ExecSQLAction execSQLAction=new ExecSQLAction(editorPart);
        execSQLAction.run();
      }
 catch (      PartInitException e) {
        ExceptionHandler.process(e);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC Zqin Comment method "runInDQViewer". this method open DQ responsitory view and run the specified query.
 * @param tdDataProvider
 * @param query
 */
public void runInDQViewer(TdDataProvider tdDataProvider,String query,String editorName){
  if (editorName == null) {
    editorName=String.valueOf(SQLExplorerPlugin.getDefault().getEditorSerialNo());
  }
  SQLExplorerPlugin sqlexplorer=SQLExplorerPlugin.getDefault();
  Collection<Alias> aliases=sqlexplorer.getAliasManager().getAliases();
  TypedReturnCode<TdProviderConnection> tdPc=DataProviderHelper.getTdProviderConnection(tdDataProvider);
  TdProviderConnection providerConnection=tdPc.getObject();
  String url=providerConnection.getConnectionString();
  for (  Alias alias : aliases) {
    if (alias.getUrl().equals(url)) {
      SQLEditorInput input=new SQLEditorInput("String_Node_Str" + editorName + "String_Node_Str");
      input.setUser(alias.getDefaultUser());
      try {
        IWorkbenchPage page=SQLExplorerPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
        SQLEditor editorPart=(SQLEditor)page.openEditor((IEditorInput)input,SQLEditor.class.getName());
        editorPart.setText(query);
        ExecSQLAction execSQLAction=new ExecSQLAction(editorPart);
        execSQLAction.run();
        break;
      }
 catch (      PartInitException e) {
        ExceptionHandler.process(e);
      }
    }
  }
}
Program: 140096
Project: 140096
Buggy source:
public void modifyText(ModifyEvent e){
  setDirty(true);
  fireTextChange();
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
  setDirty(true);
}
Program: 140097
Project: 140097
Buggy source:
public void modifyText(ModifyEvent e){
  setDirty(true);
  fireTextChange();
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
  setDirty(true);
}
Program: 140099
Project: 140099
Buggy source:
/** 
 * DOC rli Comment method "ceatePatternDefinitionComp".
 * @param form
 * @param section
 */
private Composite createPatternDefinitionComp(){
  Composite newComp=toolkit.createComposite(patternDefinitionSection);
  newComp.setLayout(new GridLayout());
  componentsComp=new Composite(newComp,SWT.NONE);
  componentsComp.setLayout(new GridLayout());
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,false).applyTo(componentsComp);
  EList<PatternComponent> components=this.pattern.getComponents();
  for (int i=0; i < components.size(); i++) {
    RegularExpression regularExpress=(RegularExpression)components.get(i);
    creatNewExpressLine(regularExpress);
  }
  createAddButton(newComp);
  patternDefinitionSection.setClient(newComp);
  return newComp;
}

Fixed version (ground truth):
/** 
 * DOC rli Comment method "ceatePatternDefinitionComp".
 * @param form
 * @param section
 */
private Composite createPatternDefinitionComp(){
  Composite newComp=toolkit.createComposite(patternDefinitionSection);
  newComp.setLayout(new GridLayout());
  componentsComp=new Composite(newComp,SWT.NONE);
  componentsComp.setLayout(new GridLayout());
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,false).applyTo(componentsComp);
  EList<PatternComponent> components=this.pattern.getComponents();
  for (int i=0; i < components.size(); i++) {
    RegularExpression regularExpress=(RegularExpression)components.get(i);
    RegularExpressionImpl newRegularExpress=(RegularExpressionImpl)PatternFactory.eINSTANCE.createRegularExpression();
    Expression newExpression=CoreFactory.eINSTANCE.createExpression();
    newExpression.setBody(regularExpress.getExpression().getBody());
    newExpression.setLanguage(regularExpress.getExpression().getLanguage());
    newRegularExpress.setExpression(newExpression);
    tempPatternComponents.add(newRegularExpress);
    creatNewExpressLine(newRegularExpress);
  }
  createAddButton(newComp);
  patternDefinitionSection.setClient(newComp);
  return newComp;
}
Program: 140101
Project: 140101
Buggy source:
/** 
 * DOC rli Comment method "reset".
 */
private void reset(){
  String[] supportTypes=PatternLanguageType.getAllLanguageTypes();
  allDBTypeList=new ArrayList<String>();
  allDBTypeList.addAll(Arrays.asList(supportTypes));
  if (tempPatternComponents == null) {
    tempPatternComponents=new ArrayList<PatternComponent>();
  }
 else {
    tempPatternComponents.clear();
  }
  tempPatternComponents.addAll(pattern.getComponents());
  remainDBTypeList=new ArrayList<String>();
  remainDBTypeList.addAll(allDBTypeList);
}

Fixed version (ground truth):
/** 
 * DOC rli Comment method "reset".
 */
private void reset(){
  String[] supportTypes=PatternLanguageType.getAllLanguageTypes();
  allDBTypeList=new ArrayList<String>();
  allDBTypeList.addAll(Arrays.asList(supportTypes));
  if (tempPatternComponents == null) {
    tempPatternComponents=new ArrayList<PatternComponent>();
  }
 else {
    tempPatternComponents.clear();
  }
  remainDBTypeList=new ArrayList<String>();
  remainDBTypeList.addAll(allDBTypeList);
}
Program: 140102
Project: 140102
Buggy source:
public void createContent(Composite parent){
  parent.setLayout(new GridLayout(2,false));
  dataFilterText=new Text(parent,SWT.BORDER | SWT.MULTI);
  DataFilterDND.installDND(dataFilterText);
  dataFilterText.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  dataFilterText.setText(stringDataFilter == null ? PluginConstant.EMPTY_STRING : stringDataFilter);
  GridDataFactory.fillDefaults().grab(true,true).applyTo(dataFilterText);
  ((GridData)dataFilterText.getLayoutData()).heightHint=150;
  dataFilterText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      setDirty(true);
      propertyChangeSupport.firePropertyChange(PluginConstant.DATAFILTER_PROPERTY,null,dataFilterText.getText());
    }
  }
);
  Composite buttonsComp=new Composite(parent,SWT.None);
  GridDataFactory.fillDefaults().span(1,1).applyTo(buttonsComp);
  buttonsComp.setLayout(new GridLayout(1,true));
  buttonsComp.setVisible(true);
  Button button=new Button(buttonsComp,SWT.None);
  button.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.TOP).applyTo(button);
}

Fixed version (ground truth):
public void createContent(Composite parent){
  parent.setLayout(new GridLayout());
  dataFilterText=new Text(parent,SWT.BORDER | SWT.MULTI);
  DataFilterDND.installDND(dataFilterText);
  dataFilterText.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  dataFilterText.setText(stringDataFilter == null ? PluginConstant.EMPTY_STRING : stringDataFilter);
  GridDataFactory.fillDefaults().grab(true,true).applyTo(dataFilterText);
  ((GridData)dataFilterText.getLayoutData()).heightHint=150;
  dataFilterText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      setDirty(true);
      propertyChangeSupport.firePropertyChange(PluginConstant.DATAFILTER_PROPERTY,null,dataFilterText.getText());
    }
  }
);
}
Program: 140105
Project: 140105
Buggy source:
@Override protected TableStructureEntity getTableStructure(){
  TableStructureEntity entity=new TableStructureEntity();
  entity.setFieldNames(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"});
  entity.setFieldWidths(new Integer[]{200,150,150});
  return entity;
}

Fixed version (ground truth):
@Override protected TableStructureEntity getTableStructure(){
  TableStructureEntity entity=new TableStructureEntity();
  entity.setFieldNames(new String[]{"String_Node_Str","String_Node_Str"});
  entity.setFieldWidths(new Integer[]{200,300});
  return entity;
}
Program: 140107
Project: 140107
Buggy source:
/** 
 * Method "addSeriesToXYZDataset" adds a new series of data to the given dataset.
 * @param dataset a dataset
 * @param keyOfDataset the series key of the data series
 */
public void addSeriesToGanttDataset(TaskSeriesCollection ganttDataset,String keyOfDataset){
  TaskSeries series=new TaskSeries(keyOfDataset);
  for (  T key : keyToVal.keySet()) {
    final Date[] date=keyToVal.get(key);
    series.add(new Task(((MultipleKey)key).toString(),new SimpleTimePeriod(date[0],date[1])));
    MultiMapHelper.addUniqueObjectToListMap(keyOfDataset,key.toString(),this.seriesKeyToLabel);
  }
  ganttDataset.add(series);
}

Fixed version (ground truth):
/** 
 * Method "addSeriesToXYZDataset" adds a new series of data to the given dataset.
 * @param dataset a dataset
 * @param keyOfDataset the series key of the data series
 */
public void addSeriesToGanttDataset(TaskSeriesCollection ganttDataset,String keyOfDataset){
  TaskSeries series=new TaskSeries(keyOfDataset);
  for (  MultipleKey key : keyToVal.keySet()) {
    final Date[] date=keyToVal.get(key);
    series.add(new Task(((MultipleKey)key).toString(),new SimpleTimePeriod(date[0],date[1])));
    MultiMapHelper.addUniqueObjectToListMap(keyOfDataset,key.toString(),this.seriesKeyToLabel);
  }
  ganttDataset.add(series);
}
Program: 140108
Project: 140108
Buggy source:
/** 
 * DOC scorreia Comment method "createKey".
 * @param nominalColumns
 * @return
 */
private static String createKey(EList<Column> nominalColumns,int idx){
  StringBuilder builder=new StringBuilder();
  for (int i=0; i < idx; i++) {
    builder.append(nominalColumns.get(i).getName()).append("String_Node_Str");
  }
  return builder.toString();
}

Fixed version (ground truth):
/** 
 * Method "createKey" creates a key with the concatenation of the values of the first n columns of the given list.
 * @param nominalColumns
 * @param n
 * @return a key
 */
private static String createKey(EList<Column> nominalColumns,int n){
  StringBuilder builder=new StringBuilder();
  for (int i=0; i < n; i++) {
    builder.append(nominalColumns.get(i).getName()).append("String_Node_Str");
  }
  return builder.toString();
}
Program: 140109
Project: 140109
Buggy source:
/** 
 * DOC scorreia Comment method "fillDataset".
 * @param nominalColumns
 * @param listRows
 * @param firstNumericColumnIdx
 * @param dataset
 */
private static Map<String,ValueAggregator> fillDataset(final EList<Column> nominalColumns,final List<Object[]> listRows,final int firstNumericColumnIdx){
  Map<String,ValueAggregator> valueAggregators=new HashMap<String,ValueAggregator>();
  int xPos=firstNumericColumnIdx;
  int yPos=firstNumericColumnIdx + 1;
  int zPos=firstNumericColumnIdx + 2;
  for (int i=nominalColumns.size(); i > 0; i--) {
    String key=createKey(nominalColumns,i);
    for (    Object[] row : listRows) {
      final Object xobj=row[xPos];
      final Double xValue=xobj != null ? Double.valueOf(String.valueOf(xobj)) : null;
      final Object yobj=row[yPos];
      final Double yValue=yobj != null ? Double.valueOf(String.valueOf(yobj)) : null;
      final Object zobj=row[zPos];
      final Double zValue=zobj != null ? Double.valueOf(String.valueOf(zobj)) : null;
      ValueAggregator valueAggregator=valueAggregators.get(key);
      if (valueAggregator == null) {
        valueAggregator=new ValueAggregator();
        valueAggregators.put(key,valueAggregator);
      }
      MultipleKey multipleKey=new MultipleKey(row,i);
      valueAggregator.addValue(multipleKey,new Double[]{xValue,yValue,zValue});
    }
  }
  return valueAggregators;
}

Fixed version (ground truth):
/** 
 * Method "fillDataset" fills in the data sets.
 * @param nominalColumns the nominal columns
 * @param listRows the rows (=result set)
 * @param firstNumericColumnIdx the index of the first numeric column
 * @return a map [key -> aggregated values] where identifies a level of aggregation
 */
private static Map<String,ValueAggregator> fillDataset(final EList<Column> nominalColumns,final List<Object[]> listRows,final int firstNumericColumnIdx){
  Map<String,ValueAggregator> valueAggregators=new HashMap<String,ValueAggregator>();
  int xPos=firstNumericColumnIdx;
  int yPos=firstNumericColumnIdx + 1;
  int zPos=firstNumericColumnIdx + 2;
  for (int i=nominalColumns.size(); i > 0; i--) {
    String key=createKey(nominalColumns,i);
    for (    Object[] row : listRows) {
      final Object xobj=row[xPos];
      final Double xValue=xobj != null ? Double.valueOf(String.valueOf(xobj)) : null;
      final Object yobj=row[yPos];
      final Double yValue=yobj != null ? Double.valueOf(String.valueOf(yobj)) : null;
      final Object zobj=row[zPos];
      final Double zValue=zobj != null ? Double.valueOf(String.valueOf(zobj)) : null;
      ValueAggregator valueAggregator=valueAggregators.get(key);
      if (valueAggregator == null) {
        valueAggregator=new ValueAggregator();
        valueAggregators.put(key,valueAggregator);
      }
      MultipleKey multipleKey=new MultipleKey(row,i);
      valueAggregator.addValue(multipleKey,new Double[]{xValue,yValue,zValue});
    }
  }
  return valueAggregators;
}
Program: 140110
Project: 140110
Buggy source:
/** 
 */
private static Map<String,DateValueAggregate> fillGanttDataset(final EList<Column> nominalColumns,final List<Object[]> listRows,final int firstNumericColumnIdx){
  Map<String,DateValueAggregate> valueAggregators=new HashMap<String,DateValueAggregate>();
  int minPos=firstNumericColumnIdx;
  int maxPos=firstNumericColumnIdx + 1;
  for (int i=nominalColumns.size(); i > 0; i--) {
    String key=createKey(nominalColumns,i);
    for (    Object[] row : listRows) {
      final Object minObj=row[minPos];
      final Object maxobj=row[maxPos];
      DateValueAggregate valueAggregator=valueAggregators.get(key);
      if (valueAggregator == null) {
        valueAggregator=new DateValueAggregate();
        valueAggregators.put(key,valueAggregator);
      }
      MultipleKey multipleKey=new MultipleKey(row,i);
      valueAggregator.addValue(multipleKey,new Date[]{(Date)minObj,(Date)maxobj});
    }
  }
  return valueAggregators;
}

Fixed version (ground truth):
/** 
 */
private static Map<String,DateValueAggregate> fillGanttDataset(final EList<Column> nominalColumns,final List<Object[]> listRows,final int firstDateColumnIdx){
  Map<String,DateValueAggregate> valueAggregators=new HashMap<String,DateValueAggregate>();
  int minPos=firstDateColumnIdx;
  int maxPos=firstDateColumnIdx + 1;
  for (int i=nominalColumns.size(); i > 0; i--) {
    String key=createKey(nominalColumns,i);
    for (    Object[] row : listRows) {
      final Object minObj=row[minPos];
      final Date minDate=minObj != null ? (Date)minObj : null;
      final Object maxobj=row[maxPos];
      final Date maxDate=maxobj != null ? (Date)maxobj : null;
      DateValueAggregate valueAggregator=valueAggregators.get(key);
      if (valueAggregator == null) {
        valueAggregator=new DateValueAggregate();
        valueAggregators.put(key,valueAggregator);
      }
      MultipleKey multipleKey=new MultipleKey(row,i);
      valueAggregator.addValue(multipleKey,new Date[]{minDate,maxDate});
    }
  }
  return valueAggregators;
}
Program: 140111
Project: 140111
Buggy source:
/** 
 */
public void addValue(T key,Date[] values){
  Date[] dates=keyToVal.get(key);
  if (dates == null) {
    dates=new Date[values.length];
    Arrays.fill(dates,new Date());
  }
  for (int i=0; i < values.length; i++) {
    Date d=values[i];
    if (d == null) {
      nullResults.add(key);
      return;
    }
    dates[i]=d;
  }
  keyToVal.put(key,dates);
}

Fixed version (ground truth):
public void addValue(MultipleKey key,Date[] values){
}
Program: 140112
Project: 140112
Buggy source:
/** 
 * Method "addSeriesToXYZDataset" adds a new series of data to the given dataset.
 * @param dataset a dataset
 * @param keyOfDataset the series key of the data series
 */
public void addSeriesToXYZDataset(DefaultXYZDataset dataset,String keyOfDataset){
  final int size=keyToVal.size();
  double[] xDouble=new double[size];
  double[] yDouble=new double[size];
  double[] zDouble=new double[size];
  int i=0;
  for (  MultipleKey key : keyToVal.keySet()) {
    final Double[] doubles=keyToVal.get(key);
    xDouble[i]=doubles[0] / doubles[1];
    yDouble[i]=doubles[1];
    zDouble[i]=doubles[2];
    MultiMapHelper.addUniqueObjectToListMap(keyOfDataset,key.toString(),this.seriesKeyToLabel);
    i++;
  }
  double[][] data=new double[][]{xDouble,yDouble,zDouble};
  dataset.addSeries(keyOfDataset,data);
}

Fixed version (ground truth):
/** 
 * Method "addSeriesToXYZDataset" adds a new series of data to the given dataset.
 * @param dataset a dataset
 * @param keyOfDataset the series key of the data series
 */
public void addSeriesToXYZDataset(DefaultXYZDataset dataset,String keyOfDataset){
  final int size=keyToVal.size();
  double[] xDouble=new double[size];
  double[] yDouble=new double[size];
  double[] zDouble=new double[size];
  int i=0;
  for (  MultipleKey key : keyToVal.keySet()) {
    final Double[] doubles=keyToVal.get(key);
    xDouble[i]=doubles[0];
    yDouble[i]=doubles[1];
    zDouble[i]=doubles[2];
    MultiMapHelper.addUniqueObjectToListMap(keyOfDataset,key.toString(),this.seriesKeyToLabel);
    i++;
  }
  double[][] data=new double[][]{xDouble,yDouble,zDouble};
  dataset.addSeries(keyOfDataset,data);
}
Program: 140113
Project: 140113
Buggy source:
/** 
 * DOC scorreia Comment method "fillDataset".
 * @param nominalColumns
 * @param listRows
 * @param firstNumericColumnIdx
 * @param dataset
 */
private static Map<String,ValueAggregator> fillDataset(final EList<Column> nominalColumns,final List<Object[]> listRows,final int firstNumericColumnIdx){
  Map<String,ValueAggregator> valueAggregators=new HashMap<String,ValueAggregator>();
  int xPos=firstNumericColumnIdx;
  int yPos=firstNumericColumnIdx + 1;
  int zPos=firstNumericColumnIdx + 2;
  for (int i=nominalColumns.size(); i > 0; i--) {
    String key=createKey(nominalColumns,i);
    for (    Object[] row : listRows) {
      final Double xValue=Double.valueOf(String.valueOf(row[xPos]));
      final Double yValue=Double.valueOf(String.valueOf(row[yPos]));
      final Double zValue=Double.valueOf(String.valueOf(row[zPos]));
      ValueAggregator valueAggregator=valueAggregators.get(key);
      if (valueAggregator == null) {
        valueAggregator=new ValueAggregator();
        valueAggregators.put(key,valueAggregator);
      }
      MultipleKey multipleKey=new MultipleKey(row,i);
      valueAggregator.addValue(multipleKey,xValue,yValue,zValue);
    }
  }
  return valueAggregators;
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "fillDataset".
 * @param nominalColumns
 * @param listRows
 * @param firstNumericColumnIdx
 * @param dataset
 */
private static Map<String,ValueAggregator> fillDataset(final EList<Column> nominalColumns,final List<Object[]> listRows,final int firstNumericColumnIdx){
  Map<String,ValueAggregator> valueAggregators=new HashMap<String,ValueAggregator>();
  int xPos=firstNumericColumnIdx;
  int yPos=firstNumericColumnIdx + 1;
  int zPos=firstNumericColumnIdx + 2;
  for (int i=nominalColumns.size(); i > 0; i--) {
    String key=createKey(nominalColumns,i);
    for (    Object[] row : listRows) {
      final Object xobj=row[xPos];
      final Double xValue=xobj != null ? Double.valueOf(String.valueOf(xobj)) : null;
      final Object yobj=row[yPos];
      final Double yValue=yobj != null ? Double.valueOf(String.valueOf(yobj)) : null;
      final Object zobj=row[zPos];
      final Double zValue=zobj != null ? Double.valueOf(String.valueOf(zobj)) : null;
      ValueAggregator valueAggregator=valueAggregators.get(key);
      if (valueAggregator == null) {
        valueAggregator=new ValueAggregator();
        valueAggregators.put(key,valueAggregator);
      }
      MultipleKey multipleKey=new MultipleKey(row,i);
      valueAggregator.addValue(multipleKey,new Double[]{xValue,yValue,zValue});
    }
  }
  return valueAggregators;
}
Program: 140115
Project: 140115
Buggy source:
/** 
 * DOC scorreia Comment method "getCompletedString".
 * @param indicator
 * @param sqlExpression
 * @param colName
 * @param table
 * @param whereExpression
 * @throws AnalysisExecutionException
 */
private String getCompletedStringForQuantiles(Indicator indicator,Expression sqlExpression,String colName,String table,List<String> whereExpression) throws AnalysisExecutionException {
  String catalogOrSchema=getCatalogOrSchemaName(indicator.getAnalyzedElement());
  long count=getCount(cachedAnalysis,colName,table,catalogOrSchema,whereExpression);
  if (count == -1) {
    throw new AnalysisExecutionException("String_Node_Str" + dbms().toQualifiedName(catalogOrSchema,null,colName));
  }
  if (count == 0) {
    this.errorMessage="String_Node_Str" + dbms().toQualifiedName(catalogOrSchema,null,colName);
    throw new AnalysisExecutionException(errorMessage);
  }
  Long midleCount=getLimitFirstArg(indicator,count);
  Integer nbRow=getNbReturnedRows(indicator,count);
  long nPlusSkip=midleCount + nbRow;
  return dbms().fillGenericQueryWithColumnTableLimitOffset(sqlExpression.getBody(),colName,table,String.valueOf(nbRow),String.valueOf(midleCount),String.valueOf(nPlusSkip));
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "getCompletedString".
 * @param indicator
 * @param sqlExpression
 * @param colName
 * @param table
 * @param whereExpression
 * @throws AnalysisExecutionException
 */
private String getCompletedStringForQuantiles(Indicator indicator,Expression sqlExpression,String colName,String table,List<String> whereExpression) throws AnalysisExecutionException {
  String catalogOrSchema=getCatalogOrSchemaName(indicator.getAnalyzedElement());
  long count=getCount(cachedAnalysis,colName,table,catalogOrSchema,whereExpression);
  if (count == -1) {
    throw new AnalysisExecutionException("String_Node_Str" + dbms().toQualifiedName(catalogOrSchema,null,colName));
  }
  if (count == 0) {
    this.errorMessage="String_Node_Str" + dbms().toQualifiedName(catalogOrSchema,null,colName);
    throw new AnalysisExecutionException(errorMessage);
  }
  Long midleCount=getOffsetInLimit(indicator,count);
  Integer nbRow=getNbReturnedRows(indicator,count);
  long nPlusSkip=midleCount + nbRow;
  return dbms().fillGenericQueryWithColumnTableLimitOffset(sqlExpression.getBody(),colName,table,String.valueOf(nbRow),String.valueOf(midleCount),String.valueOf(nPlusSkip));
}
Program: 140116
Project: 140116
Buggy source:
/** 
 * DOC scorreia Comment method "getNbReturnedRows".
 * @param indicator
 * @param count
 * @return
 */
private Integer getNbReturnedRows(Indicator indicator,long count){
  if (indicator.eClass().equals(IndicatorsPackage.eINSTANCE.getMedianIndicator())) {
    boolean isEven=count % 2 == 0;
    return (isEven) ? 2 : 1;
  }
  return 1;
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "getNbReturnedRows".
 * @param indicator
 * @param count
 * @return
 */
private Integer getNbReturnedRows(Indicator indicator,long count){
  if (indicator.eClass().equals(IndicatorsPackage.eINSTANCE.getMedianIndicator())) {
    boolean isEven=count % 2 == 0;
    return (isEven) ? 2 : 1;
  }
 else   if (indicator.eClass().equals(IndicatorsPackage.eINSTANCE.getLowerQuartileIndicator()) || indicator.eClass().equals(IndicatorsPackage.eINSTANCE.getUpperQuartileIndicator())) {
    return (count % 4) == 0 ? 2 : 1;
  }
  return 1;
}
Program: 140117
Project: 140117
Buggy source:
/** 
 * DOC Zqin Comment method "runInDQViewer". this method open DQ responsitory view and run the specified query.
 * @param tdDataProvider
 * @param query
 */
public void runInDQViewer(TdDataProvider tdDataProvider,String query){
  SQLExplorerPlugin sqlexplorer=SQLExplorerPlugin.getDefault();
  Collection<Alias> aliases=sqlexplorer.getAliasManager().getAliases();
  TypedReturnCode<TdProviderConnection> tdPc=DataProviderHelper.getTdProviderConnection(tdDataProvider);
  TdProviderConnection providerConnection=tdPc.getObject();
  String url=providerConnection.getConnectionString();
  for (  Alias alias : aliases) {
    if (alias.getUrl().equals(url)) {
      SQLEditorInput input=new SQLEditorInput("String_Node_Str" + SQLExplorerPlugin.getDefault().getEditorSerialNo() + "String_Node_Str");
      input.setUser(alias.getDefaultUser());
      try {
        IWorkbenchPage page=SQLExplorerPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
        SQLEditor editorPart=(SQLEditor)page.openEditor((IEditorInput)input,SQLEditor.class.getName());
        editorPart.setText(query);
        ExecSQLAction execSQLAction=new ExecSQLAction(editorPart);
        execSQLAction.run();
      }
 catch (      PartInitException e) {
        ExceptionHandler.process(e);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC Zqin Comment method "runInDQViewer". this method open DQ responsitory view and run the specified query.
 * @param tdDataProvider
 * @param query
 */
public void runInDQViewer(TdDataProvider tdDataProvider,String query,String editorName){
  if (editorName == null) {
    editorName=String.valueOf(SQLExplorerPlugin.getDefault().getEditorSerialNo());
  }
  SQLExplorerPlugin sqlexplorer=SQLExplorerPlugin.getDefault();
  Collection<Alias> aliases=sqlexplorer.getAliasManager().getAliases();
  TypedReturnCode<TdProviderConnection> tdPc=DataProviderHelper.getTdProviderConnection(tdDataProvider);
  TdProviderConnection providerConnection=tdPc.getObject();
  String url=providerConnection.getConnectionString();
  for (  Alias alias : aliases) {
    if (alias.getUrl().equals(url)) {
      SQLEditorInput input=new SQLEditorInput("String_Node_Str" + editorName + "String_Node_Str");
      input.setUser(alias.getDefaultUser());
      try {
        IWorkbenchPage page=SQLExplorerPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
        SQLEditor editorPart=(SQLEditor)page.openEditor((IEditorInput)input,SQLEditor.class.getName());
        editorPart.setText(query);
        ExecSQLAction execSQLAction=new ExecSQLAction(editorPart);
        execSQLAction.run();
      }
 catch (      PartInitException e) {
        ExceptionHandler.process(e);
      }
    }
  }
}
Program: 140118
Project: 140118
Buggy source:
@Override public void run(){
  new ChangePerspectiveAction(PluginConstant.SE_ID).run();
  TdDataProvider tdDataProvider=DataProviderHelper.getDataProvider(table);
  String qualifiedName=ColumnSetNameHelper.getColumnSetQualifiedName(tdDataProvider,table);
  String query="String_Node_Str" + qualifiedName;
  CorePlugin.getDefault().runInDQViewer(tdDataProvider,query);
}

Fixed version (ground truth):
@Override public void run(){
  new ChangePerspectiveAction(PluginConstant.SE_ID).run();
  TdDataProvider tdDataProvider=DataProviderHelper.getDataProvider(table);
  String qualifiedName=ColumnSetNameHelper.getColumnSetQualifiedName(tdDataProvider,table);
  String query="String_Node_Str" + qualifiedName;
  CorePlugin.getDefault().runInDQViewer(tdDataProvider,query,null);
}
Program: 140121
Project: 140121
Buggy source:
public void run(){
  for (  ChartWithData chartData : IndicatorChartFactory.createChart(columnIndicator,isCreate)) {
    final JFreeChart chart=chartData.getChart();
    if (chart != null) {
      GridData gd=new GridData(GridData.FILL_BOTH);
      gd.widthHint=420;
      gd.heightHint=230;
      ChartUtils.createAWTSWTComp(composite,gd,chart);
    }
  }
}

Fixed version (ground truth):
public void run(){
  for (  ChartWithData chartData : IndicatorChartFactory.createChart(columnIndicator,isCreate)) {
    JFreeChart chart=chartData.getChart();
    if (chart != null) {
      ChartUtils.createAWTSWTComp(comp,new GridData(GridData.FILL_BOTH),chart);
    }
  }
}
Program: 140123
Project: 140123
Buggy source:
/** 
 * DOC Zqin Comment method "showSelectedElements".
 * @param newTree
 */
private void showSelectedElements(Tree newTree){
  TreeItem[] selection=newTree.getSelection();
  for (  TreeItem item : selection) {
    IndicatorUnit indicatorUnit=(IndicatorUnit)item.getData(INDICATOR_UNIT_KEY);
    ColumnIndicator columnIndicator=(ColumnIndicator)item.getData(COLUMN_INDICATOR_KEY);
    if (columnIndicator != null && indicatorUnit == null) {
      new ChangePerspectiveAction(PluginConstant.SE_ID).run();
      TdColumn column=columnIndicator.getTdColumn();
      TdDataProvider dataprovider=DataProviderHelper.getTdDataProvider(column);
      ColumnSet columnSetOwner=ColumnHelper.getColumnSetOwner(column);
      String tableName=ColumnSetNameHelper.getColumnSetQualifiedName(dataprovider,columnSetOwner);
      String columnName=ColumnHelper.getFullName(column);
      String query="String_Node_Str" + columnName + "String_Node_Str"+ tableName;
      CorePlugin.getDefault().runInDQViewer(dataprovider,query);
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC Zqin Comment method "showSelectedElements".
 * @param newTree
 */
private void showSelectedElements(Tree newTree){
  TreeItem[] selection=newTree.getSelection();
  for (  TreeItem item : selection) {
    IndicatorUnit indicatorUnit=(IndicatorUnit)item.getData(INDICATOR_UNIT_KEY);
    ColumnIndicator columnIndicator=(ColumnIndicator)item.getData(COLUMN_INDICATOR_KEY);
    if (columnIndicator != null && indicatorUnit == null) {
      new ChangePerspectiveAction(PluginConstant.SE_ID).run();
      TdColumn column=columnIndicator.getTdColumn();
      TdDataProvider dataprovider=DataProviderHelper.getTdDataProvider(column);
      ColumnSet columnSetOwner=ColumnHelper.getColumnSetOwner(column);
      String tableName=ColumnSetNameHelper.getColumnSetQualifiedName(dataprovider,columnSetOwner);
      String columnName=ColumnHelper.getFullName(column);
      String query="String_Node_Str" + columnName + "String_Node_Str"+ tableName;
      CorePlugin.getDefault().runInDQViewer(dataprovider,query,null);
    }
  }
}
Program: 140126
Project: 140126
Buggy source:
/** 
 * Create a AWT_SWT bridge composite for displaying the <CODE>ChartPanel</CODE>.
 * @param composite
 * @param gd
 * @param chartPanel
 */
public static ChartPanel createAWTSWTComp(final Composite composite,GridData gd,JFreeChart chart){
  Composite frameComp=new Composite(composite,SWT.EMBEDDED);
  frameComp.setLayout(new GridLayout());
  frameComp.setLayoutData(gd);
  Frame frame=SWT_AWT.new_Frame(frameComp);
  frame.setLayout(new java.awt.GridLayout());
  ChartPanel chartPanel=new ChartPanel(chart);
  frame.add(chartPanel);
  frame.pack();
  frame.validate();
  return chartPanel;
}

Fixed version (ground truth):
/** 
 * Create a AWT_SWT bridge composite for displaying the <CODE>ChartPanel</CODE>.
 * @param composite
 * @param gd
 * @param chartPanel
 */
public static ChartPanel createAWTSWTComp(Composite composite,GridData gd,JFreeChart chart){
  ChartPanel chartPanel=new ChartPanel(chart);
  Composite frameComp=new Composite(composite,SWT.EMBEDDED);
  frameComp.setLayout(new GridLayout());
  frameComp.setLayoutData(gd);
  frameComp.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_GRAY));
  Frame frame=SWT_AWT.new_Frame(frameComp);
  frame.setLayout(new java.awt.GridLayout());
  frame.add(chartPanel);
  frame.validate();
  return chartPanel;
}