nus-yam/ex-repair huggingface dataset:
Program: 77348
Project: 77348
Buggy source:
/** 
 * Anything before do service.
 * @param request incoming http request
 * @param response http response
 * @exception ServletException
 * @exception IOException
 */
protected void doPreService(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  String format=ParameterAccessor.getFormat(request);
  if (ParameterAccessor.PARAM_FORMAT_PDF.equalsIgnoreCase(format)) {
    response.setContentType("String_Node_Str");
    String filename=ParameterAccessor.generateFileName(request);
    response.setHeader("String_Node_Str","String_Node_Str" + filename + "String_Node_Str");
  }
 else {
    String mimeType=ReportEngineService.getInstance().getMIMEType(format);
    if (mimeType != null && mimeType.length() > 0)     response.setContentType(mimeType);
 else     response.setContentType("String_Node_Str");
    response.setHeader("String_Node_Str","String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Anything before do service.
 * @param request incoming http request
 * @param response http response
 * @exception ServletException
 * @exception IOException
 */
protected void doPreService(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  String format=ParameterAccessor.getFormat(request);
  if (ParameterAccessor.PARAM_FORMAT_PDF.equalsIgnoreCase(format)) {
    response.setContentType("String_Node_Str");
    String filename=ParameterAccessor.generateFileName(request);
    response.setHeader("String_Node_Str","String_Node_Str" + filename + "String_Node_Str");
  }
 else {
    String mimeType=ReportEngineService.getInstance().getMIMEType(format);
    if (mimeType != null && mimeType.length() > 0)     response.setContentType(mimeType);
 else     response.setContentType("String_Node_Str");
  }
}
Program: 77349
Project: 77349
Buggy source:
/** 
 * compile the expression
 * @param expression
 * @return List contains all column reference
 * @throws BirtException
 */
static List compileColumnExpression(String expression) throws BirtException {
  if (expression == null || expression.trim().length() == 0)   return new ArrayList();
  List columnExprList=new ArrayList();
  columnExprList.clear();
  Context context=Context.enter();
  try {
    ScriptOrFnNode tree=instance.parse(expression,context);
    instance.CompiledExprFromTree(expression,context,tree,columnExprList);
  }
 catch (  Exception ex) {
    throw new CoreException(instance.pluginId,ResourceConstants.INVALID_EXPRESSION,ex);
  }
 finally {
    Context.exit();
  }
  return columnExprList;
}

Fixed version (ground truth):
/** 
 * compile the expression
 * @param expression
 * @return List contains all column reference
 * @throws BirtException
 */
static List compileColumnExpression(String expression,boolean rowMode) throws BirtException {
  if (expression == null || expression.trim().length() == 0)   return new ArrayList();
  if (rowMode)   ROW_INDICATOR=ROW_COLUMN_INDICATOR;
 else   ROW_INDICATOR=DATASETROW_INDICATOR;
  List columnExprList=new ArrayList();
  columnExprList.clear();
  Context context=Context.enter();
  try {
    ScriptOrFnNode tree=instance.parse(expression,context);
    instance.CompiledExprFromTree(expression,context,tree,columnExprList);
  }
 catch (  Exception ex) {
    throw new CoreException(instance.pluginId,ResourceConstants.INVALID_EXPRESSION,ex);
  }
 finally {
    Context.exit();
  }
  return columnExprList;
}
Program: 77350
Project: 77350
Buggy source:
/** 
 * @return
 * @throws BirtException 
 */
static boolean hasAggregation(String expression) throws BirtException {
  hasAggregation=false;
  compileColumnExpression(expression);
  return hasAggregation;
}

Fixed version (ground truth):
/** 
 * @return
 * @throws BirtException 
 */
static boolean hasAggregation(String expression,boolean mode) throws BirtException {
  hasAggregation=false;
  compileColumnExpression(expression,mode);
  return hasAggregation;
}
Program: 77351
Project: 77351
Buggy source:
/** 
 * extract all column expression info excluding outer_level > 0
 * @param oldExpression
 * @return
 * @throws BirtException
 */
public static List extractColumnExpressions(String oldExpression) throws BirtException {
  if (oldExpression == null || oldExpression.trim().length() == 0)   return new ArrayList();
  return ExpressionParserUtility.compileColumnExpression(oldExpression);
}

Fixed version (ground truth):
/** 
 * Extract all column expression info
 * @param oldExpression
 * @param mode if true, it means to compile the "row" expression.else extract "dataSetRow" expression
 * @return
 * @throws BirtException
 */
public static List extractColumnExpressions(String oldExpression,boolean mode) throws BirtException {
  if (oldExpression == null || oldExpression.trim().length() == 0)   return new ArrayList();
  return ExpressionParserUtility.compileColumnExpression(oldExpression,mode);
}
Program: 77352
Project: 77352
Buggy source:
/** 
 * whethter the expression has aggregation 
 * @param oldExpression
 * @return
 * @throws BirtException
 */
public static boolean hasAggregation(String expression){
  if (expression == null)   return false;
  try {
    return ExpressionParserUtility.hasAggregation(expression);
  }
 catch (  BirtException e) {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * whethter the expression has aggregation 
 * @param oldExpression
 * @return
 * @throws BirtException
 */
public static boolean hasAggregation(String expression){
  if (expression == null)   return false;
  try {
    return ExpressionParserUtility.hasAggregation(expression,true);
  }
 catch (  BirtException e) {
    return false;
  }
}
Program: 77353
Project: 77353
Buggy source:
/** 
 * Serialize instance status into output stream.
 * @param outputStream
 * @throws DataException 
 */
public void doSave(OutputStream outputStream) throws DataException {
}

Fixed version (ground truth):
/** 
 * Serialize instance status into output stream.
 * @param outputStream
 * @throws DataException 
 */
public void doSave(OutputStream outputStream,Map requestColumnMap) throws DataException {
}
Program: 77354
Project: 77354
Buggy source:
public void doSave(OutputStream outputStream) throws DataException {
  DataOutputStream dos=new DataOutputStream(outputStream);
  try {
    int rowCount=this.resultObjects.length;
    int colCount=this.rsMeta.getFieldCount();
    IOUtil.writeInt(dos,rowCount);
    for (int i=0; i < rowCount; i++) {
      ResultSetUtil.writeResultObject(dos,resultObjects[i],colCount);
    }
    dos.close();
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e);
  }
}

Fixed version (ground truth):
public void doSave(OutputStream outputStream,Map cacheRequestMap) throws DataException {
  DataOutputStream dos=new DataOutputStream(outputStream);
  Set resultSetNameSet=ResultSetUtil.getRsColumnRequestMap(cacheRequestMap);
  try {
    int rowCount=this.resultObjects.length;
    int colCount=this.rsMeta.getFieldCount();
    IOUtil.writeInt(dos,rowCount);
    for (int i=0; i < rowCount; i++) {
      ResultSetUtil.writeResultObject(dos,resultObjects[i],colCount,resultSetNameSet);
    }
    dos.close();
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e);
  }
}
Program: 77355
Project: 77355
Buggy source:
/** 
 * Serialize to an output stream
 * @param outputStream
 */
public void doSave(OutputStream outputStream) throws DataException ;

Fixed version (ground truth):
/** 
 * Serialize to an output stream
 * @param outputStream
 */
public void doSave(OutputStream outputStream,Map cacheRequestMapping) throws DataException ;
Program: 77356
Project: 77356
Buggy source:
/** 
 * @param dos
 * @param resultObject
 * @param count
 * @throws DataException
 * @throws IOException
 */
public static void writeResultObject(DataOutputStream dos,IResultObject resultObject,int count) throws DataException, IOException {
  for (int i=1; i <= count; i++)   IOUtil.writeObject(dos,resultObject.getFieldValue(i));
}

Fixed version (ground truth):
/** 
 * Write the result object value if it is used in column binding map
 * @param dos
 * @param resultObject
 * @param nameSet
 * @throws DataException
 * @throws IOException
 */
public static void writeResultObject(DataOutputStream dos,IResultObject resultObject,int count,Set nameSet) throws DataException, IOException {
  if (resultObject.getResultClass() == null)   return;
  for (int i=1; i <= count; i++) {
    if (nameSet != null && nameSet.contains(resultObject.getResultClass().getFieldName(i)))     IOUtil.writeObject(dos,resultObject.getFieldValue(i));
  }
}
Program: 77357
Project: 77357
Buggy source:
public void doSave(OutputStream outputStream) throws DataException {
  this.resultSetCache.doSave(outputStream);
}

Fixed version (ground truth):
public void doSave(OutputStream outputStream,Map cacheRequestMap) throws DataException {
  this.resultSetCache.doSave(outputStream,cacheRequestMap);
}
Program: 77358
Project: 77358
Buggy source:
public void doSave(OutputStream outputStream) throws DataException {
  DataOutputStream dos=new DataOutputStream(outputStream);
  try {
    int rowCount=this.diskBasedResultSet.getCount();
    int colCount=this.rsMeta.getFieldCount();
    IOUtil.writeInt(dos,rowCount);
    int currIndex=this.currResultIndex;
    this.reset();
    for (int i=0; i < rowCount; i++) {
      ResultSetUtil.writeResultObject(dos,this.diskBasedResultSet.nextRow(),colCount);
    }
    this.reset();
    this.moveTo(currIndex);
    dos.close();
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e);
  }
}

Fixed version (ground truth):
public void doSave(OutputStream outputStream,Map cacheRequestMap) throws DataException {
  DataOutputStream dos=new DataOutputStream(outputStream);
  Set resultSetNameSet=ResultSetUtil.getRsColumnRequestMap(cacheRequestMap);
  try {
    int rowCount=this.diskBasedResultSet.getCount();
    int colCount=this.rsMeta.getFieldCount();
    IOUtil.writeInt(dos,rowCount);
    int currIndex=this.currResultIndex;
    this.reset();
    for (int i=0; i < rowCount; i++) {
      ResultSetUtil.writeResultObject(dos,this.diskBasedResultSet.nextRow(),colCount,resultSetNameSet);
    }
    this.reset();
    this.moveTo(currIndex);
    dos.close();
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e);
  }
}
Program: 77359
Project: 77359
Buggy source:
public void doSave(StreamWrapper streamsWrapper,boolean isSubQuery) throws DataException {
  if (streamsWrapper.getStreamForGroupInfo() != null) {
    this.resultSetPopulator.getGroupProcessorManager().getGroupCalculationUtil().doSave(streamsWrapper.getStreamForGroupInfo());
  }
  if (isSubQuery == false && streamsWrapper.getStreamForResultClass() != null) {
    ((ResultClass)this.resultSetPopulator.getResultSetMetadata()).doSave(streamsWrapper.getStreamForResultClass());
  }
  if (streamsWrapper.getStreamForDataSet() != null) {
    this.resultSetPopulator.getCache().doSave(streamsWrapper.getStreamForDataSet());
  }
}

Fixed version (ground truth):
public void doSave(StreamWrapper streamsWrapper,boolean isSubQuery) throws DataException {
  if (streamsWrapper.getStreamForGroupInfo() != null) {
    this.resultSetPopulator.getGroupProcessorManager().getGroupCalculationUtil().doSave(streamsWrapper.getStreamForGroupInfo());
  }
  if (isSubQuery == false && streamsWrapper.getStreamForResultClass() != null) {
    ((ResultClass)this.resultSetPopulator.getResultSetMetadata()).doSave(streamsWrapper.getStreamForResultClass(),resultSetPopulator.getEventHandler().getColumnMappings());
  }
  if (streamsWrapper.getStreamForDataSet() != null) {
    this.resultSetPopulator.getCache().doSave(streamsWrapper.getStreamForDataSet(),resultSetPopulator.getEventHandler().getColumnMappings());
  }
}
Program: 77360
Project: 77360
Buggy source:
public Collection getSelectionListForCascadingGroup(IViewerReportDesignHandle design,String groupName,Object[] groupKeys,InputOptions options) throws ReportServiceException {
  IGetParameterDefinitionTask task=getParameterDefinitionTask(design,options);
  task.evaluateQuery(groupName);
  Collection selectionList=task.getSelectionListForCascadingGroup(groupName,groupKeys);
  return convertEngineParameterSelectionChoice(selectionList);
}

Fixed version (ground truth):
public Collection getSelectionListForCascadingGroup(IViewerReportDesignHandle design,String groupName,Object[] groupKeys,InputOptions options) throws ReportServiceException {
  IGetParameterDefinitionTask task=getParameterDefinitionTask(design,options);
  ViewerAttributeBean bean=getViewerAttrBean(options);
  if (bean != null)   task.setParameterValues(bean.getParameters());
  task.evaluateQuery(groupName);
  Collection selectionList=task.getSelectionListForCascadingGroup(groupName,groupKeys);
  return convertEngineParameterSelectionChoice(selectionList);
}
Program: 77361
Project: 77361
Buggy source:
public Collection getParameterSelectionList(IViewerReportDesignHandle design,InputOptions runOptions,String paramName) throws ReportServiceException {
  IGetParameterDefinitionTask task=getParameterDefinitionTask(design,runOptions);
  Collection selectionList=task.getSelectionList(paramName);
  return convertEngineParameterSelectionChoice(selectionList);
}

Fixed version (ground truth):
public Collection getParameterSelectionList(IViewerReportDesignHandle design,InputOptions runOptions,String paramName) throws ReportServiceException {
  IGetParameterDefinitionTask task=getParameterDefinitionTask(design,runOptions);
  ViewerAttributeBean bean=getViewerAttrBean(runOptions);
  if (bean != null)   task.setParameterValues(bean.getParameters());
  Collection selectionList=task.getSelectionList(paramName);
  return convertEngineParameterSelectionChoice(selectionList);
}
Program: 77362
Project: 77362
Buggy source:
/** 
 * @param options
 * @return
 */
Map getModuleOptions(InputOptions options){
  if (options != null) {
    HttpServletRequest request=(HttpServletRequest)options.getOption(InputOptions.OPT_REQUEST);
    if (request != null) {
      ViewerAttributeBean bean=(ViewerAttributeBean)request.getAttribute(IBirtConstants.ATTRIBUTE_BEAN);
      if (bean != null)       return bean.getModuleOptions();
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Get Module options from ViewerAttributeBean
 * @param options
 * @return
 */
private Map getModuleOptions(InputOptions options){
  ViewerAttributeBean bean=getViewerAttrBean(options);
  if (bean != null)   return bean.getModuleOptions();
  return null;
}
Program: 77363
Project: 77363
Buggy source:
private static String toString_OdaDataSourceDesign(Object source){
  OdaDataSourceDesign dataSource=(OdaDataSourceDesign)source;
  StringBuffer stringBuffer=new StringBuffer("String_Node_Str");
  if (!isEmpty(dataSource.getName()))   stringBuffer.append("String_Node_Str" + dataSource.getName() + "String_Node_Str");
  if (!isEmpty(dataSource.getAfterCloseScript()))   stringBuffer.append("String_Node_Str" + dataSource.getAfterCloseScript() + "String_Node_Str");
  if (!isEmpty(dataSource.getAfterOpenScript()))   stringBuffer.append("String_Node_Str" + dataSource.getAfterOpenScript() + "String_Node_Str");
  if (!isEmpty(dataSource.getBeforeCloseScript()))   stringBuffer.append("String_Node_Str" + dataSource.getBeforeCloseScript() + "String_Node_Str");
  if (!isEmpty(dataSource.getBeforeOpenScript()))   stringBuffer.append("String_Node_Str" + dataSource.getBeforeOpenScript() + "String_Node_Str");
  if (!isEmpty(dataSource.getExtensionID()))   stringBuffer.append("String_Node_Str" + dataSource.getExtensionID() + "String_Node_Str");
  if (!isEmpty(dataSource.getPrivateProperties()))   stringBuffer.append("String_Node_Str" + dataSource.getPrivateProperties() + "String_Node_Str");
  if (!isEmpty(dataSource.getPublicProperties()))   stringBuffer.append("String_Node_Str" + dataSource.getPublicProperties() + "String_Node_Str");
  stringBuffer.append("String_Node_Str");
  return stringBuffer.toString();
}

Fixed version (ground truth):
private static String toString_OdaDataSourceDesign(Object source){
  OdaDataSourceDesign dataSource=(OdaDataSourceDesign)source;
  StringBuffer stringBuffer=new StringBuffer("String_Node_Str");
  if (!isEmpty(dataSource.getName()))   stringBuffer.append("String_Node_Str" + dataSource.getName() + "String_Node_Str");
  if (!isEmpty(dataSource.getAfterCloseScript()))   stringBuffer.append("String_Node_Str" + dataSource.getAfterCloseScript() + "String_Node_Str");
  if (!isEmpty(dataSource.getAfterOpenScript()))   stringBuffer.append("String_Node_Str" + dataSource.getAfterOpenScript() + "String_Node_Str");
  if (!isEmpty(dataSource.getBeforeCloseScript()))   stringBuffer.append("String_Node_Str" + dataSource.getBeforeCloseScript() + "String_Node_Str");
  if (!isEmpty(dataSource.getBeforeOpenScript()))   stringBuffer.append("String_Node_Str" + dataSource.getBeforeOpenScript() + "String_Node_Str");
  if (!isEmpty(dataSource.getExtensionID()))   stringBuffer.append("String_Node_Str" + dataSource.getExtensionID() + "String_Node_Str");
  if (!isEmpty(dataSource.getPrivateProperties()))   stringBuffer.append("String_Node_Str" + dataSource.getPrivateProperties() + "String_Node_Str");
  stringBuffer.append("String_Node_Str");
  return stringBuffer.toString();
}
Program: 77365
Project: 77365
Buggy source:
/** 
 * get allocated height
 * @return
 */
public int getAllocatedHeight(){
  int topMarginHeight=PropertyUtil.getDimensionValue(style.getProperty(StyleConstants.STYLE_MARGIN_TOP));
  int bottomMarginHeight=PropertyUtil.getDimensionValue(style.getProperty(StyleConstants.STYLE_MARGIN_BOTTOM));
  int result=0;
  if (topMarginHeight >= 0)   result=height + topMarginHeight;
  if (bottomMarginHeight >= 0)   result=result + bottomMarginHeight;
  return result;
}

Fixed version (ground truth):
/** 
 * get allocated height
 * @return
 */
public int getAllocatedHeight(){
  return height + PropertyUtil.getDimensionValue(style.getProperty(StyleConstants.STYLE_MARGIN_TOP)) + PropertyUtil.getDimensionValue(style.getProperty(StyleConstants.STYLE_MARGIN_BOTTOM));
}
Program: 77366
Project: 77366
Buggy source:
public String onCustomImage(IImage image,IReportContext context){
  return onCustomImage(image,context.getAppContext());
}

Fixed version (ground truth):
public String onCustomImage(IImage image,IReportContext context){
  return onCustomImage(image,getRenderContext(context));
}
Program: 77367
Project: 77367
Buggy source:
public IParameterDefnBase getParameterDefn(String name){
  IParameterDefnBase ret=null;
  if (name == null) {
    return ret;
  }
  Collection original=((ReportRunnable)runnable).getParameterDefns(false);
  Iterator iter=original.iterator();
  while (iter.hasNext()) {
    ParameterDefnBase pBase=(ParameterDefnBase)iter.next();
    if (name.equals(pBase.getName())) {
      try {
        ret=(IParameterDefnBase)pBase.clone();
        break;
      }
 catch (      CloneNotSupportedException e) {
        log.log(Level.SEVERE,e.getMessage(),e);
      }
    }
  }
  if (ret != null) {
    if (ret instanceof ScalarParameterDefn) {
      ((ScalarParameterDefn)ret).setReportDesign((ReportDesignHandle)runnable.getDesignHandle());
      ((ScalarParameterDefn)ret).setLocale(locale);
      ((ScalarParameterDefn)ret).evaluateSelectionList();
    }
 else     if (ret instanceof ParameterGroupDefn) {
      Iterator iter2=((ParameterGroupDefn)ret).getContents().iterator();
      while (iter2.hasNext()) {
        IParameterDefnBase p=(IParameterDefnBase)iter2.next();
        if (p instanceof ScalarParameterDefn) {
          ((ScalarParameterDefn)p).setReportDesign((ReportDesignHandle)runnable.getDesignHandle());
          ((ScalarParameterDefn)p).setLocale(locale);
          ((ScalarParameterDefn)p).evaluateSelectionList();
        }
      }
    }
  }
  return ret;
}

Fixed version (ground truth):
public IParameterDefnBase getParameterDefn(String name){
  IParameterDefnBase ret=null;
  if (name == null) {
    return ret;
  }
  Collection original=((ReportRunnable)runnable).getParameterDefns(true);
  Iterator iter=original.iterator();
  while (iter.hasNext()) {
    ParameterDefnBase pBase=(ParameterDefnBase)iter.next();
    if (name.equals(pBase.getName())) {
      try {
        ret=(IParameterDefnBase)pBase.clone();
        break;
      }
 catch (      CloneNotSupportedException e) {
        log.log(Level.SEVERE,e.getMessage(),e);
      }
    }
  }
  if (ret != null) {
    if (ret instanceof ScalarParameterDefn) {
      ((ScalarParameterDefn)ret).setReportDesign((ReportDesignHandle)runnable.getDesignHandle());
      ((ScalarParameterDefn)ret).setLocale(locale);
      ((ScalarParameterDefn)ret).evaluateSelectionList();
    }
 else     if (ret instanceof ParameterGroupDefn) {
      Iterator iter2=((ParameterGroupDefn)ret).getContents().iterator();
      while (iter2.hasNext()) {
        IParameterDefnBase p=(IParameterDefnBase)iter2.next();
        if (p instanceof ScalarParameterDefn) {
          ((ScalarParameterDefn)p).setReportDesign((ReportDesignHandle)runnable.getDesignHandle());
          ((ScalarParameterDefn)p).setLocale(locale);
          ((ScalarParameterDefn)p).evaluateSelectionList();
        }
      }
    }
  }
  return ret;
}
Program: 77370
Project: 77370
Buggy source:
/** 
 * Creates a new DtE API IParameterDefinition from a model's DataSetParameterHandle.
 */
IParameterDefinition newParam(DataSetParameterHandle modelParam){
  ParameterDefinition dteParam=new ParameterDefinition();
  dteParam.setName(modelParam.getName());
  if (modelParam.getPosition() != null)   dteParam.setPosition(modelParam.getPosition().intValue());
  dteParam.setType(toDteDataType(modelParam.getDataType()));
  dteParam.setInputMode(modelParam.isInput());
  dteParam.setOutputMode(modelParam.isOutput());
  dteParam.setNullable(modelParam.allowNull());
  dteParam.setInputOptional(modelParam.isOptional());
  dteParam.setDefaultInputValue(modelParam.getDefaultValue());
  return dteParam;
}

Fixed version (ground truth):
/** 
 * Creates a new DtE API IParameterDefinition from a model's DataSetParameterHandle.
 */
IParameterDefinition newParam(DataSetParameterHandle modelParam){
  ParameterDefinition dteParam=new ParameterDefinition();
  dteParam.setName(modelParam.getName());
  if (modelParam.getPosition() != null)   dteParam.setPosition(modelParam.getPosition().intValue());
  dteParam.setType(toDteDataType(modelParam.getDataType()));
  dteParam.setInputMode(modelParam.isInput());
  dteParam.setOutputMode(modelParam.isOutput());
  dteParam.setNullable(modelParam.allowNull());
  dteParam.setInputOptional(modelParam.isOptional());
  dteParam.setDefaultInputValue(modelParam.getDefaultValue());
  dteParam.setNativeType(modelParam.getNativeDataType().intValue());
  return dteParam;
}
Program: 77373
Project: 77373
Buggy source:
/** 
 * Sets the data type in parameter type choices to this parameter. The allowed values are: <ul> <li>PARAM_TYPE_ANY <li>PARAM_TYPE_INTEGER <li>PARAM_TYPE_STRING <li>PARAM_TYPE_DATETIME <li>PARAM_TYPE_DECIMAL <li>PARAM_TYPE_FLOAT <li>PARAM_TYPE_BOOLEAN </ul>
 * @param dataType the data type to set
 * @throws SemanticException if the value is not in the above list.
 */
public void setParameterDataType(String dataType) throws SemanticException {
  setProperty(DATA_TYPE_MEMBER,dataType);
}

Fixed version (ground truth):
/** 
 * Sets the data type in parameter type choices to this parameter. The allowed values are: <ul> <li>PARAM_TYPE_ANY <li>PARAM_TYPE_INTEGER <li>PARAM_TYPE_STRING <li>PARAM_TYPE_DATETIME <li>PARAM_TYPE_DECIMAL <li>PARAM_TYPE_FLOAT <li>PARAM_TYPE_BOOLEAN </ul>
 * @param dataType the data type to set
 * @throws SemanticException if the value is not in the above list.
 */
public void setParameterDataType(String dataType){
  setProperty(DATA_TYPE_MEMBER,dataType);
}
Program: 77374
Project: 77374
Buggy source:
/** 
 * Return the IQueryResults
 * @param dataEngine
 * @param dataSetDesignName
 * @param appContext
 * @param joinConditions
 * @param isLeftDataSet
 * @return
 * @throws DataException
 */
private IQueryResults getResultSetQuery(DataEngineImpl dataEngine,String dataSetDesignName,Map appContext,List joinConditions,boolean isLeftDataSet) throws DataException {
  QueryDefinition queryDefinition=new QueryDefinition();
  queryDefinition.setDataSetName(dataSetDesignName);
  IPreparedQuery preparedQuery;
  try {
    preparedQuery=PreparedQueryUtil.newInstance(dataEngine,queryDefinition,appContext);
    IQueryResults ri=preparedQuery.execute(null);
    return ri;
  }
 catch (  BirtException e) {
    throw new DataException(e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Return the IQueryResults
 * @param dataEngine
 * @param dataSetDesignName
 * @param appContext
 * @param joinConditions
 * @param isLeftDataSet
 * @return
 * @throws DataException
 */
private IQueryResults getResultSetQuery(DataEngineImpl dataEngine,String dataSetDesignName,Map appContext,List joinConditions,boolean isLeftDataSet) throws DataException {
  QueryDefinition queryDefinition=new QueryDefinition();
  queryDefinition.setDataSetName(dataSetDesignName);
  setParameterBindings(dataEngine,dataSetDesignName,isLeftDataSet,queryDefinition);
  IPreparedQuery preparedQuery;
  try {
    preparedQuery=PreparedQueryUtil.newInstance(dataEngine,queryDefinition,appContext);
    IQueryResults ri=preparedQuery.execute(null);
    return ri;
  }
 catch (  BirtException e) {
    throw new DataException(e.getMessage());
  }
}
Program: 77375
Project: 77375
Buggy source:
/** 
 * Initialize the resultClass. This method is lightweight.
 * @param dataEngine
 * @param dataSetDesign
 * @param appContext
 * @throws DataException
 */
private void initializeResultClass(DataEngineImpl dataEngine,Map appContext) throws DataException {
  try {
    IQueryResults left=getResultSetQuery(dataEngine,dataSet.getLeftDataSetDesignName(),appContext,dataSet.getJoinConditions(),false);
    IQueryResults right=getResultSetQuery(dataEngine,dataSet.getRightDataSetDesignName(),appContext,dataSet.getJoinConditions(),false);
    JointResultMetadata meta=getJointResultMetadata(left.getResultMetaData(),right.getResultMetaData());
    resultClass=meta.getResultClass();
  }
 catch (  BirtException be) {
    throw DataException.wrap(be);
  }
}

Fixed version (ground truth):
/** 
 * Initialize the resultClass. This method is lightweight.
 * @param dataEngine
 * @param dataSetDesign
 * @param appContext
 * @throws DataException
 */
private void initializeResultClass(DataEngineImpl dataEngine,Map appContext) throws DataException {
  try {
    IQueryResults left=getResultSetQuery(dataEngine,dataSet.getLeftDataSetDesignName(),appContext,dataSet.getJoinConditions(),true);
    IQueryResults right=getResultSetQuery(dataEngine,dataSet.getRightDataSetDesignName(),appContext,dataSet.getJoinConditions(),false);
    JointResultMetadata meta=getJointResultMetadata(left.getResultMetaData(),right.getResultMetaData());
    resultClass=meta.getResultClass();
  }
 catch (  BirtException be) {
    throw DataException.wrap(be);
  }
}
Program: 77376
Project: 77376
Buggy source:
/** 
 * Constructor.
 * @param dataEngine
 * @param queryDefn
 * @param dataSetDesign
 * @param appContext
 * @throws DataException
 */
PreparedJointDataSourceQuery(DataEngineImpl dataEngine,IQueryDefinition queryDefn,IBaseDataSetDesign dataSetDesign,Map appContext) throws DataException {
  super(dataEngine,queryDefn,dataSetDesign,appContext);
  this.dataEngine=dataEngine;
  this.dataSetDesign=dataSetDesign;
  this.appContext=appContext;
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param dataEngine
 * @param queryDefn
 * @param dataSetDesign
 * @param appContext
 * @throws DataException
 */
PreparedJointDataSourceQuery(DataEngineImpl dataEngine,IQueryDefinition queryDefn,IBaseDataSetDesign dataSetDesign,Map appContext) throws DataException {
  super(dataEngine,queryDefn,dataSetDesign,appContext);
  this.dataEngine=dataEngine;
  this.dataSetDesign=dataSetDesign;
  this.appContext=appContext;
  this.parameterBindings=queryDefn.getInputParamBindings();
}
Program: 77378
Project: 77378
Buggy source:
/** 
 * Informs this session some resources is changed. Session will check all opened mudules, all interfered modules will be informed of the changes. <p> Current, only changes of library or message file is supported.
 * @param ev the library change event to fire
 */
public void fireLibChange(LibraryChangeEvent ev){
  String path=ev.getChangedResourcePath();
  try {
    path=new File(path).toURL().toString();
  }
 catch (  MalformedURLException e) {
    return;
  }
  Iterator iter=getModuleIterator();
  while (iter.hasNext()) {
    Module module=(Module)iter.next();
    if (module.getLocation().equalsIgnoreCase(path) || module.getLibraryByLocation(path,IAccessControl.ARBITARY_LEVEL) != null) {
      LibraryChangeEvent event=new LibraryChangeEvent(ev.getChangedResourcePath());
      event.setTarget(module);
      event.setDeliveryPath(ev.getDeliveryPath());
      module.broadcastResourceChangeEvent(event);
    }
  }
}

Fixed version (ground truth):
/** 
 * Informs this session some resources is changed. Session will check all opened mudules, all interfered modules will be informed of the changes. <p> Current, only changes of library or message file is supported.
 * @param ev the library change event to fire
 */
public void fireLibChange(LibraryChangeEvent ev){
  String path=ev.getChangedResourcePath();
  try {
    path=new File(path).toURL().toString();
  }
 catch (  MalformedURLException e) {
    return;
  }
  Iterator iter=getModuleIterator();
  while (iter.hasNext()) {
    Module module=(Module)iter.next();
    if (module.getLocation().equalsIgnoreCase(path) || module.getLibraryByLocation(path,IAccessControl.ARBITARY_LEVEL) != null) {
      LibraryChangeEvent event=new LibraryChangeEvent(ev.getChangedResourcePath());
      event.setTarget(module);
      event.setDeliveryPath(ev.getDeliveryPath());
      module.broadcastResourceChangeEvent(event);
    }
  }
  broadcastResourceChangeEvent(ev);
}
Program: 77381
Project: 77381
Buggy source:
/** 
 * Map oda data type to model data type.
 * @param modelDataType
 * @return
 */
private static String toModelDataType(int modelDataType){
  if (modelDataType == DataType.INTEGER_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER;
 else   if (modelDataType == DataType.STRING_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_STRING;
 else   if (modelDataType == DataType.DATE_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME;
 else   if (modelDataType == DataType.DECIMAL_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_DECIMAL;
 else   if (modelDataType == DataType.DOUBLE_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_FLOAT;
  return DesignChoiceConstants.COLUMN_DATA_TYPE_ANY;
}

Fixed version (ground truth):
/** 
 * Map oda data type to model data type.
 * @param modelDataType
 * @return
 */
public static String toModelDataType(int modelDataType){
  if (modelDataType == DataType.INTEGER_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER;
 else   if (modelDataType == DataType.STRING_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_STRING;
 else   if (modelDataType == DataType.DATE_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME;
 else   if (modelDataType == DataType.DECIMAL_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_DECIMAL;
 else   if (modelDataType == DataType.DOUBLE_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_FLOAT;
  return DesignChoiceConstants.COLUMN_DATA_TYPE_ANY;
}
Program: 77382
Project: 77382
Buggy source:
public void run(){
  if (Policy.TRACING_ACTIONS) {
    System.out.println("String_Node_Str" + getSourceViewer());
  }
  if (isEnabled()) {
    DataSetHandle handle=(DataSetHandle)getSelectedObjects().getFirstElement();
    try {
      DataSetUIUtil.updateColumnCache(handle);
    }
 catch (    SemanticException e) {
      ExceptionHandler.handle(e);
    }
    getSourceViewer().refresh(handle);
  }
}

Fixed version (ground truth):
public void run(){
  if (Policy.TRACING_ACTIONS) {
    System.out.println("String_Node_Str" + getSourceViewer());
  }
  if (isEnabled()) {
    DataSetHandle handle=(DataSetHandle)getSelectedObjects().getFirstElement();
    try {
      DataSetUIUtil.updateColumnCacheAfterCleanRs(handle);
    }
 catch (    SemanticException e) {
      ExceptionHandler.handle(e);
    }
    getSourceViewer().refresh(handle);
  }
}
Program: 77383
Project: 77383
Buggy source:
/** 
 * @param resultSetColumnHandle
 * @param uniqueColumnName
 * @param index
 * @throws BirtException
 */
private void addResultSetColumn(PropertyHandle resultSetColumnHandle,String uniqueColumnName,int index) throws BirtException {
  ResultSetColumn rsColumn=new ResultSetColumn();
  rsColumn.setColumnName(uniqueColumnName);
  rsColumn.setPosition(new Integer(index));
  resultSetColumnHandle.addItem(rsColumn);
}

Fixed version (ground truth):
/** 
 * @param meta
 * @throws BirtException 
 */
private void addResultSetColumn(DataSetHandle dataSetHandle,IResultMetaData meta) throws BirtException {
  if (meta == null || !(dataSetHandle instanceof OdaDataSetHandle))   return;
  PropertyHandle resultSetColumnHandle=dataSetHandle.getPropertyHandle(DataSetHandle.RESULT_SET_PROP);
  for (int i=1; i <= meta.getColumnCount(); i++) {
    OdaResultSetColumn rsColumn=new OdaResultSetColumn();
    if (!meta.isComputedColumn(i)) {
      try {
        rsColumn.setColumnName(meta.getColumnName(i));
        rsColumn.setDataType(toModelDataType(meta.getColumnType(i)));
        rsColumn.setNativeName(meta.getColumnName(i));
        rsColumn.setPosition(new Integer(i));
        resultSetColumnHandle.addItem(rsColumn);
      }
 catch (      BirtException e) {
        e.printStackTrace();
      }
    }
  }
}
Program: 77384
Project: 77384
Buggy source:
/** 
 * @param dataSetName
 * @return
 * @throws BirtException
 */
private IResultMetaData getRealMetaData(DataSetHandle dataSetHandle) throws BirtException {
  QueryDefinition query=new QueryDefinition();
  query.setDataSetName(dataSetHandle.getQualifiedName());
  query.setMaxRows(1);
  IResultMetaData metaData=MetaDataPopulator.retrieveResultMetaData(dataSetHandle);
  if (metaData == null) {
    metaData=new QueryExecutionHelper(dataEngine,modelAdaptor,sessionContext,false).executeQuery(query).getResultMetaData();
    if (needsUseResultHint(dataSetHandle,metaData)) {
      metaData=new QueryExecutionHelper(dataEngine,modelAdaptor,sessionContext,true).executeQuery(query).getResultMetaData();
    }
  }
  if (!(dataSetHandle instanceof ScriptDataSetHandle))   clearUnusedData(dataSetHandle,metaData);
  return metaData;
}

Fixed version (ground truth):
/** 
 * @param dataSetName
 * @return
 * @throws BirtException
 */
private IResultMetaData getRealMetaData(DataSetHandle dataSetHandle) throws BirtException {
  QueryDefinition query=new QueryDefinition();
  query.setDataSetName(dataSetHandle.getQualifiedName());
  query.setMaxRows(1);
  IResultMetaData metaData=MetaDataPopulator.retrieveResultMetaData(dataSetHandle);
  if (metaData == null) {
    metaData=new QueryExecutionHelper(dataEngine,modelAdaptor,sessionContext,false).executeQuery(query).getResultMetaData();
    addResultSetColumn(dataSetHandle,metaData);
  }
  if (needsUseResultHint(dataSetHandle,metaData)) {
    metaData=new QueryExecutionHelper(dataEngine,modelAdaptor,sessionContext,true).executeQuery(query).getResultMetaData();
  }
  if (!(dataSetHandle instanceof ScriptDataSetHandle))   clearUnusedData(dataSetHandle,metaData);
  return metaData;
}
Program: 77386
Project: 77386
Buggy source:
public ParameterAdapter(DataSetParameterHandle modelParam){
  setName(modelParam.getName());
  if (modelParam.getPosition() != null)   setPosition(modelParam.getPosition().intValue());
  setType(ModelAdapter.adaptModelDataType(modelParam.getDataType()));
  setInputMode(modelParam.isInput());
  setOutputMode(modelParam.isOutput());
  setNullable(modelParam.allowNull());
  setInputOptional(modelParam.isOptional());
  if (modelParam instanceof OdaDataSetParameterHandle) {
    if (((OdaDataSetParameterHandle)modelParam).getParamName() != null) {
      setDefaultInputValue(PARAMS_PREFIX + "String_Node_Str" + ((OdaDataSetParameterHandle)modelParam).getParamName()+ "String_Node_Str");
    }
  }
 else   setDefaultInputValue(modelParam.getDefaultValue());
}

Fixed version (ground truth):
public ParameterAdapter(DataSetParameterHandle modelParam){
  setName(modelParam.getName());
  if (modelParam.getPosition() != null)   setPosition(modelParam.getPosition().intValue());
  if (modelParam.getNativeDataType() != null)   setNativeType(modelParam.getNativeDataType().intValue());
  setType(ModelAdapter.adaptModelDataType(modelParam.getDataType()));
  setInputMode(modelParam.isInput());
  setOutputMode(modelParam.isOutput());
  setNullable(modelParam.allowNull());
  setInputOptional(modelParam.isOptional());
  if (modelParam instanceof OdaDataSetParameterHandle && ((OdaDataSetParameterHandle)modelParam).getParamName() != null) {
    setDefaultInputValue(PARAMS_PREFIX + "String_Node_Str" + ((OdaDataSetParameterHandle)modelParam).getParamName()+ "String_Node_Str");
  }
 else   setDefaultInputValue(modelParam.getDefaultValue());
}
Program: 77388
Project: 77388
Buggy source:
/** 
 * Creates a new DtE API IParameterDefinition from a model's DataSetParameterHandle.
 */
IParameterDefinition newParam(DataSetParameterHandle modelParam){
  ParameterDefinition dteParam=new ParameterDefinition();
  dteParam.setName(modelParam.getName());
  if (modelParam.getPosition() != null)   dteParam.setPosition(modelParam.getPosition().intValue());
  dteParam.setType(toDteDataType(modelParam.getDataType()));
  dteParam.setInputMode(modelParam.isInput());
  dteParam.setOutputMode(modelParam.isOutput());
  dteParam.setNullable(modelParam.allowNull());
  dteParam.setInputOptional(modelParam.isOptional());
  dteParam.setDefaultInputValue(modelParam.getDefaultValue());
  dteParam.setNativeType(modelParam.getNativeDataType().intValue());
  return dteParam;
}

Fixed version (ground truth):
/** 
 * Creates a new DtE API IParameterDefinition from a model's DataSetParameterHandle.
 */
IParameterDefinition newParam(DataSetParameterHandle modelParam){
  ParameterDefinition dteParam=new ParameterDefinition();
  dteParam.setName(modelParam.getName());
  if (modelParam.getPosition() != null)   dteParam.setPosition(modelParam.getPosition().intValue());
  if (modelParam.getNativeDataType() != null)   dteParam.setNativeType(modelParam.getNativeDataType().intValue());
  dteParam.setType(toDteDataType(modelParam.getDataType()));
  dteParam.setInputMode(modelParam.isInput());
  dteParam.setOutputMode(modelParam.isOutput());
  dteParam.setNullable(modelParam.allowNull());
  dteParam.setInputOptional(modelParam.isOptional());
  dteParam.setDefaultInputValue(modelParam.getDefaultValue());
  return dteParam;
}
Program: 77389
Project: 77389
Buggy source:
/** 
 * Sets the column name.
 * @param columnName the column name to set.
 * @throws SemanticException if the new column name duplicates with the existed ones.
 */
public void setName(String columnName) throws SemanticException {
  if (columnName != null) {
    String tmpName=DataBoundColumnUtil.makeUniqueName(getElementHandle(),columnName,(ComputedColumn)getStructure());
    if (!columnName.equals(tmpName)) {
      throw new PropertyValueException(getElementHandle().getElement(),getPropertyDefn(),columnName,PropertyValueException.DESIGN_EXCEPTION_VALUE_EXISTS);
    }
  }
  setProperty(ComputedColumn.NAME_MEMBER,columnName);
}

Fixed version (ground truth):
/** 
 * Sets the column name.
 * @param columnName the column name to set.
 * @throws SemanticException if the new column name duplicates with the existed ones.
 */
public void setName(String columnName) throws SemanticException {
  List resultList=ColumnBindingNameValidator.getInstance().validateForReplacing(getElementHandle(),getPropertyDefn(),getStructure(),columnName);
  if (resultList.size() > 0) {
    throw (PropertyValueException)resultList.get(0);
  }
  setProperty(ComputedColumn.NAME_MEMBER,columnName);
}
Program: 77390
Project: 77390
Buggy source:
/** 
 * Removes all script libs.
 * @throws SemanticException
 */
public void dropAllScriptLibs() throws SemanticException {
  List scriptLibs=getListProperty(SCRIPTLIBS_PROP);
  int count=scriptLibs.size();
  for (int i=count - 1; i >= 0; --i) {
    ScriptLib scriptLib=(ScriptLib)scriptLibs.get(i);
    dropScriptLib(scriptLib);
  }
}

Fixed version (ground truth):
/** 
 * Removes all script libs.
 * @throws SemanticException
 */
public void dropAllScriptLibs() throws SemanticException {
  List scriptLibs=getFilteredStructureList(SCRIPTLIBS_PROP,ScriptLib.SCRIPTLIB_NAME_MEMBER);
  if (scriptLibs == null)   return;
  int count=scriptLibs.size();
  for (int i=count - 1; i >= 0; --i) {
    ScriptLibHandle scriptLibHandle=(ScriptLibHandle)scriptLibs.get(i);
    dropScriptLib(scriptLibHandle);
  }
}
Program: 77391
Project: 77391
Buggy source:
/** 
 * Removes special script lib.
 * @param scriptLib script lib
 * @throws SemanticException
 */
public void dropScriptLib(ScriptLib scriptLib) throws SemanticException {
  ElementPropertyDefn propDefn=module.getPropertyDefn(SCRIPTLIBS_PROP);
  if (scriptLib == null)   return;
  PropertyCommand cmd=new PropertyCommand(getModule(),getElement());
  cmd.removeItem(new CachedMemberRef(propDefn),scriptLib);
}

Fixed version (ground truth):
/** 
 * Removes special script lib handle.
 * @param scriptLibHandle script lib handle
 * @throws SemanticException
 */
public void dropScriptLib(ScriptLibHandle scriptLibHandle) throws SemanticException {
  ElementPropertyDefn propDefn=module.getPropertyDefn(SCRIPTLIBS_PROP);
  if (scriptLibHandle == null)   return;
  PropertyCommand cmd=new PropertyCommand(getModule(),getElement());
  cmd.removeItem(new CachedMemberRef(propDefn),scriptLibHandle.getStructure());
}
Program: 77392
Project: 77392
Buggy source:
/** 
 * Shifts jar file from source position to destination position.
 * @param sourceIndex source position
 * @param destIndex destination position
 * @throws SemanticException
 */
public void shiftScriptLibs(int sourceIndex,int destIndex) throws SemanticException {
  ElementPropertyDefn propDefn=module.getPropertyDefn(SCRIPTLIBS_PROP);
  PropertyCommand cmd=new PropertyCommand(getModule(),getElement());
  cmd.moveItem(new CachedMemberRef(propDefn),sourceIndex,destIndex);
}

Fixed version (ground truth):
/** 
 * Shifts jar file from source position to destination position. For example, if a list has A, B, C scriptLib in order, when move A scriptLib to <code>newPosn</code> with the value 2, the sequence becomes B, A, C.
 * @param sourceIndex source position. The range is <code>sourceIndex &lt; 0 || sourceIndex &gt;= list.size()</code>
 * @param destIndex destination position.The range is <code> destIndex &lt; 0 || destIndex &gt;= list.size()</code>
 * @throws SemanticException
 */
public void shiftScriptLibs(int sourceIndex,int destIndex) throws SemanticException {
  ElementPropertyDefn propDefn=module.getPropertyDefn(SCRIPTLIBS_PROP);
  PropertyCommand cmd=new PropertyCommand(getModule(),getElement());
  cmd.moveItem(new CachedMemberRef(propDefn),sourceIndex,destIndex);
}
Program: 77393
Project: 77393
Buggy source:
/** 
 * Add script lib
 * @param scriptLib script lib
 * @throws SemanticException
 */
public void addScriptLib(ScriptLib scriptLib) throws SemanticException {
  ElementPropertyDefn propDefn=module.getPropertyDefn(SCRIPTLIBS_PROP);
  if (scriptLib == null || StringUtil.isBlank(scriptLib.getName())) {
    throw new PropertyValueException(getElement(),propDefn,scriptLib,PropertyValueException.DESIGN_EXCEPTION_INVALID_VALUE);
  }
  PropertyCommand cmd=new PropertyCommand(getModule(),getElement());
  cmd.addItem(new CachedMemberRef(propDefn),scriptLib);
}

Fixed version (ground truth):
/** 
 * Add script lib
 * @param scriptLib script lib
 * @throws SemanticException
 */
public void addScriptLib(ScriptLib scriptLib) throws SemanticException {
  ElementPropertyDefn propDefn=module.getPropertyDefn(SCRIPTLIBS_PROP);
  PropertyCommand cmd=new PropertyCommand(getModule(),getElement());
  cmd.addItem(new CachedMemberRef(propDefn),scriptLib);
}
Program: 77394
Project: 77394
Buggy source:
/** 
 * This method tests whether column bindings in ExprManager is valid or not.
 * @param exprManager
 * @return
 * @throws DataException
 */
public static void validateColumnBinding(ExprManager exprManager) throws DataException {
  ExprManagerUtil util=new ExprManagerUtil();
  util.exprManager=exprManager;
  util.checkDependencyCycle();
  util.checkGroupNameValidation();
}

Fixed version (ground truth):
/** 
 * This method tests whether column bindings in ExprManager is valid or not.
 * @param exprManager
 * @return
 * @throws DataException
 */
public static void validateColumnBinding(ExprManager exprManager) throws DataException {
  ExprManagerUtil util=new ExprManagerUtil();
  util.exprManager=exprManager;
  util.checkColumnBindingExpression();
  util.checkDependencyCycle();
  util.checkGroupNameValidation();
}
Program: 77395
Project: 77395
Buggy source:
/** 
 * Test whether high level group keys are depended on low level group keys.
 * @param exprManager
 * @return
 * @throws DataException 
 */
private void checkGroupNameValidation() throws DataException {
  HashMap map=this.getGroupKeys();
  Iterator it=map.keySet().iterator();
  while (it.hasNext()) {
    Integer level=(Integer)it.next();
    exprManager.setEntryGroupLevel(level.intValue());
    if (!ExpressionCompilerUtil.hasColumnRow(map.get(level).toString(),exprManager)) {
      exprManager.setEntryGroupLevel(ExprManager.OVERALL_GROUP);
      if (!isColumnBindingExist(map.get(level).toString())) {
        throw new DataException(ResourceConstants.COLUMN_BINDING_NOT_EXIST,map.get(level).toString());
      }
      throw new DataException(ResourceConstants.INVALID_GROUP_KEY,new Object[]{map.get(level).toString(),level});
    }
  }
  exprManager.setEntryGroupLevel(ExprManager.OVERALL_GROUP);
}

Fixed version (ground truth):
/** 
 * Test whether high level group keys are depended on low level group keys.
 * @param exprManager
 * @return
 * @throws DataException 
 */
private void checkGroupNameValidation() throws DataException {
  HashMap map=this.getGroupKeys();
  Iterator it=map.keySet().iterator();
  while (it.hasNext()) {
    Integer level=(Integer)it.next();
    exprManager.setEntryGroupLevel(level.intValue());
    if (!ExpressionCompilerUtil.hasColumnRow(map.get(level).toString(),exprManager)) {
      exprManager.setEntryGroupLevel(ExprManager.OVERALL_GROUP);
      if (!isColumnBindingExist(map.get(level).toString())) {
        throw new DataException(ResourceConstants.COLUMN_BINDING_NOT_EXIST,map.get(level).toString());
      }
      throw new DataException(ResourceConstants.INVALID_GROUP_KEY_COLUMN,new Object[]{map.get(level).toString(),level});
    }
  }
  exprManager.setEntryGroupLevel(ExprManager.OVERALL_GROUP);
}