Program: 70873
Project: 70873
Buggy source:
private void caleMergeMinHeight(List figures,List adjust,List hasAdjust){
  if (adjust.isEmpty()) {
    return;
  }
  int size=figures.size();
  Map map=getOwner().getViewer().getVisualPartMap();
  int adjustMax=0;
  int trueAdjustMax=0;
  int adjustMaxNumber=0;
  for (int i=0; i < size; i++) {
    IFigure figure=(IFigure)figures.get(i);
    ITableLayoutCell cellPart=(ITableLayoutCell)map.get(figure);
    int rowNumber=cellPart.getRowNumber();
    int rowSpan=cellPart.getRowSpan();
    Dimension minSize=figure.getMinimumSize(data.findColumnData(cellPart.getColumnNumber()).width,-1);
    int samMin=0;
    int trueSamMin=0;
    int[] adjustNumber=new int[0];
    for (int j=rowNumber; j < rowNumber + rowSpan; j++) {
      TableLayoutData.RowData rowData=data.findRowData(j);
      if (!hasAdjust.contains(new Integer(j))) {
        int len=adjustNumber.length;
        int temp[]=new int[len + 1];
        System.arraycopy(adjustNumber,0,temp,0,len);
        temp[len]=j;
        adjustNumber=temp;
      }
 else {
        samMin=samMin + rowData.trueMinRowHeight;
        trueSamMin=trueSamMin + rowData.trueMinRowHeight;
      }
    }
    int adjustCount=adjustNumber.length;
    if (adjustCount == 0) {
      continue;
    }
    int value=minSize.height - samMin;
    int trueValue=minSize.height - trueSamMin;
    for (int j=0; j < adjustCount; j++) {
      int temp=0;
      int trueTemp=0;
      if (j == adjustCount - 1) {
        temp=value / adjustCount + value % adjustCount;
        trueTemp=trueValue / adjustCount + trueValue % adjustCount;
      }
 else {
        temp=value / adjustCount;
        trueTemp=trueValue / adjustCount;
      }
      TableLayoutData.RowData rowData=data.findRowData(adjustNumber[j]);
      temp=Math.max(temp,rowData.minRowHeight);
      trueTemp=Math.max(trueTemp,rowData.trueMinRowHeight);
      if (trueTemp > trueAdjustMax) {
        adjustMax=temp;
        trueAdjustMax=trueTemp;
        adjustMaxNumber=adjustNumber[j];
      }
    }
  }
  if (adjustMaxNumber > 0) {
    TableLayoutData.RowData rowData=data.findRowData(adjustMaxNumber);
    rowData.minRowHeight=adjustMax;
    rowData.trueMinRowHeight=trueAdjustMax;
    adjust.remove(new Integer(adjustMaxNumber));
    hasAdjust.add(new Integer(adjustMaxNumber));
    caleMergeMinHeight(figures,adjust,hasAdjust);
  }
}

Fixed version (ground truth):
private void caleMergeMinHeight(List figures,List adjust,List hasAdjust){
  if (adjust.isEmpty()) {
    return;
  }
  int size=figures.size();
  Map map=getOwner().getViewer().getVisualPartMap();
  int adjustMax=0;
  int trueAdjustMax=0;
  int adjustMaxNumber=0;
  for (int i=0; i < size; i++) {
    IFigure figure=(IFigure)figures.get(i);
    ITableLayoutCell cellPart=(ITableLayoutCell)map.get(figure);
    int rowNumber=cellPart.getRowNumber();
    int rowSpan=cellPart.getRowSpan();
    Dimension minSize=figure.getMinimumSize(data.findColumnData(cellPart.getColumnNumber()).width,-1);
    int samMin=0;
    int trueSamMin=0;
    int[] adjustNumber=new int[0];
    for (int j=rowNumber; j < rowNumber + rowSpan; j++) {
      TableLayoutData.RowData rowData=data.findRowData(j);
      if (!hasAdjust.contains(Integer.valueOf(j))) {
        int len=adjustNumber.length;
        int temp[]=new int[len + 1];
        System.arraycopy(adjustNumber,0,temp,0,len);
        temp[len]=j;
        adjustNumber=temp;
      }
 else {
        samMin=samMin + rowData.trueMinRowHeight;
        trueSamMin=trueSamMin + rowData.trueMinRowHeight;
      }
    }
    int adjustCount=adjustNumber.length;
    if (adjustCount == 0) {
      continue;
    }
    int value=minSize.height - samMin;
    int trueValue=minSize.height - trueSamMin;
    for (int j=0; j < adjustCount; j++) {
      int temp=0;
      int trueTemp=0;
      if (j == adjustCount - 1) {
        temp=value / adjustCount + value % adjustCount;
        trueTemp=trueValue / adjustCount + trueValue % adjustCount;
      }
 else {
        temp=value / adjustCount;
        trueTemp=trueValue / adjustCount;
      }
      TableLayoutData.RowData rowData=data.findRowData(adjustNumber[j]);
      temp=Math.max(temp,rowData.minRowHeight);
      trueTemp=Math.max(trueTemp,rowData.trueMinRowHeight);
      if (trueTemp > trueAdjustMax) {
        adjustMax=temp;
        trueAdjustMax=trueTemp;
        adjustMaxNumber=adjustNumber[j];
      }
    }
  }
  if (adjustMaxNumber > 0) {
    TableLayoutData.RowData rowData=data.findRowData(adjustMaxNumber);
    rowData.minRowHeight=adjustMax;
    rowData.trueMinRowHeight=trueAdjustMax;
    adjust.remove(Integer.valueOf(adjustMaxNumber));
    hasAdjust.add(Integer.valueOf(adjustMaxNumber));
    caleMergeMinHeight(figures,adjust,hasAdjust);
  }
}