The International Journal Of Engineering And Science (IJES) || Volume || 5 || Issue || 6 || Pages || PP -14-20 || 2016 || ISSN (e): 2319 1813 ISSN (p): 2319 1805 www.theijes.com The IJES Page 15 Analysis of Various Software Metrics Used To Detect Bad Smells Sukhdeep Kaur 1 , Dr. Raman Maini 2 Department Of Computer Engineering, Punjabi University, Patiala-147002 (India) -------------------------------------------------------- ABSTRACT----------------------------------------------------------- Software metrics are evolving successfully and are used to measure the object oriented properties such as size, complexity, cohesion and coupling of software code. In different organization, software metrics are applied to evaluating the internal code quality, productivity as well as maintainability of software. Software metric are calculated to detect bad smells in source code. In any program, bad smell or code smell demonstrates the debilitate architecture design of software that makes it rigid to maintain in the future. In this paper, static and dynamic metrics are discussed to detect a handful bad smells like long method, feature envy, large class, long parameter list, lazy class, data class etc. From the analysis, it has been observed that dynamic metrics have more unambiguous results than static metrics because it depends upon the running or working environment. Keywords: Software Metrics, Measurement Process, Static Metrics, Dynamic Metrics, Bad Smell. ------------------------------------------------------------------------------------------------------------------------------------- Date of Submission: 26 May 2016 Date of Accepted: 05 June 2016 -------------------------------------------------------------------------------------------------------------------------------------- I. INTRODUCTION Software metric is a numerical degree used to measure the given attribute that is possessed by software system, process or component. Software metric is a critical feature of software engineering that acts like an indicator for software attribute and used to measure the performance of software or its components. The software metric name is incorporated with distinct measurement process of software and all phases of system development [1]. Software measurement process is helpful to estimate the better cost, complexity, scheduling and efforts required for software during its development process. Reproducible measurement objective of software metrics are acquired for performance, quality assurance, debugging, estimating cost and management [2]. Fault in a source code, predicting project risk and success, predicting defective code are also finds through software metrics. In this paper, section II defines the software metrics used for three categories such as product, process and project. Section III represents the static and dynamic metrics and their different types. Section IV explains the bad smell and various types of bad smells in the code. Section V defines the bad smell detection process through software metric rules and also provides the analysis of various bad smells. Section VI gives the overall conclusion about software metrics and bad smells. II. SOFTWARE METRICS In the software engineering, Software metrics are essential research topic that is helpful for measuring software internal code quality, complexity, and efforts required to develop the project, product and process [3]. Some objective of software metrics are perception, planning, software assessment, software enhancement and quality progression. Basically, software metrics [4] are defined for following categories: a. Product metrics: Product metrics are those metrics that describe the various features functioning as instance size, performance, complexity, design characteristics, portability and quality level of a product. Examples include the production system, quality of product and delivery time to the market. b. Process metrics: Process metrics are those metrics that describe the effectiveness, enhancement of software development and maintenance. Examples include the efforts needed to process, defects found during testing and response time to produce the product. c. Project metrics: Project metrics are those metrics that describe the characteristics of project and execution activities. Examples include the budget, software developers needed to complete project, staff pattern of whole software life cycle, scheduling and resource management, customer satisfaction. Software quality metric is a factor of software metrics that establish the product quality areas for process, product and project [1]. Basically, product and process metrics are tightly closed to software quality metrics than project metrics because the parameters such as size, developer’s skill levels, scheduling and the other corporation for project affect the caliber area of product.