nus-yam/ex-repair huggingface dataset:
Program: 69907
Project: 69907
Buggy source:
/** 
 * clear the property binding in dataset to disable it when run the query
 * @param dsHandle
 * @param dataSetMap
 * @param dataSourceMap
 * @throws SemanticException
 */
public static void clearPropertyBindingMap(DataSetHandle dsHandle,Map dataSetMap,Map dataSourceMap) throws SemanticException {
  if (dsHandle.getExtends() != null) {
    return;
  }
  if (dsHandle instanceof JointDataSetHandle) {
    Iterator iter=((JointDataSetHandle)dsHandle).dataSetsIterator();
    while (iter.hasNext()) {
      DataSetHandle ds=(DataSetHandle)iter.next();
      if (dsHandle != null) {
        clearPropertyBindingMap(ds,dataSetMap,dataSourceMap);
      }
    }
  }
 else   if (dsHandle instanceof OdaDataSetHandle) {
    List dataSetBindingList=dsHandle.getPropertyBindings();
    List dataSourceBindingList=dsHandle.getDataSource().getPropertyBindings();
    if (!dataSetBindingList.isEmpty())     dataSetMap.put(dsHandle.getName(),dataSetBindingList);
    if (!dataSourceBindingList.isEmpty())     dataSourceMap.put(dsHandle.getDataSource().getName(),dataSourceBindingList);
    for (int i=0; i < dataSetBindingList.size(); i++) {
      PropertyBinding binding=(PropertyBinding)dataSetBindingList.get(i);
      dsHandle.setPropertyBinding(binding.getName(),"String_Node_Str");
    }
    for (int i=0; i < dataSourceBindingList.size(); i++) {
      PropertyBinding binding=(PropertyBinding)dataSourceBindingList.get(i);
      dsHandle.getDataSource().setPropertyBinding(binding.getName(),"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * clear the property binding in dataset to disable it when run the query
 * @param dsHandle
 * @param dataSetMap
 * @param dataSourceMap
 * @throws SemanticException
 */
public static void clearPropertyBindingMap(DataSetHandle dsHandle,Map dataSetMap,Map dataSourceMap) throws SemanticException {
  if (dsHandle.getExtends() != null) {
    return;
  }
  if (dsHandle instanceof JointDataSetHandle) {
    Iterator iter=((JointDataSetHandle)dsHandle).dataSetsIterator();
    while (iter.hasNext()) {
      DataSetHandle ds=(DataSetHandle)iter.next();
      if (dsHandle != null) {
        clearPropertyBindingMap(ds,dataSetMap,dataSourceMap);
      }
    }
  }
 else   if (dsHandle instanceof OdaDataSetHandle) {
    List dataSetBindingList=dsHandle.getPropertyBindings();
    List dataSourceBindingList=dsHandle.getDataSource().getPropertyBindings();
    if (!dataSetBindingList.isEmpty())     dataSetMap.put(dsHandle.getName(),dataSetBindingList);
    if (!dataSourceBindingList.isEmpty())     dataSourceMap.put(dsHandle.getDataSource().getName(),dataSourceBindingList);
    for (int i=0; i < dataSetBindingList.size(); i++) {
      PropertyBinding binding=(PropertyBinding)dataSetBindingList.get(i);
      dsHandle.clearProperty(binding.getName());
    }
    for (int i=0; i < dataSourceBindingList.size(); i++) {
      PropertyBinding binding=(PropertyBinding)dataSourceBindingList.get(i);
      dsHandle.getDataSource().clearProperty(binding.getName());
    }
  }
}
Program: 69908
Project: 69908
Buggy source:
/** 
 * reset the property binding in dataset.
 * @param dsHandle
 * @param dataSetMap
 * @param dataSourceMap
 * @throws SemanticException
 */
public static void resetPropertyBinding(DataSetHandle dsHandle,Map dataSetMap,Map dataSourceMap) throws SemanticException {
  if (dsHandle.getExtends() != null) {
    return;
  }
  if (dsHandle instanceof JointDataSetHandle) {
    Iterator iter=((JointDataSetHandle)dsHandle).dataSetsIterator();
    while (iter.hasNext()) {
      DataSetHandle ds=(DataSetHandle)iter.next();
      if (dsHandle != null) {
        resetPropertyBinding(ds,dataSetMap,dataSourceMap);
      }
    }
  }
 else {
    if (dsHandle instanceof OdaDataSetHandle) {
      if (dataSetMap.get(dsHandle.getName()) != null) {
        List pList=(List)dataSetMap.get(dsHandle.getName());
        for (int i=0; i < pList.size(); i++) {
          PropertyBinding binding=(PropertyBinding)pList.get(i);
          dsHandle.clearProperty(binding.getName());
        }
      }
      if (dataSourceMap.get(dsHandle.getDataSource().getName()) != null) {
        List pList=(List)dataSourceMap.get(dsHandle.getDataSource().getName());
        for (int i=0; i < pList.size(); i++) {
          PropertyBinding binding=(PropertyBinding)pList.get(i);
          dsHandle.getDataSource().clearProperty(binding.getName());
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * reset the property binding in dataset.
 * @param dsHandle
 * @param dataSetMap
 * @param dataSourceMap
 * @throws SemanticException
 */
public static void resetPropertyBinding(DataSetHandle dsHandle,Map dataSetMap,Map dataSourceMap) throws SemanticException {
  if (dsHandle.getExtends() != null) {
    return;
  }
  if (dsHandle instanceof JointDataSetHandle) {
    Iterator iter=((JointDataSetHandle)dsHandle).dataSetsIterator();
    while (iter.hasNext()) {
      DataSetHandle ds=(DataSetHandle)iter.next();
      if (dsHandle != null) {
        resetPropertyBinding(ds,dataSetMap,dataSourceMap);
      }
    }
  }
 else {
    if (dsHandle instanceof OdaDataSetHandle) {
      if (dataSetMap.get(dsHandle.getName()) != null) {
        List pList=(List)dataSetMap.get(dsHandle.getName());
        for (int i=0; i < pList.size(); i++) {
          PropertyBinding binding=(PropertyBinding)pList.get(i);
          dsHandle.setPropertyBinding(binding.getName(),binding.getValue());
        }
      }
      if (dataSourceMap.get(dsHandle.getDataSource().getName()) != null) {
        List pList=(List)dataSourceMap.get(dsHandle.getDataSource().getName());
        for (int i=0; i < pList.size(); i++) {
          PropertyBinding binding=(PropertyBinding)pList.get(i);
          dsHandle.getDataSource().setPropertyBinding(binding.getName(),binding.getValue());
        }
      }
    }
  }
}
Program: 69909
Project: 69909
Buggy source:
private void cleanDataDefinition(SeriesDefinition sd){
  EList<Query> dds=sd.getDesignTimeSeries().getDataDefinition();
  for (int i=0; i < dds.size(); i++) {
    dds.get(i).setDefinition("String_Node_Str");
    dds.get(i).getGrouping().setEnabled(false);
  }
}

Fixed version (ground truth):
private void cleanDataDefinition(SeriesDefinition sd){
  EList<Query> dds=sd.getDesignTimeSeries().getDataDefinition();
  for (int i=0; i < dds.size(); i++) {
    dds.get(i).setDefinition("String_Node_Str");
    if (dds.get(i).getGrouping() != null) {
      dds.get(i).getGrouping().setEnabled(false);
    }
  }
}
Program: 69910
Project: 69910
Buggy source:
/** 
 * clear the property binding in dataset to disable it when run the query
 * @param dsHandle
 * @param dataSetMap
 * @param dataSourceMap
 * @throws SemanticException
 */
public static void clearPropertyBindingMap(DataSetHandle dsHandle,Map dataSetMap,Map dataSourceMap) throws SemanticException {
  if (dsHandle.getExtends() != null) {
    return;
  }
  if (dsHandle instanceof JointDataSetHandle) {
    Iterator iter=((JointDataSetHandle)dsHandle).dataSetsIterator();
    while (iter.hasNext()) {
      DataSetHandle ds=(DataSetHandle)iter.next();
      if (dsHandle != null) {
        clearPropertyBindingMap(ds,dataSetMap,dataSourceMap);
      }
    }
  }
 else   if (dsHandle instanceof OdaDataSetHandle) {
    List dataSetBindingList=dsHandle.getPropertyBindings();
    List dataSourceBindingList=dsHandle.getDataSource().getPropertyBindings();
    if (!dataSetBindingList.isEmpty())     dataSetMap.put(dsHandle.getName(),dataSetBindingList);
    if (!dataSourceBindingList.isEmpty())     dataSourceMap.put(dsHandle.getDataSource().getName(),dataSourceBindingList);
    for (int i=0; i < dataSetBindingList.size(); i++) {
      PropertyBinding binding=(PropertyBinding)dataSetBindingList.get(i);
      dsHandle.clearProperty(binding.getName());
    }
    for (int i=0; i < dataSourceBindingList.size(); i++) {
      PropertyBinding binding=(PropertyBinding)dataSourceBindingList.get(i);
      dsHandle.getDataSource().clearProperty(binding.getName());
    }
  }
}

Fixed version (ground truth):
/** 
 * clear the property binding in dataset to disable it when run the query
 * @param dsHandle
 * @param dataSetMap
 * @param dataSourceMap
 * @throws SemanticException
 */
public static void clearPropertyBindingMap(DataSetHandle dsHandle,Map dataSetMap,Map dataSourceMap) throws SemanticException {
  if (dsHandle.getExtends() != null) {
    return;
  }
  if (dsHandle instanceof JointDataSetHandle) {
    Iterator iter=((JointDataSetHandle)dsHandle).dataSetsIterator();
    while (iter.hasNext()) {
      DataSetHandle ds=(DataSetHandle)iter.next();
      if (dsHandle != null) {
        clearPropertyBindingMap(ds,dataSetMap,dataSourceMap);
      }
    }
  }
 else   if (dsHandle instanceof OdaDataSetHandle) {
    List dataSetBindingList=dsHandle.getPropertyBindings();
    List dataSourceBindingList=dsHandle.getDataSource().getPropertyBindings();
    if (!dataSetBindingList.isEmpty())     dataSetMap.put(dsHandle.getName(),dataSetBindingList);
    if (!dataSourceBindingList.isEmpty())     dataSourceMap.put(dsHandle.getDataSource().getName(),dataSourceBindingList);
    for (int i=0; i < dataSetBindingList.size(); i++) {
      PropertyBinding binding=(PropertyBinding)dataSetBindingList.get(i);
      dsHandle.setPropertyBinding(binding.getName(),(Expression)null);
    }
    for (int i=0; i < dataSourceBindingList.size(); i++) {
      PropertyBinding binding=(PropertyBinding)dataSourceBindingList.get(i);
      dsHandle.getDataSource().setPropertyBinding(binding.getName(),(Expression)null);
    }
  }
}
Program: 69911
Project: 69911
Buggy source:
protected void writeRunProperties(IStyle style,String fontFamily,boolean ishyperlink){
  writeHyperlinkStyle(ishyperlink,style);
  writeFont(fontFamily);
  writeFontSize(style);
  writeLetterSpacing(style);
  writeTextLineThrough(style);
  writeFontStyle(style);
  writeFontWeight(style);
  writer.openTag("String_Node_Str");
  writer.closeTag("String_Node_Str");
}

Fixed version (ground truth):
protected void writeRunProperties(IStyle style,String fontFamily,boolean ishyperlink){
  writeHyperlinkStyle(ishyperlink,style);
  writeFont(fontFamily);
  writeFontSize(style);
  writeLetterSpacing(style);
  writeTextLineThrough(style);
  writeFontStyle(style);
  writeFontWeight(style);
}
Program: 69912
Project: 69912
Buggy source:
private void drawDiagonalLine(ICellContent cell,double cellWidth){
  DiagonalLineInfo diagonalLineInfo=new DiagonalLineInfo();
  diagonalLineInfo.setDiagonalLine(cell.getDiagonalNumber(),cell.getDiagonalStyle(),cell.getDiagonalWidth());
  diagonalLineInfo.setAntidiagonalLine(cell.getAntidiagonalNumber(),cell.getAntidiagonalStyle(),cell.getAntidiagonalWidth());
  int cellHeight=WordUtil.convertTo(getCellHeight(cell),0) / 20;
  diagonalLineInfo.setCoordinateSize(cellWidth,cellHeight);
  String lineColor=WordUtil.parseColor(cell.getComputedStyle().getColor());
  diagonalLineInfo.setColor(lineColor);
  wordWriter.drawDiagonalLine(diagonalLineInfo);
}

Fixed version (ground truth):
private void drawDiagonalLine(ICellContent cell,double cellWidth){
  DiagonalLineInfo diagonalLineInfo=new DiagonalLineInfo();
  int diagonalWidth=PropertyUtil.getDimensionValue(cell,cell.getDiagonalWidth(),(int)cellWidth) / 1000;
  diagonalLineInfo.setDiagonalLine(cell.getDiagonalNumber(),cell.getDiagonalStyle(),diagonalWidth);
  int antidiagonalWidth=PropertyUtil.getDimensionValue(cell,cell.getAntidiagonalWidth(),(int)cellWidth) / 1000;
  diagonalLineInfo.setAntidiagonalLine(cell.getAntidiagonalNumber(),cell.getAntidiagonalStyle(),antidiagonalWidth);
  int cellHeight=WordUtil.convertTo(getCellHeight(cell),0) / 20;
  diagonalLineInfo.setCoordinateSize(cellWidth,cellHeight);
  String lineColor=WordUtil.parseColor(cell.getComputedStyle().getColor());
  diagonalLineInfo.setColor(lineColor);
  wordWriter.drawDiagonalLine(diagonalLineInfo);
}
Program: 69913
Project: 69913
Buggy source:
public ArrayList<Line> getDiagonalLine(){
  ArrayList<Line> diagonalLine=new ArrayList<Line>();
  int num=diagonalCount >> 1;
  double x=2d / (diagonalCount + 1) * width;
  double y=2d / (diagonalCount + 1) * height;
  if (diagonalCount % 2 == 1) {
    diagonalLine.add(new Line(coordoriginX,coordoriginY,coordoriginX + width,coordoriginY + height));
  }
  for (int i=1; i <= num; i++) {
    diagonalLine.add(new Line(coordoriginX + width - i * x,coordoriginY,coordoriginX + width,coordoriginY + height));
    diagonalLine.add(new Line(coordoriginX,coordoriginY + height - i * y,coordoriginX + width,coordoriginY + height));
  }
  return diagonalLine;
}

Fixed version (ground truth):
public ArrayList<Line> getDiagonalLine(){
  ArrayList<Line> diagonalLine=new ArrayList<Line>();
  int num=diagonalCount >> 1;
  double x=2d / (diagonalCount + 1) * width;
  double y=2d / (diagonalCount + 1) * height;
  if (diagonalCount % 2 == 1) {
    diagonalLine.add(new Line(coordoriginX - CELL_MARGIN_COMPENSATION,coordoriginY,coordoriginX + width - CELL_MARGIN_COMPENSATION,coordoriginY + height));
  }
  for (int i=1; i <= num; i++) {
    diagonalLine.add(new Line(coordoriginX + width - i * x - CELL_MARGIN_COMPENSATION,coordoriginY,coordoriginX + width - CELL_MARGIN_COMPENSATION,coordoriginY + height));
    diagonalLine.add(new Line(coordoriginX - CELL_MARGIN_COMPENSATION,coordoriginY + height - i * y,coordoriginX + width - CELL_MARGIN_COMPENSATION,coordoriginY + height));
  }
  return diagonalLine;
}
Program: 69914
Project: 69914
Buggy source:
public void setAntidiagonalLine(int antidiagonalCount,String antidiagonalStyle,DimensionType antidiagonalWidth){
  this.antiDiagonalCount=antidiagonalCount;
  this.antiDiagonalStyle=antidiagonalStyle;
  this.antiDiagonalWidth=antidiagonalWidth;
}

Fixed version (ground truth):
public void setAntidiagonalLine(int antidiagonalCount,String antidiagonalStyle,int antidiagonalWidth){
  this.antiDiagonalCount=antidiagonalCount;
  this.antiDiagonalStyle=antidiagonalStyle;
  this.antiDiagonalWidth=antidiagonalWidth;
}
Program: 69915
Project: 69915
Buggy source:
public double getAntiDiagonalLineWidth(){
  return WordUtil.convertTo(antiDiagonalWidth,0) / 20d;
}

Fixed version (ground truth):
public double getAntiDiagonalLineWidth(){
  return antiDiagonalWidth;
}
Program: 69916
Project: 69916
Buggy source:
public void setDiagonalLine(int diagonalCount,String diagonalStyle,DimensionType diagonalWidth){
  this.diagonalCount=diagonalCount;
  this.diagonalStyle=diagonalStyle;
  this.diagonalWidth=diagonalWidth;
}

Fixed version (ground truth):
public void setDiagonalLine(int diagonalCount,String diagonalStyle,int diagonalWidth){
  this.diagonalCount=diagonalCount;
  this.diagonalStyle=diagonalStyle;
  this.diagonalWidth=diagonalWidth;
}
Program: 69917
Project: 69917
Buggy source:
public ArrayList<Line> getAntidiagonalLine(){
  ArrayList<Line> antiDiagonalLine=new ArrayList<Line>();
  int num=antiDiagonalCount >> 1;
  double x=2d / (antiDiagonalCount + 1) * width;
  double y=2d / (antiDiagonalCount + 1) * height;
  if (antiDiagonalCount % 2 == 1) {
    antiDiagonalLine.add(new Line(coordoriginX,coordoriginY + height,coordoriginX + width,coordoriginY));
  }
  for (int i=1; i <= num; i++) {
    antiDiagonalLine.add(new Line(coordoriginX,coordoriginY + height,coordoriginX + i * x,coordoriginY));
    antiDiagonalLine.add(new Line(coordoriginX,coordoriginY + height,coordoriginX + width,coordoriginY + height - i * y));
  }
  return antiDiagonalLine;
}

Fixed version (ground truth):
public ArrayList<Line> getAntidiagonalLine(){
  ArrayList<Line> antiDiagonalLine=new ArrayList<Line>();
  int num=antiDiagonalCount >> 1;
  double x=2d / (antiDiagonalCount + 1) * width;
  double y=2d / (antiDiagonalCount + 1) * height;
  if (antiDiagonalCount % 2 == 1) {
    antiDiagonalLine.add(new Line(coordoriginX - CELL_MARGIN_COMPENSATION,coordoriginY + height,coordoriginX + width - CELL_MARGIN_COMPENSATION,coordoriginY));
  }
  for (int i=1; i <= num; i++) {
    antiDiagonalLine.add(new Line(coordoriginX - CELL_MARGIN_COMPENSATION,coordoriginY + height,coordoriginX + i * x - CELL_MARGIN_COMPENSATION,coordoriginY));
    antiDiagonalLine.add(new Line(coordoriginX - CELL_MARGIN_COMPENSATION,coordoriginY + height,coordoriginX + width - CELL_MARGIN_COMPENSATION,coordoriginY + height - i * y));
  }
  return antiDiagonalLine;
}
Program: 69918
Project: 69918
Buggy source:
public double getDiagonalLineWidth(){
  return WordUtil.convertTo(diagonalWidth,0) / 20d;
}

Fixed version (ground truth):
public double getDiagonalLineWidth(){
  return diagonalWidth;
}
Program: 69919
Project: 69919
Buggy source:
private void createExpressionCell(Composite parent,String label){
  ControlProvider.createLabel(parent,label);
  defaultValueComposite=ControlProvider.getDefaultComposite(parent);
  defaultValueString=Utility.getNonNullString(structureHandle.getDefaultValue());
  defaultValue=ControlProvider.createText(defaultValueComposite,defaultValueString);
  defaultValue.setLayoutData(ControlProvider.getGridDataWithHSpan(1));
  defaultValue.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (defaultValue.isEnabled()) {
        validateSyntax();
      }
    }
  }
);
  SelectionAdapter listener=new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      ExpressionBuilder expressionBuilder=new ExpressionBuilder(defaultValue.getText());
      expressionBuilder.setExpressionProvier(null);
      if (expressionBuilder.open() == OK) {
        defaultValue.setText(expressionBuilder.getResult().trim());
      }
    }
  }
;
  ControlProvider.createButton(defaultValueComposite,SWT.PUSH,listener);
}

Fixed version (ground truth):
private void createExpressionCell(Composite parent,String label){
  ControlProvider.createLabel(parent,label);
  defaultValueComposite=ControlProvider.getDefaultComposite(parent);
  defaultValueString=Utility.getNonNullString(structureHandle.getDefaultValue());
  defaultValue=ControlProvider.createText(defaultValueComposite,defaultValueString);
  defaultValue.setLayoutData(ControlProvider.getGridDataWithHSpan(1));
  defaultValue.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (defaultValue.isEnabled()) {
        validateSyntax();
      }
    }
  }
);
  SelectionAdapter listener=new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      ExpressionBuilder expressionBuilder=new ExpressionBuilder(defaultValue.getText());
      expressionBuilder.setExpressionProvier(null);
      if (expressionBuilder.open() == OK) {
        defaultValue.setText(expressionBuilder.getResult().trim());
      }
    }
  }
