<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace INPTP_AppForFixing
{
    [DataContract]
    public class Boss : Employee
    {
        private const int MONTHS_OF_YEAR = 12;
        [DataMember]
        private HashSet<Employee> employees;
        [DataMember]
        private Department department;
        public double PerEmplSalaryBonus { get; set; }


        /// <summary>
        /// Constructor for Boss class.
        /// </summary>
        /// <param name="department">Department under boss control.</param>
        public Boss(Department department)
        {
            employees = new HashSet<Employee>();
            this.department = department;
        }

        public Boss(int id, string firstName, string lastName, string job, DateTime ourBirthDate, double monthlySalaryCZK, Department dep) :
            base(id, firstName, lastName, job, ourBirthDate, monthlySalaryCZK)
        {
            department = dep;
            employees = new HashSet<Employee>();
        }

        public void SetSalaryBonus(double salaryBonus)
        {
			if (salaryBonus > 0.0)  
				PerEmplSalaryBonus = salaryBonus;
        }

        public void InsertEmpl(Employee empl)
        {
			if (!employees.Contains(empl)) 
				employees.Add(empl);
        }

        public override int getNextEmployeeId()
        {
            return Math.Max(Id + 1, GetEmployees().Any() ? GetEmployees().Max(e => e.getNextEmployeeId()) : int.MinValue);
        }

        /// <summary>
        /// Method on remove employee from boss control.
        /// </summary>
        /// <param name="empl">Employee which is remove from boss control.</param>
        public void PurgeEmpl(Employee empl)
        {
            employees.Remove(empl);
        }


        /// <summary>
        /// Method which return if employess is under boss control.
        /// </summary>
        /// <param name="empl"></param>
        /// <returns>Return true if employee is find. Else return false.  </returns><commit_msg>Removed useless check in Boss.InsertEmpl<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace INPTP_AppForFixing
{
    [DataContract]
    public class Boss : Employee
    {
        private const int MONTHS_OF_YEAR = 12;
        [DataMember]
        private HashSet<Employee> employees;
        [DataMember]
        private Department department;
        public double PerEmplSalaryBonus { get; set; }


        /// <summary>
        /// Constructor for Boss class.
        /// </summary>
        /// <param name="department">Department under boss control.</param>
        public Boss(Department department)
        {
            employees = new HashSet<Employee>();
            this.department = department;
        }

        public Boss(int id, string firstName, string lastName, string job, DateTime ourBirthDate, double monthlySalaryCZK, Department dep) :
            base(id, firstName, lastName, job, ourBirthDate, monthlySalaryCZK)
        {
            department = dep;
            employees = new HashSet<Employee>();
        }

        public void SetSalaryBonus(double salaryBonus)
        {
			if (salaryBonus > 0.0)  
				PerEmplSalaryBonus = salaryBonus;
        }

        public void InsertEmpl(Employee empl)
        { 
				employees.Add(empl);
        }

        public override int getNextEmployeeId()
        {
            return Math.Max(Id + 1, GetEmployees().Any() ? GetEmployees().Max(e => e.getNextEmployeeId()) : int.MinValue);
        }

        /// <summary>
        /// Method on remove employee from boss control.
        /// </summary>
        /// <param name="empl">Employee which is remove from boss control.</param>
        public void PurgeEmpl(Employee empl)
        {
            employees.Remove(empl);
        }


        /// <summary>
        /// Method which return if employess is under boss control.
        /// </summary>
        /// <param name="empl"></param>
        /// <returns>Return true if employee is find. Else return false.  </returns>
{'fraction_non_alphanumeric': 0.10549917394382818, 'fraction_numerical': 0.002360160490913382, 'mean_word_length': 2.0889212827988337, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 41, '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': '3289451', 'n_tokens_mistral': 1214, 'n_tokens_neox': 1135, 'n_words': 309}