ReturnValue (@NotNull ReturnValue left, @NotNull ReturnValue right) { EnumSet<Nullability> nullability = EnumSet.copyOf(left.myNullability); nullability.addAll(right.myNullability); String calledMethod; List<ExpressionRange> range; if (left.myCalledMethod == null) { calledMethod = right.myCalledMethod; range = right.myRanges; } else if (right.myCalledMethod == null) { calledMethod = left.myCalledMethod; range = left.myRanges; } else if (left.myCalledMethod.equals(right.myCalledMethod)) { calledMethod = left.myCalledMethod; range = ContainerUtil.concat(left.myRanges, right.myRanges); } else { calledMethod = ""; range = Collections.emptyList(); nullability.add(Nullability.UNKNOWN); } return new ReturnValue(nullability, calledMethod, range); }