;
  ExpressionButton exprButton=createExpressionButton(defaultValueComposite);
  defaultValue.setData(DataUIConstants.EXPR_BUTTON,exprButton);
  ExpressionHandle expr=getExpressionHandle();
  defaultValue.setText(expr == null || expr.getExpression() == null ? "String_Node_Str" : (String)expr.getExpression());
  defaultValue.setData(DataUIConstants.EXPR_TYPE,expr == null || expr.getType() == null ? null : (String)expr.getType());
  ExpressionButton button=(ExpressionButton)defaultValue.getData(DataUIConstants.EXPR_BUTTON);
  if (button != null)   button.refresh();
}
Program: 69920
Project: 69920
Buggy source:
private Status updateStructureHandle(){
  try {
    structureHandle.setName(dataSetParamName.getText());
    structureHandle.setParameterDataType(ParameterPageUtil.getTypeName(dataType.getText()));
    setDirection(direction.getText());
    structureHandle.setDefaultValue(defaultValue.isEnabled() ? defaultValue.getText().trim() : defaultValueString);
    if (isOdaDataSetHandle)     ((OdaDataSetParameterHandle)structureHandle).setParamName(Utility.findIndex(linkToSalarParameter.getItems(),linkToSalarParameter.getText()) == 0 ? null : linkToSalarParameter.getText());
  }
 catch (  SemanticException e) {
    return getMiscStatus(IStatus.ERROR,Utility.getNonNullString(e.getMessage()));
  }
  return null;
}

