TODO generate formatted ref if not present
434402
def noniso_bibitem(list, b, ordinal, bibliography)
      list.p **attr_code(iso_bibitem_entry_attrs(b, bibliography)) do |r|
        if bibliography
          id = docid_l10n(b.at(ns("./docidentifier")).text.gsub(/[\[\]]/, ""))
          prefix = b&.at(ns("./docidentifier/@type"))&.text
          ref_entry_code(r, ordinal, prefix, id)
        else
          r << "#{iso_bibitem_ref_code(b)}, "
        end
        reference_format(b, r)
      end
    end
1259141
function makeValueChecker(ref) {
	const expected = require(ref);
	return ({value}) => value === expected || value === expected.default;
}
736881
function byIdRef(id, ref) {
      var cmp = this.byId(id).lookupReferenceHolder(false).lookupReference(ref);
      if (!cmp) {
        throw new Error('Component not found for container id: ' + id + ', reference: ' + ref);
      }
      return cmp;
    }
1253490
def generic_ref_formatter(view, context, model, name, lazy=False):
    
    try:
        if lazy:
            rel_model = getattr(model, name).fetch()
        else:
            rel_model = getattr(model, name)
    except (mongoengine.DoesNotExist, AttributeError) as e:
        # custom_field_type_formatters seems to fix the issue of stale references
        # crashing pages, since it intercepts the display of all ReferenceField's.
        return Markup(
            '<span class="label label-danger">Error</span> <small>%s</small>' % e
        )

    if rel_model is None:
        return ''

    try:
        return Markup(
            '<a href="%s">%s</a>'
            % (
                url_for(
                    # Flask-Admin creates URL's namespaced w/ model class name, lowercase.
                    '%s.details_view' % rel_model.__class__.__name__.lower(),
                    id=rel_model.id,
                ),
                rel_model,
            )
        )
    except werkzeug.routing.BuildError as e:
        return Markup(
            '<span class="label label-danger">Error</span> <small>%s</small>' % e
        )
1357864
def get_ref(self, reftype, index):
        """"""
        try:
            got_reftype, data = self.refs[int(index)]
        except (IndexError, ValueError):
            raise CoconutInternalException("no reference at invalid index", index)
        internal_assert(got_reftype == reftype, "wanted " + reftype + " reference; got " + got_reftype + " reference")
        return data
674268
public String getCollectionImplType(Reference ref) {
		String collectionType = getRefCollectionType(ref);
		return getCollectionImplType(collectionType);
	}
564772
@Override
    public void setRef(int parameterIndex, Ref x) throws SQLException
    {
        checkParameterBounds(parameterIndex);
        throw SQLError.noSupport();
    }
241345
@Override
    public void setRef(int parameterIndex, Ref x) throws SQLException {
        internalStmt.setRef(parameterIndex, x);
    }
1173688
def getrefs(self, reflist):
        
        alist = []
        for element in reflist:
            if element[0].upper() in self.dt:
                for elm in self.dt[element[0].upper()]:
                    alist.append(elm[element[1]])
        return alist
1354686
public static Object getThis(Object ref) {
        Object thisValue = null;

        // FIXME: We can probably remove this check for IRJSFunctions since we will not be using references
        if (ref instanceof Reference) {
            if (((Reference) ref).isPropertyReference()) {
                thisValue = ((Reference) ref).getBase();
            } else {
                thisValue = ((EnvironmentRecord) ((Reference) ref).getBase()).implicitThisValue();
            }
        }
        return thisValue;
    }
1095853
function (value) {
        var result = this.get(value.$ref);
        if (isObj(result) && isStr(value.$tmpl)) {
            result = strTemplate(value.$tmpl, result);
        }
        return result;
    }
1355910
def pretty_ref(obj: Any) -> str:
    """"""
    try:
        return obj.__module__ + ':' + obj.__qualname__
    except AttributeError:
        return pretty_ref(type(obj)) + '(...)'
853699
function (sDescription, aReferences) {
			var iLen,
				i;

			// format references
			if (aReferences && aReferences.length > 0) {
				sDescription += "<br><br><span>Documentation links:</span><ul>";

				iLen = aReferences.length;
				for (i = 0; i < iLen; i++) {
					// We treat references as links but as they may not be defined as such we enforce it if needed
					if (/{@link.*}/.test(aReferences[i])) {
						sDescription += "<li>" + aReferences[i] + "</li>";
					} else {
						sDescription += "<li>{@link " + aReferences[i] + "}</li>";

					}
				}

				sDescription += "</ul>";
			}

			// Calling formatDescription so it could handle further formatting
			return this.formatDescription(sDescription);
		}
1147604
def add_ref(self, reftype, data):
        """"""
        ref = (reftype, data)
        try:
            index = self.refs.index(ref)
        except ValueError:
            self.refs.append(ref)
            index = len(self.refs) - 1
        return str(index)
1071089
def objref(obj):
    """"""
    ref = _objrefs.get(obj)
    if ref is None:
        clsname = obj.__class__.__name__.split('.')[-1]
        seqno = _lastids.setdefault(clsname, 1)
        ref = '{}-{}'.format(clsname, seqno)
        _objrefs[obj] = ref
        _lastids[clsname] += 1
    return ref
96076
function (_ref, path, fileName) 
    {
        var h = require("./helpers.js").apply(this, arguments);
        var obj = h.toObj();
        var props = [];
        for (var prop in obj)
            props.push(h.t.objectProperty(h.t.stringLiteral(prop.substr(prop.startsWith(".") ? 1 : 0)), obj[prop]));
        props.push(h.t.objectProperty(h.t.stringLiteral("file"), h.t.stringLiteral(fileName)));

            
        var parent = path.findParent((path) => path.isProgram());
        if (parent) parent.unshiftContainer('body', h.t.ifStatement(h.t.identifier("module.hot"), h.t.expressionStatement( h.t.callExpression(h.t.identifier("module.hot.accept"), [])) )); 

        //return h.t.callExpression(h.t.memberExpression(obj["ui"], h.t.identifier("renderApp")), [ h.t.objectExpression(props) ]);
        
        return h.t.callExpression(h.t.memberExpression(h.t.callExpression(h.t.identifier("require"), [ h.t.stringLiteral("@appfibre/jst")]), h.t.identifier("app")), [h.t.objectExpression(props)]);
    }
1104219
public String getRefCollectionType(Reference ref) {
		String type = ref.getCollectionType();
		return (type == null ? "set" : type.toLowerCase());
	}