boolean (PsiMethod method) { List<? extends MethodContract> contracts = JavaMethodContractUtil.getMethodCallContracts(method, null); if (contracts.size() == 1) { MethodContract contract = contracts.get(0); return contract.isTrivial() && contract.getReturnValue().equals(ContractReturnValue.returnNew()); } return contracts.isEmpty(); }