Flaw Analysis & Removal

Objectives

This task is the first step in source code stabilization. It focuses on removal of logic constructs that are considered high risk and have the potential of resulting in errors during program execution. Examples include recursive logic, runaway paths and a host of other potential issues. The activities covered here are isolated to individual source programs. Stabilization related to cross program linkages are covered under the remodularization task of Positioning.

This task may or may not accompany a restructuring effort defined in the next task within this section. Once completed, this task may have produced code that is improved to the degree where restructuring is unnecessary. Restructuring without the benefit of the steps described within this section, however, will in certain cases, produce code that is even more difficult to maintain. Specific objectives are listed below.

· Identify and eliminate high risk constructs within a system

· Produce source code that is easier to understand and more reliable to change

· Prepare source code for restructuring, remodularization and Transformation rule reusability

 

Note: This task relies on use of a fully functional static analysis tool. Absence of one makes this task prohibitive.

Entrance Criteria

The entrance criteria for the flaw analysis and removal task are listed below.

· Completion of the Inventory/Analysis, process flow analysis task for the systems/programs of interest

· Based on process flow analysis, specification of code flaws to be analyzed and removed as follows:

- Form 003B must show one of the following metric values to be greater than zero: TPM 001, 051, 052, 054, 055, 056, 057 or 058

Note: Some static analysis tools used in process flow analysis do not provide sufficient data to serve adequately in this task. Please refer to tool guidelines for list of acceptable tools.

· Directive to improve the reliability of selected programs or to prepare them for restructuring

· Completion of the application staging process for the programs/system of interest

Roles/Skills

The personnel and skill requirements necessary to meet the flaw analysis and removal task objectives are identified below.

· Process Positioning Expert

- Expertise in analyzing and removing code flaws/defects in current system's source language(s)

· Current Systems Expert

- Functional knowledge of programs targeted for analysis, and of existing program/function breakdown

Input Requirements

The system components and related inputs required to initiate and complete the flaw and analysis removal task are listed below.

· Completed process flow analysis section of Form 003B

· Completed Form 008A for programs of interest

· Process flow analysis generated metrics for source system and static analysis tool reports detailing code flaws

· Production source code and Copy members loaded into the Original and Input Libraries

· All available results from process flow analysis task for source programs of interest

· Blank copy of Positioning control log - Form 022

· Blank copy of Positioning work plan - Form 020

Tool/Technology Support

Technologies supporting the flaw analysis and removal task include static analysis, spreadsheet, word processing, program editor, compiler/preprocessors and comparator tools. These tools are used to represent information as required by this task.

Static analysis tool

The static analysis tool in this task must be able to graphically analyze code to produce information on the quantity and types of flaws inherent in the code. Flaws which can be identified include recursions, active procedure exits, dead code, and alters (although not a true flaw, removal improves system maintainability).

Not all the static analysis tools commercially available have the ability to analyze source code to the level of detail required by this task. Refer to the tool guidelines for specific static analyzers which fit the task requirements.

Spreadsheet

Spreadsheet tools offer a convenient format for recording much of the information gathered throughout this stage. Referenced Comsys-TIM Forms have been pre-loaded into certain spreadsheet tools (see the step level tool guidelines for specific tools) to facilitate data entry and analysis. While highly desirable, spreadsheets are not essential to this task.

Word processor

This is required to record positioning narrative and, in the absence of a spreadsheet tool, other positioning results.

Program editor

This is required to physically revise flawed statements and constructs in the source. Use a program editor appropriate to the environment.

Compiler/preprocessors

A source language compiler/preprocessor is required to parse source code and convert it into machine executable instructions. This compilation process identifies many types of errors, and requires their correction before it will complete successfully.

Comparator

This tool is used to validate changes made to source code by comparing the input programs line by line and producing listings of any differences it finds.

Task Steps

The flaw analysis and removal task is comprised of the following task steps:

 Produce Detailed Flaw Analysis Reports
 Eliminate Runaway Logic Paths
 Assess and Eliminate Dead Code
 Review & Eliminate Active Exits
 Review & Eliminate Looping Range Violations
 Review and Eliminate Recursive Performs
 Review and Eliminate Alter Logic
 Perform Quality Review and Finalize Changes