Currently, there is the need for systems to manage repositories of MATLAB code bases capable of supporting global queries and feed their results to analyses components. Such features are not directly supported in current platforms. This paper presents a repository management system that supports queries over semi-automatically annotated code files and are able to associate them to higher level concepts. To meet this need, this paper proposes an approach that equips the repository with support for sophisticated queries over its stored code base and allows patterns to emerge from such queries, namely for visualisation and further analysis. This is achieved through the synergistic combination of a token-based metrics extraction component and a relational model fed by an ubiquitous data mining process. The code base is represented by means of relational knowledge, enabling intelligent queries that can be extended with new code metrics. Presently, query results are being used for the detection of concerns, including those whose code is scattered over multiple modular units. This paper outlines the proposed system's architecture and presents a proof-of-concept implementation developed for MATLAB programs. It is evaluated by means of a set of illustrative queries over a seed repository of MATLAB systems.