nus-yam/ex-repair huggingface dataset:
Program: 70844
Project: 70844
Buggy source:
/** 
 * Create "WORKING_FOLDER_ACCESS_ONLY" configuration group
 * @param parent
 */
public Button createAccessOnlyGroup(Composite parent){
  Button btAccessOnly=new Button(parent,SWT.CHECK);
  boolean defaultValue=DataUtil.getBoolean(WebArtifactUtil.getContextParamValue(properties,BIRT_REPORT_ACCESSONLY_SETTING));
  btAccessOnly.setSelection(defaultValue);
  btAccessOnly.setText(BirtWTPMessages.BIRTConfiguration_report_access_message);
  btAccessOnly.setLayoutData(new GridData(GridData.END));
  btAccessOnly.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      WebArtifactUtil.setContextParamValue(properties,BIRT_REPORT_ACCESSONLY_SETTING,new String(BLANK_STRING + ((Button)e.getSource()).getSelection()));
    }
  }
);
  return btAccessOnly;
}

Fixed version (ground truth):
/** 
 * Create "WORKING_FOLDER_ACCESS_ONLY" configuration group
 * @param parent
 */
public Button createAccessOnlyGroup(Composite parent){
  Button btAccessOnly=new Button(parent,SWT.CHECK);
  boolean defaultValue=DataUtil.getBoolean(WebArtifactUtil.getContextParamValue(properties,BIRT_REPORT_ACCESSONLY_SETTING));
  btAccessOnly.setSelection(defaultValue);
  btAccessOnly.setText(BirtWTPMessages.BIRTConfiguration_report_access_message);
  btAccessOnly.setLayoutData(new GridData(GridData.END));
  btAccessOnly.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      WebArtifactUtil.setContextParamValue(properties,BIRT_REPORT_ACCESSONLY_SETTING,BLANK_STRING + ((Button)e.getSource()).getSelection());
    }
  }
);
  return btAccessOnly;
}
Program: 70846
Project: 70846
Buggy source:
private void writeHeaderFooter() throws IOException, BirtException {
  if (previousPage.getPageHeader() != null) {
    SimpleMasterPageDesign master=(SimpleMasterPageDesign)previousPage.getGenerateBy();
    wordWriter.startHeader(!master.isShowHeaderOnFirst());
    contentVisitor.visitChildren(previousPage.getPageHeader(),null);
    wordWriter.endHeader();
  }
  if (previousPage.getPageFooter() != null) {
    wordWriter.startFooter();
    contentVisitor.visitChildren(previousPage.getPageFooter(),null);
    wordWriter.endFooter();
  }
}

Fixed version (ground truth):
private void writeHeaderFooter() throws IOException, BirtException {
  if (previousPage.getPageHeader() != null) {
    SimpleMasterPageDesign master=(SimpleMasterPageDesign)previousPage.getGenerateBy();
    wordWriter.startHeader(!master.isShowHeaderOnFirst(),headerHeight,contentWidth);
    contentVisitor.visitChildren(previousPage.getPageHeader(),null);
    wordWriter.endHeader();
  }
  if (previousPage.getPageFooter() != null) {
    wordWriter.startFooter(footerHeight,contentWidth);
    contentVisitor.visitChildren(previousPage.getPageFooter(),null);
    wordWriter.endFooter();
  }
}
Program: 70847
Project: 70847
Buggy source:
void startFooter() throws IOException ;

Fixed version (ground truth):
void startFooter(int footerHeight,int footerWidth) throws IOException ;
Program: 70848
Project: 70848
Buggy source:
void startHeader(boolean showHeaderOnFirst) throws IOException ;

Fixed version (ground truth):
void startHeader(boolean showHeaderOnFirst,int headerHeight,int headerWidth) throws IOException ;
Program: 70849
Project: 70849
Buggy source:
public void endHeader(){
  writer.closeTag("String_Node_Str");
}

