test_class.file: dubbo-common/src/test/java/com/alibaba/dubbo/common/utils/NetUtilsTest.java
test_class.identifier: NetUtilsTest
test_case.body: @Test
      public void testValidAddress() throws Exception {
          assertTrue(NetUtils.isValidAddress("10.20.130.230:20880"));
          assertFalse(NetUtils.isValidAddress("10.20.130.230"));
          assertFalse(NetUtils.isValidAddress("10.20.130.230:666666"));
      }
test_case.class_method_signature: NetUtilsTest.testValidAddress()
test_case.full_signature: @Test public void testValidAddress()
test_case.identifier: testValidAddress
test_case.invocations: assertTrue isValidAddress assertFalse isValidAddress assertFalse isValidAddress
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testValidAddress()
focal_class.declarator: LOCALHOST = "127.0.0.1"
focal_class.modifier: public static final
focal_class.original_string: public static final String LOCALHOST = "127.0.0.1";
focal_class.type: String
focal_class.var_name: LOCALHOST
focal_class.declarator: ANYHOST = "0.0.0.0"
focal_class.modifier: public static final
focal_class.original_string: public static final String ANYHOST = "0.0.0.0";
focal_class.type: String
focal_class.var_name: ANYHOST
focal_class.declarator: logger = LoggerFactory.getLogger(NetUtils.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(NetUtils.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: RND_PORT_START = 30000
focal_class.modifier: private static final
focal_class.original_string: private static final int RND_PORT_START = 30000;
focal_class.type: int
focal_class.var_name: RND_PORT_START
focal_class.declarator: RND_PORT_RANGE = 10000
focal_class.modifier: private static final
focal_class.original_string: private static final int RND_PORT_RANGE = 10000;
focal_class.type: int
focal_class.var_name: RND_PORT_RANGE
focal_class.declarator: RANDOM = new Random(System.currentTimeMillis())
focal_class.modifier: private static final
focal_class.original_string: private static final Random RANDOM = new Random(System.currentTimeMillis());
focal_class.type: Random
focal_class.var_name: RANDOM
focal_class.declarator: MIN_PORT = 0
focal_class.modifier: private static final
focal_class.original_string: private static final int MIN_PORT = 0;
focal_class.type: int
focal_class.var_name: MIN_PORT
focal_class.declarator: MAX_PORT = 65535
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_PORT = 65535;
focal_class.type: int
focal_class.var_name: MAX_PORT
focal_class.declarator: ADDRESS_PATTERN = Pattern.compile("^\\d{1,3}(\\.\\d{1,3}){3}\\:\\d{1,5}$")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern ADDRESS_PATTERN = Pattern.compile("^\\d{1,3}(\\.\\d{1,3}){3}\\:\\d{1,5}$");
focal_class.type: Pattern
focal_class.var_name: ADDRESS_PATTERN
focal_class.declarator: LOCAL_IP_PATTERN = Pattern.compile("127(\\.\\d{1,3}){3}$")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern LOCAL_IP_PATTERN = Pattern.compile("127(\\.\\d{1,3}){3}$");
focal_class.type: Pattern
focal_class.var_name: LOCAL_IP_PATTERN
focal_class.declarator: IP_PATTERN = Pattern.compile("\\d{1,3}(\\.\\d{1,3}){3,5}$")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern IP_PATTERN = Pattern.compile("\\d{1,3}(\\.\\d{1,3}){3,5}$");
focal_class.type: Pattern
focal_class.var_name: IP_PATTERN
focal_class.declarator: hostNameCache = new LRUCache<String, String>(1000)
focal_class.modifier: private static final
focal_class.original_string: private static final Map<String, String> hostNameCache = new LRUCache<String, String>(1000);
focal_class.type: Map<String, String>
focal_class.var_name: hostNameCache
focal_class.declarator: LOCAL_ADDRESS = null
focal_class.modifier: private static volatile
focal_class.original_string: private static volatile InetAddress LOCAL_ADDRESS = null;
focal_class.type: InetAddress
focal_class.var_name: LOCAL_ADDRESS
focal_class.file: dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java
focal_class.identifier: NetUtils
focal_class.class_method_signature: NetUtils.getRandomPort()
focal_class.full_signature: public static int getRandomPort()
focal_class.identifier: getRandomPort
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getRandomPort()
focal_class.class_method_signature: NetUtils.getAvailablePort()
focal_class.full_signature: public static int getAvailablePort()
focal_class.identifier: getAvailablePort
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getAvailablePort()
focal_class.class_method_signature: NetUtils.getAvailablePort(int port)
focal_class.full_signature: public static int getAvailablePort(int port)
focal_class.identifier: getAvailablePort
focal_class.modifiers: public static
focal_class.parameters: (int port)
focal_class.return: int
focal_class.signature: int getAvailablePort(int port)
focal_class.class_method_signature: NetUtils.isInvalidPort(int port)
focal_class.full_signature: public static boolean isInvalidPort(int port)
focal_class.identifier: isInvalidPort
focal_class.modifiers: public static
focal_class.parameters: (int port)
focal_class.return: boolean
focal_class.signature: boolean isInvalidPort(int port)
focal_class.class_method_signature: NetUtils.isValidAddress(String address)
focal_class.full_signature: public static boolean isValidAddress(String address)
focal_class.identifier: isValidAddress
focal_class.modifiers: public static
focal_class.parameters: (String address)
focal_class.return: boolean
focal_class.signature: boolean isValidAddress(String address)
focal_class.class_method_signature: NetUtils.isLocalHost(String host)
focal_class.full_signature: public static boolean isLocalHost(String host)
focal_class.identifier: isLocalHost
focal_class.modifiers: public static
focal_class.parameters: (String host)
focal_class.return: boolean
focal_class.signature: boolean isLocalHost(String host)
focal_class.class_method_signature: NetUtils.isAnyHost(String host)
focal_class.full_signature: public static boolean isAnyHost(String host)
focal_class.identifier: isAnyHost
focal_class.modifiers: public static
focal_class.parameters: (String host)
focal_class.return: boolean
focal_class.signature: boolean isAnyHost(String host)
focal_class.class_method_signature: NetUtils.isInvalidLocalHost(String host)
focal_class.full_signature: public static boolean isInvalidLocalHost(String host)
focal_class.identifier: isInvalidLocalHost
focal_class.modifiers: public static
focal_class.parameters: (String host)
focal_class.return: boolean
focal_class.signature: boolean isInvalidLocalHost(String host)
focal_class.class_method_signature: NetUtils.isValidLocalHost(String host)
focal_class.full_signature: public static boolean isValidLocalHost(String host)
focal_class.identifier: isValidLocalHost
focal_class.modifiers: public static
focal_class.parameters: (String host)
focal_class.return: boolean
focal_class.signature: boolean isValidLocalHost(String host)
focal_class.class_method_signature: NetUtils.getLocalSocketAddress(String host, int port)
focal_class.full_signature: public static InetSocketAddress getLocalSocketAddress(String host, int port)
focal_class.identifier: getLocalSocketAddress
focal_class.modifiers: public static
focal_class.parameters: (String host, int port)
focal_class.return: InetSocketAddress
focal_class.signature: InetSocketAddress getLocalSocketAddress(String host, int port)
focal_class.class_method_signature: NetUtils.isValidAddress(InetAddress address)
focal_class.full_signature: private static boolean isValidAddress(InetAddress address)
focal_class.identifier: isValidAddress
focal_class.modifiers: private static
focal_class.parameters: (InetAddress address)
focal_class.return: boolean
focal_class.signature: boolean isValidAddress(InetAddress address)
focal_class.class_method_signature: NetUtils.getLocalHost()
focal_class.full_signature: public static String getLocalHost()
focal_class.identifier: getLocalHost
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getLocalHost()
focal_class.class_method_signature: NetUtils.filterLocalHost(String host)
focal_class.full_signature: public static String filterLocalHost(String host)
focal_class.identifier: filterLocalHost
focal_class.modifiers: public static
focal_class.parameters: (String host)
focal_class.return: String
focal_class.signature: String filterLocalHost(String host)
focal_class.class_method_signature: NetUtils.getLocalAddress()
focal_class.full_signature: public static InetAddress getLocalAddress()
focal_class.identifier: getLocalAddress
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: InetAddress
focal_class.signature: InetAddress getLocalAddress()
focal_class.class_method_signature: NetUtils.getLocalAddress0()
focal_class.full_signature: private static InetAddress getLocalAddress0()
focal_class.identifier: getLocalAddress0
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: InetAddress
focal_class.signature: InetAddress getLocalAddress0()
focal_class.class_method_signature: NetUtils.getHostName(String address)
focal_class.full_signature: public static String getHostName(String address)
focal_class.identifier: getHostName
focal_class.modifiers: public static
focal_class.parameters: (String address)
focal_class.return: String
focal_class.signature: String getHostName(String address)
focal_class.class_method_signature: NetUtils.getIpByHost(String hostName)
focal_class.full_signature: public static String getIpByHost(String hostName)
focal_class.identifier: getIpByHost
focal_class.modifiers: public static
focal_class.parameters: (String hostName)
focal_class.return: String
focal_class.signature: String getIpByHost(String hostName)
focal_class.class_method_signature: NetUtils.toAddressString(InetSocketAddress address)
focal_class.full_signature: public static String toAddressString(InetSocketAddress address)
focal_class.identifier: toAddressString
focal_class.modifiers: public static
focal_class.parameters: (InetSocketAddress address)
focal_class.return: String
focal_class.signature: String toAddressString(InetSocketAddress address)
focal_class.class_method_signature: NetUtils.toAddress(String address)
focal_class.full_signature: public static InetSocketAddress toAddress(String address)
focal_class.identifier: toAddress
focal_class.modifiers: public static
focal_class.parameters: (String address)
focal_class.return: InetSocketAddress
focal_class.signature: InetSocketAddress toAddress(String address)
focal_class.class_method_signature: NetUtils.toURL(String protocol, String host, int port, String path)
focal_class.full_signature: public static String toURL(String protocol, String host, int port, String path)
focal_class.identifier: toURL
focal_class.modifiers: public static
focal_class.parameters: (String protocol, String host, int port, String path)
focal_class.return: String
focal_class.signature: String toURL(String protocol, String host, int port, String path)
focal_method.body: public static boolean isValidAddress(String address) {
          return ADDRESS_PATTERN.matcher(address).matches();
      }
focal_method.class_method_signature: NetUtils.isValidAddress(String address)
focal_method.full_signature: public static boolean isValidAddress(String address)
focal_method.identifier: isValidAddress
focal_method.invocations: matches matcher
focal_method.modifiers: public static
focal_method.parameters: (String address)
focal_method.return: boolean
focal_method.signature: boolean isValidAddress(String address)