original_string: private function processOutput()
      {
          foreach ($this->getOutput() as $outputLine) {
              if (strpos($outputLine, $this->TAG_CURRENT_URL) !== false) {
                  $this->currentUrl = str_replace(
                      $this->TAG_CURRENT_URL,
                      '',
                      $outputLine
                  );
              }
  
              if (strpos($outputLine, "Navigation requested: url=") !== false) {
                  $frag0 = explode('Navigation requested: url=', $outputLine);
                  $frag1 = explode(', type=', $frag0[1]);
                  $this->requestedUrls[] = $frag1[0];
              }
  
              if ($this->isDebug()) {
                  syslog(LOG_INFO, '[PHP-CASPERJS] ' . $outputLine);
              }
              if (strpos(
                  $outputLine,
                  $this->TAG_CURRENT_PAGE_CONTENT
              ) !== false
              ) {
                  $this->currentPageContent = str_replace(
                      $this->TAG_CURRENT_PAGE_CONTENT,
                      '',
                      $outputLine
                  );
              }
  
              if (strpos($outputLine, $this->TAG_CURRENT_HTML) !== false) {
                  $this->currentHtml = str_replace(
                      $this->TAG_CURRENT_HTML,
                      '',
                      $outputLine
                  );
              }
  
              if (strpos($outputLine, " steps in ") !== false) {
                  $frag = explode(' steps in ', $outputLine);
                  $this->loadTime = $frag[1];
              }
  
              if (0 === strpos($outputLine, $this->TAG_CURRENT_HEADERS)) {
                  $this->headers = json_decode(str_replace($this->TAG_CURRENT_HEADERS, '', $outputLine), true);
              }
  
              if (0 === strpos($outputLine, $this->TAG_CURRENT_STATUS)) {
                  $this->status = (int) str_replace($this->TAG_CURRENT_STATUS, '', $outputLine);
              }
  
              if (0 === strpos($outputLine, $this->TAG_CURRENT_STATUS_TEXT)) {
                  $this->statusText = trim(str_replace($this->TAG_CURRENT_STATUS_TEXT, '', $outputLine));
              }
  
              if (0 === strpos($outputLine, $this->TAG_CURRENT_COOKIES)) {
                  $this->cookies = json_decode(str_replace($this->TAG_CURRENT_COOKIES, '', $outputLine), true);
              }
          }
      }
code: private function processOutput()
      {
          foreach ($this->getOutput() as $outputLine) {
              if (strpos($outputLine, $this->TAG_CURRENT_URL) !== false) {
                  $this->currentUrl = str_replace(
                      $this->TAG_CURRENT_URL,
                      '',
                      $outputLine
                  );
              }
  
              if (strpos($outputLine, "Navigation requested: url=") !== false) {
                  $frag0 = explode('Navigation requested: url=', $outputLine);
                  $frag1 = explode(', type=', $frag0[1]);
                  $this->requestedUrls[] = $frag1[0];
              }
  
              if ($this->isDebug()) {
                  syslog(LOG_INFO, '[PHP-CASPERJS] ' . $outputLine);
              }
              if (strpos(
                  $outputLine,
                  $this->TAG_CURRENT_PAGE_CONTENT
              ) !== false
              ) {
                  $this->currentPageContent = str_replace(
                      $this->TAG_CURRENT_PAGE_CONTENT,
                      '',
                      $outputLine
                  );
              }
  
              if (strpos($outputLine, $this->TAG_CURRENT_HTML) !== false) {
                  $this->currentHtml = str_replace(
                      $this->TAG_CURRENT_HTML,
                      '',
                      $outputLine
                  );
              }
  
              if (strpos($outputLine, " steps in ") !== false) {
                  $frag = explode(' steps in ', $outputLine);
                  $this->loadTime = $frag[1];
              }
  
              if (0 === strpos($outputLine, $this->TAG_CURRENT_HEADERS)) {
                  $this->headers = json_decode(str_replace($this->TAG_CURRENT_HEADERS, '', $outputLine), true);
              }
  
              if (0 === strpos($outputLine, $this->TAG_CURRENT_STATUS)) {
                  $this->status = (int) str_replace($this->TAG_CURRENT_STATUS, '', $outputLine);
              }
  
              if (0 === strpos($outputLine, $this->TAG_CURRENT_STATUS_TEXT)) {
                  $this->statusText = trim(str_replace($this->TAG_CURRENT_STATUS_TEXT, '', $outputLine));
              }
  
              if (0 === strpos($outputLine, $this->TAG_CURRENT_COOKIES)) {
                  $this->cookies = json_decode(str_replace($this->TAG_CURRENT_COOKIES, '', $outputLine), true);
              }
          }
      }
code_tokens: private function processOutput ( ) { foreach ( $ this -> getOutput ( ) as $ outputLine ) { if ( strpos ( $ outputLine , $ this -> TAG_CURRENT_URL ) !== false ) { $ this -> currentUrl = str_replace ( $ this -> TAG_CURRENT_URL , '' , $ outputLine ) ; } if ( strpos ( $ outputLine , "Navigation requested: url=" ) !== false ) { $ frag0 = explode ( 'Navigation requested: url=' , $ outputLine ) ; $ frag1 = explode ( ', type=' , $ frag0 [ 1 ] ) ; $ this -> requestedUrls [ ] = $ frag1 [ 0 ] ; } if ( $ this -> isDebug ( ) ) { syslog ( LOG_INFO , '[PHP-CASPERJS] ' . $ outputLine ) ; } if ( strpos ( $ outputLine , $ this -> TAG_CURRENT_PAGE_CONTENT ) !== false ) { $ this -> currentPageContent = str_replace ( $ this -> TAG_CURRENT_PAGE_CONTENT , '' , $ outputLine ) ; } if ( strpos ( $ outputLine , $ this -> TAG_CURRENT_HTML ) !== false ) { $ this -> currentHtml = str_replace ( $ this -> TAG_CURRENT_HTML , '' , $ outputLine ) ; } if ( strpos ( $ outputLine , " steps in " ) !== false ) { $ frag = explode ( ' steps in ' , $ outputLine ) ; $ this -> loadTime = $ frag [ 1 ] ; } if ( 0 === strpos ( $ outputLine , $ this -> TAG_CURRENT_HEADERS ) ) { $ this -> headers = json_decode ( str_replace ( $ this -> TAG_CURRENT_HEADERS , '' , $ outputLine ) , true ) ; } if ( 0 === strpos ( $ outputLine , $ this -> TAG_CURRENT_STATUS ) ) { $ this -> status = ( int ) str_replace ( $ this -> TAG_CURRENT_STATUS , '' , $ outputLine ) ; } if ( 0 === strpos ( $ outputLine , $ this -> TAG_CURRENT_STATUS_TEXT ) ) { $ this -> statusText = trim ( str_replace ( $ this -> TAG_CURRENT_STATUS_TEXT , '' , $ outputLine ) ) ; } if ( 0 === strpos ( $ outputLine , $ this -> TAG_CURRENT_COOKIES ) ) { $ this -> cookies = json_decode ( str_replace ( $ this -> TAG_CURRENT_COOKIES , '' , $ outputLine ) , true ) ; } } }
docstring: process the output after navigation
  and fill the differents attributes for
  later usage
docstring_tokens: process the output after navigation and fill the differents attributes for later usage