Source:
<code>protected void doGetHtml(HttpServletRequest req, HttpServletResponse res) throws IOException { Repository repo = ServletUtils.getRepository(req); GitilesView view = getView(req, repo); Paginator paginator = newPaginator(repo, view); if (paginator == null) { res.setStatus(SC_NOT_FOUND); return; } try { GitilesAccess access = getAccess(req); DateFormatter df = new DateFormatter(access, Format.DEFAULT); <START> Map<String, Object> data = new LogSoyData(req, view).toSoyData(paginator, null, df); <END> List<String> prettyValues = view.getParameters().get(PRETTY_PARAM); String pretty = "default"; if (!prettyValues.isEmpty()) { pretty = prettyValues.get(0); } String variant = access.getConfig().getString("logFormat", pretty, "variant"); if (variant != null) { data.put("logEntryVariant", variant); } else { data.put("logEntryVariant", pretty); } if (!view.getRevision().nameIsId()) { List<Map<String, Object>> tags = Lists.newArrayListWithExpectedSize(1); for (RevObject o : RevisionServlet.listObjects(paginator.getWalk(), view.getRevision())) { if (o instanceof RevTag) { tags.add(new TagSoyData(linkifier, req).toSoyData((RevTag) o, df)); } } if (!tags.isEmpty()) { data.put("tags", tags); } } String title = "Log - "; if (view.getOldRevision() != Revision.NULL) { title += view.getRevisionRange(); } else { title += view.getRevision().getName(); } data.put("title", title); renderHtml(req, res, "gitiles.logDetail", data); } catch (RevWalkException e) { log.warn("Error in rev walk", e); res.setStatus(SC_INTERNAL_SERVER_ERROR); return; } finally { paginator.getWalk().release(); } }</code><technical_language>I want pass in access.getConfig().getBoolean("logFormat", pretty, "verbose", false) LogSoyData constructor. Also, slight aside, factor out access.getConfig() a local guaranteed fast</technical_language>

Target:
protected void doGetHtml(HttpServletRequest req, HttpServletResponse res) throws IOException { Repository repo = ServletUtils.getRepository(req); GitilesView view = getView(req, repo); Paginator paginator = newPaginator(repo, view); if (paginator == null) { res.setStatus(SC_NOT_FOUND); return; } try { GitilesAccess access = getAccess(req); Config config = access.getConfig(); DateFormatter df = new DateFormatter(access, Format.DEFAULT); String pretty = Iterables.getFirst(view.getParameters().get(PRETTY_PARAM), "default"); Map<String, Object> data = new LogSoyData(req, view, config.getBoolean("logFormat", pretty, "verbose", false)).toSoyData(paginator, null, df); String variant = config.getString("logFormat", pretty, "variant"); data.put("logEntryVariant", Objects.firstNonNull(variant, pretty)); if (!view.getRevision().nameIsId()) { List<Map<String, Object>> tags = Lists.newArrayListWithExpectedSize(1); for (RevObject o : RevisionServlet.listObjects(paginator.getWalk(), view.getRevision())) { if (o instanceof RevTag) { tags.add(new TagSoyData(linkifier, req).toSoyData((RevTag) o, df)); } } if (!tags.isEmpty()) { data.put("tags", tags); } } String title = "Log - "; if (view.getOldRevision() != Revision.NULL) { title += view.getRevisionRange(); } else { title += view.getRevision().getName(); } data.put("title", title); renderHtml(req, res, "gitiles.logDetail", data); } catch (RevWalkException e) { log.warn("Error in rev walk", e); res.setStatus(SC_INTERNAL_SERVER_ERROR); return; } finally { paginator.getWalk().release(); } }