patch & sample code collection