Code Duplication    Length = 12-12 lines in 2 locations

Sources/Subs.php 2 locations

@@ 3875-3886 (lines=12) @@
3872
		$mode = (preg_match('/:/',$ip_parts[0]) > 0 ? ':' : '.');
3873
		$max = ($mode == ':' ? 'ffff' : '255');
3874
		$min = 0;
3875
		if(!$valid_low)
3876
		{
3877
			$ip_parts[0] = preg_replace('/\*/', '0', $ip_parts[0]);
3878
			$valid_low = isValidIP($ip_parts[0]);
3879
			while (!$valid_low)
3880
			{
3881
				$ip_parts[0] .= $mode . $min;
3882
				$valid_low = isValidIP($ip_parts[0]);
3883
				$count++;
3884
				if ($count > 9) break;
3885
			}
3886
		}
3887
3888
		$count = 0;
3889
		if(!$valid_high)
@@ 3889-3900 (lines=12) @@
3886
		}
3887
3888
		$count = 0;
3889
		if(!$valid_high)
3890
		{
3891
			$ip_parts[1] = preg_replace('/\*/', $max, $ip_parts[1]);
3892
			$valid_high = isValidIP($ip_parts[1]);
3893
			while (!$valid_high)
3894
			{
3895
				$ip_parts[1] .= $mode . $max;
3896
				$valid_high = isValidIP($ip_parts[1]);
3897
				$count++;
3898
				if ($count > 9) break;
3899
			}
3900
		}
3901
3902
		if($valid_high && $valid_low)
3903
		{