nus-yam/ex-repair huggingface dataset:
Program: 73050
Project: 73050
Buggy source:
public void render() throws Exception {
  setupRenderOption();
  IContentEmitter emitter=createContentEmitter();
  String format=executionContext.getOutputFormat();
  IReportExecutor executor=new ReportletExecutor(executionContext,offset);
  executor=new SuppressDuplciateReportExecutor(executor);
  executor=new LocalizedReportExecutor(executionContext,executor);
  executionContext.setExecutor(executor);
  initializeContentEmitter(emitter,executor);
  IReportLayoutEngine layoutEngine=createReportLayoutEngine(pagination,renderOptions);
  layoutEngine.setLocale(executionContext.getLocale());
  if (ExtensionManager.PAPER_SIZE_PAGINATION.equals(pagination)) {
    OnPageBreakLayoutPageHandle handle=new OnPageBreakLayoutPageHandle(executionContext);
    layoutEngine.setPageHandler(handle);
    CompositeContentEmitter outputEmitters=new CompositeContentEmitter(format);
    outputEmitters.addEmitter(emitter);
    outputEmitters.addEmitter(handle.getEmitter());
    emitter=outputEmitters;
  }
  startRender();
  IReportContent report=executor.execute();
  emitter.start(report);
  layoutEngine.layout(executor,report,emitter,false);
  emitter.end(report);
  closeRender();
  executor.close();
  pageCount=layoutEngine.getPageCount();
}

Fixed version (ground truth):
public void render() throws Exception {
  setupRenderOption();
  IContentEmitter emitter=createContentEmitter();
  String format=executionContext.getOutputFormat();
  IReportExecutor executor=new ReportletExecutor(executionContext,offset);
  executor=new SuppressDuplciateReportExecutor(executor);
  executor=new LocalizedReportExecutor(executionContext,executor);
  executionContext.setExecutor(executor);
  initializeContentEmitter(emitter,executor);
  IReportLayoutEngine layoutEngine=createReportLayoutEngine(pagination,renderOptions);
  layoutEngine.setLocale(executionContext.getLocale());
  if (ExtensionManager.PAPER_SIZE_PAGINATION.equals(pagination)) {
    OnPageBreakLayoutPageHandle handle=new OnPageBreakLayoutPageHandle(executionContext);
    layoutEngine.setPageHandler(handle);
    CompositeContentEmitter outputEmitters=new CompositeContentEmitter(format);
    outputEmitters.addEmitter(emitter);
    outputEmitters.addEmitter(handle.getEmitter());
    emitter=outputEmitters;
  }
  startRender();
  IReportContent report=executor.execute();
  emitter.start(report);
  layoutEngine.layout(executor,report,emitter,false);
  layoutEngine.close();
  emitter.end(report);
  closeRender();
  executor.close();
  pageCount=layoutEngine.getPageCount();
}
Program: 73052
Project: 73052
Buggy source:
protected void endPage(){
  if (context.isAutoPageBreak()) {
    context.setAutoPageBreak(false);
    autoPageBreak();
  }
  if (isPageEmpty()) {
    if (!isFirst) {
      if (isLast) {
        context.setPageNumber(context.getPageNumber() - 1);
        context.setPageCount(context.getPageCount() - 1);
        resolveTotalPage();
      }
      return;
    }
 else {
      if (!isLast) {
        return;
      }
    }
  }
  MasterPageDesign mp=getMasterPage(report);
  if (mp instanceof SimpleMasterPageDesign) {
    if (isFirst && !((SimpleMasterPageDesign)mp).isShowHeaderOnFirst()) {
      removeHeader();
      isFirst=false;
    }
    if (isLast && !((SimpleMasterPageDesign)mp).isShowFooterOnLast()) {
      removeFooter();
    }
    if (((SimpleMasterPageDesign)mp).isFloatingFooter()) {
      floatingFooter();
    }
  }
  if (isFirst) {
    isFirst=false;
  }
  emitter.startPage(pageContent);
  emitter.endPage(pageContent);
  pageBreakEvent();
  if (isLast) {
    resolveTotalPage();
  }
 else {
    context.setPageNumber(context.getPageNumber() + 1);
    context.setPageCount(context.getPageCount() + 1);
  }
}

Fixed version (ground truth):
protected void endPage(){
  if (context.isAutoPageBreak()) {
    context.setAutoPageBreak(false);
    autoPageBreak();
  }
  if (isPageEmpty()) {
    if (!isFirst) {
      if (isLast) {
        context.setPageNumber(context.getPageNumber() - 1);
        context.setPageCount(context.getPageCount() - 1);
      }
      return;
    }
 else {
      if (!isLast) {
        return;
      }
    }
  }
  MasterPageDesign mp=getMasterPage(report);
  if (mp instanceof SimpleMasterPageDesign) {
    if (isFirst && !((SimpleMasterPageDesign)mp).isShowHeaderOnFirst()) {
      removeHeader();
      isFirst=false;
    }
    if (isLast && !((SimpleMasterPageDesign)mp).isShowFooterOnLast()) {
      removeFooter();
    }
    if (((SimpleMasterPageDesign)mp).isFloatingFooter()) {
      floatingFooter();
    }
  }
  if (isFirst) {
    isFirst=false;
  }
  emitter.startPage(pageContent);
  emitter.endPage(pageContent);
  pageBreakEvent();
  if (!isLast) {
    context.setPageNumber(context.getPageNumber() + 1);
    context.setPageCount(context.getPageCount() + 1);
  }
}
Program: 73053
Project: 73053
Buggy source:
public void build(){
  IReportExecutor executor=executionContext.getExecutor();
  engine=LayoutEngineFactory.createLayoutEngine(ExtensionManager.PAGE_BREAK_PAGINATION);
  engine.setOption(EngineTask.TASK_TYPE,new Integer(IEngineTask.TASK_RUN));
  engine.setPageHandler(layoutPageHandler);
  IReportContent report=executor.execute();
  outputEmitters.start(report);
  engine.layout(executor,report,outputEmitters,true);
  outputEmitters.end(report);
  engine=null;
}

Fixed version (ground truth):
public void build(){
  IReportExecutor executor=executionContext.getExecutor();
  engine=LayoutEngineFactory.createLayoutEngine(ExtensionManager.PAGE_BREAK_PAGINATION);
  engine.setOption(EngineTask.TASK_TYPE,new Integer(IEngineTask.TASK_RUN));
  engine.setPageHandler(layoutPageHandler);
  IReportContent report=executor.execute();
  outputEmitters.start(report);
  engine.layout(executor,report,outputEmitters,true);
  engine.close();
  outputEmitters.end(report);
  engine=null;
}
Program: 73056
Project: 73056
Buggy source:
private void drawBorder(BorderInfo bi){
  if ("String_Node_Str".equals(bi.borderStyle)) {
    drawDoubleBorder(bi);
  }
 else {
    pageGraphic.drawLine(bi.startX,bi.startY,bi.endX,bi.endY,bi.borderWidth,bi.borderColor,"String_Node_Str");
  }
}

