<commit_before>package com.github.cstroe.spendhawk.cli;

import com.github.cstroe.spendhawk.entity.Account;
import com.github.cstroe.spendhawk.entity.Transaction;
import com.github.cstroe.spendhawk.util.HibernateUtil;
import org.hibernate.Session;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

public class TransactionManager {
    public static void main(String[] args) throws ParseException {
        TransactionManager manager = new TransactionManager();
        if("create".equals(args[0])) {
            Long accountId = Long.parseLong(args[1]);
            Double amount = Double.parseDouble(args[2]);
            Date effectiveDate = new SimpleDateFormat("yyMMddHHmmss").parse(args[3]);
            String description = Arrays.stream(Arrays.copyOfRange(args, 4, args.length))
                    .reduce("", (a, b) -> a.concat(" ").concat(b));
            Transaction transaction = manager.createTransaction(accountId, amount, effectiveDate, description);
            System.out.println("Created new transaction with id: " + transaction.getId());
        } else if("list".endsWith(args[0])) {
            List<Transaction> transactions = manager.list();
            transactions.stream().forEach(a ->
                    System.out.println("Transaction Id: " + a.getId() + ", " +
                        "Acct " + a.getAccount().getId() + ", " +
                        "Amount " + a.getAmount() + ", " +
                        "Effective Date " + a.getEffectiveDate()
                    ));
        }

        HibernateUtil.closeSessionFactory();
    }
<commit_msg>Show description of transaction.<commit_after>package com.github.cstroe.spendhawk.cli;

import com.github.cstroe.spendhawk.entity.Account;
import com.github.cstroe.spendhawk.entity.Transaction;
import com.github.cstroe.spendhawk.util.HibernateUtil;
import org.hibernate.Session;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

public class TransactionManager {
    public static void main(String[] args) throws ParseException {
        TransactionManager manager = new TransactionManager();
        if("create".equals(args[0])) {
            Long accountId = Long.parseLong(args[1]);
            Double amount = Double.parseDouble(args[2]);
            Date effectiveDate = new SimpleDateFormat("yyMMddHHmmss").parse(args[3]);
            String description = Arrays.stream(Arrays.copyOfRange(args, 4, args.length))
                    .reduce("", (a, b) -> a.concat(" ").concat(b));
            Transaction transaction = manager.createTransaction(accountId, amount, effectiveDate, description);
            System.out.println("Created new transaction with id: " + transaction.getId());
        } else if("list".endsWith(args[0])) {
            List<Transaction> transactions = manager.list();
            transactions.stream().forEach(a ->
                    System.out.println("Transaction Id: " + a.getId() + ", " +
                        "Acct " + a.getAccount().getId() + ", " +
                        "Amount " + a.getAmount() + ", " +
                        "Effective Date " + a.getEffectiveDate() + ", " +
                        a.getDescription()
                    ));
        }

        HibernateUtil.closeSessionFactory();
    }

{'fraction_non_alphanumeric': 0.1308139534883721, 'fraction_numerical': 0.0034883720930232558, 'mean_word_length': 2.573208722741433, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '5629830', 'n_tokens_mistral': 943, 'n_tokens_neox': 929, 'n_words': 174}