Software Maintenance in Software Engineering

Building and delivering a working piece of software is often treated as the finish line, but in reality it is only the beginning of a much longer journey. Once software is actually being used by real people, in real conditions, it inevitably needs to change, whether because a bug surfaces that nobody caught during testing, the environment around it shifts, or users simply start asking for something more. This ongoing process of keeping software working correctly and relevant over time is called software maintenance.

Software maintenance is the process of modifying a software system or component after it has already been delivered, in order to correct faults, improve performance or other attributes, or adapt the product to a changed environment. Far from being a minor afterthought, maintenance typically consumes a larger share of a software project's total lifetime cost and effort than the original development work itself, which is exactly why it deserves careful, structured study rather than being treated as informal, ad-hoc patchwork.

In this tutorial, you will learn about the four recognized types of software maintenance, corrective, adaptive, perfective, and preventive, and you will also explore the technical and non-technical factors that influence how easy or difficult maintenance turns out to be for a particular software system.


Why Software Maintenance Is Necessary

No software system, no matter how carefully it was designed and tested, remains perfectly correct and perfectly relevant forever. Errors that were never discovered during testing eventually surface once the software is used by a wide range of real users performing tasks the original test cases never anticipated. Beyond fixing outright errors, the world around a piece of software keeps changing too, operating systems get updated, hardware gets replaced, business rules evolve, and user expectations shift, and the software has to change along with all of it in order to remain useful. Maintenance is simply the name given to this entire ongoing category of work.


Types of Software Maintenance

Software maintenance is generally organized into four distinct categories, based on the underlying reason a particular change is being made. Understanding which category a change falls into helps a development team plan, prioritize, and estimate maintenance work far more effectively than treating every change request the same way.

Types of Software Maintenance Corrective Maintenance Adaptive Maintenance Preventive Maintenance Perfective Maintenance

Corrective Maintenance

Corrective maintenance refers to the process of fixing faults that are discovered after the software has already been delivered and put into actual use. These faults might include incorrect calculations, crashes under specific conditions, or any behavior that does not match what the software was originally specified to do. Because corrective maintenance deals with genuine defects, it is often treated as the highest priority category of maintenance work, since a broken feature can directly disrupt the people relying on the software every day.

Adaptive Maintenance

Adaptive maintenance refers to modifying software so that it continues to function correctly as its surrounding environment changes. This surrounding environment might include the operating system the software runs on, a piece of hardware it depends on, a connected third-party service, or even changing government regulations that affect how the software must behave. The software itself was not necessarily broken, but without adaptive maintenance, it would eventually stop working correctly simply because the world around it moved on.

Perfective Maintenance

Perfective maintenance refers to enhancing software based on new or changing user requirements, even though the software is not actually broken and its environment has not necessarily changed. This includes adding new features users have requested, improving the performance of an existing feature, or refining the user interface to make the software more pleasant and efficient to use. Perfective maintenance is often the largest single category of maintenance work over a software system's lifetime, since user expectations rarely stay fixed for long.

Preventive Maintenance

Preventive maintenance refers to making changes to software specifically to prevent future problems before they actually occur, rather than reacting to a fault or a changed requirement after the fact. This often takes the form of restructuring or cleaning up the internal structure of the code, sometimes called refactoring, so that the software remains easier to understand, test, and modify safely as further maintenance work continues in the years ahead.


Comparing the Four Types of Maintenance

Type Triggered By Goal
Corrective A discovered fault or defect Fix the software so it behaves as originally specified
Adaptive A change in the surrounding environment Keep the software working correctly as its environment changes
Perfective New or evolving user requirements Enhance or improve the software beyond its original specification
Preventive A proactive decision, not an external trigger Reduce the risk of future problems by improving internal code quality

Factors Affecting Software Maintenance

Not every software system is equally easy to maintain. Some systems can be updated and extended for years with relatively little difficulty, while others become increasingly painful and risky to change as time goes on. The factors that influence this are generally grouped into two broad categories: technical factors, which relate to how the software itself was built, and non-technical factors, which relate to the broader circumstances surrounding the software and the people who use it.


Technical Factors

Technical factors are properties of the software's own internal structure and construction that directly affect how easily it can be understood, modified, and safely extended by a maintenance team.

Technical Factors Module Independence Programming Language Programming Style Program Validation & Testing Documentation Configuration Management

Module independence refers to how self-contained each individual part of a system is. When modules are highly independent, a maintenance team can change one module with minimal risk of unexpectedly breaking another, whereas tightly interconnected modules make even small changes risky and unpredictable. The choice of programming language also matters significantly, since some languages naturally encourage clearer, more structured code, while others make it easier to write code that becomes difficult to follow over time.

Programming style refers to how consistently and clearly the original code was actually written, including naming conventions, formatting, and the overall clarity of the logic, all of which directly affect how quickly a maintenance programmer can understand code they did not originally write. Program validation and testing refers to how thoroughly the software was tested originally, and whether a solid set of test cases still exists that can be reused to check that a maintenance change has not broken anything else in the system.

Documentation refers to the presence and quality of written material describing how the software works internally, since well-documented systems are dramatically easier to maintain than systems where a programmer has to reverse-engineer the original design purely by reading code. Configuration management refers to how carefully changes to the software have been tracked and organized over time, including version history and release records, which becomes essential once multiple rounds of maintenance have accumulated over the software's lifetime.


