question: private void addClearFocusNodeToBranch ( List < OptionScanNode > branchNodes , ClearFocusNode clearFocusNode ) { if ( branchNodes . size ( ) < mDegree ) { branchNodes . add ( clearFocusNode ) ; } else { OptionScanNode nodeWithClearFocus = branchNodes . get ( branchNodes . size ( ) - 1 ) ; branchNodes . remove ( nodeWithClearFocus ) ; nodeWithClearFocus = new OptionScanSelectionNode ( nodeWithClearFocus , clearFocusNode ) ; branchNodes . add ( nodeWithClearFocus ) ; } }
target:  It adds the ClearFocusNode to the list. If the list contains mDegree children, it creates a new branch adding the last child and a ClearFocusNode. This way the number of children remains the same. If on the other hand, the list contains less than mDegree children, it simply adds the ClearFocusNode as another child.