Code Duplication    Length = 12-12 lines in 2 locations

Sources/Subs.php 2 locations

@@ 3704-3715 (lines=12) @@
3701
		$mode = (preg_match('/:/',$ip_parts[0]) > 0 ? ':' : '.');
3702
		$max = ($mode == ':' ? 'ffff' : '255');
3703
		$min = 0;
3704
		if(!$valid_low)
3705
		{
3706
			$ip_parts[0] = preg_replace('/\*/', '0', $ip_parts[0]);
3707
			$valid_low = isValidIP($ip_parts[0]);
3708
			while (!$valid_low)
3709
			{
3710
				$ip_parts[0] .= $mode . $min;
3711
				$valid_low = isValidIP($ip_parts[0]);
3712
				$count++;
3713
				if ($count > 9) break;
3714
			}
3715
		}
3716
3717
		$count = 0;
3718
		if(!$valid_high)
@@ 3718-3729 (lines=12) @@
3715
		}
3716
3717
		$count = 0;
3718
		if(!$valid_high)
3719
		{
3720
			$ip_parts[1] = preg_replace('/\*/', $max, $ip_parts[1]);
3721
			$valid_high = isValidIP($ip_parts[1]);
3722
			while (!$valid_high)
3723
			{
3724
				$ip_parts[1] .= $mode . $max;
3725
				$valid_high = isValidIP($ip_parts[1]);
3726
				$count++;
3727
				if ($count > 9) break;
3728
			}
3729
		}
3730
3731
		if($valid_high && $valid_low)
3732
		{