original_string: protected function getCategorizedResults($post, $sourceSurveyData, $targetSurveyData) {
          $surveyCompare = $this->getSurveyCompare($sourceSurveyData, $targetSurveyData, $post);
  
          $categorizedResults = [];
          foreach (array_keys($this->questionStatusClasses) as $status) {
              $categorizedResults[$status] = [];
          }
  
          foreach ($surveyCompare as $result) {
              if (isset($result['status'])) {
                  if ($result['status'] == 'missing') {
                      $categorizedResults[$result['status']][$result['source']] = $result;
                  } else {
                      $categorizedResults[$result['status']][$result['target']] = $result;
                  }
              } else {
                  $categorizedResults['other'][] = $result;
              }
          }
          return $categorizedResults;
      }
code: protected function getCategorizedResults($post, $sourceSurveyData, $targetSurveyData) {
          $surveyCompare = $this->getSurveyCompare($sourceSurveyData, $targetSurveyData, $post);
  
          $categorizedResults = [];
          foreach (array_keys($this->questionStatusClasses) as $status) {
              $categorizedResults[$status] = [];
          }
  
          foreach ($surveyCompare as $result) {
              if (isset($result['status'])) {
                  if ($result['status'] == 'missing') {
                      $categorizedResults[$result['status']][$result['source']] = $result;
                  } else {
                      $categorizedResults[$result['status']][$result['target']] = $result;
                  }
              } else {
                  $categorizedResults['other'][] = $result;
              }
          }
          return $categorizedResults;
      }
code_tokens: protected function getCategorizedResults ( $ post , $ sourceSurveyData , $ targetSurveyData ) { $ surveyCompare = $ this -> getSurveyCompare ( $ sourceSurveyData , $ targetSurveyData , $ post ) ; $ categorizedResults = [ ] ; foreach ( array_keys ( $ this -> questionStatusClasses ) as $ status ) { $ categorizedResults [ $ status ] = [ ] ; } foreach ( $ surveyCompare as $ result ) { if ( isset ( $ result [ 'status' ] ) ) { if ( $ result [ 'status' ] == 'missing' ) { $ categorizedResults [ $ result [ 'status' ] ] [ $ result [ 'source' ] ] = $ result ; } else { $ categorizedResults [ $ result [ 'status' ] ] [ $ result [ 'target' ] ] = $ result ; } } else { $ categorizedResults [ 'other' ] [ ] = $ result ; } } return $ categorizedResults ; }
docstring: Function to get Survey compare results sorted by status
  
  @param $post Post request data
  @param $sourceSurveyData array with source survey data
  @param $targetSurveyData array with target survey data
  @return array compare results sorted by status
docstring_tokens: Function to get Survey compare results sorted by status