} else {
// shared node found
// undo previous id assignment
context.releaseId( candidate.getId() );
}
node.addAssociation( context.getRule(), context.peekRuleComponent() );
return node;
}
/**
* Utility function to check if sharing is enabled for nodes of the given class