public static boolean isVariableDefinitelyAssigned(final @NotNull PsiVariable variable, final @NotNull ControlFlow flow) {
    PsiElement parent = variable.getParent();
    final int variableDeclarationOffset = parent == null ? -1 : flow.getStartOffset(parent);
    int offset = variableDeclarationOffset > -1 ? variableDeclarationOffset : 0;
    boolean[] unassignedOffsets = getVariablePossiblyUnassignedOffsets(variable, flow);
    return !unassignedOffsets[offset];
  }
public static boolean isVariableDefinitelyAssigned(final @NotNull PsiVariable variable, final @NotNull ControlFlow flow)