DariusSDG
When Concept Location meets System Dependency Graph

What is it?

DariusSDG is a Java tool that joins two Program Comprehension techniques:

  • Concept Location
  • System Dependency Graph
The main objective is to reduce the time spent by software engineers in software maintenance. DariusSDG performs concept location over source code comments, finding the associated instructions that needs intervention. DariusSDG also builds the System Dependency Graph of the analysed program and associates the results returned by the Concept Locator to the graph given a more detailed information about the analysed program. The user also can navigate in the System Dependency Graph independently.

Architecture

DariusSDG receives the source code of a program as input. That program will be analysed by Darius and a list of comments is retrieved. The program will be also analysed by the SDG Builder (built using ANTLR which needs a Java Grammar in order to transform the Java source code in a representation of the System Dependency Graph). The SDG Builder outputs a representation of the System Dependency Graph divided by methods (to overcome the scalability problem). If the software engineer interacts with DariusSDG by entering search terms the tool will display the list of comments and their respective similarity to the searched terms (the list will be ordered by similarity). If the software engineer select a comment the corresponding part of the System Dependency Graph will be displayed and the associated instruction will be highlighted. The software engineer can also interact with DariusSDG by selecting the methods that he wants to see. The information about the System Dependency Graph is passed to JGraphX that draws it.

SDG Builder

In order to associate the comments with the instrutions in the System Dependency Graph its necessary to know the locations of both. There are some tools that can build the System Dependency Graph of a Java program but based on its bytecode (which does not contain the comments left by the user in the source code). Therefore we decided to develop a tool that builds the System Dependency Graph based on the source code of a Java program. We named the tool SDG Builder. In order to perform this task we use ANTLR (a powerful tool that can generate a processor to parse a formal language like Java). Until now, there is no other tool like SDG Builder.

Darius

Darius is a tool build by Luís de Freitas that can extract Java comments (inline, singleline, multiline and Javadoc) present in the source code of a Java program and perform concept location with them. Darius separates the text into sentences and the sentences into words. The words that have no significance or value are eliminated and the others are reduced to its grammatical root. The system also performs these actions in the query to assure consistence. Until now, there is no other tool like Darius.

Designing the Graph

The System Dependency Graph is an important and useful technique due to its graphical representation. After build a representation of the System Dependency Graph with the SDG Builder we created a graphical representation of it with JGraphX (a Java Swing library that provides functionality for visualisation and interaction with graphs). In order to distinguish easily the two types of edges, the data dependency connections are drawn in white and the flow dependencies are drawn in blue. We also set the autosize property of the nodes to true in order to adjust them according to the contents automatically. Lastly the options that allows the user to move the node and edges without detaching it are activated. This allows the user to isolate nodes in order to get a clear view of the graph.

How to use DariusSDG

Generic placeholder image

Short Paper

A short paper about DariusSDG presented on 19th June at SLATE 2014 that was held in Bragança, Portugal. It briefly explains the development and concepts related to the it.

Download

Generic placeholder image

Project Thesis

The MSc dissertation that gave origin to DariusSDG. In this document it is explained in detail all the steps to construct DariusSDG, related concepts and tests performed.

Download

Executable files

DariusSDG is written in Java and it is composed by two files: a tagger file (auxiliar) and a JAR file (main program). You need to have the JRE installed in order to execut it.

Download

The team behind DariusSDG

Nuno Pereira

MSc student at University of Minho

Pedro Rangel Henriques

Professor at University of Minho

Maria João Varanda

Professor at Polytechnic Institute of Bragança