Code Duplication    Length = 8-8 lines in 2 locations

code/tests/apc.php 2 locations

@@ 511-518 (lines=8) @@
508
            foreach ($free as $block) {
509
                if ($block['offset']!=$ptr) {       // Used block
510
                    $h=(GRAPH_SIZE-5)*($block['offset']-$ptr)/$s;
511
                    if ($h>0) {
512
                        $j++;
513
                        if ($j<75) {
514
                            fill_box($image, $x, $y, 50, $h, $col_black, $col_red, bsize($block['offset']-$ptr), $j);
515
                        } else {
516
                            fill_box($image, $x, $y, 50, $h, $col_black, $col_red);
517
                        }
518
                    }
519
                    $y+=$h;
520
                }
521
                $h=(GRAPH_SIZE-5)*($block['size'])/$s;
@@ 522-529 (lines=8) @@
519
                    $y+=$h;
520
                }
521
                $h=(GRAPH_SIZE-5)*($block['size'])/$s;
522
                if ($h>0) {
523
                    $j++;
524
                    if ($j<75) {
525
                        fill_box($image, $x, $y, 50, $h, $col_black, $col_green, bsize($block['size']), $j);
526
                    } else {
527
                        fill_box($image, $x, $y, 50, $h, $col_black, $col_green);
528
                    }
529
                }
530
                $y+=$h;
531
                $ptr = $block['offset']+$block['size'];
532
            }