Page 253 - DCAP305_PRINCIPLES_OF_SOFTWARE_ENGINEERING
P. 253
Unit 12: Refactoring
software system need to be reengineered. The reengineering of these parts is usually performed Notes
using refactoring. Refactoring is defined as “the process of changing a software system in such a
way that it does not alter the external behavior of the code, yet improves its internal structure”
.The abundance of available tools for collecting software metrics and performing automated
refactoring on source code simply maintenance. This means that more developers and software
engineers use refactoring consciously as a means to improve the quality of their software.
However, as this study suggests, the expected and actual results often differ. Although people
use refactoring (or claim to do so) in order to improve the quality of their systems, the metrics
indicate that this process often has the opposite results.
Self Assessment Questions
1. A development method with incremental refactoring would have developers always
working with hilly..............
(a) existing code (b) refectory code
(c) duplicated code (d) None of these
2. Data migration is also a very familiar nuisance for anyone who has ever tried to modify
a Java application using serialization.
(a) True (b) False
3. ....................refactoring cannot be fully automatic in the general case, because recognizing
effective transformation requires human insight except in special cases.
(a) Documenting (b) Relevant
(c) Verification (d) Fowler
4. ............................ does not deal with higher level matters such as implementation
environment selection, distribution strategies, or user interface characteristics.
(a) Documenting (b) Relevant
(c) Verification (d) Fowler’s refactoring
5. The abundance of available tools for collecting software metrics and performing automated
refactoring on source code simply maintenance.
(a) True (b) False
12.4 Size of Metrics
Size of Matrices has verification complexity metric available that could guide the user in selection
of transformations, and so we present a hybrid of metrics to the use the SPARK Examiner, and
our own analyzer. The metrics include:
Element Metrics
Lines of code, number of declarations, statements, and subprograms, average size of subprograms,
logical SLOC, unit nesting level, and construct nesting level.
Complexity Metrics
McCabe cyclamate complexity, Essential complexity, Statement complexity, Short-circuits
complexity, and Loop nesting level.
Verification Condition Metrics
The number and size of verification condition maximum length of verification conditions and
the time that the Spark tools take to analyze the verification conditions.
LOVELY PROFESSIONAL UNIVERSITY 247