final PsiExpression iteratedValue = foreachStatement.getIteratedValue();
if (body != null && iteratedValue != null) {
final PsiParameter parameter = foreachStatement.getIterationParameter();
TerminalBlock tb = TerminalBlock.from(parameter, body);
if (!FileModificationService.getInstance().preparePsiElementForWrite(foreachStatement)) return;
<BUG>migrate(project, descriptor, foreachStatement, iteratedValue, body, tb);

}</BUG>
}
<BUG>}
abstract void migrate(@NotNull Project project,
</BUG>
@NotNull ProblemDescriptor descriptor,

final PsiExpression iteratedValue = foreachStatement.getIteratedValue();
if (body != null && iteratedValue != null) {
final PsiParameter parameter = foreachStatement.getIterationParameter();
TerminalBlock tb = TerminalBlock.from(parameter, body);
if (!FileModificationService.getInstance().preparePsiElementForWrite(foreachStatement)) return;
PsiElement result = migrate(project, descriptor, foreachStatement, iteratedValue, body, tb);
if(result != null) {
simplifyAndFormat(project, result);
}
}
}
}
abstract PsiElement migrate(@NotNull Project project,
@NotNull ProblemDescriptor descriptor,
