Code Duplication    Length = 12-12 lines in 2 locations

Sources/Subs.php 2 locations

@@ 3892-3903 (lines=12) @@
3889
		$mode = (preg_match('/:/',$ip_parts[0]) > 0 ? ':' : '.');
3890
		$max = ($mode == ':' ? 'ffff' : '255');
3891
		$min = 0;
3892
		if(!$valid_low)
3893
		{
3894
			$ip_parts[0] = preg_replace('/\*/', '0', $ip_parts[0]);
3895
			$valid_low = isValidIP($ip_parts[0]);
3896
			while (!$valid_low)
3897
			{
3898
				$ip_parts[0] .= $mode . $min;
3899
				$valid_low = isValidIP($ip_parts[0]);
3900
				$count++;
3901
				if ($count > 9) break;
3902
			}
3903
		}
3904
3905
		$count = 0;
3906
		if(!$valid_high)
@@ 3906-3917 (lines=12) @@
3903
		}
3904
3905
		$count = 0;
3906
		if(!$valid_high)
3907
		{
3908
			$ip_parts[1] = preg_replace('/\*/', $max, $ip_parts[1]);
3909
			$valid_high = isValidIP($ip_parts[1]);
3910
			while (!$valid_high)
3911
			{
3912
				$ip_parts[1] .= $mode . $max;
3913
				$valid_high = isValidIP($ip_parts[1]);
3914
				$count++;
3915
				if ($count > 9) break;
3916
			}
3917
		}
3918
3919
		if($valid_high && $valid_low)
3920
		{