<commit_before>/**
 * Copyright 2016 Red Hat, Inc. and/or its affiliates.
 *
 * Licensed under the Eclipse Public License version 1.0, available at
 * http://www.eclipse.org/legal/epl-v10.html
 */
package org.jboss.forge.bootstrap.listener;

import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.concurrent.ForkJoinPool;
import java.util.logging.Logger;

import org.jboss.forge.furnace.Furnace;
import org.jboss.forge.furnace.exception.ContainerException;
import org.jboss.forge.furnace.spi.ContainerLifecycleListener;
import org.jboss.forge.furnace.versions.Versions;

public class GreetingListener implements ContainerLifecycleListener
{
   private final Logger logger = Logger.getLogger(getClass().getName());
   private volatile boolean showProgress = true;

   @Override
   public void beforeStart(Furnace furnace) throws ContainerException
   {
      if (furnace.isServerMode())
      {
         StringWriter sw = new StringWriter();
         PrintWriter out = new PrintWriter(sw, true);
         out.println();
         out.println("    _____                    ");
         out.println("   |  ___|__  _ __ __ _  ___ ");
         out.println("   | |_ / _ \\| `__/ _` |/ _ \\  \\\\");
         out.println("   |  _| (_) | | | (_| |  __/  //");
         out.println("   |_|  \\___/|_|  \\__, |\\___| ");
         out.println("                   |__/      ");
         out.println("");
         out.print("JBoss Forge, version [ ");
         out.print(Versions.getImplementationVersionFor(getClass()));
         out.print(" ] - JBoss, by Red Hat, Inc. [ http://forge.jboss.org ]");
         out.println();
         out.println("Hit '<tab>' for a list of available commands.");
         out.println("and 'man [cmd]' for help on a specific command.");
         out.println();
         out.println("To quit the shell, type 'exit'.");
         logger.info(sw.toString());
         System.out.println(sw.toString());
         shellProgressInformation();
      }
   }

   @Override
   public void afterStart(Furnace furnace) throws ContainerException
   {
      showProgress = false;
   }

   @Override
   public void beforeStop(Furnace furnace) throws ContainerException
   {
      // Do nothing
   }

   @Override
   public void afterStop(Furnace furnace) throws ContainerException
   {
      // Do nothing<commit_msg>FORGE-2679: Showing <TAB> instead of <tab><commit_after>/**
 * Copyright 2016 Red Hat, Inc. and/or its affiliates.
 *
 * Licensed under the Eclipse Public License version 1.0, available at
 * http://www.eclipse.org/legal/epl-v10.html
 */
package org.jboss.forge.bootstrap.listener;

import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.concurrent.ForkJoinPool;
import java.util.logging.Logger;

import org.jboss.forge.furnace.Furnace;
import org.jboss.forge.furnace.exception.ContainerException;
import org.jboss.forge.furnace.spi.ContainerLifecycleListener;
import org.jboss.forge.furnace.versions.Versions;

public class GreetingListener implements ContainerLifecycleListener
{
   private final Logger logger = Logger.getLogger(getClass().getName());
   private volatile boolean showProgress = true;

   @Override
   public void beforeStart(Furnace furnace) throws ContainerException
   {
      if (furnace.isServerMode())
      {
         StringWriter sw = new StringWriter();
         PrintWriter out = new PrintWriter(sw, true);
         out.println();
         out.println("    _____                    ");
         out.println("   |  ___|__  _ __ __ _  ___ ");
         out.println("   | |_ / _ \\| `__/ _` |/ _ \\  \\\\");
         out.println("   |  _| (_) | | | (_| |  __/  //");
         out.println("   |_|  \\___/|_|  \\__, |\\___| ");
         out.println("                   |__/      ");
         out.println("");
         out.print("JBoss Forge, version [ ");
         out.print(Versions.getImplementationVersionFor(getClass()));
         out.print(" ] - JBoss, by Red Hat, Inc. [ http://forge.jboss.org ]");
         out.println();
         out.println("Hit '<TAB>' for a list of available commands.");
         out.println("and 'man [cmd]' for help on a specific command.");
         out.println();
         out.println("To quit the shell, type 'exit'.");
         logger.info(sw.toString());
         System.out.println(sw.toString());
         shellProgressInformation();
      }
   }

   @Override
   public void afterStart(Furnace furnace) throws ContainerException
   {
      showProgress = false;
   }

   @Override
   public void beforeStop(Furnace furnace) throws ContainerException
   {
      // Do nothing
   }

   @Override
   public void afterStop(Furnace furnace) throws ContainerException
   {
      // Do nothing
{'fraction_non_alphanumeric': 0.13304994686503718, 'fraction_numerical': 0.004250797024442083, 'mean_word_length': 2.5093214019388514, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3754218', 'n_tokens_mistral': 1425, 'n_tokens_neox': 1358, 'n_words': 294}