<commit_before>package be.plutus.core.service;

import be.plutus.core.model.account.Account;
import be.plutus.core.model.account.AccountStatus;
import be.plutus.core.model.account.preferences.Preferences;
import be.plutus.core.repository.AccountRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class AccountServiceImpl implements AccountService{

    @Autowired
    AccountRepository accountRepository;

    @Override
    public Account getAccount( int id ){
        return accountRepository.findOne( id );
    }

    @Override
    public Account getAccount( String email ){
        return accountRepository.findByEmail( email );
    }

    @Override
    public Account createAccount( String email, String password ){
        Account account = new Account();
        account.setEmail( email );
        account.setPlainTextPassword( password );
        account.setStatus( AccountStatus.ACTIVE );
        account.setPreferences( new Preferences() );
        return accountRepository.save( account );
    }

    @Override
    public void updateAccount( int id, String newEmail, String newPassword ){
        Account account = accountRepository.findOne( id );

        if( account == null )
            throw new NullPointerException( "Account with id " + id + " was not found" );

        account.setEmail( newEmail );
        account.setPlainTextPassword( newPassword );

        accountRepository.save( account );
    }

    @Override
    public void removeAccount( int id ){
        Account account = accountRepository.findOne( id );

        if( account == null )
            throw new NullPointerException( "Account with id " + id + " was not found" );

        accountRepository.delete( account );
    }
}<commit_msg>Implemented new required setters for test account<commit_after>package be.plutus.core.service;

import be.plutus.core.model.account.Account;
import be.plutus.core.model.account.AccountStatus;
import be.plutus.core.model.account.preferences.Preferences;
import be.plutus.core.model.currency.Currency;
import be.plutus.core.repository.AccountRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;

@Service
@Transactional
public class AccountServiceImpl implements AccountService{

    @Autowired
    AccountRepository accountRepository;

    @Override
    public Account getAccount( int id ){
        return accountRepository.findOne( id );
    }

    @Override
    public Account getAccount( String email ){
        return accountRepository.findByEmail( email );
    }

    @Override
    public Account createAccount( String email, String password ){
        Account account = new Account();
        account.setEmail( email );
        account.setPlainTextPassword( password );
        account.setStatus( AccountStatus.ACTIVE );
        account.setCreationDate( new Date() );
        account.setDefaultCurrency( Currency.EUR );
        account.setPreferences( new Preferences() );
        return accountRepository.save( account );
    }

    @Override
    public void updateAccount( int id, String newEmail, String newPassword ){
        Account account = accountRepository.findOne( id );

        if( account == null )
            throw new NullPointerException( "Account with id " + id + " was not found" );

        account.setEmail( newEmail );
        account.setPlainTextPassword( <PASSWORD> );

        accountRepository.save( account );
    }

    @Override
    public void removeAccount( int id ){
        Account account = accountRepository.findOne( id );

        if( account == null )
            throw new NullPointerException( "Account with id " + id + " was not found" );

        accountRepository.delete( account );
    }
}
{'fraction_non_alphanumeric': 0.08933500627352572, 'fraction_numerical': 0.0, 'mean_word_length': 3.2359192348565355, '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': '6959168', 'n_tokens_mistral': 1016, 'n_tokens_neox': 1004, 'n_words': 267}