nus-yam/ex-repair huggingface dataset:
Program: 78063
Project: 78063
Buggy source:
/** 
 * Copies values of <code>sourceHandle</code> to <code>sourceDesign</code>.
 * @param setHandle the Model handle
 * @param setDesign the ODA data source design
 */
public void updateDataSetDesign(OdaDataSetHandle setHandle,DataSetDesign setDesign){
  setDesign.setName(setHandle.getName());
  setDesign.setDisplayName(setHandle.getDisplayName());
  setDesign.setOdaExtensionDataSetId(setHandle.getExtensionID());
  setDesign.setPublicProperties(newOdaPublicProperties(setHandle.getExtensionPropertyDefinitionList(),setHandle));
  setDesign.setPrivateProperties(newOdaPrivateProperties(setHandle.privateDriverPropertiesIterator()));
  setDesign.setPrimaryResultSetName(setHandle.getResultSetName());
  setDesign.setQueryText(setHandle.getQueryText());
  OdaDataSourceHandle sourceHandle=(OdaDataSourceHandle)setHandle.getDataSource();
  if (sourceHandle != null)   setDesign.setDataSourceDesign(createDataSourceDesign(sourceHandle));
  setDesign.setParameters(new DataSetParameterAdapter().newOdaDataSetParams(setHandle.parametersIterator()));
  setDesign.setPrimaryResultSet(ResultSetsAdapter.newOdaResultSetDefinition(setHandle));
}

Fixed version (ground truth):
/** 
 * Copies values of <code>sourceHandle</code> to <code>sourceDesign</code>.
 * @param setHandle the Model handle
 * @param setDesign the ODA data source design
 */
public void updateDataSetDesign(OdaDataSetHandle setHandle,DataSetDesign setDesign,String propertyName){
  if (propertyName == null)   return;
  if (propertyName.equalsIgnoreCase(OdaDataSetHandle.NAME_PROP))   setDesign.setName(setHandle.getName());
 else   if (propertyName.equalsIgnoreCase(OdaDataSetHandle.DISPLAY_NAME_PROP))   setDesign.setDisplayName(setHandle.getDisplayName());
 else   if (propertyName.equalsIgnoreCase(OdaDataSourceHandle.EXTENSION_ID_PROP))   setDesign.setOdaExtensionDataSetId(setHandle.getExtensionID());
 else   if (propertyName.equalsIgnoreCase(OdaDataSetHandle.PRIVATE_DRIVER_PROPERTIES_PROP))   setDesign.setPrivateProperties(newOdaPrivateProperties(setHandle.privateDriverPropertiesIterator()));
 else   if (propertyName.equalsIgnoreCase(OdaDataSetHandle.RESULT_SET_NAME_PROP))   setDesign.setPrimaryResultSetName(setHandle.getResultSetName());
 else   if (propertyName.equalsIgnoreCase(OdaDataSetHandle.QUERY_TEXT_PROP))   setDesign.setQueryText(setHandle.getQueryText());
 else   if (propertyName.equalsIgnoreCase(OdaDataSetHandle.DATA_SOURCE_PROP)) {
    OdaDataSourceHandle sourceHandle=(OdaDataSourceHandle)setHandle.getDataSource();
    if (sourceHandle != null)     setDesign.setDataSourceDesign(createDataSourceDesign(sourceHandle));
  }
 else   if (propertyName.equalsIgnoreCase(OdaDataSetHandle.PARAMETERS_PROP))   setDesign.setParameters(new DataSetParameterAdapter().newOdaDataSetParams(setHandle.parametersIterator()));
 else   if (propertyName.equalsIgnoreCase(OdaDataSetHandle.RESULT_SET_PROP))   setDesign.setPrimaryResultSet(ResultSetsAdapter.newOdaResultSetDefinition(setHandle));
}
Program: 78064
Project: 78064
Buggy source:
/** 
 * Save below information into report document: result class group information subquery information
 * @param odiResult
 * @throws DataException
 */
private void saveResultIterator(IResultIterator odiResult,int groupLevel,int[] subQueryInfo) throws DataException {
  try {
    boolean isSubQuery=streamManager.isSubquery();
    OutputStream streamForResultClass=null;
    if (isSubQuery == false)     streamForResultClass=streamManager.getOutStream(DataEngineContext.RESULTCLASS_STREAM);
    OutputStream streamForGroupInfo=streamManager.getOutStream(DataEngineContext.GROUP_INFO_STREAM);
    odiResult.doSave(streamManager.getOutStream(DataEngineContext.EXPR_VALUE_STREAM),streamManager.getOutStream(DataEngineContext.ROWLENGTH_INFO_STREAM),streamForResultClass,null,streamForGroupInfo,isSubQuery,RDSave.this.exprNameSet);
    streamForGroupInfo.close();
    if (streamForResultClass != null)     streamForResultClass.close();
    if (isSubQuery == true && streamManager.hasSubStream(DataEngineContext.SUBQUERY_INFO_STREAM) == false) {
      OutputStream streamForSubQuery=streamManager.getSubOutStream(DataEngineContext.SUBQUERY_INFO_STREAM);
      RDSubQueryUtil.doSave(streamForSubQuery,groupLevel,subQueryInfo);
      streamForSubQuery.close();
    }
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e,"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Save below information into report document: result class group information subquery information
 * @param odiResult
 * @throws DataException
 */
private void saveResultIterator(IResultIterator odiResult,int groupLevel,int[] subQueryInfo) throws DataException {
  try {
    boolean isSubQuery=streamManager.isSubquery();
    OutputStream streamForResultClass=null;
    if (isSubQuery == false)     streamForResultClass=streamManager.getOutStream(DataEngineContext.RESULTCLASS_STREAM);
    OutputStream streamForGroupInfo=streamManager.getOutStream(DataEngineContext.GROUP_INFO_STREAM);
    OutputStream streamForExprValue=null;
    OutputStream streamForRowLen=null;
    if (context.getMode() == DataEngineContext.PRESENTATION_AND_GENERATION) {
      streamForExprValue=streamManager.getOutStream(DataEngineContext.EXPR_VALUE_STREAM);
      streamForRowLen=streamManager.getOutStream(DataEngineContext.ROWLENGTH_INFO_STREAM);
    }
    odiResult.doSave(streamForExprValue,streamForRowLen,streamForResultClass,null,streamForGroupInfo,isSubQuery,RDSave.this.exprNameSet);
    if (streamForExprValue != null) {
      streamForExprValue.close();
      streamForRowLen.close();
    }
    streamForGroupInfo.close();
    if (streamForResultClass != null)     streamForResultClass.close();
    if (isSubQuery == true && streamManager.hasSubStream(DataEngineContext.SUBQUERY_INFO_STREAM) == false) {
      OutputStream streamForSubQuery=streamManager.getSubOutStream(DataEngineContext.SUBQUERY_INFO_STREAM);
      RDSubQueryUtil.doSave(streamForSubQuery,groupLevel,subQueryInfo);
      streamForSubQuery.close();
    }
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e,"String_Node_Str");
  }
}
Program: 78065
Project: 78065
Buggy source:
/** 
 * init save environment
 */
private void initSave(boolean finish) throws DataException {
  if (inited == true)   return;
  inited=true;
  try {
    rowExprsDos=new DataOutputStream(rowExprsOs);
    rowLenDos=new DataOutputStream(rowLenOs);
    int totalRowCount=0;
    if (finish == true)     totalRowCount=rowCount;
 else     totalRowCount=rowCount == 0 ? 1 : rowCount;
    IOUtil.writeInt(this.rowExprsDos,totalRowCount);
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e);
  }
}

