private static boolean typeMigrationMightBeUseful(@NotNull PsiVariable variable, @NotNull PsiType targetType) {
    if (!PsiUtil.isJvmLocalVariable(variable)) return true;
    List<PsiReferenceExpression> refs = VariableAccessUtils.getVariableReferences(variable);
    if (refs.isEmpty()) return false;
    Project project = variable.getProject();
    TypeMigrationRules rules = new TypeMigrationRules(project);
    rules.setBoundScope(variable.getUseScope());
    TypeMigrationLabeler labeler = new TypeMigrationLabeler(rules, targetType, project);
    for (PsiReferenceExpression ref : refs) {
      labeler.getTypeEvaluator().setType(new TypeMigrationUsageInfo(ref), targetType);
      if (rules.findConversion(variable.getType(), targetType, null, ref, labeler) != null) {
        return true;
      }
    }
    return false;
  }
private static boolean typeMigrationMightBeUseful(@NotNull PsiVariable variable, @NotNull PsiType targetType)