reasons and improvement measures for flaw detection