<commit_before>package com.ryanpmartz.booktrackr.service;

import com.codahale.metrics.annotation.Timed;
import com.ryanpmartz.booktrackr.domain.User;
import com.ryanpmartz.booktrackr.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Optional;

@Service
public class UserService {

    private final UserRepository userRepository;

    @Autowired

    public UserService(UserRepository userRepository) {
        this.userRepository = userRepository;
    }

    @Timed
    @Transactional(readOnly = true)
    public Optional<User> getUserByEmail(String email) {
        return Optional.of(userRepository.findByEmail(email));
    }

    @Timed
    @Transactional
    public User createUser(User user) {
        return userRepository.save(user);
    }
}<commit_msg>fix weird space<commit_after>package com.ryanpmartz.booktrackr.service;

import com.codahale.metrics.annotation.Timed;
import com.ryanpmartz.booktrackr.domain.User;
import com.ryanpmartz.booktrackr.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Optional;

@Service
public class UserService {

    private final UserRepository userRepository;

    @Autowired
    public UserService(UserRepository userRepository) {
        this.userRepository = userRepository;
    }

    @Timed
    @Transactional(readOnly = true)
    public Optional<User> getUserByEmail(String email) {
        return Optional.of(userRepository.findByEmail(email));
    }

    @Timed
    @Transactional
    public User createUser(User user) {
        return userRepository.save(user);
    }
}
{'fraction_non_alphanumeric': 0.08579088471849866, 'fraction_numerical': 0.0, 'mean_word_length': 4.488235294117647, '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': '6960509', 'n_tokens_mistral': 530, 'n_tokens_neox': 521, 'n_words': 96}