Fixed version (ground truth):
/** 
 * init save environment
 */
private void initSave(boolean finish) throws DataException {
  if (inited == true)   return;
  inited=true;
  try {
    int totalRowCount=0;
    if (finish == true)     totalRowCount=rowCount;
 else     totalRowCount=rowCount == 0 ? 1 : rowCount;
    IOUtil.writeInt(this.rowExprsDos,totalRowCount);
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e);
  }
}
Program: 78066
Project: 78066
Buggy source:
/** 
 */
public RowSaveUtil(int rowCount,OutputStream rowExprsOs,OutputStream rowLenOs,Set exprNameSet){
  this.rowCount=rowCount;
  this.currRowBytes=0;
  this.rowExprsOs=rowExprsOs;
  this.rowLenOs=rowLenOs;
  this.exprNameSet=exprNameSet;
}

Fixed version (ground truth):
/** 
 */
public RowSaveUtil(int rowCount,OutputStream rowExprsOs,OutputStream rowLenOs,Set exprNameSet){
  this.rowCount=rowCount;
  this.exprNameSet=exprNameSet;
  this.currRowBytes=0;
  this.rowExprsDos=new DataOutputStream(rowExprsOs);
  this.rowLenDos=new DataOutputStream(rowLenOs);
}
Program: 78067
Project: 78067
Buggy source:
/** 
 * Checks if the version of a design file is of old version.
 * @param fileName the file name with full path of the design file
 * @return <code>-1</code> if the version of given file is lower thancurrent version; <code>0</code> if they are equal; otherwise, return <code>1</code>.
 * @throws DesignFileException if any exception happens
 * @throws FileNotFoundException
 */
public static int checkVersion(String fileName) throws DesignFileException, FileNotFoundException {
  return checkVersion(new BufferedInputStream(new FileInputStream(fileName)));
}

Fixed version (ground truth):
/** 
 * Checks whether the opening design file holds a version number before the some specific features is supported. This method is used to remind user that opening the file may need convert the original file automatically.
 * @param fileName the file name with full path of the design file
 * @return a list whose entry is of <code>IVersionInfo</code> type. Eachkind of automatical conversion information is stored in one instance of <code>IVersionInfo</code>. Note that if the design file does not exist, or it is an invalid design file, an instance of <code>IVersionInfo</code> will also generate. If the size of the return list is 0, there is no auto-conversion.
 */
public static List checkVersion(String fileName){
  List rtnList=new ArrayList();
  InputStream inputStream=null;
  try {
    inputStream=new BufferedInputStream(new FileInputStream(fileName));
    rtnList.addAll(checkVersion(inputStream));
  }
 catch (  FileNotFoundException e1) {
    rtnList.add(new VersionInfo(null,VersionInfo.INVALID_DESIGN_FILE));
  }
catch (  DesignFileException e1) {
    rtnList.add(new VersionInfo(null,VersionInfo.INVALID_DESIGN_FILE));
  }
 finally {
    try {
      if (inputStream != null)       inputStream.close();
    }
 catch (    IOException e) {
    }
  }
  return rtnList;
}
Program: 78068
Project: 78068
Buggy source:
/** 
 * @param queryDefn
 * @throws AdapterException
 * @throws BirtException
 */
private void defineDataSourceDataSet(QueryDefinition queryDefn) throws AdapterException, BirtException {
  String dataSetName=queryDefn.getDataSetName();
  List l=this.moduleHandle.getAllDataSets();
  DataSetHandle handle=null;
  for (int i=0; i < l.size(); i++) {
    if (((DataSetHandle)l.get(i)).getName() != null && ((DataSetHandle)l.get(i)).getName().equals(dataSetName)) {
      handle=(DataSetHandle)l.get(i);
    }
  }
  defineDataSet(handle);
}

Fixed version (ground truth):
/** 
 * @param queryDefn
 * @throws AdapterException
 * @throws BirtException
 */
private void defineDataSourceDataSet(QueryDefinition queryDefn) throws AdapterException, BirtException {
  String dataSetName=queryDefn.getDataSetName();
  List l=this.moduleHandle.getAllDataSets();
  DataSetHandle handle=null;
  for (int i=0; i < l.size(); i++) {
    if (((DataSetHandle)l.get(i)).getQualifiedName() != null && ((DataSetHandle)l.get(i)).getQualifiedName().equals(dataSetName)) {
      handle=(DataSetHandle)l.get(i);
    }
  }
  defineDataSet(handle);
}
Program: 78069
Project: 78069
Buggy source:
protected void pageChange(int newPageIndex){
  int oldPageIndex=getCurrentPage();
  if (oldPageIndex == newPageIndex) {
    return;
  }
  if (oldPageIndex != -1) {
    Object oldPage=pages.get(oldPageIndex);
    Object newPage=pages.get(newPageIndex);
    super.pageChange(newPageIndex);
    if (!prePageChanges(oldPage,newPage)) {
      super.setActivePage(oldPageIndex);
    }
  }
 else {
    super.pageChange(newPageIndex);
  }
  updateRelatedViews();
  bingdingKey(newPageIndex);
}

Fixed version (ground truth):
protected void pageChange(int newPageIndex){
  int oldPageIndex=getCurrentPage();
  if (oldPageIndex == newPageIndex) {
    return;
  }
  if (oldPageIndex != -1) {
    Object oldPage=pages.get(oldPageIndex);
    Object newPage=pages.get(newPageIndex);
    super.pageChange(newPageIndex);
    if (!prePageChanges(oldPage,newPage)) {
      super.setActivePage(oldPageIndex);
      updateRelatedViews();
      return;
    }
  }
 else {
    super.pageChange(newPageIndex);
  }
  updateRelatedViews();
  bingdingKey(newPageIndex);
}
Program: 78070
Project: 78070
Buggy source:
private void updateRelatedViews(){
  updatePaletteView(getActivePageInstance());
  updateOutLineView(getActivePageInstance());
  updateDateView(getActivePageInstance());
}

