original_string: protected function choose_hits(array $response) {
          $allhits = $this->get_all_hits($response);
          $chosenhits = array();
          foreach ($allhits as $placeno => $hits) {
              foreach ($hits as $itemno => $hit) {
                  $choice = $this->get_right_choice_for($placeno);
                  $choiceitem = "$choice $itemno";
                  if (!in_array($choiceitem, $chosenhits)) {
                      $chosenhits[$placeno] = $choiceitem;
                      break;
                  }
              }
          }
          return $chosenhits;
      }
code: protected function choose_hits(array $response) {
          $allhits = $this->get_all_hits($response);
          $chosenhits = array();
          foreach ($allhits as $placeno => $hits) {
              foreach ($hits as $itemno => $hit) {
                  $choice = $this->get_right_choice_for($placeno);
                  $choiceitem = "$choice $itemno";
                  if (!in_array($choiceitem, $chosenhits)) {
                      $chosenhits[$placeno] = $choiceitem;
                      break;
                  }
              }
          }
          return $chosenhits;
      }
code_tokens: protected function choose_hits ( array $ response ) { $ allhits = $ this -> get_all_hits ( $ response ) ; $ chosenhits = array ( ) ; foreach ( $ allhits as $ placeno => $ hits ) { foreach ( $ hits as $ itemno => $ hit ) { $ choice = $ this -> get_right_choice_for ( $ placeno ) ; $ choiceitem = "$choice $itemno" ; if ( ! in_array ( $ choiceitem , $ chosenhits ) ) { $ chosenhits [ $ placeno ] = $ choiceitem ; break ; } } } return $ chosenhits ; }
docstring: Choose hits to maximize grade where drop targets may have more than one hit and drop targets
  can overlap.
  @param array $response
  @return array chosen hits
docstring_tokens: Choose hits to maximize grade where drop targets may have more than one hit and drop targets can overlap .