nus-yam/ex-repair huggingface dataset:
Program: 67491
Project: 67491
Buggy source:
public JointDataSetAdapter(JointDataSetHandle handle,ModelAdapter adapter) throws BirtException {
  super(handle.getQualifiedName());
  Iterator it=handle.joinConditionsIterator();
  JoinConditionHandle jc=null;
  while (it.hasNext()) {
    jc=(JoinConditionHandle)it.next();
    addJoinCondition(new JoinCondition(new ScriptExpression(jc.getLeftExpression()),new ScriptExpression(jc.getRightExpression()),adaptJoinOperator(jc.getOperator())));
  }
  if (jc != null) {
    Iterator iter=handle.dataSetsIterator();
    DataSetHandle leftHandle=(DataSetHandle)iter.next();
    setLeftDataSetDesignQulifiedName(leftHandle.getQualifiedName());
    setLeftDataSetDesignName(jc.getLeftDataSet());
    DataSetHandle rightHandle=(DataSetHandle)iter.next();
    setRightDataSetDesignQulifiedName(rightHandle.getQualifiedName());
    setRightDataSetDesignName(jc.getRightDataSet());
    setJoinType(adaptJoinType(jc.getJoinType()));
  }
  DataAdapterUtil.adaptBaseDataSet(handle,this,adapter);
}

Fixed version (ground truth):
public JointDataSetAdapter(JointDataSetHandle handle,ModelAdapter adapter) throws BirtException {
  super(handle.getQualifiedName());
  Iterator it=handle.joinConditionsIterator();
  JoinConditionHandle jc=null;
  while (it.hasNext()) {
    jc=(JoinConditionHandle)it.next();
    addJoinCondition(new JoinCondition(new ScriptExpression(jc.getLeftExpression()),new ScriptExpression(jc.getRightExpression()),adaptJoinOperator(jc.getOperator())));
  }
  if (jc != null) {
    Iterator iter=handle.dataSetsIterator();
    DataSetHandle leftHandle=null, rightHandle=null;
    if (iter.hasNext()) {
      leftHandle=(DataSetHandle)iter.next();
      setLeftDataSetDesignQulifiedName(leftHandle.getQualifiedName());
    }
    if (iter.hasNext()) {
      rightHandle=(DataSetHandle)iter.next();
      setRightDataSetDesignQulifiedName(rightHandle.getQualifiedName());
    }
 else {
      if (leftHandle != null)       setRightDataSetDesignQulifiedName(leftHandle.getQualifiedName());
    }
    setLeftDataSetDesignName(jc.getLeftDataSet());
    setRightDataSetDesignName(jc.getRightDataSet());
    setJoinType(adaptJoinType(jc.getJoinType()));
  }
  DataAdapterUtil.adaptBaseDataSet(handle,this,adapter);
}
Program: 67492
Project: 67492
Buggy source:
public Collection<IChartSubType> getChartSubtypes(String sDimension,Orientation orientation){
  Vector<IChartSubType> vSubTypes=new Vector<IChartSubType>();
  if (sDimension.equals(TWO_DIMENSION_TYPE) || sDimension.equals(ChartDimension.TWO_DIMENSIONAL_LITERAL.getName())) {
    if (orientation.equals(Orientation.VERTICAL_LITERAL)) {
      img2D=UIHelper.getImage("String_Node_Str");
    }
 else {
      img2D=UIHelper.getImage("String_Node_Str");
    }
    vSubTypes.add(new DefaultChartSubTypeImpl(STANDARD_SUBTYPE_LITERAL,img2D,sStandardDescription,Messages.getString("String_Node_Str")));
  }
  return vSubTypes;
}

Fixed version (ground truth):
public Collection<IChartSubType> getChartSubtypes(String sDimension,Orientation orientation){
  Vector<IChartSubType> vSubTypes=new Vector<IChartSubType>();
  if (sDimension.equals(TWO_DIMENSION_TYPE) || sDimension.equals(ChartDimension.TWO_DIMENSIONAL_LITERAL.getName())) {
    img2D=UIHelper.getImage("String_Node_Str");
    vSubTypes.add(new DefaultChartSubTypeImpl(STANDARD_SUBTYPE_LITERAL,img2D,sStandardDescription,Messages.getString("String_Node_Str")));
  }
  return vSubTypes;
}
Program: 67493
Project: 67493
Buggy source:
ContainerArea(ContainerArea area){
  super(area);
  this.first=area.first;
  this.boxStyle=area.getBoxStyle();
  this.needClip=area.needClip();
  this.hasStyle=area.hasStyle;
  this.localProperties=area.localProperties;
  this.content=area.content;
}

Fixed version (ground truth):
ContainerArea(ContainerArea area){
  super(area);
  this.first=area.first;
  this.boxStyle=area.getBoxStyle();
  this.needClip=area.needClip();
  this.hasStyle=area.hasStyle;
  this.localProperties=area.localProperties;
  this.content=area.content;
  this.context=area.context;
}
Program: 67494
Project: 67494
Buggy source:
public void update(AbstractArea area) throws BirtException {
  CellArea cArea=(CellArea)area;
  int columnID=cArea.getColumnID();
  int colSpan=cArea.getColSpan();
  if (colSpan > 1 && content.isRTL()) {
    columnID+=colSpan - 1;
  }
  cArea.setPosition(getTableArea().getXPos(columnID),0);
}

Fixed version (ground truth):
public void update(AbstractArea area) throws BirtException {
  CellArea cArea=(CellArea)area;
  int columnID=cArea.getColumnID();
  int colSpan=cArea.getColSpan();
  cArea.setPosition(getTableArea().getXPos(columnID),0);
  if (content != null && content.isRTL()) {
    cArea.flipPositionForRtl();
  }
}
Program: 67495
Project: 67495
Buggy source:
public void close() throws BirtException {
  TableArea table=getTableArea();
  table.addRow(this);
  updateBackgroundImage();
  boolean pb=checkPageBreak();
  if (pb) {
    specifiedHeight=0;
    table.addRow(this);
  }
  if (content != null && content.isRTL()) {
    reorderCellsForRTL();
  }
  parent.update(this);
  finished=true;
}

Fixed version (ground truth):
public void close() throws BirtException {
  TableArea table=getTableArea();
  table.addRow(this);
  updateBackgroundImage();
  boolean pb=checkPageBreak();
  if (pb) {
    specifiedHeight=0;
    table.addRow(this);
  }
  parent.update(this);
  finished=true;
}
Program: 67496
Project: 67496
Buggy source:
public void add(AbstractArea area){
  addChild(area);
  CellArea cArea=(CellArea)area;
  int columnID=cArea.getColumnID();
  int colSpan=cArea.getColSpan();
  if (colSpan > 1 && content.isRTL()) {
    columnID+=colSpan - 1;
  }
  cArea.setPosition(getTableArea().getXPos(columnID),0);
}

