public void giveBack() {

        Random random = new Random();

        for (Loan l : this.getStockController().getStock().getLoans()) {

            if (CalendarController.calendarToString(l.getEnd()).equals(
                    CalendarController
                            .calendarToString(new GregorianCalendar()))) {

                for (Equipment e : this.getStockController().getStock()
                        .getEquipment()) {

                    if (l.getName().equals(e.getName())
                            && l.getID().equals(e.getLoanID())) {

                        if (random.nextDouble() < Double
                                .parseDouble(Config.property
                                        .getProperty("Durability"))) {

                            e.setState(State.BROKEN);
                        }

                        e.setLoanID(null);

                        e.setNumberOfLoans(e.getNumberOfLoans() + 1);
                    }
                }

                l.getUser()
                        .setNumberOfLoans(l.getUser().getNumberOfLoans() + 1);

                System.out.println("The user " + l.getUser().toString()
                        + " give back the equiment " + l.getName() + ".");
            }
        }
    }