Non-Technical Factors

Non-technical factors are properties of the broader situation surrounding a piece of software, rather than the internal code itself, and they can influence the difficulty of maintenance just as strongly as technical factors do.

Non-Technical Factors Application Domain Staff Stability Program Lifetime Dependence on External Environment Hardware Stability

Application domain refers to the specific field or industry the software is built for, since some domains, such as finance or healthcare, involve constantly evolving regulations and rules that force frequent maintenance regardless of how well the software was originally built. Staff stability refers to whether the original developers, or at least experienced maintainers familiar with the system, are still available to work on it, since a system maintained by people who understand its history and design tends to be far easier to update safely than one where every maintainer is starting from scratch.

Program lifetime refers to how long the software is expected to remain in active use, since software expected to last many years is generally worth investing more heavily in for long-term maintainability, while short-lived software may not justify that same level of investment. Dependence on external environment refers to how much the software relies on outside systems, services, or platforms that are themselves subject to change, since every external dependency introduces another potential source of forced maintenance work whenever that outside system changes.

Hardware stability refers to how much the software depends on specific physical hardware, and how often that hardware is likely to change or be replaced, since software tied closely to particular hardware often requires adaptive maintenance whenever that hardware is eventually upgraded or discontinued.


Why Maintenance Often Costs More Than Development

It often comes as a surprise to newcomers in the field that maintenance frequently consumes a larger portion of a software system's total lifetime cost than the original development effort that created it. This happens because development typically lasts months, while a successful piece of software might remain in active use, and therefore in need of ongoing maintenance, for many years afterward. Every one of the four maintenance types discussed in this chapter, corrective, adaptive, perfective, and preventive, adds up over that extended lifetime, which is exactly why the technical and non-technical factors covered here matter so much: they directly determine whether that long-term cost stays manageable or spirals out of control.


Advantages and Limitations of Structured Software Maintenance

Advantages Limitations
Keeps software correct, relevant, and usable long after its original release. Maintenance work often costs more, in total, than the original development effort.
Classifying maintenance into clear types helps teams plan and prioritize effectively. Poor technical factors, like weak documentation, can make even small changes risky.
Preventive maintenance can reduce the risk and cost of future maintenance work. Non-technical factors, like staff turnover, are often outside a team's direct control.

Best Practices While Learning Software Maintenance


Common Mistakes Beginners Make

Mistake Correct Practice
Confusing adaptive maintenance with perfective maintenance. Remember that adaptive maintenance responds to a changed environment, while perfective maintenance responds to changed or new user requirements.
Assuming preventive maintenance is triggered by an external event, like the other three types. Remember that preventive maintenance is proactive, undertaken to avoid future problems rather than reacting to one that already occurred.
Treating technical and non-technical factors as the same category. Remember that technical factors relate to the software's own construction, while non-technical factors relate to the surrounding people and environment.
Assuming maintenance is a minor, inexpensive phase compared to development. Understand that maintenance frequently accounts for the majority of a software system's total lifetime cost.

Frequently Asked Interview Questions

  1. What is software maintenance?
    Software maintenance is the process of modifying a software system after it has been delivered, in order to correct faults, adapt to a changed environment, or improve its attributes.
  2. What is corrective maintenance?
    Corrective maintenance is the process of fixing faults discovered after the software has been delivered and put into actual use.
  3. What is adaptive maintenance?
    Adaptive maintenance is the process of modifying software so it continues to function correctly as its surrounding environment changes.
  4. What is perfective maintenance?
    Perfective maintenance is the process of enhancing software based on new or evolving user requirements, even when nothing is broken.
  5. What is preventive maintenance?
    Preventive maintenance is the process of proactively improving software's internal structure to reduce the risk of future problems.
  6. What are technical factors affecting software maintenance?
    Technical factors include module independence, programming language, programming style, program validation and testing, documentation, and configuration management.
  7. What are non-technical factors affecting software maintenance?
    Non-technical factors include application domain, staff stability, program lifetime, dependence on external environment, and hardware stability.
  8. Why does maintenance often cost more than the original software development?
    Maintenance often costs more because it accumulates continuously over a software system's entire active lifetime, which is usually much longer than the original development period.

Summary

Software maintenance covers all of the work required to keep a software system correct, relevant, and usable after it has already been delivered and put into real use. The four recognized types, corrective, adaptive, perfective, and preventive, each respond to a different underlying trigger, whether that is a discovered fault, a changed environment, an evolving requirement, or a proactive effort to avoid future problems altogether.

We also explored the technical factors, such as module independence, programming language, programming style, testing, documentation, and configuration management, along with the non-technical factors, such as application domain, staff stability, program lifetime, external dependencies, and hardware stability, that together determine just how easy or difficult maintaining a particular piece of software will turn out to be over its lifetime.

With software maintenance covered, you are now ready to explore software configuration management in detail, examining version control, baselines, and change management practices that directly support the kind of organized, controlled maintenance process described in this chapter.


← Previous: Black Box Testing Next: Software Configuration Management →

Home Visit Our YouTube Channel