6 research outputs found
Π‘Π΅ΠΌΠ°Π½ΡΠΈΡΠ΅ΡΠΊΠΈ-ΠΎΡΠΈΠ΅Π½ΡΠΈΡΠΎΠ²Π°Π½Π½Π°Ρ ΠΌΠΈΠ³ΡΠ°ΡΠΈΡ Java-ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌ: ΠΎΠΏΡΡ ΠΏΡΠ°ΠΊΡΠΈΡΠ΅ΡΠΊΠΎΠ³ΠΎ ΠΏΡΠΈΠΌΠ΅Π½Π΅Π½ΠΈΡ
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
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
Using Clustering Techniques to Guide Refactoring of Object-Oriented Classes
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