nus-yam/ex-repair huggingface dataset:
Program: 65058
Project: 65058
Buggy source:
protected void visitChildren(CellArea container){
  Iterator<IArea> iter=container.getChildren();
  int childrencount=container.getChildrenCount();
  if (childrencount > 1 || !(container.getFirstChild() instanceof BlockTextArea)) {
    drawEmptyTextBox();
  }
  while (iter.hasNext()) {
    IArea child=iter.next();
    if (child instanceof BlockTextArea && childrencount > 1) {
      render.visitTextBuffer((BlockTextArea)child);
    }
 else {
      child.accept(render);
    }
  }
}

Fixed version (ground truth):
protected void visitChildren(CellArea container){
  Iterator<IArea> iter=container.getChildren();
  int childrencount=container.getChildrenCount();
  if (childrencount > 1 || childrencount == 0 || !(container.getFirstChild() instanceof BlockTextArea)) {
    drawEmptyTextBox();
  }
  while (iter.hasNext()) {
    IArea child=iter.next();
    if (child instanceof BlockTextArea && childrencount > 1) {
      render.visitTextBuffer((BlockTextArea)child);
    }
 else     if (needStyleORClip(child)) {
      drawEmptyTextBox();
      render.visitTextBuffer((BlockTextArea)child);
    }
 else {
      child.accept(render);
    }
  }
}
Program: 65059
Project: 65059
Buggy source:
protected void drawCell(CellArea cell){
  currentX+=getX(cell);
  currentY+=getY(cell);
  updateRenderXY();
  startCell(cell);
  if (cell.getChildrenCount() == 0) {
    drawEmptyTextBox();
  }
 else {
    visitChildren(cell);
  }
  endCell(cell);
  currentX-=getX(cell);
  currentY-=getY(cell);
  updateRenderXY();
}

Fixed version (ground truth):
protected void drawCell(CellArea cell){
  currentX+=getX(cell);
  currentY+=getY(cell);
  updateRenderXY();
  startCell(cell);
  visitChildren(cell);
  endCell(cell);
  currentX-=getX(cell);
  currentY-=getY(cell);
  updateRenderXY();
}
Program: 65060
Project: 65060
Buggy source:
public void writeTextBlock(int startX,int startY,int width,int height,ContainerArea container){
  parseBlockTextArea(container);
  startX=PPTXUtil.convertToEnums(startX);
  startY=PPTXUtil.convertToEnums(startY);
  width=PPTXUtil.convertToEnums(width);
  height=PPTXUtil.convertToEnums(height);
  if (needGroup) {
    startGroup(startX,startY,width,height);
    startX=0;
    startY=0;
  }
  drawLineBorder(container);
  startBlockText(startX,startY,width,height,container);
  drawBlockTextChildren(container);
  endBlockText(container);
  if (needGroup)   endGroup();
}

Fixed version (ground truth):
public void writeTextBlock(int startX,int startY,int width,int height,ContainerArea container){
  parseBlockTextArea(container);
  needClip=container.needClip();
  startX=PPTXUtil.convertToEnums(startX);
  startY=PPTXUtil.convertToEnums(startY);
  width=PPTXUtil.convertToEnums(width);
  height=PPTXUtil.convertToEnums(height);
  if (needGroup) {
    startGroup(startX,startY,width,height);
    startX=0;
    startY=0;
  }
  drawLineBorder(container);
  startBlockText(startX,startY,width,height,container);
  drawBlockTextChildren(container);
  endBlockText(container);
  if (needGroup)   endGroup();
}
Program: 65062
Project: 65062
Buggy source:
@Override protected void newPage(IContainerArea area){
  assert(area instanceof PageArea);
  PageArea pageArea=(PageArea)area;
  scale=pageArea.getScale();
  int pageHeight=getHeight(pageArea);
  int pageWidth=getWidth(pageArea);
  try {
    int width=PPTXUtil.convertToPointer(pageWidth);
    int height=PPTXUtil.convertToPointer(pageHeight);
    Presentation presentation=((PPTXPageDevice)pageDevice).getPresentation();
    String masterPageName=getMasterPageName(pageArea);
    SlideMaster master=presentation.getSlideMaster(masterPageName);
    if (master == null) {
      master=presentation.createSlideMaster(masterPageName,pageArea);
      new SlideWriter(this).writeSlideMaster(master,pageArea);
    }
    this.pageGraphic=new PPTXPage(presentation.createSlide(master,width,height,pageArea));
  }
 catch (  IOException e) {
    logger.log(Level.SEVERE,e.getLocalizedMessage(),e);
  }
}

Fixed version (ground truth):
@Override protected void newPage(IContainerArea area){
  assert(area instanceof PageArea);
  PageArea pageArea=(PageArea)area;
  scale=pageArea.getScale();
  int pageHeight=getHeight(pageArea);
  int pageWidth=getWidth(pageArea);
  try {
    int width=PPTXUtil.convertToPointer(pageWidth);
    int height=PPTXUtil.convertToPointer(pageHeight);
    Presentation presentation=((PPTXPageDevice)pageDevice).getPresentation();
    String masterPageName=getMasterPageName(pageArea);
    SlideMaster master=presentation.getSlideMaster(masterPageName);
    if (master == null) {
      master=presentation.createSlideMaster(masterPageName,pageArea);
      new SlideWriter(this).writeSlideMaster(master,pageArea);
    }
    this.pageGraphic=new PPTXPage(presentation.createSlide(master,width,height,pageArea));
    ((PPTXPage)pageGraphic).getCanvas().setScale(scale);
  }
 catch (  IOException e) {
    logger.log(Level.SEVERE,e.getLocalizedMessage(),e);
  }
}
Program: 65063
Project: 65063
Buggy source:
public PPTXRender(PPTXRender render,PPTXCanvas canvas){
  initialize(render.services);
  this.out=render.out;
  this.tempFileDir=render.tempFileDir;
  this.currentX=render.currentX;
  this.currentY=render.currentY;
  this.scale=render.scale;
  this.pageDevice=render.pageDevice;
  this.pageGraphic=new PPTXPage(canvas);
}

Fixed version (ground truth):
public PPTXRender(PPTXRender render,PPTXCanvas canvas){
  initialize(render.services);
  this.out=render.out;
  this.tempFileDir=render.tempFileDir;
  this.scale=render.scale;
  canvas.setScale(scale);
  this.currentX=render.currentX;
  this.currentY=render.currentY;
  this.pageDevice=render.pageDevice;
  this.pageGraphic=new PPTXPage(canvas);
}
Program: 65065
Project: 65065
Buggy source:
protected void visitChildren(IContainerArea container){
  Iterator<IArea> iter=container.getChildren();
  while (iter.hasNext()) {
    IArea child=iter.next();
    if (child instanceof BlockTextArea) {
      if (container.getChildrenCount() > 1) {
        render.visitTextBuffer((BlockTextArea)child);
      }
 else {
        child.accept(render);
      }
    }
 else {
      if (child instanceof TableArea) {
        drawEmptyTextBox();
      }
      child.accept(render);
    }
  }
}

