<commit_before>package classpath

import (
    //"io/ioutil"
    "strings"
)

type ClassPathEntry interface {
    // className: fully/qualified/ClassName.class
    readClassData(className string) ([]byte, error)
}

func parseClassPathEntry(str string) (ClassPathEntry) {
    if strings.HasSuffix(str, ".jar") {
        return newClassPathJarEntry(str)
    } else {
        if !strings.HasSuffix(str, "/") {
            str = str + "/"
        }

        return &ClassPathDirEntry{str}
    }
}
<commit_msg>code refactor<commit_after>package classpath

import (
    //"io/ioutil"
    "strings"
)

type ClassPathEntry interface {
    // className: fully/qualified/ClassName.class
    readClassData(className string) ([]byte, error)
}

func parseClassPathEntry(absPath string) (ClassPathEntry) {
    if strings.HasSuffix(absPath, ".jar") {
        return newClassPathJarEntry(absPath)
    } else {
        if !strings.HasSuffix(absPath, "/") {
            absPath = absPath + "/"
        }

        return &ClassPathDirEntry{absPath}
    }
}

{'fraction_non_alphanumeric': 0.1233140655105973, 'fraction_numerical': 0.0, 'mean_word_length': 2.791970802919708, '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': '5436914', 'n_tokens_mistral': 336, 'n_tokens_neox': 331, 'n_words': 61}