class GithubMetaAnalyzer extends AbstractMetaAnalyzer {

    private static final Logger LOGGER = Logger.getLogger(GithubMetaAnalyzer.class);

    private enum VersionType {
        RELEASE,
        COMMIT;
    }
    private static final VersionType DEFAULT_VERSION_TYPE = VersionType.RELEASE;
    private static final String REPOSITORY_DEFAULT_URL = "https://github.com";
    private String repositoryUrl;
    private String repositoryUser;
    private String repositoryPassword;

    GithubMetaAnalyzer() {
        this.repositoryUrl = REPOSITORY_DEFAULT_URL;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void setRepositoryBaseUrl(String baseUrl) {
        this.repositoryUrl = baseUrl;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void setRepositoryUsernameAndPassword(String username, String password) {
        this.repositoryUser = username;
        this.repositoryPassword = password;
    }

    /**
     * {@inheritDoc}
     */
    public boolean isApplicable(final Component component) {
        return component.getPurl() != null && PackageURL.StandardTypes.GITHUB.equals(component.getPurl().getType());
    }

    /**
     * {@inheritDoc}
     */
    public RepositoryType supportedRepositoryType() {
        return RepositoryType.GITHUB;
    }

    /**
     * Checks whether the pURL version is a release or commit
     * @param component Component Object
     * @param repository The GH Repository Object defined by the pURL
     * @return VersionType
     * @throws IOException when GitHub API Calls fail
     */
    private VersionType get_version_type(final Component component, GHRepository repository) throws IOException {
        if (component.getPurl().getVersion() == null){
            LOGGER.debug(String.format("Version is not set, assuming %s", DEFAULT_VERSION_TYPE.name()));
            return DEFAULT_VERSION_TYPE;
        }
        if (repository.getReleaseByTagName(component.getPurl().getVersion()) != null){
            LOGGER.debug("Version is release");
            return VersionType.RELEASE;
        } else {
            LOGGER.debug("Version is commit");
            return VersionType.COMMIT;
        }
    }

    /**
     * {@inheritDoc}
     */
    public MetaModel analyze(final Component component) {<FILL_FUNCTION_BODY>}
}

        final MetaModel meta = new MetaModel(component);
        if (component.getPurl() != null) {
            try {
                final GitHub github;
                if (isNotBlank(repositoryUser) && isNotBlank(repositoryPassword)) {
                    github = GitHub.connect(repositoryUser, repositoryPassword);
                } else if (isBlank(repositoryUser) && isNotBlank(repositoryPassword)) {
                    github = GitHub.connectUsingOAuth(repositoryUrl, repositoryPassword);
                } else {
                    github = GitHub.connectAnonymously();
                }

                GHRepository repository = github.getRepository(String.format("%s/%s", component.getPurl().getNamespace(), component.getPurl().getName()));
                LOGGER.debug(String.format("Repos is at %s", repository.getUrl()));

                final VersionType version_type = get_version_type(component, repository);

                if (version_type == VersionType.RELEASE) {
                    GHRelease latest_release = repository.getLatestRelease();
                    if (latest_release != null) {
                        meta.setLatestVersion(latest_release.getTagName());
                        LOGGER.debug(String.format("Latest version: %s", meta.getLatestVersion()));
                    }
                    GHRelease current_release = repository.getReleaseByTagName(component.getPurl().getVersion());
                    if (current_release != null) {
                        meta.setPublishedTimestamp(current_release.getPublished_at());
                        LOGGER.debug(String.format("Current version published at: %s", meta.getPublishedTimestamp()));
                    }
                }

                if (version_type == VersionType.COMMIT) {
                    GHBranch default_branch = repository.getBranch(repository.getDefaultBranch());
                    GHCommit latest_release = repository.getCommit(default_branch.getSHA1());
                    meta.setLatestVersion(latest_release.getSHA1());
                    LOGGER.debug(String.format("Latest version: %s", meta.getLatestVersion()));
                    GHCommit current_release = repository.getCommit(component.getPurl().getVersion());
                    meta.setPublishedTimestamp(current_release.getCommitDate());
                    LOGGER.debug(String.format("Current version published at: %s", meta.getPublishedTimestamp()));
                }
            } catch (IOException ex) {
                handleRequestException(LOGGER, ex);
            } catch (Exception ex) {
                throw new MetaAnalyzerException(ex);
            }
        }
        return meta;
    
<methods>public non-sealed void <init>() ,public void setRepositoryBaseUrl(java.lang.String) ,public void setRepositoryUsernameAndPassword(java.lang.String, java.lang.String) <variables>protected java.lang.String baseUrl,protected java.lang.String password,protected java.lang.String username