<commit_before>package uk.ac.ebi.spot.goci.curation.service.tracking;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import uk.ac.ebi.spot.goci.curation.service.EventOperationsService;
import uk.ac.ebi.spot.goci.model.Event;
import uk.ac.ebi.spot.goci.model.EventType;
import uk.ac.ebi.spot.goci.model.SecureUser;
import uk.ac.ebi.spot.goci.model.Trackable;

/**
 * Created by emma on 06/07/2016.
 *
 * @author emma
 *         <p>
 *         Association focused implementation of tracking behaviour
 */
@Service
public class AssociationTrackingOperationServiceImpl implements TrackingOperationService {

    private EventOperationsService eventOperationsService;

    @Autowired
    public AssociationTrackingOperationServiceImpl(EventOperationsService eventOperationsService) {
        this.eventOperationsService = eventOperationsService;
    }

    @Override public void create(Trackable trackable, SecureUser secureUser) {
        Event studyCreationEvent = eventOperationsService.createEvent(EventType.ASSOCIATION_CREATION, secureUser);
        trackable.addEvent(studyCreationEvent);
    }

    @Override public void update(Trackable trackable, SecureUser secureUser, EventType eventType) {
        Event updateEvent = eventOperationsService.createEvent(eventType, secureUser);
        trackable.addEvent(updateEvent);
    }

    @Override public void delete(Trackable trackable, SecureUser secureUser) {
        Event deleteEvent = eventOperationsService.createEvent(EventType.ASSOCIATION_DELETION, secureUser);
        trackable.addEvent(deleteEvent);
    }
}
<commit_msg>Renamed variable<commit_after>package uk.ac.ebi.spot.goci.curation.service.tracking;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import uk.ac.ebi.spot.goci.curation.service.EventOperationsService;
import uk.ac.ebi.spot.goci.model.Event;
import uk.ac.ebi.spot.goci.model.EventType;
import uk.ac.ebi.spot.goci.model.SecureUser;
import uk.ac.ebi.spot.goci.model.Trackable;

/**
 * Created by emma on 06/07/2016.
 *
 * @author emma
 *         <p>
 *         Association focused implementation of tracking behaviour
 */
@Service
public class AssociationTrackingOperationServiceImpl implements TrackingOperationService {

    private EventOperationsService eventOperationsService;

    @Autowired
    public AssociationTrackingOperationServiceImpl(EventOperationsService eventOperationsService) {
        this.eventOperationsService = eventOperationsService;
    }

    @Override public void create(Trackable trackable, SecureUser secureUser) {
        Event creationEvent = eventOperationsService.createEvent(EventType.ASSOCIATION_CREATION, secureUser);
        trackable.addEvent(creationEvent);
    }

    @Override public void update(Trackable trackable, SecureUser secureUser, EventType eventType) {
        Event updateEvent = eventOperationsService.createEvent(eventType, secureUser);
        trackable.addEvent(updateEvent);
    }

    @Override public void delete(Trackable trackable, SecureUser secureUser) {
        Event deleteEvent = eventOperationsService.createEvent(EventType.ASSOCIATION_DELETION, secureUser);
        trackable.addEvent(deleteEvent);
    }
}

{'fraction_non_alphanumeric': 0.08290155440414508, 'fraction_numerical': 0.0048765620237732395, 'mean_word_length': 4.658620689655172, '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': '5402322', 'n_tokens_mistral': 920, 'n_tokens_neox': 914, 'n_words': 167}