<commit_before>package com.alorma.github.ui.fragment.releases;

import android.os.Bundle;
import android.view.LayoutInflater;

import com.alorma.github.R;
import com.alorma.github.sdk.bean.dto.response.Permissions;
import com.alorma.github.sdk.bean.dto.response.Release;
import com.alorma.github.sdk.bean.info.RepoInfo;
import com.alorma.github.sdk.services.repo.GetRepoReleasesClient;
import com.alorma.github.ui.adapter.ReleasesAdapter;
import com.alorma.github.ui.fragment.base.PaginatedListFragment;
import com.alorma.github.ui.fragment.detail.repo.PermissionsManager;
import com.alorma.github.ui.listeners.TitleProvider;
import com.mikepenz.octicons_typeface_library.Octicons;

import java.util.List;

import retrofit.RetrofitError;

/**
 * Created by a557114 on 29/07/2015.
 */
public class RepoReleasesFragment extends PaginatedListFragment<List<Release>, ReleasesAdapter>
        implements TitleProvider, PermissionsManager {

    private static final String REPO_INFO = "REPO_INFO";
    private static final String REPO_PERMISSIONS = "REPO_PERMISSIONS";

    private RepoInfo repoInfo;
    private Permissions permissions;

    public static RepoReleasesFragment newInstance(RepoInfo info, Permissions permissions) {
        RepoReleasesFragment repoReleasesFragment = new RepoReleasesFragment();

        Bundle args = new Bundle();

        args.putParcelable(REPO_INFO, info);
        args.putParcelable(REPO_PERMISSIONS, permissions);

        repoReleasesFragment.setArguments(args);

        return repoReleasesFragment;
    }

    @Override
    protected void loadArguments() {
        repoInfo = getArguments().getParcelable(REPO_INFO);
        permissions = getArguments().getParcelable(REPO_PERMISSIONS);
    }

    @Override
    protected void executeRequest() {
        super.executeRequest();

        GetRepoReleasesClient client = new GetRepoReleasesClient(getActivity(), repoInfo, 0);
        client.setOnResultCallback(this);
        client.execute();
    }

    @Override
    protected void executePaginatedRequest(int page) {
        super.executePaginatedRequest(page);

        GetRepoReleasesClient client = new GetRepoReleasesClient(getActivity(), repoInfo, 0);<commit_msg>Fix releases not paged<commit_after>package com.alorma.github.ui.fragment.releases;

import android.os.Bundle;
import android.view.LayoutInflater;

import com.alorma.github.R;
import com.alorma.github.sdk.bean.dto.response.Permissions;
import com.alorma.github.sdk.bean.dto.response.Release;
import com.alorma.github.sdk.bean.info.RepoInfo;
import com.alorma.github.sdk.services.repo.GetRepoReleasesClient;
import com.alorma.github.ui.adapter.ReleasesAdapter;
import com.alorma.github.ui.fragment.base.PaginatedListFragment;
import com.alorma.github.ui.fragment.detail.repo.PermissionsManager;
import com.alorma.github.ui.listeners.TitleProvider;
import com.mikepenz.octicons_typeface_library.Octicons;

import java.util.List;

import retrofit.RetrofitError;

/**
 * Created by a557114 on 29/07/2015.
 */
public class RepoReleasesFragment extends PaginatedListFragment<List<Release>, ReleasesAdapter>
        implements TitleProvider, PermissionsManager {

    private static final String REPO_INFO = "REPO_INFO";
    private static final String REPO_PERMISSIONS = "REPO_PERMISSIONS";

    private RepoInfo repoInfo;
    private Permissions permissions;

    public static RepoReleasesFragment newInstance(RepoInfo info, Permissions permissions) {
        RepoReleasesFragment repoReleasesFragment = new RepoReleasesFragment();

        Bundle args = new Bundle();

        args.putParcelable(REPO_INFO, info);
        args.putParcelable(REPO_PERMISSIONS, permissions);

        repoReleasesFragment.setArguments(args);

        return repoReleasesFragment;
    }

    @Override
    protected void loadArguments() {
        repoInfo = getArguments().getParcelable(REPO_INFO);
        permissions = getArguments().getParcelable(REPO_PERMISSIONS);
    }

    @Override
    protected void executeRequest() {
        super.executeRequest();

        GetRepoReleasesClient client = new GetRepoReleasesClient(getActivity(), repoInfo, 0);
        client.setOnResultCallback(this);
        client.execute();
    }

    @Override
    protected void executePaginatedRequest(int page) {
        super.executePaginatedRequest(page);

        GetRepoReleasesClient client = new GetRepoReleasesClient(getActivity(), repoInfo, page);
{'fraction_non_alphanumeric': 0.08996383363471971, 'fraction_numerical': 0.007007233273056058, 'mean_word_length': 4.357142857142857, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4157554', 'n_tokens_mistral': 1344, 'n_tokens_neox': 1300, 'n_words': 236}