<commit_before>package ee.tuleva.onboarding.audit;

import ee.tuleva.onboarding.auth.principal.Person;
import lombok.RequiredArgsConstructor;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Aspect
@Component
@RequiredArgsConstructor
public class AuditServiceMonitor {

    private final AuditEventPublisher auditEventPublisher;

    @Before("execution(* ee.tuleva.onboarding.account.AccountStatementService.getAccountStatement(..)) && args(person)")
    public void logServiceAccess(Person person) {
        auditEventPublisher.publish(person.getPersonalCode(), AuditEventType.GET_ACCOUNT_STATEMENT);
    }

    @Before("execution(* ee.tuleva.onboarding.comparisons.overview.EpisAccountOverviewProvider.getAccountOverview(..)) && args(person)")
    public void logCashFlowAccess(Person person) {
        auditEventPublisher.publish(person.getPersonalCode(), AuditEventType.GET_CASH_FLOWS);
    }
}
<commit_msg>Fix audit for cash flow<commit_after>package ee.tuleva.onboarding.audit;

import ee.tuleva.onboarding.auth.principal.Person;
import lombok.RequiredArgsConstructor;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Aspect
@Component
@RequiredArgsConstructor
public class AuditServiceMonitor {

    private final AuditEventPublisher auditEventPublisher;

    @Before("execution(* ee.tuleva.onboarding.account.AccountStatementService.getAccountStatement(..)) && args(person)")
    public void logServiceAccess(Person person) {
        auditEventPublisher.publish(person.getPersonalCode(), AuditEventType.GET_ACCOUNT_STATEMENT);
    }

    @Before("execution(* ee.tuleva.onboarding.comparisons.overview.EpisAccountOverviewProvider.getAccountOverview(..)) && args(person, ..)")
    public void logCashFlowAccess(Person person) {
        auditEventPublisher.publish(person.getPersonalCode(), AuditEventType.GET_CASH_FLOWS);
    }
}

{'fraction_non_alphanumeric': 0.10487077534791253, 'fraction_numerical': 0.0, 'mean_word_length': 6.088028169014085, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4044324', 'n_tokens_mistral': 631, 'n_tokens_neox': 592, 'n_words': 84}