<commit_before>package cc.rainwave.android.views;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.CornerPathEffect;
import android.graphics.LinearGradient;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.graphics.Shader;
import android.util.AttributeSet;
import android.view.View;

public class PagerWidget extends View {
	
	private static final String androidns = "http://schemas.android.com/apk/res/android";
	
	private int mCount = 2;
	
	private int mCurrent = 0;
	
	public PagerWidget(Context context, AttributeSet attrs) {
		super(context, attrs);
		setCount( attrs.getAttributeResourceValue(androidns, "max", mCount) );
		setCurrent( attrs.getAttributeResourceValue(androidns, "value", mCurrent) );
	}
	
	public int getCurrent() {
		return mCurrent;
	}
	
	public int getCount() {
		return mCount;
	}
	
	public void setCurrent(int current) {
		mCurrent = Math.max(0, Math.min(current, mCount-1));
	}
	
	public void setCount(int count) {
		mCount = Math.max(1, count);
	}
	
	public void onDraw(Canvas canvas) {
		Paint p = new Paint();
		p.setAntiAlias(true);
		int h = getHeight();
		int w = getWidth();
		float barWidth = (w - (getCount() - 1) * DEFAULT_SPACE) / getCount();
		
	}
	
	public static final int
		COLOR_DEFAULT = 0xCCFFFFFF,
		COLOR_HILIGHT = 0xFF00BB00;
	
	public static final float
		DEFAULT_SPACE = 5.0f;
}<commit_msg>finished up paint method<commit_after>package cc.rainwave.android.views;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.CornerPathEffect;
import android.graphics.LinearGradient;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.graphics.Shader;
import android.util.AttributeSet;
import android.view.View;

public class PagerWidget extends View {
	
	private static final String androidns = "http://schemas.android.com/apk/res/android";
	
	private int mCount = 2;
	
	private int mCurrent = 0;
	
	public PagerWidget(Context context, AttributeSet attrs) {
		super(context, attrs);
		setCount( attrs.getAttributeResourceValue(androidns, "max", mCount) );
		setCurrent( attrs.getAttributeResourceValue(androidns, "value", mCurrent) );
	}
	
	public int getCurrent() {
		return mCurrent;
	}
	
	public int getCount() {
		return mCount;
	}
	
	public void setCurrent(int current) {
		mCurrent = Math.max(0, Math.min(current, mCount-1));
	}
	
	public void setCount(int count) {
		mCount = Math.max(1, count);
	}
	
	public void onDraw(Canvas canvas) {
		Paint p = new Paint();
		p.setAntiAlias(true);
		int h = getHeight();
		int w = getWidth();
		float barWidth = (w - (getCount() - 1) * DEFAULT_SPACE) / getCount();
		
		for(int i = 0; i < getCount(); i++) {
			float x = i * (barWidth + DEFAULT_SPACE);
			p.setColor((getCount() == i) ? COLOR_HILIGHT : COLOR_DEFAULT);
			canvas.drawRect(x, 0, x+barWidth, h, p);
		}
	}
	
	public static final int
		COLOR_DEFAULT = 0xCCFFFFFF,
		COLOR_HILIGHT = 0xFF00BB00;
	
	public static final float
		DEFAULT_SPACE = 5.0f;
}
{'fraction_non_alphanumeric': 0.11642078255291853, 'fraction_numerical': 0.009621552277100705, 'mean_word_length': 4.386873920552677, 'pattern_counts': {'":': 0, '<': 4, '<?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': '1207470', 'n_tokens_mistral': 1101, 'n_tokens_neox': 999, 'n_words': 257}