Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose my favourite open source application has a bug. Now I want to contribute to the application by fixing its bug and submit the patch to the development team. What's the most effective way to do this? Do you actually read the whole source code of the project (or most of it) to understand the logic before start fixing it?

share|improve this question
possible duplicate of How do I contribute to open source projects? – gnat Feb 16 '14 at 11:48
@gnat - I disagree with you regarding the possible duplicate. Suggested duplicate looks at the broader question of how to contribute to an open source project. This question is focusing on the particulars of resolving a specific issue. There is some overlap in the answers, but I feel they are separate issues. – GlenH7 Feb 16 '14 at 13:56
@GlenH7 okay, retracted my vote. Too broad would probably be a more accurate close reason – gnat Feb 16 '14 at 23:13
up vote 7 down vote accepted

Know how to test the bug before fixing

Making sure that your bug fix does NOT introduce new defects should be the priority. Well, how to do that?

Usual pitfall in fixing bugs starts from insufficient pre-analysis of a bug/issue. Rush to fix the bug is something developer needs to avoid.

Taking your time to analyse what is the bug, how to re-produce it, its relationship to other parts of the code (also called dependencies) is very important. Once you know the test cases and all relevant dependencies to take care, it should be the right fix.

In addition try to use re-factoring tools in your development practice. They are very handy and will ease your life while maintaining the code.

Getting up to speed in a large project

Well, even though there is no silver point to follow, i have compiled a list of useful points that were helpful to me.

  1. Ask for a senior team mate (also called buddy) as a mentor for you in the project
  2. Read the documentation and/or requirements to understand business process of the existing implementation
  3. For one cycle of the release work as unit tester or help other developers in doing unit testing.
  4. Get responsibility for a independent module to start with. Work closely with your project mentor on how this will get integrated into the rest
  5. Study and understand the architecture and design
  6. Try to get a quick overview of the modules from developer that you will be taking care
  7. Study and understand the build process
share|improve this answer

No you fix the very small detail - the smaller and more local the patch the simpler it is for the owners of the project to understand, test and accept.

You should try and match their coding standards and ideally supply any small test code if possible

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.