Source:
<code>private void setAuthorAndCommitter(CommitCommand commitCommand) throws TeamException { final Date commitDate = new Date(); final TimeZone timeZone = TimeZone.getDefault(); final PersonIdent enteredAuthor = RawParseUtils.parsePersonIdent(author); final PersonIdent enteredCommitter = RawParseUtils.parsePersonIdent(committer); if (enteredAuthor == null) throw new TeamException(NLS.bind( CoreText.CommitOperation_errorParsingPersonIdent, author)); if (enteredCommitter == null) throw new TeamException( NLS.bind(CoreText.CommitOperation_errorParsingPersonIdent, committer)); PersonIdent authorIdent; if (repo.getRepositoryState().equals( RepositoryState.CHERRY_PICKING_RESOLVED)) { try { ObjectId cherryPickHead = repo.readCherryPickHead(); <START> authorIdent = new RevWalk(repo).parseCommit(cherryPickHead) <END> .getAuthorIdent(); } catch (IOException e) { Activator .error(CoreText.CommitOperation_ParseCherryPickCommitFailed, e); throw new IllegalStateException(e); } } else { authorIdent = new PersonIdent(enteredAuthor, commitDate, timeZone); } final PersonIdent committerIdent = new PersonIdent(enteredCommitter, commitDate, timeZone); if (amending) { RepositoryUtil repoUtil = Activator.getDefault().getRepositoryUtil(); RevCommit headCommit = repoUtil.parseHeadCommit(repo); if (headCommit != null) { final PersonIdent headAuthor = headCommit.getAuthorIdent(); authorIdent = new PersonIdent(enteredAuthor, headAuthor.getWhen(), headAuthor.getTimeZone()); } } commitCommand.setAuthor(authorIdent); commitCommand.setCommitter(committerIdent); }</code><technical_language>RevWalk released? (I'm if necessary in this case)</technical_language>

Target:
private void setAuthorAndCommitter(CommitCommand commitCommand) throws TeamException { final Date commitDate = new Date(); final TimeZone timeZone = TimeZone.getDefault(); final PersonIdent enteredAuthor = RawParseUtils.parsePersonIdent(author); final PersonIdent enteredCommitter = RawParseUtils.parsePersonIdent(committer); if (enteredAuthor == null) throw new TeamException(NLS.bind( CoreText.CommitOperation_errorParsingPersonIdent, author)); if (enteredCommitter == null) throw new TeamException( NLS.bind(CoreText.CommitOperation_errorParsingPersonIdent, committer)); PersonIdent authorIdent; if (repo.getRepositoryState().equals( RepositoryState.CHERRY_PICKING_RESOLVED)) { RevWalk rw = new RevWalk(repo); try { ObjectId cherryPickHead = repo.readCherryPickHead(); authorIdent = rw.parseCommit(cherryPickHead) .getAuthorIdent(); } catch (IOException e) { Activator .error(CoreText.CommitOperation_ParseCherryPickCommitFailed, e); throw new IllegalStateException(e); } finally { rw.release(); } } else { authorIdent = new PersonIdent(enteredAuthor, commitDate, timeZone); } final PersonIdent committerIdent = new PersonIdent(enteredCommitter, commitDate, timeZone); if (amending) { RepositoryUtil repoUtil = Activator.getDefault().getRepositoryUtil(); RevCommit headCommit = repoUtil.parseHeadCommit(repo); if (headCommit != null) { final PersonIdent headAuthor = headCommit.getAuthorIdent(); authorIdent = new PersonIdent(enteredAuthor, headAuthor.getWhen(), headAuthor.getTimeZone()); } } commitCommand.setAuthor(authorIdent); commitCommand.setCommitter(committerIdent); }