<commit_before>package com.atlassian.jira.plugins.bitbucket.api.impl;

import com.atlassian.jira.plugins.bitbucket.api.SourceControlRepository;
import com.atlassian.jira.plugins.bitbucket.spi.RepositoryUri;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

public class DefaultSourceControlRepository implements SourceControlRepository
{
	private final int id;
	private final String username;
	private final String password;
	private final String repositoryName;
    private final RepositoryUri repositoryUri;
    private final String projectKey;
	private final String adminUsername;
	private final String adminPassword;
    private final String repositoryType;
    private final String accessToken;

    public DefaultSourceControlRepository(int id, String repositoryName, String repositoryType, RepositoryUri repositoryUri, String projectKey, String username, String password,
			String adminUsername, String adminPassword, String accessToken)
	{
		this.id = id;
        this.repositoryName = repositoryName;
        this.repositoryUri = repositoryUri;
        this.projectKey = projectKey;
		this.username = username;
		this.password = password;
		this.adminUsername = adminUsername;
		this.adminPassword = <PASSWORD>;
        this.repositoryType = repositoryType;
        this.accessToken = accessToken;
    }
    
	@Override
    public int getId()
	{
		return id;
	}

	@Override
	public String getRepositoryType()
	{
	    return repositoryType;
	}

	@Override
    public String getRepositoryName()
    {
        return repositoryName;
    }

	@Override
    public RepositoryUri getRepositoryUri()
    {
        return repositoryUri;
    }

    @Override
    public String getProjectKey()
	{
		return projectKey;
	}
	

	@Override
    public String getUsername()
	{
		return username;
	}
	
	@Override
    public String getPassword()
	{
		return password;
	}

	@Override
    public String getAdminUsername()
	{<commit_msg>BBC-76 if we don't have repository name (for existing repositories) use the slug part of the url<commit_after>package com.atlassian.jira.plugins.bitbucket.api.impl;

import com.atlassian.jira.plugins.bitbucket.api.SourceControlRepository;
import com.atlassian.jira.plugins.bitbucket.spi.RepositoryUri;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

public class DefaultSourceControlRepository implements SourceControlRepository
{
	private final int id;
	private final String username;
	private final String password;
	private final String repositoryName;
    private final RepositoryUri repositoryUri;
    private final String projectKey;
	private final String adminUsername;
	private final String adminPassword;
    private final String repositoryType;
    private final String accessToken;

    public DefaultSourceControlRepository(int id, String repositoryName, String repositoryType, RepositoryUri repositoryUri, String projectKey, String username, String password,
			String adminUsername, String adminPassword, String accessToken)
	{
		this.id = id;
        this.repositoryName = repositoryName;
        this.repositoryUri = repositoryUri;
        this.projectKey = projectKey;
		this.username = username;
		this.password = password;
		this.adminUsername = adminUsername;
		this.adminPassword = <PASSWORD>;
        this.repositoryType = repositoryType;
        this.accessToken = accessToken;
    }
    
	@Override
    public int getId()
	{
		return id;
	}

	@Override
	public String getRepositoryType()
	{
	    return repositoryType;
	}

	@Override
    public String getRepositoryName()
    {
	    if (StringUtils.isBlank(repositoryName))
	    {
	        return repositoryUri.getSlug();
	    }
        return repositoryName;
    }

	@Override
    public RepositoryUri getRepositoryUri()
    {
        return repositoryUri;
    }

    @Override
    public String getProjectKey()
	{
		return projectKey;
	}
	

	@Override
    public String getUsername()
	{
		return username;
	}
	
	@Override
    public String getPassword()
	{
		return password;
	}

	@Override
    public String getAdminUsername()
	{
{'fraction_non_alphanumeric': 0.07049297451774232, 'fraction_numerical': 0.0004763038818766373, 'mean_word_length': 3.8442906574394464, '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': '5048841', 'n_tokens_mistral': 1174, 'n_tokens_neox': 1119, 'n_words': 306}