Once the cause of the error is known, correcting the problem takes little effort. However, new errors are often introduced during the correction process. To support accurate correction of the problem, complete the following steps:
· make a back-up of the program,
· map out the change,
· analyze the impact of the change,
· change the program,
· retest thoroughly,
· release the program.
Make a Back-Up of the Program
Prior to changing the program, make a back-up of the program so that you have an original to return to if problems arise. Obtain a printed copy of the program for use in mapping out the planned change.
Map Out the Change
Prior to changing the program, write in the planned changes on a printed copy of the program. Ensure you understand the program and the impact of any changes you make. Avoid special handling of one exception, focusing on a thorough understanding, rather than a few isolated lines of the program. Failure to do so may result in a change to the program that handles your specific error situation, but causes problems with other types of data. Also, to avoid confusion, make one change at a time.
Analyze the Impact of the Change
After noting the changes on a printed copy of the program, review the program once more to verify that the change corrects the problem and does not create additional errors.
In certain circumstances during the latter phases of testing, it is helpful to have someone else review the proposed change, (e.g., if the change is complicated, or if the module is complicated and you were not the original developer). This may seem time consuming, but in comparison, the introduction of new errors takes more time and effort.
Change the Program
Change the program and recompile if applicable.
Retest thoroughly with test cases that replicate the problem. For example, use the test cases that were originally used in the identification of the problem and cause. Also ensure no new errors were introduced by testing cases that exercise all of the program. During the latter phases of testing, unit tests used during development may help with this process.
Depending on the testing phase in which the error is identified, subject the program and related programs to the same rigorous testing used during the development process, (e.g., integration testing and system testing).
Release the Program
After the program is thoroughly tested, follow established procedures for correct release and migration of the program.