• Title/Summary/Keyword: code smell

Search Result 12, Processing Time 0.027 seconds

An Empirical Study on the Impact of Permission Smell in Android Applications

  • Wu, Zhiqiang;Lee, Hakjin;Lee, Scott Uk-Jin
    • Journal of the Korea Society of Computer and Information
    • /
    • v.26 no.6
    • /
    • pp.89-96
    • /
    • 2021
  • In this paper, we proposed a sniffer to detect permission smells from developer and third-party libraries' code. Moreover, we conducted an empirical study to investigate unnecessary permissions on large real-world Android apps. Our analysis indicates that permission smell extensively exists in Android apps. According to the results, permission smells exist in most Android apps. In particular, third-party libraries request permission for functionalities that are not used by developers, which cause more smells. Moreover, most developers do not properly disable unnecessary permissions that are declared for third-party libraries. We discussed the impacts of permission smells on user experiences. As a result, the existence of permission smell does not impact the number of downloads. However, apps that have more unnecessary permissions have received lower ratings from users.

A Systematic Literature Survey of Software Metrics, Code Smells and Refactoring Techniques

  • Agnihotri, Mansi;Chug, Anuradha
    • Journal of Information Processing Systems
    • /
    • v.16 no.4
    • /
    • pp.915-934
    • /
    • 2020
  • Software refactoring is a process to restructure an existing software code while keeping its external behavior the same. Currently, various refactoring techniques are being used to develop more readable and less complex codes by improving the non-functional attributes of software. Refactoring can further improve code maintainability by applying various techniques to the source code, which in turn preserves the behavior of code. Refactoring facilitates bug removal and extends the capabilities of the program. In this paper, an exhaustive review is conducted regarding bad smells present in source code, applications of specific refactoring methods to remove that bad smell and its effect on software quality. A total of 68 studies belonging to 32 journals, 31 conferences, and 5 other sources that were published between the years 2001 and 2019 were shortlisted. The studies were analyzed based on of bad smells identified, refactoring techniques used, and their effects on software metrics. We found that "long method", "feature envy", and "data class" bad smells were identified or corrected in the majority of studies. "Feature envy" smell was detected in 36.66% of the total shortlisted studies. Extract class refactoring approach was used in 38.77% of the total studies, followed by the move method and extract method techniques that were used in 34.69% and 30.61% of the total studies, respectively. The effects of refactoring on complexity and coupling metrics of software were also analyzed in the majority of studies, i.e., 29 studies each. Interestingly, the majority of selected studies (41%) used large open source datasets written in Java language instead of proprietary software. At the end, this study provides future guidelines for conducting research in the field of code refactoring.

Building a Code Visualization Process to Extract Bad Smell Codes (배드 스멜 코드 추출을 위한 코드 가시화 프로세스 구축)

  • Park, Jihoon;Park, Bo Kyung;Kim, Ki Du;Kim, R. Young Chul
    • KIPS Transactions on Software and Data Engineering
    • /
    • v.8 no.12
    • /
    • pp.465-472
    • /
    • 2019
  • Today, in many area the rise of software necessity there has been increasing the issue of the impotance of Good Software. Our reality in software industrial world has been happening to frequently change requirements at any stage of software life cycle. Furthermore this frequent changing will be increasing the design complexity, which will result in being the lower quality of software against our purpose the original design goals. To solve this problem, we suggest how to improve software design through refactoring based on reverse engineering. This is our way of diverse approaches to visually identify bad smell patterns in source code. We expect to improve software quality through refactoring on even frequently changing requirements.