Fixed version (ground truth):
public void add(AbstractArea area){
  addChild(area);
  CellArea cArea=(CellArea)area;
  int columnID=cArea.getColumnID();
  int colSpan=cArea.getColSpan();
  cArea.setPosition(getTableArea().getXPos(columnID),0);
  if (content != null && content.isRTL()) {
    cArea.flipPositionForRtl();
  }
}
Program: 67497
Project: 67497
Buggy source:
protected IStyle getLeftCellContentStyle(RowArea lastRow,CellArea currentCell){
  RowArea currentRow=(RowArea)currentCell.getParent();
  int columnID=currentCell.getColumnID();
  CellArea cell=null;
  if (isRTL) {
    cell=currentRow.getCell(columnID + 1);
    if (cell == null && lastRow != null) {
      cell=lastRow.getCell(columnID + 1);
    }
    if (cell == null) {
      return currentCell.getContent().getComputedStyle();
    }
  }
 else {
    cell=currentRow.getCell(columnID - 1);
    if (cell == null && lastRow != null) {
      cell=lastRow.getCell(columnID - 1);
    }
  }
  if (cell != null) {
    return cell.getContent().getComputedStyle();
  }
  return null;
}

Fixed version (ground truth):
protected IStyle getLeftCellContentStyle(RowArea lastRow,CellArea currentCell){
  RowArea currentRow=(RowArea)currentCell.getParent();
  int columnID=currentCell.getColumnID();
  CellArea cell=null;
{
    cell=currentRow.getCell(columnID - 1);
    if (cell == null && lastRow != null) {
      cell=lastRow.getCell(columnID - 1);
    }
  }
  if (cell != null) {
    return cell.getContent().getComputedStyle();
  }
  return null;
}
Program: 67499
Project: 67499
Buggy source:
public IReportItemInstance[] getInstancesByElementName(String elementName) throws ScriptException {
  ArrayList<IReportItemInstance> instances=new ArrayList<IReportItemInstance>();
  for (  IContent content : contents) {
    Object generateBy=content.getGenerateBy();
    if (generateBy instanceof ReportItemDesign) {
      ReportItemDesign design=(ReportItemDesign)generateBy;
      if (elementName.equals(design.getName())) {
        try {
          ReportItemInstance instance=(ReportItemInstance)ElementUtil.getInstance(content,context,RunningState.PAGEBREAK);
          instances.add(instance);
        }
 catch (        BirtException ex) {
          throw new ScriptException(ex);
        }
      }
    }
  }
  if (!instances.isEmpty()) {
    return instances.toArray(new IReportItemInstance[instances.size()]);
  }
  return null;
}

Fixed version (ground truth):
public IReportItemInstance[] getInstancesByElementName(String elementName) throws ScriptException {
  ArrayList<IReportItemInstance> instances=new ArrayList<IReportItemInstance>();
  for (  IContent content : contents) {
    Object generateBy=content.getGenerateBy();
    if (generateBy instanceof ReportElementDesign) {
      ReportElementDesign design=(ReportElementDesign)generateBy;
      if (elementName.equals(design.getName())) {
        try {
          ReportItemInstance instance=(ReportItemInstance)ElementUtil.getInstance(content,context,RunningState.PAGEBREAK);
          instances.add(instance);
        }
 catch (        BirtException ex) {
          throw new ScriptException(ex);
        }
      }
    }
  }
  if (!instances.isEmpty()) {
    return instances.toArray(new IReportItemInstance[instances.size()]);
  }
  return null;
}
Program: 67500
Project: 67500
Buggy source:
public IReportItemInstance[] getInstancesByElementId(int elementId) throws ScriptException {
  ArrayList<IReportItemInstance> instances=new ArrayList<IReportItemInstance>();
  for (  IContent content : contents) {
    Object generateBy=content.getGenerateBy();
    if (generateBy instanceof ReportItemDesign) {
      ReportItemDesign design=(ReportItemDesign)generateBy;
      if (design.getID() == elementId) {
        try {
          ReportItemInstance instance=(ReportItemInstance)ElementUtil.getInstance(content,context,RunningState.PAGEBREAK);
          instances.add(instance);
        }
 catch (        BirtException ex) {
          throw new ScriptException(ex);
        }
      }
    }
  }
  if (!instances.isEmpty()) {
    return instances.toArray(new IReportItemInstance[instances.size()]);
  }
  return null;
}

Fixed version (ground truth):
public IReportItemInstance[] getInstancesByElementId(int elementId) throws ScriptException {
  ArrayList<IReportItemInstance> instances=new ArrayList<IReportItemInstance>();
  for (  IContent content : contents) {
    Object generateBy=content.getGenerateBy();
    if (generateBy instanceof ReportElementDesign) {
      ReportElementDesign design=(ReportElementDesign)generateBy;
      if (design.getID() == elementId) {
        try {
          ReportItemInstance instance=(ReportItemInstance)ElementUtil.getInstance(content,context,RunningState.PAGEBREAK);
          instances.add(instance);
        }
 catch (        BirtException ex) {
          throw new ScriptException(ex);
        }
      }
    }
  }
  if (!instances.isEmpty()) {
    return instances.toArray(new IReportItemInstance[instances.size()]);
  }
  return null;
}
Program: 67502
Project: 67502
Buggy source:
/** 
 * Checks whether the element is block, inline or inline-block level. In BIRT, the absolute positioning model is used and a box is explicitly offset with respect to its containing block. When an element's x or y is set, it will be treated as a block level element regardless of the 'Display' property set in style. When designating width or height value to an inline element, it will be treated as inline-block.
 * @param x Specifies how far a box's left margin edge is offset to the right of the left edge of the box's containing block.
 * @param y Specifies how far an absolutely positioned box's top margin edge is offset below the top edge of the box's containing block.
 * @param width The width of the element.
 * @param height The height of the element.
 * @param style The <code>IStyle</code> object.
 * @return The display type of the element.
 */
public CSSValue getElementDisplay(DimensionType x,DimensionType y,DimensionType width,DimensionType height,IStyle style){
  CSSValue display=null;
  if (style != null) {
    display=style.getProperty(IStyle.STYLE_DISPLAY);
  }
  if (IStyle.NONE_VALUE == display) {
    return IStyle.NONE_VALUE;
  }
  if (x != null || y != null) {
    return IStyle.BLOCK_VALUE;
  }
 else   if (IStyle.INLINE_VALUE == display) {
    if (width != null || height != null) {
      return IStyle.INLINE_BLOCK_VALUE;
    }
 else {
      return IStyle.INLINE_VALUE;
    }
  }
  return IStyle.BLOCK_VALUE;
}

