Refactoring code to extract code to new private method to filter fields and methods