The parser provided by CodeOntology allows to analyze Java source code and generate RDF triples. It is available on GitHub, along with a tutorial on how to use it to analyze different kinds of Java projects.
The parser has been applied to extract a knowledge base from the OpenJDK 8 source code. Here are some details about the extracted RDF triples. As we can see, most of the triples generated by the parser are about structural information common to all object-oriented programming languages, like class hierarchy, methods and constructors.
- Structural information on source code: 1981108 triples
- DBpedia links: 309688 triples
- Actual source code as literals: 134757 triples
- Literal Comments: 105881 triples