nus-yam/ex-repair huggingface dataset:
Program: 78107
Project: 78107
Buggy source:
private void popupFormatBuilder(boolean refresh){
  String type=getSelectedDataType();
  int style;
  if (DesignChoiceConstants.PARAM_TYPE_BOOLEAN.equals(type)) {
    return;
  }
  if (DesignChoiceConstants.PARAM_TYPE_STRING.equals(type)) {
    style=FormatBuilder.STRING;
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equals(type)) {
    style=FormatBuilder.DATETIME;
  }
 else {
    style=FormatBuilder.NUMBER;
  }
  FormatBuilder formatBuilder=new FormatBuilder(style);
  formatBuilder.setInputFormat(formatCategroy,formatPattern);
  if (formatBuilder.open() == OK) {
    formatCategroy=getCategroy((String)formatBuilder.getResult());
    formatPattern=getPattern((String)formatBuilder.getResult());
    updateFormatField();
  }
}

Fixed version (ground truth):
private void popupFormatBuilder(boolean refresh){
  String type=getSelectedDataType();
  int style;
  if (DesignChoiceConstants.PARAM_TYPE_BOOLEAN.equals(type)) {
    return;
  }
  if (DesignChoiceConstants.PARAM_TYPE_STRING.equals(type)) {
    style=FormatBuilder.STRING;
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equals(type)) {
    style=FormatBuilder.DATETIME;
  }
 else {
    style=FormatBuilder.NUMBER;
  }
  FormatBuilder formatBuilder=new FormatBuilder(style);
  formatBuilder.setInputFormat(formatCategroy,formatPattern);
  if (formatBuilder.open() == OK) {
    formatCategroy=((String[])formatBuilder.getResult())[0];
    formatPattern=((String[])formatBuilder.getResult())[1];
    updateFormatField();
  }
}
Program: 78108
Project: 78108
Buggy source:
protected void okPressed(){
  if (page.isFormatModified()) {
    setResult(page.getFormatString());
    super.okPressed();
  }
 else {
    cancelPressed();
  }
}

Fixed version (ground truth):
protected void okPressed(){
  if (page.isFormatModified()) {
    setResult(new String[]{page.getCategory(),page.getPattern()});
    super.okPressed();
  }
 else {
    cancelPressed();
  }
}
Program: 78110
Project: 78110
Buggy source:
private void popupFormatBuilder(boolean refresh){
  String type=getSelectedDataType();
  int style;
  if (DesignChoiceConstants.PARAM_TYPE_BOOLEAN.equals(type)) {
    return;
  }
  if (DesignChoiceConstants.PARAM_TYPE_STRING.equals(type)) {
    style=FormatBuilder.STRING;
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equals(type)) {
    style=FormatBuilder.DATETIME;
  }
 else {
    style=FormatBuilder.NUMBER;
  }
  FormatBuilder formatBuilder=new FormatBuilder(style);
  formatBuilder.setInputFormat(formatCategroy,formatPattern);
  formatBuilder.setPreviewText(defaultValue);
  if (formatBuilder.open() == OK) {
    formatCategroy=getCategroy((String)formatBuilder.getResult());
    formatPattern=getPattern((String)formatBuilder.getResult());
    updateFormatField();
    if (refresh) {
      refreshValueTable();
    }
  }
}

Fixed version (ground truth):
private void popupFormatBuilder(boolean refresh){
  String type=getSelectedDataType();
  int style;
  if (DesignChoiceConstants.PARAM_TYPE_BOOLEAN.equals(type)) {
    return;
  }
  if (DesignChoiceConstants.PARAM_TYPE_STRING.equals(type)) {
    style=FormatBuilder.STRING;
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equals(type)) {
    style=FormatBuilder.DATETIME;
  }
 else {
    style=FormatBuilder.NUMBER;
  }
  FormatBuilder formatBuilder=new FormatBuilder(style);
  formatBuilder.setInputFormat(formatCategroy,formatPattern);
  formatBuilder.setPreviewText(defaultValue);
  if (formatBuilder.open() == OK) {
    formatCategroy=((String[])formatBuilder.getResult())[0];
    formatPattern=((String[])formatBuilder.getResult())[1];
    updateFormatField();
    if (refresh) {
      refreshValueTable();
    }
  }
}
Program: 78111
Project: 78111
Buggy source:
private void insertFormat(int style){
  FormatBuilder dialog=new FormatBuilder(style);
  if (dialog.open() == OK) {
    String result="String_Node_Str" + getFormatPattern(((String)dialog.getResult())) + "String_Node_Str";
    textEditor.insert(result);
  }
}

Fixed version (ground truth):
private void insertFormat(int style){
  FormatBuilder dialog=new FormatBuilder(style);
  if (dialog.open() == OK && ((String[])dialog.getResult())[1] != null) {
    String result="String_Node_Str" + ((String[])dialog.getResult())[1] + "String_Node_Str";
    textEditor.insert(result);
  }
}
Program: 78112
Project: 78112
Buggy source:
/** 
 * Tests whether the given expression has corresponding column binding in the given list.
 * @param columns the binding columns
 * @param columnName the old value expression in BIRT 2.1M5
 * @return <code>true</code> if the expression exists in the columns.Otherwise, <code>false</code>.
 */
