Overview |  | Roles |  | Work Items |  | Views |  | CMMI |  | Index |  | Glossary |

Project Portal
| ### Next Steps Build a Product |
| Fix a Bug Developer
|  | Participating Roles Responsible: Developer
### Overview A bug indicates a potential need for corrective work on existing code. After a bug is approved through triage, the activities in the workstream are followed to resolve the bug. Initial activities are investigative in nature, in which the developer attempts to reproduce the bug, tracks down the cause of the bug, and works out a strategy for fixing the bug. The next set of activities involve fixing the bug by checking out code and possibly writing unit tests for new code. The final set of activities involve reviewing the fix in a code review and integrating the fix back into the main source. # Entry Criteria Triage determines that the bug needs to be fixed. Triage determines that the bug needs to be fixed. The bug is assigned to a developer. The bug is assigned to a developer. # Activities
1 | Reproduce the Bug | Follow bug description. Obtain more information. Abandon bug.
2 | Locate Cause of Bug | Isolate functional area. Reassign bug. Trace involved code areas. Analyze system with external tools. Pinpoint the problem.
3 | Reassign Bug | Modify bug description. Update owner.
4 | Decide on Strategy for a Fix | Analyze located bug. Decide on an architectural fix. Decide on a resource fix. Decide on a performance fix. Reassign bug.
5 | Code Fix | Check out code. Write new code. Update code in existing code files.
6 | Write or Update a Unit Test for Bug Fix | Identify the unit test scope. Write or update the unit test. Validate the unit test.
7 | Perform Unit Test for Bug Fix | Identify appropriate unit test. Perform a unit test. Analyze test results. Debug code.
8 | Refactor Code for Bug Fix | Read code review notes. Apply refactoring. Perform unit tests.
9 | Prepare for Bug Code Review | Identify reviewers. Schedule the review. Circulate code for review.
10 | Bug Code Review | Verify name correctness. Verify code relevance. Verify extensibility. Verify minimum code complexity. Verify algorithmic complexity. Verify code security. Create code review work item.
11 | Integrate Bug Changes | Check dependencies. Test and integrate other development tasks. Check in the set of changes. Resolve scenario or quality of service requirement work item. Resolve bug work item.
# Exit Criteria
| The code coverage for the unit tests meets the test metric threshold or non-coverage is explained.
| A change set for the bug fix is created.
| The bug is fixed and ready for verification. The state of the bug is resolved.
| The bug is abandoned as not reproducible. The bug is reassigned to the tester that created it.
© 2005 Microsoft Corporation. All rights reserved. MSF for CMMI Process Improvement: 1.00.0000.00 |