<commit_before>#!/bin/bash
#
# Simple script to test Java-based execution of Spoon. You must have assembled
# the jar prior to running this script (i.e., mvn clean verify).

gradle build
gradle assembleTest

set -e

APK=`\ls app/build/apk/*debug*.apk`
TEST_APK=`\ls app/build/apk/*test*.apk`
SPOON_JAR=`\ls spoon-*-jar-with-dependencies.jar`

java -jar $SPOON_JAR --apk "$APK" --test-apk "$TEST_APK" --output target

start target/index.html<commit_msg>Clean up before running tests<commit_after>#!/bin/bash
#
# Simple script to test Java-based execution of Spoon. You must have assembled
# the jar prior to running this script (i.e., mvn clean verify).

adb uninstall com.f2prateek.dfg.debug
adb uninstall com.f2prateek.dfg.debug.tests
adb uninstall com.f2prateek.dfg
gradle clean

gradle assemble
gradle assembleTest

set -e

APK=`\ls app/build/apk/*debug*.apk`
TEST_APK=`\ls app/build/apk/*test*.apk`
SPOON_JAR=`\ls spoon-*-jar-with-dependencies.jar`

java -jar $SPOON_JAR --apk "$APK" --test-apk "$TEST_APK" --output target

start target/index.html
{'fraction_non_alphanumeric': 0.13415794481446242, 'fraction_numerical': 0.0028544243577545195, 'mean_word_length': 4.207920792079208, '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': '559357', 'n_tokens_mistral': 414, 'n_tokens_neox': 379, 'n_words': 108}