Skip to content

Locating features in the JHotDraw code

by werner on January 22nd, 2011

The paper “A unified approach to feature-centric analysis of object-oriented software” by Andrzej Olszak and Bo Nørregaard Jørgensen discusses an approach for analyzing the code of a software project based on its features. They first identify features that they want to understand, and then relate the code which implements them. They implemented a NetBeans plug-in called Featureous to support this task.

In the introduction chapter of the paper they state:

“In case of object-oriented programs, relating features to their implementations is, however, a difficult task, as object- oriented programming languages provide no means for expressing features explicitly. In object-oriented programs, features are implemented implicitly as inter-class collaborations crosscutting not only multiple classes but also multiple architectural units, e.g. layers in layered architectures. This physical tangling and scattering of features over several source code units makes their implementations difficult to identify and understand.”

They used the SVG sample application of JHotDraw 7.5 as an example. The SVG sample does not include a documentation of its features, and thus makes such an analysis unnecessarily hard. From now on, I am going to extend the package comments and class comments in JHotDraw with a “Features” section, similar to the “Design Patterns” section which is already present. The “Features” section will name a feature, state the part of the feature that the package or class implements, and list participating packages and classes.

From → Java, JHotDraw

Comments are closed.