question: public List < String > reset ( List < String > replace ) { ArrayList < String > copy = new ArrayList < String > ( retainedVars . size ( ) ) ; copy . addAll ( retainedVars ) ; retainedVars . clear ( ) ; if ( replace != null ) { retainedVars . addAll ( replace ) ; } return copy ; }
target:  Replaces the list of retained vars with the specified list, returning the old list. If no list is specified then a new empty one is used. 