<commit_before>package com.lyft.cityguide.ui.adapters;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.daimajia.androidanimations.library.Techniques;
import com.daimajia.androidanimations.library.YoYo;
import com.lyft.cityguide.R;
import com.lyft.cityguide.models.structs.PlaceType;
import com.lyft.cityguide.models.structs.PointOfInterest;
import com.lyft.cityguide.ui.components.StarBar;

import java.util.List;

import butterknife.ButterKnife;

/**
 * @class ResultAdapter
 * @brief
 */
public class ResultAdapter extends BaseAdapter<PointOfInterest> {

    private PlaceType _currentType;

    public ResultAdapter(List<PointOfInterest> items, Context context, PlaceType type) {
        super(items, context);
        _currentType = type;
    }

    private void _setDistance(TextView field, double value) {
        String text;

        if (value < 1) {
            text = "0." + ((int) Math.floor(value * 100));
        } else {
            text = "1." + ((int) (Math.floor(value * 100) - Math.floor(value) * 100));
        }

        text += " mi";

        field.setText(text);
    }

    private int _getIcon() {
        switch (_currentType) {<commit_msg>Fixes result distance content<commit_after>package com.lyft.cityguide.ui.adapters;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.daimajia.androidanimations.library.Techniques;
import com.daimajia.androidanimations.library.YoYo;
import com.lyft.cityguide.R;
import com.lyft.cityguide.models.structs.PlaceType;
import com.lyft.cityguide.models.structs.PointOfInterest;
import com.lyft.cityguide.ui.components.StarBar;

import java.util.List;

import butterknife.ButterKnife;

/**
 * @class ResultAdapter
 * @brief
 */
public class ResultAdapter extends BaseAdapter<PointOfInterest> {

    private PlaceType _currentType;

    public ResultAdapter(List<PointOfInterest> items, Context context, PlaceType type) {
        super(items, context);
        _currentType = type;
    }

    private void _setDistance(TextView field, double value) {
        String text;

        if (value < 0.001) { // No value or too small
            field.setText("");
            return;
        }
        if (value < 1) {
            text = "0." + ((int) Math.floor(value * 100));
        } else {
            text = ((int) Math.floor(value)) + ".";
            text += ((int) (Math.floor(value * 100) - Math.floor(value) * 100));
        }

        text += " mi";

        field.setText(text);
    }

    private int _getIcon() {
        switch (_currentType) {
{'fraction_non_alphanumeric': 0.11839708561020036, 'fraction_numerical': 0.009836065573770493, 'mean_word_length': 3.1046337817638268, 'pattern_counts': {'":': 0, '<': 10, '<?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': '6100812', 'n_tokens_mistral': 888, 'n_tokens_neox': 823, 'n_words': 179}