<commit_before>package com.example.john.project1;

import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Intent;
import android.graphics.Color;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.animation.AnimationSet;
import android.view.animation.LinearInterpolator;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;

public class Chap1 extends AppCompatActivity {
    //Creating objects.
    Intent intent;
    ImageView imgPointer,pic_class,output;
    ImageButton playbtn,stopbtn;
    ScrollView sv_code;
    LinearLayout layout_code;
    TextView textnum1,textnum2,textResult,textsign,textReturn,text_class,
            text_object,text_construct1,text_construct2,text_result_des;
    int a;
    //Declaring variables.
    Boolean checkControl = true,checkControlGo=true; //Logically variable for controlling.
    int timeThread=5; //Time for delaying pointer's moving.
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_chap1);

        //Selecting view by use findviewById
        imgPointer = (ImageView)findViewById(R.id.pointer);
        playbtn = (ImageButton)findViewById(R.id.playbtn);
        stopbtn = (ImageButton)findViewById(R.id.stopbtn);
        sv_code =(ScrollView)findViewById(R.id.sv_code);
        layout_code=(LinearLayout)findViewById(R.id.layout_code);
        pic_class =(ImageView)findViewById(R.id.pic_class);
        textnum1 =(TextView) findViewById(R.id.text_num1);
        textnum2 =(TextView) findViewById(R.id.text_num2);
        textResult=(TextView)findViewById(R.id.text_result);
        textsign = (TextView)findViewById(R.id.text_sign);
        textReturn = (TextView)findViewById(R.id.textReturn);
        output = (ImageView)findViewById(R.id.output);
        text_class =(TextView)findViewById(R.id.text_class);
        text_object = (TextView)findViewById(R.id.text_object);
        text_construct1 =(TextView)findViewById(R.id.text_construct1);
        text_construct2 = (TextView)findViewById(R.id.text_construct2);
        text_result_des = (TextView) findViewById(R.id.text_result_des);

        //Fixing scroll on the top
        sv_code.scrollTo(0,0);

        //Using method onClickListener for event handler on play button.
        playbtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //Calling method 'startPointer()'.
                /*output.setVisibility(View.VISIBLE);
                movingtoOutput();*/
                //Show message notified user
                Toast.makeText(Chap1.this, "Start!", Toast.LENGTH_SHORT).show();
               testPointerLine1();
            }
        });
        //Using method onClickListener for event handler on stop button.
        stopbtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //Calling method 'stopPlaying()'
                stopPlaying();
            }
        });
     }

    //play function
    private void testPointerLine1()
    {
        //Scroll to line1
        ObjectAnimator objline1 = ObjectAnimator.ofFloat(imgPointer,View.TRANSLATION_Y,0);<commit_msg>15/9/2016 10.44 AM<commit_after>package com.example.john.project1;

import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Intent;
import android.graphics.Color;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.animation.AnimationSet;
import android.view.animation.LinearInterpolator;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;

public class Chap1 extends AppCompatActivity {
    //Creating objects.
    Intent intent;
    ImageView imgPointer,pic_class,output;
    ImageButton playbtn,stopbtn;
    ScrollView sv_code;
    LinearLayout layout_code;
    TextView textnum1,textnum2,textResult,textsign,textReturn,text_class,
            text_object,text_construct1,text_construct2,text_result_des;
    int a;
    //Declaring variables.
    Boolean checkControl = true,checkControlGo=true; //Logically variable for controlling.
    int timeThread=5; //Time for delaying pointer's moving.
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_chap1);

        //Selecting view by use findviewById
        imgPointer = (ImageView)findViewById(R.id.pointer);
        playbtn = (ImageButton)findViewById(R.id.playbtn);
        stopbtn = (ImageButton)findViewById(R.id.stopbtn);
        sv_code =(ScrollView)findViewById(R.id.sv_code);
        layout_code=(LinearLayout)findViewById(R.id.layout_code);
        pic_class =(ImageView)findViewById(R.id.pic_class);
        textnum1 =(TextView) findViewById(R.id.text_num1);
        textnum2 =(TextView) findViewById(R.id.text_num2);
        textResult=(TextView)findViewById(R.id.text_result);
        textsign = (TextView)findViewById(R.id.text_sign);
        textReturn = (TextView)findViewById(R.id.textReturn);
        output = (ImageView)findViewById(R.id.output);
        text_class =(TextView)findViewById(R.id.text_class);
        text_object = (TextView)findViewById(R.id.text_object);
        text_construct1 =(TextView)findViewById(R.id.text_construct1);
        text_construct2 = (TextView)findViewById(R.id.text_construct2);
        text_result_des = (TextView) findViewById(R.id.text_result_des);

        //Fixing scroll on the top
        sv_code.scrollTo(0,0);

        //Using method onClickListener for event handler on play button.
        playbtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //Calling method 'startPointer()'.
                /*output.setVisibility(View.VISIBLE);
                movingtoOutput();*/
                //Show message notified user

               testPointerLine1();
            }
        });
        //Using method onClickListener for event handler on stop button.
        stopbtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //Calling method 'stopPlaying()'
                stopPlaying();
            }
        });
     }

    //play function
    private void testPointerLine1()
    {
        Toast.makeText(Chap1.this, "Start!", Toast.LENGTH_SHORT).show();
        //Scroll to line1
        ObjectAnimator objline1 = ObjectAnimator.ofFloat(imgPointer,View.TRANSLATION_Y,0);
{'fraction_non_alphanumeric': 0.099889165973954, 'fraction_numerical': 0.008451094486007204, 'mean_word_length': 3.175245806824754, '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': '975704', 'n_tokens_mistral': 2070, 'n_tokens_neox': 1950, 'n_words': 379}