Code Duplication    Length = 12-12 lines in 2 locations

Sources/Subs.php 2 locations

@@ 3855-3866 (lines=12) @@
3852
		$mode = (preg_match('/:/',$ip_parts[0]) > 0 ? ':' : '.');
3853
		$max = ($mode == ':' ? 'ffff' : '255');
3854
		$min = 0;
3855
		if(!$valid_low)
3856
		{
3857
			$ip_parts[0] = preg_replace('/\*/', '0', $ip_parts[0]);
3858
			$valid_low = isValidIP($ip_parts[0]);
3859
			while (!$valid_low)
3860
			{
3861
				$ip_parts[0] .= $mode . $min;
3862
				$valid_low = isValidIP($ip_parts[0]);
3863
				$count++;
3864
				if ($count > 9) break;
3865
			}
3866
		}
3867
3868
		$count = 0;
3869
		if(!$valid_high)
@@ 3869-3880 (lines=12) @@
3866
		}
3867
3868
		$count = 0;
3869
		if(!$valid_high)
3870
		{
3871
			$ip_parts[1] = preg_replace('/\*/', $max, $ip_parts[1]);
3872
			$valid_high = isValidIP($ip_parts[1]);
3873
			while (!$valid_high)
3874
			{
3875
				$ip_parts[1] .= $mode . $max;
3876
				$valid_high = isValidIP($ip_parts[1]);
3877
				$count++;
3878
				if ($count > 9) break;
3879
			}
3880
		}
3881
3882
		if($valid_high && $valid_low)
3883
		{