Fixed version (ground truth):
/** 
 * Checks whether the element is block, inline or inline-block level. In BIRT, the absolute positioning model is used and a box is explicitly offset with respect to its containing block. When an element's x or y is set, it will be treated as a block level element regardless of the 'Display' property set in style. When designating width or height value to an inline element, or when the element has right-to-left base direction, it it will be treated as inline-block.
 * @param x Specifies how far a box's left margin edge is offset to the right of the left edge of the box's containing block.
 * @param y Specifies how far an absolutely positioned box's top margin edge is offset below the top edge of the box's containing block.
 * @param width The width of the element.
 * @param height The height of the element.
 * @param style The <code>IStyle</code> object.
 * @return The display type of the element.
 */
public CSSValue getElementDisplay(DimensionType x,DimensionType y,DimensionType width,DimensionType height,IStyle style){
  CSSValue display=null;
  if (style != null) {
    display=style.getProperty(IStyle.STYLE_DISPLAY);
  }
  if (IStyle.NONE_VALUE == display) {
    return IStyle.NONE_VALUE;
  }
  if (x != null || y != null) {
    return IStyle.BLOCK_VALUE;
  }
 else   if (IStyle.INLINE_VALUE == display) {
    if (width != null || height != null) {
      return IStyle.INLINE_BLOCK_VALUE;
    }
 else     if (IStyle.CSS_RTL_VALUE.equals(style.getDirection())) {
      return IStyle.INLINE_BLOCK_VALUE;
    }
 else {
      return IStyle.INLINE_VALUE;
    }
  }
  return IStyle.BLOCK_VALUE;
}
Program: 67507
Project: 67507
Buggy source:
/** 
 * @param design
 * @param names
 * @throws DataException
 */
private void populateDataSetNames(IBaseDataSetDesign design,DataEngineImpl engine,List names) throws DataException {
  if (design == null)   return;
  names.add(design.getName());
  if (design instanceof IJointDataSetDesign) {
    IJointDataSetDesign jointDesign=(IJointDataSetDesign)design;
    populateDataSetNames(engine.getDataSetDesign(jointDesign.getLeftDataSetDesignName()),engine,names);
    populateDataSetNames(engine.getDataSetDesign(jointDesign.getRightDataSetDesignName()),engine,names);
  }
}

Fixed version (ground truth):
/** 
 * @param design
 * @param names
 * @throws DataException
 */
private void populateDataSetNames(IBaseDataSetDesign design,DataEngineImpl engine,List names) throws DataException {
  if (design == null)   return;
  names.add(design.getName());
  if (design instanceof IJointDataSetDesign) {
    IJointDataSetDesign jointDesign=(IJointDataSetDesign)design;
    populateDataSetNames(engine.getDataSetDesign(jointDesign.getLeftDataSetDesignQulifiedName()),engine,names);
    populateDataSetNames(engine.getDataSetDesign(jointDesign.getRightDataSetDesignQulifiedName()),engine,names);
  }
}
Program: 67508
Project: 67508
Buggy source:
public JointDataSetAdapter(JointDataSetHandle handle,ModelAdapter adapter) throws BirtException {
  super(handle.getQualifiedName());
  Iterator it=handle.joinConditionsIterator();
  JoinConditionHandle jc=null;
  while (it.hasNext()) {
    jc=(JoinConditionHandle)it.next();
    addJoinCondition(new JoinCondition(new ScriptExpression(jc.getLeftExpression()),new ScriptExpression(jc.getRightExpression()),adaptJoinOperator(jc.getOperator())));
  }
  if (jc != null) {
    setLeftDataSetDesignName(jc.getLeftDataSet());
    setRightDataSetDesignName(jc.getRightDataSet());
    setJoinType(adaptJoinType(jc.getJoinType()));
  }
  DataAdapterUtil.adaptBaseDataSet(handle,this,adapter);
}

Fixed version (ground truth):
public JointDataSetAdapter(JointDataSetHandle handle,ModelAdapter adapter) throws BirtException {
  super(handle.getQualifiedName());
  Iterator it=handle.joinConditionsIterator();
  JoinConditionHandle jc=null;
  while (it.hasNext()) {
    jc=(JoinConditionHandle)it.next();
    addJoinCondition(new JoinCondition(new ScriptExpression(jc.getLeftExpression()),new ScriptExpression(jc.getRightExpression()),adaptJoinOperator(jc.getOperator())));
  }
  if (jc != null) {
    Iterator iter=handle.dataSetsIterator();
    DataSetHandle leftHandle=(DataSetHandle)iter.next();
    setLeftDataSetDesignQulifiedName(leftHandle.getQualifiedName());
    setLeftDataSetDesignName(jc.getLeftDataSet());
    DataSetHandle rightHandle=(DataSetHandle)iter.next();
    setRightDataSetDesignQulifiedName(rightHandle.getQualifiedName());
    setRightDataSetDesignName(jc.getRightDataSet());
    setJoinType(adaptJoinType(jc.getJoinType()));
  }
  DataAdapterUtil.adaptBaseDataSet(handle,this,adapter);
}
Program: 67509
Project: 67509
Buggy source:
/** 
 * Handle builder dialog action.
 */
protected void handleBuilderAction(String[] data){
  if (data.length != 2 || data[1].equals(data[0])) {
    return;
  }
  updateSortKey();
}

Fixed version (ground truth):
/** 
 * Handle builder dialog action.
 */
protected void handleBuilderAction(String[] data){
  if (data.length != 4 || data[1].equals(data[0])) {
    return;
  }
  updateSortKey();
}
Program: 67511
Project: 67511
Buggy source:
@Override public Iterator<ComputedColumnHandle> availableBindings(){
  Iterator<ComputedColumnHandle> allBindings=ChartItemUtil.getAllColumnBindingsIterator(handle);
  List<Query> queries=new ArrayList<Query>();
  queries.addAll(ChartUtil.getBaseSeriesDefinitions(cm).get(0).getDesignTimeSeries().getDataDefinition());
  for (  SeriesDefinition vsd : ChartUtil.getAllOrthogonalSeriesDefinitions(cm)) {
    queries.addAll(vsd.getDesignTimeSeries().getDataDefinition());
    queries.add(vsd.getQuery());
  }
  ExpressionCodec exprCodec=ChartModelHelper.instance().createExpressionCodec();
  Set<String> bindingNames=new HashSet<String>();
  for (  Query query : queries) {
    if (query.isDefined()) {
      bindingNames.addAll(exprCodec.getBindingNames(query.getDefinition()));
    }
  }
  List<ComputedColumnHandle> availableBindings=new ArrayList<ComputedColumnHandle>();
  while (allBindings.hasNext()) {
    ComputedColumnHandle binding=allBindings.next();
    if (bindingNames.contains(binding.getName())) {
      availableBindings.add(binding);
    }
  }
  return availableBindings.iterator();
}

