<commit_before>/* Copyright 2009-2018 EPFL, Lausanne */

package stainless
package extraction
package methods

import scala.language.existentials

trait Sealing extends oo.CachingPhase
  with IdentitySorts
  with MutabilityAnalyzer { self =>


  /* ====================================
   *       Context and caches setup
   * ==================================== */

  import s._
  import s.exprOps._

  protected class TransformerContext(implicit symbols: Symbols) extends MutabilityAnalysis()(symbols) {
    def mustDuplicate(fd: FunDef): Boolean = {
      !fd.isAbstract &&
      !fd.isFinal &&
      !fd.isAccessor &&
      !fd.isField &&
      !fd.isInvariant &&
      fd.flags.exists {
        case IsMethodOf(cid) => !symbols.classes(cid).isSealed
        case _ => false
      }
    }
<commit_msg>Replace classes with getClass<commit_after>/* Copyright 2009-2018 EPFL, Lausanne */

package stainless
package extraction
package methods

import scala.language.existentials

trait Sealing extends oo.CachingPhase
  with IdentitySorts
  with MutabilityAnalyzer { self =>


  /* ====================================
   *       Context and caches setup
   * ==================================== */

  import s._
  import s.exprOps._

  protected class TransformerContext(implicit symbols: Symbols) extends MutabilityAnalysis()(symbols) {
    def mustDuplicate(fd: FunDef): Boolean = {
      !fd.isAbstract &&
      !fd.isFinal &&
      !fd.isAccessor &&
      !fd.isField &&
      !fd.isInvariant &&
      fd.flags.exists {
        case IsMethodOf(cid) => !symbols.getClass(cid).isSealed
        case _ => false
      }
    }

{'fraction_non_alphanumeric': 0.17925107427869857, 'fraction_numerical': 0.009821976672805401, 'mean_word_length': 3.2010309278350517, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '936215', 'n_tokens_mistral': 487, 'n_tokens_neox': 463, 'n_words': 107}