Buggy code:
public class View { private static final Log log = LogFactory . getLog ( View . class ) ; private static final String START_KEY = "s_k" ; private static final String START_KEY_DOC_ID = "s_k_d_i" ; private static final String CURRENT_START_KEY = "c_k" ; private static final String CURRENT_START_KEY_DOC_ID = "c_k_d_i" ; private static final String CURRENT_KEYS = "c" ; private static final String ACTION = "a" ; private static final String NEXT = "n" ; private static final String PREVIOUS = "p" ; private String key ; private String startKey ; private String startKeyDocId ; private String endKey ; private String endKeyDocId ; private Integer limit ; private String stale ; private Boolean descending ; private Integer skip ; private Boolean group ; private Integer groupLevel ; private Boolean reduce ; private Boolean includeDocs ; private Boolean inclusiveEnd ; private Boolean updateSeq ; private CouchDbClient dbc ; private Gson gson ; private URIBuilder uriBuilder ; View ( CouchDbClient dbc , String viewId ) { } public InputStream queryForStream ( ) { } public < T > List < T > query ( Class < T > classOfT ) { } public < K , V , T > ViewResult < K , V , T > queryView ( Class < K > classOfK , Class < V > classOfV , Class < T > classOfT ) { InputStream instream = null ; try { Reader reader = new InputStreamReader ( ( instream = queryForStream ( ) ) ) ; JsonObject json = new JsonParser ( ) . parse ( reader ) . getAsJsonObject ( ) ; ViewResult < K , V , T > vr = new ViewResult < K , V , T > ( ) ; vr . setTotalRows ( getElementAsLong ( json , "total_rows" ) ) ; vr . setOffset ( getElementAsInt ( json , "offset" ) ) ; vr . setUpdateSeq ( getElementAsLong ( json , "update_seq" ) ) ; JsonArray jsonArray = json . getAsJsonArray ( "rows" ) ; if ( ( jsonArray . size ( ) ) == 0 ) { throw new NoDocumentException ( "No<seq2seq4repair_space>result<seq2seq4repair_space>was<seq2seq4repair_space>returned<seq2seq4repair_space>by<seq2seq4repair_space>this<seq2seq4repair_space>view<seq2seq4repair_space>query." ) ; } for ( JsonElement e : jsonArray ) { Rows row = vr . new Rows ( ) ; row . setId ( JsonToObject ( gson , e , "id" , String . class ) ) ; row . setKey ( JsonToObject ( gson , e , "key" , classOfK ) ) ; row . setValue ( JsonToObject ( gson , e , "value" , classOfV ) ) ; <START_BUG> if ( ( includeDocs ) == ( Boolean . TRUE ) ) { <END_BUG> row . setDoc ( JsonToObject ( gson , e , "doc" , classOfT ) ) ; } vr . getRows ( ) . add ( row ) ; } return vr ; } finally { close ( instream ) ; } } public String queryForString ( ) { } public int queryForInt ( ) { } public long queryForLong ( ) { } public boolean queryForBoolean ( ) { } private < V > V queryValue ( Class < V > classOfV ) { } public < T > Page < T > queryPage ( int rowsPerPage , String param , Class < T > classOfT ) { } private < T > Page < T > queryNextPage ( int rowsPerPage , String currentStartKey , String currentStartKeyDocId , String startKey , String startKeyDocId , Class < T > classOfT ) { } private < T > Page < T > queryPreviousPage ( int rowsPerPage , String currentStartKey , String currentStartKeyDocId , String startKey , String startKeyDocId , Class < T > classOfT ) { } public View key ( Object ... key ) { } public View startKey ( Object ... startKey ) { } public View startKeyDocId ( String startKeyDocId ) { } public View endKey ( Object ... endKey ) { } public View endKeyDocId ( String endKeyDocId ) { } public View limit ( Integer limit ) { } public View stale ( String stale ) { } public View descending ( Boolean descending ) { } public View skip ( Integer skip ) { } public View group ( Boolean group ) { } public View groupLevel ( Integer groupLevel ) { } public View reduce ( Boolean reduce ) { } public View includeDocs ( Boolean includeDocs ) { } public View inclusiveEnd ( Boolean inclusiveEnd ) { } public View updateSeq ( Boolean updateSeq ) { } private String getKeyAsJson ( Object ... key ) { } }

Fix:
if ( Boolean . TRUE . equals ( this . includeDocs ) ) {