Fixed version (ground truth):
private void updateRelatedViews(){
  updatePaletteView(getCurrentPageInstance());
  updateOutLineView(getCurrentPageInstance());
  updateDateView(getCurrentPageInstance());
}
Program: 78072
Project: 78072
Buggy source:
private boolean matchType(ResultSetColumnHandle model){
  return style.equals(model.getDataType());
}

Fixed version (ground truth):
private boolean matchType(ResultSetColumnHandle column){
  if (style.equals(DesignChoiceConstants.PARAM_TYPE_STRING) || DesignChoiceConstants.COLUMN_DATA_TYPE_ANY.equals(column.getDataType())) {
    return true;
  }
  if (DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME.equals(column.getDataType())) {
    return style.equals(DesignChoiceConstants.PARAM_TYPE_DATETIME);
  }
 else   if (DesignChoiceConstants.COLUMN_DATA_TYPE_DECIMAL.equals(column.getDataType())) {
    return style.equals(DesignChoiceConstants.PARAM_TYPE_DECIMAL);
  }
 else   if (DesignChoiceConstants.COLUMN_DATA_TYPE_FLOAT.equals(column.getDataType())) {
    return style.equals(DesignChoiceConstants.PARAM_TYPE_FLOAT);
  }
 else   if (DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER.equals(column.getDataType())) {
    return style.equals(DesignChoiceConstants.PARAM_TYPE_FLOAT) || style.equals(DesignChoiceConstants.PARAM_TYPE_DECIMAL);
  }
  return false;
}
Program: 78073
Project: 78073
Buggy source:
protected boolean initDialog(){
  dataSetChooser.setItems(ChoiceSetFactory.getDataSets());
  dataSetChooser.select(0);
  currentDataSetName=dataSetChooser.getText();
  refreshColumns();
  return true;
}

Fixed version (ground truth):
protected boolean initDialog(){
  try {
    engine=DataEngine.newDataEngine(DataEngineContext.newInstance(DataEngineContext.DIRECT_PRESENTATION,null,null,null));
  }
 catch (  BirtException e) {
    ExceptionHandler.handle(e);
    return false;
  }
  dataSetChooser.setItems(ChoiceSetFactory.getDataSets());
  dataSetChooser.select(0);
  currentDataSetName=dataSetChooser.getText();
  refreshColumns();
  return true;
}
Program: 78074
Project: 78074
Buggy source:
private void refreshColumns(){
  columns=DataSetManager.getCurrentInstance().getColumns(currentDataSetName,false);
  columnChooser.removeAll();
  selectedColumnIndex=-1;
  if (columns.length == 0) {
    columnChooser.setItems(new String[0]);
  }
 else {
    ArrayList columnList=new ArrayList();
    for (int i=0; i < columns.length; i++) {
      if (matchType(columns[i])) {
        columnChooser.add(columns[i].getDataSetColumnName());
        columnList.add(columns[i]);
        selectedColumnIndex=0;
      }
    }
  }
  columnChooser.select(selectedColumnIndex);
  columnChooser.setEnabled(selectedColumnIndex == 0);
  refreshValues();
}

Fixed version (ground truth):
private void refreshColumns(){
  DataSetHandle dataSetHandle=getDataSetHandle();
  try {
    columnList=DataUtil.getColumnList(dataSetHandle);
  }
 catch (  SemanticException e) {
    ExceptionHandler.handle(e);
  }
  columnChooser.removeAll();
  selectedColumnIndex=-1;
  if (columnList.size() == 0) {
    columnChooser.setItems(new String[0]);
  }
 else {
    ArrayList matachedColumnList=new ArrayList();
    for (Iterator iter=columnList.iterator(); iter.hasNext(); ) {
      ResultSetColumnHandle column=(ResultSetColumnHandle)iter.next();
      if (matchType(column)) {
        columnChooser.add(column.getColumnName());
        matachedColumnList.add(column);
        selectedColumnIndex=0;
      }
    }
  }
  columnChooser.select(selectedColumnIndex);
  columnChooser.setEnabled(selectedColumnIndex == 0);
  refreshValues();
}
Program: 78075
Project: 78075
Buggy source:
/** 
 * @see GraphicalEditor#createPartControl(Composite)
 */
public void createPartControl(Composite parent){
  splitter=new FlyoutPaletteComposite(parent,SWT.NONE,getSite().getPage(),getPaletteViewerProvider(),getPalettePreferences());
  super.createPartControl(splitter);
  Control ctrl=getGraphicalControl();
  splitter.setGraphicalControl(ctrl);
  if (page != null) {
    splitter.setExternalViewer(page.getPaletteViewer());
    page=null;
  }
  DataSetManager.initCurrentInstance(getEditorInput());
}

Fixed version (ground truth):
/** 
 * @see GraphicalEditor#createPartControl(Composite)
 */
public void createPartControl(Composite parent){
  splitter=new FlyoutPaletteComposite(parent,SWT.NONE,getSite().getPage(),getPaletteViewerProvider(),getPalettePreferences());
  super.createPartControl(splitter);
  Control ctrl=getGraphicalControl();
  splitter.setGraphicalControl(ctrl);
  if (page != null) {
    splitter.setExternalViewer(page.getPaletteViewer());
    page=null;
  }
}
Program: 78077
Project: 78077
Buggy source:
public Object getValue(Object element,String property){
  if (element == dummyChoice) {
    ComputedColumn column=StructureFactory.createComputedColumn();
    column.setName(DEFAULT_COLUMN_NAME);
    column.setExpression("String_Node_Str");
    addBinding(column);
    return "String_Node_Str";
  }
  ComputedColumnHandle handle=((ComputedColumnHandle)element);
  String value=null;
  if (COLUMN_NAME.equals(property)) {
    value=handle.getName();
  }
 else   if (COLUMN_DATATYPE.equals(property)) {
    IChoice type=dataTypeChoiceSet.findChoice(handle.getDataType());
    if (type != null) {
      for (int i=0; i < dataTypeDisplayNames.length; i++) {
        if (dataTypeDisplayNames[i].equals(type.getDisplayName())) {
          return new Integer(i);
        }
      }
    }
    return new Integer(0);
  }
 else   if (COLUMN_EXPRESSION.equals(property)) {
    value=handle.getExpression();
  }
 else   if (COLUMN_AGGREGATEON.equals(property)) {
    value=handle.getAggregrateOn();
    ;
    if (value != null) {
      for (int i=1; i < groups.length; i++) {
        if (value.equals(groups[i])) {
          return new Integer(i);
        }
      }
    }
    return new Integer(0);
  }
  if (value == null) {
    value="String_Node_Str";
  }
  return value;
}

