<commit_before>package commands

import (
	"context"
	"fmt"
	"os"
	"os/exec"
	"strings"

	"../interpreter"
)

func cmd_if(ctx context.Context, cmd *exec.Cmd) (int, error) {
	// if "xxx" == "yyy"
	args := cmd.Args
	not := false
	start := 1

	if len(args) >= 2 && args[1] == "not" {
		not = true
		args = args[1:]
		start++
	}
	status := false
	if len(args) >= 4 && args[2] == "==" {
		status = (args[1] == args[3])
		args = args[4:]
		start += 3
	} else if len(args) >= 3 && args[1] == "exist" {
		_, err := os.Stat(args[2])
		status = (err == nil)
		args = args[3:]
		start += 2
	}
	if not {<commit_msg>if - ignore case 'NOT' and 'EXIST'<commit_after>package commands

import (
	"context"
	"fmt"
	"os"
	"os/exec"
	"strings"

	"../interpreter"
)

func cmd_if(ctx context.Context, cmd *exec.Cmd) (int, error) {
	// if "xxx" == "yyy"
	args := cmd.Args
	not := false
	start := 1

	if len(args) >= 2 && strings.EqualFold(args[1], "not") {
		not = true
		args = args[1:]
		start++
	}
	status := false
	if len(args) >= 4 && args[2] == "==" {
		status = (args[1] == args[3])
		args = args[4:]
		start += 3
	} else if len(args) >= 3 && strings.EqualFold(args[1], "exist") {
		_, err := os.Stat(args[2])
		status = (err == nil)
		args = args[3:]
		start += 2
	}

	if not {
{'fraction_non_alphanumeric': 0.21949286846275753, 'fraction_numerical': 0.02377179080824089, 'mean_word_length': 3.0095238095238095, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7269157', 'n_tokens_mistral': 579, 'n_tokens_neox': 537, 'n_words': 135}