<commit_before>package hu.cegnev.todolistapp.business;

import hu.cegnev.todolistapp.model.Todo;
import org.joda.time.DateTime;

import java.util.ArrayList;
import java.util.List;

public class TodoLogic {
    /**
     * The list of the to dos we will process with
     */
    private List<Todo> itemList;

    public String itemListName = "development";

    /**
     * The constructor to initialize the list.
     */
    public TodoLogic() {
        this.itemList = new ArrayList<>();
    }

    /**
     * This function says if the to doCheck parameter is already added to the list or not by id matching
     * @param itemToCheck the to do item to check
     * @return the result of the id containment
     */
    public boolean checkContainById(Todo itemToCheck){
        for(Todo todo: itemList){
            if(todo.getId() == itemToCheck.getId()){
                return true;
            }
        }
        return false;
    }

    /**
     * This function returns the count of the items in the to do list
     * @return the count of the items in the to do list
     */
    public int getTodoCount(){
        return itemList.size();
    }

    /**
     * This function adds the given to do to the list if it was not yet.
     * @param itemToAdd the to do to add to the list
     */
    public void add(Todo itemToAdd){
        if(!checkContainById(itemToAdd)){
            itemList.add(itemToAdd);
        }
    }

    /**
     * This function returns all the to dos they have a deadline that is after the current time.
     * @return the available to dos
     */
    public List<Todo> getAvailableItems(){
        List<Todo> availableTodos = new ArrayList<>();
        for(Todo todo: itemList){
            if(todo.getDeadLine().isAfter(new DateTime().getMillis())){
                availableTodos.add(todo);
            }
        }
        return availableTodos;
    }

    /**
     * This function returns the given to do from the to do list.
     * @param itemToRemove the to do item to be removed
     */
    public void remove(Todo itemToRemove){
        int todoId = itemToRemove.getId();
        for(Todo todo: itemList){
            if(todo.getId() == todoId){<commit_msg>modified method name<commit_after>package hu.cegnev.todolistapp.business;

import hu.cegnev.todolistapp.model.Todo;
import org.joda.time.DateTime;

import java.util.ArrayList;
import java.util.List;

public class TodoLogic {
    /**
     * The list of the to dos we will process with
     */
    private List<Todo> itemList;

    public String itemListName = "development";

    /**
     * The constructor to initialize the list.
     */
    public TodoLogic() {
        this.itemList = new ArrayList<>();
    }

    /**
     * This function says if the to doCheck parameter is already added to the list or not by id matching
     * @param itemToCheck the to do item to check
     * @return the result of the id containment
     */
    public boolean checkContainById(Todo itemToCheck){
        for(Todo todo: itemList){
            if(todo.getId() == itemToCheck.getId()){
                return true;
            }
        }
        return false;
    }

    /**
     * This function returns the count of the items in the to do list
     * @return the count of the items in the to do list
     */
    public int getTodoCount(){
        return itemList.size();
    }

    /**
     * This function adds the given to do to the list if it was not yet.
     * @param itemToAdd the to do to add to the list
     */
    public void add(Todo itemToAdd){
        if(!checkContainById(itemToAdd)){
            itemList.add(itemToAdd);
        }
    }

    /**
     * This function returns all the to dos they have a deadline that is after the current time.
     * @return the available to dos
     */
    public List<Todo> getAvailableItemsWithModifiedMethodName(){
        List<Todo> availableTodos = new ArrayList<>();
        for(Todo todo: itemList){
            if(todo.getDeadLine().isAfter(new DateTime().getMillis())){
                availableTodos.add(todo);
            }
        }
        return availableTodos;
    }

    /**
     * This function returns the given to do from the to do list.
     * @param itemToRemove the to do item to be removed
     */
    public void remove(Todo itemToRemove){
        int todoId = itemToRemove.getId();
        for(Todo todo: itemList){
            if(todo.getId() == todoId){
{'fraction_non_alphanumeric': 0.0925379904740304, 'fraction_numerical': 0.0, 'mean_word_length': 2.129879347054649, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '826139', 'n_tokens_mistral': 1285, 'n_tokens_neox': 1268, 'n_words': 437}