<commit_before>package pl.natekrank.web.rest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import pl.natekrank.model.Survey;
import pl.natekrank.model.Task;
import pl.natekrank.service.SurveyService;

import java.security.Principal;
import java.util.List;

@RestController
@RequestMapping("/rest/survey")
@Transactional
public class SurveyController {
    @Autowired
    private SurveyService surveyService;

    @RequestMapping(method = RequestMethod.POST)
    public ResponseEntity<Survey> insert(@RequestBody Survey survey) {
        return new ResponseEntity<>(surveyService.save(survey), HttpStatus.OK);
    }

    @RequestMapping(method = RequestMethod.GET)
    public ResponseEntity<List<Survey>> getList() {
        return new ResponseEntity<>(surveyService.getAllSurveys(), HttpStatus.OK);
    }

    @RequestMapping(value = "/{id}", method = RequestMethod.GET)
    public ResponseEntity<Survey> getTaskById(@PathVariable Long id) {
        return new ResponseEntity<>(surveyService.getSurveyById(id), HttpStatus.OK);
    }
}<commit_msg>Resend test button<commit_after>package pl.natekrank.web.rest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import pl.natekrank.model.Survey;
import pl.natekrank.model.Task;
import pl.natekrank.service.SurveyService;

import java.security.Principal;
import java.util.List;

@RestController
@RequestMapping("/rest/survey")
@Transactional
public class SurveyController {
    @Autowired
    private SurveyService surveyService;

    @RequestMapping(method = RequestMethod.POST)
    public ResponseEntity<Survey> insert(@RequestBody Survey survey) {
        return new ResponseEntity<>(surveyService.save(survey), HttpStatus.OK);
    }

    @RequestMapping(method = RequestMethod.PUT)
    public ResponseEntity<Survey> update(@RequestBody Survey survey) {
        return new ResponseEntity<>(surveyService.save(survey), HttpStatus.OK);
    }

    @RequestMapping(method = RequestMethod.GET)
    public ResponseEntity<List<Survey>> getList() {
        return new ResponseEntity<>(surveyService.getAllSurveys(), HttpStatus.OK);
    }

    @RequestMapping(value = "/{id}", method = RequestMethod.GET)
    public ResponseEntity<Survey> getTaskById(@PathVariable Long id) {
        return new ResponseEntity<>(surveyService.getSurveyById(id), HttpStatus.OK);
    }
}
{'fraction_non_alphanumeric': 0.10816696914700545, 'fraction_numerical': 0.0, 'mean_word_length': 5.306636155606407, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '5828795', 'n_tokens_mistral': 761, 'n_tokens_neox': 773, 'n_words': 143}