An investigation into the effect of refactoring on defect introductions in open source software projects