Abstract—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. I. INTRODUCTION Code smell is a type of code decay [1], [2] which hinders a developer for future maintenance of the system [3], [4]. It is good practice for developers to avoid the code smells because of maintaining in future of the system after development. Those smells are something wrong in the code of the system but do not create any change to the outcome. According to Fowler [5], [6], There are 22 state-of -the-art code smells which are identified by the Fowler [5], [6].To eradicate those smells, there exists several types of automated code smell detectors. Some well-known detection tools named PMD, CheckStyle, Infusion and JDeodorant . Those tools make easy for helps developers to find code smells. The research work identified four code smells including duplicate codes, unused private methods, unused local variables and unused imports using PMD in different java projects. Duplicate Code is same code structure remaining more than one place in the system [7]-[9]. Fowler described same expression in two methods of the same class and same expression in two siblings subclasses are common duplication problems. These duplicate codes isare created by exact duplication, renaming, aliasing or other kinds which are occuring during modified and mixed with different code [10]. Duplicate code is considered as an occurrence by PMD where a portion of code occurring more than once. ItThe Manuscript received October 9, 2018; revised December 7, 2018. The authors are with Computer Science and Engineering, University of Barisal, Barisal, Bangladesh (e-mail: sams.csebu@gmail.com, mostafij.csebu@gmail.com, irfan.bucse@gmail.com, bohnishikha46@gmail.com, sathibucse08@gmail.com, shariful.islam@gmail.com, rhfaisal@gmail.com). duplicate code problem is arranged by at least 25 tokens to the PMD. Example import.javax.swing.JOptionPane; import.javax.swing.*; public void function() { } Here JOptionPane is a part of swing but it is written separately and also called swing library function. This is a code smell known as duplicate code. Unused import, an import from another module is never used [11]. It is a code smell which creates for some irresponsibility of developers. Example import.javax.swing.*; int sub() { return(b-c); } Unused Local variables is a code smell which creates maintenance burden ofto a system. It is an assigned variable or in-parameter which is not read before it becomes undefined. It appears due to spelling mistakes of local variables in the system. Example public int Add(int sum) { int sub;//unused local variable return sum; } In this example, this function adds values but sub variables are not used in this function. These sub variables are unused local variables. Unused Private method which is declared in the class but never executed. It is one type of dead code which is inoperative and unnecessary. Each function to the example is declared but not used in this system. Example public class food { String Eat(){ // Unused method } } In hereHerein, Eat the method Eat() is declared but there is no any statementare no statements inside the method. That is just a method which is not used is called Unused Private method. Eduardo [12], found 84 code smells detection tools. Among them 29 tools are available for online download. They It can detect code smells for different programming languages such as java, C, C++, C# and so on. Some Experimental Study of Four Selective Code Smells Declining in Real Life Projects Md. Erfan, Bohnishikhan Halder, Sathi Rani Pal, Md. Shariful Islam, and Rahat Hossain Faisal International Journal of Information and Electronics Engineering, Vol. 8, No. 4, December 2018 46 doi: 10.18178/ijiee.2018.8.4.693