Fixed version (ground truth):
public Object getValue(Object element,String property){
  if (element == dummyChoice) {
    ComputedColumn column=StructureFactory.newComputedColumn(inputElement,DEFAULT_COLUMN_NAME);
    column.setExpression("String_Node_Str");
    addBinding(column);
    highLightName=column.getName();
    return "String_Node_Str";
  }
  ComputedColumnHandle handle=((ComputedColumnHandle)element);
  String value=null;
  if (COLUMN_NAME.equals(property)) {
    value=handle.getName();
  }
 else   if (COLUMN_DATATYPE.equals(property)) {
    IChoice type=dataTypeChoiceSet.findChoice(handle.getDataType());
    if (type != null) {
      for (int i=0; i < dataTypeDisplayNames.length; i++) {
        if (dataTypeDisplayNames[i].equals(type.getDisplayName())) {
          return new Integer(i);
        }
      }
    }
    return new Integer(0);
  }
 else   if (COLUMN_EXPRESSION.equals(property)) {
    value=handle.getExpression();
  }
 else   if (COLUMN_AGGREGATEON.equals(property)) {
    value=handle.getAggregrateOn();
    ;
    if (value != null) {
      for (int i=1; i < groups.length; i++) {
        if (value.equals(groups[i])) {
          return new Integer(i);
        }
      }
    }
    return new Integer(0);
  }
  if (value == null) {
    value="String_Node_Str";
  }
  return value;
}
Program: 78079
Project: 78079
Buggy source:
public void selectionChanged(SelectionChangedEvent event){
  if (!bindingTable.getSelection().isEmpty()) {
    Object obj=((IStructuredSelection)bindingTable.getSelection()).getFirstElement();
    if (obj == dummyChoice && !existDefaultColumn()) {
      bindingTable.refresh();
      bindingTable.getTable().getItem(bindingTable.getTable().getSelectionIndex() - 1).setForeground(1,Display.getDefault().getSystemColor(SWT.COLOR_BLUE));
      bindingTable.getTable().setSelection(bindingTable.getTable().getSelectionIndex() - 1);
    }
 else     if (obj instanceof ComputedColumnHandle) {
      ComputedColumnHandle column=(ComputedColumnHandle)obj;
      BindingExpressionProvider provider=new BindingExpressionProvider(column.getElementHandle());
      provider.addFilter(new ComputedColumnExpressionFilter(bindingTable));
      expressionCellEditor.setExpressionProvider(provider);
    }
  }
}

Fixed version (ground truth):
public void selectionChanged(SelectionChangedEvent event){
  if (!bindingTable.getSelection().isEmpty()) {
    Object obj=((IStructuredSelection)bindingTable.getSelection()).getFirstElement();
    if (obj == dummyChoice && !existHighLightColumn()) {
      bindingTable.refresh();
      setHihtLightColumn();
    }
 else     if (obj instanceof ComputedColumnHandle) {
      ComputedColumnHandle column=(ComputedColumnHandle)obj;
      BindingExpressionProvider provider=new BindingExpressionProvider(column.getElementHandle());
      provider.addFilter(new ComputedColumnExpressionFilter(bindingTable));
      expressionCellEditor.setExpressionProvider(provider);
    }
  }
}
Program: 78080
Project: 78080
Buggy source:
protected DataSetDesign collectDataSetDesign(DataSetDesign design){
  if (design != null && doc != null)   design.setQueryText(doc.get());
  return design;
}

Fixed version (ground truth):
protected DataSetDesign collectDataSetDesign(DataSetDesign design){
  if (design != null && doc != null)   design.setQueryText(doc.get());
  if (!formerQueryTxt.equals(design.getQueryText())) {
    savePage(design);
    formerQueryTxt=design.getQueryText();
  }
  return design;
}
Program: 78081
Project: 78081
Buggy source:
/** 
 * Prepare UI when pageActivated event is invoked Following things will be done: Set StyledText content Set StyledText as focus
 */
private void prepareUI(){
  StyledText styledText=viewer.getTextWidget();
  String queryText=styledText.getText();
  if (queryText != null && queryText.equalsIgnoreCase(getQueryPresetTextString())) {
    String[] lines=getQueryPresetTextArray();
    if (lines != null && lines.length > 0)     styledText.setSelection(lines[0].length() + 1,lines[0].length() + 1);
  }
  styledText.setFocus();
}

Fixed version (ground truth):
/** 
 * Prepare UI when pageActivated event is invoked Following things will be done: Set StyledText content Set StyledText as focus
 */
private void prepareUI(){
  StyledText styledText=viewer.getTextWidget();
  String queryText=styledText.getText();
  this.formerQueryTxt=queryText;
  if (queryText != null && queryText.equalsIgnoreCase(getQueryPresetTextString())) {
    String[] lines=getQueryPresetTextArray();
    if (lines != null && lines.length > 0)     styledText.setSelection(lines[0].length() + 1,lines[0].length() + 1);
  }
  styledText.setFocus();
}
Program: 78083
Project: 78083
Buggy source:
/** 
 * Sets the operator of this filter condition. The allowed values are defined in   {@link org.eclipse.birt.report.model.api.elements.DesignChoiceConstants}, and they are: <ul> <li><code>FILTER_OPERATOR_EQ</code> <li><code>FILTER_OPERATOR_NE</code> <li><code>FILTER_OPERATOR_LT</code> <li><code>FILTER_OPERATOR_LE</code> <li><code>FILTER_OPERATOR_GE</code> <li><code>FILTER_OPERATOR_GT</code> <li><code>FILTER_OPERATOR_BETWEEN</code> <li><code>FILTER_OPERATOR_NOT_BETWEEN</code> <li><code>FILTER_OPERATOR_NULL</code> <li><code>FILTER_OPERATOR_NOT_NULL</code> <li><code>FILTER_OPERATOR_TRUE</code> <li><code>FILTER_OPERATOR_FALSE</code> <li><code>FILTER_OPERATOR_LIKE</code> <li><code>FILTER_OPERATOR_TOP_N</code> <li><code>FILTER_OPERATOR_BOTTOM_N</code> <li><code>FILTER_OPERATOR_TOP_PERCENT</code> <li><code>FILTER_OPERATOR_BOTTOM_PERCENT</code> <li><code>FILTER_OPERATOR_ANY</code> </ul>
 * @param operator the operator to set
 * @throws SemanticException if operator is not in the choice list.
 */
public void setOperator(String operator) throws SemanticException {
  setProperty(FilterCondition.OPERATOR_MEMBER,operator);
}

