<commit_before>#!/bin/sh

set -e

# Initialize gerrit & reindex the site if the gerrit-configured doesn't exist
if [ -f $GERRIT_SITE/.gerrit-configured ]; then
  echo ">> Gerrit has been configured, then will not generate a new setup"
else
  echo ">> .gerrit-configured doesn't exist. We will start gerrit to generate it"
  java -jar ${GERRIT_HOME}/$GERRIT_WAR init --install-plugin=replication --install-plugin=download-commands --batch -d ${GERRIT_SITE}
  java -jar ${GERRIT_HOME}/$GERRIT_WAR reindex -d ${GERRIT_HOME}/site

  # Download Gerrit plugin
  echo ">> Download gerrit plugins - delete project <<"
  curl -sSL https://ci.gerritforge.com/view/Plugins-stable-2.11/job/Plugin_delete-project_stable-2.11/lastSuccessfulBuild/artifact/target/delete-project-2.11.jar -o ${GERRIT_SITE}/plugins/delete-project.jar

  # Copy our config files
  cp bin/gerrit.config ${GERRIT_SITE}/etc/gerrit.config
  cp bin/replication.config ${GERRIT_SITE}/etc/replication.config
  
  # Configure Git Replication
  echo ">> Configure Git Replication"<commit_msg>Refactor cmd<commit_after>#!/bin/sh

set -e

# Initialize gerrit & reindex the site if the gerrit-configured doesn't exist
if [ -f $GERRIT_SITE/.gerrit-configured ]; then
  echo ">> Gerrit has been configured, then will not generate a new setup"
else
  echo ">> .gerrit-configured doesn't exist. We will start gerrit to generate it"
  java -jar ${GERRIT_HOME}/$GERRIT_WAR init --install-plugin=replication --install-plugin=download-commands --batch --no-auto-start -d ${GERRIT_SITE}
  java -jar ${GERRIT_HOME}/$GERRIT_WAR reindex -d ${GERRIT_HOME}/site

  # Download Gerrit plugin
  echo ">> Download gerrit plugins - delete project <<"
  curl -sSL https://ci.gerritforge.com/view/Plugins-stable-2.11/job/Plugin_delete-project_stable-2.11/lastSuccessfulBuild/artifact/target/delete-project-2.11.jar -o ${GERRIT_SITE}/plugins/delete-project.jar

  # Copy our config files
  cp bin/gerrit.config ${GERRIT_SITE}/etc/gerrit.config
  cp bin/replication.config ${GERRIT_SITE}/etc/replication.config
  
  # Configure Git Replication
  echo ">> Configure Git Replication"
{'fraction_non_alphanumeric': 0.1222169587873046, 'fraction_numerical': 0.008526764566556135, 'mean_word_length': 4.293233082706767, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4861469', 'n_tokens_mistral': 753, 'n_tokens_neox': 714, 'n_words': 175}