Fixed version (ground truth):
public void endHeader(){
  endHeaderFooterContainer();
  writer.closeTag("String_Node_Str");
}
Program: 70850
Project: 70850
Buggy source:
public void startFooter(){
  writer.openTag("String_Node_Str");
  writer.attribute("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public void startFooter(int footerHeight,int footerWidth){
  writer.openTag("String_Node_Str");
  writer.attribute("String_Node_Str","String_Node_Str");
  startHeaderFooterContainer(footerHeight,footerWidth);
}
Program: 70851
Project: 70851
Buggy source:
public void endFooter(){
  writer.closeTag("String_Node_Str");
}

Fixed version (ground truth):
public void endFooter(){
  endHeaderFooterContainer();
  writer.closeTag("String_Node_Str");
}
Program: 70852
Project: 70852
Buggy source:
public void startHeader(boolean showHeaderOnFirst){
  writer.openTag("String_Node_Str");
  if (showHeaderOnFirst) {
    writer.attribute("String_Node_Str","String_Node_Str");
    writer.openTag("String_Node_Str");
    writer.openTag("String_Node_Str");
    writer.closeTag("String_Node_Str");
    writer.closeTag("String_Node_Str");
  }
 else   writer.attribute("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public void startHeader(boolean showHeaderOnFirst,int headerHeight,int headerWidth){
  writer.openTag("String_Node_Str");
  if (showHeaderOnFirst) {
    writer.attribute("String_Node_Str","String_Node_Str");
    writer.openTag("String_Node_Str");
    writer.openTag("String_Node_Str");
    writer.closeTag("String_Node_Str");
    writer.closeTag("String_Node_Str");
  }
 else   writer.attribute("String_Node_Str","String_Node_Str");
  startHeaderFooterContainer(headerHeight,headerWidth);
}
Program: 70855
Project: 70855
Buggy source:
/** 
 * SYNC the control value according to the handle.
 */
protected void syncViewProperties(){
  expression.setText(DEUtil.resolveNull(getDisplayExpression(inputHandle.getExpr())));
  operator.select(getIndexForOperatorValue(inputHandle.getOperator()));
  valueVisible=determineValueVisible(inputHandle.getOperator());
  if (valueVisible == 3) {
    createValueListComposite(operator.getParent());
    valueList=new ArrayList(inputHandle.getValue1List());
    tableViewer.setInput(valueList);
  }
 else {
    create2ValueComposite(operator.getParent());
    expressionValue1.setText(DEUtil.resolveNull(inputHandle.getValue1()));
    expressionValue2.setText(DEUtil.resolveNull(inputHandle.getValue2()));
  }
  if (valueVisible == 0) {
    expressionValue1.setVisible(false);
    expressionValue2.setVisible(false);
    andLable.setVisible(false);
  }
 else   if (valueVisible == 1) {
    expressionValue1.setVisible(true);
    expressionValue2.setVisible(false);
    andLable.setVisible(false);
  }
 else   if (valueVisible == 2) {
    expressionValue1.setVisible(true);
    expressionValue2.setVisible(true);
    ;
    andLable.setVisible(true);
    andLable.setEnabled(true);
  }
 else   if (valueVisible == 3) {
    if (expression.getText().length() == 0) {
      valueListComposite.setEnabled(false);
    }
 else {
      valueListComposite.setEnabled(true);
    }
  }
}

Fixed version (ground truth):
/** 
 * SYNC the control value according to the handle.
 */
protected void syncViewProperties(){
  expression.setText(DEUtil.resolveNull(inputHandle.getExpr()));
  operator.select(getIndexForOperatorValue(inputHandle.getOperator()));
  valueVisible=determineValueVisible(inputHandle.getOperator());
  if (valueVisible == 3) {
    createValueListComposite(operator.getParent());
    valueList=new ArrayList(inputHandle.getValue1List());
    tableViewer.setInput(valueList);
  }
 else {
    create2ValueComposite(operator.getParent());
    expressionValue1.setText(DEUtil.resolveNull(inputHandle.getValue1()));
    expressionValue2.setText(DEUtil.resolveNull(inputHandle.getValue2()));
  }
  if (valueVisible == 0) {
    expressionValue1.setVisible(false);
    expressionValue2.setVisible(false);
    andLable.setVisible(false);
  }
 else   if (valueVisible == 1) {
    expressionValue1.setVisible(true);
    expressionValue2.setVisible(false);
    andLable.setVisible(false);
  }
 else   if (valueVisible == 2) {
    expressionValue1.setVisible(true);
    expressionValue2.setVisible(true);
    ;
    andLable.setVisible(true);
    andLable.setEnabled(true);
  }
 else   if (valueVisible == 3) {
    if (expression.getText().length() == 0) {
      valueListComposite.setEnabled(false);
    }
 else {
      valueListComposite.setEnabled(true);
    }
  }
}
Program: 70857
Project: 70857
Buggy source:
/** 
 * Get the default constraint of area figure.
 * @return
 */
private Rectangle getConstraint(){
  IFigure parent=((MasterPageEditPart)getParent()).getFigure();
  Rectangle region=parent.getClientArea();
  Rectangle rect=new Rectangle();
  rect.height=-1;
  rect.width=region.width;
  SimpleMasterPageHandle mphandle=((SimpleMasterPageHandle)((MasterPageEditPart)getParent()).getModel());
  if (((SlotHandle)getModel()).getSlotID() == SimpleMasterPageHandle.PAGE_HEADER_SLOT) {
    if (mphandle.getPropertyHandle(SimpleMasterPageHandle.HEADER_HEIGHT_PROP).isSet()) {
      DimensionHandle handle=mphandle.getHeaderHeight();
      rect.height=(int)DEUtil.convertoToPixel(handle);
    }
  }
 else {
    if (mphandle.getPropertyHandle(SimpleMasterPageHandle.FOOTER_HEIGHT_PROP).isSet()) {
      DimensionHandle handle=mphandle.getFooterHeight();
      rect.height=(int)DEUtil.convertoToPixel(handle);
    }
  }
  if (((SlotHandle)getModel()).getSlotID() == SimpleMasterPageHandle.PAGE_HEADER_SLOT) {
    rect.setLocation(0,0);
  }
 else {
    rect.setLocation(-1,-1);
  }
  return rect;
}

Fixed version (ground truth):
/** 
 * Get the default constraint of area figure.
 * @return
 */
private Rectangle getConstraint(){
  IFigure parent=((MasterPageEditPart)getParent()).getFigure();
  Rectangle region=parent.getClientArea();
  Rectangle rect=new Rectangle();
  rect.height=-1;
  rect.width=region.width;
  SimpleMasterPageHandle mphandle=((SimpleMasterPageHandle)((MasterPageEditPart)getParent()).getModel());
  if (((SlotHandle)getModel()).getSlotID() == SimpleMasterPageHandle.PAGE_HEADER_SLOT) {
    if (mphandle.getPropertyHandle(SimpleMasterPageHandle.HEADER_HEIGHT_PROP).isSet()) {
      DimensionHandle handle=mphandle.getHeaderHeight();
      rect.height=getHeight(handle);
    }
  }
 else {
    if (mphandle.getPropertyHandle(SimpleMasterPageHandle.FOOTER_HEIGHT_PROP).isSet()) {
      DimensionHandle handle=mphandle.getFooterHeight();
      rect.height=getHeight(handle);
    }
  }
  if (((SlotHandle)getModel()).getSlotID() == SimpleMasterPageHandle.PAGE_HEADER_SLOT) {
    rect.setLocation(0,0);
  }
 else {
    rect.setLocation(-1,-1);
  }
  return rect;
}
Program: 70858
Project: 70858
Buggy source:
/** 
 * Unload any resources associated with the graphic context
 */
public void flush(){
  StringBuffer buffer=new StringBuffer(EventHandlers.content.toString());
  codeScript.appendChild(dom.createCDATASection(buffer.append(scriptBuffer).toString()));
  buffer=new StringBuffer(EventHandlers.styles.toString());
  styles.appendChild(dom.createCDATASection(buffer.append(styleBuffer).toString()));
  scriptBuffer=new StringBuffer();
  styleBuffer=new StringBuffer();
}

Fixed version (ground truth):
/** 
 * Unload any resources associated with the graphic context
 */
public void flush(){
  StringBuffer buffer=new StringBuffer(EventHandlers.CONTENT.toString());
  codeScript.appendChild(dom.createCDATASection(buffer.append(scriptBuffer).toString()));
  buffer=new StringBuffer(EventHandlers.STYLES.toString());
  styles.appendChild(dom.createCDATASection(buffer.append(styleBuffer).toString()));
  scriptBuffer=new StringBuffer();
  styleBuffer=new StringBuffer();
}
Program: 70859
Project: 70859
Buggy source:
/** 
 * @return Returns the url.
 */
public String getUrl(){
  if (url == null) {
    if (data != null) {
      return BASE64 + new String(Base64.encodeBase64(data));
    }
  }
  return url.toExternalForm();
}

Fixed version (ground truth):
/** 
 * @return Returns the url.
 */
public String getUrl(){
  if (url == null) {
    if (data != null) {
      return BASE64 + new String(Base64.encodeBase64(data));
    }
 else {
      return "String_Node_Str";
    }
  }
  return url.toExternalForm();
}
Program: 70861
Project: 70861
Buggy source:
/** 
 * Evaluate data for all expressions, include base series, optional Y series grouping and value series.
 * @param idre
 * @param columns
 * @param areValueSeries
 * @return
 * @since 2.3
 */
public List evaluateRowSet(IDataRowExpressionEvaluator idre,final Object[] columns){
  List liResultSet=new ArrayList();
  final int iColumnCount=columns.length;
  Object[] oaTuple;
  final int MAX_ROW_COUNT=ChartUtil.getSupportedMaxRowCount(rtc);
  if (idre.first()) {
    int count=0;
    do {
      if (MAX_ROW_COUNT > 0 && count++ >= MAX_ROW_COUNT) {
        break;
      }
      oaTuple=new Object[iColumnCount];
      for (int i=0; i < columns.length; i++) {
        oaTuple[i]=idre.evaluate((String)columns[i]);
      }
      liResultSet.add(oaTuple);
    }
 while (idre.next());
  }
  return liResultSet;
}

Fixed version (ground truth):
/** 
 * Evaluate data for all expressions, include base series, optional Y series grouping and value series.
 * @param idre
 * @param columns
 * @param areValueSeries
 * @return
 * @since 2.3
 */
public List<Object[]> evaluateRowSet(IDataRowExpressionEvaluator idre,final Object[] columns){
  List<Object[]> liResultSet=new ArrayList<Object[]>();
  final int iColumnCount=columns.length;
  Object[] oaTuple;
  final int MAX_ROW_COUNT=ChartUtil.getSupportedMaxRowCount(rtc);
  if (idre.first()) {
    int count=0;
    do {
      if (MAX_ROW_COUNT > 0 && count++ >= MAX_ROW_COUNT) {
        break;
      }
      oaTuple=new Object[iColumnCount];
      for (int i=0; i < columns.length; i++) {
        oaTuple[i]=idre.evaluate((String)columns[i]);
      }
      liResultSet.add(oaTuple);
    }
 while (idre.next());
  }
  return liResultSet;
}
Program: 70862
Project: 70862
Buggy source:
/** 
 * Reset value of grouped column by grouping setting.
 * @param resultSet row data list.
 * @param columnIndex grouped column index.
 * @param seriesGrouping series grouping setting.
 */
private void resetGroupedData(List resultSet,int columnIndex,SeriesGrouping seriesGrouping){
  if (seriesGrouping.getGroupType() == DataType.DATE_TIME_LITERAL) {
    int cunit=GroupingUtil.groupingUnit2CDateUnit(seriesGrouping.getGroupingUnit());
    CDateTime baseReference=null;
    for (Iterator iter=resultSet.iterator(); iter.hasNext(); ) {
      Object[] oaTuple=(Object[])iter.next();
      Object obj=oaTuple[columnIndex];
      if (obj instanceof CDateTime) {
        baseReference=(CDateTime)obj;
      }
 else       if (obj instanceof Calendar) {
        baseReference=new CDateTime((Calendar)obj);
      }
 else       if (obj instanceof Date) {
        baseReference=new CDateTime((Date)obj);
      }
 else {
        baseReference=new CDateTime(0);
      }
      oaTuple[columnIndex]=baseReference;
    }
  }
}

Fixed version (ground truth):
/** 
 * Reset value of grouped column by grouping setting.
 * @param resultSet row data list.
 * @param columnIndex grouped column index.
 * @param seriesGrouping series grouping setting.
 */
private void resetGroupedData(List resultSet,int columnIndex,SeriesGrouping seriesGrouping){
  if (seriesGrouping.getGroupType() == DataType.DATE_TIME_LITERAL) {
    CDateTime baseReference=null;
    for (Iterator iter=resultSet.iterator(); iter.hasNext(); ) {
      Object[] oaTuple=(Object[])iter.next();
      Object obj=oaTuple[columnIndex];
      if (obj instanceof CDateTime) {
        baseReference=(CDateTime)obj;
      }
 else       if (obj instanceof Calendar) {
        baseReference=new CDateTime((Calendar)obj);
      }
 else       if (obj instanceof Date) {
        baseReference=new CDateTime((Date)obj);
      }
 else {
        baseReference=new CDateTime(0);
      }
      oaTuple[columnIndex]=baseReference;
    }
  }
}
Program: 70863
Project: 70863
Buggy source:
public void widgetSelected(SelectionEvent e){
  if (e.widget == btn) {
    int i=cbType.getSelectionIndex();
switch (i) {
case 0:
      cm=InteractivityCharts.createHSChart();
    break;
case 1:
  cm=InteractivityCharts.createSTChart();
break;
case 2:
cm=InteractivityCharts.createTVChart();
break;
case 3:
cm=InteractivityCharts.createURChart();
break;
}
try {
RunTimeContext rtc=new RunTimeContext();
rtc.setULocale(ULocale.getDefault());
idr=PluginSettings.instance().getDevice("String_Node_Str");
Generator gr=Generator.instance();
GeneratedChartState gcs=null;
Bounds bo=BoundsImpl.create(0,0,450,300);
gcs=gr.build(idr.getDisplayServer(),cm,bo,null,rtc,null);
idr.setProperty(IDeviceRenderer.FILE_IDENTIFIER,"String_Node_Str");
idr.setProperty(IDeviceRenderer.UPDATE_NOTIFIER,new EmptyUpdateNotifier(cm,gcs.getChartModel()));
gr.render(idr,gcs);
}
 catch (ChartException ce) {
ce.printStackTrace();
}
Shell shell=new Shell(display);
shell.setSize(620,450);
shell.setLayout(new GridLayout());
Browser br=new Browser(shell,SWT.NONE);
br.setLayoutData(new GridData(GridData.FILL_BOTH));
br.setUrl("String_Node_Str");
br.setVisible(true);
shell.open();
}
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  if (e.widget == btn) {
    int i=cbType.getSelectionIndex();
switch (i) {
case 0:
      cm=InteractivityCharts.createHSChart();
    break;
case 1:
  cm=InteractivityCharts.createSTChart();
break;
case 2:
cm=InteractivityCharts.createTVChart();
break;
case 3:
cm=InteractivityCharts.createURChart();
break;
}
try {
RunTimeContext rtc=new RunTimeContext();
rtc.setULocale(ULocale.getDefault());
idr=PluginSettings.instance().getDevice("String_Node_Str");
Generator gr=Generator.instance();
Bounds bo=BoundsImpl.create(0,0,450,300);
gcs=gr.build(idr.getDisplayServer(),cm,bo,null,rtc,null);
idr.setProperty(IDeviceRenderer.FILE_IDENTIFIER,"String_Node_Str");
idr.setProperty(IDeviceRenderer.UPDATE_NOTIFIER,new EmptyUpdateNotifier(cm,gcs.getChartModel()));
gr.render(idr,gcs);
}
 catch (ChartException ce) {
ce.printStackTrace();
}
Shell shell=new Shell(display);
shell.setSize(620,450);
shell.setLayout(new GridLayout());
Browser br=new Browser(shell,SWT.NONE);
br.setLayoutData(new GridData(GridData.FILL_BOTH));
br.setUrl("String_Node_Str");
br.setVisible(true);
shell.open();
}
}
Program: 70864
Project: 70864
Buggy source:
public Object[] getDataForColumns(String[] sExpressions,int iMaxRecords,boolean byRow){
  byRow=false;
  Object[] array=new Object[sExpressions.length];
  for (int i=0; i < sExpressions.length; i++) {
    Object[] innerArray=new Object[ROW_COUNT];
    for (int j=0; j < ROW_COUNT; j++) {
      String str=sExpressions[i];
      int intStart=str.lastIndexOf(' ') + 1;
      int index=Integer.valueOf(str.substring(intStart,intStart + 1)).intValue() - 1;
      innerArray[j]=new Integer(((String[])getPreviewData().get(j))[index]);
    }
    array[i]=innerArray;
  }
  return array;
}

Fixed version (ground truth):
public Object[] getDataForColumns(String[] sExpressions,int iMaxRecords,boolean byRow){
  Object[] array=new Object[sExpressions.length];
  for (int i=0; i < sExpressions.length; i++) {
    Object[] innerArray=new Object[ROW_COUNT];
    for (int j=0; j < ROW_COUNT; j++) {
      String str=sExpressions[i];
      int intStart=str.lastIndexOf(' ') + 1;
      int index=Integer.valueOf(str.substring(intStart,intStart + 1)).intValue() - 1;
      innerArray[j]=new Integer(((String[])getPreviewData().get(j))[index]);
    }
    array[i]=innerArray;
  }
  return array;
}
Program: 70865
Project: 70865
Buggy source:
public void changeTask(Notification notification){
  if (task instanceof ITaskChangeListener) {
    ((ITaskChangeListener)task).changeTask(notification);
  }
  if (notification.getNotifier() instanceof Axis) {
    getParentTask().updateTree();
  }
}

Fixed version (ground truth):
public void changeTask(Notification notification){
  ((ITaskChangeListener)task).changeTask(notification);
  if (notification.getNotifier() instanceof Axis) {
    getParentTask().updateTree();
  }
}
Program: 70867
Project: 70867
Buggy source:
/** 
 * Gets all column bindings from handle and its container.
 * @param itemHandle
 * @param unique <code>true</code> will ignore the binding of container if it is duplicate between handle and its container.
 * @return
 * @since 2.3.2
 */
public static Iterator getColumnDataBindings(ReportItemHandle itemHandle,boolean unique){
  if (itemHandle.getDataSet() != null || itemHandle.getCube() != null) {
    return itemHandle.columnBindingsIterator();
  }
  DesignElementHandle handle=getBindingHolder(itemHandle);
  if (handle instanceof ReportItemHandle) {
    Map<String,ComputedColumnHandle> bindingMap=new LinkedHashMap<String,ComputedColumnHandle>();
    ArrayList<ComputedColumnHandle> list=new ArrayList<ComputedColumnHandle>();
    Iterator i=((ReportItemHandle)handle).columnBindingsIterator();
    while (i.hasNext()) {
      ComputedColumnHandle cch=(ComputedColumnHandle)i.next();
      list.add(cch);
      bindingMap.put(cch.getName(),cch);
    }
    if (handle != itemHandle) {
      i=itemHandle.columnBindingsIterator();
      while (i.hasNext()) {
        ComputedColumnHandle cch=(ComputedColumnHandle)i.next();
        list.add(cch);
        bindingMap.put(cch.getName(),cch);
      }
    }
    if (unique) {
      return bindingMap.values().iterator();
    }
 else     return list.iterator();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Gets all column bindings from handle and its container.
 * @param itemHandle
 * @param unique <code>true</code> will ignore the binding of container if it is duplicate between handle and its container.
 * @return
 * @since 2.3.2
 */
public static Iterator getColumnDataBindings(ReportItemHandle itemHandle,boolean unique){
  if (itemHandle.getDataSet() != null || itemHandle.getCube() != null) {
    return itemHandle.columnBindingsIterator();
  }
  ReportItemHandle handle=getBindingHolder(itemHandle);
  if (handle == null) {
    return null;
  }
  Map<String,ComputedColumnHandle> bindingMap=new LinkedHashMap<String,ComputedColumnHandle>();
  ArrayList<ComputedColumnHandle> list=new ArrayList<ComputedColumnHandle>();
  Iterator i=handle.columnBindingsIterator();
  while (i.hasNext()) {
    ComputedColumnHandle cch=(ComputedColumnHandle)i.next();
    list.add(cch);
    bindingMap.put(cch.getName(),cch);
  }
  if (handle != itemHandle) {
    i=itemHandle.columnBindingsIterator();
    while (i.hasNext()) {
      ComputedColumnHandle cch=(ComputedColumnHandle)i.next();
      list.add(cch);
      bindingMap.put(cch.getName(),cch);
    }
  }
  if (unique) {
    return bindingMap.values().iterator();
  }
 else   return list.iterator();
}
Program: 70868
Project: 70868
Buggy source:
public void testMin(){
  IScale scale=getValueAxisScale();
  assertTrue(scale instanceof ITimeScale);
  ITimeScale ls=(ITimeScale)scale;
  Date date=new Date();
  assertEquals(ls.getMin().getYear(),2002 - 1900);
  assertEquals(ls.getMin().getDate(),19);
  ls.setMin(null);
  assertNull(ls.getMin());
}

Fixed version (ground truth):
public void testMin(){
  IScale scale=getValueAxisScale();
  assertTrue(scale instanceof ITimeScale);
  ITimeScale ls=(ITimeScale)scale;
  assertEquals(ls.getMin().getYear(),2002 - 1900);
  assertEquals(ls.getMin().getDate(),19);
  ls.setMin(null);
  assertNull(ls.getMin());
}
Program: 70870
Project: 70870
Buggy source:
private void initRowMergeMinsize(List children){
  int size=children.size();
  Map map=getOwner().getViewer().getVisualPartMap();
  List list=new ArrayList();
  List adjustRow=new ArrayList();
  for (int i=0; i < size; i++) {
    IFigure figure=(IFigure)children.get(i);
    ITableLayoutCell cellPart=(ITableLayoutCell)map.get(figure);
    int rowNumber=cellPart.getRowNumber();
    int rowSpan=cellPart.getRowSpan();
    if (rowSpan == 1) {
      continue;
    }
    list.add(figure);
    if (rowSpan > 1) {
      for (int j=rowNumber; j < rowNumber + rowSpan; j++) {
        adjustRow.add(new Integer(j));
      }
    }
  }
  caleRowMergeMinHeight(list,adjustRow,new ArrayList());
}

Fixed version (ground truth):
private void initRowMergeMinsize(List children){
  int size=children.size();
  Map map=getOwner().getViewer().getVisualPartMap();
  List list=new ArrayList();
  List adjustRow=new ArrayList();
  for (int i=0; i < size; i++) {
    IFigure figure=(IFigure)children.get(i);
    ITableLayoutCell cellPart=(ITableLayoutCell)map.get(figure);
    int rowNumber=cellPart.getRowNumber();
    int rowSpan=cellPart.getRowSpan();
    if (rowSpan == 1) {
      continue;
    }
    list.add(figure);
    if (rowSpan > 1) {
      for (int j=rowNumber; j < rowNumber + rowSpan; j++) {
        adjustRow.add(Integer.valueOf(j));
      }
    }
  }
  caleRowMergeMinHeight(list,adjustRow,new ArrayList());
}
Program: 70871
Project: 70871
Buggy source:
private void resetRowMinSize(TableLayoutData.RowData[] rowHeights){
  int size=rowHeights.length;
  for (int i=1; i < size + 1; i++) {
    rowHeights[i - 1]=new TableLayoutData.RowData();
    rowHeights[i - 1].rowNumber=i;
    rowHeights[i - 1].height=getOwner().getRowHeightValue(i);
    ITableLayoutOwner.DimensionInfomation dim=getOwner().getRowHeight(i);
    rowHeights[i - 1].isForce=dim.getMeasure() > 0;
    if (DesignChoiceConstants.UNITS_PERCENTAGE.equals(dim.getUnits()) && dim.getMeasure() > 0) {
      rowHeights[i - 1].isPercentage=true;
      rowHeights[i - 1].percentageHeight=dim.getMeasure();
    }
    if (dim.getUnits() == null || dim.getUnits().length() == 0) {
      rowHeights[i - 1].isAuto=true;
    }
    rowHeights[i - 1].trueMinRowHeight=(rowHeights[i - 1].isForce && !rowHeights[i - 1].isPercentage) ? rowHeights[i - 1].height : rowHeights[i - 1].minRowHeight;
  }
}

Fixed version (ground truth):
private void resetRowMinSize(TableLayoutData.RowData[] rowHeights){
  int size=rowHeights.length;
  for (int i=1; i < size + 1; i++) {
    rowHeights[i - 1]=new TableLayoutData.RowData();
    rowHeights[i - 1].rowNumber=i;
    rowHeights[i - 1].height=getOwner().getRowHeightValue(i);
    ITableLayoutOwner.DimensionInfomation dim=getOwner().getRowHeight(i);
    rowHeights[i - 1].isForce=dim.getMeasure() > 0;
    if (DesignChoiceConstants.UNITS_PERCENTAGE.equals(dim.getUnits()) && dim.getMeasure() > 0) {
      rowHeights[i - 1].isPercentage=true;
      rowHeights[i - 1].percentageHeight=dim.getMeasure();
    }
    if (dim.getUnits() == null || dim.getUnits().length() == 0) {
      rowHeights[i - 1].isAuto=true;
    }
    rowHeights[i - 1].trueMinRowHeight=(rowHeights[i - 1].isForce && !rowHeights[i - 1].isPercentage) ? rowHeights[i - 1].height : rowHeights[i - 1].minRowHeight;
    if (rowHeights[i - 1].trueMinRowHeight < RowHandleAdapter.DEFAULT_MINHEIGHT) {
      rowHeights[i - 1].trueMinRowHeight=RowHandleAdapter.DEFAULT_MINHEIGHT;
    }
  }
}
Program: 70875
Project: 70875
Buggy source:
private void initMergeMinsize(List children){
  int size=children.size();
  Map map=getOwner().getViewer().getVisualPartMap();
  List list=new ArrayList();
  List adjustRow=new ArrayList();
  List adjustColumn=new ArrayList();
  for (int i=0; i < size; i++) {
    IFigure figure=(IFigure)children.get(i);
    ITableLayoutCell cellPart=(ITableLayoutCell)map.get(figure);
    int rowNumber=cellPart.getRowNumber();
    int columnNumber=cellPart.getColumnNumber();
    int rowSpan=cellPart.getRowSpan();
    int columnSpan=cellPart.getColSpan();
    if (rowSpan == 1 && columnSpan == 1) {
      continue;
    }
    list.add(figure);
    if (rowSpan > 1) {
      for (int j=rowNumber; j < rowNumber + rowSpan; j++) {
        adjustRow.add(new Integer(j));
      }
    }
    if (columnSpan > 1) {
      for (int j=columnNumber; j < columnNumber + columnSpan; j++) {
        adjustColumn.add(new Integer(j));
      }
    }
  }
  caleMergeMinHeight(list,adjustRow,new ArrayList());
  caleMergeMinWidth(list,adjustColumn,new ArrayList());
}

Fixed version (ground truth):
private void initMergeMinsize(List children){
  int size=children.size();
  Map map=getOwner().getViewer().getVisualPartMap();
  List list=new ArrayList();
  List adjustRow=new ArrayList();
  List adjustColumn=new ArrayList();
  for (int i=0; i < size; i++) {
    IFigure figure=(IFigure)children.get(i);
    ITableLayoutCell cellPart=(ITableLayoutCell)map.get(figure);
    int rowNumber=cellPart.getRowNumber();
    int columnNumber=cellPart.getColumnNumber();
    int rowSpan=cellPart.getRowSpan();
    int columnSpan=cellPart.getColSpan();
    if (rowSpan == 1 && columnSpan == 1) {
      continue;
    }
    list.add(figure);
    if (rowSpan > 1) {
      for (int j=rowNumber; j < rowNumber + rowSpan; j++) {
        adjustRow.add(Integer.valueOf(j));
      }
    }
    if (columnSpan > 1) {
      for (int j=columnNumber; j < columnNumber + columnSpan; j++) {
        adjustColumn.add(Integer.valueOf(j));
      }
    }
  }
  caleMergeMinHeight(list,adjustRow,new ArrayList());
  caleMergeMinWidth(list,adjustColumn,new ArrayList());
}
Program: 70878
Project: 70878
Buggy source:
/** 
 * Get page number from incoming soap request.
 * @param request
 * @param params
 * @param document
 * @return
 * @throws RemoteException
 * @throws ReportServiceException
 */
protected long getPageNumber(HttpServletRequest request,Oprand[] params,String documentName) throws RemoteException, ReportServiceException {
  long pageNumber=-1;
  if (params != null && params.length > 0) {
    for (int i=0; i < params.length; i++) {
      if (IBirtConstants.OPRAND_PAGENO.equalsIgnoreCase(params[i].getName())) {
        try {
          pageNumber=Integer.parseInt(params[i].getValue());
        }
 catch (        NumberFormatException e) {
          pageNumber=-1;
        }
        InputOptions options=new InputOptions();
        options.setOption(InputOptions.OPT_REQUEST,request);
        long totalPageNumber=getReportService().getPageCount(documentName,options,new OutputOptions());
        if (pageNumber <= 0 || pageNumber > totalPageNumber) {
          AxisFault fault=new AxisFault();
          fault.setFaultCode(new QName("String_Node_Str"));
          fault.setFaultString(BirtResources.getMessage(ResourceConstants.ACTION_EXCEPTION_INVALID_PAGE_NUMBER,new Object[]{new Long(pageNumber),new Long(totalPageNumber)}));
          throw fault;
        }
        break;
      }
    }
  }
  return pageNumber;
}

Fixed version (ground truth):
/** 
 * Get page number from incoming soap request.
 * @param request
 * @param params
 * @param document
 * @return
 * @throws RemoteException
 * @throws ReportServiceException
 */
protected long getPageNumber(HttpServletRequest request,Oprand[] params,String documentName) throws RemoteException, ReportServiceException {
  long pageNumber=-1;
  if (params != null && params.length > 0) {
    for (int i=0; i < params.length; i++) {
      if (IBirtConstants.OPRAND_PAGENO.equalsIgnoreCase(params[i].getName())) {
        try {
          pageNumber=Integer.parseInt(params[i].getValue());
        }
 catch (        NumberFormatException e) {
          pageNumber=-1;
        }
        InputOptions options=new InputOptions();
        options.setOption(InputOptions.OPT_REQUEST,request);
        long totalPageNumber=getReportService().getPageCount(documentName,options,new OutputOptions());
        if (pageNumber <= 0 || pageNumber > totalPageNumber) {
          AxisFault fault=new AxisFault();
          fault.setFaultCode(new QName("String_Node_Str"));
          fault.setFaultString(BirtResources.getMessage(ResourceConstants.ACTION_EXCEPTION_INVALID_PAGE_NUMBER,new Object[]{Long.valueOf(pageNumber),Long.valueOf(totalPageNumber)}));
          throw fault;
        }
        break;
      }
    }
  }
  return pageNumber;
}
Program: 70879
Project: 70879
Buggy source:
/** 
 * Creates an InputOptions structure based on the values from the given attribute bean.
 * @param bean attribute bean.
 * @return input options
 */
protected InputOptions createInputOptions(BaseAttributeBean bean,boolean svgFlag){
  InputOptions options=new InputOptions();
  options.setOption(InputOptions.OPT_LOCALE,bean.getLocale());
  options.setOption(InputOptions.OPT_TIMEZONE,bean.getTimeZone());
  options.setOption(InputOptions.OPT_REQUEST,context.getRequest());
  options.setOption(InputOptions.OPT_EMITTER_ID,bean.getEmitterId());
  options.setOption(InputOptions.OPT_FORMAT,bean.getFormat());
  options.setOption(InputOptions.OPT_SVG_FLAG,new Boolean(svgFlag));
  options.setOption(InputOptions.OPT_IS_MASTER_PAGE_CONTENT,new Boolean(bean.isMasterPageContent()));
  options.setOption(InputOptions.OPT_IS_DESIGNER,new Boolean(bean.isDesigner()));
  options.setOption(InputOptions.OPT_PAGE_OVERFLOW,ParameterAccessor.getPageOverflow(context.getRequest()));
  return options;
}

Fixed version (ground truth):
/** 
 * Creates an InputOptions structure based on the values from the given attribute bean.
 * @param bean attribute bean.
 * @return input options
 */
protected InputOptions createInputOptions(BaseAttributeBean bean,boolean svgFlag){
  InputOptions options=new InputOptions();
  options.setOption(InputOptions.OPT_LOCALE,bean.getLocale());
  options.setOption(InputOptions.OPT_TIMEZONE,bean.getTimeZone());
  options.setOption(InputOptions.OPT_REQUEST,context.getRequest());
  options.setOption(InputOptions.OPT_EMITTER_ID,bean.getEmitterId());
  options.setOption(InputOptions.OPT_FORMAT,bean.getFormat());
  options.setOption(InputOptions.OPT_SVG_FLAG,Boolean.valueOf(svgFlag));
  options.setOption(InputOptions.OPT_IS_MASTER_PAGE_CONTENT,Boolean.valueOf(bean.isMasterPageContent()));
  options.setOption(InputOptions.OPT_IS_DESIGNER,Boolean.valueOf(bean.isDesigner()));
  options.setOption(InputOptions.OPT_PAGE_OVERFLOW,ParameterAccessor.getPageOverflow(context.getRequest()));
  return options;
}
Program: 70881
Project: 70881
Buggy source:
/** 
 * Get page number from incoming soap request.
 * @param params
 * @param document
 * @return
 * @throws RemoteException
 * @throws ReportServiceException
 */
protected long getPageNumber(HttpServletRequest request,Oprand[] params,String documentName) throws RemoteException, ReportServiceException {
  long pageNumber=-1;
  if (params != null && params.length > 0) {
    for (int i=0; i < params.length; i++) {
      if (IBirtConstants.OPRAND_PAGENO.equalsIgnoreCase(params[i].getName())) {
        try {
          pageNumber=Integer.parseInt(params[i].getValue());
        }
 catch (        NumberFormatException e) {
          pageNumber=-1;
        }
        InputOptions options=new InputOptions();
        options.setOption(InputOptions.OPT_REQUEST,request);
        long totalPageNumber=getReportService().getPageCount(documentName,options,new OutputOptions());
        if (pageNumber <= 0 || pageNumber > totalPageNumber) {
          AxisFault fault=new AxisFault();
          fault.setFaultCode(new QName("String_Node_Str"));
          fault.setFaultString(BirtResources.getMessage(ResourceConstants.ACTION_EXCEPTION_INVALID_PAGE_NUMBER,new Object[]{new Long(pageNumber),new Long(totalPageNumber)}));
          throw fault;
        }
        break;
      }
    }
  }
  return pageNumber;
}

Fixed version (ground truth):
/** 
 * Get page number from incoming soap request.
 * @param params
 * @param document
 * @return
 * @throws RemoteException
 * @throws ReportServiceException
 */
protected long getPageNumber(HttpServletRequest request,Oprand[] params,String documentName) throws RemoteException, ReportServiceException {
  long pageNumber=-1;
  if (params != null && params.length > 0) {
    for (int i=0; i < params.length; i++) {
      if (IBirtConstants.OPRAND_PAGENO.equalsIgnoreCase(params[i].getName())) {
        try {
          pageNumber=Integer.parseInt(params[i].getValue());
        }
 catch (        NumberFormatException e) {
          pageNumber=-1;
        }
        InputOptions options=new InputOptions();
        options.setOption(InputOptions.OPT_REQUEST,request);
        long totalPageNumber=getReportService().getPageCount(documentName,options,new OutputOptions());
        if (pageNumber <= 0 || pageNumber > totalPageNumber) {
          AxisFault fault=new AxisFault();
          fault.setFaultCode(new QName("String_Node_Str"));
          fault.setFaultString(BirtResources.getMessage(ResourceConstants.ACTION_EXCEPTION_INVALID_PAGE_NUMBER,new Object[]{Long.valueOf(pageNumber),Long.valueOf(totalPageNumber)}));
          throw fault;
        }
        break;
      }
    }
  }
  return pageNumber;
}
Program: 70882
Project: 70882
Buggy source:
/** 
 * Get page number from incoming soap request.
 * @param params
 * @param document
 * @return
 * @throws RemoteException
 * @throws ReportServiceException
 */
protected long getPageNumber(HttpServletRequest request,Oprand[] params,String documentName) throws RemoteException, ReportServiceException {
  long pageNumber=-1;
  if (params != null && params.length > 0) {
    for (int i=0; i < params.length; i++) {
      if (IBirtConstants.OPRAND_PAGENO.equalsIgnoreCase(params[i].getName())) {
        try {
          pageNumber=Integer.parseInt(params[i].getValue());
        }
 catch (        NumberFormatException e) {
          pageNumber=-1;
        }
        if (pageNumber <= 0 || pageNumber > __totalPageNumber) {
          AxisFault fault=new AxisFault();
          fault.setFaultCode(new QName("String_Node_Str"));
          fault.setFaultString(BirtResources.getMessage(ResourceConstants.ACTION_EXCEPTION_INVALID_PAGE_NUMBER,new Object[]{new Long(pageNumber),new Long(__totalPageNumber)}));
          throw fault;
        }
        break;
      }
    }
  }
  return pageNumber;
}

Fixed version (ground truth):
/** 
 * Get page number from incoming soap request.
 * @param params
 * @param document
 * @return
 * @throws RemoteException
 * @throws ReportServiceException
 */
protected long getPageNumber(HttpServletRequest request,Oprand[] params,String documentName) throws RemoteException, ReportServiceException {
  long pageNumber=-1;
  if (params != null && params.length > 0) {
    for (int i=0; i < params.length; i++) {
      if (IBirtConstants.OPRAND_PAGENO.equalsIgnoreCase(params[i].getName())) {
        try {
          pageNumber=Integer.parseInt(params[i].getValue());
        }
 catch (        NumberFormatException e) {
          pageNumber=-1;
        }
        if (pageNumber <= 0 || pageNumber > __totalPageNumber) {
          AxisFault fault=new AxisFault();
          fault.setFaultCode(new QName("String_Node_Str"));
          fault.setFaultString(BirtResources.getMessage(ResourceConstants.ACTION_EXCEPTION_INVALID_PAGE_NUMBER,new Object[]{Long.valueOf(pageNumber),Long.valueOf(__totalPageNumber)}));
          throw fault;
        }
        break;
      }
    }
  }
  return pageNumber;
}
Program: 70884
Project: 70884
Buggy source:
/** 
 * Prepare response
 * @throws ReportServiceException
 * @throws RemoteException
 */
protected void prepareResponse() throws ReportServiceException, RemoteException {
  TOC toc=new TOC();
  List children=__node.getChildren();
  if (children != null && children.size() > 0) {
    TOC[] childTOCNodes=new TOC[children.size()];
    for (int i=0; i < children.size(); i++) {
      ToC child=(ToC)children.get(i);
      childTOCNodes[i]=new TOC();
      childTOCNodes[i].setId(child.getID());
      childTOCNodes[i].setDisplayName(ParameterAccessor.htmlEncode(child.getDisplayName()));
      childTOCNodes[i].setBookmark(child.getBookmark());
      childTOCNodes[i].setStyle(child.getStyle());
      childTOCNodes[i].setIsLeaf(new Boolean(child.getChildren() == null || child.getChildren().size() <= 0));
    }
    toc.setChild(childTOCNodes);
  }
  Data data=new Data();
  data.setTOC(toc);
  UpdateData updateData=new UpdateData();
  updateData.setTarget("String_Node_Str");
  updateData.setData(data);
  Update update=new Update();
  update.setUpdateData(updateData);
  response.setUpdate(new Update[]{update});
}

Fixed version (ground truth):
/** 
 * Prepare response
 * @throws ReportServiceException
 * @throws RemoteException
 */
protected void prepareResponse() throws ReportServiceException, RemoteException {
  TOC toc=new TOC();
  List children=__node.getChildren();
  if (children != null && children.size() > 0) {
    TOC[] childTOCNodes=new TOC[children.size()];
    for (int i=0; i < children.size(); i++) {
      ToC child=(ToC)children.get(i);
      childTOCNodes[i]=new TOC();
      childTOCNodes[i].setId(child.getID());
      childTOCNodes[i].setDisplayName(ParameterAccessor.htmlEncode(child.getDisplayName()));
      childTOCNodes[i].setBookmark(child.getBookmark());
      childTOCNodes[i].setStyle(child.getStyle());
      childTOCNodes[i].setIsLeaf(Boolean.valueOf(child.getChildren() == null || child.getChildren().size() <= 0));
    }
    toc.setChild(childTOCNodes);
  }
  Data data=new Data();
  data.setTOC(toc);
  UpdateData updateData=new UpdateData();
  updateData.setTarget("String_Node_Str");
  updateData.setData(data);
  Update update=new Update();
  update.setUpdateData(updateData);
  response.setUpdate(new Update[]{update});
}
Program: 70885
Project: 70885
Buggy source:
/** 
 * Returns the cascading parameter selection list
 * @param paramName
 * @param design
 * @param groupName
 * @param groupKeys
 * @param options
 * @param attrBean
 * @param keepDefValue
 * @return
 * @throws RemoteException
 * @throws ReportServiceException
 */
private List<SelectItemChoice> doQueryCascadeParameterSelectionList(String paramName,IViewerReportDesignHandle design,String groupName,Object[] groupKeys,InputOptions options,ViewerAttributeBean attrBean,boolean keepDefValue) throws RemoteException, ReportServiceException {
  ParameterDefinition parameter=attrBean.findParameterDefinition(paramName);
  String defaultValue=null;
  String defaultLabel=null;
  if (keepDefValue) {
    Object obj=attrBean.getDefaultValues().get(parameter.getName());
    if (obj != null) {
      defaultValue=DataUtil.getDisplayValue(obj,attrBean.getTimeZone());
      defaultLabel=DataUtil.getDisplayValue(null,parameter.getPattern(),obj,attrBean.getLocale(),attrBean.getTimeZone());
    }
  }
  Collection<ParameterSelectionChoice> list=getReportService().getSelectionListForCascadingGroup(design,groupName,groupKeys,options);
  ScalarParameterBean parameterBean=new ScalarParameterBean(parameter);
  parameterBean.setRequired(parameter.isRequired());
  List<ParameterSelectionChoice> selectionList=ParameterUtility.makeSelectionList(list,parameterBean,attrBean.getLocale(),attrBean.getTimeZone(),false);
  return ParameterUtility.toSelectItemChoice(selectionList);
}

Fixed version (ground truth):
/** 
 * Returns the cascading parameter selection list
 * @param paramName
 * @param design
 * @param groupName
 * @param groupKeys
 * @param options
 * @param attrBean
 * @param keepDefValue
 * @return
 * @throws RemoteException
 * @throws ReportServiceException
 */
private List<SelectItemChoice> doQueryCascadeParameterSelectionList(String paramName,IViewerReportDesignHandle design,String groupName,Object[] groupKeys,InputOptions options,ViewerAttributeBean attrBean,boolean keepDefValue) throws RemoteException, ReportServiceException {
  ParameterDefinition parameter=attrBean.findParameterDefinition(paramName);
  Collection<ParameterSelectionChoice> list=getReportService().getSelectionListForCascadingGroup(design,groupName,groupKeys,options);
  ScalarParameterBean parameterBean=new ScalarParameterBean(parameter);
  parameterBean.setRequired(parameter.isRequired());
  List<ParameterSelectionChoice> selectionList=ParameterUtility.makeSelectionList(list,parameterBean,attrBean.getLocale(),attrBean.getTimeZone(),false);
  return ParameterUtility.toSelectItemChoice(selectionList);
}
Program: 70886
Project: 70886
Buggy source:
/** 
 * Returns the path to the folder containing the files for a given sub session.
 * @param sessionId session ID
 * @return file path
 */
private String getSessionSubfolder(String prefix,String sessionId,String subSessionId){
  String folder="String_Node_Str";
  if (sessionId != null) {
    folder=(prefix + sessionId) + File.separator;
    if (subSessionId != null) {
      folder+=(subSessionId != null ? subSessionId : "String_Node_Str") + File.separator;
    }
  }
 else {
    folder="String_Node_Str";
  }
  return folder;
}

Fixed version (ground truth):
/** 
 * Returns the path to the folder containing the files for a given sub session.
 * @param sessionId session ID
 * @return file path
 */
private String getSessionSubfolder(String prefix,String sessionId,String subSessionId){
  String folder="String_Node_Str";
  if (sessionId != null) {
    folder=(prefix + sessionId) + File.separator;
    if (subSessionId != null) {
      folder+=subSessionId + File.separator;
    }
  }
 else {
    folder="String_Node_Str";
  }
  return folder;
}
Program: 70887
Project: 70887
Buggy source:
public synchronized int hashCode(){
  if (__hashCodeCalc) {
    return 0;
  }
  __hashCodeCalc=true;
  int _hashCode=1;
  _hashCode+=new Long(getRptElementId()).hashCode();
  _hashCode+=new Long(getDataSetId()).hashCode();
  __hashCodeCalc=false;
  return _hashCode;
}

Fixed version (ground truth):
public synchronized int hashCode(){
  if (__hashCodeCalc) {
    return 0;
  }
  __hashCodeCalc=true;
  int _hashCode=1;
  _hashCode+=Long.valueOf(getRptElementId()).hashCode();
  _hashCode+=Long.valueOf(getDataSetId()).hashCode();
  __hashCodeCalc=false;
  return _hashCode;
}
Program: 70888
Project: 70888
Buggy source:
public synchronized int hashCode(){
  if (__hashCodeCalc) {
    return 0;
  }
  __hashCodeCalc=true;
  int _hashCode=1;
  _hashCode+=new Long(getId()).hashCode();
  if (getName() != null) {
    _hashCode+=getName().hashCode();
  }
  if (getDisplayName() != null) {
    _hashCode+=getDisplayName().hashCode();
  }
  if (getDescription() != null) {
    _hashCode+=getDescription().hashCode();
  }
  _hashCode+=(isIsDeletable() ? Boolean.TRUE : Boolean.FALSE).hashCode();
  _hashCode+=(isIsModifiable() ? Boolean.TRUE : Boolean.FALSE).hashCode();
  if (getDefinition() != null) {
    _hashCode+=getDefinition().hashCode();
  }
  if (getDataSource() != null) {
    _hashCode+=getDataSource().hashCode();
  }
  __hashCodeCalc=false;
  return _hashCode;
}

Fixed version (ground truth):
public synchronized int hashCode(){
  if (__hashCodeCalc) {
    return 0;
  }
  __hashCodeCalc=true;
  int _hashCode=1;
  _hashCode+=Long.valueOf(getId()).hashCode();
  if (getName() != null) {
    _hashCode+=getName().hashCode();
  }
  if (getDisplayName() != null) {
    _hashCode+=getDisplayName().hashCode();
  }
  if (getDescription() != null) {
    _hashCode+=getDescription().hashCode();
  }
  _hashCode+=(isIsDeletable() ? Boolean.TRUE : Boolean.FALSE).hashCode();
  _hashCode+=(isIsModifiable() ? Boolean.TRUE : Boolean.FALSE).hashCode();
  if (getDefinition() != null) {
    _hashCode+=getDefinition().hashCode();
  }
  if (getDataSource() != null) {
    _hashCode+=getDataSource().hashCode();
  }
  __hashCodeCalc=false;
  return _hashCode;
}
Program: 70889
Project: 70889
Buggy source:
public synchronized int hashCode(){
  if (__hashCodeCalc) {
    return 0;
  }
  __hashCodeCalc=true;
  int _hashCode=1;
  _hashCode+=new Long(getId()).hashCode();
  _hashCode+=(isVisible() ? Boolean.TRUE : Boolean.FALSE).hashCode();
  if (getName() != null) {
    _hashCode+=getName().hashCode();
  }
  if (getDescription() != null) {
    _hashCode+=getDescription().hashCode();
  }
  if (getDataSetUsed() != null) {
    _hashCode+=getDataSetUsed().hashCode();
  }
  __hashCodeCalc=false;
  return _hashCode;
}

Fixed version (ground truth):
public synchronized int hashCode(){
  if (__hashCodeCalc) {
    return 0;
  }
  __hashCodeCalc=true;
  int _hashCode=1;
  _hashCode+=Long.valueOf(getId()).hashCode();
  _hashCode+=(isVisible() ? Boolean.TRUE : Boolean.FALSE).hashCode();
  if (getName() != null) {
    _hashCode+=getName().hashCode();
  }
  if (getDescription() != null) {
    _hashCode+=getDescription().hashCode();
  }
  if (getDataSetUsed() != null) {
    _hashCode+=getDataSetUsed().hashCode();
  }
  __hashCodeCalc=false;
  return _hashCode;
}
Program: 70890
Project: 70890
Buggy source:
public synchronized int hashCode(){
  if (__hashCodeCalc) {
    return 0;
  }
  __hashCodeCalc=true;
  int _hashCode=1;
  _hashCode+=new Long(getId()).hashCode();
  _hashCode+=getS_Count();
  _hashCode+=getG_Count();
  if (getCH_Row() != null) {
    _hashCode+=getCH_Row().hashCode();
  }
  if (getTC_Row() != null) {
    _hashCode+=getTC_Row().hashCode();
  }
  if (getSections() != null) {
    _hashCode+=getSections().hashCode();
  }
  if (getGroups() != null) {
    _hashCode+=getGroups().hashCode();
  }
  __hashCodeCalc=false;
  return _hashCode;
}

Fixed version (ground truth):
public synchronized int hashCode(){
  if (__hashCodeCalc) {
    return 0;
  }
  __hashCodeCalc=true;
  int _hashCode=1;
  _hashCode+=Long.valueOf(getId()).hashCode();
  _hashCode+=getS_Count();
  _hashCode+=getG_Count();
  if (getCH_Row() != null) {
    _hashCode+=getCH_Row().hashCode();
  }
  if (getTC_Row() != null) {
    _hashCode+=getTC_Row().hashCode();
  }
  if (getSections() != null) {
    _hashCode+=getSections().hashCode();
  }
  if (getGroups() != null) {
    _hashCode+=getGroups().hashCode();
  }
  __hashCodeCalc=false;
  return _hashCode;
}