UNIVERSITY OF HERTFORDSHIRE COMPUTER SCIENCE RESEARCH COLLOQUIUM presents "The Impact of Bad Smells on Code" Min Zhang (School of Computer Science, University of Hertfordshire, UK) 28 April 2010 (Wednesday) Lecture Theatre E351 Hatfield, College Lane Campus 3 - 4 pm Everyone is Welcome to Attend Refreshments will be available Abstract: This presentation is on my PhD research into the relationship between Code Bad Smells and software faults. Fowler et al. state that Code Bad Smells can give "indications that there is trouble [in code] that can be solved by a refactoring". However, my review of current software engineering literature on Code Bad Smells shows that little empirical evidence has been provided to support Fowler et al.'s claims that Code Bad Smells cause detrimental effects on software. Fenton and Pfleeger suggest that software faults are an important indicator of software quality. As a consequence, software problems caused by Code Bad Smells are likely to be indicated by software faults. Hence, it is reasonable to expect that Code Bad Smells can cause faults in software. My PhD research empirically investigates the impact of five of Fowler et al.'s Code Bad Smells, i.e., the Data Clumps, Switch Statements, Speculative Generality, Message Chains, and Middle Man, in terms of their relation to faults. My research captured the relationship between Code Bad Smells and faults using source data from the Eclipse and Apache Commons open source projects. My results from both of these datasets suggest that source code containing only one of the five investigated Code Bad Smells is less fault prone than source code which does not contain any of these Code Bad Smells. This indicates that the existence of only one of these Code Bad Smells in source code is not likely to make it fault prone. However, my study using Eclipse data suggests that all source code samples associated with most faults contain the Message Chains Bad Smell. In addition, Message Chains are associated with a high number of Algorithm/Method faults and the other Code Bad Smells are associated with Internal Interface faults. Since the Algorithm/Method fault can cause bigger problems in software than the Internal Interface fault, it leads me to conclude that the Message Chains Bad Smell deserves further attention. - Hertfordshire Computer Science Research Colloquium http://homepages.stca.herts.ac.uk/~nehaniv/colloq