Fixed version (ground truth):
protected void visitChildren(CellArea container){
  Iterator<IArea> iter=container.getChildren();
  int childrencount=container.getChildrenCount();
  if (childrencount > 1 || !(container.getFirstChild() instanceof BlockTextArea)) {
    drawEmptyTextBox();
  }
  while (iter.hasNext()) {
    IArea child=iter.next();
    if (child instanceof BlockTextArea) {
      if (childrencount > 1) {
        render.visitTextBuffer((BlockTextArea)child);
      }
 else {
        child.accept(render);
      }
    }
 else {
      if (child instanceof TableArea) {
        drawEmptyTextBox();
      }
      child.accept(render);
    }
  }
}
Program: 65066
Project: 65066
Buggy source:
private void writeColumnsWidth(TableArea tablearea){
  numOfColumns=tablearea.getColumnCount();
  int columnWidth=0;
  int cellwidth=0;
  writer.openTag("String_Node_Str");
  int defaultwidth=tablearea.getWidth() / numOfColumns;
  for (int i=0; i < numOfColumns; i++) {
    cellwidth=tablearea.getCellWidth(i,i + 1);
    if (cellwidth <= 0) {
      cellwidth=defaultwidth;
    }
    columnWidth=PPTXUtil.convertToEnums(getScaledValue(cellwidth));
    writer.openTag("String_Node_Str");
    writer.attribute("String_Node_Str",columnWidth);
    writer.closeTag("String_Node_Str");
  }
  writer.closeTag("String_Node_Str");
}

Fixed version (ground truth):
private void writeColumnsWidth(TableArea tablearea){
  numOfColumns=tablearea.getColumnCount();
  int columnWidth=0;
  int cellwidth=0;
  writer.openTag("String_Node_Str");
  int defaultwidth=tablearea.getWidth() / numOfColumns;
  for (int i=0; i < numOfColumns; i++) {
    cellwidth=tablearea.getCellWidth(i,i + 1);
    if (cellwidth <= 0) {
      cellwidth=defaultwidth;
    }
    columnWidth=PPTXUtil.convertToEnums(canvas.getScaledValue(cellwidth));
    writer.openTag("String_Node_Str");
    writer.attribute("String_Node_Str",columnWidth);
    writer.closeTag("String_Node_Str");
  }
  writer.closeTag("String_Node_Str");
}
Program: 65067
Project: 65067
Buggy source:
private void startRow(RowArea row){
  writer.openTag("String_Node_Str");
  writer.attribute("String_Node_Str",PPTXUtil.convertToEnums(row.getHeight()));
}

Fixed version (ground truth):
private void startRow(RowArea row){
  writer.openTag("String_Node_Str");
  writer.attribute("String_Node_Str",PPTXUtil.convertToEnums(canvas.getScaledValue(row.getHeight())));
}
Program: 65068
Project: 65068
Buggy source:
private int getX(IContainerArea area){
  return getScaledValue(area.getX());
}

Fixed version (ground truth):
private int getX(IContainerArea area){
  return canvas.getScaledValue(area.getX());
}
Program: 65069
Project: 65069
Buggy source:
private int getY(IContainerArea area){
  return getScaledValue(area.getY());
}

Fixed version (ground truth):
private int getY(IContainerArea area){
  return canvas.getScaledValue(area.getY());
}
Program: 65070
Project: 65070
Buggy source:
private void setTextProperty(String tag,TextStyle style){
  FontInfo info=style.getFontInfo();
  writer.openTag(tag);
  writer.attribute("String_Node_Str","String_Node_Str");
  writer.attribute("String_Node_Str","String_Node_Str");
  writer.attribute("String_Node_Str","String_Node_Str");
  writer.attribute("String_Node_Str","String_Node_Str");
  if (style.isLinethrough()) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
  if (style.isUnderline()) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
  writer.attribute("String_Node_Str",(int)(info.getFontSize() * 100));
  boolean isItalic=(info.getFontStyle() & Font.ITALIC) != 0;
  boolean isBold=(info.getFontStyle() & Font.BOLD) != 0;
  if (isItalic) {
    writer.attribute("String_Node_Str",1);
  }
  if (isBold) {
    writer.attribute("String_Node_Str",1);
  }
  canvas.setBackgroundColor(style.getColor());
  setTextFont(info.getFontName());
  canvas.setHyperlink(link);
  writer.closeTag(tag);
}

Fixed version (ground truth):
private void setTextProperty(String tag,TextStyle style){
  FontInfo info=style.getFontInfo();
  writer.openTag(tag);
  writer.attribute("String_Node_Str","String_Node_Str");
  writer.attribute("String_Node_Str","String_Node_Str");
  writer.attribute("String_Node_Str","String_Node_Str");
  writer.attribute("String_Node_Str","String_Node_Str");
  if (style.isLinethrough()) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
  if (style.isUnderline()) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
  writer.attribute("String_Node_Str",canvas.getScaledValue(info.getFontSize() * 100));
  boolean isItalic=(info.getFontStyle() & Font.ITALIC) != 0;
  boolean isBold=(info.getFontStyle() & Font.BOLD) != 0;
  if (isItalic) {
    writer.attribute("String_Node_Str",1);
  }
  if (isBold) {
    writer.attribute("String_Node_Str",1);
  }
  canvas.setBackgroundColor(style.getColor());
  setTextFont(info.getFontName());
  canvas.setHyperlink(link);
  writer.closeTag(tag);
}
Program: 65072
Project: 65072
Buggy source:
private void drawBlockTextChildren(IArea child){
  if (child instanceof TextArea) {
    writeTextRun((TextArea)child);
  }
 else   if (child instanceof TextLineArea || child instanceof LineArea) {
    Iterator<IArea> iter=((ContainerArea)child).getChildren();
    startTextLineArea();
    hasParagraph=true;
    while (iter.hasNext()) {
      IArea area=iter.next();
      drawBlockTextChildren(area);
    }
    IArea lastchild=child;
    do {
      lastchild=((ContainerArea)lastchild).getLastChild();
    }
 while (lastchild != null && !(lastchild instanceof TextArea));
    if (lastchild != null) {
      endTextLineArea((TextArea)lastchild);
    }
    hasParagraph=false;
  }
 else   if (child instanceof ContainerArea) {
    Iterator<IArea> iter=(((ContainerArea)child).getChildren());
    while (iter.hasNext()) {
      IArea area=iter.next();
      drawBlockTextChildren(area);
    }
  }
}

