look for similarity index in the line

@param string $line line content
192263
private function findSimilarityIndex(string $line)
    {
        $matches = [];
        if (preg_match('/^similarity index (.*)\%$/', $line, $matches)) {
            $this->similarityIndex = $matches[1];
        }
    }
1280501
public function isLineNumberAffected($line)
    {
        // Added lines also affect the ones afterwards in conflict resolution,
        // because they are added in between.
        $bleed = ($this->type == self::ADDED ? 1 : 0);
        return ($line >= $this->start && $line <= $this->end + $bleed);
    }
1164329
private function getLinesNumbers(string $line)
    {
        $matches = [];
        preg_match('/@@ -(.*) \+(.*) @@?(.*)/', $line, $matches);
        if (!strpos($matches[1], ',')) {
            // one line
            $this->originStartLine = $matches[1];
            $this->originEndLine = $matches[1];
        } else {
            list($this->originStartLine, $this->originEndLine) = explode(',', $matches[1]);
        }

        if (!strpos($matches[2], ',')) {
            // one line
            $this->destStartLine = $matches[2];
            $this->destEndLine = $matches[2];
        } else {
            list($this->destStartLine, $this->destEndLine) = explode(',', $matches[2]);
        }
    }
132544
protected function parseTag($line)
    {
        $tagAndValue = preg_split('/\\s/', $line, 2);
        $tag = substr($tagAndValue[0], 1);
        if (count($tagAndValue) > 1) {
            $this->tags[$tag][] = trim($tagAndValue[1]);
        } else {
            $this->tags[$tag] = [];
        }
    }
482810
protected function isEmptyLine(string $line): bool
    {
        $char = \mb_substr($line, 0, 1);

        return empty($line) || $char === '#' || $char === ';';
    }
1325713
protected function findTableChars($line)
    {
        $lineChar = $line[0];
        $spaceChar = null;

        for ($i=0; $i<strlen($line); $i++) {
            if ($line[$i] != $lineChar) {
                if ($spaceChar == null) {
                    $spaceChar = $line[$i];
                } else {
                    if ($line[$i] != $spaceChar) {
                        return false;
                    }
                }
            }
        }

        return array($lineChar, $spaceChar);
    }
1267315
function line($line = '')
	{
		$value = ($line == '' OR ! isset($this->language[$line])) ? FALSE : $this->language[$line];

		// Because killer robots like unicorns!
		if ($value === FALSE)
		{
			log_message('error', 'Could not find the language line "'.$line.'"');
		}

		return $value;
	}
215139
protected function parse_line($line) {
        $data = array();
        foreach ($line as $keynum => $value) {
            if (!isset($this->columns[$keynum])) {
                // This should not happen.
                continue;
            }

            $key = $this->columns[$keynum];
            $data[$key] = $value;
        }
        return $data;
    }
379055
protected function extractElements($line)
    {
        $elements = [];
        $buffer   = '';
        $quote    = false;

        foreach (\str_split($line) as $character)
        {
            if (\in_array($character, ['\'', '"']))
            {
                $quote = ! $quote;

                continue;
            }

            if ((':' == $character) and ! $quote)
            {
                $elements[] = $buffer;

                $buffer = '';

                continue;
            }

            $buffer .= $character;
        }

        if ($buffer)
        {
            $elements[] = $buffer;
        }

        return $elements;
    }
1123459
private function indentationModeSwitch(string $line): int
  {
    $mode = 0;

    if (substr($line, 0, 5)=='case ')
    {
      $mode |= self::C_INDENT_INCREMENT_AFTER;
    }

    if (substr($line, 0, 8)=='default:')
    {
      $this->defaultLevel[] = 0;

      $mode |= self::C_INDENT_INCREMENT_AFTER;
    }

    if (substr($line, 0, 6)=='break;')
    {
      $mode |= self::C_INDENT_DECREMENT_AFTER;
    }

    return $mode;
  }
991054
protected function parseLine($line)
    {
        if (preg_match(self::TEST_DIAGNOSTIC, $line) || preg_match(self::TEST_COVERAGE, $line) || !$line) {
            return;
        }

        if (preg_match(self::TEST_COUNTS_PATTERN, $line, $matches)) {
            $this->testCount = intval($matches[1]);

            return;
        }

        if ($this->testDepends($line)) {
            return;
        }

        if ($this->testLine($line)) {
            return;
        }

        if ($this->yamlLine($line)) {
            return;
        }

        throw new Exception(sprintf('Incorrect TAP data, line %d: %s', $this->lineNumber, $line));
    }
650263
private function interpretApacheInfoVariable(string $line)
    {
        $content = preg_split('/^\\s+-D\\s+/', $line, 2);
        if (count($content) === 2) {
            $parts = preg_split('/=/', $content[1], 2);
            if (count($parts) === 2) {
                $this->apache_compiles[$parts[0]] = str_replace('"', '', $parts[1]);
            } elseif (count($parts) === 1) {
                $this->apache_compiles[$content[1]] = true;
            }
        }
    }
570447
protected function parseHtmlLine( Line$line ):self
	{
		return $this->openNode(new StringNode($this,$line))->appendLine($line->slice(1));
	}
112733
private static function setLineIfPrevious(&$line)
    {
        static $previousLine = '';

        if ($previousLine) {
            $line = $previousLine.' '.trim($line);
            $previousLine = '';
        }

        if (preg_match('/(.+)\\\$/', $line, $container)) {
            $previousLine = $container[1];
        }

        return $previousLine;
    }
1346837
protected function parseTagLine( Line$line ):self
	{
		$node= new TagNode($this,$line);

		$this->appendLine($node->open());

		$node->embed and $this->startEmbedding($node->embed);

		return $this->openNode($node);
	}
1371832
protected function getPaddingString($line)
    {
        $length = $this->util->system->width() - $this->lengthWithoutTags($line);

        return str_repeat(' ', $length);
    }
1123452
protected function isSpecialLine($line)
    {
        if (strlen($line) < 3) {
            return false;
        }

        $letter = $line[0];

        $environment = $this->environment;
        if (!in_array($letter, $environment::$letters)) {
            return false;
        }

        for ($i=1; $i<strlen($line); $i++) {
            if ($line[$i] != $letter) {
                return false;
            }
        }

        return $letter;
    }