Databases Reference
In-Depth Information
The maven subdirectory contains a mirror of the Maven2 central repository 2 [ 43 ].
Lastly, index.txt contains an index that maps from the MD5 hash of a jar file to
its location in the directory structure. This index is used to link the jar files from the
projects to the files contained in the jars directory.
Sourcerer's project metadata format enables capturing description of
projects and contents across various online repositories.
The Storage Model provides a standard for storing project files in Sourcerer and
is not directly used by applications. Applications rely on other higher-level abstrac-
tions to access the contents stored in Sourcerer.
8.4.2 Relational Model
Sourcerer's relational model defines the basic source code elements and the relations
between those elements. It supports a fine-grained representation of the structural
information extracted from source code. It also links the code elements/relations
with their locations in physical artifacts.
Two major goals guided the design of Sourcerer's relational model. First, it had to
be sufficiently expressive to allow fine-grained structure-based analyses and search
over code structure. Second, it had to be efficient and scalable enough to include
the large amount of code from thousands of open source projects. To meet these
two goals we decided to use an adapted version of Chen et al.'s [ 7 ] C++ entity-
relationship-based metamodel as Sourcerer's relational model for source code. In
particular, their decision to focus on what they termed a top-level declaration gran-
ularity provides a good compromise between the excessive size of finer granularities
and the analysis limitations of coarser ones.
The relational model consists of the following five elements: Project, File, Entity,
Comment, and Relation.
A Project model element exists for every project contained in Sourcerer's repos-
itory, as well as every unique Jar file. A project therefore contains either a collection
of Java source files and jar files, or a collection of class files. A File model element
represents these three types of files: source ( .java ), jar ( .jar )orclass( .class ).
Both source and class files are linked to sets of Entities contained within them, and
to the Relations that have these entities as their source and target. Jar files, on the
other hand, are linked to their corresponding jar projects, which in turn contains all
of the Entities and Relations .
2 Maven is a build system for Java that provides the facility to fetch required libraries from a central
repository [ 42 ].
 
Search WWH ::




Custom Search