nus-yam/ex-repair huggingface dataset:
Program: 69084
Project: 69084
Buggy source:
public void startNode(Node node,HashMap cssStyles){
  String nodeName=node.getNodeName();
  HashMap cssStyle=(HashMap)cssStyles.get(node);
  writer.openTag(nodeName);
  NamedNodeMap attributes=node.getAttributes();
  if (attributes != null) {
    for (int i=0; i < attributes.getLength(); i++) {
      Node attribute=attributes.item(i);
      String attrName=attribute.getNodeName();
      String attrValue=attribute.getNodeValue();
      if (attrValue != null) {
        if ("String_Node_Str".equalsIgnoreCase(nodeName) && "String_Node_Str".equalsIgnoreCase(attrName)) {
          String attrValueTrue=handleStyleImage(attrValue);
          if (attrValueTrue != null) {
            attrValue=attrValueTrue;
          }
        }
        writer.attribute(attrName,attrValue);
      }
    }
  }
  if (cssStyle != null) {
    StringBuffer buffer=new StringBuffer();
    Iterator ite=cssStyle.entrySet().iterator();
    while (ite.hasNext()) {
      Map.Entry entry=(Map.Entry)ite.next();
      Object keyObj=entry.getKey();
      Object valueObj=entry.getValue();
      if (keyObj == null || valueObj == null) {
        continue;
      }
      String key=keyObj.toString();
      String value=valueObj.toString();
      buffer.append(key);
      buffer.append("String_Node_Str");
      if ("String_Node_Str".equalsIgnoreCase(key)) {
        String valueTrue=handleStyleImage(value,true);
        if (valueTrue != null) {
          value=valueTrue;
        }
        buffer.append("String_Node_Str");
        buffer.append(value);
        buffer.append("String_Node_Str");
      }
 else {
        buffer.append(value);
      }
      buffer.append("String_Node_Str");
    }
    if (buffer.length() != 0) {
      writer.attribute("String_Node_Str",buffer.toString());
    }
  }
}

Fixed version (ground truth):
public void startNode(Node node,HashMap<Element,StyleProperties> cssStyles){
  String nodeName=node.getNodeName();
  StyleProperties cssStyle=cssStyles.get(node);
  writer.openTag(nodeName);
  NamedNodeMap attributes=node.getAttributes();
  if (attributes != null) {
    for (int i=0; i < attributes.getLength(); i++) {
      Node attribute=attributes.item(i);
      String attrName=attribute.getNodeName();
      String attrValue=attribute.getNodeValue();
      if (attrValue != null) {
        if ("String_Node_Str".equalsIgnoreCase(nodeName) && "String_Node_Str".equalsIgnoreCase(attrName)) {
          String attrValueTrue=handleStyleImage(attrValue);
          if (attrValueTrue != null) {
            attrValue=attrValueTrue;
          }
        }
        writer.attribute(attrName,attrValue);
      }
    }
  }
  if (cssStyle != null) {
    StringBuffer buffer=new StringBuffer();
    cssStyle.toString(buffer);
    if (buffer.length() != 0) {
      writer.attribute("String_Node_Str",buffer.toString());
    }
  }
}
Program: 69085
Project: 69085
Buggy source:
/** 
 * Visits the children nodes of the specific node
 * @param visitor the ITextNodeVisitor instance
 * @param ele the specific node
 */
