<commit_before>#!/usr/bin/env bash
set -x

SCRIPT_DIR=`dirname "$0"`
CODE_DIR=$(cd $PWD/$SCRIPT_DIR/../..; pwd)

if [[ "$OSTYPE" == "darwin"* ]]; then
    VM_STATUS=$(docker-machine status $DOCKER_MACHINE_NAME)
    if [[ $VM_STATUS == "Running" ]] ; then
        VM_DIR=/tmp/code
        docker-machine ssh $DOCKER_MACHINE_NAME sudo rm -rf $VM_DIR
        docker-machine ssh $DOCKER_MACHINE_NAME mkdir $VM_DIR
        docker-machine scp -r $CODE_DIR/. $DOCKER_MACHINE_NAME:$VM_DIR
        CODE_DIR=$VM_DIR
    else
        exit 3  # VM not exported or not running
    fi
fi

docker run --rm --name maven-test -v $CODE_DIR:/usr/src/mymaven -w /usr/src/mymaven maven:3.2-jdk-8 mvn test

exit $(echo $?)<commit_msg>Fix java unit tests due to repo move.<commit_after>#!/usr/bin/env bash
set -x

SCRIPT_DIR=`dirname "$0"`
CODE_DIR=$(cd $SCRIPT_DIR/../../sockshop; pwd)

if [[ "$OSTYPE" == "darwin"* ]]; then
    VM_STATUS=$(docker-machine status $DOCKER_MACHINE_NAME)
    if [[ $VM_STATUS == "Running" ]] ; then
        VM_DIR=/tmp/code
        docker-machine ssh $DOCKER_MACHINE_NAME sudo rm -rf $VM_DIR
        docker-machine ssh $DOCKER_MACHINE_NAME mkdir $VM_DIR
        docker-machine scp -r $CODE_DIR/. $DOCKER_MACHINE_NAME:$VM_DIR
        CODE_DIR=$VM_DIR
    else
        exit 3  # VM not exported or not running
    fi
fi

docker run --rm --name maven-test -v $CODE_DIR:/usr/src/mymaven -w /usr/src/mymaven maven:3.2-jdk-8 mvn test

exit $(echo $?)
{'fraction_non_alphanumeric': 0.1418732782369146, 'fraction_numerical': 0.006887052341597796, 'mean_word_length': 2.9808219178082194, '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': '3196159', 'n_tokens_mistral': 596, 'n_tokens_neox': 556, 'n_words': 135}