Assessing software defects using nano-patterns detection