<commit_before>package org.stepic.droid.ui.util

import android.support.v7.widget.*
import android.util.DisplayMetrics
import android.view.View

class CoursesSnapHelper(private val rowCount: Int) : SnapHelper() {

    companion object {
        private val MAX_DURATION_OF_SCROLL = 100
        private val MILLISECONDS_PER_INCH = 100f
    }

    private var horizontalHelper: OrientationHelper? = null
    private var recyclerView: RecyclerView? = null

    override fun attachToRecyclerView(recyclerView: RecyclerView?) {
        super.attachToRecyclerView(recyclerView)
        this.recyclerView = recyclerView
    }

    override fun calculateDistanceToFinalSnap(layoutManager: RecyclerView.LayoutManager, targetView: View): IntArray {
        val out = IntArray(2)
        out[0] = distanceToStart(targetView, getHorizontalHelper(layoutManager))
        out[1] = 0
        return out
    }


    private fun distanceToStart(targetView: View, helper: OrientationHelper): Int =<commit_msg>add const keyword for consts in CoursesSnapHelper<commit_after>package org.stepic.droid.ui.util

import android.support.v7.widget.*
import android.util.DisplayMetrics
import android.view.View

class CoursesSnapHelper(private val rowCount: Int) : SnapHelper() {

    companion object {
        private const val MAX_DURATION_OF_SCROLL = 100
        private const val MILLISECONDS_PER_INCH = 100f
    }

    private var horizontalHelper: OrientationHelper? = null
    private var recyclerView: RecyclerView? = null

    override fun attachToRecyclerView(recyclerView: RecyclerView?) {
        super.attachToRecyclerView(recyclerView)
        this.recyclerView = recyclerView
    }

    override fun calculateDistanceToFinalSnap(layoutManager: RecyclerView.LayoutManager, targetView: View): IntArray {
        val out = IntArray(2)
        out[0] = distanceToStart(targetView, getHorizontalHelper(layoutManager))
        out[1] = 0
        return out
    }


    private fun distanceToStart(targetView: View, helper: OrientationHelper): Int =
{'fraction_non_alphanumeric': 0.0729064039408867, 'fraction_numerical': 0.01083743842364532, 'mean_word_length': 3.870503597122302, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7248859', 'n_tokens_mistral': 624, 'n_tokens_neox': 583, 'n_words': 138}