question: public List < FrameDescriptor > diff ( FramePath to ) { List < FrameDescriptor > toFrames = to . getFrames ( ) ; List < FrameDescriptor > diff = new ArrayList < > ( ) ; if ( isSubpath ( to ) ) { for ( int i = frames . size ( ) ; i < toFrames . size ( ) ; i ++ ) { diff . add ( toFrames . get ( i ) ) ; } } else { diff . add ( DefaultFrame . INSTANCE ) ; diff . addAll ( toFrames ) ; } return diff ; }
target:  This method calculates diff between frame paths.