nus-yam/ex-repair huggingface dataset:
Program: 74350
Project: 74350
Buggy source:
/** 
 * create a highlight rule from a structure handle.
 * @param ruleHandle rule in the MODEL.
 * @return rule design, null if exist any error.
 */
protected HighlightRuleDesign createHighlightRule(StructureHandle ruleHandle,String defaultStr){
  HighlightRuleDesign rule=new HighlightRuleDesign();
  MemberHandle hOperator=ruleHandle.getMember(HighlightRule.OPERATOR_MEMBER);
  MemberHandle hValue1=ruleHandle.getMember(HighlightRule.VALUE1_MEMBER);
  MemberHandle hValue2=ruleHandle.getMember(HighlightRule.VALUE2_MEMBER);
  MemberHandle hTestExpr=ruleHandle.getMember(HighlightRule.TEST_EXPR_MEMBER);
  String oper=hOperator.getStringValue();
  String value1=hValue1.getStringValue();
  String value2=hValue2.getStringValue();
  String testExpr=hTestExpr.getStringValue();
  rule.setExpression(oper,value1,value2);
  if (testExpr != null && testExpr.length() > 0) {
    rule.setTestExpression(testExpr);
  }
 else   if ((defaultStr != null) && defaultStr.length() > 0) {
    rule.setTestExpression(defaultStr);
  }
 else {
    return null;
  }
  StyleDeclaration style=new StyleDeclaration(cssEngine);
  setupStyle(ruleHandle,style);
  if (style.isEmpty()) {
    return null;
  }
  rule.setStyle(style);
  return rule;
}

Fixed version (ground truth):
/** 
 * create a highlight rule from a structure handle.
 * @param ruleHandle rule in the MODEL.
 * @return rule design, null if exist any error.
 */
protected HighlightRuleDesign createHighlightRule(HighlightRuleHandle ruleHandle,String defaultStr){
  boolean isListStyle=ModuleUtil.isListStyleRuleValue(ruleHandle);
  HighlightRuleDesign rule=new HighlightRuleDesign();
  if (isListStyle) {
    rule.setExpression(ruleHandle.getOperator(),ruleHandle.getValue1List());
  }
 else {
    rule.setExpression(ruleHandle.getOperator(),ruleHandle.getValue1(),ruleHandle.getValue2());
  }
  String testExpr=ruleHandle.getTestExpression();
  if (testExpr != null && testExpr.length() > 0) {
    rule.setTestExpression(testExpr);
  }
 else   if ((defaultStr != null) && defaultStr.length() > 0) {
    rule.setTestExpression(defaultStr);
  }
 else {
    return null;
  }
  StyleDeclaration style=new StyleDeclaration(cssEngine);
  setupStyle(ruleHandle,style);
  if (style.isEmpty()) {
    return null;
  }
  rule.setStyle(style);
  return rule;
}
Program: 74351
Project: 74351
Buggy source:
private Collection populateToList(IResultIterator iterator,ScalarParameterHandle parameter,SelectionFilter filter){
  ParameterHelper parameterHelper=new ParameterHelper(parameter,locale);
  Collection choices=parameterHelper.createSelectionCollection();
  int limit=parameter.getListlimit();
  try {
    while (iterator.next() && (limit <= 0 || choices.size() <= limit)) {
      if (filter != null && !filter.accept(iterator)) {
        continue;
      }
      String label=parameterHelper.getLabel(iterator);
      Object value=parameterHelper.getValue(iterator);
      choices.add(new SelectionChoice(label,value));
    }
  }
 catch (  BirtException ex) {
    log.log(Level.WARNING,ex.getMessage(),ex);
    executionContext.addException(ex);
  }
  return choices;
}

Fixed version (ground truth):
private Collection populateToList(IResultIterator iterator,ScalarParameterHandle parameter,SelectionFilter filter){
  ParameterHelper parameterHelper=new ParameterHelper(parameter,locale);
  Collection choices=parameterHelper.createSelectionCollection();
  int limit=parameter.getListlimit();
  try {
    while (iterator.next() && (limit <= 0 || choices.size() < limit)) {
      if (filter != null && !filter.accept(iterator)) {
        continue;
      }
      String label=parameterHelper.getLabel(iterator);
      Object value=parameterHelper.getValue(iterator);
      choices.add(new SelectionChoice(label,value));
    }
  }
 catch (  BirtException ex) {
    log.log(Level.WARNING,ex.getMessage(),ex);
    executionContext.addException(ex);
  }
  return choices;
}
Program: 74352
Project: 74352
Buggy source:
public ParameterHelper(ScalarParameterHandle parameter,Locale locale){
  this.parameter=parameter;
  this.distinct=parameter.distinct();
  this.labelColumnName=getLabelColumnName(parameter);
  this.valueColumnName=getValueColumnName(parameter);
  this.valueType=parameter.getDataType();
  if (parameter.isFixedOrder()) {
    this.comparator=new FixInOrderComparator(distinct);
  }
 else {
    this.comparator=createComparator(parameter,locale,distinct);
  }
}

Fixed version (ground truth):
public ParameterHelper(ScalarParameterHandle parameter,Locale locale){
  this.distinct=parameter.distinct();
  this.labelColumnName=getLabelColumnName(parameter);
  this.valueColumnName=getValueColumnName(parameter);
  this.valueType=parameter.getDataType();
  this.fixedOrder=parameter.isFixedOrder();
  if (!fixedOrder) {
    boolean sortDirectionValue="String_Node_Str".equalsIgnoreCase(parameter.getSortDirection());
    boolean sortByLabel="String_Node_Str".equalsIgnoreCase(parameter.getSortBy());
    String pattern=parameter.getPattern();
    Comparator choiceComparator=new SelectionChoiceComparator(sortByLabel,pattern,sortDirectionValue,ULocale.forLocale(locale));
    this.comparator=new DistinctComparatorDecorator(choiceComparator,distinct);
  }
}
Program: 74353
Project: 74353
Buggy source:
public Collection createSelectionCollection(){
  return new TreeSet(comparator);
}

Fixed version (ground truth):
public Collection createSelectionCollection(){
  if (fixedOrder) {
    if (!distinct) {
      return new ArrayList();
    }
    return new ArrayList(){
      private static final long serialVersionUID=1L;
      private Set values=new HashSet();
      public boolean add(      Object arg0){
        if (!values.contains(arg0)) {
          values.add(arg0);
          return super.add(arg0);
        }
        return false;
      }
    }
;
  }
  return new TreeSet(comparator);
}
Program: 74356
Project: 74356
Buggy source:
public void close() throws OLAPException {
  if (this.resultSet.getMeasureResult() == null)   return;
  List errorList=new ArrayList();
  for (int i=0; i < this.resultSet.getMeasureResult().length; i++) {
    try {
      this.resultSet.getMeasureResult()[i].getQueryResultSet().close();
    }
 catch (    IOException e) {
      errorList.add(e);
    }
  }
  if (!errorList.isEmpty()) {
    throw new OLAPException(((IOException)errorList.get(0)).getLocalizedMessage());
  }
}