Fixed version (ground truth):
private void drawBlockTextChildren(IArea child){
  if (child instanceof TextArea) {
    writeTextRun((TextArea)child);
  }
 else   if (child instanceof TextLineArea || child instanceof InlineTextArea) {
    Iterator<IArea> iter=((ContainerArea)child).getChildren();
    startTextLineArea();
    hasParagraph=true;
    while (iter.hasNext()) {
      IArea area=iter.next();
      drawBlockTextChildren(area);
    }
    IArea lastchild=((ContainerArea)child).getLastChild();
    endTextLineArea((TextArea)lastchild);
    hasParagraph=false;
  }
 else   if (child instanceof ContainerArea) {
    Iterator<IArea> iter=(((ContainerArea)child).getChildren());
    while (iter.hasNext()) {
      IArea area=iter.next();
      drawBlockTextChildren(area);
    }
  }
}
Program: 65073
Project: 65073
Buggy source:
public static boolean isSingleTextControl(IContainerArea container){
  if (container instanceof BlockTextArea) {
    Iterator<IArea> iter=container.getChildren();
    while (iter.hasNext()) {
      IArea area=iter.next();
      if (!(area instanceof TextLineArea)) {
        return false;
      }
    }
    if (hasNonEmptyTextArea(container))     return true;
 else     return false;
  }
 else   if (container instanceof InlineTextArea) {
    Iterator<IArea> iter=container.getChildren();
    while (iter.hasNext()) {
      IArea area=iter.next();
      if (!(area instanceof TextArea)) {
        return false;
      }
    }
    if (hasNonEmptyTextArea(container))     return true;
 else     return false;
  }
 else   if (container instanceof LineArea) {
    Iterator<IArea> iter=container.getChildren();
    while (iter.hasNext()) {
      IArea area=iter.next();
      if (!(area instanceof InlineTextArea)) {
        return false;
      }
    }
    if (hasNonEmptyTextArea(container))     return true;
 else     return false;
  }
  return false;
}

Fixed version (ground truth):
public static boolean isSingleTextControl(IContainerArea container){
  if (container instanceof BlockTextArea) {
    Iterator<IArea> iter=container.getChildren();
    while (iter.hasNext()) {
      IArea area=iter.next();
      if (!(area instanceof TextLineArea)) {
        return false;
      }
    }
    if (hasNonEmptyTextArea(container))     return true;
 else     return false;
  }
 else   if (container instanceof InlineTextArea) {
    Iterator<IArea> iter=container.getChildren();
    while (iter.hasNext()) {
      IArea area=iter.next();
      if (!(area instanceof TextArea)) {
        return false;
      }
    }
    if (hasNonEmptyTextArea(container))     return true;
 else     return false;
  }
  return false;
}
Program: 65075
Project: 65075
Buggy source:
/** 
 * Reset year units for this datetime instance above a specified unit.
 * @param iUnit The unit above which year values are to be reset
 * @param always indicates if it's always trimmed no matter if it's full date time
 */
public final void clearAbove(int iUnit,boolean always){
  if (!always && isFullDateTime()) {
    return;
  }
  if (iUnit == YEAR) {
    return;
  }
 else   if (iUnit == MONTH || iUnit == GroupingUnitType.QUARTERS) {
    set(Calendar.YEAR,2000);
  }
 else   if (iUnit == DATE) {
    set(Calendar.YEAR,2000);
  }
 else   if (iUnit == WEEK_OF_YEAR) {
    set(Calendar.YEAR,2000);
  }
  return;
}

Fixed version (ground truth):
/** 
 * Reset year units for this datetime instance above a specified unit.
 * @param iUnit The unit above which year values are to be reset
 * @param always indicates if it's always trimmed no matter if it's full date time
 */
public final void clearAbove(int iUnit,boolean always){
  if (!always && isFullDateTime()) {
    return;
  }
  if (iUnit == YEAR) {
    return;
  }
 else   if (iUnit == MONTH || iUnit == QUARTER) {
    set(Calendar.YEAR,2000);
  }
 else   if (iUnit == DATE) {
    set(Calendar.YEAR,2000);
  }
 else   if (iUnit == WEEK_OF_YEAR) {
    set(Calendar.YEAR,2000);
  }
  return;
}
Program: 65077
Project: 65077
Buggy source:
/** 
 * Reset year units for this datetime instance above a specified unit.
 * @param iUnit The unit above which year values are to be reset
 * @param always indicates if it's always trimmed no matter if it's full date time
 */
public final void clearAbove(int iUnit,boolean always){
  if (!always && isFullDateTime()) {
    return;
  }
  if (iUnit == YEAR) {
    return;
  }
 else   if (iUnit == MONTH || iUnit == QUARTER) {
    set(Calendar.YEAR,2000);
  }
 else   if (iUnit == DATE) {
    set(Calendar.YEAR,2000);
  }
 else   if (iUnit == WEEK_OF_YEAR) {
    set(Calendar.YEAR,2000);
  }
  return;
}

Fixed version (ground truth):
/** 
 * Reset year units for this datetime instance above a specified unit.
 * @param iUnit The unit above which year values are to be reset
 * @param always indicates if it's always trimmed no matter if it's full date time
 */
public final void clearAbove(int iUnit,boolean always){
  if (!always && isFullDateTime()) {
    return;
  }
  if (iUnit == YEAR) {
    return;
  }
 else   if (iUnit == MONTH || iUnit == QUARTER) {
    set(Calendar.YEAR,2000);
  }
 else   if (iUnit == DATE || iUnit == DAY_OF_MONTH || iUnit == DAY_OF_WEEK || iUnit == DAY_OF_YEAR) {
    set(Calendar.YEAR,2000);
  }
 else   if (iUnit == WEEK_OF_YEAR || iUnit == WEEK_OF_MONTH) {
    set(Calendar.YEAR,2000);
  }
  return;
}
Program: 65080
Project: 65080
Buggy source:
public static IDataSetReader createReader(StreamManager manager,IResultClass resultClass,Map<?,?> appContext) throws DataException {
  return null;
}

Fixed version (ground truth):
public static IDataSetReader createReader(StreamManager manager,IResultClass resultClass,boolean includeInnerId,Map<?,?> appContext) throws DataException {
  return null;
}
Program: 65084
Project: 65084
Buggy source:
public String[] getVMArguments(ILaunchConfiguration configuration) throws CoreException {
  String[] args=super.getVMArguments(configuration);
  List arguments=new ArrayList();
  for (int i=0; i < args.length; i++) {
    arguments.add(args[i]);
  }
  helper.addPortArgs(arguments);
  helper.addUserClassPath(arguments,configuration);
  helper.addFileNameArgs(arguments);
  helper.addEngineHomeArgs(arguments);
  helper.addResourceFolder(arguments);
  helper.addTempFolder(arguments);
  helper.addTypeArgs(arguments);
  helper.addParameterArgs(arguments);
  return (String[])arguments.toArray(new String[arguments.size()]);
}

