<commit_before>package net.milosvasic.decorator.commands

import net.milosvasic.decorator.evaluation.ContentResult

class PrintlnCommand : TemplateCommand() {

    override val name: String = "println"
    override val parameters = listOf(String::class)

    override fun invoke(parameters: List<String>): ContentResult {
        checkParameters(parameters)
        var toPrint = parameters[0]
        if (toPrint.startsWith("\"")) {
            toPrint = toPrint.substring(1, toPrint.lastIndex)
        }
        if (toPrint.endsWith("\"")) {
            toPrint = toPrint.substring(toPrint.lastIndex - 1, toPrint.lastIndex)
        }
//        parameters[0]
//                .split(" ")
        return ContentResult(toPrint)
    }

}
<commit_msg>Decorator: Working on println  method.<commit_after>package net.milosvasic.decorator.commands

import net.milosvasic.decorator.evaluation.ContentResult

class PrintlnCommand : TemplateCommand() {

    override val name: String = "println"
    override val parameters = listOf(String::class)

    override fun invoke(parameters: List<String>): ContentResult {
        checkParameters(parameters)
        var toPrint = parameters[0]
        if (toPrint.startsWith("\"")) {
            toPrint = toPrint.substring(1, toPrint.lastIndex)
        }
        if (toPrint.endsWith("\"")) {
            toPrint = toPrint.substring(toPrint.lastIndex - 1, toPrint.lastIndex)
        }
        val regex = Regex("(\\$\\w+)")
        toPrint = toPrint.replace(regex, "- - - -") // TODO: Match property
        return ContentResult(toPrint)
    }

}

{'fraction_non_alphanumeric': 0.11994949494949494, 'fraction_numerical': 0.004419191919191919, 'mean_word_length': 2.7470449172576834, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3439175', 'n_tokens_mistral': 461, 'n_tokens_neox': 454, 'n_words': 90}