Source:
<code>public Iterable<Directive> process(final XML xml) throws IOException { final XML req = xml.nodes("/talk/request").get(0); final Issue.Smart issue = new TalkIssues(this.github, xml).get(); final String tag = req.xpath("args/arg[@name='tag']/text()").get(0); final Releases.Smart rels = new Releases.Smart(issue.repo().releases()); final URI home = new Home(xml).uri(); final List<DefaultArtifactVersion> previous = this.transformVers(rels); if (rels.exists(tag)) { final Release.Smart rel = new Release.Smart(rels.find(tag)); rel.body( String.format( "%s\n\nSee also #%d and [build log](%s)", rel.body(), issue.number(), home ) ); issue.comments().post( String.format( CommentsTag.PHRASES.getString("CommentsTag.duplicate"), tag ) ); Logger.info(this, "duplicate tag %s commented", tag); } else if (CommentsTag.isVersionValid(tag) && !CommentsTag.isReleaseValid(tag, previous)) { issue.comments().post( String.format( CommentsTag.PHRASES.getString("CommentsTag.version-to-low"), tag, previous.toString() ) ); Logger.info( this, "tag %s must be greater than previous version %s", tag, <START> previous <END> ); } else { final Repo repo = issue.repo(); final Date prev = CommentsTag.previous(repo); final Release.Smart rel = new Release.Smart( rels.create(tag.trim()) ); rel.name(issue.title()); rel.prerelease(true); rel.body( String.format( "See #%d, release log:\n\n%s\n\nReleased by Rultor %s, see [build log](%s)", issue.number(), new CommitsLog(repo).build(prev, rel.publishedAt()), Manifests.read("Rultor-Version"), home ) ); Logger.info(this, "tag %s created and commented", tag); } return new Directives(); }</code><technical_language>@gumbelmj This line appended line before</technical_language>

Target:
public Iterable<Directive> process(final XML xml) throws IOException { final XML req = xml.nodes("/talk/request").get(0); final Issue.Smart issue = new TalkIssues(this.github, xml).get(); final String tag = req.xpath("args/arg[@name='tag']/text()").get(0); final Releases.Smart rels = new Releases.Smart(issue.repo().releases()); final URI home = new Home(xml).uri(); final List<DefaultArtifactVersion> previous = this.versions(rels); if (rels.exists(tag)) { final Release.Smart rel = new Release.Smart(rels.find(tag)); rel.body( String.format( "%s\n\nSee also #%d and [build log](%s)", rel.body(), issue.number(), home ) ); this.comment( issue, String.format( CommentsTag.PHRASES.getString("CommentsTag.duplicate"), tag ) ); } else if (CommentsTag.invalid(tag)) { this.comment( issue, String.format( CommentsTag.PHRASES.getString("CommentsTag.invalid-tag"), tag ) ); } else if (CommentsTag.tooOld(tag, previous)) { this.comment( issue, String.format( CommentsTag.PHRASES.getString("CommentsTag.version-too-low"), tag, previous.toString() ) ); } else { final Repo repo = issue.repo(); final Date prev = CommentsTag.previous(repo); final Release.Smart rel = new Release.Smart( rels.create(tag.trim()) ); rel.name(issue.title()); rel.prerelease(true); rel.body( String.format( "See #%d, release log:\n\n%s\n\nReleased by Rultor %s, see [build log](%s)", issue.number(), new CommitsLog(repo).build(prev, rel.publishedAt()), Manifests.read("Rultor-Version"), home ) ); Logger.info(this, "tag %s created and commented", tag); } return new Directives(); }