Fixed version (ground truth):
@Override public Iterator<ComputedColumnHandle> availableBindings(){
  Iterator<ComputedColumnHandle> allBindings=ChartItemUtil.getAllColumnBindingsIterator(handle);
  ReportItemHandle bindingHolder=ChartItemUtil.getBindingHolder(handle);
  if (bindingHolder.getCube() == null) {
    return allBindings;
  }
  List<Query> queries=new ArrayList<Query>();
  queries.addAll(ChartUtil.getBaseSeriesDefinitions(cm).get(0).getDesignTimeSeries().getDataDefinition());
  for (  SeriesDefinition vsd : ChartUtil.getAllOrthogonalSeriesDefinitions(cm)) {
    queries.addAll(vsd.getDesignTimeSeries().getDataDefinition());
    queries.add(vsd.getQuery());
  }
  ExpressionCodec exprCodec=ChartModelHelper.instance().createExpressionCodec();
  Set<String> bindingNames=new HashSet<String>();
  for (  Query query : queries) {
    if (query.isDefined()) {
      bindingNames.addAll(exprCodec.getBindingNames(query.getDefinition()));
    }
  }
  List<ComputedColumnHandle> availableBindings=new ArrayList<ComputedColumnHandle>();
  while (allBindings.hasNext()) {
    ComputedColumnHandle binding=allBindings.next();
    if (bindingNames.contains(binding.getName())) {
      availableBindings.add(binding);
    }
  }
  return availableBindings.iterator();
}
Program: 67513
Project: 67513
Buggy source:
public boolean autoPageBreak() throws BirtException {
  if (context.isFixedLayout() && specifiedHeight + parent.getAbsoluteBP() <= context.getMaxBP()) {
    return false;
  }
  if (parent != null) {
    return parent.autoPageBreak();
  }
  return false;
}