public static boolean exists(List columns,String columnName){
  if ((columns == null) || (columns.size() == 0))   return false;
  for (int i=0; i < columns.size(); i++) {
    ComputedColumn column=(ComputedColumn)columns.get(i);
    if (columnName.equals(column.getName()))     return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Tests whether the given expression has corresponding column binding in the given list.
 * @param columns the binding columns
 * @param columnName the old value expression in BIRT 2.1M5
 * @return <code>true</code> if the expression exists in the columns.Otherwise, <code>false</code>.
 */
private static boolean exists(List columns,String columnName){
  if (getColumn(columns,columnName) == null)   return false;
  return true;
}
Program: 78113
Project: 78113
Buggy source:
/** 
 * Gets the column with the given expression bound the given list.
 * @param columns the binding columns
 * @param expression the old value expression in BIRT 2.1M5
 * @return the bound column
 */
public static ComputedColumn getColumn(List columns,String name){
  if ((columns == null) || (columns.size() == 0) || name == null)   return null;
  for (int i=0; i < columns.size(); i++) {
    ComputedColumn column=(ComputedColumn)columns.get(i);
    if (name.equals(column.getName()))     return column;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Gets the column with the given expression bound the given list.
 * @param columns the binding columns
 * @param name the column binding name
 * @return the bound column
 */
public static ComputedColumn getColumn(List columns,String name){
  if ((columns == null) || (columns.size() == 0) || name == null)   return null;
  for (int i=0; i < columns.size(); i++) {
    ComputedColumn column=(ComputedColumn)columns.get(i);
    if (name.equals(column.getName()))     return column;
  }
  return null;
}
Program: 78114
Project: 78114
Buggy source:
/** 
 * @param dataSet
 * @return
 * @throws BirtException
 */
public IPreparedQuery prepareQuery(DataSetHandle dataSet,QueryDefinition queryDefn) throws BirtException {
  DataSessionContext context=new DataSessionContext(DataSessionContext.MODE_DIRECT_PRESENTATION,dataSet.getModuleHandle());
  DataRequestSession session=DataRequestSession.newSession(context);
  return session.prepare(queryDefn,null);
}

Fixed version (ground truth):
/** 
 * Gets prepared query, given Data set, Parameter binding, and useColumnHints, useFilters information.
 * @param dataSet Given DataSet providing SQL query and parameters.
 * @param bindingParams Given Parameter bindings providing binded parameters, null if no binded parameters.
 * @param useColumnHints Using column hints flag.
 * @param useFilters Using filters flag.
 * @return IPreparedQeury
 * @throws BirtException
 */
public final IPreparedQuery prepareQuery(DataSetHandle dataSet,ParamBindingHandle[] bindingParams,boolean useColumnHints,boolean useFilters) throws BirtException {
  IBaseDataSetDesign dataSetDesign=getDataSetDesign(dataSet,useColumnHints,useFilters);
  return prepareQuery(dataSet,getQueryDefinition(dataSetDesign,bindingParams));
}
Program: 78115
Project: 78115
Buggy source:
/** 
 * @param dataSetDesign
 * @param rowsToReturn
 * @return
 */
public final QueryDefinition getQueryDefinition(IBaseDataSetDesign dataSetDesign,int rowsToReturn){
  if (dataSetDesign != null) {
    QueryDefinition defn=new QueryDefinition(null);
    defn.setDataSetName(dataSetDesign.getName());
    if (rowsToReturn > 0) {
      defn.setMaxRows(rowsToReturn);
    }
    List parameters=dataSetDesign.getParameters();
    Iterator iter=parameters.iterator();
    while (iter.hasNext()) {
      ParameterDefinition paramDefn=(ParameterDefinition)iter.next();
      if (paramDefn.isInputMode()) {
        if (paramDefn.getDefaultInputValue() != null) {
          InputParameterBinding binding=new InputParameterBinding(paramDefn.getName(),new ScriptExpression(paramDefn.getDefaultInputValue().toString()));
          defn.addInputParamBinding(binding);
        }
      }
    }
    return defn;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param dataSetDesign
 * @param bindingParams
 * @param i
 * @return
 */
private QueryDefinition getQueryDefinition(IBaseDataSetDesign dataSetDesign,ParamBindingHandle[] bindingParams,int rowsToReturn){
  if (bindingParams == null || bindingParams.length == 0) {
    return getQueryDefinition(dataSetDesign,rowsToReturn);
  }
  if (dataSetDesign != null) {
    QueryDefinition defn=new QueryDefinition(null);
    defn.setDataSetName(dataSetDesign.getName());
    if (rowsToReturn > 0) {
      defn.setMaxRows(rowsToReturn);
    }
    for (int i=0; i < bindingParams.length; i++) {
      ParamBindingHandle param=bindingParams[i];
      InputParameterBinding binding=new InputParameterBinding(param.getParamName(),new ScriptExpression(param.getExpression()));
      defn.addInputParamBinding(binding);
    }
    return defn;
  }
  return null;
}
Program: 78116
Project: 78116
Buggy source:
/** 
 * @param dataSet
 * @param useColumnHints
 * @param useFilters
 * @return
 * @throws BirtException
 */
public final IBaseDataSetDesign getDataSetDesign(DataSetHandle dataSet,boolean useColumnHints,boolean useFilters) throws BirtException {
  if (dataSet != null) {
    DataSessionContext context=new DataSessionContext(DataSessionContext.MODE_DIRECT_PRESENTATION,dataSet.getModuleHandle());
    DataRequestSession session=DataRequestSession.newSession(context);
    IBaseDataSetDesign dataSetDesign=session.getModelAdaptor().adaptDataSet(dataSet);
    if (!useColumnHints) {
      dataSetDesign.getResultSetHints().clear();
    }
    if (!useFilters) {
      dataSetDesign.getFilters().clear();
    }
    if (!(dataSet instanceof JointDataSetHandle)) {
      IBaseDataSourceDesign dataSourceDesign=session.getModelAdaptor().adaptDataSource(dataSet.getDataSource());
      getEngine().defineDataSource(dataSourceDesign);
    }
    if (dataSet instanceof JointDataSetHandle) {
      defineSourceDataSets(dataSet,dataSetDesign);
    }
    getEngine().defineDataSet(dataSetDesign);
    return dataSetDesign;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param dataSet
 * @param useColumnHints
 * @param useFilters
 * @return
 * @throws BirtException
 */
public final IBaseDataSetDesign getDataSetDesign(DataSetHandle dataSet,boolean useColumnHints,boolean useFilters) throws BirtException {
  if (dataSet != null) {
    DataRequestSession session=getDataRequestSession(dataSet);
    IBaseDataSetDesign dataSetDesign=session.getModelAdaptor().adaptDataSet(dataSet);
    if (!useColumnHints) {
      dataSetDesign.getResultSetHints().clear();
    }
    if (!useFilters) {
      dataSetDesign.getFilters().clear();
    }
    if (!(dataSet instanceof JointDataSetHandle)) {
      IBaseDataSourceDesign dataSourceDesign=session.getModelAdaptor().adaptDataSource(dataSet.getDataSource());
      session.defineDataSource(dataSourceDesign);
    }
    if (dataSet instanceof JointDataSetHandle) {
      defineSourceDataSets(dataSet,dataSetDesign);
    }
    session.defineDataSet(dataSetDesign);
    return dataSetDesign;
  }
  return null;
}
Program: 78117
Project: 78117
Buggy source:
/** 
 * Gets prepared query, given Data set, Parameter binding, and useColumnHints, useFilters information.
 * @param dataSet Given DataSet providing SQL query and parameters.
 * @param bindingParams Given Parameter bindings providing binded parameters, null if no binded parameters.
 * @param useColumnHints Using column hints flag.
 * @param useFilters Using filters flag.
 * @return IPreparedQeury
 * @throws BirtException
 */
public final IPreparedQuery prepareQuery(DataSetHandle dataSet,ParamBindingHandle[] bindingParams,boolean useColumnHints,boolean useFilters) throws BirtException {
  IBaseDataSetDesign dataSetDesign=getDataSetDesign(dataSet,useColumnHints,useFilters);
  return prepareQuery(dataSet,getQueryDefinition(dataSetDesign,bindingParams));
}

Fixed version (ground truth):
/** 
 * Gets prepared query, given Data set, Parameter binding, and useColumnHints, useFilters information.
 * @param dataSet Given DataSet providing SQL query and parameters.
 * @param bindingParams Given Parameter bindings providing binded parameters, null if no binded parameters.
 * @param useColumnHints Using column hints flag.
 * @param useFilters Using filters flag.
 * @return IPreparedQeury
 * @throws BirtException
 */
public final IPreparedQuery prepareQuery(DataSetHandle dataSet,ParamBindingHandle[] bindingParams,boolean useColumnHints,boolean useFilters) throws BirtException {
  DataRequestSession session=getDataRequestSession(dataSet);
  IBaseDataSetDesign dataSetDesign=getDataSetDesign(dataSet,useColumnHints,useFilters);
  return session.prepare(getQueryDefinition(dataSetDesign,bindingParams),null);
}
Program: 78118
Project: 78118
Buggy source:
private static ParameterGroupDefinition convertParameterGroup(IParameterGroupDefn engineParam,IGetParameterDefinitionTask task){
  boolean cascade=engineParam instanceof ICascadingParameterGroup;
  ParameterGroupDefinition paramGroup=new ParameterGroupDefinition(engineParam.getName(),engineParam.getDisplayName(),null,cascade);
  List contents=convertParametersInGroup(engineParam.getContents(),paramGroup,task);
  paramGroup.setParameters(contents);
  return paramGroup;
}

Fixed version (ground truth):
private static ParameterGroupDefinition convertParameterGroup(IParameterGroupDefn engineParam,IGetParameterDefinitionTask task){
  boolean cascade=engineParam instanceof ICascadingParameterGroup;
  ParameterGroupDefinition paramGroup=new ParameterGroupDefinition(engineParam.getName(),engineParam.getDisplayName(),engineParam.getPromptText(),null,cascade);
  List contents=convertParametersInGroup(engineParam.getContents(),paramGroup,task);
  paramGroup.setParameters(contents);
  return paramGroup;
}
Program: 78119
Project: 78119
Buggy source:
public ParameterGroupDefinition(String name,String displayName,List parameters,boolean cascade){
  this.name=name;
  this.displayName=displayName;
  this.parameters=parameters;
  this.cascade=cascade;
}

Fixed version (ground truth):
public ParameterGroupDefinition(String name,String displayName,String promptText,List parameters,boolean cascade){
  this.name=name;
  this.displayName=displayName;
  this.promptText=promptText;
  this.parameters=parameters;
  this.cascade=cascade;
}
Program: 78120
Project: 78120
Buggy source:
/** 
 * @param dataSetHandle
 * @return
 * @throws BirtException
 */
IResultMetaData refreshMetaData(DataSetHandle dataSetHandle) throws BirtException {
  dataSetHandle.setCachedMetaData(StructureFactory.createCachedMetaData());
  IResultMetaData rsMeta=this.getDataSetMetaData(dataSetHandle,false);
  for (int i=1; i <= rsMeta.getColumnCount(); i++) {
    ResultSetColumn rsc=StructureFactory.createResultSetColumn();
    rsc.setColumnName((rsMeta.getColumnAlias(i) == null || rsMeta.getColumnAlias(i).trim().length() == 0) ? rsMeta.getColumnName(i) : rsMeta.getColumnAlias(i));
    rsc.setDataType(toModelDataType(rsMeta.getColumnType(i)));
    rsc.setPosition(new Integer(i));
    dataSetHandle.getCachedMetaDataHandle().getResultSet().addItem(rsc);
  }
  return rsMeta;
}

Fixed version (ground truth):
/** 
 * @param dataSetHandle
 * @return
 * @throws BirtException
 */
IResultMetaData refreshMetaData(DataSetHandle dataSetHandle) throws BirtException {
  IResultMetaData rsMeta=this.getDataSetMetaData(dataSetHandle,false);
  if (needsSetCachedMetaData(dataSetHandle,rsMeta)) {
    dataSetHandle.setCachedMetaData(StructureFactory.createCachedMetaData());
    for (int i=1; i <= rsMeta.getColumnCount(); i++) {
      ResultSetColumn rsc=StructureFactory.createResultSetColumn();
      rsc.setColumnName(getColumnName(rsMeta,i));
      rsc.setDataType(toModelDataType(rsMeta.getColumnType(i)));
      rsc.setPosition(new Integer(i));
      dataSetHandle.getCachedMetaDataHandle().getResultSet().addItem(rsc);
    }
  }
  return rsMeta;
}
Program: 78121
Project: 78121
Buggy source:
protected boolean isPropertyVisible(String propName){
  List elements=getElements();
  for (int i=0; i < elements.size(); i++) {
    PropertyHandle propertyHandle=((DesignElementHandle)elements.get(i)).getPropertyHandle(propName);
    if (propertyHandle != null && !propertyHandle.isVisible() || propertyHandle == null)     return false;
  }
  return !isInvalidInMasterPage(propName);
}

Fixed version (ground truth):
protected boolean isPropertyVisible(String propName){
  List elements=getElements();
  for (int i=0; i < elements.size(); i++) {
    PropertyHandle propertyHandle=((DesignElementHandle)elements.get(i)).getPropertyHandle(propName);
    if (propertyHandle != null && !propertyHandle.isVisible() || propertyHandle == null)     return false;
  }
  return !needHide(propName);
}
Program: 78122
Project: 78122
Buggy source:
protected boolean isPropertyReadOnly(String propName){
  for (int i=0; i < elements.size(); i++) {
    PropertyHandle propertyHandle=((DesignElementHandle)elements.get(i)).getPropertyHandle(propName);
    if (propertyHandle != null && propertyHandle.isReadOnly() || propertyHandle == null)     return true;
  }
  return isInvalidInMasterPage(propName);
}

Fixed version (ground truth):
protected boolean isPropertyReadOnly(String propName){
  for (int i=0; i < elements.size(); i++) {
    PropertyHandle propertyHandle=((DesignElementHandle)elements.get(i)).getPropertyHandle(propName);
    if (propertyHandle != null && propertyHandle.isReadOnly() || propertyHandle == null)     return true;
  }
  return needHide(propName);
}
Program: 78124
Project: 78124
Buggy source:
/** 
 * Get parameter values from config file.
 * @return Map
 */
private Map getConfigVars(){
  HashMap configVars=new HashMap();
  String reportDesignName=this.getFileUri();
  String configFileName=reportDesignName.replaceFirst(SUFFIX_DESIGN_FILE,SUFFIX_DESIGN_CONFIG);
  ReportDesignHandle handle=null;
  try {
    SessionHandle sessionHandle=SessionHandleAdapter.getInstance().getSessionHandle();
    File configFile=new File(configFileName);
    if (configFile != null && configFile.exists() && configFile.isFile()) {
      handle=sessionHandle.openDesign(configFileName);
      if (handle != null) {
        Iterator it=handle.configVariablesIterator();
        while (it != null && it.hasNext()) {
          ConfigVariableHandle configVar=(ConfigVariableHandle)it.next();
          if (configVar != null && configVar.getName() != null) {
            configVars.put(configVar.getName(),configVar.getValue());
          }
        }
        handle.close();
      }
    }
  }
 catch (  DesignFileException e) {
    e.printStackTrace();
    try {
      if (handle != null) {
        handle.close();
      }
    }
 catch (    Exception e1) {
      e1.printStackTrace();
    }
  }
  return configVars;
}

Fixed version (ground truth):
/** 
 * Get parameter values from config file.
 * @return Map
 */
private Map getConfigVars(){
  HashMap configVars=new HashMap();
  String reportDesignName=this.getFileUri();
  String configFileName=reportDesignName.replaceFirst(SUFFIX_DESIGN_FILE,SUFFIX_DESIGN_CONFIG);
  ReportDesignHandle handle=null;
  try {
    SessionHandle sessionHandle=SessionHandleAdapter.getInstance().getSessionHandle();
    File configFile=new File(configFileName);
    if (configFile != null && configFile.exists() && configFile.isFile()) {
      handle=sessionHandle.openDesign(configFileName);
      if (handle != null) {
        Iterator it=handle.configVariablesIterator();
        while (it != null && it.hasNext()) {
          ConfigVariableHandle configVar=(ConfigVariableHandle)it.next();
          if (configVar != null && configVar.getName() != null) {
            String paramName=getParameterName(configVar.getName());
            if (paramName != null && paramName.length() > 0) {
              configVars.put(paramName,configVar.getValue());
            }
          }
        }
        handle.close();
      }
    }
  }
 catch (  DesignFileException e) {
    e.printStackTrace();
    try {
      if (handle != null) {
        handle.close();
      }
    }
 catch (    Exception e1) {
      e1.printStackTrace();
    }
  }
  return configVars;
}
Program: 78125
Project: 78125
Buggy source:
protected IViewerReportDesignHandle getDesignHandle(HttpServletRequest request){
  IViewerReportDesignHandle design=null;
  IReportRunnable reportRunnable=null;
  IReportDocument reportDocumentInstance=ReportEngineService.getInstance().openReportDocument(this.reportDesignName,this.reportDocumentName);
  if (reportDocumentInstance != null) {
    reportRunnable=reportDocumentInstance.getReportRunnable();
    if (IBirtConstants.SERVLET_PATH_FRAMESET.equalsIgnoreCase(request.getServletPath())) {
      this.parameterMap=reportDocumentInstance.getParameterValues();
    }
    reportDocumentInstance.close();
  }
  if (reportRunnable != null) {
    design=new BirtViewerReportDesignHandle(IViewerReportDesignHandle.RPT_RUNNABLE_OBJECT,reportRunnable);
  }
 else {
    design=new BirtViewerReportDesignHandle(null,reportDesignName);
  }
  return design;
}

Fixed version (ground truth):
protected IViewerReportDesignHandle getDesignHandle(HttpServletRequest request){
  IViewerReportDesignHandle design=null;
  IReportRunnable reportRunnable=null;
  IReportDocument reportDocumentInstance=ReportEngineService.getInstance().openReportDocument(this.reportDesignName,this.reportDocumentName);
  if (reportDocumentInstance != null) {
    reportRunnable=reportDocumentInstance.getReportRunnable();
    if (IBirtConstants.SERVLET_PATH_FRAMESET.equalsIgnoreCase(request.getServletPath())) {
      this.parameterMap=reportDocumentInstance.getParameterValues();
    }
    reportDocumentInstance.close();
  }
  if (reportRunnable == null) {
    try {
      reportRunnable=ReportEngineService.getInstance().openReportDesign(this.reportDesignName);
    }
 catch (    EngineException e) {
      e.printStackTrace();
    }
  }
  if (reportRunnable != null) {
    design=new BirtViewerReportDesignHandle(IViewerReportDesignHandle.RPT_RUNNABLE_OBJECT,reportRunnable);
  }
 else {
    design=new BirtViewerReportDesignHandle(null,reportDesignName);
  }
  return design;
}
Program: 78126
Project: 78126
Buggy source:
/** 
 * parse paramenters from config file.
 * @param request
 * @return
 */
protected void parseConfigVars(HttpServletRequest request){
  String reportConfigName=this.reportDesignName.replaceFirst(IBirtConstants.SUFFIX_DESIGN_FILE,IBirtConstants.SUFFIX_DESIGN_CONFIG);
  SessionHandle sessionHandle=DesignEngine.newSession(ULocale.getDefault());
  ReportDesignHandle handle=null;
  try {
    this.configMap=new HashMap();
    handle=sessionHandle.openDesign(reportConfigName);
    if (handle != null) {
      Iterator configVars=handle.configVariablesIterator();
      while (configVars != null && configVars.hasNext()) {
        ConfigVariableHandle configVar=(ConfigVariableHandle)configVars.next();
        if (configVar != null && configVar.getName() != null) {
          this.configMap.put(configVar.getName(),configVar.getValue());
        }
      }
      handle.close();
    }
  }
 catch (  Exception e) {
    try {
      if (handle != null)       handle.close();
    }
 catch (    Exception err) {
    }
  }
}

Fixed version (ground truth):
/** 
 * parse paramenters from config file.
 * @param request
 * @return
 */
protected void parseConfigVars(HttpServletRequest request){
  String reportConfigName=this.reportDesignName.replaceFirst(IBirtConstants.SUFFIX_DESIGN_FILE,IBirtConstants.SUFFIX_DESIGN_CONFIG);
  SessionHandle sessionHandle=DesignEngine.newSession(ULocale.getDefault());
  ReportDesignHandle handle=null;
  try {
    this.configMap=new HashMap();
    handle=sessionHandle.openDesign(reportConfigName);
    if (handle != null) {
      Iterator configVars=handle.configVariablesIterator();
      while (configVars != null && configVars.hasNext()) {
        ConfigVariableHandle configVar=(ConfigVariableHandle)configVars.next();
        if (configVar != null && configVar.getName() != null) {
          String paramName=getParameterName(configVar.getName());
          if (paramName != null && paramName.length() > 0) {
            this.configMap.put(paramName,configVar.getValue());
          }
        }
      }
      handle.close();
    }
  }
 catch (  Exception e) {
    try {
      if (handle != null)       handle.close();
    }
 catch (    Exception err) {
    }
  }
}
Program: 78127
Project: 78127
Buggy source:
protected void __execute() throws RemoteException {
  BaseAttributeBean attrBean=(BaseAttributeBean)context.getBean();
  try {
    String reportDesignName=attrBean.getReportDesignName();
    String configFileName=reportDesignName.replaceFirst(IBirtConstants.SUFFIX_DESIGN_FILE,IBirtConstants.SUFFIX_DESIGN_CONFIG);
    SessionHandle sessionHandle=DesignEngine.newSession(ULocale.getDefault());
    File configFile=new File(configFileName);
    if (configFile != null && configFile.exists() && configFile.isFile()) {
      configFile.delete();
    }
    ReportDesignHandle handle=sessionHandle.createDesign();
    Oprand[] op=this.operation.getOprand();
    if (op != null) {
      for (int i=0; i < op.length; i++) {
        ConfigVariable configVar=new ConfigVariable();
        configVar.setName(op[i].getName());
        configVar.setValue(op[i].getValue());
        handle.addConfigVariable(configVar);
      }
    }
    handle.saveAs(configFileName);
    handle.close();
    handleUpdate();
  }
 catch (  Exception e) {
    AxisFault fault=new AxisFault();
    fault.setFaultCode(new QName("String_Node_Str"));
    fault.setFaultReason(e.getLocalizedMessage());
    throw fault;
  }
}

Fixed version (ground truth):
protected void __execute() throws RemoteException {
  ViewerAttributeBean attrBean=(ViewerAttributeBean)context.getBean();
  try {
    String reportDesignName=attrBean.getReportDesignName();
    String configFileName=reportDesignName.replaceFirst(IBirtConstants.SUFFIX_DESIGN_FILE,IBirtConstants.SUFFIX_DESIGN_CONFIG);
    SessionHandle sessionHandle=DesignEngine.newSession(ULocale.getDefault());
    File configFile=new File(configFileName);
    if (configFile != null && configFile.exists() && configFile.isFile()) {
      configFile.delete();
    }
    ReportDesignHandle handle=sessionHandle.createDesign();
    IReportRunnable runnable=(IReportRunnable)attrBean.getReportDesignHandle().getDesignObject();
    ModuleHandle model=runnable.getDesignHandle().getModuleHandle();
    Oprand[] op=this.operation.getOprand();
    if (op != null) {
      for (int i=0; i < op.length; i++) {
        ConfigVariable configVar=new ConfigVariable();
        ParameterHandle parameterHandle=model.findParameter(op[i].getName());
        if (parameterHandle != null) {
          configVar.setName(op[i].getName() + parameterHandle.getID());
          configVar.setValue(op[i].getValue());
          handle.addConfigVariable(configVar);
        }
      }
    }
    handle.saveAs(configFileName);
    handle.close();
    handleUpdate();
  }
 catch (  Exception e) {
    AxisFault fault=new AxisFault();
    fault.setFaultCode(new QName("String_Node_Str"));
    fault.setFaultReason(e.getLocalizedMessage());
    throw fault;
  }
}
Program: 78128
Project: 78128
Buggy source:
private final void renderOutline(IPrimitiveRenderer ipr,LineAttributes lia,Rectangle2D.Double r2d){
  if (lia != null && lia.isVisible() && lia.getColor() != null) {
    Graphics2D g2d=(Graphics2D)((IDeviceRenderer)ipr).getGraphicsContext();
    Stroke sPrevious=null;
    final ColorDefinition cd=lia.getColor();
    final Stroke sCurrent=((SVGRendererImpl)ipr).getCachedStroke(lia);
    if (sCurrent != null) {
      sPrevious=g2d.getStroke();
      g2d.setStroke(sCurrent);
    }
    g2d.setColor((Color)_sxs.getColor(cd));
    g2d.draw(r2d);
    if (sPrevious != null) {
      g2d.setStroke(sPrevious);
    }
  }
}

Fixed version (ground truth):
private final void renderOutline(IPrimitiveRenderer ipr,LineAttributes lia,Rectangle2D.Double r2d){
  if (lia != null && lia.isVisible() && lia.getColor() != null) {
    SVGGraphics2D g2d=(SVGGraphics2D)((IDeviceRenderer)ipr).getGraphicsContext();
    Stroke sPrevious=null;
    final ColorDefinition cd=lia.getColor();
    final Stroke sCurrent=((SVGRendererImpl)ipr).getCachedStroke(lia);
    if (sCurrent != null) {
      sPrevious=g2d.getStroke();
      g2d.setStroke(sCurrent);
    }
    g2d.setColor((Color)_sxs.getColor(cd));
    g2d.draw(r2d);
    g2d.setNoFillColor(g2d.getCurrentElement());
    if (sPrevious != null) {
      g2d.setStroke(sPrevious);
    }
  }
}
Program: 78129
Project: 78129
Buggy source:
/** 
 * Constructs the error detail with a given exception.
 * @param e the exception types that can be translated are <code>XMLParserException</code>, <code>DesignParserException</code>, <code>SemanticException</code> and <code>SAXException</code>.
 */
public ErrorDetail(Exception e){
}

Fixed version (ground truth):
/** 
 * The default constructor.
 */
public ErrorDetail(){
}
Program: 78131
Project: 78131
Buggy source:
/** 
 * Gets a helper to deal with a bundle of message files.
 * @param msgFolder directory where to locates the message files.
 * @param baseName base name of the resource bundle. The name is a common base name
 * @return a correspondent helper instance. Return <code>null</code> ifthe <code>msgFolder</code> is null or not a directory.
 */
public static BundleHelper getHelper(File msgFolder,String baseName){
  if (msgFolder == null || !msgFolder.isDirectory())   return null;
  return new BundleHelper(msgFolder,baseName);
}

Fixed version (ground truth):
/** 
 * Gets a helper to deal with a bundle of message files.
 * @param module the module
 * @param baseName base name of the resource bundle. The name is a common base name
 * @return a correspondent helper instance. Return <code>null</code> ifthe <code>msgFolder</code> is null or not a directory.
 */
public static BundleHelper getHelper(Module module,String baseName){
}
Program: 78133
Project: 78133
Buggy source:
/** 
 * Populates a <code>ResourceBundle</code> for a input file.
 * @param file a file binds to a message file.
 * @return A <code>ResourceBundle</code> for a input file, return<code>null</code> if the file doesn't exist or any exception occurred during I/O reading.
 */
private PropertyResourceBundle populateBundle(File file){
}

Fixed version (ground truth):
/** 
 * Populates a <code>ResourceBundle</code> for a input file.
 * @param file a file binds to a message file.
 * @return A <code>ResourceBundle</code> for a input file, return<code>null</code> if the file doesn't exist or any exception occurred during I/O reading.
 */
private PropertyResourceBundle populateBundle(String fileName){
}
Program: 78134
Project: 78134
Buggy source:
/** 
 * Private constructor. Constructs a helper given the message folder and common base name of the message bundles.
 * @param msgFolder directory where to locates the message files.
 * @param baseName base name of the resource bundle. The name is a common base name
 */
private BundleHelper(File msgFolder,String baseName){
}

Fixed version (ground truth):
/** 
 * Private constructor. Constructs a helper given the message folder and common base name of the message bundles.
 * @param module the module
 * @param baseName base name of the resource bundle. The name is a common base name
 */
private BundleHelper(Module module,String baseName){
  this.module=module;
  this.baseName=baseName;
}
Program: 78135
Project: 78135
Buggy source:
/** 
 * Finds user-defined messages for the given locale. <p> First we look up in the report itself, then look into the referenced message file. Each search uses a reduced form of Java locale-driven search algorithm: Language&Country, language, default.
 * @param resourceKey Resource key of the user defined message.
 * @param locale locale of message, if the input <code>locale</code> is <code>null</code>, the locale for the current thread will be used instead.
 * @return the corresponding locale-dependent messages. Return<code>""</code> if translation can not be found, or <code>resourceKey</code> is blank or <code>null</code>.
 */
public String getMessage(String resourceKey,ULocale locale){
  if (StringUtil.isBlank(resourceKey))   return "String_Node_Str";
  if (locale == null)   locale=ThreadResources.getLocale();
  String msg=translations.getMessage(resourceKey,locale);
  if (msg != null)   return msg;
  String baseName=getStringProperty(this,INCLUDE_RESOURCE_PROP);
  if (baseName == null)   return "String_Node_Str";
  String resourcePath=session.getBirtResourcePath();
  if (resourcePath != null) {
    File msgFolder=new File(session.getBirtResourcePath());
    msg=BundleHelper.getHelper(msgFolder,baseName).getMessage(resourceKey,locale);
  }
  if (msg == null || msg.length() == 0) {
    File msgFolder=getModuleFolder();
    if (msgFolder == null)     return "String_Node_Str";
    return BundleHelper.getHelper(msgFolder,baseName).getMessage(resourceKey,locale);
  }
  return msg;
}

Fixed version (ground truth):
/** 
 * Finds user-defined messages for the given locale. <p> First we look up in the report itself, then look into the referenced message file. Each search uses a reduced form of Java locale-driven search algorithm: Language&Country, language, default.
 * @param resourceKey Resource key of the user defined message.
 * @param locale locale of message, if the input <code>locale</code> is <code>null</code>, the locale for the current thread will be used instead.
 * @return the corresponding locale-dependent messages. Return<code>""</code> if translation can not be found, or <code>resourceKey</code> is blank or <code>null</code>.
 */
public String getMessage(String resourceKey,ULocale locale){
  if (StringUtil.isBlank(resourceKey))   return "String_Node_Str";
  if (locale == null)   locale=ThreadResources.getLocale();
  String msg=translations.getMessage(resourceKey,locale);
  if (msg != null)   return msg;
  String baseName=getStringProperty(this,INCLUDE_RESOURCE_PROP);
  if (baseName == null)   return "String_Node_Str";
  msg=BundleHelper.getHelper(this,baseName).getMessage(resourceKey,locale);
  return msg;
}
Program: 78136
Project: 78136
Buggy source:
/** 
 * Return a list of user-defined message keys. The list contained resource keys defined in the report itself and the keys defined in the referenced message files for the current thread's locale. The list returned contains no duplicate keys.
 * @return a list of user-defined message keys.
 */
public List getMessageKeys(){
  Set keys=new LinkedHashSet();
  String[] transKeys=translations.getResourceKeys();
  if (transKeys != null) {
    for (int i=0; i < transKeys.length; i++)     keys.add(transKeys[i]);
  }
  String baseName=getStringProperty(this,INCLUDE_RESOURCE_PROP);
  if (baseName == null)   return new ArrayList(keys);
  String resourcePath=session.getBirtResourcePath();
  File msgFolder=null;
  if (resourcePath != null) {
    msgFolder=new File(session.getBirtResourcePath());
    Collection msgKeys=BundleHelper.getHelper(msgFolder,baseName).getMessageKeys(ThreadResources.getLocale());
    if (msgKeys != null) {
      keys.addAll(msgKeys);
      return new ArrayList(keys);
    }
  }
  msgFolder=getModuleFolder();
  if (msgFolder == null)   return new ArrayList(keys);
  keys.addAll(BundleHelper.getHelper(msgFolder,baseName).getMessageKeys(ThreadResources.getLocale()));
  return new ArrayList(keys);
}

Fixed version (ground truth):
/** 
 * Return a list of user-defined message keys. The list contained resource keys defined in the report itself and the keys defined in the referenced message files for the current thread's locale. The list returned contains no duplicate keys.
 * @return a list of user-defined message keys.
 */
public List getMessageKeys(){
  Set keys=new LinkedHashSet();
  String[] transKeys=translations.getResourceKeys();
  if (transKeys != null) {
    for (int i=0; i < transKeys.length; i++)     keys.add(transKeys[i]);
  }
  String baseName=getStringProperty(this,INCLUDE_RESOURCE_PROP);
  if (baseName == null)   return new ArrayList(keys);
  keys.addAll(BundleHelper.getHelper(this,baseName).getMessageKeys(ThreadResources.getLocale()));
  return new ArrayList(keys);
}
Program: 78138
Project: 78138
Buggy source:
/** 
 * if parameter existed in config file, return the correct parameter name
 * @param configVarName
 * @return String
 */
private String getParameterName(String configVarName){
  String paramName=null;
  List parameters=null;
  ModuleHandle model=SessionHandleAdapter.getInstance().getReportDesignHandle();
  if (model != null) {
    parameters=model.getFlattenParameters();
  }
  if (parameters != null) {
    for (int i=0; i < parameters.size(); i++) {
      ScalarParameterHandle parameter=((ScalarParameterHandle)parameters.get(i));
      String curName=null;
      if (parameter != null && parameter.getName() != null) {
        curName=parameter.getName() + parameter.getID();
      }
      if (curName != null && curName.equalsIgnoreCase(configVarName)) {
        paramName=parameter.getName();
        break;
      }
    }
  }
  return paramName;
}

Fixed version (ground truth):
/** 
 * if parameter existed in config file, return the correct parameter name
 * @param configVarName
 * @return String
 */
private String getParameterName(String configVarName){
  String paramName=null;
  List parameters=null;
  ModuleHandle model=SessionHandleAdapter.getInstance().getReportDesignHandle();
  if (model != null) {
    parameters=model.getFlattenParameters();
  }
  if (parameters != null) {
    for (int i=0; i < parameters.size(); i++) {
      ScalarParameterHandle parameter=null;
      if (parameters.get(i) instanceof ScalarParameterHandle) {
        parameter=((ScalarParameterHandle)parameters.get(i));
      }
      String curName=null;
      if (parameter != null && parameter.getName() != null) {
        curName=parameter.getName() + parameter.getID();
      }
      if (curName != null && curName.equalsIgnoreCase(configVarName)) {
        paramName=parameter.getName();
        break;
      }
    }
  }
  return paramName;
}
Program: 78139
Project: 78139
Buggy source:
/** 
 * if parameter existed in config file, return the correct parameter name
 * @param configVarName
 * @return String
 */
private String getParameterName(String configVarName){
  String paramName=null;
  List parameters=null;
  IReportRunnable runnable=(IReportRunnable)reportDesignHandle.getDesignObject();
  ModuleHandle model=runnable.getDesignHandle().getModuleHandle();
  if (model != null) {
    parameters=model.getFlattenParameters();
  }
  if (parameters != null) {
    for (int i=0; i < parameters.size(); i++) {
      ScalarParameterHandle parameter=((ScalarParameterHandle)parameters.get(i));
      String curName=null;
      if (parameter != null && parameter.getName() != null) {
        curName=parameter.getName() + parameter.getID();
      }
      if (curName != null && curName.equalsIgnoreCase(configVarName)) {
        paramName=parameter.getName();
        break;
      }
    }
  }
  return paramName;
}

Fixed version (ground truth):
/** 
 * if parameter existed in config file, return the correct parameter name
 * @param configVarName
 * @return String
 */
private String getParameterName(String configVarName){
  String paramName=null;
  List parameters=null;
  IReportRunnable runnable=(IReportRunnable)reportDesignHandle.getDesignObject();
  ModuleHandle model=runnable.getDesignHandle().getModuleHandle();
  if (model != null) {
    parameters=model.getFlattenParameters();
  }
  if (parameters != null) {
    for (int i=0; i < parameters.size(); i++) {
      ScalarParameterHandle parameter=null;
      if (parameters.get(i) instanceof ScalarParameterHandle) {
        parameter=((ScalarParameterHandle)parameters.get(i));
      }
      String curName=null;
      if (parameter != null && parameter.getName() != null) {
        curName=parameter.getName() + parameter.getID();
      }
      if (curName != null && curName.equalsIgnoreCase(configVarName)) {
        paramName=parameter.getName();
        break;
      }
    }
  }
  return paramName;
}
Program: 78140
Project: 78140
Buggy source:
/** 
 * Popup the builder for Data element
 */
public void performDirectEdit(){
  TextDataHandle handle=(TextDataHandle)getModel();
  ExpressionBuilder dialog=new ExpressionBuilder(PlatformUI.getWorkbench().getDisplay().getActiveShell(),handle.getValueExpr());
  dialog.setExpressionProvier(new BindingExpressionProvider(handle));
  if (dialog.open() == Dialog.OK) {
    try {
      ((TextDataHandle)getModel()).setValueExpr(dialog.getResult());
    }
 catch (    SemanticException e) {
      ExceptionHandler.handle(e);
      return;
    }
    refreshVisuals();
  }
}

Fixed version (ground truth):
/** 
 * Popup the builder for Data element
 */
public void performDirectEdit(){
  TextDataHandle handle=(TextDataHandle)getModel();
  ExpressionBuilder dialog=new ExpressionBuilder(PlatformUI.getWorkbench().getDisplay().getActiveShell(),handle.getValueExpr());
  dialog.setExpressionProvier(new ExpressionProvider(handle));
  if (dialog.open() == Dialog.OK) {
    try {
      ((TextDataHandle)getModel()).setValueExpr(dialog.getResult());
    }
 catch (    SemanticException e) {
      ExceptionHandler.handle(e);
      return;
    }
    refreshVisuals();
  }
}
Program: 78141
Project: 78141
Buggy source:
/** 
 * Switch to select file in BIRT resource folder.
 */
private void swtichToResourceType(){
  Label title=new Label(inputArea,SWT.NONE);
  uriEditor=new Text(inputArea,SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
  uriEditor.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  uriEditor.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      updateButtons();
    }
  }
);
  Composite innerComp=new Composite(inputArea,SWT.NONE);
  innerComp.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
  innerComp.setLayout(new GridLayout(2,false));
  title.setText(DLG_ENTER_URI_LABEL);
  Button inputButton=new Button(innerComp,SWT.PUSH);
  inputButton.setText(Messages.getString("String_Node_Str"));
  inputButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
  inputButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      openResourceBrowser();
    }
  }
);
  previewButton=new Button(innerComp,SWT.PUSH);
  previewButton.setText(DLG_PREVIEW_LABEL);
  previewButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
  previewButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      uriEditor.setText(uriEditor.getText().trim());
      preview(CorePlugin.RESOURCE_FOLDER + File.separator + removeQuoteString(uriEditor.getText()));
    }
  }
);
  initURIEditor();
}

