<commit_before>package inproc

import (
	"encoding/json"
	"io/ioutil"
	"os"
	"strings"

	"ci.guzzler.io/guzzler/corcel/core"
)

//DummyAction ...
type DummyAction struct {
	LogPath     string
	LogContexts bool
	Results     map[string]interface{}
	contexts    []core.ExecutionContext
}

//Execute ...
func (instance DummyAction) Execute(context core.ExecutionContext, cancellation chan struct{}) core.ExecutionResult {
	result := core.ExecutionResult{}

	for k, v := range context {
		switch value := v.(type) {
		case string:
			for key, resultValue := range instance.Results {
				replacement := strings.Replace(resultValue.(string), k, value, -1)
				instance.Results[key] = replacement
			}
		}
	}

	for key, value := range instance.Results {
		result[key] = value
	}

	if instance.LogContexts {
		if _, err := os.Stat(instance.LogPath); os.IsNotExist(err) {
			instance.contexts = []core.ExecutionContext{}<commit_msg>Added a default case to simply break<commit_after>package inproc

import (
	"encoding/json"
	"io/ioutil"
	"os"
	"strings"

	"ci.guzzler.io/guzzler/corcel/core"
)

//DummyAction ...
type DummyAction struct {
	LogPath     string
	LogContexts bool
	Results     map[string]interface{}
	contexts    []core.ExecutionContext
}

//Execute ...
func (instance DummyAction) Execute(context core.ExecutionContext, cancellation chan struct{}) core.ExecutionResult {
	result := core.ExecutionResult{}

	for k, v := range context {
		switch value := v.(type) {
		case string:
			for key, resultValue := range instance.Results {
				replacement := strings.Replace(resultValue.(string), k, value, -1)
				instance.Results[key] = replacement
			}
		default:
			break
		}
	}

	for key, value := range instance.Results {
		result[key] = value
	}

	if instance.LogContexts {
		if _, err := os.Stat(instance.LogPath); os.IsNotExist(err) {
			instance.contexts = []core.ExecutionContext{}
{'fraction_non_alphanumeric': 0.1287758346581876, 'fraction_numerical': 0.0010598834128245894, 'mean_word_length': 3.7918781725888326, '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': '4722176', 'n_tokens_mistral': 653, 'n_tokens_neox': 611, 'n_words': 145}