Fixed version (ground truth):
public void close() throws OLAPException {
  if (this.resultSet == null || this.resultSet.getMeasureResult() == null)   return;
  List errorList=new ArrayList();
  for (int i=0; i < this.resultSet.getMeasureResult().length; i++) {
    try {
      this.resultSet.getMeasureResult()[i].getQueryResultSet().close();
    }
 catch (    IOException e) {
      errorList.add(e);
    }
  }
  if (!errorList.isEmpty()) {
    throw new OLAPException(((IOException)errorList.get(0)).getLocalizedMessage());
  }
}
Program: 74357
Project: 74357
Buggy source:
/** 
 * Adds the given structures to the corresponding property values. For example, adds result set columns to DataSet.resultSets.
 * @param propHandle the property handle
 * @param structures the list containing structures
 * @throws SemanticException if any structure in the list has invalid values.
 */
public static void addStructures(PropertyHandle propHandle,List structures) throws SemanticException {
  if (structures == null || structures.isEmpty())   return;
  if (propHandle == null)   return;
  DesignElementHandle element=propHandle.getElementHandle();
  IPropertyDefn propDefn=propHandle.getDefn();
  PropertyValueValidationUtil.validateProperty(element,propDefn.getName(),structures);
  List oldList=element.getListProperty(propDefn.getName());
  List newList=null;
  if (!propHandle.isLocal()) {
    if (oldList != null)     newList=(List)ModelUtil.copyValue(propDefn,structures);
 else     newList=new ArrayList();
    element.getElement().setProperty((ElementPropertyDefn)propDefn,newList);
  }
 else   newList=oldList;
  newList.addAll(structures);
}

Fixed version (ground truth):
/** 
 * Adds the given structures to the corresponding property values. For example, adds result set columns to DataSet.resultSets.
 * @param propHandle the property handle
 * @param structures the list containing structures
 * @throws SemanticException if any structure in the list has invalid values.
 */
public static void addStructures(PropertyHandle propHandle,List structures) throws SemanticException {
  if (structures == null || structures.isEmpty())   return;
  if (propHandle == null)   return;
  DesignElementHandle element=propHandle.getElementHandle();
  IPropertyDefn propDefn=propHandle.getDefn();
  PropertyValueValidationUtil.validateProperty(element,propDefn.getName(),structures);
  List oldList=element.getListProperty(propDefn.getName());
  List newList=null;
  if (!propHandle.isLocal()) {
    if (oldList != null)     newList=(List)ModelUtil.copyValue(propDefn,oldList);
 else     newList=new ArrayList();
    element.getElement().setProperty((ElementPropertyDefn)propDefn,newList);
  }
 else   newList=oldList;
  newList.addAll(structures);
}
Program: 74361
Project: 74361
Buggy source:
/** 
 * This method is responsible for computing the aggregation result according to the specified aggregation definitions.
 * @param aggregations
 * @param stopSign
 * @return
 * @throws DataException
 * @throws IOException
 * @throws BirtException
 */
private IAggregationResultSet[] onePassExecute(AggregationDefinition[] aggregations,StopSign stopSign) throws DataException, IOException, BirtException {
  IDiskArray[] dimPosition=getFilterResult();
  int count=0;
  for (int i=0; i < dimPosition.length; i++) {
    if (dimPosition[i] != null) {
      count++;
    }
  }
  IDimension[] dimensions=cube.getDimesions();
  String[] validDimensionName=new String[count];
  IDiskArray[] validDimPosition=new IDiskArray[count];
  int pos=0;
  for (int i=0; i < dimPosition.length; i++) {
    if (dimPosition[i] != null) {
      validDimPosition[pos]=dimPosition[i];
      validDimensionName[pos]=dimensions[i].getName();
      pos++;
    }
  }
  FactTableRowIterator facttableRowIterator=new FactTableRowIterator(cube.getFactTable(),validDimensionName,validDimPosition,computedMeasureHelper,stopSign);
  DimensionResultIterator[] dimensionResultIterator=populateDimensionResultIterator(dimPosition,stopSign);
  AggregationExecutor aggregationCalculatorExecutor=new AggregationExecutor(dimensionResultIterator,facttableRowIterator,aggregations);
  return aggregationCalculatorExecutor.execute(stopSign);
}

Fixed version (ground truth):
/** 
 * This method is responsible for computing the aggregation result according to the specified aggregation definitions.
 * @param aggregations
 * @param stopSign
 * @return
 * @throws DataException
 * @throws IOException
 * @throws BirtException
 */
private IAggregationResultSet[] onePassExecute(AggregationDefinition[] aggregations,StopSign stopSign) throws DataException, IOException, BirtException {
  IDiskArray[] dimPosition=getFilterResult();
  int count=0;
  for (int i=0; i < dimPosition.length; i++) {
    if (dimPosition[i] != null) {
      count++;
    }
  }
  IDimension[] dimensions=cube.getDimesions();
  String[] validDimensionName=new String[count];
  IDiskArray[] validDimPosition=new IDiskArray[count];
  int pos=0;
  for (int i=0; i < dimPosition.length; i++) {
    if (dimPosition[i] != null) {
      validDimPosition[pos]=dimPosition[i];
      validDimensionName[pos]=dimensions[i].getName();
      pos++;
    }
  }
  FactTableRowIterator facttableRowIterator=new FactTableRowIterator(cube.getFactTable(),validDimensionName,validDimPosition,computedMeasureHelper,stopSign);
  for (int i=0; i < measureFilters.size(); i++) {
    facttableRowIterator.addMeasureFilter((IJSMeasureFilterEvalHelper)measureFilters.get(i));
  }
  DimensionResultIterator[] dimensionResultIterator=populateDimensionResultIterator(dimPosition,stopSign);
  AggregationExecutor aggregationCalculatorExecutor=new AggregationExecutor(dimensionResultIterator,facttableRowIterator,aggregations);
  return aggregationCalculatorExecutor.execute(stopSign);
}
Program: 74362
Project: 74362
Buggy source:
/** 
 * @param cube
 */
