<commit_before>package com.pdumanager.slawek.pdumanager.arrayAdapters;

import android.content.Context;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;

import com.pdumanager.slawek.pdumanager.Constants;
import com.pdumanager.slawek.pdumanager.R;
import com.pdumanager.slawek.pdumanager.fragments.OutletsActivity;
import com.pdumanager.slawek.pdumanager.model.Device;
import com.pdumanager.slawek.pdumanager.model.Outlet;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.conn.ConnectTimeoutException;
import org.apache.http.conn.HttpHostConnectException;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;

/**
 * Created by slawek on 24.08.16.
 */
public class OutletArrayAdapter extends ArrayAdapter<Outlet> {
    private final LayoutInflater mInflater;
    private final int mResource;
    private final String ipNumber;
    private final String user;
    private final ProgressBar bar;
    public OutletArrayAdapter(Context context, int resource, String ip, String user, View view) {
        super(context, R.layout.outlet_on_list);
        mResource = resource;
        mInflater = LayoutInflater.from(context);
        ipNumber = ip;
        this.user = user;
        this.bar = ((ProgressBar) view.findViewById(R.id.progressBar));
    }

    public void setOutlets(Outlet[] outlets, String user){
        this.user = user;
        clear();
         for(Outlet outlet : outlets){<commit_msg>small bug in outlets array adapters with set user<commit_after>package com.pdumanager.slawek.pdumanager.arrayAdapters;

import android.content.Context;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;

import com.pdumanager.slawek.pdumanager.Constants;
import com.pdumanager.slawek.pdumanager.R;
import com.pdumanager.slawek.pdumanager.fragments.OutletsActivity;
import com.pdumanager.slawek.pdumanager.model.Device;
import com.pdumanager.slawek.pdumanager.model.Outlet;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.conn.ConnectTimeoutException;
import org.apache.http.conn.HttpHostConnectException;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;

/**
 * Created by slawek on 24.08.16.
 */
public class OutletArrayAdapter extends ArrayAdapter<Outlet> {
    private final LayoutInflater mInflater;
    private final int mResource;
    private final String ipNumber;
    private final String user;
    private final ProgressBar bar;
    public OutletArrayAdapter(Context context, int resource, String ip, String user, View view) {
        super(context, R.layout.outlet_on_list);
        mResource = resource;
        mInflater = LayoutInflater.from(context);
        ipNumber = ip;
        this.user = user;
        this.bar = ((ProgressBar) view.findViewById(R.id.progressBar));
    }

    public void setOutlets(Outlet[] outlets){
        clear();
         for(Outlet outlet : outlets){
{'fraction_non_alphanumeric': 0.09736564805057955, 'fraction_numerical': 0.0029504741833508955, 'mean_word_length': 4.910336239103362, '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': '5836950', 'n_tokens_mistral': 1449, 'n_tokens_neox': 1402, 'n_words': 295}