Fixed version (ground truth):
private Status updateStructureHandle(){
  try {
    structureHandle.setName(dataSetParamName.getText());
    structureHandle.setParameterDataType(ParameterPageUtil.getTypeName(dataType.getText()));
    setDirection(direction.getText());
    structureHandle.setExpressionProperty(DataSetParameter.DEFAULT_VALUE_MEMBER,new Expression(defaultValue.isEnabled() ? defaultValue.getText().trim() : defaultValueString,(String)defaultValue.getData(DataUIConstants.EXPR_TYPE)));
    if (isOdaDataSetHandle)     ((OdaDataSetParameterHandle)structureHandle).setParamName(Utility.findIndex(linkToSalarParameter.getItems(),linkToSalarParameter.getText()) == 0 ? null : linkToSalarParameter.getText());
  }
 catch (  SemanticException e) {
    return getMiscStatus(IStatus.ERROR,Utility.getNonNullString(e.getMessage()));
  }
  return null;
}
Program: 69921
Project: 69921
Buggy source:
public boolean performOk(){
  for (int i=0; i < bindingName.size(); i++) {
    try {
      String value=null;
      if (((Text)propertyTextList.get(i)).isDisposed() || ((Text)propertyTextList.get(i)).getText() == null || ((Text)propertyTextList.get(i)).getText().trim().length() == 0)       value=null;
 else       value=((Text)propertyTextList.get(i)).getText().trim();
      if (ds instanceof DataSourceHandle)       ((DataSourceHandle)ds).setPropertyBinding((String)bindingName.get(i),value);
 else       if (ds instanceof DataSetHandle)       ((DataSetHandle)ds).setPropertyBinding((String)bindingName.get(i),value);
    }
 catch (    SemanticException e) {
      logger.log(Level.FINE,e.getMessage(),e);
    }
  }
  return super.performOk();
}

