Program: 25518
Project: 25518
Buggy source:
public static List<HierarchicalStack> splitTier(final StackId roughTilesStackId,final Bounds parentStackBounds,final int maxPixelsPerDimension,final int tier){
  final List<HierarchicalStack> splitStacks=new ArrayList<>();
  final int parentWidth=(int)Math.ceil(parentStackBounds.getDeltaX());
  final int parentHeight=(int)Math.ceil(parentStackBounds.getDeltaY());
  final int rowsAndColumns=deriveRowsAndColumnsForTier(tier);
  final int maxDimension=Math.max(parentWidth,parentHeight);
  final int maxDimensionPerCell=ceilIntDivide(maxDimension,rowsAndColumns);
  final int cellWidth=ceilIntDivide(parentWidth,rowsAndColumns);
  final int cellHeight=ceilIntDivide(parentHeight,rowsAndColumns);
  final double scale=(double)maxPixelsPerDimension / maxDimensionPerCell;
  int row=0;
  int column;
  Bounds splitStackBounds;
  final int parentMinX=parentStackBounds.getMinX().intValue();
  final int parentMinY=parentStackBounds.getMinY().intValue();
  final double parentMinZ=parentStackBounds.getMinZ();
  final int parentMaxX=(int)Math.ceil(parentStackBounds.getMaxX());
  final int parentMaxY=(int)Math.ceil(parentStackBounds.getMaxY());
  final double parentMaxZ=parentStackBounds.getMaxZ();
  for (int y=parentMinY; y < parentMaxY; y+=cellHeight) {
    column=0;
    for (int x=parentMinX; x < parentMaxX; x+=cellWidth) {
      splitStackBounds=new Bounds((double)x,(double)y,parentMinZ,(double)x + cellWidth,(double)y + cellHeight,parentMaxZ);
      splitStacks.add(new HierarchicalStack(roughTilesStackId,tier,row,column,rowsAndColumns,rowsAndColumns,scale,splitStackBounds));
      column++;
    }
    row++;
  }
  return splitStacks;
}

Fixed version (ground truth):
public static List<HierarchicalStack> splitTier(final StackId roughTilesStackId,final Bounds parentStackBounds,final int maxPixelsPerDimension,final int tier){
  final List<HierarchicalStack> splitStacks=new ArrayList<>();
  final int parentWidth=(int)Math.ceil(parentStackBounds.getDeltaX());
  final int parentHeight=(int)Math.ceil(parentStackBounds.getDeltaY());
  final int rowsAndColumns=deriveRowsAndColumnsForTier(tier);
  final int maxDimension=Math.max(parentWidth,parentHeight);
  final int maxDimensionPerCell=ceilIntDivide(maxDimension,rowsAndColumns);
  final int cellWidth=ceilIntDivide(parentWidth,rowsAndColumns);
  final int cellHeight=ceilIntDivide(parentHeight,rowsAndColumns);
  final double scale=Math.min(1.0,(double)maxPixelsPerDimension / maxDimensionPerCell);
  int row=0;
  int column;
  Bounds splitStackBounds;
  final int parentMinX=parentStackBounds.getMinX().intValue();
  final int parentMinY=parentStackBounds.getMinY().intValue();
  final double parentMinZ=parentStackBounds.getMinZ();
  final int parentMaxX=(int)Math.ceil(parentStackBounds.getMaxX());
  final int parentMaxY=(int)Math.ceil(parentStackBounds.getMaxY());
  final double parentMaxZ=parentStackBounds.getMaxZ();
  for (int y=parentMinY; y < parentMaxY; y+=cellHeight) {
    column=0;
    for (int x=parentMinX; x < parentMaxX; x+=cellWidth) {
      splitStackBounds=new Bounds((double)x,(double)y,parentMinZ,(double)x + cellWidth,(double)y + cellHeight,parentMaxZ);
      splitStacks.add(new HierarchicalStack(roughTilesStackId,tier,row,column,rowsAndColumns,rowsAndColumns,scale,splitStackBounds));
      column++;
    }
    row++;
  }
  return splitStacks;
}