public CubeQueryExecutorHelper(ICube cube,IComputedMeasureHelper computedMeasureHelper) throws DataException {
  Object[] params={cube,computedMeasureHelper};
  logger.entering(CubeQueryExecutorHelper.class.getName(),"String_Node_Str",params);
  this.cube=(Cube)cube;
  this.computedMeasureHelper=computedMeasureHelper;
  if (this.computedMeasureHelper != null) {
    validateComputedMeasureNames();
  }
  this.simpleLevelFilters=new ArrayList();
  this.levelFilters=new ArrayList();
  this.aggrFilterHelpers=new ArrayList();
  this.dimJSFilterMap=new HashMap();
  this.dimRowForFilterMap=new HashMap();
  this.rowSort=new ArrayList();
  this.columnSort=new ArrayList();
  dimLevelsMap=new HashMap();
  IDimension[] dimension=this.cube.getDimesions();
  for (int i=0; i < dimension.length; i++) {
    ILevel[] levels=dimension[i].getHierarchy().getLevels();
    dimLevelsMap.put(dimension[i].getName(),levels);
  }
  logger.exiting(CubeQueryExecutorHelper.class.getName(),"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @param cube
 */
public CubeQueryExecutorHelper(ICube cube,IComputedMeasureHelper computedMeasureHelper) throws DataException {
  Object[] params={cube,computedMeasureHelper};
  logger.entering(CubeQueryExecutorHelper.class.getName(),"String_Node_Str",params);
  this.cube=(Cube)cube;
  this.computedMeasureHelper=computedMeasureHelper;
  if (this.computedMeasureHelper != null) {
    validateComputedMeasureNames();
  }
  this.simpleLevelFilters=new ArrayList();
  this.levelFilters=new ArrayList();
  this.measureFilters=new ArrayList();
  this.aggrFilterHelpers=new ArrayList();
  this.dimJSFilterMap=new HashMap();
  this.dimRowForFilterMap=new HashMap();
  this.rowSort=new ArrayList();
  this.columnSort=new ArrayList();
  dimLevelsMap=new HashMap();
  IDimension[] dimension=this.cube.getDimesions();
  for (int i=0; i < dimension.length; i++) {
    ILevel[] levels=dimension[i].getHierarchy().getLevels();
    dimLevelsMap.put(dimension[i].getName(),levels);
  }
  logger.exiting(CubeQueryExecutorHelper.class.getName(),"String_Node_Str");
}
Program: 74363
Project: 74363
Buggy source:
/** 
 * @return
 * @throws IOException
 */
private boolean isSelectedRow() throws IOException {
  for (int i=0; i < currentPos.length; i++) {
    if (dimensionIndex[i] != -1) {
      if (Arrays.binarySearch(selectedPosOfCurSegment[i],currentPos[i]) < 0)       return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @return
 * @throws IOException
 * @throws DataException 
 */
private boolean isSelectedRow() throws IOException, DataException {
  for (int i=0; i < currentPos.length; i++) {
    if (dimensionIndex[i] != -1) {
      if (Arrays.binarySearch(selectedPosOfCurSegment[i],currentPos[i]) < 0)       return false;
    }
  }
  for (int i=0; i < cubePosFilters.size(); i++) {
    if (!((CubePosFilterHelper)cubePosFilters.get(i)).getFilterResult(currentPos)) {
      return false;
    }
  }
  if (measureFilters != null) {
    for (int i=0; i < measureFilters.size(); i++) {
      IJSMeasureFilterEvalHelper measureFilter=(IJSMeasureFilterEvalHelper)measureFilters.get(i);
      if (!measureFilter.evaluateFilter(currentMeasureMap))       return false;
    }
  }
  return true;
}
Program: 74364
Project: 74364
Buggy source:
protected IBaseResultSet doExecuteCube(IBaseResultSet parentResultSet,ICubeQueryDefinition query,boolean useCache){
  if (useCache) {
    String rsetId=String.valueOf(cachedQueryToResults.get(query));
    query.setQueryResultsID(rsetId);
  }
 else {
    query.setQueryResultsID(null);
  }
  IBasePreparedQuery pQuery=null;
  try {
    pQuery=dteSession.prepare(query,appContext);
  }
 catch (  BirtException be) {
    logger.log(Level.SEVERE,be.getMessage());
    context.addException(be);
  }
  if (pQuery == null) {
    return null;
  }
  try {
    Scriptable scope=context.getSharedScope();
    IBaseResultSet resultSet;
    ICubeQueryResults dteResults;
    if (parentResultSet == null) {
      dteResults=(ICubeQueryResults)dteSession.execute(pQuery,null,scope);
      resultSet=new CubeResultSet(this,context,query,dteResults);
    }
 else {
      dteResults=(ICubeQueryResults)dteSession.execute(pQuery,parentResultSet.getQueryResults(),scope);
      resultSet=new CubeResultSet(this,context,parentResultSet,query,(ICubeQueryResults)dteResults);
    }
    if (query.cacheQueryResults()) {
      cachedQueryToResults.put(query,dteResults.getID());
    }
    return resultSet;
  }
 catch (  BirtException be) {
    logger.log(Level.SEVERE,be.getMessage());
    context.addException(be);
  }
  return null;
}

Fixed version (ground truth):
protected IBaseResultSet doExecuteCube(IBaseResultSet parentResultSet,ICubeQueryDefinition query,boolean useCache){
  if (useCache) {
    String rsetId=String.valueOf(cachedQueryToResults.get(query));
    query.setQueryResultsID(rsetId);
  }
 else {
    query.setQueryResultsID(null);
  }
  IBasePreparedQuery pQuery=(IBasePreparedQuery)queryMap.get(query);
  if (pQuery == null) {
    return null;
  }
  try {
    Scriptable scope=context.getSharedScope();
    IBaseResultSet resultSet;
    ICubeQueryResults dteResults;
    if (parentResultSet == null) {
      dteResults=(ICubeQueryResults)dteSession.execute(pQuery,null,scope);
      resultSet=new CubeResultSet(this,context,query,dteResults);
    }
 else {
      dteResults=(ICubeQueryResults)dteSession.execute(pQuery,parentResultSet.getQueryResults(),scope);
      resultSet=new CubeResultSet(this,context,parentResultSet,query,(ICubeQueryResults)dteResults);
    }
    if (query.cacheQueryResults()) {
      cachedQueryToResults.put(query,dteResults.getID());
    }
    return resultSet;
  }
 catch (  BirtException be) {
    logger.log(Level.SEVERE,be.getMessage());
    context.addException(be);
  }
  return null;
}
Program: 74365
Project: 74365
Buggy source:
/** 
 * Constructs the data request session with the provided session context information.
 * @param context
 * @throws BirtException
 */
public DataRequestSessionImpl(DataSessionContext context) throws BirtException {
  if (context == null)   throw new AdapterException(ResourceConstants.CONEXT_NULL_ERROR);
  dataEngine=DataEngine.newDataEngine(context.getDataEngineContext());
  modelAdaptor=new ModelAdapter(context);
  sessionContext=context;
  cubeHandleMap=new HashMap();
}

Fixed version (ground truth):
/** 
 * Constructs the data request session with the provided session context information.
 * @param context
 * @throws BirtException
 */
public DataRequestSessionImpl(DataSessionContext context) throws BirtException {
  if (context == null)   throw new AdapterException(ResourceConstants.CONEXT_NULL_ERROR);
  dataEngine=DataEngine.newDataEngine(context.getDataEngineContext());
  modelAdaptor=new ModelAdapter(context);
  sessionContext=context;
  cubeHandleMap=new HashMap();
  dataSetCache=new HashSet();
}
Program: 74366
Project: 74366
Buggy source:
/** 
 * @param cubeHandle
 * @return
 */
private boolean needCachedDataSetToEnhancePerformance(TabularCubeHandle cubeHandle){
  DataSetHandle dsHandle=cubeHandle.getDataSet();
  List dimHandles=cubeHandle.getContents(CubeHandle.DIMENSIONS_PROP);
  for (int i=0; i < dimHandles.size(); i++) {
    DimensionHandle dimHandle=(DimensionHandle)dimHandles.get(i);
    List hiers=dimHandle.getContents(DimensionHandle.HIERARCHIES_PROP);
    TabularHierarchyHandle hierHandle=(TabularHierarchyHandle)hiers.get(0);
    if (hierHandle.getDataSet() != null)     return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @param cubeHandle
 * @return
 */
private Set needCachedDataSetToEnhancePerformance(TabularCubeHandle cubeHandle){
  Set set=new HashSet();
  set.add(cubeHandle.getDataSet());
  List dimHandles=cubeHandle.getContents(CubeHandle.DIMENSIONS_PROP);
  for (int i=0; i < dimHandles.size(); i++) {
    DimensionHandle dimHandle=(DimensionHandle)dimHandles.get(i);
    List hiers=dimHandle.getContents(DimensionHandle.HIERARCHIES_PROP);
    TabularHierarchyHandle hierHandle=(TabularHierarchyHandle)hiers.get(0);
    if (hierHandle.getDataSet() != null)     set.add(hierHandle.getDataSet());
  }
  return set;
}
Program: 74368
Project: 74368
Buggy source:
public void clearCache(IBaseDataSourceDesign dataSource,IBaseDataSetDesign dataSet) throws BirtException {
  dataEngine.clearCache(dataSource,dataSet);
}

Fixed version (ground truth):
/** 
 * Clear the data set caches that are used in cube creation.
 * @param dataSetHandles
 * @throws BirtException
 */
private void clearCache(Set dataSetHandles){
  Iterator it=dataSetHandles.iterator();
  while (it.hasNext()) {
    try {
      DataSetHandle dsHandle=(DataSetHandle)it.next();
      BaseDataSourceDesign baseDataSource=this.modelAdaptor.adaptDataSource(dsHandle.getDataSource());
      BaseDataSetDesign baseDataSet=this.modelAdaptor.adaptDataSet(dsHandle);
      this.dataEngine.clearCache(baseDataSource,baseDataSet);
      if (dsHandle instanceof JointDataSetHandle) {
        Set parentSet=new HashSet();
        Iterator parentIt=((JointDataSetHandle)dsHandle).dataSetsIterator();
        while (parentIt != null && parentIt.hasNext()) {
          parentSet.add(parentIt.next());
        }
        clearCache(parentSet);
      }
    }
 catch (    Exception e) {
    }
  }
}
Program: 74369
Project: 74369
Buggy source:
public void shutdown(){
  dataEngine.shutdown();
  dataEngine=null;
}

Fixed version (ground truth):
public void shutdown(){
  this.clearCache(this.dataSetCache);
  dataEngine.shutdown();
  dataEngine=null;
}
Program: 74370
Project: 74370
Buggy source:
/** 
 * Update column cache with clean the resultset property
 * @param dataSetHandle
 * @throws SemanticException
 */
public static void updateColumnCacheAfterCleanRs(DataSetHandle dataSetHandle) throws SemanticException {
  if (dataSetHandle instanceof OdaDataSetHandle)   dataSetHandle.getPropertyHandle(OdaDataSetHandle.RESULT_SET_PROP).clearValue();
  updateColumnCache(dataSetHandle);
}

Fixed version (ground truth):
/** 
 * Update column cache with clean the resultset property
 * @param dataSetHandle
 * @throws SemanticException
 */
public static void updateColumnCacheAfterCleanRs(DataSetHandle dataSetHandle) throws SemanticException {
  if (dataSetHandle instanceof OdaDataSetHandle) {
    if (dataSetHandle.getPropertyHandle(OdaDataSetHandle.RESULT_SET_PROP).isLocal())     dataSetHandle.getPropertyHandle(OdaDataSetHandle.RESULT_SET_PROP).setValue(new ArrayList());
  }
  updateColumnCache(dataSetHandle);
}
Program: 74372
Project: 74372
Buggy source:
public static String getPattern(Object data,String val){
  if (val != null && data instanceof Date) {
    if (val.indexOf("String_Node_Str") >= 0) {
      return "String_Node_Str";
    }
 else     if (val.startsWith("String_Node_Str")) {
      return "String_Node_Str";
    }
 else     if (!val.startsWith("String_Node_Str") && val.indexOf("String_Node_Str") >= 0) {
      return "String_Node_Str";
    }
    return new DateFormatter(val).getPattern();
  }
 else   if (val == null && data instanceof Time) {
    return "String_Node_Str";
  }
 else   if (val == null && data instanceof java.sql.Date) {
    return "String_Node_Str";
  }
 else   if (val == null && data instanceof java.util.Date) {
    return "String_Node_Str";
  }
 else   if (val != null && data instanceof Number) {
    if (val.indexOf("String_Node_Str") >= 0) {
      return "String_Node_Str";
    }
    return new NumberFormatter(val).getPattern();
  }
 else   if (val != null && data instanceof String) {
    return new StringFormatter(val).getPattern();
  }
  return null;
}

Fixed version (ground truth):
public static String getPattern(Object data,String val){
  if (val != null && data instanceof Date) {
    return replaceDateFormat(val);
  }
 else   if (val == null && data instanceof Time) {
    return "String_Node_Str";
  }
 else   if (val == null && data instanceof java.sql.Date) {
    return "String_Node_Str";
  }
 else   if (val == null && data instanceof java.util.Date) {
    return "String_Node_Str";
  }
 else   if (val != null && data instanceof Number) {
    if (val.indexOf("String_Node_Str") >= 0) {
      return "String_Node_Str";
    }
    return new NumberFormatter(val).getPattern();
  }
 else   if (val != null && data instanceof String) {
    return new StringFormatter(val).getPattern();
  }
  return null;
}
Program: 74373
Project: 74373
Buggy source:
public void dispose(){
  super.dispose();
  bParameter=null;
  browser=null;
  model=null;
}

Fixed version (ground truth):
public void dispose(){
  super.dispose();
  if (browser != null) {
    WebViewer.cancel(browser);
  }
  bParameter=null;
  browser=null;
  model=null;
}
Program: 74374
Project: 74374
Buggy source:
/** 
 * handle something when try to leave the page
 */
public void handleLeaveThePage(){
  if (browser != null)   browser.setUrl("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * handle something when try to leave the page
 */
public void handleLeaveThePage(){
  if (browser != null) {
    WebViewer.cancel(browser);
    browser.setUrl("String_Node_Str");
  }
}
Program: 74375
Project: 74375
Buggy source:
public void createRightBindingArea(Composite parent){
  EList[] seriesDefnArray=null;
  EList axisList=null;
  if (getChartModel() instanceof ChartWithAxes) {
    int axisNum=ChartUIUtil.getOrthogonalAxisNumber(getChartModel());
    seriesDefnArray=new EList[axisNum];
    axisList=getYAxisListForProcessing();
  }
 else {
    axisList=getValueSeriesDefinitionForProcessing();
  }
  if (axisList != null && !axisList.isEmpty()) {
    for (int i=0; i < axisList.size(); i++) {
      seriesDefnArray[i]=((Axis)axisList.get(i)).getSeriesDefinitions();
    }
  }
  ISelectDataComponent component=new ValueSeriesGroupingComponent((SeriesDefinition)seriesDefnArray[0].get(0),getContext(),"String_Node_Str");
  subRightAreas.add(component);
  cmpRightArea=component.createArea(parent);
}

Fixed version (ground truth):
public void createRightBindingArea(Composite parent){
  EList[] seriesDefnArray=null;
  EList axisList=null;
  ISelectDataComponent component=null;
  if (getChartModel() instanceof ChartWithAxes) {
    int axisNum=ChartUIUtil.getOrthogonalAxisNumber(getChartModel());
    seriesDefnArray=new EList[axisNum];
    axisList=getYAxisListForProcessing();
    if (axisList != null && !axisList.isEmpty()) {
      for (int i=0; i < axisList.size(); i++) {
        seriesDefnArray[i]=((Axis)axisList.get(i)).getSeriesDefinitions();
      }
    }
    component=new ValueSeriesGroupingComponent((SeriesDefinition)seriesDefnArray[0].get(0),getContext(),"String_Node_Str");
  }
 else {
    EList sdList=getValueSeriesDefinitionForProcessing();
    component=new ValueSeriesGroupingComponent((SeriesDefinition)sdList.get(0),getContext(),"String_Node_Str");
  }
  subRightAreas.add(component);
  cmpRightArea=component.createArea(parent);
}
Program: 74376
Project: 74376
Buggy source:
public void testGetSelectionTree() throws EngineException {
  destroy();
  initialize("String_Node_Str");
  Map parentToChildren=new HashMap();
  parentToChildren.put("String_Node_Str",new Object[]{"String_Node_Str","String_Node_Str",null});
  parentToChildren.put("String_Node_Str",new Object[]{"String_Node_Str"});
  String[] parent=new String[]{"String_Node_Str","String_Node_Str"};
  checkTree("String_Node_Str",parent,parentToChildren);
  checkTree("String_Node_Str",parent,parentToChildren);
  parent=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  checkTree("String_Node_Str",parent,parentToChildren);
  checkTree("String_Node_Str",parent,parentToChildren);
  parent=new String[]{"String_Node_Str","String_Node_Str"};
  checkTree("String_Node_Str",parent,parentToChildren);
  checkTree("String_Node_Str",parent,parentToChildren);
  parent=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  checkTree("String_Node_Str",parent,parentToChildren);
  checkTree("String_Node_Str",parent,parentToChildren);
}

Fixed version (ground truth):
public void testGetSelectionTree() throws EngineException {
  destroy();
  initialize("String_Node_Str");
  Map parentToChildren=new HashMap();
  parentToChildren.put("String_Node_Str",new Object[]{new Integer(1621),new Integer(1612),null});
  parentToChildren.put("String_Node_Str",new Object[]{new Integer(1621)});
  String[] parent=new String[]{"String_Node_Str","String_Node_Str"};
  checkTree("String_Node_Str",parent,parentToChildren);
  checkTree("String_Node_Str",parent,parentToChildren);
  parent=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  checkTree("String_Node_Str",parent,parentToChildren);
  checkTree("String_Node_Str",parent,parentToChildren);
  parent=new String[]{"String_Node_Str","String_Node_Str"};
  checkTree("String_Node_Str",parent,parentToChildren);
  checkTree("String_Node_Str",parent,parentToChildren);
  parent=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  checkTree("String_Node_Str",parent,parentToChildren);
  checkTree("String_Node_Str",parent,parentToChildren);
}
Program: 74377
Project: 74377
Buggy source:
public ParameterHelper(ScalarParameterHandle parameter,Locale locale){
  this.parameter=parameter;
  this.distinct=parameter.distinct();
  this.labelColumnName=getLabelColumnName(parameter);
  this.valueColumnName=getValueColumnName(parameter);
  this.valueType=parameter.getValueType();
  if (parameter.isFixedOrder()) {
    this.comparator=new FixInOrderComparator(distinct);
  }
 else {
    this.comparator=createComparator(parameter,locale,distinct);
  }
}

Fixed version (ground truth):
public ParameterHelper(ScalarParameterHandle parameter,Locale locale){
  this.parameter=parameter;
  this.distinct=parameter.distinct();
  this.labelColumnName=getLabelColumnName(parameter);
  this.valueColumnName=getValueColumnName(parameter);
  this.valueType=parameter.getDataType();
  if (parameter.isFixedOrder()) {
    this.comparator=new FixInOrderComparator(distinct);
  }
 else {
    this.comparator=createComparator(parameter,locale,distinct);
  }
}
Program: 74378
Project: 74378
Buggy source:
public void testDateFormat(){
  String golden="String_Node_Str";
  DateFormatter sample=new DateFormatter("String_Node_Str",ULocale.ENGLISH);
  Locale locDef=Locale.getDefault();
  Calendar dateCal=Calendar.getInstance(locDef);
  dateCal.set(8,8,13,20,1,44);
  Date date=dateCal.getTime();
  String fmtDate=sample.format(date);
  assertEquals(golden,fmtDate);
}

Fixed version (ground truth):
public void testDateFormat(){
  String golden="String_Node_Str";
  DateFormatter sample=new DateFormatter("String_Node_Str",ULocale.ENGLISH);
  Locale locDef=Locale.getDefault();
  Calendar dateCal=Calendar.getInstance(locDef);
  dateCal.set(1998,8,13,20,1,44);
  Date date=dateCal.getTime();
  String fmtDate=sample.format(date);
  assertEquals(golden,fmtDate);
}
Program: 74379
Project: 74379
Buggy source:
public void testDateFormatString(){
  DateFormatter sample=new DateFormatter("String_Node_Str");
  Locale locDef=Locale.getDefault();
  Calendar dateCal=Calendar.getInstance(locDef);
  dateCal.set(8,8,13,20,1,44);
  Date date=dateCal.getTime();
  SimpleDateFormat sampleJava=new SimpleDateFormat("String_Node_Str",locDef);
  assertEquals(sampleJava.format(date),sample.format(date));
}

Fixed version (ground truth):
public void testDateFormatString(){
  DateFormatter sample=new DateFormatter("String_Node_Str");
  Locale locDef=Locale.getDefault();
  Calendar dateCal=Calendar.getInstance(locDef);
  dateCal.set(1998,8,13,20,1,44);
  Date date=dateCal.getTime();
  SimpleDateFormat sampleJava=new SimpleDateFormat("String_Node_Str",locDef);
  assertEquals(sampleJava.format(date),sample.format(date));
}
Program: 74380
Project: 74380
Buggy source:
/** 
 * Process BIRT deployment configuration. <p> Save user-defined settings into web.xml file.
 * @param monitor
 * @throws CoreException
 */
protected void processConfiguration(IProgressMonitor monitor) throws CoreException {
  IProject project=fproj.getProject();
  SimpleImportOverwriteQuery query=new SimpleImportOverwriteQuery();
  WebArtifactUtil.configureWebApp((WebAppBean)properties.get(EXT_WEBAPP),project,query,monitor);
  WebArtifactUtil.configureContextParam((Map)properties.get(EXT_CONTEXT_PARAM),project,query,monitor);
  WebArtifactUtil.configureListener((Map)properties.get(EXT_LISTENER),project,query,monitor);
  WebArtifactUtil.configureServlet((Map)properties.get(EXT_SERVLET),project,query,monitor);
  WebArtifactUtil.configureServletMapping((Map)properties.get(EXT_SERVLET_MAPPING),project,query,monitor);
  WebArtifactUtil.configureFilter((Map)properties.get(EXT_FILTER),project,query,monitor);
  WebArtifactUtil.configureFilterMapping((Map)properties.get(EXT_FILTER_MAPPING),project,query,monitor);
  WebArtifactUtil.configureTaglib((Map)properties.get(EXT_TAGLIB),project,query,monitor);
}

Fixed version (ground truth):
/** 
 * Process BIRT deployment configuration. <p> Save user-defined settings into web.xml file.
 * @param monitor
 * @throws CoreException
 */
protected void processConfiguration(IProgressMonitor monitor) throws CoreException {
  IProject project=this.getFacetedProject().getProject();
  SimpleImportOverwriteQuery query=new SimpleImportOverwriteQuery();
  WebArtifactUtil.configureWebApp((WebAppBean)properties.get(EXT_WEBAPP),project,query,monitor);
  WebArtifactUtil.configureContextParam((Map)properties.get(EXT_CONTEXT_PARAM),project,query,monitor);
  WebArtifactUtil.configureListener((Map)properties.get(EXT_LISTENER),project,query,monitor);
  WebArtifactUtil.configureServlet((Map)properties.get(EXT_SERVLET),project,query,monitor);
  WebArtifactUtil.configureServletMapping((Map)properties.get(EXT_SERVLET_MAPPING),project,query,monitor);
  WebArtifactUtil.configureFilter((Map)properties.get(EXT_FILTER),project,query,monitor);
  WebArtifactUtil.configureFilterMapping((Map)properties.get(EXT_FILTER_MAPPING),project,query,monitor);
  WebArtifactUtil.configureTaglib((Map)properties.get(EXT_TAGLIB),project,query,monitor);
}
Program: 74381
Project: 74381
Buggy source:
/** 
 * Action before process configuration
 * @param monitor
 * @throws CoreException
 */
protected void preConfiguration(IProgressMonitor monitor) throws CoreException {
  BirtWizardUtil.processCheckFolder(properties,this.fproj.getProject(),configFolder,monitor);
}

Fixed version (ground truth):
/** 
 * Action before process configuration
 * @param monitor
 * @throws CoreException
 */
protected void preConfiguration(IProgressMonitor monitor) throws CoreException {
  BirtWizardUtil.processCheckFolder(properties,this.getFacetedProject().getProject(),configFolder,monitor);
}
Program: 74382
Project: 74382
Buggy source:
/** 
 * Gets size of label item.
 * @return the size of label item.
 */
public Dimension getSize(){
  DimensionHandle handle=((ReportItemHandle)getHandle()).getWidth();
  int px=(int)DEUtil.convertoToPixel(handle);
  handle=((ReportItemHandle)getHandle()).getHeight();
  int py=(int)DEUtil.convertoToPixel(handle);
  px=Math.max(0,px);
  py=Math.max(0,py);
  return new Dimension(px,py);
}

Fixed version (ground truth):
/** 
 * Gets size of label item.
 * @return the size of label item.
 */
public Dimension getSize(){
  DimensionHandle handle=((ReportItemHandle)getHandle()).getWidth();
  int px=0;
  int py=0;
  if (!DesignChoiceConstants.UNITS_PERCENTAGE.equals(handle.getUnits())) {
    px=(int)DEUtil.convertoToPixel(handle);
  }
  handle=((ReportItemHandle)getHandle()).getHeight();
  if (!DesignChoiceConstants.UNITS_PERCENTAGE.equals(handle.getUnits())) {
    py=(int)DEUtil.convertoToPixel(handle);
  }
  px=Math.max(0,px);
  py=Math.max(0,py);
  return new Dimension(px,py);
}
Program: 74383
Project: 74383
Buggy source:
/** 
 * @return The constraint
 */
protected Object getConstraint(){
  ReportItemHandle handle=(ReportItemHandle)getModel();
  ReportItemConstraint constraint=new ReportItemConstraint();
  constraint.setDisplay(handle.getPrivateStyle().getDisplay());
  return constraint;
}

Fixed version (ground truth):
/** 
 * @return The constraint
 */
protected Object getConstraint(){
  ReportItemHandle handle=(ReportItemHandle)getModel();
  ReportItemConstraint constraint=new ReportItemConstraint();
  constraint.setDisplay(handle.getPrivateStyle().getDisplay());
  DimensionHandle value=handle.getWidth();
  constraint.setMeasure(value.getMeasure());
  constraint.setUnits(value.getUnits());
  return constraint;
}
Program: 74384
Project: 74384
Buggy source:
/** 
 * Determines if the property has choice type value.
 * @param o the property model to inspect
 * @return if a property has choice type value
 */
public boolean isChoiceProperty(Object o){
  boolean choice=false;
  if (isColorProperty(o)) {
    return false;
  }
  if (o instanceof GroupPropertyHandle) {
    if (((GroupPropertyHandle)o).getPropertyDefn().getChoices() != null) {
      IChoice[] choices=((GroupPropertyHandle)o).getPropertyDefn().getChoices().getChoices();
      if (choices.length > 0) {
        choice=true;
      }
    }
  }
  return choice;
}

Fixed version (ground truth):
/** 
 * Determines if the property has choice type value.
 * @param o the property model to inspect
 * @return if a property has choice type value
 */
public boolean isChoiceProperty(Object o){
  boolean choice=false;
  if (isColorProperty(o)) {
    return false;
  }
  if (o instanceof GroupPropertyHandle) {
    if (((GroupPropertyHandle)o).getPropertyDefn().getAllowedChoices() != null) {
      IChoice[] choices=((GroupPropertyHandle)o).getPropertyDefn().getAllowedChoices().getChoices();
      if (choices.length > 0) {
        choice=true;
      }
    }
  }
  return choice;
}
Program: 74385
Project: 74385
Buggy source:
/** 
 * Gets the set of choices for the property; return null if the property doesn't have choice list.
 * @param o the property model to inspect
 * @return the array holds choice values
 */
private Object[] getChoiceValues(Object o){
  Object[] values=null;
  if (o instanceof GroupPropertyHandle) {
    if (((GroupPropertyHandle)o).getPropertyDefn().getChoices() != null) {
      IChoice[] choices=((GroupPropertyHandle)o).getPropertyDefn().getChoices().getChoices();
      if (choices.length > 0) {
        values=new Object[choices.length];
        for (int i=0; i < choices.length; i++) {
          values[i]=choices[i].getName();
        }
      }
    }
  }
  return values;
}

Fixed version (ground truth):
/** 
 * Gets the set of choices for the property; return null if the property doesn't have choice list.
 * @param o the property model to inspect
 * @return the array holds choice values
 */
private Object[] getChoiceValues(Object o){
  Object[] values=null;
  if (o instanceof GroupPropertyHandle) {
    if (((GroupPropertyHandle)o).getPropertyDefn().getAllowedChoices() != null) {
      IChoice[] choices=((GroupPropertyHandle)o).getPropertyDefn().getAllowedChoices().getChoices();
      if (choices.length > 0) {
        values=new Object[choices.length];
        for (int i=0; i < choices.length; i++) {
          values[i]=choices[i].getName();
        }
      }
    }
  }
  return values;
}
Program: 74386
Project: 74386
Buggy source:
/** 
 * Returns the array of choice names if the property has a choice list;or null otherwise.
 * @return the list of available choice names.
 */
private String[] getChoiceNames(Object o){
  String[] values=null;
  if (o instanceof GroupPropertyHandle) {
    if (((GroupPropertyHandle)o).getPropertyDefn().getChoices() != null) {
      IChoice[] choices=((GroupPropertyHandle)o).getPropertyDefn().getChoices().getChoices();
      if (choices.length > 0) {
        values=new String[choices.length];
        for (int i=0; i < choices.length; i++) {
          values[i]=choices[i].getName();
        }
      }
    }
  }
  if (values == null)   return new String[]{};
  return values;
}

Fixed version (ground truth):
/** 
 * Returns the array of choice names if the property has a choice list;or null otherwise.
 * @return the list of available choice names.
 */
private String[] getChoiceNames(Object o){
  String[] values=null;
  if (o instanceof GroupPropertyHandle) {
    if (((GroupPropertyHandle)o).getPropertyDefn().getAllowedChoices() != null) {
      IChoice[] choices=((GroupPropertyHandle)o).getPropertyDefn().getAllowedChoices().getChoices();
      if (choices.length > 0) {
        values=new String[choices.length];
        for (int i=0; i < choices.length; i++) {
          values[i]=choices[i].getName();
        }
      }
    }
  }
  if (values == null)   return new String[]{};
  return values;
}
Program: 74387
Project: 74387
Buggy source:
/** 
 * Determines if the property has choice type value.
 * @param o the property model to inspect
 * @return if a property has choice type value
 */
public boolean isChoiceProperty(Object o){
  boolean choice=false;
  if (isColorProperty(o)) {
    return false;
  }
  if (o instanceof GroupPropertyHandle) {
    if (((GroupPropertyHandle)o).getPropertyDefn().getChoices() != null) {
      IChoice[] choices=((GroupPropertyHandle)o).getPropertyDefn().getChoices().getChoices();
      if (choices.length > 0) {
        choice=true;
      }
    }
  }
  return choice;
}

Fixed version (ground truth):
/** 
 * Determines if the property has choice type value.
 * @param o the property model to inspect
 * @return if a property has choice type value
 */
public boolean isChoiceProperty(Object o){
  boolean choice=false;
  if (isColorProperty(o)) {
    return false;
  }
  if (o instanceof GroupPropertyHandle) {
    if (((GroupPropertyHandle)o).getPropertyDefn().getAllowedChoices() != null) {
      IChoice[] choices=((GroupPropertyHandle)o).getPropertyDefn().getAllowedChoices().getChoices();
      if (choices.length > 0) {
        choice=true;
      }
    }
  }
  return choice;
}
Program: 74388
Project: 74388
Buggy source:
/** 
 * Gets the set of choices for the property; return null if the property doesn't have choice list.
 * @param o the property model to inspect
 * @return the array holds choice values
 */
private Object[] getChoiceValues(Object o){
  Object[] values=null;
  if (o instanceof GroupPropertyHandle) {
    if (((GroupPropertyHandle)o).getPropertyDefn().getChoices() != null) {
      IChoice[] choices=((GroupPropertyHandle)o).getPropertyDefn().getChoices().getChoices();
      if (choices.length > 0) {
        values=new Object[choices.length];
        for (int i=0; i < choices.length; i++) {
          values[i]=choices[i].getName();
        }
      }
    }
  }
  return values;
}

Fixed version (ground truth):
/** 
 * Gets the set of choices for the property; return null if the property doesn't have choice list.
 * @param o the property model to inspect
 * @return the array holds choice values
 */
private Object[] getChoiceValues(Object o){
  Object[] values=null;
  if (o instanceof GroupPropertyHandle) {
    if (((GroupPropertyHandle)o).getPropertyDefn().getAllowedChoices() != null) {
      IChoice[] choices=((GroupPropertyHandle)o).getPropertyDefn().getAllowedChoices().getChoices();
      if (choices.length > 0) {
        values=new Object[choices.length];
        for (int i=0; i < choices.length; i++) {
          values[i]=choices[i].getName();
        }
      }
    }
  }
  return values;
}
Program: 74389
Project: 74389
Buggy source:
/** 
 * Returns the array of choice names if the property has a choice list;or null otherwise.
 * @return the list of available choice names.
 */
private String[] getChoiceNames(Object o){
  String[] values=null;
  if (o instanceof GroupPropertyHandle) {
    if (((GroupPropertyHandle)o).getPropertyDefn().getChoices() != null) {
      IChoice[] choices=((GroupPropertyHandle)o).getPropertyDefn().getChoices().getChoices();
      if (choices.length > 0) {
        values=new String[choices.length];
        for (int i=0; i < choices.length; i++) {
          values[i]=choices[i].getName();
        }
      }
    }
  }
  if (values == null)   return new String[]{};
  return values;
}

Fixed version (ground truth):
/** 
 * Returns the array of choice names if the property has a choice list;or null otherwise.
 * @return the list of available choice names.
 */
private String[] getChoiceNames(Object o){
  String[] values=null;
  if (o instanceof GroupPropertyHandle) {
    if (((GroupPropertyHandle)o).getPropertyDefn().getAllowedChoices() != null) {
      IChoice[] choices=((GroupPropertyHandle)o).getPropertyDefn().getAllowedChoices().getChoices();
      if (choices.length > 0) {
        values=new String[choices.length];
        for (int i=0; i < choices.length; i++) {
          values[i]=choices[i].getName();
        }
      }
    }
  }
  if (values == null)   return new String[]{};
  return values;
}
Program: 74393
Project: 74393
Buggy source:
/** 
 * Constructor. This is for runAndRender task.
 * @param locale
 * @param isEmbeddable
 * @param isRtl
 * @param isMasterPageContent
 * @param format
 */
public ViewerHTMLActionHandler(Locale locale,boolean isRtl,boolean isMasterPageContent,String format){
  this.locale=locale;
  this.isRtl=isRtl;
  this.isMasterPageContent=isMasterPageContent;
  this.hostFormat=format;
}

Fixed version (ground truth):
/** 
 * Constructor. This is for runAndRender task.
 * @param locale
 * @param isEmbeddable
 * @param isRtl
 * @param isMasterPageContent
 * @param format
 * @param svg
 */
public ViewerHTMLActionHandler(Locale locale,boolean isRtl,boolean isMasterPageContent,String format,Boolean svg){
  this.locale=locale;
  this.isRtl=isRtl;
  this.isMasterPageContent=isMasterPageContent;
  this.hostFormat=format;
  this.svg=svg;
}
Program: 74395
Project: 74395
Buggy source:
/** 
 * Process BIRT deployment configuration. <p> Save user-defined settings into web.xml file.
 * @param monitor
 * @throws CoreException
 */
protected void processConfiguration(IProgressMonitor monitor) throws CoreException {
  IProject project=fproj.getProject();
  SimpleImportOverwriteQuery query=new SimpleImportOverwriteQuery();
  WebArtifactUtil.configureWebApp((WebAppBean)properties.get(EXT_WEBAPP),project,query,monitor);
  WebArtifactUtil.configureContextParam((Map)properties.get(EXT_CONTEXT_PARAM),project,query,monitor);
  WebArtifactUtil.configureListener((Map)properties.get(EXT_LISTENER),project,query,monitor);
  WebArtifactUtil.configureServlet((Map)properties.get(EXT_SERVLET),project,query,monitor);
  WebArtifactUtil.configureServletMapping((Map)properties.get(EXT_SERVLET_MAPPING),project,query,monitor);
  WebArtifactUtil.configureTaglib((Map)properties.get(EXT_TAGLIB),project,query,monitor);
}

Fixed version (ground truth):
/** 
 * Process BIRT deployment configuration. <p> Save user-defined settings into web.xml file.
 * @param monitor
 * @throws CoreException
 */
protected void processConfiguration(IProgressMonitor monitor) throws CoreException {
  IProject project=this.getFacetedProject().getProject();
  SimpleImportOverwriteQuery query=new SimpleImportOverwriteQuery();
  WebArtifactUtil.configureWebApp((WebAppBean)properties.get(EXT_WEBAPP),project,query,monitor);
  WebArtifactUtil.configureContextParam((Map)properties.get(EXT_CONTEXT_PARAM),project,query,monitor);
  WebArtifactUtil.configureListener((Map)properties.get(EXT_LISTENER),project,query,monitor);
  WebArtifactUtil.configureServlet((Map)properties.get(EXT_SERVLET),project,query,monitor);
  WebArtifactUtil.configureServletMapping((Map)properties.get(EXT_SERVLET_MAPPING),project,query,monitor);
  WebArtifactUtil.configureTaglib((Map)properties.get(EXT_TAGLIB),project,query,monitor);
}
Program: 74396
Project: 74396
Buggy source:
/** 
 * Action before process configuration
 * @param monitor
 * @throws CoreException
 */
protected void preConfiguration(IProgressMonitor monitor) throws CoreException {
  BirtWizardUtil.processCheckFolder(properties,this.fproj.getProject(),configFolder,monitor);
}

Fixed version (ground truth):
/** 
 * Action before process configuration
 * @param monitor
 * @throws CoreException
 */
protected void preConfiguration(IProgressMonitor monitor) throws CoreException {
  BirtWizardUtil.processCheckFolder(properties,this.getFacetedProject().getProject(),configFolder,monitor);
}