<commit_before>package com.sequenceiq.provisioning.controller;

import java.util.Set;

import javax.validation.Valid;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sequenceiq.provisioning.controller.json.InfraRequest;
import com.sequenceiq.provisioning.domain.User;
import com.sequenceiq.provisioning.repository.UserRepository;
import com.sequenceiq.provisioning.security.CurrentUser;
import com.sequenceiq.provisioning.service.SimpleInfraService;

@Controller
public class InfraController {

    @Autowired
    private UserRepository userRepository;

    @Autowired
    private SimpleInfraService commonInfraService;

    @RequestMapping(method = RequestMethod.POST, value = "/infra")
    @ResponseBody
    public ResponseEntity<String> createInfra(@CurrentUser User user, @RequestBody @Valid InfraRequest infraRequest) {
        commonInfraService.create(userRepository.findOneWithLists(user.getId()), infraRequest);
        return new ResponseEntity<>(HttpStatus.CREATED);
    }

    @RequestMapping(method = RequestMethod.GET, value = "/infra")
    @ResponseBody
    public ResponseEntity<Set<InfraRequest>> getAllCloudInstance(@CurrentUser User user) {
        return new ResponseEntity<>(commonInfraService.getAll(userRepository.findOneWithLists(user.getId())), HttpStatus.OK);
    }

    @RequestMapping(method = RequestMethod.GET, value = "/infra/{infraId}")
    @ResponseBody
    public ResponseEntity<InfraRequest> getCloudInstance(@CurrentUser User user, @PathVariable Long infraId) {
        InfraRequest infraRequest = commonInfraService.get(infraId);
        return new ResponseEntity<>(infraRequest, HttpStatus.OK);
    }

}<commit_msg>autowire interface not implementation<commit_after>package com.sequenceiq.provisioning.controller;

import java.util.Set;

import javax.validation.Valid;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sequenceiq.provisioning.controller.json.InfraRequest;
import com.sequenceiq.provisioning.domain.User;
import com.sequenceiq.provisioning.repository.UserRepository;
import com.sequenceiq.provisioning.security.CurrentUser;
import com.sequenceiq.provisioning.service.InfraService;

@Controller
public class InfraController {

    @Autowired
    private UserRepository userRepository;

    @Autowired
    private InfraService infraService;

    @RequestMapping(method = RequestMethod.POST, value = "/infra")
    @ResponseBody
    public ResponseEntity<String> createInfra(@CurrentUser User user, @RequestBody @Valid InfraRequest infraRequest) {
        infraService.create(userRepository.findOneWithLists(user.getId()), infraRequest);
        return new ResponseEntity<>(HttpStatus.CREATED);
    }

    @RequestMapping(method = RequestMethod.GET, value = "/infra")
    @ResponseBody
    public ResponseEntity<Set<InfraRequest>> getAllInfras(@CurrentUser User user) {
        return new ResponseEntity<>(infraService.getAll(userRepository.findOneWithLists(user.getId())), HttpStatus.OK);
    }

    @RequestMapping(method = RequestMethod.GET, value = "/infra/{infraId}")
    @ResponseBody
    public ResponseEntity<InfraRequest> getInfra(@CurrentUser User user, @PathVariable Long infraId) {
        InfraRequest infraRequest = infraService.get(infraId);
        return new ResponseEntity<>(infraRequest, HttpStatus.OK);
    }

}
{'fraction_non_alphanumeric': 0.09591306402078904, 'fraction_numerical': 0.0, 'mean_word_length': 5.74203821656051, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '6722451', 'n_tokens_mistral': 1139, 'n_tokens_neox': 1123, 'n_words': 201}