Fixed version (ground truth):
/** 
 * Sets the operator of this filter condition. The allowed values are defined in  {@link org.eclipse.birt.report.model.api.elements.DesignChoiceConstants}, and they are: <ul> <li><code>FILTER_OPERATOR_EQ</code> <li><code>FILTER_OPERATOR_NE</code> <li><code>FILTER_OPERATOR_LT</code> <li><code>FILTER_OPERATOR_LE</code> <li><code>FILTER_OPERATOR_GE</code> <li><code>FILTER_OPERATOR_GT</code> <li><code>FILTER_OPERATOR_BETWEEN</code> <li><code>FILTER_OPERATOR_NOT_BETWEEN</code> <li><code>FILTER_OPERATOR_NULL</code> <li><code>FILTER_OPERATOR_NOT_NULL</code> <li><code>FILTER_OPERATOR_TRUE</code> <li><code>FILTER_OPERATOR_FALSE</code> <li><code>FILTER_OPERATOR_LIKE</code> <li><code>FILTER_OPERATOR_TOP_N</code> <li><code>FILTER_OPERATOR_BOTTOM_N</code> <li><code>FILTER_OPERATOR_TOP_PERCENT</code> <li><code>FILTER_OPERATOR_BOTTOM_PERCENT</code> <li><code>FILTER_OPERATOR_ANY</code> </ul>
 * @param operator the operator to set
 * @throws SemanticException if operator is not in the choice list.
 */
public void setOperator(String operator) throws SemanticException {
  setProperty(FilterCondition.OPERATOR_MEMBER,operator);
}
Program: 78084
Project: 78084
Buggy source:
/** 
 * Returns the operator of this filter condition. The possible values are defined in   {@link org.eclipse.birt.report.model.api.elements.DesignChoiceConstants}, and they are: <ul> <li><code>FILTER_OPERATOR_EQ</code> <li><code>FILTER_OPERATOR_NE</code> <li><code>FILTER_OPERATOR_LT</code> <li><code>FILTER_OPERATOR_LE</code> <li><code>FILTER_OPERATOR_GE</code> <li><code>FILTER_OPERATOR_GT</code> <li><code>FILTER_OPERATOR_BETWEEN</code> <li><code>FILTER_OPERATOR_NOT_BETWEEN</code> <li><code>FILTER_OPERATOR_NULL</code> <li><code>FILTER_OPERATOR_NOT_NULL</code> <li><code>FILTER_OPERATOR_TRUE</code> <li><code>FILTER_OPERATOR_FALSE</code> <li><code>FILTER_OPERATOR_LIKE</code> <li><code>FILTER_OPERATOR_TOP_N</code> <li><code>FILTER_OPERATOR_BOTTOM_N</code> <li><code>FILTER_OPERATOR_TOP_PERCENT</code> <li><code>FILTER_OPERATOR_BOTTOM_PERCENT</code> <li><code>FILTER_OPERATOR_ANY</code> </ul>
 * @return the operator of this filter condition
 */
public String getOperator(){
  return getStringProperty(FilterCondition.OPERATOR_MEMBER);
}

Fixed version (ground truth):
/** 
 * Returns the operator of this filter condition. The possible values are defined in  {@link org.eclipse.birt.report.model.api.elements.DesignChoiceConstants}, and they are: <ul> <li><code>FILTER_OPERATOR_EQ</code> <li><code>FILTER_OPERATOR_NE</code> <li><code>FILTER_OPERATOR_LT</code> <li><code>FILTER_OPERATOR_LE</code> <li><code>FILTER_OPERATOR_GE</code> <li><code>FILTER_OPERATOR_GT</code> <li><code>FILTER_OPERATOR_BETWEEN</code> <li><code>FILTER_OPERATOR_NOT_BETWEEN</code> <li><code>FILTER_OPERATOR_NULL</code> <li><code>FILTER_OPERATOR_NOT_NULL</code> <li><code>FILTER_OPERATOR_TRUE</code> <li><code>FILTER_OPERATOR_FALSE</code> <li><code>FILTER_OPERATOR_LIKE</code> <li><code>FILTER_OPERATOR_TOP_N</code> <li><code>FILTER_OPERATOR_BOTTOM_N</code> <li><code>FILTER_OPERATOR_TOP_PERCENT</code> <li><code>FILTER_OPERATOR_BOTTOM_PERCENT</code> <li><code>FILTER_OPERATOR_ANY</code> </ul>
 * @return the operator of this filter condition
 */
public String getOperator(){
  return getStringProperty(FilterCondition.OPERATOR_MEMBER);
}
Program: 78085
Project: 78085
Buggy source:
/** 
 * Sets the group name.
 * @param theName the group name to set
 */
public void setName(String theName){
}

Fixed version (ground truth):
/** 
 * Sets the group name.
 * @param theName the group name to set
 */
public void setName(String theName) throws NameException {
}
Program: 78086
Project: 78086
Buggy source:
/** 
 * Validates whether the group with the given name can be added into the given listing element.
 * @param element List/Table element
 * @param groupName name of the group to add
 * @return error list, each of which is the instance of<code>SemanticException</code>.
 */
public List validateForAddingGroup(ListingHandle element,String groupName){
  List groupList=Collections.EMPTY_LIST;
  ListingElement targetElement=getListingElement(element.getModule(),(ListingElement)element.getElement());
  if (targetElement == null) {
    targetElement=(ListingElement)element.getElement();
    groupList=getGroups(element.getModule(),(ListingElement)element.getElement());
  }
 else {
    groupList=getGroupsWithContents(element.getModule(),targetElement);
  }
  List list=new ArrayList();
  if (isDuplicateGroupName(element.getModule(),groupList,groupName)) {
    list.add(new SemanticError(targetElement,new String[]{groupName},SemanticError.DESIGN_EXCEPTION_DUPLICATE_GROUP_NAME));
    return list;
  }
  return list;
}

Fixed version (ground truth):
/** 
 * Validates whether the group with the given name can be added into the given listing element.
 * @param element List/Table element
 * @param groupName name of the group to add
 * @return error list, each of which is the instance of<code>SemanticException</code>.
 */
public List validateForAddingGroup(ListingHandle element,String groupName){
  List groupList=Collections.EMPTY_LIST;
  ListingElement targetElement=getListingElement(element.getModule(),(ListingElement)element.getElement());
  if (targetElement == null) {
    targetElement=(ListingElement)element.getElement();
    groupList=getGroups(element.getModule(),(ListingElement)element.getElement());
  }
 else {
    groupList=getGroupsWithContents(element.getModule(),targetElement);
  }
  List list=new ArrayList();
  if (isDuplicateGroupName(element.getModule(),groupList,groupName)) {
    list.add(new NameException(targetElement,groupName,NameException.DESIGN_EXCEPTION_DUPLICATE));
    return list;
  }
  return list;
}
Program: 78087
Project: 78087
Buggy source:
/** 
 * Validates whether the group can be renamed to the given name.
 * @param element List/Table element
 * @param group the group to rename
 * @param groupName name of the group to add
 * @return error list, each of which is the instance of<code>SemanticException</code>.
 */