Fixed version (ground truth):
public String[] getVMArguments(ILaunchConfiguration configuration) throws CoreException {
  String[] args=super.getVMArguments(configuration);
  List arguments=new ArrayList();
  for (int i=0; i < args.length; i++) {
    arguments.add(args[i]);
  }
  helper.addPortArgs(arguments);
  helper.addUserClassPath(arguments,configuration);
  helper.addFileNameArgs(arguments);
  helper.addEngineHomeArgs(arguments);
  helper.addResourceFolder(arguments);
  helper.addTempFolder(arguments);
  helper.addTypeArgs(arguments);
  helper.addDataLimitArgs(arguments);
  helper.addParameterArgs(arguments);
  return (String[])arguments.toArray(new String[arguments.size()]);
}
Program: 65088
Project: 65088
Buggy source:
protected void bindBinding(IBinding colBinding,ICubeQueryDefinition cubeQuery,CubeHandle cube) throws BirtException {
  if (colBinding == null) {
    return;
  }
  String bindingName=colBinding.getBindingName();
  String expr=registeredQueries.get(bindingName).encode();
  if (!cubeQuery.getBindings().contains(colBinding)) {
    cubeQuery.addBinding(colBinding);
  }
  String measure=exprCodec.getMeasureName(expr);
  if (measure != null) {
    if (registeredMeasures.containsKey(bindingName)) {
      return;
    }
    IMeasureDefinition mDef=null;
    MeasureHandle measureHandle=cube.getMeasure(measure);
    if (measureHandle != null && measureHandle.isCalculated()) {
      mDef=cubeQuery.createDerivedMeasure(measure,DataAdapterUtil.adaptModelDataType(measureHandle.getDataType()),modelAdapter.adaptExpression((Expression)measureHandle.getExpressionProperty(IMeasureModel.MEASURE_EXPRESSION_PROP).getValue(),ExpressionLocation.CUBE));
    }
 else {
      mDef=cubeQuery.createMeasure(measure);
    }
    registeredMeasures.put(bindingName,mDef);
    String aggFun=DataAdapterUtil.adaptModelAggregationType(cube.getMeasure(measure).getFunction());
    mDef.setAggrFunction(aggFun);
  }
 else   if (exprCodec.isDimensionExpresion()) {
    registerDimensionLevel(cubeQuery,cube,bindingName);
  }
 else   if (exprCodec.isCubeBinding(true)) {
    bindExpression(expr,cubeQuery,cube);
    return;
  }
}

