Source:
<code>private void recvWants() throws IOException { HashSet<ObjectId> wantIds = new HashSet<ObjectId>(); boolean isFirst = true; for (;;) { String line; try { line = pckIn.readString(); } catch (EOFException eof) { if (isFirst) break; throw eof; } if (line == PacketLineIn.END) break; if (line.startsWith("deepen ")) { depth = Integer.parseInt(line.substring(7)); continue; } <START> if (line.startsWith("shallow ")) { <END> final ObjectId id = ObjectId.fromString(line.substring(8)); clientShallowCommits.add(walk.parseCommit(id)); continue; } if (!line.startsWith("want ") || line.length() < 45) throw new PackProtocolException(MessageFormat.format(JGitText.get().expectedGot, "want", line)); if (isFirst && line.length() > 45) { String opt = line.substring(45); if (opt.startsWith(" ")) opt = opt.substring(1); for (String c : opt.split(" ")) options.add(c); line = line.substring(0, 45); } wantIds.add(ObjectId.fromString(line.substring(5))); isFirst = false; } if (wantIds.isEmpty()) return; AsyncRevObjectQueue q = walk.parseAny(wantIds, true); try { for (;;) { RevObject o; try { o = q.next(); } catch (IOException error) { throw new PackProtocolException(MessageFormat.format( JGitText.get().notValid, error.getMessage()), error); } if (o == null) break; if (o.has(WANT)) { } else if (o.has(ADVERTISED)) { o.add(WANT); wantAll.add(o); if (o instanceof RevTag) { o = walk.peel(o); if (o instanceof RevCommit) { if (!o.has(WANT)) { o.add(WANT); wantAll.add(o); } } } } else { throw new PackProtocolException(MessageFormat.format( JGitText.get().notValid, o.name())); } } } finally { q.release(); } }</code><technical_language>Style-nit: Please insert a blank line command test blocks</technical_language>

Target:
private void recvWants() throws IOException { HashSet<ObjectId> wantIds = new HashSet<ObjectId>(); boolean isFirst = true; for (;;) { String line; try { line = pckIn.readString(); } catch (EOFException eof) { if (isFirst) break; throw eof; } if (line == PacketLineIn.END) break; if (line.startsWith("deepen ")) { depth = Integer.parseInt(line.substring(7)); continue; } if (line.startsWith("shallow ")) { final ObjectId id = ObjectId.fromString(line.substring(8)); clientShallowCommits.add(id); continue; } if (!line.startsWith("want ") || line.length() < 45) throw new PackProtocolException(MessageFormat.format(JGitText.get().expectedGot, "want", line)); if (isFirst && line.length() > 45) { String opt = line.substring(45); if (opt.startsWith(" ")) opt = opt.substring(1); for (String c : opt.split(" ")) options.add(c); line = line.substring(0, 45); } wantIds.add(ObjectId.fromString(line.substring(5))); isFirst = false; } if (wantIds.isEmpty()) return; AsyncRevObjectQueue q = walk.parseAny(wantIds, true); try { for (;;) { RevObject o; try { o = q.next(); } catch (IOException error) { throw new PackProtocolException(MessageFormat.format( JGitText.get().notValid, error.getMessage()), error); } if (o == null) break; if (o.has(WANT)) { } else if (o.has(ADVERTISED)) { o.add(WANT); wantAll.add(o); if (o instanceof RevTag) { o = walk.peel(o); if (o instanceof RevCommit) { if (!o.has(WANT)) { o.add(WANT); wantAll.add(o); } } } } else { throw new PackProtocolException(MessageFormat.format( JGitText.get().notValid, o.name())); } } } finally { q.release(); } }