findNonEmptyLineWithSameConstraints