<commit_before>package com.textuality.keybase.lib;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

public class Match {
    private final JSONObject mComponents;

    public Match(JSONObject json) throws KeybaseException {
        try {
            mComponents = JWalk.getObject(json, "components");
        } catch (JSONException e) {
            throw KeybaseException.keybaseScrewup(e);
        }
    }
    public boolean hasKey() throws KeybaseException {
        try {
            return (JWalk.optObject(mComponents, "key_fingerprint") != null);
        } catch (JSONException e) {
            throw KeybaseException.keybaseScrewup(e);
        }
    }
    public String getKeyID() throws KeybaseException {
        String fingerprint = getFingerprint();
        if (fingerprint.length() > 16) {
            fingerprint = fingerprint.substring(fingerprint.length() - 16);
        }
        return fingerprint;
    }
    public String getUsername() throws KeybaseException{
        try {
            return JWalk.getString(mComponents, "username", "val");
        } catch (JSONException e) {
            throw KeybaseException.keybaseScrewup(e);
        }
    }
    public String getFullName() throws KeybaseException {
        try {
            return JWalk.getString(mComponents, "full_name", "val");
        } catch (JSONException e) {
            throw KeybaseException.keybaseScrewup(e);
        }
    }
    public String getFingerprint() throws KeybaseException {
        try {
            String fingerprint = JWalk.getString(mComponents, "key_fingerprint", "val");
            return fingerprint.replace(" ", "").toUpperCase();
        } catch (JSONException e) {
            throw KeybaseException.keybaseScrewup(e);
        }
    }<commit_msg>Fixed inappropriate fingerprint uppercasing<commit_after>package com.textuality.keybase.lib;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

public class Match {
    private final JSONObject mComponents;

    public Match(JSONObject json) throws KeybaseException {
        try {
            mComponents = JWalk.getObject(json, "components");
        } catch (JSONException e) {
            throw KeybaseException.keybaseScrewup(e);
        }
    }
    public boolean hasKey() throws KeybaseException {
        try {
            return (JWalk.optObject(mComponents, "key_fingerprint") != null);
        } catch (JSONException e) {
            throw KeybaseException.keybaseScrewup(e);
        }
    }
    public String getKeyID() throws KeybaseException {
        String fingerprint = getFingerprint();
        if (fingerprint.length() > 16) {
            fingerprint = fingerprint.substring(fingerprint.length() - 16);
        }
        
        return fingerprint.replace(" ", "").toUpperCase();
    }
    public String getUsername() throws KeybaseException{
        try {
            return JWalk.getString(mComponents, "username", "val");
        } catch (JSONException e) {
            throw KeybaseException.keybaseScrewup(e);
        }
    }
    public String getFullName() throws KeybaseException {
        try {
            return JWalk.getString(mComponents, "full_name", "val");
        } catch (JSONException e) {
            throw KeybaseException.keybaseScrewup(e);
        }
    }
    public String getFingerprint() throws KeybaseException {
        try {
            return JWalk.getString(mComponents, "key_fingerprint", "val");
        } catch (JSONException e) {
            throw KeybaseException.keybaseScrewup(e);
        }
    }
{'fraction_non_alphanumeric': 0.09807640205906258, 'fraction_numerical': 0.002167434299647792, 'mean_word_length': 2.4601686972820995, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '976251', 'n_tokens_mistral': 1028, 'n_tokens_neox': 985, 'n_words': 226}