<commit_before>package com.todoapp.controller;

import com.todoapp.domain.ToDo;
import com.todoapp.service.ToDoService;
import com.todoapp.service.impl.ToDoServiceImpl;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.List;

@EnableAutoConfiguration
@CrossOrigin(origins = "http://localhost:63342")
@RestController
@RequestMapping(value = "/todo")
public class MainController {

    private ToDoService toDoService;

    public MainController() {
        this.toDoService = new ToDoServiceImpl();
    }

    @RequestMapping(method = RequestMethod.GET, produces = "application/json")
    @ResponseBody
    public List<ToDo> getAllToDos() {
        return toDoService.getToDos();
    }

    @RequestMapping(value = "/{id}", method = RequestMethod.GET, produces = "application/json")<commit_msg>CORS maxAge setup<commit_after>package com.todoapp.controller;

import com.todoapp.domain.ToDo;
import com.todoapp.service.ToDoService;
import com.todoapp.service.impl.ToDoServiceImpl;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.List;

@EnableAutoConfiguration
@CrossOrigin(origins = "*", maxAge = 3600)
@RestController
@RequestMapping("/todo")
public class MainController {

    private ToDoService toDoService;

    public MainController() {
        this.toDoService = new ToDoServiceImpl();
    }

    @RequestMapping(method = RequestMethod.GET, produces = "application/json")
    @ResponseBody
    public List<ToDo> getAllToDos() {
        return toDoService.getToDos();
    }

    @RequestMapping(value = "/{id}", method = RequestMethod.GET, produces = "application/json")
{'fraction_non_alphanumeric': 0.1145374449339207, 'fraction_numerical': 0.004955947136563877, 'mean_word_length': 4.9769736842105265, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3105390', 'n_tokens_mistral': 548, 'n_tokens_neox': 531, 'n_words': 99}