Fixed version (ground truth):
private void drawBorder(BorderInfo bi){
  if ("String_Node_Str".equals(bi.borderStyle)) {
    drawDoubleBorder(bi);
  }
 else {
    pageGraphic.drawLine(bi.startX,bi.startY,bi.endX,bi.endY,bi.borderWidth,bi.borderColor,bi.borderStyle);
  }
}
Program: 73057
Project: 73057
Buggy source:
protected void addBorderSegment(Border border,int start,int end,String style,int width,Color color){
  if (style == null || color == null || width == 0) {
    return;
  }
  ArrayList segments=border.segments;
  BorderSegment last=null;
  if (!segments.isEmpty()) {
    last=(BorderSegment)segments.get(segments.size() - 1);
    if (last.end == start && last.width == width && last.color.equals(color) && last.style.equals(style)) {
      last.end=end;
      return;
    }
  }
  segments.add(new BorderSegment(start,end,style,width,color));
  if (border.width < width) {
    border.width=width;
  }
}

Fixed version (ground truth):
protected void addBorderSegment(Border border,int start,int end,String style,int width,Color color){
  if (style == null || color == null || width == 0 || border == null) {
    return;
  }
  ArrayList segments=border.segments;
  BorderSegment last=null;
  if (!segments.isEmpty()) {
    last=(BorderSegment)segments.get(segments.size() - 1);
    if (last.end == start && last.width == width && last.color.equals(color) && last.style.equals(style)) {
      last.end=end;
      return;
    }
  }
  segments.add(new BorderSegment(start,end,style,width,color));
  if (border.width < width) {
    border.width=width;
  }
}
Program: 73058
Project: 73058
Buggy source:
/** 
 */
void moveTo(int rowIndex) throws BirtException {
  if (resultIterator == null) {
    return;
  }
  resultIterator.moveTo(rowIndex);
  value=resultIterator.getValue(boundColumnName);
  resultIterator.skipToEnd(1);
}

Fixed version (ground truth):
/** 
 */
void moveTo(int rowIndex) throws BirtException {
  if (resultIterator == null) {
    if (queryResults == null)     return;
    resultIterator=queryResults.getResultIterator();
  }
  if (resultIterator == null) {
    return;
  }
  resultIterator.moveTo(rowIndex);
  value=resultIterator.getValue(boundColumnName);
  resultIterator.skipToEnd(1);
}
Program: 73059
Project: 73059
Buggy source:
/** 
 * Select the item from the id.
 * @param id
 */
public void selectionItem(String id){
  if (getTreeViewer() == null || getTreeViewer().getTree() == null)   return;
  Object obj=ModuleUtil.getScriptObject(reportHandle,id);
  if (obj instanceof PropertyHandle) {
    PropertyHandle handle=(PropertyHandle)obj;
    IElementPropertyDefn defn=handle.getPropertyDefn();
    DebugScriptObjectNode node=new DebugScriptObjectNode(handle,defn);
    DebugScriptElementNode parent=new DebugScriptElementNode(handle.getElementHandle());
    node.setNodeParent(parent);
    IStructuredSelection selection=new StructuredSelection(node);
    setSelection(selection);
  }
}

Fixed version (ground truth):
/** 
 * Select the item from the id.
 * @param id
 */
public void selectionItem(String id){
  if (getTreeViewer() == null || getTreeViewer().getTree() == null)   return;
  Object obj=ModuleUtil.getScriptObject(reportHandle,id);
  if (obj instanceof PropertyHandle) {
    PropertyHandle handle=(PropertyHandle)obj;
    DebugScriptObjectNode node=new DebugScriptObjectNode(handle);
    DebugScriptElementNode parent=new DebugScriptElementNode(handle.getElementHandle());
    node.setNodeParent(parent);
    IStructuredSelection selection=new StructuredSelection(node);
    setSelection(selection);
  }
}
Program: 73060
Project: 73060
Buggy source:
/** 
 * Gets the children.
 * @param elementHandle
 * @return
 */
public List getScriptNodes(DesignElementHandle elementHandle){
  List scriptNodes=new ArrayList();
  List scriptMethods=elementHandle.getMethods();
  if (scriptMethods != null) {
    for (Iterator ite=scriptMethods.iterator(); ite.hasNext(); ) {
      IElementPropertyDefn elementPropDefn=(IElementPropertyDefn)ite.next();
      PropertyHandle handle=elementHandle.getPropertyHandle(elementPropDefn.getName());
      String methodName=elementPropDefn.getMethodInfo().getName();
      if (elementHandle.getStringProperty(methodName) != null) {
        DebugScriptObjectNode scriptElementNode=new DebugScriptObjectNode(handle,elementPropDefn);
        scriptElementNode.setNodeParent(this);
        scriptNodes.add(scriptElementNode);
      }
    }
  }
  return scriptNodes;
}

Fixed version (ground truth):
/** 
 * Gets the children.
 * @param elementHandle
 * @return
 */
public List getScriptNodes(DesignElementHandle elementHandle){
  List scriptNodes=new ArrayList();
  List scriptMethods=elementHandle.getMethods();
  if (scriptMethods != null) {
    for (Iterator ite=scriptMethods.iterator(); ite.hasNext(); ) {
      IElementPropertyDefn elementPropDefn=(IElementPropertyDefn)ite.next();
      PropertyHandle handle=elementHandle.getPropertyHandle(elementPropDefn.getName());
      String methodName=elementPropDefn.getMethodInfo().getName();
      if (elementHandle.getStringProperty(methodName) != null) {
        DebugScriptObjectNode scriptElementNode=new DebugScriptObjectNode(handle);
        scriptElementNode.setNodeParent(this);
        scriptNodes.add(scriptElementNode);
      }
    }
  }
  return scriptNodes;
}
Program: 73061
Project: 73061
Buggy source:
/** 
 * Constructor
 * @param handle
 * @param parent
 */
