private static boolean mayChangeSemantics(boolean conditionHasSideEffects,
                                              boolean conditionVariablesCantBeChangedTransitively,
                                              List<? extends ExtractionUnit> headCommonParts) {
      if (headCommonParts.isEmpty()) return false;
      if (conditionHasSideEffects) return true;
      if (conditionVariablesCantBeChangedTransitively) {
        return ContainerUtil.or(headCommonParts, unit -> unit.mayInfluenceCondition() &&
                                                         !(unit.getThenStatement() instanceof PsiDeclarationStatement));
      }
      return ContainerUtil
        .or(headCommonParts, unit -> unit.haveSideEffects() && !(unit.getThenStatement() instanceof PsiDeclarationStatement));
    }
private static boolean mayChangeSemantics(boolean conditionHasSideEffects,
                                              boolean conditionVariablesCantBeChangedTransitively,
                                              List<? extends ExtractionUnit> headCommonParts)