def FinishFile(self):
    if self._file_fix_count:
      # Get the original file content for html.
      if self._file_is_html:
        f = open(self._file_name, 'r')
        original_lines = f.readlines()
        f.close()

      f = self._external_file
      if not f:
        error_noun = 'error' if self._file_fix_count == 1 else 'errors'
        print 'Fixed %d %s in %s' % (
            self._file_fix_count, error_noun, self._file_name)
        f = open(self._file_name, 'w')

      token = self._file_token
      # Finding the first not deleted token.
      while token.is_deleted:
        token = token.next
      # If something got inserted before first token (e.g. due to sorting)
      # then move to start. Bug 8398202.
      while token.previous:
        token = token.previous
      char_count = 0
      line = ''
      while token:
        line += token.string
        char_count += len(token.string)

        if token.IsLastInLine():
          # We distinguish if a blank line in html was from stripped original
          # file or newly added error fix by looking at the "org_line_number"
          # field on the token. It is only set in the tokenizer, so for all
          # error fixes, the value should be None.
          if (line or not self._file_is_html or
              token.orig_line_number is None):
            f.write(line)
            f.write('\n')
          else:
            f.write(original_lines[token.orig_line_number - 1])
          line = ''
          if char_count > 80 and token.line_number in self._file_changed_lines:
            print 'WARNING: Line %d of %s is now longer than 80 characters.' % (
                token.line_number, self._file_name)

          char_count = 0

        token = token.next

      if not self._external_file:
        # Close the file if we created it
        f.close()
Called when the current file has finished style checking.
dataset/ETHPy150Open google/closure-linter/closure_linter/error_fixer.py/ErrorFixer.FinishFile