Plug-in Diverse Parsers Within Code Visualization System with Redefining the Coupling and Cohesion in the Object-Oriented Paradigm (객체지향 관점의 결합도 & 응집도 재정의와 코드 가시화 시스템내 파서 플러그인화 구현)

  • Lee, Jin Hyub;Park, Ji Hun;Byun, Eun Young;Son, Hyun Seung;Seo, Chae Yun;Kim, R. Young Chul
    • KIPS Transactions on Software and Data Engineering
    • /
    • v.6 no.5
    • /
    • pp.229-234
    • /
    • 2017
  • Because of the invisible nature of software and the bad coding habits (bad smell) of the existing developers, there are many redundant codes and unnecessary codes, which increases the complexity and makes it difficult to upgrade software. Therefore, it is required a code visualization so that developers can easily and automatically identify the complexity of the source code. To do this, it is necessary to construct SW visualization tool based on open source software and redefine the coupling and cohesion according to the object oriented viewpoint. Specially to identify a bad smell code pattern, we suggest how to plug-in diverse parsers within our tool. In this paper, through redefining coupling and cohesion from an object oriented perspective, we will extract bad smell code patterns within source code from inputting any pattern into the tool.

Code Smell Analysis of ERP Time Attendance Management System (ERP 근태 관리 시스템의 코드 스멜 분석)

  • Choi, Wonjae;Kim, Taehwan;Moon, Hyunjun;Kim, Jungsun
    • Proceedings of the Korean Society of Computer Information Conference
    • /
    • 2020.07a
    • /
    • pp.389-390
    • /
    • 2020
  • 배포된 소프트웨어는 고객의 새로운 요구사항을 반영하면서 기능을 추가하거나 수정한다. 수정된 소프트웨어는 문제없이 동작하지만, 내부의 구조는 점점 더 복잡해지면서 유지보수가 어려워지고, 수정 시 버그 발생 확률이 높아지게 된다. 이에 따라 잘못된 코드 구조를 개선하고, 소프트웨어의 품질을 향상시켜야한다. 본 논문에서는 개발된 ERP 근태관리 시스템이 지속적인 요구사항을 반영하면서 발생한 잘못된 코드 구조인 코드 스멜을 탐지하고 분석하는 연구를 진행하였다.

  • PDF

Quality Visualization of Quality Metric Indicators based on Table Normalization of Static Code Building Information (정적 코드 내부 정보의 테이블 정규화를 통한 품질 메트릭 지표들의 가시화를 위한 추출 메커니즘)

  • Chansol Park;So Young Moon;R. Young Chul Kim
    • KIPS Transactions on Software and Data Engineering
    • /
    • v.12 no.5
    • /
    • pp.199-206
    • /
    • 2023
  • The current software becomes the huge size of source codes. Therefore it is increasing the importance and necessity of static analysis for high-quality product. With static analysis of the code, it needs to identify the defect and complexity of the code. Through visualizing these problems, we make it guild for developers and stakeholders to understand these problems in the source codes. Our previous visualization research focused only on the process of storing information of the results of static analysis into the Database tables, querying the calculations for quality indicators (CK Metrics, Coupling, Number of function calls, Bad-smell), and then finally visualizing the extracted information. This approach has some limitations in that it takes a lot of time and space to analyze a code using information extracted from it through static analysis. That is since the tables are not normalized, it may occur to spend space and time when the tables(classes, functions, attributes, Etc.) are joined to extract information inside the code. To solve these problems, we propose a regularized design of the database tables, an extraction mechanism for quality metric indicators inside the code, and then a visualization with the extracted quality indicators on the code. Through this mechanism, we expect that the code visualization process will be optimized and that developers will be able to guide the modules that need refactoring. In the future, we will conduct learning of some parts of this process.

Automated Code Smell Detection and Refactoring using OCL (OCL을 이용한 자동화된 코드스멜 탐지와 리팩토링)

  • Kim, Tae-Woong;Kim, Tae-Gong
    • The KIPS Transactions:PartD
    • /
    • v.15D no.6
    • /
    • pp.825-840
    • /
    • 2008
  • Refactoring is a kind of software modification process that improves system qualities internally but maintains system functions externally. What should be improved on the existing source codes should take precedence over the others in such a modification process using this refactoring. Martin Fowler and Kent Beck proposed a method that identifies code smells for this purpose. Also, some studies on determining what refactoring will be applied to which targets through detecting code smells in codes were presented. However, these studies have a lot of disadvantages that show a lack of precise description for such code smells and detect limited code smells only. In addition, these studies showed other disadvantages that generate ambiguity in behavior preservation due to the fact that a description method of pre-conditions for the behavior preservation is included in a refactoring process or unformalized. Thus, our study represents a precise specification of code smells using OCL and proposes a framework that performs a refactoring process through the automatic detection of code smells using an OCL interpreter. Furthermore, we perform the automatic detection in which the code smells are be specified by using OCL to the java program and verify its applicability and effectivity through applying a refactoring process.