Fixed version (ground truth):
public boolean autoPageBreak() throws BirtException {
  if (context.isFixedLayout() && specifiedHeight > 0 && specifiedHeight + parent.getAbsoluteBP() <= context.getMaxBP()) {
    return false;
  }
  if (parent != null) {
    return parent.autoPageBreak();
  }
  return false;
}
Program: 67514
Project: 67514
Buggy source:
private boolean isInRepeatHeader(){
  if (currentRow == null)   return false;
  IContent rowContent=currentRow.getContent();
  if (rowContent != null) {
    IBandContent band=(IBandContent)rowContent.getParent();
    if (band != null) {
      int type=((IBandContent)band).getBandType();
      if (type == IBandContent.BAND_HEADER || type == IBandContent.BAND_GROUP_HEADER) {
        RowDesign rowDesign=(RowDesign)rowContent.getGenerateBy();
        if (rowDesign == null || rowDesign.getRepeatable()) {
          return true;
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean isInRepeatHeader(){
  if (currentRow == null)   return false;
  IContent rowContent=currentRow.getContent();
  if (rowContent != null) {
    IElement band=rowContent.getParent();
    if (band != null && band instanceof IBandContent) {
      int type=((IBandContent)band).getBandType();
      if (type == IBandContent.BAND_HEADER || type == IBandContent.BAND_GROUP_HEADER) {
        RowDesign rowDesign=(RowDesign)rowContent.getGenerateBy();
        if (rowDesign == null || rowDesign.getRepeatable()) {
          return true;
        }
      }
    }
  }
  return false;
}
Program: 67515
Project: 67515
Buggy source:
private List<IEdgeDrillFilter[]> getRemainingDrillOperation(IEdgeDrillFilter targetDrill,List<IEdgeDrillFilter[]> drillFilters){
  List list=new ArrayList();
  int index=-1;
  for (int i=0; i < drillFilters.size(); i++) {
    IEdgeDrillFilter[] filters=drillFilters.get(i);
    if (index >= 0) {
      list.add(filters);
    }
    for (int t=0; t < filters.length; t++) {
      if (targetDrill.equals(filters[t])) {
        index=i;
        break;
      }
    }
  }
  return list;
}

Fixed version (ground truth):
private List<IEdgeDrillFilter[]> getRemainingDrillOperation(IEdgeDrillFilter targetDrill,List<IEdgeDrillFilter[]> drillFilters){
  List list=new ArrayList();
  for (int i=0; i < drillFilters.size(); i++) {
    IEdgeDrillFilter[] filters=drillFilters.get(i);
    for (int t=0; t < filters.length; t++) {
      if (!targetDrill.equals(filters[t])) {
        list.add(filters);
      }
    }
  }
  return list;
}
Program: 67516
Project: 67516
Buggy source:
public MirroredAggregationResultSet(IAggregationResultSet rs,RowDataAccessorService service,List sortList) throws IOException {
  this.mirrorLevel=service.getMirrorStartPosition();
  this.breakHierarchy=service.isBreakHierarchy();
  this.service=service;
  Member member=new Member();
  member.setKeyValues(new Object[]{"String_Node_Str"});
  this.rootNode=new MemberTreeNode(member);
  this.resultObject=new Object[rs.getLevelCount()];
  this.rs=rs;
  this.sortList=sortList;
  this.isTimeMirror=TimeMemberUtil.containsTimeMirror(rs,service);
  if (!isTimeMirror && breakHierarchy) {
    this.breakHierarchyList=new ArrayList[rs.getLevelCount() - mirrorLevel];
    for (int j=0; j < breakHierarchyList.length; j++) {
      breakHierarchyList[j]=new ArrayList();
    }
    populateMirror();
  }
 else {
    if (!isTimeMirror && !breakHierarchy) {
      this.mirrorLevel=this.mirrorLevel - 1;
    }
    populateTimeMirror();
    nodeLength=getLength(this.rootNode);
    valueMapLength=0;
    Iterator iter=this.noBreakHierarchyKeyMap.entrySet().iterator();
    while (iter.hasNext()) {
      valueMapLength+=getLength((MemberTreeNode)((Entry)iter.next()).getValue());
    }
    this.length=nodeLength * valueMapLength;
  }
}

Fixed version (ground truth):
public MirroredAggregationResultSet(IAggregationResultSet rs,MirrorMetaInfo service,List sortList) throws IOException {
  this.mirrorLevel=service.getMirrorStartPosition();
  this.breakHierarchy=service.isBreakHierarchy();
  this.service=service;
  Member member=new Member();
  member.setKeyValues(new Object[]{"String_Node_Str"});
  this.rootNode=new MemberTreeNode(member);
  this.resultObject=new Object[rs.getLevelCount()];
  this.rs=rs;
  this.sortList=sortList;
  this.isTimeMirror=TimeMemberUtil.containsTimeMirror(rs,service);
  if (!isTimeMirror && breakHierarchy) {
    this.breakHierarchyList=new ArrayList[rs.getLevelCount() - mirrorLevel];
    for (int j=0; j < breakHierarchyList.length; j++) {
      breakHierarchyList[j]=new ArrayList();
    }
    populateMirror();
  }
 else {
    if (!isTimeMirror && !breakHierarchy) {
      this.mirrorLevel=this.mirrorLevel - 1;
    }
    populateTimeMirror();
    nodeLength=getLength(this.rootNode);
    valueMapLength=0;
    Iterator iter=this.noBreakHierarchyKeyMap.entrySet().iterator();
    while (iter.hasNext()) {
      valueMapLength+=getLength((MemberTreeNode)((Entry)iter.next()).getValue());
    }
    this.length=nodeLength * valueMapLength;
  }
}
Program: 67518
Project: 67518
Buggy source:
public static boolean isTimeMirror(IAggregationResultSet rs,int index,RowDataAccessorService service){
  for (int i=index; i < rs.getLevelCount(); i++) {
    if (rs.getLevelAttributes(i) == null || !isTimeMirrorAttributes(service.getLevelType(rs.getLevel(i))))     return false;
  }
  return true;
}

Fixed version (ground truth):
public static boolean isTimeMirror(IAggregationResultSet rs,int index,MirrorMetaInfo service){
  for (int i=index; i < rs.getLevelCount(); i++) {
    if (rs.getLevelAttributes(i) == null || !isTimeMirrorAttributes(service.getLevelType(rs.getLevel(i))))     return false;
  }
  return true;
}
Program: 67519
Project: 67519
Buggy source:
public static boolean containsTimeMirror(IAggregationResultSet rs,RowDataAccessorService service){
  int index=service.getMirrorStartPosition();
  for (int i=index; i < rs.getLevelCount(); i++) {
    if (isTimeMirror(rs,i,service))     return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean containsTimeMirror(IAggregationResultSet rs,MirrorMetaInfo service){
  int index=service.getMirrorStartPosition();
  for (int i=index; i < rs.getLevelCount(); i++) {
    if (isTimeMirror(rs,i,service))     return true;
  }
  return false;
}
Program: 67520
Project: 67520
Buggy source:
/** 
 * @param rs
 * @param view
 * @param isCalculatedMember
 * @throws OLAPException
 * @throws IOException
 */
private void populateDimensionAxis(IAggregationResultSet rs,BirtEdgeView view) throws IOException {
  List dimensionAxisList=new ArrayList();
  int index=-1, levelIndex=-1;
  if (!isCalculatedMember) {
    ILevelDefinition mirrorStartLevel=null;
    if (view.getMirroredDefinition() != null)     mirrorStartLevel=view.getMirroredDefinition().getMirrorStartingLevel();
    levelIndex=index=0;
    boolean isMirrored=false;
    for (int i=0; i < view.getDimensionViews().size(); i++) {
      BirtDimensionView dv=(BirtDimensionView)(view.getDimensionViews().get(i));
      Iterator levelIter=dv.getMemberSelection().iterator();
      while (levelIter.hasNext()) {
        ILevelDefinition level=(ILevelDefinition)levelIter.next();
        DimensionAxis axis=null;
        if (level == mirrorStartLevel) {
          isMirrored=true;
        }
        if (isMirrored) {
          axis=new DimensionAxis(this,rs,index,levelIndex,true);
        }
 else {
          axis=new DimensionAxis(this,rs,index,levelIndex);
        }
        index++;
        levelIndex++;
        dimensionAxisList.add(axis);
      }
    }
  }
 else   if (isCalculatedMember) {
    DimensionAxis axis=new DimensionAxis(this,rs,index,0);
    dimensionAxisList.add(axis);
  }
  this.dimensionAxis=new DimensionAxis[dimensionAxisList.size()];
  for (int i=0; i < dimensionAxisList.size(); i++) {
    this.dimensionAxis[i]=(DimensionAxis)dimensionAxisList.get(i);
  }
}

Fixed version (ground truth):
/** 
 * @param rs
 * @param view
 * @param isCalculatedMember
 * @throws OLAPException
 * @throws IOException
 */
private void populateDimensionAxis(IAggregationResultSet rs,BirtEdgeView view) throws IOException {
  List dimensionAxisList=new ArrayList();
  int index=-1, levelIndex=-1;
  if (!isCalculatedMember) {
    levelIndex=index=0;
    for (int i=0; i < view.getDimensionViews().size(); i++) {
      BirtDimensionView dv=(BirtDimensionView)(view.getDimensionViews().get(i));
      Iterator levelIter=dv.getMemberSelection().iterator();
      while (levelIter.hasNext()) {
        ILevelDefinition level=(ILevelDefinition)levelIter.next();
        DimensionAxis axis=null;
        axis=new DimensionAxis(this,rs,index,levelIndex);
        index++;
        levelIndex++;
        dimensionAxisList.add(axis);
      }
    }
  }
 else   if (isCalculatedMember) {
    DimensionAxis axis=new DimensionAxis(this,rs,index,0);
    dimensionAxisList.add(axis);
  }
  this.dimensionAxis=new DimensionAxis[dimensionAxisList.size()];
  for (int i=0; i < dimensionAxisList.size(); i++) {
    this.dimensionAxis[i]=(DimensionAxis)dimensionAxisList.get(i);
  }
}
Program: 67522
Project: 67522
Buggy source:
public void dragEnter(DropTargetEvent event){
  event.detail=DND.DROP_COPY;
  if (Platform.OS_WIN32.equals(Platform.getOS())) {
    Object object=null;
    Transfer[] transferAgents=((DropTarget)event.widget).getTransfer();
    for (int i=0; i < transferAgents.length; i++) {
      Transfer transfer=transferAgents[i];
      if (transfer != null && transfer instanceof SimpleTextTransfer) {
        object=SimpleTextTransfer.getInstance().nativeToJava(event.currentDataType);
        break;
      }
    }
    if (object != null) {
      ExpressionCodec expCodec=ChartModelHelper.instance().createExpressionCodec();
      expCodec.setBindingName(object.toString(),btnBuilder.isCube());
      if (!DataDefinitionTextManager.getInstance().isValidExpression(txtDataDefn,expCodec.getExpression())) {
        event.detail=DND.DROP_NONE;
      }
    }
  }
}

Fixed version (ground truth):
public void dragEnter(DropTargetEvent event){
  event.detail=DND.DROP_COPY;
  if (Platform.OS_WIN32.equals(Platform.getOS())) {
    Object object=null;
    Transfer[] transferAgents=((DropTarget)event.widget).getTransfer();
    for (int i=0; i < transferAgents.length; i++) {
      Transfer transfer=transferAgents[i];
      if (transfer != null && transfer instanceof SimpleTextTransfer) {
        object=SimpleTextTransfer.getInstance().nativeToJava(event.currentDataType);
        break;
      }
    }
    if (object != null) {
      ExpressionCodec expCodec=ChartModelHelper.instance().createExpressionCodec();
      expCodec.setType(btnBuilder.getExpressionType());
      expCodec.setBindingName(object.toString(),btnBuilder.isCube());
      if (!DataDefinitionTextManager.getInstance().isValidExpression(txtDataDefn,expCodec.getExpression())) {
        event.detail=DND.DROP_NONE;
      }
    }
  }
}
Program: 67523
Project: 67523
Buggy source:
@SuppressWarnings("String_Node_Str") private void handleCell(CrosstabCellHandle cell,String emptyVlaue) throws BirtException {
  if (cell == null) {
    return;
  }
  if (handler != null) {
    ICrosstabCell cellItem=new CrosstabCellImpl(cell);
    handler.callFunction(CrosstabScriptHandler.ON_PREPARE_CELL,cellItem,context);
  }
  for (Iterator itr=cell.getContents().iterator(); itr.hasNext(); ) {
    ReportElementHandle handle=(ReportElementHandle)itr.next();
    context.prepare(handle);
    if (handle instanceof DataItemHandle) {
      DataItemHandle dataHandle=(DataItemHandle)handle;
      MapRule rule=StructureFactory.createMapRule();
      rule.setTestExpression(ExpressionUtil.createJSDataExpression(dataHandle.getResultSetColumn()));
      rule.setOperator(DesignChoiceConstants.MAP_OPERATOR_NULL);
      rule.setDisplay(emptyVlaue);
      PropertyHandle mapHandle=dataHandle.getPropertyHandle(StyleHandle.MAP_RULES_PROP);
      try {
        mapHandle.addItem(rule);
      }
 catch (      SemanticException e) {
        logger.log(Level.SEVERE,Messages.getString("String_Node_Str"),e);
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void handleCell(CrosstabCellHandle cell,String emptyVlaue) throws BirtException {
  if (cell == null) {
    return;
  }
  if (handler != null) {
    ICrosstabCell cellItem=new CrosstabCellImpl(cell);
    handler.callFunction(CrosstabScriptHandler.ON_PREPARE_CELL,cellItem,context);
  }
  for (Iterator itr=cell.getContents().iterator(); itr.hasNext(); ) {
    ReportElementHandle handle=(ReportElementHandle)itr.next();
    context.prepare(handle);
    if (emptyVlaue != null && handle instanceof DataItemHandle) {
      DataItemHandle dataHandle=(DataItemHandle)handle;
      PropertyHandle mapHandle=dataHandle.getPropertyHandle(StyleHandle.MAP_RULES_PROP);
      ArrayList<MapRule> rules=mapHandle.getListValue();
      if (rules != null) {
        List<MapRule> removeList=new ArrayList<MapRule>();
        for (        MapRule rl : rules) {
          if (rl.getTestExpression() != null && rl.getTestExpression().startsWith(AUTO_EMPTY_VALUE_EXPR_PREFIX)) {
            removeList.add(rl);
          }
        }
        if (removeList.size() > 0) {
          mapHandle.removeItems(removeList);
        }
      }
      MapRule rule=StructureFactory.createMapRule();
      rule.setTestExpression(AUTO_EMPTY_VALUE_EXPR_PREFIX + ExpressionUtil.createJSDataExpression(dataHandle.getResultSetColumn()));
      rule.setOperator(DesignChoiceConstants.MAP_OPERATOR_NULL);
      rule.setDisplay(emptyVlaue);
      try {
        mapHandle.addItem(rule);
      }
 catch (      SemanticException e) {
        logger.log(Level.SEVERE,Messages.getString("String_Node_Str"),e);
      }
    }
  }
}
Program: 67524
Project: 67524
Buggy source:
private void handleChildren() throws BirtException {
  String emptyValue=crosstab.getEmptyCellValue();
  handleCell(crosstab.getHeader(),emptyValue);
  if (crosstab.getDimensionCount(COLUMN_AXIS_TYPE) > 0) {
    for (int i=0; i < crosstab.getDimensionCount(COLUMN_AXIS_TYPE); i++) {
      DimensionViewHandle dv=crosstab.getDimension(COLUMN_AXIS_TYPE,i);
      for (int j=0; j < dv.getLevelCount(); j++) {
        LevelViewHandle lv=dv.getLevel(j);
        handleCell(lv.getCell(),emptyValue);
        handleCell(lv.getAggregationHeader(),emptyValue);
      }
    }
  }
  handleCell(crosstab.getGrandTotal(COLUMN_AXIS_TYPE),emptyValue);
  if (crosstab.getDimensionCount(ROW_AXIS_TYPE) > 0) {
    for (int i=0; i < crosstab.getDimensionCount(ROW_AXIS_TYPE); i++) {
      DimensionViewHandle dv=crosstab.getDimension(ROW_AXIS_TYPE,i);
      for (int j=0; j < dv.getLevelCount(); j++) {
        LevelViewHandle lv=dv.getLevel(j);
        handleCell(lv.getCell(),emptyValue);
        handleCell(lv.getAggregationHeader(),emptyValue);
      }
    }
  }
  handleCell(crosstab.getGrandTotal(ROW_AXIS_TYPE),emptyValue);
  for (int i=0; i < crosstab.getMeasureCount(); i++) {
    MeasureViewHandle mv=crosstab.getMeasure(i);
    for (int j=0; j < mv.getHeaderCount(); j++) {
      handleCell(mv.getHeader(j),emptyValue);
    }
    handleCell(mv.getCell(),emptyValue);
    for (int j=0; j < mv.getAggregationCount(); j++) {
      handleCell(mv.getAggregationCell(j),emptyValue);
    }
  }
}

Fixed version (ground truth):
private void handleChildren() throws BirtException {
  String emptyValue=crosstab.getEmptyCellValue();
  handleCell(crosstab.getHeader(),null);
  if (crosstab.getDimensionCount(COLUMN_AXIS_TYPE) > 0) {
    for (int i=0; i < crosstab.getDimensionCount(COLUMN_AXIS_TYPE); i++) {
      DimensionViewHandle dv=crosstab.getDimension(COLUMN_AXIS_TYPE,i);
      for (int j=0; j < dv.getLevelCount(); j++) {
        LevelViewHandle lv=dv.getLevel(j);
        handleCell(lv.getCell(),null);
        handleCell(lv.getAggregationHeader(),null);
      }
    }
  }
  handleCell(crosstab.getGrandTotal(COLUMN_AXIS_TYPE),null);
  if (crosstab.getDimensionCount(ROW_AXIS_TYPE) > 0) {
    for (int i=0; i < crosstab.getDimensionCount(ROW_AXIS_TYPE); i++) {
      DimensionViewHandle dv=crosstab.getDimension(ROW_AXIS_TYPE,i);
      for (int j=0; j < dv.getLevelCount(); j++) {
        LevelViewHandle lv=dv.getLevel(j);
        handleCell(lv.getCell(),null);
        handleCell(lv.getAggregationHeader(),null);
      }
    }
  }
  handleCell(crosstab.getGrandTotal(ROW_AXIS_TYPE),null);
  for (int i=0; i < crosstab.getMeasureCount(); i++) {
    MeasureViewHandle mv=crosstab.getMeasure(i);
    for (int j=0; j < mv.getHeaderCount(); j++) {
      handleCell(mv.getHeader(j),null);
    }
    handleCell(mv.getCell(),emptyValue);
    for (int j=0; j < mv.getAggregationCount(); j++) {
      handleCell(mv.getAggregationCell(j),emptyValue);
    }
  }
}
Program: 67525
Project: 67525
Buggy source:
public void initialize() throws BirtException {
  hasStyle=false;
  boxStyle=BoxStyle.DEFAULT;
  localProperties=LocalProperties.DEFAULT;
  maxAvaWidth=parent.getCurrentMaxContentWidth();
  width=maxAvaWidth;
  if (parent.content != null) {
    if (CSSConstants.CSS_RTL_VALUE.equals(parent.content.getComputedStyle().getDirection()))     baseLevel=Bidi.DIRECTION_RIGHT_TO_LEFT;
  }
}

Fixed version (ground truth):
public void initialize() throws BirtException {
  hasStyle=false;
  boxStyle=BoxStyle.DEFAULT;
  localProperties=LocalProperties.DEFAULT;
  maxAvaWidth=parent.getCurrentMaxContentWidth();
  width=maxAvaWidth;
  if (parent.content != null) {
    if (parent.content.isDirectionRTL())     baseLevel=Bidi.DIRECTION_RIGHT_TO_LEFT;
  }
}
Program: 67526
Project: 67526
Buggy source:
public void close() throws BirtException {
  TableArea table=getTableArea();
  table.addRow(this);
  updateBackgroundImage();
  boolean pb=checkPageBreak();
  if (pb) {
    specifiedHeight=0;
    table.addRow(this);
  }
  parent.update(this);
  finished=true;
}

Fixed version (ground truth):
public void close() throws BirtException {
  TableArea table=getTableArea();
  table.addRow(this);
  updateBackgroundImage();
  boolean pb=checkPageBreak();
  if (pb) {
    specifiedHeight=0;
    table.addRow(this);
  }
  if (content != null && content.isRTL()) {
    reorderCellsForRTL();
  }
  parent.update(this);
  finished=true;
}
Program: 67527
Project: 67527
Buggy source:
public TableLayoutInfo(ITableContent tableContent,LayoutContext context,int[] colWidth){
  this.tableContent=tableContent;
  this.context=context;
  this.colWidth=colWidth;
  this.columnNumber=colWidth.length;
  this.xPositions=new int[columnNumber];
  this.tableWidth=0;
  if (tableContent.isRTL()) {
    int parentMaxWidth=parent != null ? parent.getCurrentMaxContentWidth() : context.getMaxWidth();
    for (int i=0; i < columnNumber; i++) {
      xPositions[i]=parentMaxWidth - tableWidth - colWidth[i];
      tableWidth+=colWidth[i];
    }
    if (xPositions[columnNumber - 1] != 0) {
      addDummyColumnForRTL(colWidth);
    }
  }
 else {
    for (int i=0; i < columnNumber; i++) {
      xPositions[i]=tableWidth;
      tableWidth+=colWidth[i];
    }
  }
}

Fixed version (ground truth):
public TableLayoutInfo(ITableContent tableContent,LayoutContext context,int[] colWidth){
  this.tableContent=tableContent;
  this.context=context;
  this.colWidth=colWidth;
  this.columnNumber=colWidth.length;
  this.xPositions=new int[columnNumber];
  this.tableWidth=0;
  for (int i=0; i < columnNumber; i++) {
    xPositions[i]=tableWidth;
    tableWidth+=colWidth[i];
  }
}
Program: 67528
Project: 67528
Buggy source:
public void close() throws BirtException {
  int borderHeight=0;
  if (layout != null) {
    int height=layout.resolveAll(getLastRow());
    if (0 != height) {
      currentBP=currentBP + height;
    }
    borderHeight=layout.resolveBottomBorder();
    layout.remove(this);
  }
  setHeight(currentBP + getOffsetY() + borderHeight);
  updateBackgroundImage();
  if (parent != null) {
    boolean pb=checkPageBreak();
    if (pb) {
      int height=layout.resolveAll(getLastRow());
      if (0 != height) {
        currentBP=currentBP + height;
      }
      borderHeight=layout.resolveBottomBorder();
      layout.remove(this);
    }
    parent.update(this);
  }
  finished=true;
}

Fixed version (ground truth):
public void close() throws BirtException {
  int borderHeight=0;
  if (layout != null) {
    int height=layout.resolveAll(getLastRow());
    if (0 != height) {
      currentBP=currentBP + height;
    }
    borderHeight=layout.resolveBottomBorder();
    layout.remove(this);
  }
  setHeight(currentBP + getOffsetY() + borderHeight);
  updateBackgroundImage();
  if (parent != null) {
    IContent parentContent=parent.getContent();
    if (parentContent != null && parentContent.isRTL()) {
      flipPositionForRtl();
    }
    boolean pb=checkPageBreak();
    if (pb) {
      int height=layout.resolveAll(getLastRow());
      if (0 != height) {
        currentBP=currentBP + height;
      }
      borderHeight=layout.resolveBottomBorder();
      layout.remove(this);
    }
    parent.update(this);
  }
  finished=true;
}
Program: 67531
Project: 67531
Buggy source:
/** 
 * Copies style values from source to the target if corresponding values of target are null. This method follows the same algorithm that is defined in PropertySearchAlgorithm. <ul> <li>localize private style properties. <li>localize style properties on extends/virtual parents. </ul>
 * @param target the target element
 * @param source the source element
 * @param notEmptyProperties
 */
private void localizeSelfStyleProperties(StyledElement target,StyledElement source,Set<String> notEmptyProperties){
  StyledElement tmpElement=source;
  while (tmpElement != null) {
    Module root=tmpElement.getRoot();
    localizePrivateStyleProperties(target,tmpElement,root,notEmptyProperties);
    Style style=(Style)tmpElement.getStyle(sourceDesign);
    if (style != null) {
      Module styleRoot=style.getRoot();
      if (styleRoot != sourceDesign) {
        localizePrivateStyleProperties(target,style,styleRoot,notEmptyProperties);
      }
 else {
        target.setStyleName(tmpElement.getStyleName());
      }
    }
    if (tmpElement.isVirtualElement())     tmpElement=(StyledElement)tmpElement.getVirtualParent();
 else     tmpElement=(StyledElement)tmpElement.getExtendsElement();
  }
}

Fixed version (ground truth):
/** 
 * Copies style values from source to the target if corresponding values of target are null. This method follows the same algorithm that is defined in PropertySearchAlgorithm. <ul> <li>localize private style properties. <li>localize style properties on extends/virtual parents. </ul>
 * @param target the target element
 * @param source the source element
 * @param notEmptyProperties
 */
private void localizeSelfStyleProperties(StyledElement target,StyledElement source,Set<String> notEmptyProperties){
  StyledElement tmpElement=source;
  while (tmpElement != null) {
    Module root=tmpElement.getRoot();
    localizePrivateStyleProperties(target,tmpElement,root,notEmptyProperties);
    Style style=(Style)tmpElement.getStyle(root);
    if (style != null) {
      Module styleRoot=style.getRoot();
      if (styleRoot != sourceDesign) {
        localizePrivateStyleProperties(target,style,styleRoot,notEmptyProperties);
      }
 else {
        target.setStyleName(tmpElement.getStyleName());
      }
    }
    if (tmpElement.isVirtualElement())     tmpElement=(StyledElement)tmpElement.getVirtualParent();
 else     tmpElement=(StyledElement)tmpElement.getExtendsElement();
  }
}
Program: 67532
Project: 67532
Buggy source:
public static int getImageWidth(DimensionType value,int parentWidth,int imageInfoWidth,int dpi){
  int width;
  if (value != null) {
    width=getElementWidth(value,parentWidth,dpi);
  }
 else {
    width=(int)(imageInfoWidth * ExcelUtil.INCH_PT / dpi);
  }
  return width;
}

Fixed version (ground truth):
public static int getImageWidth(DimensionType value,int parentWidth,int imageInfoWidth,int dpi){
  if (value == null) {
    return imageInfoWidth;
  }
 else {
    return getElementWidth(value,parentWidth,dpi);
  }
}
Program: 67533
Project: 67533
Buggy source:
protected void addNewDefn(ColumnDefn defn) throws SemanticException {
  String name=defn.getColumnName();
  if (rsColumnMap != null) {
    if (rsColumnMap.get(name) != null) {
      name=getUniqueName();
      defn.setColumnName(name);
    }
    ResultSetColumnHandle rsHandle;
    if (rsColumns != null && columnHints != null) {
      rsColumns.addItem(defn.getResultSetColumn());
      columnHints.addItem(defn.getColumnHint());
      rsColumnMap.put(name,defn.getResultSetColumn());
      columnHintMap.put(name,defn.getColumnHint());
    }
  }
}

Fixed version (ground truth):
protected void addNewDefn(ColumnDefn defn) throws SemanticException {
  String name=defn.getColumnName();
  if (rsColumnMap != null) {
    if (rsColumnMap.get(name) != null) {
      name=getUniqueColumnName();
      defn.setColumnName(name);
    }
    ResultSetColumnHandle rsHandle;
    if (rsColumns != null && columnHints != null) {
      rsColumns.addItem(defn.getResultSetColumn());
      columnHints.addItem(defn.getColumnHint());
      rsColumnMap.put(name,defn.getResultSetColumn());
      columnHintMap.put(name,defn.getColumnHint());
    }
  }
}
Program: 67534
Project: 67534
Buggy source:
/** 
 * @param displayName The displayName to set.
 */
public void setDisplayName(String displayName){
  if (this.columnHintHandle != null)   columnHintHandle.setDisplayName(displayName);
 else   columnHint.setProperty(ColumnHint.DISPLAY_NAME_MEMBER,displayName);
}

Fixed version (ground truth):
/** 
 * @param displayName The displayName to set.
 */
public void setDisplayName(String displayName){
  if (this.columnHintHandle != null)   columnHintHandle.setDisplayName(displayName);
 else   if (displayName != null && displayName.trim().length() > 0)   columnHint.setProperty(ColumnHint.DISPLAY_NAME_MEMBER,displayName);
}
Program: 67535
Project: 67535
Buggy source:
public HashMap getDefaultValues(){
  usingParameterValues();
  final HashMap values=new HashMap();
  new ParameterVisitor(){
    boolean visitScalarParameter(    ScalarParameterHandle param,    Object userData){
      String name=param.getName();
      String expr=param.getDefaultValue();
      String type=param.getDataType();
      Object value=convertToType(expr,type);
      values.put(name,value);
      return true;
    }
    boolean visitDynamicFilterParameter(    DynamicFilterParameterHandle param,    Object userData){
      return true;
    }
    boolean visitParameterGroup(    ParameterGroupHandle group,    Object userData){
      return visitParametersInGroup(group,userData);
    }
  }
.visit(executionContext.getDesign());
  return values;
}

Fixed version (ground truth):
public HashMap getDefaultValues(){
  usingParameterValues();
  final HashMap values=new HashMap();
  new ParameterVisitor(){
    boolean visitScalarParameter(    ScalarParameterHandle param,    Object userData){
      String name=param.getName();
      Object value=getDefaultValue(name);
      values.put(name,value);
      return true;
    }
    boolean visitDynamicFilterParameter(    DynamicFilterParameterHandle param,    Object userData){
      return true;
    }
    boolean visitParameterGroup(    ParameterGroupHandle group,    Object userData){
      return visitParametersInGroup(group,userData);
    }
  }
.visit(executionContext.getDesign());
  return values;
}
Program: 67536
Project: 67536
Buggy source:
private void initOptions(){
  ConfigurableOption wrappingText=initializeWrappingText();
  ConfigurableOption chartDpi=new ConfigurableOption(CHART_DPI);
  chartDpi.setDisplayName(getMessage("String_Node_Str"));
  chartDpi.setDataType(IConfigurableOption.DataType.INTEGER);
  chartDpi.setDisplayType(IConfigurableOption.DisplayType.TEXT);
  chartDpi.setDefaultValue(new Integer(192));
  chartDpi.setToolTip("String_Node_Str");
  chartDpi.setDescription(getMessage("String_Node_Str"));
  options=new IConfigurableOption[]{wrappingText,chartDpi};
}

Fixed version (ground truth):
private void initOptions(){
  ConfigurableOption wrappingText=initializeWrappingText();
  ConfigurableOption chartDpi=new ConfigurableOption(CHART_DPI);
  chartDpi.setDisplayName(getMessage("String_Node_Str"));
  chartDpi.setDataType(IConfigurableOption.DataType.INTEGER);
  chartDpi.setDisplayType(IConfigurableOption.DisplayType.TEXT);
  chartDpi.setDefaultValue(new Integer(192));
  chartDpi.setToolTip("String_Node_Str");
  chartDpi.setDescription(getMessage("String_Node_Str"));
  ConfigurableOption hideGridlines=new ConfigurableOption(HIDE_GRIDLINES);
  hideGridlines.setDisplayName(getMessage("String_Node_Str"));
  hideGridlines.setDataType(IConfigurableOption.DataType.BOOLEAN);
  hideGridlines.setDisplayType(IConfigurableOption.DisplayType.CHECKBOX);
  hideGridlines.setDefaultValue(Boolean.FALSE);
  hideGridlines.setToolTip(null);
  hideGridlines.setDescription(getMessage("String_Node_Str"));
  options=new IConfigurableOption[]{wrappingText,chartDpi};
}