original_string: public function findAverageNote(Thread $thread)
      {
          return $this->repository->createQueryBuilder('c')
              ->select('avg(c.note)')
              ->where('c.private <> :private')
              ->andWhere('c.thread = :thread')
              ->setParameters([
                  'private' => 1,
                  'thread' => $thread,
              ])
              ->getQuery()
              ->getSingleScalarResult();
      }
code: public function findAverageNote(Thread $thread)
      {
          return $this->repository->createQueryBuilder('c')
              ->select('avg(c.note)')
              ->where('c.private <> :private')
              ->andWhere('c.thread = :thread')
              ->setParameters([
                  'private' => 1,
                  'thread' => $thread,
              ])
              ->getQuery()
              ->getSingleScalarResult();
      }
code_tokens: public function findAverageNote ( Thread $ thread ) { return $ this -> repository -> createQueryBuilder ( 'c' ) -> select ( 'avg(c.note)' ) -> where ( 'c.private <> :private' ) -> andWhere ( 'c.thread = :thread' ) -> setParameters ( [ 'private' => 1 , 'thread' => $ thread , ] ) -> getQuery ( ) -> getSingleScalarResult ( ) ; }
docstring: Returns Thread average note.
  
  @param Thread $thread
  
  @return float
docstring_tokens: Returns Thread average note .