private void processNodes(Element ele,HashMap cssStyles){
  for (Node node=ele.getFirstChild(); node != null; node=node.getNextSibling()) {
    short nodeType=node.getNodeType();
    if (nodeType == Node.TEXT_NODE) {
      if (isScriptText(node)) {
        writer.cdata(node.getNodeValue());
      }
 else {
        writer.text(node.getNodeValue(),false);
      }
    }
 else     if (nodeType == Node.COMMENT_NODE) {
      writer.comment(node.getNodeValue());
    }
 else     if (nodeType == Node.ELEMENT_NODE) {
      if ("String_Node_Str".equalsIgnoreCase(node.getNodeName())) {
        boolean bImplicitCloseTag=writer.isImplicitCloseTag();
        writer.setImplicitCloseTag(true);
        startNode(node,cssStyles);
        processNodes((Element)node,cssStyles);
        endNode(node);
        writer.setImplicitCloseTag(bImplicitCloseTag);
      }
 else {
        startNode(node,cssStyles);
        processNodes((Element)node,cssStyles);
        endNode(node);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Visits the children nodes of the specific node
 * @param visitor the ITextNodeVisitor instance
 * @param ele the specific node
 */
private void processNodes(Element ele,HashMap<Element,StyleProperties> cssStyles){
  for (Node node=ele.getFirstChild(); node != null; node=node.getNextSibling()) {
    short nodeType=node.getNodeType();
    if (nodeType == Node.TEXT_NODE) {
      if (isScriptText(node)) {
        writer.cdata(node.getNodeValue());
      }
 else {
        writer.text(node.getNodeValue(),false);
      }
    }
 else     if (nodeType == Node.COMMENT_NODE) {
      writer.comment(node.getNodeValue());
    }
 else     if (nodeType == Node.ELEMENT_NODE) {
      if ("String_Node_Str".equalsIgnoreCase(node.getNodeName())) {
        boolean bImplicitCloseTag=writer.isImplicitCloseTag();
        writer.setImplicitCloseTag(true);
        startNode(node,cssStyles);
        processNodes((Element)node,cssStyles);
        endNode(node);
        writer.setImplicitCloseTag(bImplicitCloseTag);
      }
 else {
        startNode(node,cssStyles);
        processNodes((Element)node,cssStyles);
        endNode(node);
      }
    }
  }
}
Program: 69086
Project: 69086
Buggy source:
private void outputHtmlText(IForeignContent foreign){
  boolean bIndent=writer.isIndent();
  writer.setIndent(false);
  Object rawValue=foreign.getRawValue();
  String text=rawValue == null ? null : rawValue.toString();
  Document doc=new TextParser().parse(text,TextParser.TEXT_TYPE_HTML);
  ReportDesignHandle design=(ReportDesignHandle)runnable.getDesignHandle();
  HTMLProcessor htmlProcessor=new HTMLProcessor(design,reportContext.getAppContext());
  HashMap styleMap=new HashMap();
  Element body=null;
  if (doc != null) {
    NodeList bodys=doc.getElementsByTagName("String_Node_Str");
    if (bodys.getLength() > 0) {
      body=(Element)bodys.item(0);
    }
  }
  if (body != null) {
    htmlProcessor.execute(body,styleMap);
    processNodes(body,styleMap);
  }
  writer.setIndent(bIndent);
}

Fixed version (ground truth):
private void outputHtmlText(IForeignContent foreign){
  boolean bIndent=writer.isIndent();
  writer.setIndent(false);
  Object rawValue=foreign.getRawValue();
  String text=rawValue == null ? null : rawValue.toString();
  Document doc=new TextParser().parse(text,TextParser.TEXT_TYPE_HTML);
  ReportDesignHandle design=(ReportDesignHandle)runnable.getDesignHandle();
  HTMLStyleProcessor htmlProcessor=new HTMLStyleProcessor(design);
  HashMap<Element,StyleProperties> styleMap=new HashMap<Element,StyleProperties>();
  Element body=null;
  if (doc != null) {
    NodeList bodys=doc.getElementsByTagName("String_Node_Str");
    if (bodys.getLength() > 0) {
      body=(Element)bodys.item(0);
    }
  }
  if (body != null) {
    htmlProcessor.execute(body,styleMap,reportContext.getAppContext());
    processNodes(body,styleMap);
  }
  writer.setIndent(bIndent);
}
Program: 69089
Project: 69089
Buggy source:
private IDataElementComposite createDataElementComposite(Composite parent){
  Axis oAxis=getOppositeAxis();
  DataElement data=getAxisForProcessing().getOrigin().getValue();
  if (oAxis.getType().getValue() == AxisType.DATE_TIME && !(oAxis.isCategoryAxis())) {
    if (!(data instanceof DateTimeDataElement)) {
      data=DateTimeDataElementImpl.create(0);
    }
    return new DateTimeDataElementComposite(parent,SWT.BORDER,(DateTimeDataElement)data,false);
  }
  if (!(data instanceof NumberDataElement)) {
    data=NumberDataElementImpl.create(0);
  }
  return new NumberDataElementComposite(parent,(NumberDataElement)data);
}

Fixed version (ground truth):
private IDataElementComposite createDataElementComposite(Composite parent){
  Axis oAxis=getOppositeAxis();
  DataElement data=getAxisForProcessing().getOrigin().getValue();
  if (oAxis.getType().getValue() == AxisType.DATE_TIME && !(oAxis.isCategoryAxis())) {
    if (!(data instanceof DateTimeDataElement)) {
      data=DateTimeDataElementImpl.create(new CDateTime(1970,1,1,0,0,0));
    }
    return new DateTimeDataElementComposite(parent,SWT.BORDER,(DateTimeDataElement)data,false);
  }
  if (!(data instanceof NumberDataElement)) {
    data=NumberDataElementImpl.create(0);
  }
  return new NumberDataElementComposite(parent,(NumberDataElement)data);
}
Program: 69090
Project: 69090
Buggy source:
/** 
 * @param queryDefn
 * @param paramBindingIt
 * @param filterIt
 * @param bindingIt
 * @throws AdapterException 
 */
private void populateQueryDefn(IQueryDefinition queryDefn,Iterator paramBindingIt,Iterator filterIt,Iterator bindingIt,boolean disAllowAggregation) throws AdapterException {
  try {
    while (bindingIt != null && bindingIt.hasNext()) {
      IBinding binding=this.modelAdaptor.adaptBinding((ComputedColumnHandle)bindingIt.next());
      if (disAllowAggregation && binding.getAggrFunction() != null)       continue;
      queryDefn.addBinding(binding);
    }
    List parameterBindings=convertParamterBindings(paramBindingIt);
    if (parameterBindings != null)     queryDefn.getInputParamBindings().addAll(parameterBindings);
    List filters=convertFilters(filterIt);
    if (filters != null)     queryDefn.getFilters().addAll(filters);
  }
 catch (  DataException e) {
    throw new AdapterException(e.getLocalizedMessage(),e);
  }
}

Fixed version (ground truth):
/** 
 * @param queryDefn
 * @param paramBindingIt
 * @param filterIt
 * @param bindingIt
 * @throws AdapterException 
 */
private void populateQueryDefn(IQueryDefinition queryDefn,Iterator paramBindingIt,Iterator filterIt,Iterator bindingIt,boolean disAllowAggregation) throws AdapterException {
  try {
    while (bindingIt != null && bindingIt.hasNext()) {
      Object computedBinding=bindingIt.next();
      IBinding binding=null;
      if (computedBinding instanceof ComputedColumnHandle) {
        binding=this.modelAdaptor.adaptBinding((ComputedColumnHandle)computedBinding);
      }
 else       if (computedBinding instanceof org.eclipse.birt.report.model.api.elements.structures.ComputedColumn) {
        binding=adaptBinding((org.eclipse.birt.report.model.api.elements.structures.ComputedColumn)computedBinding);
      }
      if (binding == null || (disAllowAggregation && binding.getAggrFunction() != null))       continue;
      queryDefn.addBinding(binding);
    }
    List parameterBindings=convertParamterBindings(paramBindingIt);
    if (parameterBindings != null)     queryDefn.getInputParamBindings().addAll(parameterBindings);
    List filters=convertFilters(filterIt);
    if (filters != null)     queryDefn.getFilters().addAll(filters);
  }
 catch (  DataException e) {
    throw new AdapterException(e.getLocalizedMessage(),e);
  }
}
Program: 69091
Project: 69091
Buggy source:
private void update(Object structureOrHandle){
  if (structureOrHandle instanceof FilterCondition) {
    try {
      filters.addItem((FilterCondition)structureOrHandle);
      viewer.getViewer().refresh();
    }
 catch (    SemanticException e) {
      ExceptionHandler.handle(e);
    }
  }
 else {
    viewer.getViewer().update(structureOrHandle,null);
  }
}

Fixed version (ground truth):
private void update(Object structureOrHandle){
  if (structureOrHandle instanceof FilterCondition) {
    viewer.getViewer().refresh();
  }
 else {
    viewer.getViewer().update(structureOrHandle,null);
  }
}
Program: 69092
Project: 69092
Buggy source:
private void doEdit(Object structureOrHandle){
  FilterConditionBuilder dlg=new FilterConditionBuilder(structureOrHandle);
  dlg.setTitle(this.getTitle(structureOrHandle));
  dlg.setDataSetColumns(this.columnExpressions);
  dlg.setExpressionProvider((DesignElementHandle)getContainer().getModel());
  dlg.setBindingParams(((DataSetHandle)getContainer().getModel()).paramBindingsIterator());
  if (dlg.open() == Window.OK) {
    update(structureOrHandle);
  }
}

Fixed version (ground truth):
private void doEdit(Object structureOrHandle){
  FilterConditionBuilder dlg=new FilterConditionBuilder(((DataSetEditor)getContainer()).getShell(),this.getTitle(structureOrHandle),this.getTitle(structureOrHandle));
  dlg.setDataSetHandle((DataSetHandle)getContainer().getModel());
  dlg.setBindingParams(getParamBindingHandleArray());
  if (dlg.open() == Window.OK) {
    update(structureOrHandle);
  }
}
Program: 69093
Project: 69093
Buggy source:
public Control createContents(Composite parent){
  initColumnNames();
  viewer=new PropertyHandleTableViewer(parent,true,true,true);
  TableColumn column=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  column.setText(cellLabels[0]);
  column.setWidth(150);
  column=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  column.setText(cellLabels[1]);
  column.setWidth(100);
  column=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  column.setText(cellLabels[2]);
  column.setWidth(100);
  column=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  column.setText(cellLabels[3]);
  column.setWidth(100);
  initializeFilters();
  viewer.getViewer().setContentProvider(new IStructuredContentProvider(){
    public Object[] getElements(    Object inputElement){
      ArrayList filterList=new ArrayList(10);
      Iterator iter=filters.iterator();
      if (iter != null) {
        while (iter.hasNext()) {
          filterList.add(iter.next());
        }
      }
      return filterList.toArray();
    }
    public void dispose(){
    }
    public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
    }
  }
);
  viewer.getViewer().setLabelProvider(this);
  viewer.getViewer().setInput(filters);
  addListeners();
  setToolTips();
  return viewer.getControl();
}

Fixed version (ground truth):
public Control createContents(Composite parent){
  initColumnNames();
  viewer=new PropertyHandleTableViewer(parent,true,true,true);
  TableColumn column=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  column.setText(cellLabels[0]);
  column.setWidth(150);
  column=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  column.setText(cellLabels[1]);
  column.setWidth(100);
  column=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  column.setText(cellLabels[2]);
  column.setWidth(100);
  column=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  column.setText(cellLabels[3]);
  column.setWidth(100);
  initializeFilters();
  viewer.getViewer().setContentProvider(new IStructuredContentProvider(){
    public Object[] getElements(    Object inputElement){
      ArrayList filterList=new ArrayList(10);
      Iterator iter=filters.iterator();
      if (iter != null) {
        while (iter.hasNext()) {
          filterList.add(iter.next());
        }
      }
      return filterList.toArray();
    }
    public void dispose(){
    }
    public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
    }
  }
);
  viewer.getViewer().setLabelProvider(new FilterTableProvider());
  viewer.getViewer().setInput(filters);
  addListeners();
  setToolTips();
  return viewer.getControl();
}
Program: 69094
Project: 69094
Buggy source:
/** 
 * get the the filter 
 * @param filterCondition
 * @return
 */
private String getValue1String(FilterCondition filterCondition){
  if (DesignChoiceConstants.FILTER_OPERATOR_IN.equals(filterCondition.getOperator()) || DesignChoiceConstants.FILTER_OPERATOR_NOT_IN.equals(filterCondition.getOperator())) {
    List value1List=filterCondition.getValue1List();
    StringBuffer buf=new StringBuffer();
    for (Iterator i=value1List.iterator(); i.hasNext(); ) {
      String value=(String)i.next();
      buf.append(value + "String_Node_Str");
    }
    if (buf.length() > 1) {
      buf.delete(buf.length() - 2,buf.length());
    }
    return buf.toString();
  }
 else {
    return filterCondition.getValue1();
  }
}

Fixed version (ground truth):
/** 
 * get the the filter
 * @param filterCondition
 * @return
 */
private String getValue1String(FilterCondition filterCondition){
  if (DesignChoiceConstants.FILTER_OPERATOR_IN.equals(filterCondition.getOperator()) || DesignChoiceConstants.FILTER_OPERATOR_NOT_IN.equals(filterCondition.getOperator())) {
    List value1List=filterCondition.getValue1List();
    StringBuffer buf=new StringBuffer();
    for (Iterator i=value1List.iterator(); i.hasNext(); ) {
      String value=(String)i.next();
      buf.append(value + "String_Node_Str");
    }
    if (buf.length() > 1) {
      buf.delete(buf.length() - 2,buf.length());
    }
    return buf.toString();
  }
 else {
    return filterCondition.getValue1();
  }
}
Program: 69095
Project: 69095
Buggy source:
public void setApplicationClassLoader(ClassLoader loader){
  this.applicationClassLoader=loader;
  Collection<IScriptEngine> engineSet=engines.values();
  for (  IScriptEngine engine : engineSet) {
    engine.setApplicationClassLoader(loader);
  }
}

Fixed version (ground truth):
/** 
 * the user can only set the application class loader to the top most context.
 */
public void setApplicationClassLoader(ClassLoader loader){
  if (parent != null) {
    parent.setApplicationClassLoader(loader);
  }
 else {
    this.applicationClassLoader=loader;
    Collection<IScriptEngine> engineSet=engines.values();
    for (    IScriptEngine engine : engineSet) {
      engine.setApplicationClassLoader(loader);
    }
  }
}
Program: 69096
Project: 69096
Buggy source:
public ClassLoader getApplicationClassLoader(){
  return applicationClassLoader;
}

Fixed version (ground truth):
public ClassLoader getApplicationClassLoader(){
  if (parent != null) {
    return parent.getApplicationClassLoader();
  }
  return applicationClassLoader;
}
Program: 69097
Project: 69097
Buggy source:
private IScriptEngine createEngine(IScriptEngineFactory factory) throws BirtException {
  IScriptEngine scriptEngine=factory.createScriptEngine();
  scriptEngine.setLocale(locale);
  scriptEngine.setTimeZone(timeZone);
  scriptEngine.setApplicationClassLoader(applicationClassLoader);
  engines.put(factory.getScriptLanguage(),scriptEngine);
  return scriptEngine;
}

Fixed version (ground truth):
private IScriptEngine createEngine(IScriptEngineFactory factory) throws BirtException {
  IScriptEngine scriptEngine=factory.createScriptEngine();
  scriptEngine.setLocale(locale);
  scriptEngine.setTimeZone(timeZone);
  scriptEngine.setApplicationClassLoader(getApplicationClassLoader());
  engines.put(factory.getScriptLanguage(),scriptEngine);
  return scriptEngine;
}
Program: 69098
Project: 69098
Buggy source:
public SheetData[] next(){
  if (!hasNext()) {
    throw new NoSuchElementException();
  }
  SheetData[] rowDatas=new SheetData[columnIndexes.length];
  for (int i=0; i < columnIndexes.length; i++) {
    ArrayList<SheetData> columnData=columns.get(i);
    int cursor=columnIndexes[i];
    int size=columnData.size();
    for (int j=cursor; j < size; j++) {
      SheetData data=columnData.get(j);
      int dataRowIndex=data.getRowIndex();
      if (dataRowIndex == rowIndex) {
        rowDatas[i]=data;
        if (!rowIndex2Height.isEmpty() && rowIndex2Height.containsKey(rowIndex))         rowDatas[i].setRowHeight(rowIndex2Height.get(rowIndex));
        columnIndexes[i]=j + 1;
        break;
      }
 else       if (dataRowIndex > rowIndex) {
        columnIndexes[i]=j;
        break;
      }
    }
  }
  rowIndex++;
  return rowDatas;
}

Fixed version (ground truth):
public SheetData[] next(){
  if (!hasNext()) {
    throw new NoSuchElementException();
  }
  SheetData[] rowDatas=new SheetData[columnIndexes.length];
  for (int i=0; i < columnIndexes.length; i++) {
    ArrayList<SheetData> columnData=columns.get(i);
    int cursor=columnIndexes[i];
    int size=columnData.size();
    for (int j=cursor; j < size; j++) {
      SheetData data=columnData.get(j);
      int dataRowIndex=data.getRowIndex();
      if (dataRowIndex == rowIndex) {
        rowDatas[i]=data;
        columnIndexes[i]=j + 1;
        break;
      }
 else       if (dataRowIndex > rowIndex) {
        columnIndexes[i]=j;
        break;
      }
    }
  }
  rowIndex++;
  return rowDatas;
}
Program: 69099
Project: 69099
Buggy source:
public void setRowHeight(int rowIndex,double height){
  if (!rowIndex2Height.containsKey(rowIndex))   rowIndex2Height.put(rowIndex,height);
}

Fixed version (ground truth):
public void setRowHeight(int rowIndex,double height){
  if (!rowIndex2Height.containsKey(rowIndex) || height > rowIndex2Height.get(rowIndex))   rowIndex2Height.put(rowIndex,height);
}
Program: 69100
Project: 69100
Buggy source:
/** 
 * It is not going to get the coordinate, but the colId relative to this coordinate. Gets the colId of the given coordinate point
 * @param value	 the coordinate point
 * @return the colId
 */
public int getColumnIndexByCoordinate(int value){
  int index=columnCoordinates.indexOf(value);
  return (index == -1) ? -1 : index;
}

Fixed version (ground truth):
/** 
 * It is not going to get the coordinate, but the colId relative to this coordinate. Gets the colId of the given coordinate point
 * @param value	 the coordinate point
 * @return the colId
 */
public int getColumnIndexByCoordinate(int value){
  return columnCoordinates.indexOf(value);
}
Program: 69102
Project: 69102
Buggy source:
public RowData next(){
  SheetData[] row=rowIterator.next();
  List<SheetData> data=new ArrayList<SheetData>();
  int width=Math.min(row.length,maxCol - 1);
  double rowHeight=DEFAULT_ROW_HEIGHT;
  for (int i=0; i < width; i++) {
    SheetData d=row[i];
    if (d == null || d.isBlank()) {
      continue;
    }
    if (d.isProcessed()) {
      continue;
    }
    d.setProcessed(true);
    data.add(row[i]);
    double height=d.getRowHeight();
    rowHeight=height > rowHeight ? height : rowHeight;
  }
  SheetData[] rowdata=new SheetData[data.size()];
  data.toArray(rowdata);
  return new RowData(rowdata,rowHeight);
}

Fixed version (ground truth):
public RowData next(){
  SheetData[] row=rowIterator.next();
  List<SheetData> data=new ArrayList<SheetData>();
  int width=Math.min(row.length,maxCol - 1);
  int rowIndex=0;
  for (int i=0; i < width; i++) {
    SheetData d=row[i];
    if (d == null || d.isBlank()) {
      continue;
    }
    if (d.isProcessed()) {
      continue;
    }
    rowIndex=d.getRowIndex();
    d.setProcessed(true);
    data.add(row[i]);
  }
  SheetData[] rowdata=new SheetData[data.size()];
  double rowHeight=Math.max(DEFAULT_ROW_HEIGHT,cache.getRowHeight(rowIndex - 1));
  data.toArray(rowdata);
  return new RowData(rowdata,rowHeight);
}
Program: 69103
Project: 69103
Buggy source:
private SheetData getRealData(SheetData data){
  if (data.isBlank()) {
    return ((BlankData)data).getData();
  }
  return data;
}

Fixed version (ground truth):
private SheetData getRealData(SheetData data){
  while (data.isBlank()) {
    data=((BlankData)data).getData();
  }
  return data;
}
Program: 69104
Project: 69104
Buggy source:
private Data createData(Object text,StyleEntry s,int dataType,XlsContainer container,int rowSpanOfDesign){
  Data data=createData();
  data.setValue(text);
  data.setStyle(s);
  data.setDataType(dataType);
  data.setContainer(container);
  data.setRowSpanInDesign(rowSpanOfDesign);
  lastData=data;
  return data;
}

Fixed version (ground truth):
protected Data createData(Object text,StyleEntry s,int dataType,XlsContainer container,int rowSpanOfDesign){
  Data data=createData();
  data.setValue(text);
  data.setStyle(s);
  data.setDataType(dataType);
  data.setContainer(container);
  data.setRowSpanInDesign(rowSpanOfDesign);
  lastData=data;
  return data;
}
Program: 69105
Project: 69105
Buggy source:
protected void addData(SheetData data){
  XlsContainer container=getCurrentContainer();
  container.setEmpty(false);
  int col=axis.getColumnIndexByCoordinate(data.getSizeInfo().getStartCoordinate());
  if (col == -1 || col >= cache.getColumnCount())   return;
  int span=axis.getColumnIndexByCoordinate(data.getSizeInfo().getEndCoordinate()) - col;
  applyTopBorderStyle(data);
  outputDataIfBufferIsFull();
  updataRowIndex(data,container);
  addDatatoCache(col,data);
  for (int i=col + 1; i < col + span; i++) {
    BlankData blankData=new BlankData(data);
    addDatatoCache(i,blankData);
  }
  if (container instanceof XlsCell) {
    XlsCell cell=(XlsCell)container;
    data.setRowSpanInDesign(cell.getRowSpan() - 1);
  }
  lastData=data;
}

Fixed version (ground truth):
protected void addData(SheetData data){
  XlsContainer container=getCurrentContainer();
  container.setEmpty(false);
  int col=axis.getColumnIndexByCoordinate(data.getSizeInfo().getStartCoordinate());
  if (col == -1 || col >= cache.getColumnCount())   return;
  int span=axis.getColumnIndexByCoordinate(data.getSizeInfo().getEndCoordinate()) - col;
  applyTopBorderStyle(data);
  outputDataIfBufferIsFull();
  updataRowIndex(data,container);
  addDatatoCache(col,data);
  for (int i=col + 1; i < col + span; i++) {
    BlankData blankData=new BlankData(data);
    blankData.setType(Type.HORIZONTAL);
    addDatatoCache(i,blankData);
  }
  if (container instanceof XlsCell) {
    XlsCell cell=(XlsCell)container;
    data.setRowSpanInDesign(cell.getRowSpan() - 1);
  }
  lastData=data;
}
Program: 69106
Project: 69106
Buggy source:
public void complete(){
  engine.applyContainerBottomStyle(containers.get(0));
  Iterator<SheetData[]> iterator=cache.getRowIterator();
  while (iterator.hasNext()) {
    SheetData[] rowData=iterator.next();
    for (int j=0; j < rowData.length; j++) {
      SheetData data=rowData[j];
      if (data == null || data.isBlank()) {
        continue;
      }
      int styleid=engine.getStyleID(data.getStyle());
      data.setStyleId(styleid);
      ContainerSizeInfo rule=data.getSizeInfo();
      int start=axis.getColumnIndexByCoordinate(rule.getStartCoordinate()) + 1;
      int end=axis.getColumnIndexByCoordinate(rule.getEndCoordinate()) + 1;
      end=Math.min(end,maxCol);
      int scount=Math.max(0,end - start - 1);
      Span span=new Span(start,scount);
      data.setSpan(span);
      HyperlinkDef hyperLink=data.getHyperlinkDef();
      if (hyperLink != null) {
        if (hyperLink.getType() == IHyperlinkAction.ACTION_BOOKMARK) {
          setLinkedBookmark(data,hyperLink);
        }
      }
    }
  }
}

Fixed version (ground truth):
public void complete(){
  engine.applyContainerBottomStyle(containers.get(0));
  Iterator<SheetData[]> iterator=cache.getRowIterator();
  while (iterator.hasNext()) {
    SheetData[] rowData=iterator.next();
    for (int j=0; j < rowData.length; j++) {
      SheetData data=rowData[j];
      if (data == null || data.isBlank()) {
        continue;
      }
      int styleid=engine.getStyleID(data.getStyle());
      data.setStyleId(styleid);
      ContainerSizeInfo rule=data.getSizeInfo();
      int start=axis.getColumnIndexByCoordinate(rule.getStartCoordinate()) + 1;
      int end=axis.getColumnIndexByCoordinate(rule.getEndCoordinate()) + 1;
      end=Math.min(end,maxCol);
      int scount=Math.max(0,end - start - 1);
      Span span=new Span(start,scount);
      data.setSpan(span);
      HyperlinkDef hyperLink=data.getHyperlinkDef();
      if (hyperLink != null) {
        if (hyperLink.getType() == IHyperlinkAction.ACTION_BOOKMARK) {
          setLinkedBookmark(data,hyperLink);
        }
      }
    }
    calculateRowHeight(rowData);
  }
}
Program: 69108
Project: 69108
Buggy source:
/** 
 * Gets the aggregation function for the level view sub-total. If the level view is null or not define any sub-total, return null.
 * @param measureView
 * @param function
 * @return
 * @throws SemanticException
 */
public void setAggregationFunction(MeasureViewHandle measureView,String function) throws SemanticException {
  if (focus.getAggregationHeader() == null || focus.getCubeLevelName() == null || focus.getCubeLevelName().length() <= 0 || measureView == null)   return;
  if (crosstab == null || crosstab != measureView.getCrosstab())   return;
  String levelName=focus.getCubeLevelName();
  int axisType=focus.getAxisType();
  String propName=CrosstabModelUtil.getAggregationOnPropName(axisType);
  CommandStack stack=crosstab.getCommandStack();
  stack.startTrans(Messages.getString("String_Node_Str"));
  try {
    for (int j=0; j < measureView.getAggregationCount(); j++) {
      AggregationCellHandle cell=measureView.getAggregationCell(j);
      if (levelName.equals(cell.getModelHandle().getStringProperty(propName))) {
        CrosstabModelUtil.setAggregationFunction(crosstab,cell,function);
      }
    }
  }
 catch (  SemanticException e) {
    stack.rollback();
    throw e;
  }
  stack.commit();
}

Fixed version (ground truth):
/** 
 * Gets the aggregation function for the level view sub-total. If the level view is null or not define any sub-total, return null.
 * @param measureView
 * @param function
 * @return
 * @throws SemanticException
 */
public void setAggregationFunction(MeasureViewHandle measureView,String function) throws SemanticException {
  if (focus.getAggregationHeader() == null || focus.getCubeLevelName() == null || focus.getCubeLevelName().length() <= 0 || measureView == null)   return;
  if (crosstab == null || crosstab != measureView.getCrosstab()) {
    return;
  }
  String levelName=focus.getCubeLevelName();
  int axisType=focus.getAxisType();
  String propName=CrosstabModelUtil.getAggregationOnPropName(axisType);
  CommandStack stack=crosstab.getCommandStack();
  stack.startTrans(Messages.getString("String_Node_Str"));
  try {
    for (int j=0; j < measureView.getAggregationCount(); j++) {
      AggregationCellHandle cell=measureView.getAggregationCell(j);
      if (levelName.equals(cell.getModelHandle().getStringProperty(propName))) {
        CrosstabModelUtil.setAggregationFunction(crosstab,cell,function);
      }
    }
  }
 catch (  SemanticException e) {
    stack.rollback();
    throw e;
  }
  stack.commit();
}
Program: 69110
Project: 69110
Buggy source:
private void addContainer(XlsContainer child){
  XlsContainer parent=child.getParent();
  if (parent != null) {
    parent.setEmpty(false);
  }
  containers.push(child);
}

Fixed version (ground truth):
private void addContainer(XlsContainer child){
  XlsContainer parent=child.getParent();
  if (parent instanceof XlsCell) {
    addEmptyDataToContainer(child,parent);
  }
  if (parent != null) {
    parent.setEmpty(false);
  }
  containers.push(child);
}
Program: 69111
Project: 69111
Buggy source:
/** 
 * Constructor of the class.
 * @param chartTypePrefix the prefix string of chart type.
 * @param typeLiteral comment for type literal.
 * @param riserType riser type of bar series.
 */
public AbstractBarChart(String chartTypePrefix,String typeLiteral,RiserType riserType){
  fsChartTypePrefix=chartTypePrefix;
  fsTypeLiteral=typeLiteral;
  foRiserType=riserType;
}

Fixed version (ground truth):
/** 
 * Constructor of the class.
 * @param chartTypePrefix the prefix string of chart type.
 * @param typeLiteral comment for type literal.
 * @param riserType riser type of bar series.
 */
public AbstractBarChart(String chartTypePrefix,String typeLiteral,RiserType riserType){
  fsChartTypePrefix=chartTypePrefix;
  fsTypeLiteral=typeLiteral;
  foRiserType=riserType;
  super.chartTitle=Messages.getString(fsChartTypePrefix + "String_Node_Str" + fsChartTypePrefix+ "String_Node_Str");
}
Program: 69115
Project: 69115
Buggy source:
public AreaChart(){
  imgIcon=UIHelper.getImage("String_Node_Str");
}

Fixed version (ground truth):
public AreaChart(){
  imgIcon=UIHelper.getImage("String_Node_Str");
  super.chartTitle=Messages.getString("String_Node_Str");
}
Program: 69118
Project: 69118
Buggy source:
public BubbleChart(){
  imgIcon=UIHelper.getImage("String_Node_Str");
}

Fixed version (ground truth):
public BubbleChart(){
  imgIcon=UIHelper.getImage("String_Node_Str");
  super.chartTitle=Messages.getString("String_Node_Str");
}
Program: 69121
Project: 69121
Buggy source:
public DifferenceChart(){
  imgIcon=UIHelper.getImage("String_Node_Str");
}

Fixed version (ground truth):
public DifferenceChart(){
  imgIcon=UIHelper.getImage("String_Node_Str");
  super.chartTitle=Messages.getString("String_Node_Str");
}
Program: 69122
Project: 69122
Buggy source:
public static void showException(String key,String errorMessage){
  if (errorMessage != null) {
    WizardBase.showException(errorMessage);
    errors.put(key,errorMessage);
  }
}

Fixed version (ground truth):
public static void showException(String key,String errorMessage){
  if (errorMessage != null) {
    try {
      WizardBase.showException(errorMessage);
    }
 catch (    Exception e) {
    }
    errors.put(key,errorMessage);
  }
}
Program: 69123
Project: 69123
Buggy source:
public static void removeException(String key){
  boolean removed=false;
  String error=errors.get(key);
  if (error != null && error.equals(WizardBase.getErrors())) {
    WizardBase.removeException();
    removed=true;
  }
  errors.remove(key);
  if ((removed || WizardBase.getErrors() == null) && errors.size() > 0) {
    String es=errors.values().toArray(new String[errors.size()])[0];
    WizardBase.showException(es);
  }
}

Fixed version (ground truth):
public static void removeException(String key){
  boolean removed=false;
  String error=errors.get(key);
  if (error != null && error.equals(WizardBase.getErrors())) {
    try {
      WizardBase.removeException();
    }
 catch (    Exception e) {
    }
    removed=true;
  }
  errors.remove(key);
  if ((removed || WizardBase.getErrors() == null) && errors.size() > 0) {
    String es=errors.values().toArray(new String[errors.size()])[0];
    WizardBase.showException(es);
  }
}
Program: 69124
Project: 69124
Buggy source:
public IWizardContext open(String[] sTasks,String topTaskId,IWizardContext initialContext){
  errors.clear();
  Chart chart=getChartModel(initialContext);
  if (chart == null) {
    setTitle(getTitleNewChart());
  }
 else {
    setTitle(getTitleEditChart());
    getAdaptableObject(initialContext).eAdapters().add(adapter);
  }
  if (chart == null) {
    topTaskId=null;
  }
 else   if (topTaskId == null) {
    topTaskId=lastTask.get(initialContext.getWizardID());
  }
  return super.open(sTasks,topTaskId,initialContext);
}

Fixed version (ground truth):
public IWizardContext open(String[] sTasks,String topTaskId,IWizardContext initialContext){
  Chart chart=getChartModel(initialContext);
  if (chart == null) {
    setTitle(getTitleNewChart());
  }
 else {
    setTitle(getTitleEditChart());
    getAdaptableObject(initialContext).eAdapters().add(adapter);
  }
  if (chart == null) {
    topTaskId=null;
  }
 else   if (topTaskId == null) {
    topTaskId=lastTask.get(initialContext.getWizardID());
  }
  return super.open(sTasks,topTaskId,initialContext);
}
Program: 69125
Project: 69125
Buggy source:
private BaseFont createBaseFont(String physicalFont){
  BaseFont font=(BaseFont)fonts.get(physicalFont);
  if (font == null) {
    font=fontManager.createFont(physicalFont,fontStyle);
    if (font != null) {
      fonts.put(physicalFont,font);
    }
  }
  return font;
}

Fixed version (ground truth):
private BaseFont createBaseFont(String physicalFont){
  BaseFont font=(BaseFont)fonts.get(physicalFont);
  if (font == null) {
    font=fontManager.createFont(physicalFont,fontStyle);
    fonts.put(physicalFont,font);
  }
  return font;
}
Program: 69128
Project: 69128
Buggy source:
/** 
 * Gets models of selected elements
 * @return
 */
protected List getElementHandles(){
  boolean isEditPart=false;
  List selList=null;
  IEvaluationContext context=(IEvaluationContext)event.getApplicationContext();
  Object obj=context.getVariable(ICommandParameterNameContants.SELECTION);
  if (obj != null) {
    selList=new ArrayList();
    selList.add(obj);
  }
  if (selList == null || selList.size() < 1) {
    selList=getSelectedObjects();
  }
  for (int i=0; i < selList.size(); i++) {
    if (selList.get(i) instanceof ReportElementEditPart) {
      isEditPart=true;
    }
  }
  if (isEditPart) {
    selList=InsertInLayoutUtil.editPart2Model(TableUtil.filletCellInSelectionEditorpart(getSelection())).toList();
  }
  return selList;
}

Fixed version (ground truth):
/** 
 * Gets models of selected elements
 * @return
 */
protected List getElementHandles(){
  boolean isEditPart=false;
  List selList=null;
  IEvaluationContext context=(IEvaluationContext)event.getApplicationContext();
  Object obj=context.getVariable(ICommandParameterNameContants.SELECTION);
  if (obj != null) {
    selList=new ArrayList();
    selList.add(obj);
  }
  if (selList == null || selList.size() < 1) {
    selList=getSelectedObjects();
  }
  for (int i=0; i < selList.size(); i++) {
    if (selList.get(i) instanceof ReportElementEditPart) {
      isEditPart=true;
    }
  }
  if (isEditPart) {
    selList=DNDUtil.unwrapToModel(InsertInLayoutUtil.editPart2Model(TableUtil.filletCellInSelectionEditorpart(getSelection())).toList());
  }
  return selList;
}
Program: 69129
Project: 69129
Buggy source:
private StyleHandle getStyleHandle(){
  IStructuredSelection selection=InsertInLayoutUtil.editPart2Model(getSelection());
  if (!selection.isEmpty() && selection.getFirstElement() instanceof DesignElementHandle) {
    if (selection.getFirstElement() instanceof RowHandle || selection.getFirstElement() instanceof ColumnHandle) {
      selection=InsertInLayoutUtil.editPart2Model(TableUtil.filletCellInSelectionEditorpart(getSelection()));
    }
    SharedStyleHandle style=((DesignElementHandle)selection.getFirstElement()).getStyle();
    for (Iterator iterator=selection.iterator(); iterator.hasNext(); ) {
      Object obj=iterator.next();
      if (!(obj instanceof DesignElementHandle)) {
        return null;
      }
      if (((DesignElementHandle)obj).getStyle() != style) {
        return null;
      }
    }
    return style;
  }
  return null;
}

Fixed version (ground truth):
private StyleHandle getStyleHandle(){
  IStructuredSelection selection=InsertInLayoutUtil.editPart2Model(getSelection());
  if (!selection.isEmpty()) {
    Object firstElement=DNDUtil.unwrapToModel(selection.getFirstElement());
    if (firstElement instanceof DesignElementHandle) {
      if (firstElement instanceof RowHandle || firstElement instanceof ColumnHandle) {
        selection=InsertInLayoutUtil.editPart2Model(TableUtil.filletCellInSelectionEditorpart(getSelection()));
      }
      List modelList=DNDUtil.unwrapToModel(selection.toList());
      SharedStyleHandle style=((DesignElementHandle)firstElement).getStyle();
      for (Iterator iterator=modelList.iterator(); iterator.hasNext(); ) {
        Object obj=iterator.next();
        if (!(obj instanceof DesignElementHandle)) {
          return null;
        }
        if (((DesignElementHandle)obj).getStyle() != style) {
          return null;
        }
      }
      return style;
    }
  }
  return null;
}
Program: 69131
Project: 69131
Buggy source:
/** 
 * Unwraps the object to model
 * @param obj object which may be wrapped, such as <code>ReportElementModel</code>, <code>ListBandProxy</code>
 * @return model object
 */
public static Object unwrapToModel(Object obj){
  if (obj instanceof ListBandProxy) {
    return ((ListBandProxy)obj).getSlotHandle();
  }
  if (obj instanceof IAdaptable) {
    return ((IAdaptable)obj).getAdapter(DesignElementHandle.class);
  }
  return obj;
}

Fixed version (ground truth):
/** 
 * Unwrap a list of objects to model objects.
 * @param objs
 * @return
 */
public static List unwrapToModel(List objs){
  if (objs == null || objs.size() == 0) {
    return objs;
  }
  List<Object> unwrapped=new ArrayList<Object>(objs.size());
  for (int i=0; i < objs.size(); i++) {
    unwrapped.add(unwrapToModel(objs.get(i)));
  }
  return unwrapped;
}
Program: 69133
Project: 69133
Buggy source:
/** 
 * Error processor, shows the Error message.
 * @param shell the parent window.
 * @param e Exception object.
 */
public static void processError(Shell shell,Exception e){
  ExceptionHandler.handle(e);
}

Fixed version (ground truth):
/** 
 * Error processor, shows the Error message.
 * @param shell the parent window.
 * @param e Exception object.
 * @deprecated use {@link ExceptionUtil#handle(Throwable)} instead.
 */
public static void processError(Shell shell,Exception e){
  ExceptionHandler.handle(e);
}
Program: 69134
Project: 69134
Buggy source:
/** 
 * Gets models of selected elements
 */
protected List getElementHandles(){
  if (selectionHandles == null) {
    selectionHandles=InsertInLayoutUtil.editPart2Model(TableUtil.filletCellInSelectionEditorpart(getSelection())).toList();
  }
  return selectionHandles;
}

Fixed version (ground truth):
/** 
 * Gets models of selected elements
 */
protected List getElementHandles(){
  if (selectionHandles == null) {
    selectionHandles=DNDUtil.unwrapToModel(InsertInLayoutUtil.editPart2Model(TableUtil.filletCellInSelectionEditorpart(getSelection())).toList());
  }
  return selectionHandles;
}
Program: 69135
Project: 69135
Buggy source:
/** 
 * Error processor, shows the Error message.
 * @param shell the parent window.
 * @param e Exception object.
 */
public static void processError(Exception e){
  ExceptionHandler.handle(e);
}

Fixed version (ground truth):
/** 
 * Error processor, shows the Error message.
 * @param shell the parent window.
 * @param e Exception object.
 * @deprecated use {@link ExceptionUtil#handle(Throwable)} instead.
 */
public static void processError(Exception e){
  ExceptionHandler.handle(e);
}
Program: 69136
Project: 69136
Buggy source:
private void changeOverlaySeriesType(){
  if (getCurrentChartType().canCombine()) {
    ChartCacheManager.getInstance().cacheSeriesType(cbSeriesType.getText());
  }
  try {
    Axis XAxis=((ChartWithAxes)chartModel).getAxes().get(0);
    int iSeriesDefinitionIndex=0 + (XAxis.getAssociatedAxes().get(0)).getSeriesDefinitions().size();
    int iOverlaySeriesCount=(XAxis.getAssociatedAxes().get(1)).getSeriesDefinitions().size();
    ChartAdapter.beginIgnoreNotifications();
    for (int i=0; i < iOverlaySeriesCount; i++) {
      Series lastSeries=((XAxis.getAssociatedAxes().get(1)).getSeriesDefinitions().get(i)).getDesignTimeSeries();
      if (!lastSeries.getDisplayName().equals(cbSeriesType.getText())) {
        Series newSeries=htSeriesNames.get(cbSeriesType.getText()).copyInstance();
        newSeries.translateFrom(lastSeries,iSeriesDefinitionIndex,chartModel);
        newSeries.eAdapters().addAll(chartModel.eAdapters());
        ((XAxis.getAssociatedAxes().get(1)).getSeriesDefinitions().get(i)).getSeries().clear();
        ((XAxis.getAssociatedAxes().get(1)).getSeriesDefinitions().get(i)).getSeries().add(newSeries);
        ChartUIUtil.setSeriesName(chartModel);
      }
    }
    ChartWizard.removeException(ChartWizard.TaskSelType_chOvST_ID);
  }
 catch (  Exception e) {
    ChartWizard.showException(ChartWizard.TaskSelType_chOvST_ID,e.getLocalizedMessage());
  }
 finally {
    ChartAdapter.endIgnoreNotifications();
  }
}

Fixed version (ground truth):
private void changeOverlaySeriesType(){
  if (getCurrentChartType().canCombine()) {
    ChartCacheManager.getInstance().cacheSeriesType(cbSeriesType.getText());
  }
  try {
    Axis XAxis=((ChartWithAxes)chartModel).getAxes().get(0);
    int iSeriesDefinitionIndex=(XAxis.getAssociatedAxes().get(0)).getSeriesDefinitions().size();
    int iOverlaySeriesCount=(XAxis.getAssociatedAxes().get(1)).getSeriesDefinitions().size();
    ChartAdapter.beginIgnoreNotifications();
    for (int i=0; i < iOverlaySeriesCount; i++) {
      Series lastSeries=((XAxis.getAssociatedAxes().get(1)).getSeriesDefinitions().get(i)).getDesignTimeSeries();
      if (!lastSeries.getDisplayName().equals(cbSeriesType.getText())) {
        String name=htSeriesNames.get(cbSeriesType.getText()).getClass().getName();
        Series newSeries=ChartCacheManager.getInstance().findSeries(name,iSeriesDefinitionIndex + i);
        if (newSeries == null) {
          newSeries=htSeriesNames.get(cbSeriesType.getText()).copyInstance();
          newSeries.translateFrom(lastSeries,iSeriesDefinitionIndex,chartModel);
        }
        newSeries.eAdapters().addAll(chartModel.eAdapters());
        ((XAxis.getAssociatedAxes().get(1)).getSeriesDefinitions().get(i)).getSeries().clear();
        ((XAxis.getAssociatedAxes().get(1)).getSeriesDefinitions().get(i)).getSeries().add(newSeries);
        ChartUIUtil.setSeriesName(chartModel);
      }
    }
    ChartWizard.removeException(ChartWizard.TaskSelType_chOvST_ID);
  }
 catch (  Exception e) {
    ChartWizard.showException(ChartWizard.TaskSelType_chOvST_ID,e.getLocalizedMessage());
  }
 finally {
    ChartAdapter.endIgnoreNotifications();
  }
}
Program: 69138
Project: 69138
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());
      }
    }
  }
