<commit_before>package org.jboss.pnc.localbuilder.datastore;


import org.jboss.pnc.model.BuildConfigSetRecord;
import org.jboss.pnc.model.BuildRecord;
import org.jboss.pnc.model.User;
import org.jboss.pnc.spi.datastore.Datastore;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * Created by aabulawi on 24/06/15.
 */
public class LocalDatastore implements Datastore {

    private List<BuildRecord> buildRecords = Collections.synchronizedList(new ArrayList<BuildRecord>());
    private List<BuildConfigSetRecord> buildConfigSetRecords = Collections.synchronizedList(new ArrayList<BuildConfigSetRecord>());

    AtomicInteger buildRecordSequence = new AtomicInteger(0);

    @Override
    public BuildRecord storeCompletedBuild(BuildRecord buildRecord) {
        buildRecords.add(buildRecord);
        return buildRecord;
    }

    @Override
    public User retrieveUserByUsername(String username) {
        User user = new User();
        user.setUsername("local-user");
        return user;
    }

    @Override
    public void createNewUser(User user) {
    }

    @Override
    public int getNextBuildRecordId() {
        return buildRecordSequence.incrementAndGet();
    }

    @Override
    public BuildConfigSetRecord saveBuildConfigSetRecord(BuildConfigSetRecord buildConfigSetRecord) {
        buildConfigSetRecords.add(buildConfigSetRecord);
        return buildConfigSetRecord;
    }
}<commit_msg>Implementing `storeBuildRecord` so that it compiles<commit_after>package org.jboss.pnc.localbuilder.datastore;


import org.jboss.pnc.model.BuildConfigSetRecord;
import org.jboss.pnc.model.BuildRecord;
import org.jboss.pnc.model.ProductMilestone;
import org.jboss.pnc.model.User;
import org.jboss.pnc.spi.datastore.Datastore;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * Created by aabulawi on 24/06/15.
 */
public class LocalDatastore implements Datastore {

    private List<BuildRecord> buildRecords = Collections.synchronizedList(new ArrayList<BuildRecord>());
    private List<BuildConfigSetRecord> buildConfigSetRecords = Collections.synchronizedList(new ArrayList<BuildConfigSetRecord>());

    AtomicInteger buildRecordSequence = new AtomicInteger(0);

    @Override
    public BuildRecord storeCompletedBuild(BuildRecord buildRecord) {
        buildRecords.add(buildRecord);
        return buildRecord;
    }

    @Override
    public User retrieveUserByUsername(String username) {
        User user = new User();
        user.setUsername("local-user");
        return user;
    }

    @Override
    public void createNewUser(User user) {
    }

    @Override
    public int getNextBuildRecordId() {
        return buildRecordSequence.incrementAndGet();
    }

    @Override
    public BuildConfigSetRecord saveBuildConfigSetRecord(BuildConfigSetRecord buildConfigSetRecord) {
        buildConfigSetRecords.add(buildConfigSetRecord);
        return buildConfigSetRecord;
    }

    @Override
    // TODO: to implement
    public BuildRecord storeBuildRecord(BuildRecord buildRecord, List<ProductMilestone> milestones) {
        return null;
    }
}
{'fraction_non_alphanumeric': 0.08643494309443248, 'fraction_numerical': 0.004306367271608736, 'mean_word_length': 4.113207547169812, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '419680', 'n_tokens_mistral': 944, 'n_tokens_neox': 904, 'n_words': 181}