Fixed version (ground truth):
public boolean performOk(){
  for (int i=0; i < bindingName.size(); i++) {
    try {
      String value=null;
      Text propertyText=(Text)propertyTextList.get(i);
      if (propertyText.isDisposed() || propertyText.getText() == null || propertyText.getText().trim().length() == 0)       value=null;
 else       value=propertyText.getText().trim();
      Expression expr=new Expression(value,(String)propertyText.getData(DataUIConstants.EXPR_TYPE));
      if (ds instanceof DataSourceHandle)       ((DataSourceHandle)ds).setPropertyBinding((String)bindingName.get(i),value);
 else       if (ds instanceof DataSetHandle)       ((DataSetHandle)ds).setPropertyBinding((String)bindingName.get(i),expr);
    }
 catch (    SemanticException e) {
      logger.log(Level.FINE,e.getMessage(),e);
    }
  }
  return super.performOk();
}
Program: 69923
Project: 69923
Buggy source:
/** 
 * clear the property binding in dataset to disable it when run the query
 * @param dsHandle
 * @param dataSetMap
 * @param dataSourceMap
 * @throws SemanticException
 */
public static void clearPropertyBindingMap(DataSetHandle dsHandle,Map dataSetMap,Map dataSourceMap) throws SemanticException {
  if (dsHandle.getExtends() != null) {
    return;
  }
  if (dsHandle instanceof JointDataSetHandle) {
    Iterator iter=((JointDataSetHandle)dsHandle).dataSetsIterator();
    while (iter.hasNext()) {
      DataSetHandle ds=(DataSetHandle)iter.next();
      if (dsHandle != null) {
        clearPropertyBindingMap(ds,dataSetMap,dataSourceMap);
      }
    }
  }
 else   if (dsHandle instanceof OdaDataSetHandle) {
    List dataSetBindingList=dsHandle.getPropertyBindings();
    List dataSourceBindingList=dsHandle.getDataSource().getPropertyBindings();
    if (!dataSetBindingList.isEmpty())     dataSetMap.put(dsHandle.getName(),dataSetBindingList);
    if (!dataSourceBindingList.isEmpty())     dataSourceMap.put(dsHandle.getDataSource().getName(),dataSourceBindingList);
    for (int i=0; i < dataSetBindingList.size(); i++) {
      PropertyBinding binding=(PropertyBinding)dataSetBindingList.get(i);
      dsHandle.setPropertyBinding(binding.getName(),null);
    }
    for (int i=0; i < dataSourceBindingList.size(); i++) {
      PropertyBinding binding=(PropertyBinding)dataSourceBindingList.get(i);
      dsHandle.getDataSource().setPropertyBinding(binding.getName(),null);
    }
  }
}

