Efficient Structural Analysis of existing projects – part 1


As a software engineer you already might have run in the following situation: A legacy application needs to be extended, and most of the initial developers have either left or work on new projects. Documentation is sparse and the code base is huge – but you need to quickly understand the structure of the project, or at least the parts you’re about to change. How can you possibly achieve that?

Structural analysis to the rescue

Under structural analysis we understand the analysis of:
  • project structure
  • project elements
  • elements structure
  • elements relations
We will have a general overview of those aspects below – the description refers mainly to two object oriented languages: Java and C#. The details we will present in a series of blog posts – so stay tuned for more!

Analysis of project structure

A typical project is composed of:
  • modules
    • packages / namespaces
      • elements (classes)
So first it is required to understand what modules are included in the project and what their roles are. Additionally one also has to understand how elements (classes) are organized within modules – what packages / namespaces are there and what elements do they contain.

Analysis of project elements

In Java and C# projects, elements of the following kinds/categories can be found:
  • class
    • interface
      • annotation (Java)
    • attribute (C#) – equivalent to annotation in Java
    • enum
    • throwable / exception ¹
    • array
    • delegate (C#)
  • struct (C#)
¹ logical category

Analysis of elements structure

Java and C# classes can contain the following members:
  • attribute
    • field
    • constant 1)
  • operation
    • method
    • constructor
    • finalizer / destructor ²
  • property ¹
    • indexer (C#)
  • operator (C#)
  • event (C#)
  • nested element
¹ logical category in Java, language-level category in C#
² logical category in both languages – should not be used anymore

Analysis of element relations

An element can have any of the following relations:
  • outbound
    • generalization
    • abstractions
    • nestings
    • associations
      • uni-directional
      • bi-directional
      • aggregations
        • compositions
    • dependencies
  • inbound
    • specializations
    • realizations
    • nesting owner
    • association usages
      • aggregation usages
        • composition usages
    • dependency usages

Structural analysis of a sample Java project

Now imagine that you start working on an existing project: ScrumToys, an application to support conducting projects in SCRUM. Below you can see 2 screenshots from the application.
Structural Analysis
Figure 1a. ScrumToys application – dashboard showing stories and tasks of sample project sprint.
Structural Analysis
Figure 1b. ScrumToys application – editing of sample task.
Figure 1a shows stories and tasks. Tasks are grouped into 3 categories, according to their status: TODO, DOING, DONE. Figure 1b shows the task edit dialog.
Your role is to modify the application. You’ve received the following assignment:
  • add next task status-category: APPROVED
  • remove inconsistency in the name of task status: DOING (Figure 1a) and WORKING (Figure 1b) – it should be WORKING on all screens across the system (also on those not shown on screenshots)
  • make task status changeable – currently it cannot be changed (Figure 1b)

In order to do your assignment correctly, you have to understand the structure of the application – at least of the parts related to the given tasks. Let’s see a comparison on how popular software engineering tools can support you in your assignment.


The following software engineering tools are chosen to help us with the structural analysis:

¹ officially not supported on Eclipse 4


Project structure

First, we would like to have general overview of the project structure:
Structural Analysis
Figure 2a. Project structure in Eclipse IDE.
Structural Analysis


Figure 2b. Project structure in NetBeans IDE.
Structural Analysis
 Figure 2c. Project structure in IntelliJ IDEA.
Structural Analysis
Figure 2d. Project structure in Class Visualizer.
As shown in Figure 2, two out of four tools (IntelliJ IDEA and Class Visualizer) present graphical information about the kind of element (class, interface, enum, annotation) and one of them (Class Visualizer) presents the full list of project elements. All tools except Eclipse IDE show the structure of the element currently selected on the list.
The analysis of the element structure and its relations will be discussed in next parts of this series.

Never miss an update by following us and subscribing to our monthly newsletter!

Efficient Structural Analysis of existing projects - part 1
Article Name
Efficient Structural Analysis of existing projects - part 1
How is it possible to understand the structure of a project quickly or at least parts which need to be changed. How is it possibly to achieve that?
Publisher Name
Atos Consulting CH
Publisher Logo

Leave a Reply

Your email address will not be published. Required fields are marked *