public List validateForRenamingGroup(ListingHandle element,GroupHandle group,String groupName){
  if (group.getName() == groupName || (groupName != null && groupName.equals(group.getName()))) {
    return Collections.EMPTY_LIST;
  }
  ListingElement targetElement=getListingElement(element.getModule(),(ListingElement)element.getElement());
  if (targetElement == null)   return Collections.EMPTY_LIST;
  List groupList=getGroupsWithContents(element.getModule(),targetElement);
  List list=new ArrayList();
  if (isDuplicateGroupName(element.getModule(),groupList,groupName)) {
    list.add(new SemanticError(targetElement,new String[]{groupName},SemanticError.DESIGN_EXCEPTION_DUPLICATE_GROUP_NAME));
    return list;
  }
  return list;
}

Fixed version (ground truth):
/** 
 * Validates whether the group can be renamed to the given name.
 * @param element List/Table element
 * @param group the group to rename
 * @param groupName name of the group to add
 * @return error list, each of which is the instance of<code>SemanticException</code>.
 */
public List validateForRenamingGroup(ListingHandle element,GroupHandle group,String groupName){
  if (group.getName() == groupName || (groupName != null && groupName.equals(group.getName()))) {
    return Collections.EMPTY_LIST;
  }
  ListingElement targetElement=getListingElement(element.getModule(),(ListingElement)element.getElement());
  if (targetElement == null)   return Collections.EMPTY_LIST;
  List groupList=getGroupsWithContents(element.getModule(),targetElement);
  List list=new ArrayList();
  if (isDuplicateGroupName(element.getModule(),groupList,groupName)) {
    list.add(new NameException(targetElement,groupName,NameException.DESIGN_EXCEPTION_DUPLICATE));
    return list;
  }
  return list;
}
Program: 78088
Project: 78088
Buggy source:
/** 
 * Validates whether the style can be renamed to the given name.
 * @param theme the theme element
 * @param style the style to rename
 * @param styleName the new name of the style to add
 * @return error list, each of which is the instance of<code>SemanticException</code>.
 */
public List validateForRenamingStyle(ThemeHandle theme,StyleHandle style,String styleName){
  if (style.getName() == styleName || (styleName != null && styleName.equals(style.getName())))   return Collections.EMPTY_LIST;
  return validateForAddingStyle(theme,styleName);
}

Fixed version (ground truth):
/** 
 * Validates whether the style can be renamed to the given name.
 * @param theme the theme element
 * @param style the style to rename
 * @param styleName the new name of the style to add
 * @return error list, each of which is the instance of<code>SemanticException</code>.
 */
public List validateForRenamingStyle(ThemeHandle theme,StyleHandle style,String styleName){
  if (style.getName() == styleName || (styleName != null && styleName.equals(style.getName())))   return Collections.EMPTY_LIST;
  List list=new ArrayList();
  StyleHandle tmpStyle=theme.findStyle(styleName);
  if (tmpStyle != null && style != tmpStyle) {
    list.add(new NameException(theme.getElement(),styleName,NameException.DESIGN_EXCEPTION_DUPLICATE));
  }
  return list;
}
Program: 78089
Project: 78089
Buggy source:
public void dispose(){
  DataSetManager.removeInstance(this.getEditorInput());
  if (fPalettePage != null) {
    fPalettePage.dispose();
  }
  if (outlinePage != null) {
    outlinePage.dispose();
  }
  if (dataPage != null) {
    dataPage.dispose();
  }
  SessionHandleAdapter.getInstance().getMediator().removeGlobalColleague(this);
  super.dispose();
}

Fixed version (ground truth):
public void dispose(){
  if (fPalettePage != null) {
    fPalettePage.dispose();
  }
  if (outlinePage != null) {
    outlinePage.dispose();
  }
  if (dataPage != null) {
    dataPage.dispose();
  }
  SessionHandleAdapter.getInstance().getMediator().removeGlobalColleague(this);
  super.dispose();
}
Program: 78091
Project: 78091
Buggy source:
public void setGroupName(String name){
  this.groupName=name;
}

Fixed version (ground truth):
public void setGroupName(String name){
  if (name != null)   this.groupName=name;
 else   this.groupName=GROUP_OVERALL;
}
Program: 78092
Project: 78092
Buggy source:
protected void addColumBinding(IBaseQueryDefinition transfer,ComputedColumnHandle binding){
  String name=binding.getName();
  String expr=binding.getExpression();
  String type=binding.getDataType();
  int dbType=ModelDteApiAdapter.toDteDataType(type);
  IBaseExpression dbExpr=new ScriptExpression(expr,dbType);
  transfer.getResultSetExpressions().put(name,dbExpr);
}

Fixed version (ground truth):
protected void addColumBinding(IBaseQueryDefinition transfer,ComputedColumnHandle binding){
  String name=binding.getName();
  String expr=binding.getExpression();
  String type=binding.getDataType();
  int dbType=ModelDteApiAdapter.toDteDataType(type);
  IBaseExpression dbExpr=new ScriptExpression(expr,dbType);
  dbExpr.setGroupName(binding.getAggregrateOn());
  transfer.getResultSetExpressions().put(name,dbExpr);
}
Program: 78093
Project: 78093
Buggy source:
/** 
 * Initializes the Jdbc related information , used  by this page ( such as the Jdbc Connection , Catalog Name etc )
 * @param curDataSourceHandle
 */
