<commit_before>﻿using System;

namespace StackNamespace
{
    /// <summary>
    /// LIFO
    /// </summary>
    public class Stack : IStack
    {
        public void Push(int value)
        {
            StackElement newElement = new StackElement(value);
            if (this.head == null)
            {
                this.head = newElement;
                return;
            }

            newElement.Next = this.head;
            this.head = newElement;
        }

        public int GetValue()
        {
            if (this.head == null)
            {
                throw new EmptyStackException("you are trying to access a non-existent object");
            }

            return this.head.Value;
        }

        public void Pop()
        {
            if (this.head == null)
            {
                throw new EmptyStackException("you are trying to access a non-existent object");
            }

            this.head = this.head.Next;
        }

        public bool IsEmpty()
        {
            return this.head == null;
        }

        public void PrintStack()
        {
            if (this.head == null)
            {
                throw new EmptyStackException("Stack is empty");
            }

            StackElement i = this.head;
            while (i != null)
            {
                Console.WriteLine(i.Value + " ");
                i = i.Next;
            }
        }

        private class StackElement
        {
            /// <summary>
            /// class constructor
            /// </summary>
            /// <param name="value"></param>
            public StackElement(int value)
            {<commit_msg>exception was replaced by Console.WriteLine<commit_after>﻿using System;

namespace StackNamespace
{
    /// <summary>
    /// LIFO
    /// </summary>
    public class Stack : IStack
    {
        public void Push(int value)
        {
            StackElement newElement = new StackElement(value);
            if (this.head == null)
            {
                this.head = newElement;
                return;
            }

            newElement.Next = this.head;
            this.head = newElement;
        }

        public int GetValue()
        {
            if (this.head == null)
            {
                throw new EmptyStackException("you are trying to access a non-existent object");
            }

            return this.head.Value;
        }

        public void Pop()
        {
            if (this.head == null)
            {
                throw new EmptyStackException("you are trying to access a non-existent object");
            }

            this.head = this.head.Next;
        }

        public bool IsEmpty() => this.head == null;

        public void PrintStack()
        {
            if (this.head == null)
            {
                Console.WriteLine("Stack is empty");
            }

            StackElement i = this.head;
            while (i != null)
            {
                Console.WriteLine(i.Value + " ");
                i = i.Next;
            }
        }

        private class StackElement
        {
            /// <summary>
            /// class constructor
            /// </summary>
            /// <param name="value"></param>
            public StackElement(int value)
            {
{'fraction_non_alphanumeric': 0.09933373712901272, 'fraction_numerical': 0.0, 'mean_word_length': 1.0760527969830296, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 16, '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': '4883480', 'n_tokens_mistral': 834, 'n_tokens_neox': 790, 'n_words': 207}