<commit_before>#!/usr/bin/env bash

echo "Installing the Oracle JDK"

# Install add-apt-repository
apt-get -y install software-properties-common

add-apt-repository -y ppa:webupd8team/java
apt-get -y update
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
apt-get -y install oracle-java8-installer

# We're seeing Java installs fail intermittently.  Retrying indefinitely seems problematic.  I'm not sure
# what the correct solution is.  For now, we're just going to run the install a second time.  This will do
# nothing if the first install was successful and I suspect will eliminate the majority of our failures.
apt-get -y install oracle-java8-installer<commit_msg>switch to java tar install<commit_after>#!/usr/bin/env bash

echo "Installing the Oracle JDK"

# Install add-apt-repository, removeable?
apt-get -y install software-properties-common

wget --no-cookies --no-check-certificate \
--header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz"

tar -xvf jdk-8u151-linux-x64.tar.gz -C /opt/

update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_151/bin/java 100
update-alternatives --set java /opt/jdk1.8.0_151/bin/java
update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_151/bin/javac 100
update-alternatives --set javac /opt/jdk1.8.0_151/bin/javac
update-alternatives --install /usr/bin/keytool keytool /opt/jdk1.8.0_151/bin/keytool 100
update-alternatives --set keytool /opt/jdk1.8.0_151/bin/keytool
{'fraction_non_alphanumeric': 0.11355735805330243, 'fraction_numerical': 0.054461181923522596, 'mean_word_length': 4.265243902439025, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4000231', 'n_tokens_mistral': 676, 'n_tokens_neox': 611, 'n_words': 151}