IPA IP 2023 Question 49

A question IPA Japan published in 令和5年度 ITパスポート試験 公開問題 問49, translated into English. ITPEC is based on the same exams.

Same question on ITPEC: Oct 2024 Q50

Which of the following is the appropriate explanation of refactoring?

Explanation

Improving internal architecture without changing functions — refactoring keeps the software's external behavior identical.

Refactoring reorganizes code (removing duplication, splitting long functions, clarifying names) so it is easier to read and maintain, while the functions the software provides stay exactly the same. Tests are run before and after to confirm the behavior has not changed.

Answer (a)

Why not others:

  • •(b) — deriving specifications by analyzing how existing software works is reverse engineering
  • •(c) — correcting a defect so the software meets its specifications is debugging, or corrective maintenance, and it changes behavior
  • •(d) — adding a requested function changes what the software does, so it is enhancement, not refactoring

Key rule: Refactoring changes the inside and never the outside; any change to what the software does, whether a fix or a new feature, is something else.

Software Development Management Techniques · AI-written, may contain errors

This question comes from the past questions IPA Japan publishes, translated into English by ITPEC Practice. ITPEC Practice is an independent study tool and is not affiliated with IPA or ITPEC. See the original paper (PDF) or Report an issue.