<CONTEXT>.build(doc.getWiki(), doc.getSpace(), doc.getName(), doc.getVersion(),xwikiObject.getClassName(),xwikiObject.getNumber()).toString();</BUG>} else {<extra_id_0>} else {<BUG>objectUri =UriBuilder.fromUri(baseUri).path(ObjectResource.class).build(doc.getWiki(), doc.getSpace(), doc.getName(), xwikiObject.getClassName(),xwikiObject.getNumber()).toString();</BUG>}</CONTEXT>
private static Link getObjectLink(ObjectFactory objectFactory, URI baseUri, Document doc, BaseObject xwikiObject,boolean useVersion, String relation)String objectUri;if (useVersion) {uri(baseUri, ObjectAtPageVersionResource.class, doc.getWiki(), doc.getSpace(), doc.getName(),doc.getVersion(), xwikiObject.getClassName(), xwikiObject.getNumber());uri(baseUri, ObjectResource.class, doc.getWiki(), doc.getSpace(), doc.getName(),xwikiObject.getClassName(), xwikiObject.getNumber());