public DebugScriptObjectNode(PropertyHandle handle,IElementPropertyDefn parent){
  super(parent);
  this.propertyHandle=handle;
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param handle
 * @param parent
 */
public DebugScriptObjectNode(PropertyHandle handle){
  super(handle);
  this.propertyHandle=handle;
}
Program: 73062
Project: 73062
Buggy source:
public String getText(){
  return parent.getMethodInfo().getName();
}

Fixed version (ground truth):
public String getText(){
  return parent.getPropertyDefn().getName();
}
Program: 73063
Project: 73063
Buggy source:
public boolean equals(Object arg0){
  if (arg0 == this) {
    return true;
  }
  if (arg0 instanceof ScriptObjectNode) {
    return ((ScriptObjectNode)arg0).parent.getName() == parent.getName();
  }
  return false;
}

Fixed version (ground truth):
public boolean equals(Object arg0){
  if (arg0 == this) {
    return true;
  }
  if (arg0 instanceof ScriptObjectNode) {
    return parent == null ? (((ScriptObjectNode)arg0).parent == null) : parent.equals(((ScriptObjectNode)arg0).parent);
  }
  return false;
}
Program: 73064
Project: 73064
Buggy source:
public ScriptObjectNode(IElementPropertyDefn parent){
  this.parent=parent;
}

Fixed version (ground truth):
public ScriptObjectNode(PropertyHandle parent){
  this.parent=parent;
}
Program: 73065
Project: 73065
Buggy source:
public List getScriptNodes(DesignElementHandle elementHandle){
  List scriptNodes=new ArrayList();
  List scriptMethods=elementHandle.getMethods();
  if (scriptMethods != null) {
    for (Iterator ite=scriptMethods.iterator(); ite.hasNext(); ) {
      IElementPropertyDefn elementPropDefn=(IElementPropertyDefn)ite.next();
      String methodName=elementPropDefn.getMethodInfo().getName();
      if (elementHandle.getStringProperty(methodName) != null) {
        ScriptObjectNode scriptElementNode=new ScriptObjectNode(elementPropDefn);
        scriptNodes.add(scriptElementNode);
      }
    }
  }
  return scriptNodes;
}

Fixed version (ground truth):
public List getScriptNodes(DesignElementHandle elementHandle){
  List scriptNodes=new ArrayList();
  List scriptMethods=elementHandle.getMethods();
  if (scriptMethods != null) {
    for (Iterator ite=scriptMethods.iterator(); ite.hasNext(); ) {
      IElementPropertyDefn elementPropDefn=(IElementPropertyDefn)ite.next();
      String methodName=elementPropDefn.getMethodInfo().getName();
      if (elementHandle.getStringProperty(methodName) != null) {
        ScriptObjectNode scriptElementNode=new ScriptObjectNode(elementHandle.getPropertyHandle(methodName));
        scriptNodes.add(scriptElementNode);
      }
    }
  }
  return scriptNodes;
}
Program: 73066
Project: 73066
Buggy source:
public void handleSelectionChanged(ISelection selection){
  if (editorUIEnabled == true) {
    saveModel();
  }
  if (selection != null) {
    Object[] sel=((IStructuredSelection)selection).toArray();
    if (sel.length == 1) {
      editObject=sel[0];
      if (sel[0] instanceof ScriptElementNode) {
        editObject=((ScriptElementNode)editObject).getParent();
      }
    }
    if (editObject instanceof DesignElementHandle) {
      palettePage.getSupport().setCurrentEditObject(editObject);
      setComboViewerInput(editObject);
      cmbItemLastSelected=null;
      setEditorText("String_Node_Str");
      if (cmbExpList.getItemCount() > 0) {
        enableEditor();
        selectItemInComboExpList((ISelection)selectionMap.get(getModel()));
      }
 else {
        disableEditor();
      }
      checkDirty();
      palettePage.getSupport().updateParametersTree();
    }
 else {
      disableEditor();
      cmbExpList.removeAll();
      cmbSubFunctions.setItems(null);
      cmbItemLastSelected=null;
      palettePage.getSupport().setCurrentEditObject(null);
    }
    if (sel.length > 0) {
      updateAnnotationLabel(sel[0]);
    }
  }
}

Fixed version (ground truth):
public void handleSelectionChanged(ISelection selection){
  if (editorUIEnabled == true) {
    saveModel();
  }
  if (selection != null) {
    Object[] sel=((IStructuredSelection)selection).toArray();
    IElementPropertyDefn targetMethod=null;
    if (sel.length == 1) {
      editObject=sel[0];
      if (sel[0] instanceof ScriptElementNode) {
        editObject=((ScriptElementNode)editObject).getParent();
      }
 else       if (sel[0] instanceof ScriptObjectNode) {
        editObject=((ScriptObjectNode)editObject).getParent();
      }
      if (editObject instanceof PropertyHandle) {
        targetMethod=((PropertyHandle)editObject).getPropertyDefn();
        editObject=((PropertyHandle)editObject).getElementHandle();
      }
    }
    if (editObject instanceof DesignElementHandle) {
      palettePage.getSupport().setCurrentEditObject(editObject);
      setComboViewerInput(editObject);
      cmbItemLastSelected=null;
      setEditorText("String_Node_Str");
      if (cmbExpList.getItemCount() > 0) {
        enableEditor();
        if (targetMethod != null) {
          selectItemInComboExpList(new StructuredSelection(targetMethod));
        }
 else {
          selectItemInComboExpList((ISelection)selectionMap.get(getModel()));
        }
      }
 else {
        disableEditor();
      }
      checkDirty();
      palettePage.getSupport().updateParametersTree();
    }
 else {
      disableEditor();
      cmbExpList.removeAll();
      cmbSubFunctions.setItems(null);
      cmbItemLastSelected=null;
      palettePage.getSupport().setCurrentEditObject(null);
    }
    if (sel.length > 0) {
      updateAnnotationLabel(sel[0]);
    }
  }
}
Program: 73069
Project: 73069
Buggy source:
public boolean next() throws BirtException {
  return iterator.next();
}

Fixed version (ground truth):
public boolean next() throws BirtException {
  if (beforeFirstRow) {
    beforeFirstRow=false;
  }
  rowCount++;
  if (maxRows >= 0 && rowCount > maxRows) {
    return false;
  }
  return iterator.next();
}
Program: 73070
Project: 73070
Buggy source:
public Object getValue(int index) throws BirtException {
  IResultMetaData metaData=getResultMetaData();
  String columnName=metaData.getColumnName(index);
  return iterator.getValue(columnName);
}

Fixed version (ground truth):
public Object getValue(int index) throws BirtException {
  if (beforeFirstRow) {
    throw new EngineException("String_Node_Str");
  }
  IResultMetaData metaData=getResultMetaData();
  String columnName=metaData.getColumnName(index);
  return iterator.getValue(columnName);
}
Program: 73071
Project: 73071
Buggy source:
DataIterator(IExtractionResults results,IResultIterator iterator){
  this.results=results;
  this.iterator=iterator;
}

Fixed version (ground truth):
DataIterator(IExtractionResults results,IResultIterator iterator,int startRow,int maxRows) throws BirtException {
  this.results=results;
  this.iterator=iterator;
  this.startRow=startRow;
  this.maxRows=maxRows;
  this.rowCount=0;
  beforeFirstRow=true;
  if (startRow > 0) {
    iterator.moveTo(startRow - 1);
  }
}
Program: 73072
Project: 73072
Buggy source:
ExtractionResults(IResultIterator resultIterator,IResultMetaData metaData,String[] selectedColumns){
  this.resultIterator=resultIterator;
  if (null == selectedColumns) {
    this.metaData=metaData;
  }
 else {
    this.metaData=new ResultMetaData(metaData,selectedColumns);
  }
}

Fixed version (ground truth):
ExtractionResults(IResultIterator resultIterator,IResultMetaData metaData,String[] selectedColumns,int startRow,int maxRows){
  this.resultIterator=resultIterator;
  if (null == selectedColumns) {
    this.metaData=metaData;
  }
 else {
    this.metaData=new ResultMetaData(metaData,selectedColumns);
  }
  this.startRow=startRow;
  this.maxRows=maxRows;
}
Program: 73073
Project: 73073
Buggy source:
public IDataIterator nextResultIterator() throws BirtException {
  if (iterator == null) {
    if (null == resultIterator && null != queryResults) {
      resultIterator=queryResults.getResultIterator();
    }
    this.iterator=new DataIterator(this,resultIterator);
  }
  return iterator;
}

Fixed version (ground truth):
public IDataIterator nextResultIterator() throws BirtException {
  if (iterator == null) {
    if (null == resultIterator && null != queryResults) {
      resultIterator=queryResults.getResultIterator();
    }
    this.iterator=new DataIterator(this,resultIterator,startRow,maxRows);
  }
  return iterator;
}
Program: 73075
Project: 73075
Buggy source:
protected void prepareChildren(){
  currentChangeType=ColumnEvent.UNKNOWN_CHANGE;
  currentColIndex=-1;
  currentEdgePosition=-1;
  rowSpan=1;
  colSpan=0;
  lastMeasureIndex=-1;
  totalMeasureCount=crosstabItem.getMeasureCount();
  measureDetailStarted=false;
  measureSubTotalStarted=false;
  measureGrandTotalStarted=false;
  hasLast=false;
  isFirst=true;
}

Fixed version (ground truth):
protected void prepareChildren(){
  currentChangeType=ColumnEvent.UNKNOWN_CHANGE;
  currentColIndex=-1;
  currentEdgePosition=-1;
  rowSpan=1;
  colSpan=0;
  lastMeasureIndex=-1;
  totalMeasureCount=crosstabItem.getMeasureCount();
  isVerticalMeasure=MEASURE_DIRECTION_VERTICAL.equals(crosstabItem.getMeasureDirection());
  measureDetailStarted=false;
  measureSubTotalStarted=false;
  measureGrandTotalStarted=false;
  hasLast=false;
  isFirst=true;
}
Program: 73076
Project: 73076
Buggy source:
protected boolean isMeetMeasureDetailEnd(ColumnEvent ev,AggregationCellHandle aggCell){
  if (totalMeasureCount != 1 || aggCell == null || ev.type == ColumnEvent.GRAND_TOTAL_CHANGE) {
    return true;
  }
  int targetColSpanGroupIndex=GroupUtil.getGroupIndex(columnGroups,aggCell.getSpanOverOnColumn());
  if (targetColSpanGroupIndex != -1) {
    if (ev.type == ColumnEvent.COLUMN_TOTAL_CHANGE) {
      EdgeGroup gp=(EdgeGroup)columnGroups.get(targetColSpanGroupIndex);
      if (ev.dimensionIndex < gp.dimensionIndex || (ev.dimensionIndex == gp.dimensionIndex && ev.levelIndex < gp.levelIndex)) {
        return true;
      }
    }
    try {
      targetColSpanGroupIndex--;
      if (targetColSpanGroupIndex == -1) {
        return false;
      }
 else {
        EdgeCursor columnEdgeCursor=getColumnEdgeCursor();
        if (columnEdgeCursor != null) {
          columnEdgeCursor.setPosition(ev.dataPosition);
          DimensionCursor dc=(DimensionCursor)columnEdgeCursor.getDimensionCursor().get(targetColSpanGroupIndex);
          if (!GroupUtil.isDummyGroup(dc)) {
            return currentEdgePosition < dc.getEdgeStart();
          }
        }
      }
    }
 catch (    OLAPException e) {
      logger.log(Level.SEVERE,Messages.getString("String_Node_Str"),e);
    }
  }
  return true;
}

Fixed version (ground truth):
protected boolean isMeetMeasureDetailEnd(ColumnEvent ev,AggregationCellHandle aggCell){
  if (aggCell == null || ev.type == ColumnEvent.GRAND_TOTAL_CHANGE) {
    return true;
  }
  if (totalMeasureCount != 1) {
    if (!isVerticalMeasure) {
      return true;
    }
  }
  int targetColSpanGroupIndex=GroupUtil.getGroupIndex(columnGroups,aggCell.getSpanOverOnColumn());
  if (targetColSpanGroupIndex != -1) {
    if (ev.type == ColumnEvent.COLUMN_TOTAL_CHANGE) {
      EdgeGroup gp=(EdgeGroup)columnGroups.get(targetColSpanGroupIndex);
      if (ev.dimensionIndex < gp.dimensionIndex || (ev.dimensionIndex == gp.dimensionIndex && ev.levelIndex < gp.levelIndex)) {
        return true;
      }
    }
    try {
      targetColSpanGroupIndex--;
      if (targetColSpanGroupIndex == -1) {
        return false;
      }
 else {
        EdgeCursor columnEdgeCursor=getColumnEdgeCursor();
        if (columnEdgeCursor != null) {
          columnEdgeCursor.setPosition(ev.dataPosition);
          DimensionCursor dc=(DimensionCursor)columnEdgeCursor.getDimensionCursor().get(targetColSpanGroupIndex);
          if (!GroupUtil.isDummyGroup(dc)) {
            return currentEdgePosition < dc.getEdgeStart();
          }
        }
      }
    }
 catch (    OLAPException e) {
      logger.log(Level.SEVERE,Messages.getString("String_Node_Str"),e);
    }
  }
  return true;
}
Program: 73077
Project: 73077
Buggy source:
protected void prepareChildren(){
  super.prepareChildren();
  boolean isVerticalMeasure=MEASURE_DIRECTION_VERTICAL.equals(crosstabItem.getMeasureDirection());
  isFirstTotalRow=rowIndex == GroupUtil.getFirstTotalRowIndex(crosstabItem,-1,-1,isVerticalMeasure);
  totalRowSpan=GroupUtil.getTotalRowSpan(crosstabItem,-1,-1,isVerticalMeasure);
  walker.reload();
}

Fixed version (ground truth):
protected void prepareChildren(){
  super.prepareChildren();
  isFirstTotalRow=rowIndex == GroupUtil.getFirstTotalRowIndex(crosstabItem,-1,-1,isVerticalMeasure);
  totalRowSpan=GroupUtil.getTotalRowSpan(crosstabItem,-1,-1,isVerticalMeasure);
  walker.reload();
}
Program: 73078
Project: 73078
Buggy source:
protected void prepareChildren(){
  super.prepareChildren();
  initMeasureCache();
  isLayoutDownThenOver=PAGE_LAYOUT_DOWN_THEN_OVER.equals(crosstabItem.getPageLayout());
  if (isLayoutDownThenOver) {
    startTotalDimensionIndex=dimensionIndex;
    startTotalLevelIndex=levelIndex;
  }
 else {
    EdgeGroup nextGroup=GroupUtil.getNextGroup(rowGroups,dimensionIndex,levelIndex);
    startTotalDimensionIndex=nextGroup.dimensionIndex;
    startTotalLevelIndex=nextGroup.levelIndex;
  }
  DimensionViewHandle dv=crosstabItem.getDimension(ROW_AXIS_TYPE,dimensionIndex);
  LevelViewHandle lv=dv.getLevel(levelIndex);
  isSubTotalBefore=lv.getAggregationHeader() != null && AGGREGATION_HEADER_LOCATION_BEFORE.equals(lv.getAggregationHeaderLocation());
  boolean isVerticalMeasure=MEASURE_DIRECTION_VERTICAL.equals(crosstabItem.getMeasureDirection());
  isFirstTotalRow=rowIndex == GroupUtil.getFirstTotalRowIndex(crosstabItem,dimensionIndex,levelIndex,isVerticalMeasure);
  totalRowSpan=GroupUtil.getTotalRowSpan(crosstabItem,dimensionIndex,levelIndex,isVerticalMeasure);
  walker.reload();
}

Fixed version (ground truth):
protected void prepareChildren(){
  super.prepareChildren();
  initMeasureCache();
  isLayoutDownThenOver=PAGE_LAYOUT_DOWN_THEN_OVER.equals(crosstabItem.getPageLayout());
  if (isLayoutDownThenOver) {
    startTotalDimensionIndex=dimensionIndex;
    startTotalLevelIndex=levelIndex;
  }
 else {
    EdgeGroup nextGroup=GroupUtil.getNextGroup(rowGroups,dimensionIndex,levelIndex);
    startTotalDimensionIndex=nextGroup.dimensionIndex;
    startTotalLevelIndex=nextGroup.levelIndex;
  }
  DimensionViewHandle dv=crosstabItem.getDimension(ROW_AXIS_TYPE,dimensionIndex);
  LevelViewHandle lv=dv.getLevel(levelIndex);
  isSubTotalBefore=lv.getAggregationHeader() != null && AGGREGATION_HEADER_LOCATION_BEFORE.equals(lv.getAggregationHeaderLocation());
  isFirstTotalRow=rowIndex == GroupUtil.getFirstTotalRowIndex(crosstabItem,dimensionIndex,levelIndex,isVerticalMeasure);
  totalRowSpan=GroupUtil.getTotalRowSpan(crosstabItem,dimensionIndex,levelIndex,isVerticalMeasure);
  walker.reload();
}
Program: 73079
Project: 73079
Buggy source:
/** 
 * @return <code>true</code> if the command can be executed
 */
public boolean canExecute(){
  if (cloneElement == null) {
    return false;
  }
  DesignElementHandle childHandle=sourceHandle;
  if (childHandle == null) {
    childHandle=cloneElement.getHandle(SessionHandleAdapter.getInstance().getReportDesignHandle().getModule());
  }
  return DNDUtil.handleValidateTargetCanContain(newContainer,childHandle) && DNDUtil.handleValidateTargetCanContainMore(newContainer,1);
}

Fixed version (ground truth):
/** 
 * @return <code>true</code> if the command can be executed
 */
public boolean canExecute(){
  if (cloneElement == null) {
    return false;
  }
  DesignElementHandle childHandle=sourceHandle;
  if (childHandle == null) {
    if (cloneElement instanceof IDesignElement) {
      childHandle=((IDesignElement)cloneElement).getHandle(SessionHandleAdapter.getInstance().getReportDesignHandle().getModule());
    }
 else     if (cloneElement instanceof IElementCopy) {
      childHandle=((IElementCopy)cloneElement).getHandle(SessionHandleAdapter.getInstance().getReportDesignHandle());
    }
  }
  return DNDUtil.handleValidateTargetCanContain(newContainer,childHandle) && DNDUtil.handleValidateTargetCanContainMore(newContainer,1);
}
Program: 73080
Project: 73080
Buggy source:
/** 
 * Constructor
 * @param cloneElement the copy of the source
 * @param newContainer the new container, class type could be <code>DesignElementHandle</code>,<code>SlotHandle</code> or <code>ReportElementModel</code>
 * @param position the position will be added
 */
public PasteCommand(IDesignElement cloneElement,Object newContainer,int position){
  this.cloneElement=cloneElement;
  this.newContainer=newContainer;
  this.position=position;
  isCloned=false;
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param cloneElement the copy of the source
 * @param newContainer the new container, class type could be <code>DesignElementHandle</code>,<code>SlotHandle</code> or <code>ReportElementModel</code>
 * @param position the position will be added
 */
public PasteCommand(IElementCopy cloneElement,Object newContainer,int position){
  this.cloneElement=cloneElement;
  this.newContainer=newContainer;
  this.position=position;
  isCloned=false;
}
Program: 73081
Project: 73081
Buggy source:
/** 
 * Add this design element to report.
 * @param newHandle The design element to add
 */
private void addHandleToReport(DesignElementHandle newHandle) throws ContentException, NameException, SemanticException {
  SlotHandle slotHandle=null;
  if (newContainer instanceof DesignElementHandle) {
    slotHandle=((DesignElementHandle)newContainer).getSlot(slotID);
  }
 else   if (newContainer instanceof SlotHandle) {
    slotHandle=(SlotHandle)newContainer;
  }
  if (slotHandle != null) {
    slotHandle.paste(newHandle,position);
  }
 else   if (newContainer instanceof PropertyHandle) {
    ((PropertyHandle)newContainer).paste(newHandle,position);
  }
 else   if (newContainer instanceof DesignElementHandle) {
    ((DesignElementHandle)newContainer).getPropertyHandle(contentString).paste(newHandle,position);
  }
  if (DesignerConstants.TRACING_COMMANDS) {
    System.out.println("String_Node_Str" + DEUtil.getDisplayLabel(newHandle) + "String_Node_Str"+ slotHandle.getSlotID()+ "String_Node_Str"+ DEUtil.getDisplayLabel(slotHandle.getElementHandle())+ "String_Node_Str"+ position);
  }
}

Fixed version (ground truth):
/** 
 * Add this design element to report.
 * @param newHandle The design element to add
 */
private void addHandleToReport(DesignElementHandle newHandle) throws ContentException, NameException, SemanticException {
  SlotHandle slotHandle=null;
  DesignElementHandle containerHandle=null;
  if (newContainer instanceof DesignElementHandle) {
    slotHandle=((DesignElementHandle)newContainer).getSlot(slotID);
    containerHandle=(DesignElementHandle)newContainer;
  }
 else   if (newContainer instanceof SlotHandle) {
    slotHandle=(SlotHandle)newContainer;
    containerHandle=((SlotHandle)newContainer).getElementHandle();
  }
 else   if (newContainer instanceof PropertyHandle) {
    containerHandle=((PropertyHandle)newContainer).getElementHandle();
  }
  if (cloneElement instanceof IElementCopy) {
    if (slotHandle != null) {
      CopyUtil.paste((IElementCopy)cloneElement,containerHandle,slotID,position);
    }
 else     if (newContainer instanceof PropertyHandle) {
      CopyUtil.paste((IElementCopy)cloneElement,containerHandle,((PropertyHandle)newContainer).getPropertyDefn().getName(),position);
    }
 else     if (newContainer instanceof DesignElementHandle) {
      CopyUtil.paste((IElementCopy)cloneElement,containerHandle,DEUtil.getDefaultContentName(newContainer),position);
    }
  }
 else   if (newHandle != null) {
    if (slotHandle != null) {
      slotHandle.paste(newHandle,position);
    }
 else     if (newContainer instanceof PropertyHandle) {
      ((PropertyHandle)newContainer).paste(newHandle,position);
    }
 else     if (newContainer instanceof DesignElementHandle) {
      ((DesignElementHandle)newContainer).getPropertyHandle(contentString).paste(newHandle,position);
    }
  }
  if (DesignerConstants.TRACING_COMMANDS) {
    System.out.println("String_Node_Str" + cloneElement + "String_Node_Str"+ slotHandle != null ? slotHandle.getSlotID() : DEUtil.getDefaultContentName(newContainer) + "String_Node_Str" + position);
  }
}
Program: 73082
Project: 73082
Buggy source:
/** 
 * Executes the Command.
 */
public void execute(){
  if (DesignerConstants.TRACING_COMMANDS) {
    System.out.println("String_Node_Str");
  }
  try {
    if (!isCut || sourceHandle == null || sourceHandle.getContainer() == null) {
      isCut=false;
    }
    calculatePositionAndSlotId();
    dropSourceHandle(sourceHandle);
    ModuleHandle currentDesignHandle=SessionHandleAdapter.getInstance().getReportDesignHandle();
    DesignElementHandle newHandle=copyNewHandle(cloneElement,currentDesignHandle);
    addHandleToReport(newHandle);
  }
 catch (  Exception e) {
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str");
    }
    logger.log(Level.SEVERE,e.getMessage(),e);
  }
}

Fixed version (ground truth):
/** 
 * Executes the Command.
 */
public void execute(){
  if (DesignerConstants.TRACING_COMMANDS) {
    System.out.println("String_Node_Str");
  }
  try {
    if (!isCut || sourceHandle == null || sourceHandle.getContainer() == null) {
      isCut=false;
    }
    calculatePositionAndSlotId();
    dropSourceHandle(sourceHandle);
    ModuleHandle currentDesignHandle=SessionHandleAdapter.getInstance().getReportDesignHandle();
    DesignElementHandle newHandle=cloneElement instanceof IDesignElement ? copyNewHandle((IDesignElement)cloneElement,currentDesignHandle) : null;
    addHandleToReport(newHandle);
  }
 catch (  Exception e) {
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str");
    }
    logger.log(Level.SEVERE,e.getMessage(),e);
  }
}
Program: 73083
Project: 73083
Buggy source:
/** 
 * Returns specified command
 * @param commandType command type, value is <code>TYPE_CUT</code> or <code>TYPE_COPY</code>
 * @param transferSource transfer source
 * @param newContainer the new container
 * @param position the position will be added
 * @return command
 */
