<commit_before>#!/bin/sh
set -e

ECJ_VERSION="4.7"
mkdir -p target/classes
mkdir -p target/eclipse

if [ ! -e ~/.m2/repository/ecj-$ECJ_VERSION.jar ]; then
    wget http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/eclipse/downloads/drops4/R-4.7-201706120950/"ecj-$ECJ_VERSION.jar" -P ~/.m2/repository/
fi

java -jar ~/.m2/repository/ecj-$ECJ_VERSION.jar -target 1.8 -source 1.8 -cp $1 \
        -nowarn:[./target/generated-sources/antlr] -d target/eclipse-compile \
        -enableJavadoc src/main/java target/generated-sources/antlr -properties config/org.eclipse.jdt.core.prefs \
    \
    > target/eclipse/report.txt 2>&1<commit_msg>Issue #2600: remove extra quotes, introduce new variables to ease ecj version management, print output<commit_after>#!/bin/sh -e

ECJ_JAR="ecj-4.7.jar"
ECJ_MAVEN_VERSION="R-4.7-201706120950"

if [ ! -f ~/.m2/repository/$ECJ_MAVEN_VERSION/$ECJ_JAR ]; then
    wget http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/eclipse/downloads/drops4/$ECJ_MAVEN_VERSION/$ECJ_JAR -P ~/.m2/repository/$ECJ_MAVEN_VERSION
fi

mkdir -p target/classes
mkdir -p target/eclipse

set +e
java -jar ~/.m2/repository/$ECJ_MAVEN_VERSION/$ECJ_JAR -target 1.8 -source 1.8 -cp $1 \
        -nowarn:[./target/generated-sources/antlr] -d target/eclipse-compile \
        -enableJavadoc src/main/java target/generated-sources/antlr -properties config/org.eclipse.jdt.core.prefs \
    > target/eclipse/report.txt 2>&1
set -e

if (( $(grep ERROR target/eclipse/report.txt | cat | wc -l) > 0 )); then
  cat target/eclipse/report.txt
  false
fi
{'fraction_non_alphanumeric': 0.15463917525773196, 'fraction_numerical': 0.03801546391752577, 'mean_word_length': 3.3994334277620397, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5498420', 'n_tokens_mistral': 636, 'n_tokens_neox': 594, 'n_words': 106}