Fixed version (ground truth):
/** 
 * Switch to select file in BIRT resource folder.
 */
private void swtichToResourceType(){
  Label title=new Label(inputArea,SWT.NONE);
  uriEditor=new Text(inputArea,SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
  uriEditor.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  uriEditor.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      updateButtons();
    }
  }
);
  Composite innerComp=new Composite(inputArea,SWT.NONE);
  innerComp.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
  innerComp.setLayout(new GridLayout(2,false));
  title.setText(DLG_ENTER_RESOURCE_FILE_LABEL);
  Button inputButton=new Button(innerComp,SWT.PUSH);
  inputButton.setText(Messages.getString("String_Node_Str"));
  inputButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
  inputButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      openResourceBrowser();
    }
  }
);
  previewButton=new Button(innerComp,SWT.PUSH);
  previewButton.setText(DLG_PREVIEW_LABEL);
  previewButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
  previewButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      uriEditor.setText(uriEditor.getText().trim());
      preview(CorePlugin.RESOURCE_FOLDER + File.separator + removeQuoteString(uriEditor.getText()));
    }
  }
);
  initURIEditor();
}
Program: 78142
Project: 78142
Buggy source:
/** 
 * @param rs
 * @param rinfo
 * @param fileName
 * @param tName
 * @throws OdaException
 */
