original_string: protected function translateStudyId($oldStudyId)
      {
          $study = ScoolStudy::where('name',Study::findOrFail($oldStudyId)->name)->first();
          if ( $study != null ) {
              return $study->id;
          }
          throw new StudyNotFoundByNameException();
      }
code: protected function translateStudyId($oldStudyId)
      {
          $study = ScoolStudy::where('name',Study::findOrFail($oldStudyId)->name)->first();
          if ( $study != null ) {
              return $study->id;
          }
          throw new StudyNotFoundByNameException();
      }
code_tokens: protected function translateStudyId ( $ oldStudyId ) { $ study = ScoolStudy :: where ( 'name' , Study :: findOrFail ( $ oldStudyId ) -> name ) -> first ( ) ; if ( $ study != null ) { return $ study -> id ; } throw new StudyNotFoundByNameException ( ) ; }
docstring: Translate old ebre-escool study id to scool id.
  
  @param $oldStudyId
  @return mixed
  @throws StudyNotFoundByNameException
docstring_tokens: Translate old ebre - escool study id to scool id .