test_class.file: dubbo-common/src/test/java/org/apache/dubbo/common/utils/CIDRUtilsTest.java
test_class.identifier: CIDRUtilsTest
test_case.body: @Test
      public void testIpv4() throws UnknownHostException {
          CIDRUtils cidrUtils = new CIDRUtils("192.168.1.0/26");
          Assertions.assertTrue(cidrUtils.isInRange("192.168.1.63"));
          Assertions.assertFalse(cidrUtils.isInRange("192.168.1.65"));
  
          cidrUtils = new CIDRUtils("192.168.1.192/26");
          Assertions.assertTrue(cidrUtils.isInRange("192.168.1.199"));
          Assertions.assertFalse(cidrUtils.isInRange("192.168.1.190"));
      }
test_case.class_method_signature: CIDRUtilsTest.testIpv4()
test_case.full_signature: @Test public void testIpv4()
test_case.identifier: testIpv4
test_case.invocations: assertTrue isInRange assertFalse isInRange assertTrue isInRange assertFalse isInRange
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testIpv4()
focal_class.declarator: cidr
focal_class.modifier: private final
focal_class.original_string: private final String cidr;
focal_class.type: String
focal_class.var_name: cidr
focal_class.declarator: inetAddress
focal_class.modifier: private
focal_class.original_string: private InetAddress inetAddress;
focal_class.type: InetAddress
focal_class.var_name: inetAddress
focal_class.declarator: startAddress
focal_class.modifier: private
focal_class.original_string: private InetAddress startAddress;
focal_class.type: InetAddress
focal_class.var_name: startAddress
focal_class.declarator: endAddress
focal_class.modifier: private
focal_class.original_string: private InetAddress endAddress;
focal_class.type: InetAddress
focal_class.var_name: endAddress
focal_class.declarator: prefixLength
focal_class.modifier: private final
focal_class.original_string: private final int prefixLength;
focal_class.type: int
focal_class.var_name: prefixLength
focal_class.file: dubbo-common/src/main/java/org/apache/dubbo/common/utils/CIDRUtils.java
focal_class.identifier: CIDRUtils
focal_class.class_method_signature: CIDRUtils.CIDRUtils(String cidr)
focal_class.full_signature: public  CIDRUtils(String cidr)
focal_class.identifier: CIDRUtils
focal_class.modifiers: public
focal_class.parameters: (String cidr)
focal_class.signature:  CIDRUtils(String cidr)
focal_class.class_method_signature: CIDRUtils.calculate()
focal_class.full_signature: private void calculate()
focal_class.identifier: calculate
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void calculate()
focal_class.class_method_signature: CIDRUtils.toBytes(byte[] array, int targetSize)
focal_class.full_signature: private byte[] toBytes(byte[] array, int targetSize)
focal_class.identifier: toBytes
focal_class.modifiers: private
focal_class.parameters: (byte[] array, int targetSize)
focal_class.return: byte[]
focal_class.signature: byte[] toBytes(byte[] array, int targetSize)
focal_class.class_method_signature: CIDRUtils.getNetworkAddress()
focal_class.full_signature: public String getNetworkAddress()
focal_class.identifier: getNetworkAddress
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getNetworkAddress()
focal_class.class_method_signature: CIDRUtils.getBroadcastAddress()
focal_class.full_signature: public String getBroadcastAddress()
focal_class.identifier: getBroadcastAddress
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getBroadcastAddress()
focal_class.class_method_signature: CIDRUtils.isInRange(String ipAddress)
focal_class.full_signature: public boolean isInRange(String ipAddress)
focal_class.identifier: isInRange
focal_class.modifiers: public
focal_class.parameters: (String ipAddress)
focal_class.return: boolean
focal_class.signature: boolean isInRange(String ipAddress)
focal_method.body: public boolean isInRange(String ipAddress) throws UnknownHostException {
          InetAddress address = InetAddress.getByName(ipAddress);
          BigInteger start = new BigInteger(1, this.startAddress.getAddress());
          BigInteger end = new BigInteger(1, this.endAddress.getAddress());
          BigInteger target = new BigInteger(1, address.getAddress());
  
          int st = start.compareTo(target);
          int te = target.compareTo(end);
  
          return (st == -1 || st == 0) && (te == -1 || te == 0);
      }
focal_method.class_method_signature: CIDRUtils.isInRange(String ipAddress)
focal_method.full_signature: public boolean isInRange(String ipAddress)
focal_method.identifier: isInRange
focal_method.invocations: getByName getAddress getAddress getAddress compareTo compareTo
focal_method.modifiers: public
focal_method.parameters: (String ipAddress)
focal_method.return: boolean
focal_method.signature: boolean isInRange(String ipAddress)