<commit_before><?php

class SessionController extends ControllerBase
{
    /**
     * Index action
     */
    public function indexAction()
    {

    }

    public function successAction()
    {

    }

    public function loginAction()
    {

        $username = $this->request->getPost('username');
        $password = $this->request->getPost('password');

        $user = Users::findFirstByUsername($username);
        if ($user) {
            if ($this->security->checkToken() && $this->security->checkHash($password, $user->password)) {
                $this->session->set('auth-identity', array(
                    'id' => $user->id,
                    'username' => $user->username
                    ));
                return $this->dispatcher->forward(array(
                    "controller" => "session",
                    "action" => "success"
                    ));
            } else {
                return $this->dispatcher->forward(array(
                    "controller" => "session",
                    "action" => "failed"
                    ));
            }
        } else {
            return $this->dispatcher->forward(array(
                "controller" => "session",
                "action" => "not-found"
                ));
        }

    }

    public function logoutAction()
    {
        $this->session->remove('auth-identity');
        return $this->dispatcher->forward(array(
            "controller" => "session",
            "action" => "index"
            ));
    }

}<commit_msg>fix missing route<commit_after><?php

class SessionController extends ControllerBase
{
    /**
     * Index action
     */
    public function indexAction()
    {

    }

    public function successAction()
    {

    }

    public function loginAction()
    {

        $username = $this->request->getPost('username');
        $password = $this->request->getPost('password');

        $user = Users::findFirstByUsername($username);
        if ($user) {
            if ($this->security->checkToken() && $this->security->checkHash($password, $user->password)) {
                $this->session->set('auth-identity', array(
                    'id' => $user->id,
                    'username' => $user->username
                    ));
                return $this->dispatcher->forward(array(
                    "controller" => "session",
                    "action" => "success"
                    ));
            } else {
                return $this->dispatcher->forward(array(
                    "controller" => "session",
                    "action" => "failed"
                    ));
            }
        } else {
            return $this->dispatcher->forward(array(
                "controller" => "session",
                "action" => "notfound"
                ));
        }

    }

    public function logoutAction()
    {
        $this->session->remove('auth-identity');
        return $this->dispatcher->forward(array(
            "controller" => "session",
            "action" => "index"
            ));
    }

    public function notfoundAction()
    {
        return $this->dispatcher->forward(array(
            "controller" => "session",
            "action" => "index"
            ));
    }

}
{'fraction_non_alphanumeric': 0.14853620955315872, 'fraction_numerical': 0.0, 'mean_word_length': 1.4424379232505644, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 73, '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': '6798910', 'n_tokens_mistral': 837, 'n_tokens_neox': 792, 'n_words': 139}