The document describes how to refactor a method that accumulates results into a local variable by extracting the accumulation logic into smaller methods that accept a collecting parameter. This pattern called "collecting parameter" passes the accumulation data structure between methods to decompose a large method into several simpler methods. The document provides an example of refactoring a toString method of a TagNode class by extracting pieces of string building logic into private methods that accept a StringBuffer collecting parameter.