<commit_before>package globalfunctions;
import java.net.*;

public class IpAddress 
{
	public static long ipToLong(InetAddress ip) 
	{
        byte[] octets = ip.getAddress();
        long result = 0;
        for (byte octet : octets) 
        {
            result <<= 8;
            result |= octet & 0xff;
        }
        return result;
	}
}
<commit_msg>Ip address manipulating functions in global functions<commit_after>package globalfunctions;
import java.net.*;
import org.apache.commons.net.util.*; // Depends on apache commons-net-3.3 library
public class IpAddress 
{
	public static long ipToLong(InetAddress ip) //Converts IP address to a long integer in order to make comparisons
	{
        byte[] octets = ip.getAddress();
        long result = 0;
        for (byte octet : octets) // for a variable octet defined by each element in the array octets
        {
            result <<= 8;//left shift by 8 (due to 8 bytes)
            result |= octet & 0xff;// Or the byte with the octet anded with the number 1 (0xff is hexadecimal for 1)
        }
        return result;
	}
	
	
 //***checks if the specified ip address falls in the specified network address
	
	public static boolean iprangeverify(String ipadd, String netadd)// Format of netadd : xxx.xxx.xxx.xxx/xx where /xx is network mask
	{
		SubnetUtils utils = new SubnetUtils(netadd);
		return utils.getInfo().isInRange(ipadd);	
	}
}

{'fraction_non_alphanumeric': 0.09052031361368496, 'fraction_numerical': 0.009265858873841768, 'mean_word_length': 2.618556701030928, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3938944', 'n_tokens_mistral': 430, 'n_tokens_neox': 411, 'n_words': 152}