Kuscos Application Analysis

Carlos OliveiraMorphis Technology Update3 Comments

Kuscos Logo

So you have an application that you think/know is suffering from technical debt and is in need of some sort of attention. But you don’t know the condition of the application, how complex it is, how well written and, therefore, have no clue as to the best course of action. Do you refactor it? Can you? What about modernizing it? Or rewriting it? What are the costs, risks and timescales associated with each approach?

In yesterday’s post on Gartner’s TIME model we highlighted the difficulty of using a 2-D approach (technical condition/business value) to the analysis of what to do with legacy systems and suggested the problem is at least 3-D (adding in the driver to change) if not n-D. Well, the condition of the legacy application in question takes us beyond the third dimension.

At Morphis we use our own proprietary solution, Kuscos, for the analysis of software applications. Kuscos has been designed to be language-independent, as all analysis processes are performed on an abstraction of the target source code, which we refer to as the Abstract Syntax Tree. Through this abstraction, Kuscos is able to examine more than just the code text itself, but how it all connects. As such, Kuscos supports a wide range of languages already, including:

  • Cobol
  • Embedded SQL (DB2) in Cobol
  • JCL
  • SAP ABAP
  • PL/1
  • Java
  • JavaScript
  • PL/SQL
  • T-SQL
  • VB6 (and variations)
  • Delphi
  • Powerbuilder
  • C#
  • VB.NET
  • ASP
  • ASP.NET
  • Oracle Forms

By way of illustration of the analytical capabilities of Kuscos, the following shows a sub-set of the results from analyzing a web application (AWS, DynamoDB, S3) written mainly in Java and including specific frameworks and Java-based technologies such as Project Reactor and Spring. The application was implemented using some of the features of the Facade design pattern and oriented to a services and microservices architecture using REST/JSON.

At the highest level, system metrics such as the number of modules, LoC, #comment lines etc are generated by Kuscos.

Immediately it is obvious that the application is not well commented, falling far below the 30% to 75% you would expect for an application of this type.

Kuscos also produces a design quality report that describes and specifies software quality and complexity. One metric used is cyclomatic complexity that measures the number of linearly independent paths through a program’s source code. Tabular:

An average cyclomatic complexity of 9.93 (which is good) and a total of 23,114, Kuscos also produces a graphical representation which highlights the modules responsible for the greatest complexity.

Cyclomatic complexity can then be used to derive decision density which is useful predictor of software maintainability. The Halstead Difficulty shows how difficult the application is to write or understand and the graphical representation (not shown) quickly highlights that the Turma.java module is the main culprit.

Structural fan-in and fan-out are also measured enabling the complexity of the static structure of the code to me determined. These values can be combined with other metrics such as the Halstead Effort/Difficulty to verify if the modules with high reuse are very complex. If they are, then they should be refactored.

Instability and maintainability are also key factors analyzed by Kuscos.

Ultimately, different metrics can be combined, for example in this application, to identify the complex modules that also have the greatest external dependencies on the system. In this case, the Turma module.

Code quality assessments against industry or company-defined standards is also a feature of Kuscos. For more details on this and for further details on the other features of Kuscos already presented, download our Kuscos White Paper.

3 Comments on “Kuscos Application Analysis”

  1. Pingback: Accelerating Technical Debt? Learn to Fish with Morphis | Morphis Insights

  2. Pingback: COBOL to MVC - C#/.NET or J2EE/Java | Morphis Insights

  3. Pingback: Morphis Sponsors expo: QA 17, Madrid in June | Morphis Insights

Leave a Reply

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