;
  ExpressionProvider provider=new ExpressionProvider((DataSetHandle)getContainer().getModel());
  ExpressionButtonUtil.createExpressionButton(defaultValueComposite,defaultValue,provider,true,SWT.PUSH);
  ExpressionButtonUtil.initExpressionButtonControl(defaultValue,structureHandle,DataSetParameter.DEFAULT_VALUE_MEMBER);
}

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());
      }
    }
  }
;
  ExpressionProvider provider=new ExpressionProvider((DataSetHandle)getContainer().getModel());
  ExpressionButtonUtil.createExpressionButton(defaultValueComposite,defaultValue,provider,(DataSetHandle)getContainer().getModel(),true,SWT.PUSH);
  ExpressionButtonUtil.initExpressionButtonControl(defaultValue,structureHandle,DataSetParameter.DEFAULT_VALUE_MEMBER);
}
Program: 69139
Project: 69139
Buggy source:
private void createExpressionButton(Composite composite,final Text property,String propName){
  ExpressionButton exprButton=ExpressionButtonUtil.createExpressionButton(composite,property,new ExpressionProvider(handle),true,SWT.PUSH);
  if (PASSWORD.equals(propName)) {
    exprButton.setExpressionButtonProvider(new ExprButtonProvider(true,property));
  }
  Expression expr=handle.getPropertyBindingExpression(propName);
  property.setData(ExpressionButtonUtil.EXPR_TYPE,expr == null || expr.getType() == null ? UIUtil.getDefaultScriptType() : (String)expr.getType());
  property.setText((expr == null || expr.getStringExpression() == null) ? "String_Node_Str" : expr.getStringExpression());
  exprButton.refresh();
}

Fixed version (ground truth):
private void createExpressionButton(Composite composite,final Text property,String propName){
  ExpressionButton exprButton=ExpressionButtonUtil.createExpressionButton(composite,property,new ExpressionProvider(handle),handle,true,SWT.PUSH);
  if (PASSWORD.equals(propName)) {
    exprButton.setExpressionButtonProvider(new ExprButtonProvider(true,property));
  }
  Expression expr=handle.getPropertyBindingExpression(propName);
  property.setData(ExpressionButtonUtil.EXPR_TYPE,expr == null || expr.getType() == null ? UIUtil.getDefaultScriptType() : (String)expr.getType());
  property.setText((expr == null || expr.getStringExpression() == null) ? "String_Node_Str" : expr.getStringExpression());
  exprButton.refresh();
}