Code Duplication    Length = 12-12 lines in 2 locations

Sources/Subs.php 2 locations

@@ 4009-4020 (lines=12) @@
4006
		$mode = (preg_match('/:/',$ip_parts[0]) > 0 ? ':' : '.');
4007
		$max = ($mode == ':' ? 'ffff' : '255');
4008
		$min = 0;
4009
		if(!$valid_low)
4010
		{
4011
			$ip_parts[0] = preg_replace('/\*/', '0', $ip_parts[0]);
4012
			$valid_low = isValidIP($ip_parts[0]);
4013
			while (!$valid_low)
4014
			{
4015
				$ip_parts[0] .= $mode . $min;
4016
				$valid_low = isValidIP($ip_parts[0]);
4017
				$count++;
4018
				if ($count > 9) break;
4019
			}
4020
		}
4021
4022
		$count = 0;
4023
		if(!$valid_high)
@@ 4023-4034 (lines=12) @@
4020
		}
4021
4022
		$count = 0;
4023
		if(!$valid_high)
4024
		{
4025
			$ip_parts[1] = preg_replace('/\*/', $max, $ip_parts[1]);
4026
			$valid_high = isValidIP($ip_parts[1]);
4027
			while (!$valid_high)
4028
			{
4029
				$ip_parts[1] .= $mode . $max;
4030
				$valid_high = isValidIP($ip_parts[1]);
4031
				$count++;
4032
				if ($count > 9) break;
4033
			}
4034
		}
4035
4036
		if($valid_high && $valid_low)
4037
		{