((PsiFunctionalExpression)expressions[0]).getFunctionalInterfaceType() == null) {
callStatement =
(PsiExpressionStatement)callStatement.replace(elementFactory.createStatementFromText(
buffer.toString() + "(" + tb.getVariable().getText() + ") -> " + wrapInBlock(block) + ");", callStatement));
}
<BUG>simplifyAndFormat(project, callStatement);
}</BUG>
private static String wrapInBlock(PsiElement block) {
if (block instanceof PsiExpressionStatement) {
return ((PsiExpressionStatement)block).getExpression().getText();

((PsiFunctionalExpression)expressions[0]).getFunctionalInterfaceType() == null) {
callStatement =
(PsiExpressionStatement)callStatement.replace(elementFactory.createStatementFromText(
buffer.toString() + "(" + tb.getVariable().getText() + ") -> " + wrapInBlock(block) + ");", callStatement));
}
return callStatement;
}
private static String wrapInBlock(PsiElement block) {
if (block instanceof PsiExpressionStatement) {
return ((PsiExpressionStatement)block).getExpression().getText();