private static Command getNewCommand(String commandType,Object transferSource,Object newContainer,int position) throws SemanticException {
  boolean isCut=TYPE_CUT.equals(commandType);
  if (newContainer instanceof ParameterGroupHandle && (transferSource instanceof ParameterGroupHandle || DEUtil.isParameterGroup(transferSource))) {
    return pasteParameterGroup(commandType,transferSource,(ParameterGroupHandle)newContainer);
  }
 else   if (transferSource instanceof DesignElementHandle) {
    return new PasteCommand((DesignElementHandle)transferSource,newContainer,position,isCut);
  }
 else   if (transferSource instanceof IDesignElement) {
    return new PasteCommand((IDesignElement)transferSource,newContainer,position);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns specified command
 * @param commandType command type, value is <code>TYPE_CUT</code> or <code>TYPE_COPY</code>
 * @param transferSource transfer source
 * @param newContainer the new container
 * @param position the position will be added
 * @return command
 */
private static Command getNewCommand(String commandType,Object transferSource,Object newContainer,int position) throws SemanticException {
  boolean isCut=TYPE_CUT.equals(commandType);
  if (newContainer instanceof ParameterGroupHandle && (transferSource instanceof ParameterGroupHandle || DEUtil.isParameterGroup(transferSource))) {
    return pasteParameterGroup(commandType,transferSource,(ParameterGroupHandle)newContainer);
  }
 else   if (transferSource instanceof DesignElementHandle) {
    return new PasteCommand((DesignElementHandle)transferSource,newContainer,position,isCut);
  }
 else   if (transferSource instanceof IDesignElement) {
    return new PasteCommand((IDesignElement)transferSource,newContainer,position);
  }
 else   if (transferSource instanceof IElementCopy) {
    return new PasteCommand((IElementCopy)transferSource,newContainer,position);
  }
  return null;
}
Program: 73086
Project: 73086
Buggy source:
/** 
 * Constructor
 * @param sourceHandle
 * @param newContainer
 * @param afterHandle
 */
public CrosstabPasterCommand(DesignElementHandle sourceHandle,DesignElementHandle newContainer,DesignElementHandle afterHandle){
  this.sourceHandle=sourceHandle;
  this.cloneElement=sourceHandle.copy();
  this.newContainer=newContainer;
  this.afterHandle=afterHandle;
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param sourceHandle
 * @param newContainer
 * @param afterHandle
 */
public CrosstabPasterCommand(DesignElementHandle sourceHandle,DesignElementHandle newContainer,DesignElementHandle afterHandle){
  this.sourceHandle=sourceHandle;
  this.cloneElement=CopyUtil.copy(sourceHandle);
  this.newContainer=newContainer;
  this.afterHandle=afterHandle;
}
Program: 73087
Project: 73087
Buggy source:
/** 
 * Executes the Command.
 */
public void execute(){
  try {
    calculatePositionAndSlotId();
    ModuleHandle currentDesignHandle=SessionHandleAdapter.getInstance().getReportDesignHandle();
    DesignElementHandle newHandle=copyNewHandle(cloneElement,currentDesignHandle);
    addHandleToReport(newHandle);
  }
 catch (  Exception e) {
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str");
    }
    ExceptionHandler.handle(e);
  }
}

Fixed version (ground truth):
/** 
 * Executes the Command.
 */
public void execute(){
  try {
    calculatePositionAndSlotId();
    CopyUtil.paste(cloneElement,newContainer,getContentName(),position);
  }
 catch (  Exception e) {
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str");
    }
    ExceptionHandler.handle(e);
  }
}
Program: 73088
Project: 73088
Buggy source:
public ReportRunnable cloneRunnable(){
  ReportDesignHandle newDesign=(ReportDesignHandle)designHandle.copy().getHandle(null);
  ReportRunnable newRunnable=new ReportRunnable(newDesign);
  newRunnable.setReportName(reportName);
  newRunnable.setReportEngine(engine);
  return newRunnable;
}

Fixed version (ground truth):
public ReportRunnable cloneRunnable(){
  ReportDesignHandle newDesign=(ReportDesignHandle)designHandle.copy().getHandle(null);
  newDesign.setFileName(designHandle.getFileName());
  ReportRunnable newRunnable=new ReportRunnable(newDesign);
  newRunnable.setReportName(reportName);
  newRunnable.setReportEngine(engine);
  return newRunnable;
}
Program: 73089
Project: 73089
Buggy source:
/** 
 */
public static List[] cleanUnUsedGroupInstance(List[] groups){
  List[] savedList=groups;
  groups=new List[groups.length];
  for (int i=0; i < groups.length; i++) {
    groups[i]=new ArrayList();
  }
  copy(savedList,groups);
  int last=groups.length - 1;
  List lastGroup=groups[last];
  for (int i=0; i < lastGroup.size(); i++) {
    if (((GroupInfo)lastGroup.get(i)).firstChild == -2) {
      return cleanUnUsedGroupInstance(removeWholeGroup(groups,last,i));
    }
  }
  copy(groups,savedList);
  return savedList;
}

Fixed version (ground truth):
/** 
 */
public static List[] cleanUnUsedGroupInstance(List[] groups){
  List[] savedList=groups;
  groups=new List[groups.length];
  for (int i=0; i < groups.length; i++) {
    groups[i]=new ArrayList();
  }
  copy(savedList,groups);
  int last=groups.length - 1;
  List lastGroup=groups[last];
  for (int i=0; i < lastGroup.size(); i++) {
    if (((GroupInfo)lastGroup.get(i)).firstChild == -2) {
      return cleanUnUsedGroupInstance(removeWholeGroup(groups,last,i));
    }
  }
  return groups;
}
Program: 73090
Project: 73090
Buggy source:
/** 
 * @param inputStream
 * @param cacheProvider
 * @throws DataException
 */
public RDGroupUtil(String tempDir,InputStream inputStream) throws DataException {
  this(tempDir,inputStream,null);
}

Fixed version (ground truth):
/** 
 * @param inputStream
 * @param cacheProvider
 * @throws DataException
 */
public RDGroupUtil(String tempDir,int groupNumber,RAInputStream[] inputStreams) throws DataException {
  this(tempDir,groupNumber,inputStreams,null);
}
Program: 73091
Project: 73091
Buggy source:
/** 
 * @param streamManager
 * @param streamPos
 * @param streamScope
 * @return
 * @throws DataException
 */
public static RDGroupUtil loadGroupUtil(String tempDir,StreamManager streamManager,int streamPos,int streamScope) throws DataException {
  InputStream stream=streamManager.getInStream(DataEngineContext.GROUP_INFO_STREAM,streamPos,streamScope);
  BufferedInputStream buffStream=new BufferedInputStream(stream);
  RDGroupUtil rdGroupUtil=new RDGroupUtil(tempDir,buffStream);
  try {
    buffStream.close();
    stream.close();
  }
 catch (  IOException e) {
  }
  return rdGroupUtil;
}

Fixed version (ground truth):
/** 
 * @param streamManager
 * @param streamPos
 * @param streamScope
 * @return
 * @throws DataException
 */
public static RDGroupUtil loadGroupUtil(String tempDir,StreamManager streamManager,int streamPos,int streamScope) throws DataException {
  RAInputStream stream=streamManager.getInStream(DataEngineContext.GROUP_INFO_STREAM,streamPos,streamScope);
  RAInputStream[] groupStreams=null;
  int gNumber=0;
  try {
    gNumber=IOUtil.readInt(stream);
    groupStreams=new RAInputStream[gNumber];
    long nextOffset=IOUtil.INT_LENGTH;
    for (int i=0; i < gNumber; i++) {
      RAInputStream rain=streamManager.getInStream(DataEngineContext.GROUP_INFO_STREAM,streamPos,streamScope);
      rain.seek(nextOffset);
      groupStreams[i]=rain;
      int asize=IOUtil.readInt(stream);
      nextOffset=nextOffset + IOUtil.INT_LENGTH + 2 * IOUtil.INT_LENGTH * asize;
    }
    stream.close();
  }
 catch (  IOException e) {
  }
  return new RDGroupUtil(tempDir,gNumber,groupStreams);
}
Program: 73092
Project: 73092
Buggy source:
public Object get(String name,Scriptable start){
  DummyParameterAttribute attr=(DummyParameterAttribute)this.params.get(this.parameterName);
  if (attr == null) {
    return null;
  }
  if (FIELD_VALUE.equals(name)) {
    return attr.getValue();
  }
 else   if (FIELD_DISPLAY_TEXT.equals(name)) {
    return attr.getDisplayText();
  }
  Object value=attr.getValue();
  Scriptable jsStr=Context.toObject(value,start);
  if (jsStr != null && jsStr.getPrototype() != null) {
    return jsStr.getPrototype().get(name,jsStr);
  }
  return null;
}

Fixed version (ground truth):
public Object get(String name,Scriptable start){
  DummyParameterAttribute attr=(DummyParameterAttribute)this.params.get(this.parameterName);
  if (attr == null) {
    return null;
  }
  if (FIELD_VALUE.equals(name)) {
    return attr.getValue();
  }
 else   if (FIELD_DISPLAY_TEXT.equals(name)) {
    return attr.getDisplayText();
  }
  Object value=attr.getValue();
  if (value instanceof Scriptable) {
    Scriptable jsValue=(Scriptable)value;
    Object property=jsValue.getPrototype().get(name,jsValue);
    if (property instanceof Callable) {
      Callable callable=(Callable)property;
      return new JsValueCallable(callable);
    }
    return jsValue.get(name,jsValue);
  }
 else {
    Scriptable jsValue=Context.toObject(value,start);
    return jsValue.get(name,jsValue);
  }
}
Program: 73093
Project: 73093
Buggy source:
/** 
 * Support setting parameter value by following methods: <li> params["a"] = params["b"] <li> params["a"] = "value"
 */
public void put(String name,Scriptable start,Object value){
  DummyParameterAttribute attr=(DummyParameterAttribute)parameters.get(name);
  if (attr == null) {
    attr=new DummyParameterAttribute();
    parameters.put(name,attr);
  }
  if (value instanceof ReportParameter) {
    ReportParameter scriptableParameter=(ReportParameter)value;
    Object paramValue=scriptableParameter.get("String_Node_Str",this);
    String displayText=(String)scriptableParameter.get("String_Node_Str",this);
    attr.setValue(paramValue);
    attr.setDisplayText(displayText);
    return;
  }
  if (value instanceof Wrapper) {
    value=((Wrapper)value).unwrap();
  }
  attr.setValue(JavascriptEvalUtil.convertJavascriptValue(value));
}

Fixed version (ground truth):
/** 
 * Support setting parameter value by following methods: <li> params["a"] = params["b"] <li> params["a"] = "value"
 */
public void put(String name,Scriptable start,Object value){
  DummyParameterAttribute attr=(DummyParameterAttribute)parameters.get(name);
  if (attr == null) {
    attr=new DummyParameterAttribute();
    parameters.put(name,attr);
  }
  if (value instanceof ReportParameter) {
    ReportParameter scriptableParameter=(ReportParameter)value;
    Object paramValue=scriptableParameter.get("String_Node_Str",this);
    String displayText=(String)scriptableParameter.get("String_Node_Str",this);
    attr.setValue(paramValue);
    attr.setDisplayText(displayText);
    return;
  }
  if (value instanceof Wrapper) {
    value=((Wrapper)value).unwrap();
  }
  attr.setValue(value);
}
Program: 73096
Project: 73096
Buggy source:
protected void setUp() throws Exception {
  super.setUp();
  session=DesignEngine.newSession(ULocale.getDefault());
  design=session.createDesign();
  setUpParam("String_Node_Str",true,true,DesignChoiceConstants.PARAM_TYPE_STRING,"String_Node_Str");
  setUpParam("String_Node_Str",true,true,DesignChoiceConstants.PARAM_TYPE_STRING,null);
  setUpParam("String_Node_Str",false,true,DesignChoiceConstants.PARAM_TYPE_STRING,"String_Node_Str");
  setUpParam("String_Node_Str",false,false,DesignChoiceConstants.PARAM_TYPE_STRING,"String_Node_Str");
  setUpParam("String_Node_Str",true,false,DesignChoiceConstants.PARAM_TYPE_DATETIME,"String_Node_Str");
  setUpParam("String_Node_Str",true,false,DesignChoiceConstants.PARAM_TYPE_DATETIME,null);
  setUpParam("String_Node_Str",false,false,DesignChoiceConstants.PARAM_TYPE_DATETIME,null);
  setUpParam("String_Node_Str",true,false,DesignChoiceConstants.PARAM_TYPE_DECIMAL,"String_Node_Str");
  setUpParam("String_Node_Str",false,false,DesignChoiceConstants.PARAM_TYPE_DECIMAL,null);
  setUpParam("String_Node_Str",true,false,DesignChoiceConstants.PARAM_TYPE_FLOAT,"String_Node_Str");
  setUpParam("String_Node_Str",false,false,DesignChoiceConstants.PARAM_TYPE_FLOAT,null);
  setUpParam("String_Node_Str",true,false,DesignChoiceConstants.PARAM_TYPE_BOOLEAN,"String_Node_Str");
  setUpParam("String_Node_Str",false,false,DesignChoiceConstants.PARAM_TYPE_BOOLEAN,null);
  cx=Context.enter();
}

Fixed version (ground truth):
protected void setUp() throws Exception {
  super.setUp();
  session=DesignEngine.newSession(ULocale.getDefault());
  design=session.createDesign();
  design.setFileName("String_Node_Str");
  setUpParam("String_Node_Str",true,true,DesignChoiceConstants.PARAM_TYPE_STRING,"String_Node_Str");
  setUpParam("String_Node_Str",true,true,DesignChoiceConstants.PARAM_TYPE_STRING,null);
  setUpParam("String_Node_Str",false,true,DesignChoiceConstants.PARAM_TYPE_STRING,"String_Node_Str");
  setUpParam("String_Node_Str",false,false,DesignChoiceConstants.PARAM_TYPE_STRING,"String_Node_Str");
  setUpParam("String_Node_Str",true,false,DesignChoiceConstants.PARAM_TYPE_DATETIME,"String_Node_Str");
  setUpParam("String_Node_Str",true,false,DesignChoiceConstants.PARAM_TYPE_DATETIME,null);
  setUpParam("String_Node_Str",false,false,DesignChoiceConstants.PARAM_TYPE_DATETIME,null);
  setUpParam("String_Node_Str",true,false,DesignChoiceConstants.PARAM_TYPE_DECIMAL,"String_Node_Str");
  setUpParam("String_Node_Str",false,false,DesignChoiceConstants.PARAM_TYPE_DECIMAL,null);
  setUpParam("String_Node_Str",true,false,DesignChoiceConstants.PARAM_TYPE_FLOAT,"String_Node_Str");
  setUpParam("String_Node_Str",false,false,DesignChoiceConstants.PARAM_TYPE_FLOAT,null);
  setUpParam("String_Node_Str",true,false,DesignChoiceConstants.PARAM_TYPE_BOOLEAN,"String_Node_Str");
  setUpParam("String_Node_Str",false,false,DesignChoiceConstants.PARAM_TYPE_BOOLEAN,null);
  cx=Context.enter();
}