<commit_before>package util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import org.apache.logging.log4j.Logger;

public class PlatformSpecific {
    private static final Logger logger = HTLog.get(PlatformSpecific.class);

//    private static final PlatformSpecific instance = new PlatformSpecific();
    private PlatformSpecific() {}
    private static final String osName = System.getProperty("os.name");

    public static enum Architecture {
        UNKNOWN, X86_64, I386, I686
    }

    public static boolean isOnWindows() {
        return osName.startsWith("Windows");
    }

    public static boolean isOnMac() {
        return osName.startsWith("Mac OS");
    }

    public static boolean isOn64BitsLinux() {
        if (!isOnLinux()) {
            return false;
        }

        return getLinuxKernelArchitecture() == Architecture.X86_64;
    }

    private static boolean isOnLinux() {
        return osName.startsWith("Linux");
    }

    private static Architecture getLinuxKernelArchitecture() {
        try {
            Process process = Runtime.getRuntime().exec("uname -m");
            process.waitFor();

            BufferedReader reader =
                    new BufferedReader(new InputStreamReader(process.getInputStream()));

            String output = "";
            String nextOutputLine = reader.readLine();

            while (nextOutputLine != null) {
                output += nextOutputLine + " ";
                nextOutputLine = reader.readLine();
            }

            return getArchitectureFromString(output);
        } catch (IOException e) {<commit_msg>Implemenent linux 64bits or 32bits platform check<commit_after>package util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import org.apache.logging.log4j.Logger;

public class PlatformSpecific {
    private static final Logger logger = HTLog.get(PlatformSpecific.class);

//    private static final PlatformSpecific instance = new PlatformSpecific();
    private PlatformSpecific() {}
    private static final String osName = System.getProperty("os.name");

    public static enum Architecture {
        UNKNOWN, X86_64, I386, I686
    }

    public static boolean isOnWindows() {
        return osName.startsWith("Windows");
    }

    public static boolean isOnMac() {
        return osName.startsWith("Mac OS");
    }

    public static boolean isOn64BitsLinux() {
        if (!isOnLinux()) {
            return false;
        }

        return getLinuxKernelArchitecture() == Architecture.X86_64;
    }

    public static boolean isOn32BitsLinux() {
        if (!isOnLinux()) {
            return false;
        }

        Architecture architecture = getLinuxKernelArchitecture();

        return architecture == Architecture.I386 ||
                architecture == Architecture.I686;
    }

    public static boolean isOnLinux() {
        return osName.startsWith("Linux");
    }

    private static Architecture getLinuxKernelArchitecture() {
        try {
            Process process = Runtime.getRuntime().exec("uname -m");
            process.waitFor();

            BufferedReader reader =
                    new BufferedReader(new InputStreamReader(process.getInputStream()));

            String output = "";
            String nextOutputLine = reader.readLine();

            while (nextOutputLine != null) {
                output += nextOutputLine + " ";
                nextOutputLine = reader.readLine();
            }

            return getArchitectureFromString(output);
        } catch (IOException e) {
{'fraction_non_alphanumeric': 0.0934656741108354, 'fraction_numerical': 0.012682657843948167, 'mean_word_length': 2.4618320610687023, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1998247', 'n_tokens_mistral': 981, 'n_tokens_neox': 885, 'n_words': 230}