Different types of codes which may increase the liability of bugs or defects in future to a system known as Code smell. These type of smell can be eliminated without changing the external outcome and modifying the internal structure of the system. There are existing several well known code smell detection tools which automatically identify the code smells. The research used PMD automatic code smell detector to find four code smells on various open source java projects. It uses 43 open source java projects and identify the selective smells to these projects. The experiment shows duplicate codes, unused imports, unused local variables and unused private methods are not present for 79%, 34.9%, 51.1%, and 86.04% projects respectively. In the paper, it also shows that the probability of occurring duplicate codes, unused imports, unused local variables and unused private methods are respectively 4.5%, 71%, 20.4% and 4.1% which indicates the four selective code smells are declining in real life projects day by day.Index Terms-Code smell, refactoring, detector and PMD. . He has been teaching a good number of courses related to computer networks, wireless and mobile systems, security, information technology project management, etc. to graduate and undergraduate students of reputed universities. He has research interests in wireless networking, wireless mesh networks, Information security, cloud computing, etc. He has published a good number of research papers in international conferences and journals.