<commit_before>package at.ac.tuwien.inso.controller.admin;

import at.ac.tuwien.inso.controller.admin.forms.*;
import at.ac.tuwien.inso.dto.SemesterDto;
import at.ac.tuwien.inso.entity.*;
import at.ac.tuwien.inso.service.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.stereotype.*;
import org.springframework.validation.*;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.mvc.support.*;

import javax.validation.*;

@Controller
@RequestMapping("/admin/semester")
public class AdminSemesterController {

    @Autowired
    private SemesterService semesterService;

    @ModelAttribute("allSemesters")
    private Iterable<SemesterDto> getAllSemesters() {
        return semesterService.findAll();
    }

    @ModelAttribute("currentSemester")
    private SemesterDto getCurrentSemester() {
        return semesterService.getOrCreateCurrentSemester();
    }

    @GetMapping
    public String semester() {
        return "admin/semester";
    }
}
<commit_msg>model attributes must be used together because their order matters!; cleanup<commit_after>package at.ac.tuwien.inso.controller.admin;

import at.ac.tuwien.inso.service.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.stereotype.*;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/admin/semester")
public class AdminSemesterController {

    @Autowired
    private SemesterService semesterService;

    @GetMapping
    public String semester(Model model) {
        model.addAttribute("currentSemester", semesterService.getOrCreateCurrentSemester());
        model.addAttribute("allSemesters", semesterService.findAll());
        return "admin/semester";
    }
}

{'fraction_non_alphanumeric': 0.11382565241532482, 'fraction_numerical': 0.0, 'mean_word_length': 4.7025316455696204, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '2018353', 'n_tokens_mistral': 517, 'n_tokens_neox': 502, 'n_words': 91}