Fixed version (ground truth):
protected void bindBinding(IBinding colBinding,ICubeQueryDefinition cubeQuery,CubeHandle cube) throws BirtException {
  if (colBinding == null) {
    return;
  }
  String bindingName=colBinding.getBindingName();
  String expr=registeredQueries.get(bindingName).encode();
  if (!cubeQuery.getBindings().contains(colBinding)) {
    cubeQuery.addBinding(colBinding);
  }
  String measure=exprCodec.getMeasureName(expr);
  if (measure != null) {
    if (registeredMeasures.containsKey(bindingName)) {
      return;
    }
    IMeasureDefinition mDef=null;
    MeasureHandle measureHandle=cube.getMeasure(measure);
    if (measureHandle != null && measureHandle.isCalculated()) {
      mDef=cubeQuery.createDerivedMeasure(measure,DataAdapterUtil.adaptModelDataType(measureHandle.getDataType()),modelAdapter.adaptExpression((Expression)measureHandle.getExpressionProperty(IMeasureModel.MEASURE_EXPRESSION_PROP).getValue(),ExpressionLocation.CUBE));
    }
 else {
      mDef=cubeQuery.createMeasure(measure);
    }
    registeredMeasures.put(bindingName,mDef);
    if (cube.getMeasure(measure) != null) {
      String aggFun=DataAdapterUtil.adaptModelAggregationType(cube.getMeasure(measure).getFunction());
      mDef.setAggrFunction(aggFun);
    }
  }
 else   if (exprCodec.isDimensionExpresion()) {
    registerDimensionLevel(cubeQuery,cube,bindingName);
  }
 else   if (exprCodec.isCubeBinding(true)) {
    bindExpression(expr,cubeQuery,cube);
    return;
  }
}
Program: 65089
Project: 65089
Buggy source:
@SuppressWarnings("String_Node_Str") private List<FilterConditionElementHandle> getFiltersFromXtab(CrosstabReportItemHandle crossTab){
  List<FilterConditionElementHandle> list=new ArrayList<FilterConditionElementHandle>();
  if (crossTab == null) {
    return list;
  }
  if (crossTab.getCrosstabView(ICrosstabConstants.COLUMN_AXIS_TYPE) != null) {
    DesignElementHandle elementHandle=crossTab.getCrosstabView(ICrosstabConstants.COLUMN_AXIS_TYPE).getModelHandle();
    list.addAll(getLevelOnCrosstab((ExtendedItemHandle)elementHandle));
  }
  if (crossTab.getCrosstabView(ICrosstabConstants.ROW_AXIS_TYPE) != null) {
    DesignElementHandle elementHandle=crossTab.getCrosstabView(ICrosstabConstants.ROW_AXIS_TYPE).getModelHandle();
    list.addAll(getLevelOnCrosstab((ExtendedItemHandle)elementHandle));
  }
  int measureCount=crossTab.getMeasureCount();
  for (int i=0; i < measureCount; i++) {
    MeasureViewHandle measureView=crossTab.getMeasure(i);
    Iterator<FilterConditionElementHandle> iter=measureView.filtersIterator();
    while (iter.hasNext()) {
      list.add(iter.next());
    }
  }
  return list;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private List<FilterConditionElementHandle> getFiltersFromXtab(CrosstabReportItemHandle crossTab){
  List<FilterConditionElementHandle> list=new ArrayList<FilterConditionElementHandle>();
  if (crossTab == null) {
    return list;
  }
  if (crossTab.getCrosstabView(ICrosstabConstants.COLUMN_AXIS_TYPE) != null) {
    DesignElementHandle elementHandle=crossTab.getCrosstabView(ICrosstabConstants.COLUMN_AXIS_TYPE).getModelHandle();
    list.addAll(getLevelOnCrosstab((ExtendedItemHandle)elementHandle));
  }
  if (crossTab.getCrosstabView(ICrosstabConstants.ROW_AXIS_TYPE) != null) {
    DesignElementHandle elementHandle=crossTab.getCrosstabView(ICrosstabConstants.ROW_AXIS_TYPE).getModelHandle();
    list.addAll(getLevelOnCrosstab((ExtendedItemHandle)elementHandle));
  }
  int measureCount=crossTab.getMeasureCount();
  for (int i=0; i < measureCount; i++) {
    MeasureViewHandle measureView=crossTab.getMeasure(i);
    if (measureView != null) {
      Iterator<FilterConditionElementHandle> iter=measureView.filtersIterator();
      while (iter.hasNext()) {
        list.add(iter.next());
      }
    }
  }
  return list;
}
Program: 65090
Project: 65090
Buggy source:
public ContentProvider(String[] extensionFilter){
  if (extensionFilter != null) {
    ArrayList<String> filters=new ArrayList<String>();
    for (int i=0; i < extensionFilter.length; i++) {
      String ext=extensionFilter[i].toLowerCase(Locale.US);
      if (ALL_EXT.equals(ext))       continue;
      filters.add(ext.substring(1));
    }
    exts=filters.toArray(new String[]{});
  }
}

Fixed version (ground truth):
public ContentProvider(String[] extensionFilter){
  if (extensionFilter != null) {
    ArrayList<String> filters=new ArrayList<String>();
    for (int i=0; i < extensionFilter.length; i++) {
      String[] regxs=extensionFilter[i].split("String_Node_Str");
      for (      String regx : regxs) {
        String ext=regx.toLowerCase(Locale.US);
        if (ALL_EXT.equals(regx))         continue;
        filters.add(ext.substring(1));
      }
    }
    exts=filters.toArray(new String[]{});
  }
}
Program: 65091
Project: 65091
Buggy source:
private void prepareJDBCMetaDataProvider(DataSetDesign dataSetDesign){
  JdbcMetaDataProvider.createInstance(dataSetDesign);
class TempThread extends Thread {
    public void run(){
      try {
        JdbcMetaDataProvider.getInstance().reconnect();
      }
 catch (      Exception e) {
        prepareException=e;
      }
    }
  }
  TempThread tt=new TempThread();
  tt.start();
  try {
    tt.join(this.timeOutLimit * 1000);
    Thread.State state=tt.getState();
    if (state == Thread.State.TERMINATED) {
      if (prepareException != null) {
        ExceptionHandler.showException(PlatformUI.getWorkbench().getDisplay().getActiveShell(),JdbcPlugin.getResourceString("String_Node_Str"),prepareException.getLocalizedMessage(),prepareException);
        prepareException=null;
      }
    }
 else {
      continueConnect=false;
      ExceptionHandler.showException(PlatformUI.getWorkbench().getDisplay().getActiveShell(),JdbcPlugin.getResourceString("String_Node_Str"),JdbcPlugin.getResourceString("String_Node_Str"),new Exception());
    }
  }
 catch (  InterruptedException e) {
    ExceptionHandler.showException(PlatformUI.getWorkbench().getDisplay().getActiveShell(),JdbcPlugin.getResourceString("String_Node_Str"),e.getLocalizedMessage(),e);
  }
}

Fixed version (ground truth):
private void prepareJDBCMetaDataProvider(DataSetDesign dataSetDesign){
  JdbcMetaDataProvider.createInstance(dataSetDesign,this.getHostResourceIdentifiers());
class TempThread extends Thread {
    public void run(){
      try {
        JdbcMetaDataProvider.getInstance().reconnect();
      }
 catch (      Exception e) {
        prepareException=e;
      }
    }
  }
  TempThread tt=new TempThread();
  tt.start();
  try {
    tt.join(this.timeOutLimit * 1000);
    Thread.State state=tt.getState();
    if (state == Thread.State.TERMINATED) {
      if (prepareException != null) {
        ExceptionHandler.showException(PlatformUI.getWorkbench().getDisplay().getActiveShell(),JdbcPlugin.getResourceString("String_Node_Str"),prepareException.getLocalizedMessage(),prepareException);
        prepareException=null;
      }
    }
 else {
      continueConnect=false;
      ExceptionHandler.showException(PlatformUI.getWorkbench().getDisplay().getActiveShell(),JdbcPlugin.getResourceString("String_Node_Str"),JdbcPlugin.getResourceString("String_Node_Str"),new Exception());
    }
  }
 catch (  InterruptedException e) {
    ExceptionHandler.showException(PlatformUI.getWorkbench().getDisplay().getActiveShell(),JdbcPlugin.getResourceString("String_Node_Str"),e.getLocalizedMessage(),e);
  }
}
Program: 65092
Project: 65092
Buggy source:
protected void createAndInitCustomControl(Composite parent,Properties profileProps){
  if (m_pageHelper == null)   m_pageHelper=new JDBCSelectionPageHelper(this);
  Composite content=m_pageHelper.createCustomControl(parent);
  m_pageHelper.addBidiSettingsButton(content,profileProps);
  this.setPingButtonVisible(false);
  m_pageHelper.initCustomControl(profileProps);
}

Fixed version (ground truth):
protected void createAndInitCustomControl(Composite parent,Properties profileProps){
  if (m_pageHelper == null)   m_pageHelper=new JDBCSelectionPageHelper(this);
  Composite content=m_pageHelper.createCustomControl(parent);
  m_pageHelper.addBidiSettingsButton(content,profileProps);
  this.setPingButtonVisible(false);
  m_pageHelper.initCustomControl(profileProps);
  m_pageHelper.setResourceIdentifier(this.getHostResourceIdentifiers());
}
Program: 65094
Project: 65094
Buggy source:
/** 
 * Attempts to connect to the Jdbc Data Source using the properties ( username, password, driver class ) specified.
 * @param : showErrorMessage is set to true , and error dialog box will be displayed if the connection fails.
 * @return Returns true if the connection is OK,and false otherwise
 * @throws OdaException
 */
private boolean testConnection() throws OdaException {
  if (!isValidDataSource()) {
    return false;
  }
  String url=jdbcUrl.getText().trim();
  String userid=userName.getText().trim();
  String passwd=password.getText();
  String driverName=getSelectedDriverClassName();
  String jndiNameValue=getODAJndiName();
  if (jndiNameValue.length() == 0)   jndiNameValue=null;
  if (bidiSupportObj == null) {
    if (m_wizardPage instanceof JDBCSelectionWizardPage) {
      bidiSupportObj=((JDBCSelectionWizardPage)m_wizardPage).getBidiSupport();
    }
 else     if (m_propertyPage instanceof JDBCPropertyPage) {
      bidiSupportObj=((JDBCPropertyPage)m_propertyPage).getBidiSupport();
    }
  }
  if (bidiSupportObj != null) {
    return DriverLoader.testConnection(driverName,url,jndiNameValue,userid,passwd,bidiSupportObj.getMetadataBidiFormat().toString(),collectSpecifiedProperties());
  }
  return DriverLoader.testConnection(driverName,url,jndiNameValue,userid,passwd,collectSpecifiedProperties());
}

Fixed version (ground truth):
/** 
 * Attempts to connect to the Jdbc Data Source using the properties ( username, password, driver class ) specified.
 * @param : showErrorMessage is set to true , and error dialog box will be displayed if the connection fails.
 * @return Returns true if the connection is OK,and false otherwise
 * @throws OdaException
 */
private boolean testConnection() throws OdaException {
  if (!isValidDataSource()) {
    return false;
  }
  String url=jdbcUrl.getText().trim();
  String userid=userName.getText().trim();
  String passwd=password.getText();
  String driverName=getSelectedDriverClassName();
  String jndiNameValue=getODAJndiName();
  if (jndiNameValue.length() == 0)   jndiNameValue=null;
  if (bidiSupportObj == null) {
    if (m_wizardPage instanceof JDBCSelectionWizardPage) {
      bidiSupportObj=((JDBCSelectionWizardPage)m_wizardPage).getBidiSupport();
    }
 else     if (m_propertyPage instanceof JDBCPropertyPage) {
      bidiSupportObj=((JDBCPropertyPage)m_propertyPage).getBidiSupport();
    }
  }
  Properties privateProperties=collectSpecifiedProperties();
  Map appContext=new HashMap();
  appContext.put(org.eclipse.datatools.connectivity.oda.util.ResourceIdentifiers.ODA_APP_CONTEXT_KEY_CONSUMER_RESOURCE_IDS,this.resourceIdentifier);
  ResourceLocator.resolveConnectionProperties(privateProperties,driverName,appContext);
  if (bidiSupportObj != null) {
    return DriverLoader.testConnection(driverName,url,jndiNameValue,userid,passwd,bidiSupportObj.getMetadataBidiFormat().toString(),privateProperties);
  }
  return DriverLoader.testConnection(driverName,url,jndiNameValue,userid,passwd,privateProperties);
}
Program: 65095
Project: 65095
Buggy source:
private void drawPropertyText(Group propertyGroup,final String propertyName,String propertyContent,boolean encrypt){
  GridData gd;
  final Text propertyText;
  if (encrypt) {
    propertyText=new Text(propertyGroup,SWT.BORDER | SWT.PASSWORD);
  }
 else {
    propertyText=new Text(propertyGroup,SWT.BORDER);
  }
  boolean isEncryptionMethod=Constants.DRIVER_INFO_PROPERTY_ENCRYPTION_METHOD.equals(propertyName);
  if (propertyContent != null) {
    propertyText.setText(propertyContent);
    databaseProperties.put(propertyName,propertyContent);
  }
 else   if (isEncryptionMethod) {
    propertyText.setText(ENCRYTPION_METHOD_DEFAULT_VALUE);
  }
  gd=new GridData(GridData.FILL_HORIZONTAL);
  gd.horizontalSpan=3;
  propertyText.setLayoutData(gd);
  if (isEncryptionMethod) {
    Label blankLabel=new Label(propertyGroup,SWT.NONE);
    GridData blankLabelGd=new GridData();
    blankLabelGd.horizontalSpan=2;
    blankLabel.setLayoutData(blankLabelGd);
    Label prompLabel=new Label(propertyGroup,SWT.NONE);
    prompLabel.setText(JdbcPlugin.getResourceString("String_Node_Str"));
    GridData labelGd=new GridData(GridData.FILL_HORIZONTAL);
    labelGd.horizontalSpan=3;
    prompLabel.setLayoutData(labelGd);
  }
  propertyText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      databaseProperties.put(propertyName,propertyText.getText());
    }
  }
);
  propertyText.getParent().layout();
}