Fixed version (ground truth):
/** 
 * clear the property binding in dataset to disable it when run the query
 * @param dsHandle
 * @param dataSetMap
 * @param dataSourceMap
 * @throws SemanticException
 */
public static void clearPropertyBindingMap(DataSetHandle dsHandle,Map dataSetMap,Map dataSourceMap) throws SemanticException {
  if (dsHandle.getExtends() != null) {
    return;
  }
  if (dsHandle instanceof JointDataSetHandle) {
    Iterator iter=((JointDataSetHandle)dsHandle).dataSetsIterator();
    while (iter.hasNext()) {
      DataSetHandle ds=(DataSetHandle)iter.next();
      if (dsHandle != null) {
        clearPropertyBindingMap(ds,dataSetMap,dataSourceMap);
      }
    }
  }
 else   if (dsHandle instanceof OdaDataSetHandle) {
    List dataSetBindingList=dsHandle.getPropertyBindings();
    List dataSourceBindingList=dsHandle.getDataSource().getPropertyBindings();
    if (!dataSetBindingList.isEmpty())     dataSetMap.put(dsHandle.getName(),dataSetBindingList);
    if (!dataSourceBindingList.isEmpty())     dataSourceMap.put(dsHandle.getDataSource().getName(),dataSourceBindingList);
    for (int i=0; i < dataSetBindingList.size(); i++) {
      PropertyBinding binding=(PropertyBinding)dataSetBindingList.get(i);
      dsHandle.setPropertyBinding(binding.getName(),"String_Node_Str");
    }
    for (int i=0; i < dataSourceBindingList.size(); i++) {
      PropertyBinding binding=(PropertyBinding)dataSourceBindingList.get(i);
      dsHandle.getDataSource().setPropertyBinding(binding.getName(),"String_Node_Str");
    }
  }
}
Program: 69924
Project: 69924
Buggy source:
/** 
 * reset the property binding in dataset.
 * @param dsHandle
 * @param dataSetMap
 * @param dataSourceMap
 * @throws SemanticException
 */
