6 research outputs found

    БСмантичСски-ориСнтированная миграция Java-ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌ: ΠΎΠΏΡ‹Ρ‚ практичСского примСнСния

    Get PDF
    The purpose of the study is to demonstrate the feasibility of automated code migration to a new set of programming libraries. Code migration is a common task in modern software projects. For example, it may arise when a project should be ported to a more secure or feature-rich library, a new platform or a new version of an already used library. The developed method and tool are based on the previously created by the authors a formalism for describing libraries semantics. The formalism specifies a library behaviour by using a system of extended finite state machines (EFSM). This paper outlines the metamodel designed to specify library descriptions and proposes an easy to use domainspecific language (DSL), which can be used to define models for particular libraries. The mentioned metamodel directly forms the code migration procedure. A process of migration is split into five steps, and each step is also described in the paper. The procedure uses an algorithm based on the breadth- first search extended for the needs of the migration task. Models and algorithms were implemented in the prototype of an automated code migration tool. The prototype was tested by both artificial code examples and a real-world open source project. The article describes the experiments performed, the difficulties that have arisen in the process of migration of test samples, and how they are solved in the proposed procedure. The results of experiments indicate that code migration can be successfully automated. Данная ΡΡ‚Π°Ρ‚ΡŒΡ посвящСна Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ΅ ΠΏΡ€ΠΎΡ†Π΅Π΄ΡƒΡ€Ρ‹ Π°Π²Ρ‚ΠΎΠΌΠ°Ρ‚ΠΈΠ·ΠΈΡ€ΠΎΠ²Π°Π½Π½ΠΎΠΉ ΠΌΠΈΠ³Ρ€Π°Ρ†ΠΈΠΈ Java-ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌ Π½Π° Π½ΠΎΠ²Ρ‹ΠΉ Π½Π°Π±ΠΎΡ€ Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊ. Π—Π°Π΄Π°Ρ‡Π° ΠΌΠΈΠ³Ρ€Π°Ρ†ΠΈΠΈ (портирования) ΠΊΠΎΠ΄Π° часто встрСчаСтся Π² соврСмСнных ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½Ρ‹Ρ… ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π°Ρ…. НапримСр, такая Π·Π°Π΄Π°Ρ‡Π° ΠΌΠΎΠΆΠ΅Ρ‚ Π²ΠΎΠ·Π½ΠΈΠΊΠ½ΡƒΡ‚ΡŒ, ΠΊΠΎΠ³Π΄Π° ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ Π½Π΅ΠΎΠ±Ρ…ΠΎΠ΄ΠΈΠΌΠΎ пСрСнСсти Π½Π° Π±ΠΎΠ»Π΅Π΅ Π±Π΅Π·ΠΎΠΏΠ°ΡΠ½ΡƒΡŽ ΠΈΠ»ΠΈ Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΎΠ½Π°Π»ΡŒΠ½ΡƒΡŽ Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΡƒ, Π½Π° Π½ΠΎΠ²ΡƒΡŽ ΠΏΠ»Π°Ρ‚Ρ„ΠΎΡ€ΠΌΡƒ ΠΈΠ»ΠΈ Π½Π° Π½ΠΎΠ²ΡƒΡŽ Π²Π΅Ρ€ΡΠΈΡŽ ΡƒΠΆΠ΅ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅ΠΌΠΎΠΉ Π² ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π΅ Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠΈ. Π’ Π΄Π°Π½Π½ΠΎΠΉ Ρ€Π°Π±ΠΎΡ‚Π΅ прСдставлСна ΠΏΡ€ΠΎΡ†Π΅Π΄ΡƒΡ€Π° Π°Π²Ρ‚ΠΎΠΌΠ°Ρ‚ΠΈΠ·ΠΈΡ€ΠΎΠ²Π°Π½Π½ΠΎΠΉ ΠΌΠΈΠ³Ρ€Π°Ρ†ΠΈΠΈ, основанная Π½Π° сСмантичСском ΠΏΠΎΠ΄Ρ…ΠΎΠ΄Π΅. Для ΠΏΡ€ΠΎΡ†Π΅Π΄ΡƒΡ€Ρ‹ ΠΌΠΈΠ³Ρ€Π°Ρ†ΠΈΠΈ Π±Ρ‹Π»Π° Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Π°Π½Π° ΠΌΠ΅Ρ‚Π°ΠΌΠΎΠ΄Π΅Π»ΡŒ Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠΈ, ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΡŽΡ‰Π°Ρ ΠΏΡ€Π΅Π΄Π»ΠΎΠΆΠ΅Π½Π½Ρ‹ΠΉ Ρ€Π°Π½Π΅Π΅ Π°Π²Ρ‚ΠΎΡ€Π°ΠΌΠΈ Ρ„ΠΎΡ€ΠΌΠ°Π»ΠΈΠ·ΠΌ ΠΈ прСдназначСнная для описания Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊ Π½Π° ΠΎΠ±ΡŠΠ΅ΠΊΡ‚Π½ΠΎ-ΠΎΡ€ΠΈΠ΅Π½Ρ‚ΠΈΡ€ΠΎΠ²Π°Π½Π½Ρ‹Ρ… языках. Π€ΠΎΡ€ΠΌΠ°Π»ΠΈΠ·ΠΌ описываСт ΠΏΠΎΠ²Π΅Π΄Π΅Π½ΠΈΠ΅ Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊ с ΠΏΠΎΠΌΠΎΡ‰ΡŒΡŽ систСмы Ρ€Π°ΡΡˆΠΈΡ€Π΅Π½Π½Ρ‹Ρ… ΠΊΠΎΠ½Π΅Ρ‡Π½Ρ‹Ρ… Π°Π²Ρ‚ΠΎΠΌΠ°Ρ‚ΠΎΠ² (РКА). ΠŸΡ€ΠΎΡ†Π΅Π΄ΡƒΡ€Π° ΠΌΠΈΠ³Ρ€Π°Ρ†ΠΈΠΈ Ρ€Π°Π·Π±ΠΈΡ‚Π° Π½Π° ΠΏΡΡ‚ΡŒ шагов, ΠΊΠ°ΠΆΠ΄Ρ‹ΠΉ шаг ΠΏΠΎΠ΄Ρ€ΠΎΠ±Π½ΠΎ описан Π² тСкстС ΡΡ‚Π°Ρ‚ΡŒΠΈ. Π’ ΠΏΡ€ΠΎΡ†Π΅Π΄ΡƒΡ€Π΅ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅Ρ‚ΡΡ Π°Π»Π³ΠΎΡ€ΠΈΡ‚ΠΌ вычислСния эквивалСнтной трассы Π½Π° основС поиска Π² ΡˆΠΈΡ€ΠΈΠ½Ρƒ, Ρ€Π°ΡΡˆΠΈΡ€Π΅Π½Π½Ρ‹ΠΉ для Ρ€Π΅ΡˆΠ΅Π½ΠΈΡ Π·Π°Π΄Π°Ρ‡ ΠΌΠΈΠ³Ρ€Π°Ρ†ΠΈΠΈ. ΠŸΡ€Π΅Π΄Π»ΠΎΠΆΠ΅Π½Π½Π°Ρ ΠΏΡ€ΠΎΡ†Π΅Π΄ΡƒΡ€Π° Ρ€Π΅Π°Π»ΠΈΠ·ΠΎΠ²Π°Π½Π° Π² ΠΏΡ€ΠΎΡ‚ΠΎΡ‚ΠΈΠΏΠ΅ инструмСнта ΠΌΠΈΠ³Ρ€Π°Ρ†ΠΈΠΈ. Π˜Π½ΡΡ‚Ρ€ΡƒΠΌΠ΅Π½Ρ‚ Π²ΠΊΠ»ΡŽΡ‡Π°Π΅Ρ‚ Π² сСбя ΠΌΠΎΠ΄ΡƒΠ»ΠΈ извлСчСния трассы выполнСния ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌ, Π²ΠΈΠ·ΡƒΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΠΈ ΠΌΠΎΠ΄Π΅Π»Π΅ΠΉ Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊ, взаимодСйствия с ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»Π΅ΠΌ ΠΈ нСпосрСдствСнно ΠΌΠΈΠ³Ρ€Π°Ρ†ΠΈΠΈ. Для инструмСнта Π±Ρ‹Π» Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Π°Π½ язык описания Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊ. ΠŸΡ€ΠΎΡ‚ΠΎΡ‚ΠΈΠΏ инструмСнта Π±Ρ‹Π» протСстирован ΠΊΠ°ΠΊ Π½Π° искусствСнных ΠΏΡ€ΠΈΠΌΠ΅Ρ€Π°Ρ…, Ρ‚Π°ΠΊ ΠΈ Π½Π° ΡΡƒΡ‰Π΅ΡΡ‚Π²ΡƒΡŽΡ‰Π΅ΠΌ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π΅. Π’ ΡΡ‚Π°Ρ‚ΡŒΠ΅ ΠΏΠΎΠ΄Ρ€ΠΎΠ±Π½ΠΎ описаны ΠΏΡ€ΠΎΠ²Π΅Π΄Π΅Π½Π½Ρ‹Π΅ экспСримСнты, ΠΎΡ‚Π΄Π΅Π»ΡŒΠ½ΠΎ ΠΎΡ‚ΠΌΠ΅Ρ‡Π΅Π½Ρ‹ слоТности, Π²ΠΎΠ·Π½ΠΈΠΊΠ°ΡŽΡ‰ΠΈΠ΅ Π² процСссС ΠΌΠΈΠ³Ρ€Π°Ρ†ΠΈΠΈ тСстовых ΠΏΡ€ΠΈΠΌΠ΅Ρ€ΠΎΠ², ΠΈ Ρ‚ΠΎ, ΠΊΠ°ΠΊ ΠΎΠ½ΠΈ Ρ€Π΅ΡˆΠ°ΡŽΡ‚ΡΡ Π² ΠΏΡ€Π΅Π΄Π»ΠΎΠΆΠ΅Π½Π½ΠΎΠΉ ΠΏΡ€ΠΎΡ†Π΅Π΄ΡƒΡ€Π΅. Π’ качСствС Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊ Π² экспСримСнтах ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΡŽΡ‚ΡΡ Ρ€Π΅Π°Π»ΠΈΠ·Π°Ρ†ΠΈΠΈ ΠΏΡ€ΠΎΡ‚ΠΎΠΊΠΎΠ»Π° HTTP ΠΈ Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠΈ протоколирования. Π Π΅Π·ΡƒΠ»ΡŒΡ‚Π°Ρ‚Ρ‹ тСстирования ΠΏΠΎΠΊΠ°Π·Π°Π»ΠΈ, Ρ‡Ρ‚ΠΎ миграция ΠΊΠΎΠ΄Π° ΠΌΠΎΠΆΠ΅Ρ‚ Π±Ρ‹Ρ‚ΡŒ ΡƒΡΠΏΠ΅ΡˆΠ½ΠΎ Π°Π²Ρ‚ΠΎΠΌΠ°Ρ‚ΠΈΠ·ΠΈΡ€ΠΎΠ²Π°Π½Π° с использованиСм Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Π°Π½Π½ΠΎΠΉ ΠΏΡ€ΠΎΡ†Π΅Π΄ΡƒΡ€Ρ‹.

    Code Smells and Refactoring: A Tertiary Systematic Review of Challenges and Observations

    Full text link
    In this paper, we present a tertiary systematic literature review of previous surveys, secondary systematic literature reviews, and systematic mappings. We identify the main observations (what we know) and challenges (what we do not know) on code smells and refactoring. We show that code smells and refactoring have a strong relationship with quality attributes, i.e., with understandability, maintainability, testability, complexity, functionality, and reusability. We argue that code smells and refactoring could be considered as the two faces of a same coin. Besides, we identify how refactoring affects quality attributes, more than code smells. We also discuss the implications of this work for practitioners, researchers, and instructors. We identify 13 open issues that could guide future research work. Thus, we want to highlight the gap between code smells and refactoring in the current state of software-engineering research. We wish that this work could help the software-engineering research community in collaborating on future work on code smells and refactoring

    Modularity and reuse of domain-specific languages:an exploration with MetaMod

    Get PDF

    Implementing refactorings in IntelliJ IDEA

    No full text

    Using Clustering Techniques to Guide Refactoring of Object-Oriented Classes

    No full text
    Much of the cost of software development is maintenance. Well structured software tends to be cheaper to maintain than poorly structured software, because it is easier to analyze and modify. The research described in this thesis concentrates on determining how to improve the structure of object-oriented classes, the fundamental unit of organization for object-oriented programs. Some refactoring tools can mechanically restructure object-oriented classes, given the appropriate inputs regarding what attributes and methods belong in the revised classes. We address the research question of determining what belongs in those classes, i.e., determining which methods and attributes most belong together and how those methods and attributes can be organized into classes. Clustering techniques can be useful for grouping entities that belong together; however, doing so requires matching an appropriate algorithm to the domain task and choosing appropriate inputs. This thesis identifies clustering techniques suitable for determining the redistribution of existing attributes and methods among object-oriented classes, and discusses the strengths and weaknesses of these techniques. It then describes experiments using these techniques as the basis for refactoring open source Java classes and the changes in the class quality metrics that resulted. Based on these results and on others reported in the literature, it recommends particular clustering techniques for particular refactoring problems. These clustering techniques have been incorporated into an open source refactoring tool that provides low-cost assistance to programmers maintaining object-oriented classes. Such maintenance can reduce the total cost of software development
    corecore