Fixed version (ground truth):
private void drawPropertyText(Group propertyGroup,final String propertyName,String propertyContent,boolean encrypt){
  GridData gd;
  final Text propertyText;
  if (encrypt) {
    propertyText=new Text(propertyGroup,SWT.BORDER | SWT.PASSWORD);
  }
 else {
    propertyText=new Text(propertyGroup,SWT.BORDER);
  }
  boolean isEncryptionMethod=DriverInfoConstants.DRIVER_INFO_PROPERTY_ENCRYPTION_METHOD.equals(propertyName);
  if (propertyContent != null) {
    propertyText.setText(propertyContent);
    databaseProperties.put(propertyName,propertyContent);
  }
 else   if (isEncryptionMethod) {
    propertyText.setText(ENCRYTPION_METHOD_DEFAULT_VALUE);
  }
  gd=new GridData(GridData.FILL_HORIZONTAL);
  gd.horizontalSpan=3;
  propertyText.setLayoutData(gd);
  if (isEncryptionMethod) {
    Label blankLabel=new Label(propertyGroup,SWT.NONE);
    GridData blankLabelGd=new GridData();
    blankLabelGd.horizontalSpan=2;
    blankLabel.setLayoutData(blankLabelGd);
    Label prompLabel=new Label(propertyGroup,SWT.NONE);
    prompLabel.setText(JdbcPlugin.getResourceString("String_Node_Str"));
    GridData labelGd=new GridData(GridData.FILL_HORIZONTAL);
    labelGd.horizontalSpan=3;
    prompLabel.setLayoutData(labelGd);
  }
  propertyText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      databaseProperties.put(propertyName,propertyText.getText());
    }
  }
);
  propertyText.getParent().layout();
}
Program: 65097
Project: 65097
Buggy source:
public void createPageCustomControl(Composite parent){
  if (m_pageHelper == null)   m_pageHelper=new JDBCSelectionPageHelper(this);
  Composite content=m_pageHelper.createCustomControl(parent);
  m_pageHelper.initCustomControl(m_folderProperties);
  m_pageHelper.addBidiSettingsButton(content,m_folderProperties);
  this.setPingButtonVisible(false);
}

Fixed version (ground truth):
public void createPageCustomControl(Composite parent){
  if (m_pageHelper == null)   m_pageHelper=new JDBCSelectionPageHelper(this);
  Composite content=m_pageHelper.createCustomControl(parent);
  m_pageHelper.initCustomControl(m_folderProperties);
  m_pageHelper.addBidiSettingsButton(content,m_folderProperties);
  m_pageHelper.setResourceIdentifier(this.getHostResourceIdentifiers());
  this.setPingButtonVisible(false);
}
Program: 65098
Project: 65098
Buggy source:
public static void createInstance(DataSetDesign dataSetDesign){
  release();
  DataSourceDesign dataSourceDesign=dataSetDesign.getDataSourceDesign();
  Properties props=new Properties();
  try {
    props=DesignSessionUtil.getEffectiveDataSourceProperties(dataSourceDesign);
  }
 catch (  OdaException e) {
    logger.log(Level.WARNING,e.getMessage(),e);
  }
  String userName=props.getProperty(Constants.ODAUser);
  String password=props.getProperty(Constants.ODAPassword);
  String url=props.getProperty(Constants.ODAURL);
  String driverClass=props.getProperty(Constants.ODADriverClass);
  String metadataBidiFormatStr=props.getProperty(BidiConstants.METADATA_FORMAT_PROP_NAME);
  if (metadataBidiFormatStr != null) {
    userName=BidiTransform.transform(userName,BidiConstants.DEFAULT_BIDI_FORMAT_STR,metadataBidiFormatStr);
    password=BidiTransform.transform(password,BidiConstants.DEFAULT_BIDI_FORMAT_STR,metadataBidiFormatStr);
    url=BidiTransform.transformURL(url,BidiConstants.DEFAULT_BIDI_FORMAT_STR,metadataBidiFormatStr);
  }
  instance=new JdbcMetaDataProvider(driverClass,url,userName,password,props);
}