public SaxParserConsumer(ResultSet rs,RelationInformation rinfo,InputStream is,String tName) throws OdaException {
  this.resultSet=rs;
  cachedResultSetRowNo=0;
  currentAvailableMaxLineNo=-1;
  tableName=tName;
  relationInfo=rinfo;
  nestedColumnUtil=new NestedColumnUtil(relationInfo,tableName,true);
  currentRowNo=0;
  cachedResultSet=new String[Constants.CACHED_RESULT_SET_LENGTH][resultSet.getMetaData().getColumnCount()];
  this.rootPath=relationInfo.getTableRootPath(tableName);
  this.namesOfCachedComplexNestedColumns=relationInfo.getTableComplexNestedXMLColumnNames(tableName);
  this.namesOfCachedSimpleNestedColumns=relationInfo.getTableSimpleNestedXMLColumnNames(tableName);
  this.namesOfColumns=relationInfo.getTableColumnNames(tableName);
  XMLDataInputStream xdis=(is instanceof XMLDataInputStream) ? (XMLDataInputStream)is : new XMLDataInputStream(is);
  if (namesOfCachedComplexNestedColumns.length > 0) {
    spNestedQueryHelper=new SaxParserComplexNestedQueryHelper(rinfo,xdis,tName);
    while (!spNestedQueryHelper.isPrepared()) {
      try {
synchronized (this) {
          wait(1000);
        }
      }
 catch (      InterruptedException e) {
        throw new OdaException(e.getLocalizedMessage());
      }
    }
  }
  sp=new SaxParser(xdis,this);
  spThread=new Thread(sp);
  spThread.start();
}

