<commit_before><?php

namespace Geek\PartyBundle\Controller;

use Doctrine\ORM\EntityManager;
use Geek\PartyBundle\Entity\Party;
use Geek\PartyBundle\Entity\PartyTheme;
use Geek\PartyBundle\Entity\PartyThemeVote;
use Geek\PartyBundle\Entity\Repository\PartyThemeRepository;
use Symfony\Component\HttpFoundation\Request;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

/**
 * Party themes adding & voting
 * @Route("/party")
 */
class PartyThemeController extends Base\BaseController
{
    /**
     * Displays a form to create a new Work entity.
     *
     * @Route("/{id}", name="themes_index", defaults={"id" = null})
     * @Template()
     * @param null $id
     * @return array|\Symfony\Component\HttpFoundation\RedirectResponse
     * @internal param Request $request
     */
    public function indexAction($id = null)
    {
        $party = $id === null ?
            $this->getCurrentParty() :
            $this->getDoctrine()->getManager()->find('GeekPartyBundle:Party', $id);

        if (!$party) {
            return $this->redirectToIndex();
        }

        /** @var PartyThemeRepository $partyThemeRepo */
        $partyThemeRepo = $this->getDoctrine()
            ->getManager()
            ->getRepository('GeekPartyBundle:PartyTheme');
<commit_msg>Party theme routing fix<commit_after><?php

namespace Geek\PartyBundle\Controller;

use Doctrine\ORM\EntityManager;
use Geek\PartyBundle\Entity\Party;
use Geek\PartyBundle\Entity\PartyTheme;
use Geek\PartyBundle\Entity\PartyThemeVote;
use Geek\PartyBundle\Entity\Repository\PartyThemeRepository;
use Symfony\Component\HttpFoundation\Request;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

/**
 * Party themes adding & voting
 * @Route("/party")
 */
class PartyThemeController extends Base\BaseController
{
    /**
     * Displays a form to create a new Work entity.
     *
     * @Route("/{id}", name="themes_index", defaults={"id" = null})
     * @Method("GET")
     * @Template()
     * @param null $id
     * @return array|\Symfony\Component\HttpFoundation\RedirectResponse
     */
    public function indexAction($id = null)
    {
        $party = $id === null ?
            $this->getCurrentParty() :
            $this->getDoctrine()->getManager()->find('GeekPartyBundle:Party', $id);

        if (!$party) {
            return $this->redirectToIndex();
        }

        /** @var PartyThemeRepository $partyThemeRepo */
        $partyThemeRepo = $this->getDoctrine()
            ->getManager()
            ->getRepository('GeekPartyBundle:PartyTheme');

{'fraction_non_alphanumeric': 0.13159771754636235, 'fraction_numerical': 0.0, 'mean_word_length': 3.445324881141046, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '370290', 'n_tokens_mistral': 819, 'n_tokens_neox': 790, 'n_words': 148}