Effective code static analysis and visualization based on Normalization of internal code information (코드 내부 정보의 정규화 기반 효율적인 코드 정적 분석 및 가시화)

  • Park, Chansol;Jeon, Byungkook;Kim, R. Young Chul
    • Proceedings of the Korea Information Processing Society Conference
    • /
    • 2022.11a
    • /
    • pp.85-87
    • /
    • 2022
  • 고품질 코드를 위한 정적 분석은 아직도 매우 필요한 영역이며, 또한 코드의 가시화는 개발자들에게 코드의 복잡한 모듈에 대한 가이드에 필요하다. 기존의 코드 가시화는 정적 분석의 코드 내부 정보들을 DB 테이블화 및 품질 지표(CK Metrics, Coupling, # function Calls, Bed smell) 질의어화, 그리고 추출된 정보를 가시화하는 것에만 초점을 두었다. 문제는 코드 내부 정보(Class, method, parameters, etc) 테이블들에 대한 join 연산 시 엄청난 시간과 리소스가 소모된다. 이 문제를 해결하기 위해, 우리는 테이블 설계의 정규화를 제안한다. 또한 필요한 품질 지표의 질의를 통해 코드 내부 정보 추출하여 데이터 및 제어 복잡 모듈을 식별하여 refactoring 를 가이드 한다. 앞으로는 이 부분의 AI learning 을 통해 bad/good program 을 식별을 기대한다.

Code Visualization Approach for Low level Power Improvement via Identifying Performance Dissipation (성능 저하 식별을 통한 저전력 개선용 코드 가시화 방법)

  • An, Hyun Sik;Park, Bokyung;Kim, R.Young Chul;Kim, Ki Du
    • KIPS Transactions on Computer and Communication Systems
    • /
    • v.9 no.10
    • /
    • pp.213-220
    • /
    • 2020
  • The power consumption and performance of hardware-based mobile and IoT embedded systems that require high specifications are one of the important issues of these systems. In particular, the problem of excessive power consumption is because it causes a problem of increasing heat generation and shortening the life of the device. In addition, in the same environment, software also needs to perform stable operation in limited power and memory, thereby increasing power consumption of the device. In order to solve these issues, we propose a Low level power improvement via identifying performance dissipation. The proposed method identifies complex modules (especially Cyclomatic complexity, Coupling & Cohesion) through code visualization, and helps to simplify low power code patterning and performance code. Therefore, through this method, it is possible to optimize the quality of the code by reducing power consumption and improving performance.

A Catalog of Bad Smells in Design-by-Contract Methodologies with Java Modeling Language

  • Viana, Thiago
    • Journal of Computing Science and Engineering
    • /
    • v.7 no.4
    • /
    • pp.251-262
    • /
    • 2013
  • Bad smells are usually related to program source code, arising from bad design and programming practices. Refactoring activities are often motivated by the detection of bad smells. With the increasing adoption of Design-by-Contract (DBC) methodologies in formal software development, evidence of bad design practices can similarly be found in programs that combine actual production code with interface contracts. These contracts can be written in languages, such as the Java Modeling Language (JML), an extension to the Java syntax. This paper presents a catalog of bad smells that appear during DBC practice, considering JML as the language for specifying contracts. These smells are described over JML constructs, although several can appear in other DBC languages. The catalog contains 6 DBC smells. We evaluate the recurrence of DBC smells in two ways: first by describing a small study with graduate student projects, and second by counting occurrences of smells in contracts from the JML models application programming interface (API). This API contains classes with more than 1,600 lines in contracts. Along with the documented smells, suggestions are provided for minimizing the impact or even removing a bad smell. It is believed that initiatives towards the cataloging of bad smells are useful for establishing good design practices in DBC.