<commit_before>package qbt

import (
	"log"
	"os/exec"
)

type CommandInterface interface {
	Run() string
}

func NewSimpleCommand(command string, args string, exec ExecInterface) *SimpleCommand {
	return &SimpleCommand{command: command, args: args, exec: exec}
}

func NewSimpleCommandWithExec(command string, args string) *SimpleCommand {
	osExec := &Exec{}
	return &SimpleCommand{command: command, args: args, exec: osExec}
}

// SimpleCommand takes the command as it is and executes it
type SimpleCommand struct {
	command string
	args    string
	exec    ExecInterface
}

func (t *SimpleCommand) Run() string {
	return t.command + " " + t.args
}

type ExecInterface interface {
	Run(command string, args string) (output []byte, err error)
}

type Exec struct {
}

func (e *Exec) Run(command string, args string) (output []byte, err error) {
	output, err = exec.Command("date").Output()
	if err != nil {
		log.Fatal(err)
	}
	return output, err
}<commit_msg>added some comments to command<commit_after>package qbt

import (
	"log"
	"os/exec"
)

type CommandInterface interface {
	Run() string
}

// Constructor for SimpleCommand that accepts any exec library that is
// compatible with ExecInterface
func NewSimpleCommand(command string, args string, exec ExecInterface) *SimpleCommand {
	return &SimpleCommand{command: command, args: args, exec: exec}
}

// Constructor for SimpleCommand that uses Exec
func NewSimpleCommandWithExec(command string, args string) *SimpleCommand {
	osExec := &Exec{}
	return &SimpleCommand{command: command, args: args, exec: osExec}
}

// SimpleCommand takes the command as it is and executes it
type SimpleCommand struct {
	command string
	args    string
	exec    ExecInterface
}

// Runs the command and returns the output
func (t *SimpleCommand) Run() string {
	return t.command + " " + t.args
}

type ExecInterface interface {
	Run(command string, args string) (output []byte, err error)
}

type Exec struct {
}

func (e *Exec) Run(command string, args string) (output []byte, err error) {
	output, err = exec.Command("date").Output()
	if err != nil {
		log.Fatal(err)
	}
	return output, err
}
{'fraction_non_alphanumeric': 0.1050656660412758, 'fraction_numerical': 0.0, 'mean_word_length': 4.5984251968503935, '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': '5035852', 'n_tokens_mistral': 659, 'n_tokens_neox': 641, 'n_words': 234}