@Override
  PsiElement migrate(@NotNull Project project, @NotNull PsiElement body, @NotNull TerminalBlock tb) {
    PsiAssignmentExpression assignment = tb.getSingleExpression(PsiAssignmentExpression.class);
    if (assignment == null) return null;
    PsiVariable var = StreamApiMigrationInspection.extractSumAccumulator(assignment);
    if (var == null) return null;

    PsiExpression addend = StreamApiMigrationInspection.extractAddend(assignment);
    if (addend == null) return null;
    PsiType type = var.getType();
    if (!(type instanceof PsiPrimitiveType) || type.equals(PsiTypes.floatType())) return null;
    if (!type.equals(PsiTypes.doubleType()) && !type.equals(PsiTypes.longType())) {
      type = PsiTypes.intType();
    }
    PsiType addendType = addend.getType();
    CommentTracker ct = new CommentTracker();
    if(addendType != null && !TypeConversionUtil.isAssignable(type, addendType)) {
      addend = JavaPsiFacade.getElementFactory(project).createExpressionFromText(
        "(" + type.getCanonicalText() + ")" + ct.text(addend, ParenthesesUtils.TYPE_CAST_PRECEDENCE), addend);
    }
    String stream = tb.add(new MapOp(addend, tb.getVariable(), type)).generate(ct)+".sum()";
    return replaceWithOperation(tb.getStreamSourceStatement(), var, stream, type, SUM_OPERATION, ct);
  }
@Override
  PsiElement migrate(@NotNull Project project, @NotNull PsiElement body, @NotNull TerminalBlock tb)