Fixed version (ground truth):
public static void createInstance(DataSetDesign dataSetDesign,ResourceIdentifiers resourceIdentifiers){
  release();
  DataSourceDesign dataSourceDesign=dataSetDesign.getDataSourceDesign();
  Properties props=new Properties();
  try {
    props=DesignSessionUtil.getEffectiveDataSourceProperties(dataSourceDesign);
  }
 catch (  OdaException e) {
    logger.log(Level.WARNING,e.getMessage(),e);
  }
  String userName=props.getProperty(Constants.ODAUser);
  String password=props.getProperty(Constants.ODAPassword);
  String url=props.getProperty(Constants.ODAURL);
  String driverClass=props.getProperty(Constants.ODADriverClass);
  Map appContext=new HashMap();
  if (resourceIdentifiers != null) {
    appContext.put(org.eclipse.datatools.connectivity.oda.util.ResourceIdentifiers.ODA_APP_CONTEXT_KEY_CONSUMER_RESOURCE_IDS,DesignSessionUtil.createRuntimeResourceIdentifiers(resourceIdentifiers));
  }
  try {
    ResourceLocator.resolveConnectionProperties(props,driverClass,appContext);
  }
 catch (  OdaException e) {
  }
  String metadataBidiFormatStr=props.getProperty(BidiConstants.METADATA_FORMAT_PROP_NAME);
  if (metadataBidiFormatStr != null) {
    userName=BidiTransform.transform(userName,BidiConstants.DEFAULT_BIDI_FORMAT_STR,metadataBidiFormatStr);
    password=BidiTransform.transform(password,BidiConstants.DEFAULT_BIDI_FORMAT_STR,metadataBidiFormatStr);
    url=BidiTransform.transformURL(url,BidiConstants.DEFAULT_BIDI_FORMAT_STR,metadataBidiFormatStr);
  }
  instance=new JdbcMetaDataProvider(driverClass,url,userName,password,props);
}
Program: 65100
Project: 65100
Buggy source:
/** 
 * @return
 * @throws DataException 
 */
public void loadFinished() throws DataException {
  switchCacheMap(dataSetDesign);
  cacheMapManager.loadFinishOnCache(DataSourceAndDataSet.newInstance(this.dataSourceDesign,this.dataSetDesign,this.parameterHints,this.cacheID));
}

Fixed version (ground truth):
/** 
 * @return
 * @throws DataException 
 */
public void loadFinished() throws DataException {
  switchCacheMap(dataSetDesign);
  cacheMapManager.loadFinishOnCache(DataSourceAndDataSet.newInstance(this.dataSourceDesign,this.dataSetDesign,this.parameterHints,this.cacheID,this.enableSamplePreview));
}
Program: 65101
Project: 65101
Buggy source:
/** 
 * Remember before requesting any service, this function must be called in advance to make sure using current data source and data set.
 * @param dataSourceDesign
 * @param datasetDesign
 */
public void setDataSourceAndDataSet(IBaseDataSourceDesign dataSourceDesign,IBaseDataSetDesign dataSetDesign,Collection parameterHints,Map appContext){
  this.dataSourceDesign=dataSourceDesign;
  this.dataSetDesign=dataSetDesign;
  this.parameterHints=parameterHints;
  this.appContext=appContext;
  this.cacheID=CacheIDFetcher.getInstance().getCacheID(appContext);
}

Fixed version (ground truth):
/** 
 * Remember before requesting any service, this function must be called in advance to make sure using current data source and data set.
 * @param dataSourceDesign
 * @param datasetDesign
 */
public void setDataSourceAndDataSet(IBaseDataSourceDesign dataSourceDesign,IBaseDataSetDesign dataSetDesign,Collection parameterHints,Map appContext){
  this.dataSourceDesign=dataSourceDesign;
  this.dataSetDesign=dataSetDesign;
  this.parameterHints=parameterHints;
  this.appContext=appContext;
  this.cacheID=CacheIDFetcher.getInstance().getCacheID(appContext);
  this.enableSamplePreview=CacheIDFetcher.getInstance().enableSampleDataPreivew(appContext);
}
Program: 65102
Project: 65102
Buggy source:
/** 
 * only for test
 * @return
 * @throws DataException 
 */
public boolean doesLoadFromCache() throws DataException {
  DataSetCacheConfig dscc=getDataSetCacheConfig(dataSetDesign,appContext);
  if (dscc == null) {
    return false;
  }
  switchCacheMap(dataSetDesign);
  return cacheMapManager.doesLoadFromCache(DataSourceAndDataSet.newInstance(this.dataSourceDesign,this.dataSetDesign,this.parameterHints,this.cacheID),dscc.getCacheCapability());
}

Fixed version (ground truth):
/** 
 * only for test
 * @return
 * @throws DataException 
 */
public boolean doesLoadFromCache() throws DataException {
  DataSetCacheConfig dscc=getDataSetCacheConfig(dataSetDesign,appContext);
  if (dscc == null) {
    return false;
  }
  switchCacheMap(dataSetDesign);
  return cacheMapManager.doesLoadFromCache(DataSourceAndDataSet.newInstance(this.dataSourceDesign,this.dataSetDesign,this.parameterHints,this.cacheID,this.enableSamplePreview),dscc.getCacheCapability());
}
Program: 65103
Project: 65103
Buggy source:
/** 
 * @return
 * @throws DataException 
 */
public void saveFinished(IDataSetCacheObject dsco) throws DataException {
  switchCacheMap(dataSetDesign);
  cacheMapManager.saveFinishOnCache(DataSourceAndDataSet.newInstance(this.dataSourceDesign,this.dataSetDesign,this.parameterHints,this.cacheID),dsco);
}

Fixed version (ground truth):
/** 
 * @return
 * @throws DataException 
 */
public void saveFinished(IDataSetCacheObject dsco) throws DataException {
  switchCacheMap(dataSetDesign);
  cacheMapManager.saveFinishOnCache(DataSourceAndDataSet.newInstance(this.dataSourceDesign,this.dataSetDesign,this.parameterHints,this.cacheID,this.enableSamplePreview),dsco);
}
Program: 65104
Project: 65104
Buggy source:
/** 
 * Return the cached result metadata. Please note that parameter hint will not change the returned metadata.
 * @return
 * @throws DataException
 */
