Get a {@link ModuleSpec} that was added to this instance
@param revisionId id to search for
@return the instance associated with the given revisionIds
182985
@Nullable
    public ModuleSpec getModuleSpec(ModuleIdentifier revisionId) {
        Objects.requireNonNull(revisionId, "revisionId");
        return moduleSpecs.get(revisionId);
    }
224348
public void unloadModule(ModuleIdentifier revisionId) {
        Objects.requireNonNull(revisionId, "revisionId");
        Module module = findLoadedModule(revisionId);
        if (module != null) {
            unloadModule(module);
        }
    }
58139
function(moduleId) {
		var visitedModules = {};
		var recurse = function(moduleId) {
			if (visitedModules[moduleId] == true) { return true; }
			visitedModules[moduleId] = true;
			var module = getModule(moduleId);
			if (!module || !module.defined) { return false; }
			else {
				var deps = module.deps || [];
				for (var i = deps.length; i--;) {
					if (!recurse(deps[i])) {
						return false;
					}
				}
				return true;
			}
		};
		return recurse(moduleId);
	}
311329
public Versioned<E> getVersionedById(int id) {
        Versioned<VListNode<E>> listNode = getListNode(id);
        if(listNode == null)
            throw new IndexOutOfBoundsException();
        return new Versioned<E>(listNode.getValue().getValue(), listNode.getVersion());
    }
402925
private static int findCommonAncestor(RevisionInternal rev, List<String> possibleRevIDs) {
        if (possibleRevIDs == null || possibleRevIDs.size() == 0) {
            return 0;
        }
        List<String> history = Database.parseCouchDBRevisionHistory(rev.getProperties());

        //rev is missing _revisions property
        assert (history != null);

        boolean changed = history.retainAll(possibleRevIDs);
        String ancestorID = history.size() == 0 ? null : history.get(0);

        if (ancestorID == null) {
            return 0;
        }

        int generation = RevisionUtils.parseRevIDNumber(ancestorID);

        return generation;
    }
421642
@Override
    public List<RevisionInternal> getRevisionHistory(RevisionInternal rev) {
        Document doc = getDocument(rev.getDocID());
        if (doc == null)
            return null;
        try {
            try {
                if (!doc.selectRevID(rev.getRevID(), false))
                    return null;
            } catch (ForestException e) {
                Log.e(TAG, "Error in getRevisionHistory() rev=" + rev, e);
                return null;
            }
            List<RevisionInternal> history = new ArrayList<RevisionInternal>();
            do {
                RevisionInternal ancestor = ForestBridge.revisionObject(
                        doc, rev.getDocID(), null, false);
                if (ancestor == null)
                    break;
                ancestor.setMissing(!doc.hasRevisionBody());
                history.add(ancestor);
                // TODO: implement once ancestorRevIDs param is given.
                //if(ancestorRevIDs!=null&&ancestorRevIDs.contains(ancestor.getRevID()))
                //    break;
            } while (doc.selectParentRev());
            return history;
        } finally {
            doc.free();
        }
    }
841979
public static WComponent getComponentWithId(final WComponent root, final String id) {
		return getComponentWithId(root, id, false);
	}
593257
public void unloadAllModuleRevision(String scriptModuleId) {
        for (ModuleIdentifier revisionId : getAllRevisionIds(scriptModuleId)) {
            if (revisionId.getName().equals(scriptModuleId)) {
                unloadModule(revisionId);
            }
        }
    }
598112
public function getRevisionDbInfo($siteId, $name, $revisionId)
    {
        /** @var \Doctrine\ORM\QueryBuilder $queryBuilder */
        $queryBuilder = $this->_em->createQueryBuilder()
            ->select(
                'container,'
                . 'publishedRevision.revisionId,'
                . 'revision,'
                . 'pluginWrappers,'
                . 'pluginInstances'
            )
            ->from(\Rcm\Entity\Container::class, 'container')
            ->leftJoin('container.publishedRevision', 'publishedRevision')
            ->leftJoin('container.site', 'site')
            ->leftJoin('container.revisions', 'revision')
            ->leftJoin('revision.pluginWrappers', 'pluginWrappers')
            ->leftJoin('pluginWrappers.instance', 'pluginInstances')
            ->where('site.siteId = :siteId')
            ->andWhere('container.name = :containerName')
            ->andWhere('revision.revisionId = :revisionId')
            ->orderBy('pluginWrappers.renderOrder', 'ASC')
            ->setParameter('siteId', $siteId)
            ->setParameter('containerName', $name)
            ->setParameter('revisionId', $revisionId);

        $getData = $queryBuilder->getQuery()->getSingleResult(
            Query::HYDRATE_ARRAY
        );

        $result = null;

        if (!empty($getData)) {
            $result = $getData[0];
            $result['revision'] = $result['revisions'][$revisionId];
            unset($result['revisions'], $getData);
        }

        return $result;
    }
1045370
public function getModuleById($moduleId)
    {
        foreach ($this->getModules() as $module) {
            if ($module->getModuleId() == $moduleId) {
                return $module;
            }
        }

        return null;
    }
1186213
def get_revision_of_build_configuration(revision_id, id=None, name=None):
    
    data = get_revision_of_build_configuration_raw(revision_id, id, name)
    if data:
        return utils.format_json_list(data)
135658
public static long getRevisionNumber(ModuleIdentifier revisionId) {
        int revision;
        try {
            revision = Integer.parseInt(revisionId.getSlot());
        } catch (NumberFormatException nf) {
            revision = -1;
        }
        return revision;
    }
538972
public AbstractGraph getModuleGraph(final String moduleId) {
        final ModuleHandler moduleHandler = new ModuleHandler(repoHandler);
        final DbModule module = moduleHandler.getModule(moduleId);
        final DbOrganization organization = moduleHandler.getOrganization(module);

        filters.setCorporateFilter(new CorporateFilter(organization));

        final AbstractGraph graph = new ModuleGraph();
        addModuleToGraph(module, graph, 0);

        return graph;
    }
115130
@Nullable
    public ExecutionStatistics getModuleStatistics(ModuleId moduleId) {
        ExecutionStatistics moduleStats = statistics.get(moduleId);
        return moduleStats;
    }
770948
private function get_mod_instance($cmid) {
        global $DB;
        $rec = $DB->get_record_sql("SELECT md.name
                               FROM {course_modules} cm,
                                    {modules} md
                               WHERE cm.id = ? AND
                                     md.id = cm.module", array($cmid));

        if ($rec) {
            return get_coursemodule_from_id($rec->name, $cmid);
        } else {
            return null;
        }
    }
481205
public void add(final int revisionID, final long revisionPrimaryKey,
			final long fullRevisionPrimaryKey)
	{

		boolean sql = !insertStatement.isEmpty();
		if (sql&&buffer.length() != insertStatement.length()) {
			this.buffer.append(",");
		}

		this.buffer.append((sql?"(":"") + revisionID + "," + revisionPrimaryKey + ","
				+ fullRevisionPrimaryKey + (sql?")":""));

		if(!sql){
			buffer.append("\n");
		}

		if (buffer.length() + 100 >= MAX_ALLOWED_PACKET) {
			storeBuffer();
		}
	}
788900
public static String getRefId(String id) throws ServletException {
		return PageIndex.getRefId(
			getServletContext(),
			getRequest(),
			id
		);
	}