The search functionality is under construction.

Author Search Result

[Author] Shinpei HAYASHI(15hit)

1-15hit
  • An Investigative Study on How Developers Filter and Prioritize Code Smells

    Natthawute SAE-LIM  Shinpei HAYASHI  Motoshi SAEKI  

     
    PAPER

      Pubricized:
    2018/04/20
      Vol:
    E101-D No:7
      Page(s):
    1733-1742

    Code smells are indicators of design flaws or problems in the source code. Various tools and techniques have been proposed for detecting code smells. These tools generally detect a large number of code smells, so approaches have also been developed for prioritizing and filtering code smells. However, lack of empirical data detailing how developers filter and prioritize code smells hinders improvements to these approaches. In this study, we investigated ten professional developers to determine the factors they use for filtering and prioritizing code smells in an open source project under the condition that they complete a list of five tasks. In total, we obtained 69 responses for code smell filtration and 50 responses for code smell prioritization from the ten professional developers. We found that Task relevance and Smell severity were most commonly considered during code smell filtration, while Module importance and Task relevance were employed most often for code smell prioritization. These results may facilitate further research into code smell detection, prioritization, and filtration to better focus on the actual needs of developers.

  • ChangeMacroRecorder: Accurate Recording of Fine-Grained Textual Changes of Source Code

    Katsuhisa MARUYAMA  Shinpei HAYASHI  Takayuki OMORI  

     
    PAPER-Software Engineering

      Pubricized:
    2020/08/24
      Vol:
    E103-D No:11
      Page(s):
    2262-2277

    Recording source code changes comes to be well recognized as an effective means for understanding the evolution of existing software and making its future changes efficient. Therefore, modern integrated development environments (IDEs) tend to employ tools that record fine-grained textual changes of source code. However, there is still no satisfactory tool that accurately records textual changes. We propose ChangeMacroRecorder that automatically and silently records all textual changes of source code and in real time correlates those textual changes with actions causing them while a programmer is writing and modifying it on the Eclipse's Java editor. The improvement with respect to the accuracy of recorded textual changes enables both programmers and researchers to exactly understand how the source code was evolved. This paper presents detailed information on how ChangeMacroRecorder achieves the accurate recording of textual changes and demonstrates how accurate textual changes were recorded in our experiment consisting of nine programming tasks.

  • Supporting Refactoring Activities Using Histories of Program Modification

    Shinpei HAYASHI  Motoshi SAEKI  Masahito KURIHARA  

     
    PAPER

      Vol:
    E89-D No:4
      Page(s):
    1403-1412

    Refactoring is one of the promising techniques for improving program design by means of program transformation with preserving behavior, and is widely applied in practice. However, it is difficult for engineers to identify how and where to refactor programs, because proper knowledge and skills of a high order are required of them. In this paper, we propose the technique to instruct how and where to refactor a program by using a sequence of its modifications. We consider that the histories of program modifications reflect developers' intentions, and focusing on them allows us to provide suitable refactoring guides. Our technique can be automated by storing the correspondence of modification patterns to suitable refactoring operations. By implementing an automated supporting tool, we show its feasibility. The tool is implemented as a plug-in for Eclipse IDE. It selects refactoring operations by matching between a sequence of program modifications and modification patterns.

  • Supporting Proactive Refactoring: An Exploratory Study on Decaying Modules and Their Prediction

    Natthawute SAE-LIM  Shinpei HAYASHI  Motoshi SAEKI  

     
    PAPER-Software Engineering

      Pubricized:
    2021/06/28
      Vol:
    E104-D No:10
      Page(s):
    1601-1615

    Code smells can be detected using tools such as a static analyzer that detects code smells based on source code metrics. Developers perform refactoring activities based on the result of such detection tools to improve source code quality. However, such an approach can be considered as reactive refactoring, i.e., developers react to code smells after they occur. This means that developers first suffer the effects of low-quality source code before they start solving code smells. In this study, we focus on proactive refactoring, i.e., refactoring source code before it becomes smelly. This approach would allow developers to maintain source code quality without having to suffer the impact of code smells. To support the proactive refactoring process, we propose a technique to detect decaying modules, which are non-smelly modules that are about to become smelly. We present empirical studies on open source projects with the aim of studying the characteristics of decaying modules. Additionally, to facilitate developers in the refactoring planning process, we perform a study on using a machine learning technique to predict decaying modules and report a factor that contributes most to the performance of the model under consideration.

  • Detecting Architectural Violations Using Responsibility and Dependency Constraints of Components

    Shinpei HAYASHI  Fumiki MINAMI  Motoshi SAEKI  

     
    PAPER

      Pubricized:
    2018/04/20
      Vol:
    E101-D No:7
      Page(s):
    1780-1789

    Utilizing software architecture patterns is important for reducing maintenance costs. However, maintaining code according to the constraints defined by the architecture patterns is time-consuming work. As described herein, we propose a technique to detect code fragments that are incompliant to the architecture as fine-grained architectural violations. For this technique, the dependence graph among code fragments extracted from the source code and the inference rules according to the architecture are the inputs. A set of candidate components to which a code fragment can be affiliated is attached to each node of the graph and is updated step-by-step. The inference rules express the components' responsibilities and dependency constraints. They remove candidate components of each node that do not satisfy the constraints from the current estimated state of the surrounding code fragment. If the inferred role of a code fragment does not include the component that the code fragment currently belongs to, then it is detected as a violation. We have implemented our technique for the Model-View-Controller for Web Application architecture pattern. By applying the technique to web applications implemented using Play Framework, we obtained accurate detection results. We also investigated how much does each inference rule contribute to the detection of violations.

  • FOREWORD Open Access

    Shinpei HAYASHI  

     
    FOREWORD

      Vol:
    E106-D No:2
      Page(s):
    137-137
  • FOREWORD Open Access

    Shinpei HAYASHI  

     
    FOREWORD

      Vol:
    E105-D No:1
      Page(s):
    1-1
  • Impact Analysis on an Attributed Goal Graph

    Shinpei HAYASHI  Daisuke TANABE  Haruhiko KAIYA  Motoshi SAEKI  

     
    PAPER

      Vol:
    E95-D No:4
      Page(s):
    1012-1020

    Requirements changes frequently occur at any time of a software development process, and their management is a crucial issue to develop software of high quality. Meanwhile, goal-oriented analysis techniques are being put into practice to elicit requirements. In this situation, the change management of goal graphs and its support are necessary. This paper presents a technique related to the change management of goal graphs, realizing impact analysis on a goal graph when its modifications occur. Our impact analysis detects conflicts that arise when a new goal is added, and investigates the achievability of the other goals when an existing goal is deleted. We have implemented a supporting tool for automating the analysis. Two case studies suggested the efficiency of the proposed approach.

  • Locating Concepts on Use Case Steps in Source Code Open Access

    Shinpei HAYASHI  Teppei KATO  Motoshi SAEKI  

     
    PAPER

      Pubricized:
    2023/12/20
      Vol:
    E107-D No:5
      Page(s):
    602-612

    Use case descriptions describe features consisting of multiple concepts with following a procedural flow. Because existing feature location techniques lack a relation between concepts in such features, it is difficult to identify the concepts in the source code with high accuracy. This paper presents a technique to locate concepts in a feature described in a use case description consisting of multiple use case steps using dependency between them. We regard each use case step as a description of a concept and apply an existing concept location technique to the descriptions of concepts and obtain lists of modules. Also, three types of dependencies: time, call, and data dependencies among use case steps are extracted based on their textual description. Modules in the obtained lists failing to match the dependency between concepts are filtered out. Thus, we can obtain more precise lists of modules. We have applied our technique to use case descriptions in a benchmark. Results show that our technique outperformed baseline setting without applying the filtering.

  • Using Hierarchical Transformation to Generate Assertion Code from OCL Constraints

    Rodion MOISEEV  Shinpei HAYASHI  Motoshi SAEKI  

     
    PAPER-Software System

      Vol:
    E94-D No:3
      Page(s):
    612-621

    Object Constraint Language (OCL) is frequently applied in software development for stipulating formal constraints on software models. Its platform-independent characteristic allows for wide usage during the design phase. However, application in platform-specific processes, such as coding, is less obvious because it requires usage of bespoke tools for that platform. In this paper we propose an approach to generate assertion code for OCL constraints for multiple platform specific languages, using a unified framework based on structural similarities of programming languages. We have succeeded in automating the process of assertion code generation for four different languages using our tool. To show effectiveness of our approach in terms of development effort, an experiment was carried out and summarised.

  • Automating Bad Smell Detection in Goal Refinement of Goal Models

    Shinpei HAYASHI  Keisuke ASANO  Motoshi SAEKI  

     
    PAPER

      Pubricized:
    2022/01/06
      Vol:
    E105-D No:5
      Page(s):
    837-848

    Goal refinement is a crucial step in goal-oriented requirements analysis to create a goal model of high quality. Poor goal refinement leads to missing requirements and eliciting incorrect requirements as well as less comprehensiveness of produced goal models. This paper proposes a technique to automate detecting bad smells of goal refinement, symptoms of poor goal refinement. At first, to clarify bad smells, we asked subjects to discover poor goal refinement concretely. Based on the classification of the specified poor refinement, we defined four types of bad smells of goal refinement: Low Semantic Relation, Many Siblings, Few Siblings, and Coarse Grained Leaf, and developed two types of measures to detect them: measures on the graph structure of a goal model and semantic similarity of goal descriptions. We have implemented a supporting tool to detect bad smells and assessed its usefulness by an experiment.

  • Cataloging Bad Smells in Use Case Descriptions and Automating Their Detection

    Yotaro SEKI  Shinpei HAYASHI  Motoshi SAEKI  

     
    PAPER

      Pubricized:
    2022/01/06
      Vol:
    E105-D No:5
      Page(s):
    849-863

    Use case modeling is popular to represent the functionality of the system to be developed, and it consists of two parts: a use case diagram and use case descriptions. Use case descriptions are structured text written in natural language, and the usage of natural language can lead to poor descriptions such as ambiguous, inconsistent, and/or incomplete descriptions. Poor descriptions lead to missing requirements and eliciting incorrect requirements as well as less comprehensiveness of the produced use case model. This paper proposes a technique to automate detecting bad smells of use case descriptions, i.e., symptoms of poor descriptions. At first, to clarify bad smells, we analyzed existing use case models to discover poor use case descriptions concretely and developed the list of bad smells, i.e., a catalog of bad smells. Some of the bad smells can be refined into measures using the Goal-Question-Metric paradigm to automate their detection. The main contributions of this paper are the developed catalog of bad smells and the automated detection of these bad smells. We have implemented an automated smell detector for 22 bad smells at first and assessed its usefulness by an experiment. As a result, the first version of our tool got a precision ratio of 0.591 and a recall ratio of 0.981. Through evaluating our catalog and the automated tool, we found additional six bad smells and two metrics. Then, we obtained the precision of 0.596 and the recall of 1.000 by our final version of the automated tool.

  • Search-Based Refactoring Detection from Source Code Revisions

    Shinpei HAYASHI  Yasuyuki TSUDA  Motoshi SAEKI  

     
    PAPER-Management Techniques

      Vol:
    E93-D No:4
      Page(s):
    754-762

    This paper proposes a technique for detecting the occurrences of refactoring from source code revisions. In a real software development process, a refactoring operation may sometimes be performed together with other modifications at the same revision. This means that detecting refactorings from the differences between two versions stored in a software version archive is not usually an easy process. In order to detect these impure refactorings, we model the detection within a graph search. Our technique considers a version of a program as a state and a refactoring as a transition between two states. It then searches for the path that approaches from the initial to the final state. To improve the efficiency of the search, we use the source code differences between the current and the final state for choosing the candidates of refactoring to be applied next and estimating the heuristic distance to the final state. Through case studies, we show that our approach is feasible to detect combinations of refactorings.

  • Slicing Fine-Grained Code Change History

    Katsuhisa MARUYAMA  Takayuki OMORI  Shinpei HAYASHI  

     
    PAPER-Software Engineering

      Pubricized:
    2015/12/21
      Vol:
    E99-D No:3
      Page(s):
    671-687

    Change-aware development environments can automatically record fine-grained code changes on a program and allow programmers to replay the recorded changes in chronological order. However, since they do not always need to replay all the code changes to investigate how a particular entity of the program has been changed, they often eliminate several code changes of no interest by manually skipping them in replaying. This skipping action is an obstacle that makes many programmers hesitate when they use existing replaying tools. This paper proposes a slicing mechanism that automatically removes manually skipped code changes from the whole history of past code changes and extracts only those necessary to build a particular class member of a Java program. In this mechanism, fine-grained code changes are represented by edit operations recorded on the source code of a program and dependencies among edit operations are formalized. The paper also presents a running tool that slices the operation history and replays its resulting slices. With this tool, programmers can avoid replaying nonessential edit operations for the construction of class members that they want to understand. Experimental results show that the tool offered improvements over conventional replaying tools with respect to the reduction of the number of edit operations needed to be examined and over history filtering tools with respect to the accuracy of edit operations to be replayed.

  • Design Pattern Detection by Using Meta Patterns

    Shinpei HAYASHI  Junya KATADA  Ryota SAKAMOTO  Takashi KOBAYASHI  Motoshi SAEKI  

     
    PAPER-Software Engineering

      Vol:
    E91-D No:4
      Page(s):
    933-944

    One of the approaches to improve program understanding is to extract what kinds of design pattern are used in existing object-oriented software. This paper proposes a technique for efficiently and accurately detecting occurrences of design patterns included in source codes. We use both static and dynamic analyses to achieve the detection with high accuracy. Moreover, to reduce computation and maintenance costs, detection conditions are hierarchically specified based on Pree's meta patterns as common structures of design patterns. The usage of Prolog to represent the detection conditions enables us to easily add and modify them. Finally, we have implemented an automated tool as an Eclipse plug-in and conducted experiments with Java programs. The experimental results show the effectiveness of our approach.