@NotNull(message = "Gist is never NULL")
public Gist fork() throws IOException {
this.storage.lock();
final String number;
try {
final XML xml = this.storage.xml();
number = Integer.toString(
1 + xml.xpath("/github/gists/gist/id/text()").size()
);
final Directives dirs = new Directives().xpath("/github/gists")
.add("gist")
.add("id").set(number).up()
.add("files");
final List<XML> files = xml.nodes(
String.format("%s/files/file", this.xpath())
);
for (final XML file : files) {
final String filename = file.xpath("filename/text()").get(0);
// @checkstyle MultipleStringLiterals (3 lines)