protected void resetJdbcInfo(DataSourceDesign curDataSourceDesign){
  if (metaDataProvider != null) {
    metaDataProvider.closeConnection();
    metaDataProvider=null;
    createMetaDataProvider();
    jdbcConnection=connectMetadataProvider(metaDataProvider,curDataSourceDesign);
    tableList=null;
    schemaList=null;
    schemaCombo.removeAll();
  }
  try {
    if (jdbcConnection != null) {
      isSchemaSupported=metaDataProvider.isSchemaSupported();
    }
  }
 catch (  Exception e) {
    ExceptionHandler.showException(null,"String_Node_Str","String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Initializes the Jdbc related information , used  by this page ( such as the Jdbc Connection , Catalog Name etc )
 * @param curDataSourceHandle
 */
protected void resetJdbcInfo(DataSourceDesign curDataSourceDesign){
  if (metaDataProvider != null) {
    metaDataProvider.closeConnection();
    metaDataProvider=null;
    createMetaDataProvider();
    jdbcConnection=connectMetadataProvider(metaDataProvider,curDataSourceDesign);
    tableList=null;
    schemaList=null;
    schemaCombo.removeAll();
  }
  try {
    if (jdbcConnection != null) {
      isSchemaSupported=metaDataProvider.isSchemaSupported();
    }
  }
 catch (  Exception e) {
    ExceptionHandler.showException(this.getShell(),JdbcPlugin.getResourceString("String_Node_Str"),e.getLocalizedMessage(),e);
  }
}
Program: 78094
Project: 78094
Buggy source:
/** 
 * Initializes the Jdbc related information , used  by this page ( such as the Jdbc Connection , Catalog Name etc )
 */
protected void initJdbcInfo(){
  createMetaDataProvider();
  prevDataSourceDesign=this.getDataSetDesign().getDataSourceDesign();
  jdbcConnection=connectMetadataProvider(metaDataProvider,prevDataSourceDesign);
  validConnection=(jdbcConnection == null) ? false : true;
  try {
    if (jdbcConnection != null) {
      isSchemaSupported=metaDataProvider.isSchemaSupported();
    }
  }
 catch (  Exception e) {
    ExceptionHandler.showException(null,"String_Node_Str","String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Initializes the Jdbc related information , used  by this page ( such as the Jdbc Connection , Catalog Name etc )
 */
protected void initJdbcInfo(){
  createMetaDataProvider();
  prevDataSourceDesign=this.getDataSetDesign().getDataSourceDesign();
  jdbcConnection=connectMetadataProvider(metaDataProvider,prevDataSourceDesign);
  validConnection=(jdbcConnection == null) ? false : true;
  try {
    if (jdbcConnection != null) {
      isSchemaSupported=metaDataProvider.isSchemaSupported();
    }
  }
 catch (  Exception e) {
    ExceptionHandler.showException(this.getShell(),JdbcPlugin.getResourceString("String_Node_Str"),e.getLocalizedMessage(),e);
  }
}
Program: 78095
Project: 78095
Buggy source:
/** 
 * @return
 */
private DataSetDesign getDataSetDesign(){
  return this.getInitializationDesign();
}

Fixed version (ground truth):
/** 
 * @return
 */
private DataSetDesign getDataSetDesign(){
  if (dataSetDesign == null)   dataSetDesign=this.getInitializationDesign();
  return dataSetDesign;
}
Program: 78099
Project: 78099
Buggy source:
protected void appendMetaData(IBaseTransform query){
  Map bindings=query.getResultSetExpressions();
  Iterator iter=bindings.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry entry=(Map.Entry)iter.next();
    String name=(String)entry.getKey();
    IBaseExpression expr=(IBaseExpression)entry.getValue();
    int type=expr.getDataType();
    metaEntries.add(new MetaDataEntry(name,type));
  }
}

Fixed version (ground truth):
protected void appendMetaData(IBaseQueryDefinition query){
  Map bindings=query.getResultSetExpressions();
  Iterator iter=bindings.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry entry=(Map.Entry)iter.next();
    String name=(String)entry.getKey();
    IBaseExpression expr=(IBaseExpression)entry.getValue();
    int type=expr.getDataType();
    metaEntries.add(new MetaDataEntry(name,type));
  }
}
Program: 78100
Project: 78100
Buggy source:
public void startCell(ICellContent cell){
  if (isHidden()) {
    return;
  }
  logger.log(Level.FINE,"String_Node_Str");
  if (cell != null) {
    int colSpan=getNewColSpan(cell);
    if (colSpan < 1) {
      push(true);
      return;
    }
    push(false);
    writer.openTag(HTMLTags.TAG_TD);
    setStyleName(cell.getStyleClass());
    if (colSpan > 1) {
      writer.attribute(HTMLTags.ATTR_COLSPAN,cell.getColSpan());
    }
    if ((cell.getRowSpan()) > 1) {
      writer.attribute(HTMLTags.ATTR_ROWSPAN,cell.getRowSpan());
    }
    StringBuffer styleBuffer=new StringBuffer();
    IStyle mergedStyle=cell.getStyle();
    String vAlign=null;
    String textAlign=null;
    if (mergedStyle != null) {
      vAlign=mergedStyle.getVerticalAlign();
      textAlign=mergedStyle.getTextAlign();
    }
    if (vAlign == null) {
      IStyle cs=cell.getComputedStyle();
      vAlign=cs.getVerticalAlign();
      styleBuffer.append("String_Node_Str");
      styleBuffer.append(vAlign);
      styleBuffer.append("String_Node_Str");
    }
    if (textAlign == null) {
      IStyle cs=cell.getComputedStyle();
      textAlign=cs.getTextAlign();
      styleBuffer.append("String_Node_Str");
      styleBuffer.append(textAlign);
      styleBuffer.append("String_Node_Str");
    }
    handleStyle(cell,styleBuffer);
  }
 else {
    writer.openTag(HTMLTags.TAG_TD);
  }
}

Fixed version (ground truth):
public void startCell(ICellContent cell){
  if (isHidden()) {
    return;
  }
  logger.log(Level.FINE,"String_Node_Str");
  if (cell != null) {
    int colSpan=getNewColSpan(cell);
    if (colSpan < 1) {
      push(true);
      return;
    }
    push(false);
    writer.openTag(HTMLTags.TAG_TD);
    setStyleName(cell.getStyleClass());
    if (colSpan > 1) {
      writer.attribute(HTMLTags.ATTR_COLSPAN,colSpan);
    }
    if ((cell.getRowSpan()) > 1) {
      writer.attribute(HTMLTags.ATTR_ROWSPAN,cell.getRowSpan());
    }
    StringBuffer styleBuffer=new StringBuffer();
    IStyle mergedStyle=cell.getStyle();
    String vAlign=null;
    String textAlign=null;
    if (mergedStyle != null) {
      vAlign=mergedStyle.getVerticalAlign();
      textAlign=mergedStyle.getTextAlign();
    }
    if (vAlign == null) {
      IStyle cs=cell.getComputedStyle();
      vAlign=cs.getVerticalAlign();
      styleBuffer.append("String_Node_Str");
      styleBuffer.append(vAlign);
      styleBuffer.append("String_Node_Str");
    }
    if (textAlign == null) {
      IStyle cs=cell.getComputedStyle();
      textAlign=cs.getTextAlign();
      styleBuffer.append("String_Node_Str");
      styleBuffer.append(textAlign);
      styleBuffer.append("String_Node_Str");
    }
    handleStyle(cell,styleBuffer);
  }
 else {
    writer.openTag(HTMLTags.TAG_TD);
  }
}
Program: 78102
Project: 78102
Buggy source:
protected void initializeContent(IContent content){
  content.setReportContent(reportContent);
  InstanceID id=content.getInstanceID();
  if (id != null) {
    long designId=id.getComponentID();
    if (designId != -1) {
      Object generateBy=findReportItem(designId);
      content.setGenerateBy(generateBy);
      if (generateBy instanceof TemplateDesign) {
        TemplateDesign design=(TemplateDesign)generateBy;
        if (content instanceof ILabelContent) {
          ILabelContent labelContent=(ILabelContent)content;
          labelContent.setLabelKey(design.getPromptTextKey());
          labelContent.setLabelText(design.getPromptText());
        }
      }
    }
  }
}

Fixed version (ground truth):
protected void initializeContent(IContent content){
  content.setReportContent(reportContent);
  InstanceID id=content.getInstanceID();
  if (id != null) {
    long designId=id.getComponentID();
    if (designId != -1) {
      Object generateBy=findReportItem(designId);
      content.setGenerateBy(generateBy);
      if (generateBy instanceof TemplateDesign) {
        TemplateDesign design=(TemplateDesign)generateBy;
        if (content instanceof ILabelContent) {
          ILabelContent labelContent=(ILabelContent)content;
          labelContent.setLabelKey(design.getPromptTextKey());
          labelContent.setLabelText(design.getPromptText());
        }
      }
    }
  }
  if (content instanceof IAutoTextContent) {
    IAutoTextContent autoText=(IAutoTextContent)content;
    if (autoText.getType() == IAutoTextContent.TOTAL_PAGE) {
      autoText.setText(String.valueOf(reportDoc.getPageCount()));
    }
  }
}
Program: 78103
Project: 78103
Buggy source:
public Object getValue(String exprName) throws BirtException {
  checkStarted();
  logger.logp(Level.FINE,ResultIterator.class.getName(),"String_Node_Str","String_Node_Str" + LogUtil.toString(exprName));
  if (this.resultService.getBaseExpression(exprName) == null && this.resultService.getAutoBindingExpr(exprName) == null)   throw new DataException(ResourceConstants.INVALID_BOUND_COLUMN_NAME,exprName);
  int currRowIndex=this.odiResult.getCurrentResultIndex();
  if (lastRowIndex < currRowIndex) {
    if (boundColumnsEvalUtil == null) {
      boundColumnsEvalUtil=new BoundColumnsEvalUtil(this.odiResult,this.scope,this.getRdSaveUtil(),this.resultService);
    }
    lastRowIndex=currRowIndex;
    boundColumnValueMap=boundColumnsEvalUtil.getBoundColumnsValue();
  }
  Object exprValue=boundColumnValueMap.get(exprName);
  if (exprValue instanceof BirtException)   throw (BirtException)exprValue;
  return exprValue;
}

Fixed version (ground truth):
public Object getValue(String exprName) throws BirtException {
  checkStarted();
  logger.logp(Level.FINE,ResultIterator.class.getName(),"String_Node_Str","String_Node_Str" + LogUtil.toString(exprName));
  if (this.resultService.getBaseExpression(exprName) == null && this.resultService.getAutoBindingExpr(exprName) == null)   throw new DataException(ResourceConstants.INVALID_BOUND_COLUMN_NAME,exprName);
  int currRowIndex=this.odiResult.getCurrentResultIndex();
  if (lastRowIndex < currRowIndex) {
    if (bindingColumnsEvalUtil == null) {
      bindingColumnsEvalUtil=new BindingColumnsEvalUtil(this.odiResult,this.scope,this.getRdSaveUtil(),this.resultService);
    }
    lastRowIndex=currRowIndex;
    boundColumnValueMap=bindingColumnsEvalUtil.getColumnsValue();
  }
  Object exprValue=boundColumnValueMap.get(exprName);
  if (exprValue instanceof BirtException)   throw (BirtException)exprValue;
  return exprValue;
}
Program: 78105
Project: 78105
Buggy source:
public Object getValue(String exprName) throws BirtException {
  checkStarted();
  Object exprValue=null;
  Object exprObject=this.resultService.getBaseExpression(exprName);
  if (exprObject != null) {
    exprValue=this.doGetValue((IBaseExpression)exprObject);
  }
 else {
    IScriptExpression scriptExpr=this.resultService.getAutoBindingExpr(exprName);
    if (scriptExpr != null)     exprValue=ExprEvaluateUtil.evaluateRawExpression(scriptExpr,scope);
 else     throw new DataException(ResourceConstants.INVALID_BOUND_COLUMN_NAME,exprName);
  }
  this.getRdSaveUtil().doSaveExpr(exprName,exprValue);
  return exprValue;
}

Fixed version (ground truth):
public Object getValue(String exprName) throws BirtException {
  checkStarted();
  logger.logp(Level.FINE,ResultIterator.class.getName(),"String_Node_Str","String_Node_Str" + LogUtil.toString(exprName));
  if (this.resultService.getBaseExpression(exprName) == null && this.resultService.getAutoBindingExpr(exprName) == null)   throw new DataException(ResourceConstants.INVALID_BOUND_COLUMN_NAME,exprName);
  int currRowIndex=this.odiResult.getCurrentResultIndex();
  if (lastRowIndex < currRowIndex) {
    if (boundColumnsEvalUtil == null) {
      boundColumnsEvalUtil=new BoundColumnsEvalUtil(this.odiResult,this.scope,this.getRdSaveUtil(),this.resultService);
    }
    lastRowIndex=currRowIndex;
    boundColumnValueMap=boundColumnsEvalUtil.getBoundColumnsValue();
  }
  Object exprValue=boundColumnValueMap.get(exprName);
  if (exprValue instanceof BirtException)   throw (BirtException)exprValue;
  return exprValue;
}
Program: 78106
Project: 78106
Buggy source:
private void updateFormatField(){
  String displayFormat;
  IChoiceSet choiceSet=getFormatChoiceSet(getSelectedDataType());
  if (choiceSet == null) {
    displayFormat=DesignEngine.getMetaDataDictionary().getChoiceSet(DesignChoiceConstants.CHOICE_STRING_FORMAT_TYPE).findChoice(DesignChoiceConstants.STRING_FORMAT_TYPE_UNFORMATTED).getDisplayName();
  }
 else {
    displayFormat=choiceSet.findChoice(formatCategroy).getDisplayName();
    if (formatPattern != null) {
      displayFormat+="String_Node_Str" + formatPattern;
    }
  }
  formatField.setText("String_Node_Str" + displayFormat);
  changeFormat.setEnabled(choiceSet != null);
  if (selectedParameter != null) {
    doPreview(formatPattern == null ? formatCategroy : formatPattern);
  }
}

Fixed version (ground truth):
private void updateFormatField(){
  String displayFormat;
  IChoiceSet choiceSet=getFormatChoiceSet(getSelectedDataType());
  if (choiceSet == null) {
    displayFormat=DesignEngine.getMetaDataDictionary().getChoiceSet(DesignChoiceConstants.CHOICE_STRING_FORMAT_TYPE).findChoice(DesignChoiceConstants.STRING_FORMAT_TYPE_UNFORMATTED).getDisplayName();
  }
 else {
    displayFormat=choiceSet.findChoice(formatCategroy).getDisplayName();
    if (formatCategroy != DesignChoiceConstants.STRING_FORMAT_TYPE_CUSTOM) {
      displayFormat+="String_Node_Str" + formatPattern;
    }
  }
  formatField.setText("String_Node_Str" + displayFormat);
  changeFormat.setEnabled(choiceSet != null);
  if (selectedParameter != null) {
    doPreview(formatCategroy != DesignChoiceConstants.STRING_FORMAT_TYPE_CUSTOM ? formatCategroy : formatPattern);
  }
}