<commit_before>package com.adriencadet.downthere.models.services.downthereserver.jobs;

import com.adriencadet.downthere.ApplicationConfiguration;
import com.adriencadet.downthere.models.bll.dto.TextFileBLLDTO;
import com.adriencadet.downthere.models.services.downthereserver.DownthereServerErrors;
import com.adriencadet.downthere.models.services.downthereserver.api.IDownthereServerAPI;
import com.annimon.stream.Collectors;
import com.annimon.stream.Stream;

import org.joda.time.DateTime;

import java.util.List;

import retrofit.RetrofitError;
import rx.Observable;
import rx.Subscriber;
import rx.schedulers.Schedulers;
import timber.log.Timber;

/**
 * ListTextFilesByDateDescJob
 * <p>
 */
public class ListTextFilesByDateDescJob {
    private Observable<List<TextFileBLLDTO>> observable;

    public ListTextFilesByDateDescJob(ApplicationConfiguration configuration, IDownthereServerAPI api) {
        observable = Observable
            .create(new Observable.OnSubscribe<List<TextFileBLLDTO>>() {
                @Override
                public void call(Subscriber<? super List<TextFileBLLDTO>> subscriber) {
                    try {
                        List<TextFileBLLDTO> list;

                        list = Stream
                            .of(api.listPicturesByDateDesc())
                            .map((a) -> {
                                return new TextFileBLLDTO()
                                    .setId(a.id)<commit_msg>Fixes wrong fetching<commit_after>package com.adriencadet.downthere.models.services.downthereserver.jobs;

import com.adriencadet.downthere.ApplicationConfiguration;
import com.adriencadet.downthere.models.bll.dto.TextFileBLLDTO;
import com.adriencadet.downthere.models.services.downthereserver.DownthereServerErrors;
import com.adriencadet.downthere.models.services.downthereserver.api.IDownthereServerAPI;
import com.annimon.stream.Collectors;
import com.annimon.stream.Stream;

import org.joda.time.DateTime;

import java.util.List;

import retrofit.RetrofitError;
import rx.Observable;
import rx.Subscriber;
import rx.schedulers.Schedulers;
import timber.log.Timber;

/**
 * ListTextFilesByDateDescJob
 * <p>
 */
public class ListTextFilesByDateDescJob {
    private Observable<List<TextFileBLLDTO>> observable;

    public ListTextFilesByDateDescJob(ApplicationConfiguration configuration, IDownthereServerAPI api) {
        observable = Observable
            .create(new Observable.OnSubscribe<List<TextFileBLLDTO>>() {
                @Override
                public void call(Subscriber<? super List<TextFileBLLDTO>> subscriber) {
                    try {
                        List<TextFileBLLDTO> list;

                        list = Stream
                            .of(api.listTextFilesByDateDesc())
                            .map((a) -> {
                                return new TextFileBLLDTO()
                                    .setId(a.id)
{'fraction_non_alphanumeric': 0.08594815825375171, 'fraction_numerical': 0.0, 'mean_word_length': 2.717363751584284, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4050680', 'n_tokens_mistral': 864, 'n_tokens_neox': 835, 'n_words': 127}