public IResultMetaData getCachedResultMetadata(IBaseDataSourceDesign dataSource,IBaseDataSetDesign dataSet) throws DataException {
  IResultClass resultClass=this.jvmLevelCacheMapManager.getCachedResultClass(DataSourceAndDataSet.newInstance(dataSource,dataSet,null,this.cacheID));
  if (resultClass != null)   return new ResultMetaData(resultClass);
 else   return null;
}

Fixed version (ground truth):
/** 
 * Return the cached result metadata. Please note that parameter hint will not change the returned metadata.
 * @return
 * @throws DataException
 */
public IResultMetaData getCachedResultMetadata(IBaseDataSourceDesign dataSource,IBaseDataSetDesign dataSet) throws DataException {
  IResultClass resultClass=this.jvmLevelCacheMapManager.getCachedResultClass(DataSourceAndDataSet.newInstance(dataSource,dataSet,null,this.cacheID,this.enableSamplePreview));
  if (resultClass != null)   return new ResultMetaData(resultClass);
 else   return null;
}
Program: 65105
Project: 65105
Buggy source:
/** 
 * @return
 * @throws DataException 
 */
public IDataSetCacheObject getLoadedCacheObject() throws DataException {
  switchCacheMap(dataSetDesign);
  IDataSetCacheObject cached=cacheMapManager.getloadedCacheObject(DataSourceAndDataSet.newInstance(this.dataSourceDesign,this.dataSetDesign,this.parameterHints,this.cacheID));
  if (this.cacheID != null && cached instanceof MemoryDataSetCacheObject && ((MemoryDataSetCacheObject)cached).getSize() > 0) {
    cached=new DataSetCacheObjectWithDummyData(dataSetDesign,cached);
  }
  return cached;
}

Fixed version (ground truth):
/** 
 * @return
 * @throws DataException 
 */
public IDataSetCacheObject getLoadedCacheObject() throws DataException {
  switchCacheMap(dataSetDesign);
  IDataSetCacheObject cached=cacheMapManager.getloadedCacheObject(DataSourceAndDataSet.newInstance(this.dataSourceDesign,this.dataSetDesign,this.parameterHints,this.cacheID,this.enableSamplePreview));
  if (this.cacheID != null && cached instanceof MemoryDataSetCacheObject && ((MemoryDataSetCacheObject)cached).getSize() > 0) {
    cached=new DataSetCacheObjectWithDummyData(dataSetDesign,cached);
  }
  return cached;
}
Program: 65106
Project: 65106
Buggy source:
/** 
 * @param dsco
 * @throws DataException
 */
public void loadStart() throws DataException {
  switchCacheMap(dataSetDesign);
  cacheMapManager.loadStart(DataSourceAndDataSet.newInstance(this.dataSourceDesign,this.dataSetDesign,this.parameterHints,this.cacheID));
}

Fixed version (ground truth):
/** 
 * @param dsco
 * @throws DataException
 */
public void loadStart() throws DataException {
  switchCacheMap(dataSetDesign);
  cacheMapManager.loadStart(DataSourceAndDataSet.newInstance(this.dataSourceDesign,this.dataSetDesign,this.parameterHints,this.cacheID,this.enableSamplePreview));
}
Program: 65107
Project: 65107
Buggy source:
/** 
 * @return
 * @throws DataException 
 */
public boolean doesSaveToCache() throws DataException {
  DataSetCacheConfig dscc=getDataSetCacheConfig(dataSetDesign,appContext);
  if (dscc == null) {
    return false;
  }
  switchCacheMap(dataSetDesign);
  return cacheMapManager.doesSaveToCache(DataSourceAndDataSet.newInstance(this.dataSourceDesign,this.dataSetDesign,this.parameterHints,this.cacheID),dscc);
}

Fixed version (ground truth):
/** 
 * @return
 * @throws DataException 
 */
public boolean doesSaveToCache() throws DataException {
  DataSetCacheConfig dscc=getDataSetCacheConfig(dataSetDesign,appContext);
  if (dscc == null) {
    return false;
  }
  switchCacheMap(dataSetDesign);
  return cacheMapManager.doesSaveToCache(DataSourceAndDataSet.newInstance(this.dataSourceDesign,this.dataSetDesign,this.parameterHints,this.cacheID,this.enableSamplePreview),dscc);
}
Program: 65108
Project: 65108
Buggy source:
/** 
 * @return
 * @throws DataException 
 */
public IDataSetCacheObject getSavedCacheObject() throws DataException {
  switchCacheMap(dataSetDesign);
  IDataSetCacheObject cached=cacheMapManager.getSavedCacheObject(DataSourceAndDataSet.newInstance(this.dataSourceDesign,this.dataSetDesign,this.parameterHints,this.cacheID));
  if (this.cacheID != null && cached instanceof MemoryDataSetCacheObject && ((MemoryDataSetCacheObject)cached).getSize() > 0) {
    cached=new DataSetCacheObjectWithDummyData(dataSetDesign,cached);
  }
  return cached;
}

Fixed version (ground truth):
/** 
 * @return
 * @throws DataException 
 */
public IDataSetCacheObject getSavedCacheObject() throws DataException {
  switchCacheMap(dataSetDesign);
  IDataSetCacheObject cached=cacheMapManager.getSavedCacheObject(DataSourceAndDataSet.newInstance(this.dataSourceDesign,this.dataSetDesign,this.parameterHints,this.cacheID,this.enableSamplePreview));
  if (this.cacheID != null && cached instanceof MemoryDataSetCacheObject && ((MemoryDataSetCacheObject)cached).getSize() > 0) {
    cached=new DataSetCacheObjectWithDummyData(dataSetDesign,cached);
  }
  return cached;
}
Program: 65109
Project: 65109
Buggy source:
public boolean equals(Object obj){
  if (obj == null || obj instanceof DataSourceAndDataSet == false)   return false;
  if (this == obj)   return true;
  DataSourceAndDataSet candidate=(DataSourceAndDataSet)obj;
  if (this.cacheScopeID == null || candidate.cacheScopeID == null)   return this.isDataSourceDataSetEqual((DataSourceAndDataSet)obj,true);
  return this.cacheScopeID.equals(candidate.cacheScopeID);
}

Fixed version (ground truth):
public boolean equals(Object obj){
  if (obj == null || obj instanceof DataSourceAndDataSet == false)   return false;
  if (this == obj)   return true;
  DataSourceAndDataSet candidate=(DataSourceAndDataSet)obj;
  if (this.cacheScopeID == null || candidate.cacheScopeID == null)   return this.isDataSourceDataSetEqual((DataSourceAndDataSet)obj,true);
  if (!this.enableSamplePreview) {
    if (!this.cacheScopeID.equals(candidate.cacheScopeID))     return false;
 else     return this.isDataSourceDataSetEqual((DataSourceAndDataSet)obj,true);
  }
  return this.cacheScopeID.equals(candidate.cacheScopeID);
}