Fixed version (ground truth):
/** 
 * @param rs
 * @param rinfo
 * @param fileName
 * @param tName
 * @throws OdaException
 */
public SaxParserConsumer(ResultSet rs,RelationInformation rinfo,XMLDataInputStream is,String tName) throws OdaException {
  this.resultSet=rs;
  cachedResultSetRowNo=0;
  currentAvailableMaxLineNo=-1;
  tableName=tName;
  relationInfo=rinfo;
  nestedColumnUtil=new NestedColumnUtil(relationInfo,tableName,true);
  currentRowNo=0;
  cachedResultSet=new String[Constants.CACHED_RESULT_SET_LENGTH][resultSet.getMetaData().getColumnCount()];
  this.rootPath=relationInfo.getTableRootPath(tableName);
  this.namesOfCachedComplexNestedColumns=relationInfo.getTableComplexNestedXMLColumnNames(tableName);
  this.namesOfCachedSimpleNestedColumns=relationInfo.getTableSimpleNestedXMLColumnNames(tableName);
  this.namesOfColumns=relationInfo.getTableColumnNames(tableName);
  XMLDataInputStream xdis=is;
  if (namesOfCachedComplexNestedColumns.length > 0) {
    spNestedQueryHelper=new SaxParserComplexNestedQueryHelper(rinfo,xdis,tName);
    while (!spNestedQueryHelper.isPrepared()) {
      try {
synchronized (this) {
          wait(1000);
        }
      }
 catch (      InterruptedException e) {
        throw new OdaException(e.getLocalizedMessage());
      }
    }
  }
  sp=new SaxParser(xdis,this);
  spThread=new Thread(sp);
  spThread.start();
}