public static void resetPropertyBinding(DataSetHandle dsHandle,Map dataSetMap,Map dataSourceMap) throws SemanticException {
  if (dsHandle.getExtends() != null) {
    return;
  }
  if (dsHandle instanceof JointDataSetHandle) {
    Iterator iter=((JointDataSetHandle)dsHandle).dataSetsIterator();
    while (iter.hasNext()) {
      DataSetHandle ds=(DataSetHandle)iter.next();
      if (dsHandle != null) {
        resetPropertyBinding(ds,dataSetMap,dataSourceMap);
      }
    }
  }
 else {
    if (dsHandle instanceof OdaDataSetHandle) {
      if (dataSetMap.get(dsHandle.getName()) != null) {
        List pList=(List)dataSetMap.get(dsHandle.getName());
        for (int i=0; i < pList.size(); i++) {
          PropertyBinding binding=(PropertyBinding)pList.get(i);
          dsHandle.setPropertyBinding(binding.getName(),binding.getValue());
        }
      }
      if (dataSourceMap.get(dsHandle.getDataSource().getName()) != null) {
        List pList=(List)dataSourceMap.get(dsHandle.getDataSource().getName());
        for (int i=0; i < pList.size(); i++) {
          PropertyBinding binding=(PropertyBinding)pList.get(i);
          dsHandle.getDataSource().setPropertyBinding(binding.getName(),binding.getValue());
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * reset the property binding in dataset.
 * @param dsHandle
 * @param dataSetMap
 * @param dataSourceMap
 * @throws SemanticException
 */
public static void resetPropertyBinding(DataSetHandle dsHandle,Map dataSetMap,Map dataSourceMap) throws SemanticException {
  if (dsHandle.getExtends() != null) {
    return;
  }
  if (dsHandle instanceof JointDataSetHandle) {
    Iterator iter=((JointDataSetHandle)dsHandle).dataSetsIterator();
    while (iter.hasNext()) {
      DataSetHandle ds=(DataSetHandle)iter.next();
      if (dsHandle != null) {
        resetPropertyBinding(ds,dataSetMap,dataSourceMap);
      }
    }
  }
 else {
    if (dsHandle instanceof OdaDataSetHandle) {
      if (dataSetMap.get(dsHandle.getName()) != null) {
        List pList=(List)dataSetMap.get(dsHandle.getName());
        for (int i=0; i < pList.size(); i++) {
          PropertyBinding binding=(PropertyBinding)pList.get(i);
          dsHandle.clearProperty(binding.getName());
        }
      }
      if (dataSourceMap.get(dsHandle.getDataSource().getName()) != null) {
        List pList=(List)dataSourceMap.get(dsHandle.getDataSource().getName());
        for (int i=0; i < pList.size(); i++) {
          PropertyBinding binding=(PropertyBinding)pList.get(i);
          dsHandle.getDataSource().clearProperty(binding.getName());
        }
      }
    }
  }
}
Program: 69925
Project: 69925
Buggy source:
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  ArrayList al=new ArrayList();
  al.addAll(series.getDataDefinition());
  for (int i=0; i < al.size(); i++) {
    Query query=(Query)al.get(i);
    DataType dataType=idsp.getDataType(query.getDefinition());
    if ((i != 2) && (dataType == DataType.TEXT_LITERAL || dataType == DataType.NUMERIC_LITERAL)) {
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,query.getDefinition());
    }
  }
}

Fixed version (ground truth):
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  ArrayList<Query> al=new ArrayList<Query>();
  al.addAll(series.getDataDefinition());
  for (int i=0; i < al.size(); i++) {
    Query query=al.get(i);
    DataType dataType=idsp.getDataType(query.getDefinition());
    if ((i != 2) && (dataType == DataType.TEXT_LITERAL || dataType == DataType.NUMERIC_LITERAL)) {
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,query.getDefinition());
    }
  }
}
Program: 69926
Project: 69926
Buggy source:
public void widgetSelected(SelectionEvent e){
  Object source=e.getSource();
  if (source == fCmbAggregate) {
    String aggFunc=((String[])fCmbAggregate.getData())[fCmbAggregate.getSelectionIndex()];
    showAggregateParameters(aggFunc);
    if (AGG_FUNC_NONE.equals(aggFunc)) {
      fGrouping.setEnabled(false);
      fGrouping.setAggregateExpression(null);
    }
 else {
      fGrouping.setEnabled(true);
      fGrouping.setAggregateExpression(aggFunc);
    }
  }
 else   if (isAggParametersWidget(source)) {
    setAggParameter((Text)source);
  }
 else   if (isBuilderBtnWidget(source)) {
    try {
      Text txtArg=fExprBuilderWidgetsMap.get(source);
      String sExpr=fChartContext.getUIServiceProvider().invoke(IUIServiceProvider.COMMAND_EXPRESSION_DATA_BINDINGS,txtArg.getText(),fChartContext.getExtendedItem(),fTitle);
      txtArg.setText(sExpr);
      setAggParameter(txtArg);
    }
 catch (    ChartException e1) {
      WizardBase.displayException(e1);
    }
  }
 else   if (source == fBtnOK) {
    if (query != null) {
      query.setGrouping(fGrouping);
      query.getGrouping().eAdapters().addAll(query.eAdapters());
    }
 else {
      fSeriesDefi.setGrouping(fGrouping);
      fSeriesDefi.getGrouping().eAdapters().addAll(fSeriesDefi.eAdapters());
    }
    ChartUIUtil.isValidAggregation(fChartContext,fGrouping,false);
    closeAggregateEditor(getShell());
  }
 else   if (source == fBtnCancel) {
    closeAggregateEditor(getShell());
  }
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  Object source=e.getSource();
  if (source == fCmbAggregate) {
    String aggFunc=((String[])fCmbAggregate.getData())[fCmbAggregate.getSelectionIndex()];
    showAggregateParameters(aggFunc);
    if (AGG_FUNC_NONE.equals(aggFunc)) {
      fGrouping.setEnabled(false);
      fGrouping.setAggregateExpression(null);
    }
 else {
      fGrouping.setEnabled(true);
      fGrouping.setAggregateExpression(aggFunc);
    }
  }
 else   if (isAggParametersWidget(source)) {
    setAggParameter((Text)source);
  }
 else   if (isBuilderBtnWidget(source)) {
    try {
      Text txtArg=fExprBuilderWidgetsMap.get(source);
      String sExpr=fChartContext.getUIServiceProvider().invoke(IUIServiceProvider.COMMAND_EXPRESSION_DATA_BINDINGS,txtArg.getText(),fChartContext.getExtendedItem(),fTitle);
      txtArg.setText(sExpr);
      setAggParameter(txtArg);
    }
 catch (    ChartException e1) {
      WizardBase.displayException(e1);
    }
  }
 else   if (source == fBtnOK) {
    if (query != null) {
      query.setGrouping(fGrouping);
      query.getGrouping().eAdapters().addAll(query.eAdapters());
    }
 else {
      fSeriesDefi.setGrouping(fGrouping);
      fSeriesDefi.getGrouping().eAdapters().addAll(fSeriesDefi.eAdapters());
    }
    ChartUIUtil.checkAggregateType(fChartContext);
    closeAggregateEditor(getShell());
  }
 else   if (source == fBtnCancel) {
    closeAggregateEditor(getShell());
  }
}
Program: 69927
Project: 69927
Buggy source:
/** 
 * Handle grouping/sorting action.
 */
protected void handleGroupAction(){
  SeriesDefinition sdBackup=seriesdefinition.copyInstance();
  GroupSortingDialog groupDialog=createGroupSortingDialog(sdBackup);
  if (groupDialog.open() == Window.OK) {
    if (!sdBackup.eIsSet(DataPackage.eINSTANCE.getSeriesDefinition_Sorting())) {
      seriesdefinition.eUnset(DataPackage.eINSTANCE.getSeriesDefinition_Sorting());
    }
 else {
      seriesdefinition.setSorting(sdBackup.getSorting());
    }
    seriesdefinition.setSortKey(sdBackup.getSortKey());
    seriesdefinition.getSortKey().eAdapters().addAll(seriesdefinition.eAdapters());
    seriesdefinition.setGrouping(sdBackup.getGrouping());
    seriesdefinition.getGrouping().eAdapters().addAll(seriesdefinition.eAdapters());
    ChartUIUtil.checkGroupType(context,context.getModel());
    ChartUIUtil.isValidAggregation(context,seriesdefinition.getGrouping(),true);
  }
}

Fixed version (ground truth):
/** 
 * Handle grouping/sorting action.
 */
protected void handleGroupAction(){
  SeriesDefinition sdBackup=seriesdefinition.copyInstance();
  GroupSortingDialog groupDialog=createGroupSortingDialog(sdBackup);
  if (groupDialog.open() == Window.OK) {
    if (!sdBackup.eIsSet(DataPackage.eINSTANCE.getSeriesDefinition_Sorting())) {
      seriesdefinition.eUnset(DataPackage.eINSTANCE.getSeriesDefinition_Sorting());
    }
 else {
      seriesdefinition.setSorting(sdBackup.getSorting());
    }
    seriesdefinition.setSortKey(sdBackup.getSortKey());
    seriesdefinition.getSortKey().eAdapters().addAll(seriesdefinition.eAdapters());
    seriesdefinition.setGrouping(sdBackup.getGrouping());
    seriesdefinition.getGrouping().eAdapters().addAll(seriesdefinition.eAdapters());
    ChartUIUtil.checkGroupType(context,context.getModel());
    ChartUIUtil.checkAggregateType(context);
  }
}
Program: 69929
Project: 69929
Buggy source:
/** 
 * Get the compatible axis type according to series type.
 * @param series
 * @return An array containing all possible axis types for the designated series.
 * @since 2.2
 */
public AxisType[] getCompatibleAxisType(Series series);

Fixed version (ground truth):
/** 
 * Get the compatible axis type according to series type.
 * @param series
 * @return An array containing all possible axis types for the designatedseries.
 * @since 2.2
 */
public AxisType[] getCompatibleAxisType(Series series);
Program: 69930
Project: 69930
Buggy source:
/** 
 * Check if default aggregation and value series aggregation are valid for Gantt chart and show warning message in UI.
 * @param context
 * @since 2.3
 */
public static void checkAggregateType(ChartWizardContext context){
  boolean isValidAgg=true;
  for (Iterator<SeriesDefinition> iter=ChartUIUtil.getOrthogonalSeriesDefinitions(context.getModel(),0).iterator(); iter.hasNext(); ) {
    if (!isValidAgg) {
      return;
    }
    SeriesDefinition orthSD=iter.next();
    if (orthSD.getGrouping() != null && orthSD.getGrouping().isEnabled()) {
      isValidAgg=isValidAggregation(context,orthSD.getGrouping(),false);
    }
  }
  if (isValidAgg) {
    SeriesDefinition baseSD=ChartUIUtil.getBaseSeriesDefinitions(context.getModel()).get(0);
    if (baseSD.getGrouping() != null && baseSD.getGrouping().isEnabled()) {
      isValidAggregation(context,baseSD.getGrouping(),true);
    }
  }
}

Fixed version (ground truth):
/** 
 * Check if default aggregation and value series aggregation are valid for Gantt chart and show warning message in UI.
 * @param context
 * @since 2.3
 */
public static void checkAggregateType(ChartWizardContext context){
  boolean isValid=true;
  SeriesDefinition baseSD=ChartUIUtil.getBaseSeriesDefinitions(context.getModel()).get(0);
  for (  SeriesDefinition orthSD : ChartUIUtil.getOrthogonalSeriesDefinitions(context.getModel(),0)) {
    if (!isValid) {
      return;
    }
    Series oSeries=orthSD.getDesignTimeSeries();
    isValid=getSeriesUIProvider(oSeries).isValidAggregationType(oSeries,orthSD,baseSD);
  }
}
Program: 69931
Project: 69931
Buggy source:
public SplitResult split(int height,boolean force) throws BirtException {
  SplitResult result=cell.split(height + delta,force);
  if (result.getResult() != null) {
    RowArea row=(RowArea)cell.getParent();
    row.replace(cell,(CellArea)result.getResult());
  }
  return result;
}

Fixed version (ground truth):
public SplitResult split(int height,boolean force) throws BirtException {
  SplitResult result=cell.split(height + delta,force);
  return result;
}
Program: 69932
Project: 69932
Buggy source:
protected void _splitSpanCell(int height,boolean force) throws BirtException {
  if (cells.length != children.size()) {
    for (int i=0; i < cells.length; i++) {
      if (cells[i] instanceof DummyCell) {
        int oh=((DummyCell)cells[i]).getCell().getHeight();
        int ch=((DummyCell)cells[i]).getDelta();
        int rowSpan=((DummyCell)cells[i]).getRowSpan();
        if (ch >= oh) {
          CellArea cell=cells[i].cloneArea();
          cell.setHeight(0);
          cell.setRowSpan(rowSpan);
          cell.setParent(this);
          addChildByColumnId(cell);
        }
 else {
          CellArea cell=cells[i].cloneArea();
          cell.setHeight(0);
          cell.setRowSpan(rowSpan);
          cell.setParent(this);
          addChildByColumnId(cell);
        }
        i=i + cells[i].getColSpan() - 1;
      }
    }
  }
}

Fixed version (ground truth):
protected void _splitSpanCell(int height,boolean force) throws BirtException {
  if (cells.length != children.size()) {
    for (int i=0; i < cells.length; i++) {
      if (cells[i] instanceof DummyCell) {
        int oh=((DummyCell)cells[i]).getCell().getHeight();
        int ch=((DummyCell)cells[i]).getDelta();
        int rowSpan=((DummyCell)cells[i]).getRowSpan();
        if (ch >= oh) {
          CellArea cell=cells[i].cloneArea();
          cell.setHeight(0);
          cell.setRowSpan(rowSpan);
          cell.setParent(this);
          addChildByColumnId(cell);
        }
 else {
          SplitResult splitCell=cells[i].split(height,force);
          CellArea cell=(CellArea)splitCell.getResult();
          if (cell != null) {
            CellArea oc=((DummyCell)cells[i]).getCell();
            ArrayList temp=cell.children;
            cell.children=oc.children;
            oc.children=temp;
            oc.updateChildrenPosition();
            cell.updateChildrenPosition();
            cell.setRowSpan(rowSpan);
            cell.setParent(this);
            addChildByColumnId(cell);
          }
 else {
            cell=cells[i].cloneArea();
            cell.setHeight(0);
            cell.setRowSpan(rowSpan);
            cell.setParent(this);
            addChildByColumnId(cell);
          }
        }
        i=i + cells[i].getColSpan() - 1;
      }
    }
  }
}
Program: 69933
Project: 69933
Buggy source:
public boolean next() throws BirtException {
  boolean hasNext=super.next();
  if (hasNext)   currRowIndex++;
  return hasNext;
}

Fixed version (ground truth):
public boolean next() throws BirtException {
  boolean hasNext=super.next();
  if (hasNext)   currRowIndex++;
 else   if (currRowIndex == -1) {
    this.cachedRowId=-1;
  }
  return hasNext;
}
Program: 69934
Project: 69934
Buggy source:
protected void writeText(int type,String txt,IContent content,InlineFlag inlineFlag,IStyle computedStyle,IStyle inlineStyle){
  HyperlinkInfo hyper=getHyperlink(content);
  if (content instanceof TextContent) {
    TextFlag textFlag=TextFlag.START;
    String fontFamily=null;
    if ("String_Node_Str".equals(txt)) {
      wordWriter.writeContent(type,txt,computedStyle,inlineStyle,fontFamily,hyper,inlineFlag,textFlag);
    }
 else {
      FontSplitter fontSplitter=getFontSplitter(content);
      while (fontSplitter.hasMore()) {
        Chunk ch=fontSplitter.getNext();
        int offset=ch.getOffset();
        int length=ch.getLength();
        fontFamily=getFontFamily(computedStyle,ch);
        wordWriter.writeContent(type,txt.substring(offset,offset + length),computedStyle,inlineStyle,fontFamily,hyper,inlineFlag,textFlag);
        textFlag=fontSplitter.hasMore() ? TextFlag.MIDDLE : TextFlag.END;
      }
    }
    if (inlineFlag == InlineFlag.BLOCK) {
      wordWriter.writeContent(type,null,computedStyle,inlineStyle,fontFamily,hyper,inlineFlag,TextFlag.END);
    }
  }
 else {
    wordWriter.writeContent(type,txt,computedStyle,inlineStyle,computedStyle.getFontFamily(),hyper,inlineFlag,TextFlag.WHOLE);
  }
}

Fixed version (ground truth):
protected void writeText(int type,String txt,IContent content,InlineFlag inlineFlag,IStyle computedStyle,IStyle inlineStyle){
  HyperlinkInfo hyper=getHyperlink(content);
  if (content instanceof TextContent) {
    TextFlag textFlag=TextFlag.START;
    String fontFamily=null;
    if ("String_Node_Str".equals(txt) || txt == null) {
      wordWriter.writeContent(type,txt,computedStyle,inlineStyle,fontFamily,hyper,inlineFlag,textFlag);
    }
 else {
      FontSplitter fontSplitter=getFontSplitter(content);
      while (fontSplitter.hasMore()) {
        Chunk ch=fontSplitter.getNext();
        int offset=ch.getOffset();
        int length=ch.getLength();
        fontFamily=getFontFamily(computedStyle,ch);
        wordWriter.writeContent(type,txt.substring(offset,offset + length),computedStyle,inlineStyle,fontFamily,hyper,inlineFlag,textFlag);
        textFlag=fontSplitter.hasMore() ? TextFlag.MIDDLE : TextFlag.END;
      }
    }
    if (inlineFlag == InlineFlag.BLOCK) {
      wordWriter.writeContent(type,null,computedStyle,inlineStyle,fontFamily,hyper,inlineFlag,TextFlag.END);
    }
  }
 else {
    wordWriter.writeContent(type,txt,computedStyle,inlineStyle,computedStyle.getFontFamily(),hyper,inlineFlag,TextFlag.WHOLE);
  }
}
Program: 69935
Project: 69935
Buggy source:
private String getFontFamily(IStyle c_style,Chunk ch){
  FontInfo info=ch.getFontInfo();
  return info.getFontName();
}

Fixed version (ground truth):
private String getFontFamily(IStyle c_style,Chunk ch){
  String fontFamily=null;
  FontInfo info=ch.getFontInfo();
  if (info != null) {
    fontFamily=info.getFontName();
  }
 else {
    fontFamily=c_style.getFontFamily();
  }
  return fontFamily;
}
Program: 69936
Project: 69936
Buggy source:
private Chunk processLineBreak(){
  Chunk lineBreakChunk=null;
  if (chunkText[currentPos] == '\n') {
    lineBreakChunk=Chunk.HARD_LINE_BREAK;
    lineBreakChunk.setText("String_Node_Str");
  }
 else   if (chunkText[currentPos] == '\r') {
    lineBreakChunk=Chunk.HARD_LINE_BREAK;
    if (currentPos + 1 < chunkText.length && chunkText[currentPos + 1] == '\n') {
      lineBreakChunk.setText("String_Node_Str");
    }
 else {
      lineBreakChunk.setText("String_Node_Str");
    }
  }
  if (lineBreakChunk != null) {
    return processLineBreak(lineBreakChunk);
  }
  return null;
}

Fixed version (ground truth):
private Chunk processLineBreak(){
  Chunk lineBreakChunk=null;
  if (chunkText[currentPos] == '\n') {
    lineBreakChunk=Chunk.HARD_LINE_BREAK;
    lineBreakChunk.setText("String_Node_Str");
    lineBreakChunk.setOffset(currentPos);
  }
 else   if (chunkText[currentPos] == '\r') {
    lineBreakChunk=Chunk.HARD_LINE_BREAK;
    lineBreakChunk.setOffset(currentPos);
    if (currentPos + 1 < chunkText.length && chunkText[currentPos + 1] == '\n') {
      lineBreakChunk.setText("String_Node_Str");
    }
 else {
      lineBreakChunk.setText("String_Node_Str");
    }
  }
  if (lineBreakChunk != null) {
    return processLineBreak(lineBreakChunk);
  }
  return null;
}
Program: 69938
Project: 69938
Buggy source:
public void run(){
  if (Policy.TRACING_ACTIONS) {
    System.out.println("String_Node_Str");
  }
  List existingCubes=getCubes();
  CommandStack stack=getActionStack();
  stack.startTrans("String_Node_Str");
  TabularCubeHandle newCube=DesignElementFactory.getInstance().newTabularCube(Messages.getString("String_Node_Str"));
  boolean isFailed=false;
  try {
    SessionHandleAdapter.getInstance().getReportDesignHandle().getCubes().add(newCube);
    CubeBuilder builder=new CubeBuilder(PlatformUI.getWorkbench().getDisplay().getActiveShell(),newCube);
    String wizardTitle=Messages.getString("String_Node_Str");
    builder.setTitle(wizardTitle);
    int result=builder.open();
    notifyResult(result == WizardDialog.OK);
    if (result != WizardDialog.OK) {
      stack.rollback();
      isFailed=true;
    }
  }
 catch (  Exception e) {
    stack.rollback();
    isFailed=true;
    ExceptionHandler.handle(e);
  }
  if (!isFailed)   stack.commit();
  List newCubes=getCubes();
  CubeHandle cube=findNewCube(existingCubes,newCubes);
  ReportRequest request=new ReportRequest(ReportRequest.CREATE_ELEMENT);
  List selectionObjects=new ArrayList();
  selectionObjects.add(cube);
  request.setSelectionObject(selectionObjects);
  SessionHandleAdapter.getInstance().getMediator().notifyRequest(request);
}

Fixed version (ground truth):
public void run(){
  if (Policy.TRACING_ACTIONS) {
    System.out.println("String_Node_Str");
  }
  if (SessionHandleAdapter.getInstance().getReportDesignHandle() == null) {
    return;
  }
  List existingCubes=getCubes();
  CommandStack stack=getActionStack();
  stack.startTrans("String_Node_Str");
  TabularCubeHandle newCube=DesignElementFactory.getInstance().newTabularCube(Messages.getString("String_Node_Str"));
  boolean isFailed=false;
  try {
    SessionHandleAdapter.getInstance().getReportDesignHandle().getCubes().add(newCube);
    CubeBuilder builder=new CubeBuilder(PlatformUI.getWorkbench().getDisplay().getActiveShell(),newCube);
    String wizardTitle=Messages.getString("String_Node_Str");
    builder.setTitle(wizardTitle);
    int result=builder.open();
    notifyResult(result == WizardDialog.OK);
    if (result != WizardDialog.OK) {
      stack.rollback();
      isFailed=true;
    }
  }
 catch (  Exception e) {
    stack.rollback();
    isFailed=true;
    ExceptionHandler.handle(e);
  }
  if (!isFailed)   stack.commit();
  List newCubes=getCubes();
  CubeHandle cube=findNewCube(existingCubes,newCubes);
  ReportRequest request=new ReportRequest(ReportRequest.CREATE_ELEMENT);
  List selectionObjects=new ArrayList();
  selectionObjects.add(cube);
  request.setSelectionObject(selectionObjects);
  SessionHandleAdapter.getInstance().getMediator().notifyRequest(request);
}