Code Duplication    Length = 9-9 lines in 2 locations

phpsysinfo/includes/os/class.Linux.inc.php 2 locations

@@ 678-686 (lines=9) @@
675
            $was = false;
676
            foreach ($lines as $line) {
677
                if (preg_match("/^\d+:\s+([^\s:]+)/", $line, $ar_buf)) {
678
                    if ($was) {
679
                        if ($macaddr != "") {
680
                            $dev->setInfo($macaddr.($dev->getInfo()?';'.$dev->getInfo():''));
681
                        }
682
                        if ($speedinfo != "") {
683
                            $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').$speedinfo);
684
                        }
685
                        $this->sys->setNetDevices($dev);
686
                    }
687
                    $speedinfo = "";
688
                    $macaddr = "";
689
                    $dev = new NetDevice();
@@ 732-740 (lines=9) @@
729
                    }
730
                }
731
            }
732
            if ($was) {
733
                if ($macaddr != "") {
734
                    $dev->setInfo($macaddr.($dev->getInfo()?';'.$dev->getInfo():''));
735
                }
736
                if ($speedinfo != "") {
737
                    $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').$speedinfo);
738
                }
739
                $this->sys->setNetDevices($dev);
740
            }
741
        } elseif (CommonFunctions::executeProgram('ifconfig', '-a', $bufr, PSI_DEBUG)) {
742
            $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
743
            $was = false;