<CONTEXT>UriBuilder.fromUri(baseUri).path(SpaceResource.class).build(doc.getWiki(), doc.getSpace()).toString();</BUG>Link spaceLink = objectFactory.createLink();spaceLink.setHref(spaceUri);spaceLink.setRel(Relations.SPACE);pageSummary.getLinks().add(spaceLink);<extra_id_0>Link spaceLink = objectFactory.createLink();spaceLink.setHref(spaceUri);spaceLink.setRel(Relations.SPACE);pageSummary.getLinks().add(spaceLink);<BUG>if (parent != null) {String parentUri =UriBuilder.fromUri(baseUri).path(PageResource.class).build(parent.getWiki(), parent.getSpace(), parent.getName()).toString();</BUG>Link parentLink = objectFactory.createLink();</CONTEXT>
pageSummary.setParent(doc.getParent());if (parent != null && !parent.isNew()) {pageSummary.setParentId(parent.getPrefixedFullName());} else {pageSummary.setParentId("");}String spaceUri = uri(baseUri, SpaceResource.class, doc.getWiki(), doc.getSpace());String parentUri = uri(baseUri, PageResource.class, parent.getWiki(), parent.getSpace(), parent.getName());