22,256 research outputs found
Using Modularity Metrics to assist Move Method Refactoring of Large System
For large software systems, refactoring activities can be a challenging task,
since for keeping component complexity under control the overall architecture
as well as many details of each component have to be considered. Product
metrics are therefore often used to quantify several parameters related to the
modularity of a software system. This paper devises an approach for
automatically suggesting refactoring opportunities on large software systems.
We show that by assessing metrics for all components, move methods refactoring
an be suggested in such a way to improve modularity of several components at
once, without hindering any other. However, computing metrics for large
software systems, comprising thousands of classes or more, can be a time
consuming task when performed on a single CPU. For this, we propose a solution
that computes metrics by resorting to GPU, hence greatly shortening computation
time. Thanks to our approach precise knowledge on several properties of the
system can be continuously gathered while the system evolves, hence assisting
developers to quickly assess several solutions for reducing modularity issues
RefDiff: Detecting Refactorings in Version Histories
Refactoring is a well-known technique that is widely adopted by software
engineers to improve the design and enable the evolution of a system. Knowing
which refactoring operations were applied in a code change is a valuable
information to understand software evolution, adapt software components, merge
code changes, and other applications. In this paper, we present RefDiff, an
automated approach that identifies refactorings performed between two code
revisions in a git repository. RefDiff employs a combination of heuristics
based on static analysis and code similarity to detect 13 well-known
refactoring types. In an evaluation using an oracle of 448 known refactoring
operations, distributed across seven Java projects, our approach achieved
precision of 100% and recall of 88%. Moreover, our evaluation suggests that
RefDiff has superior precision and recall than existing state-of-the-art
approaches.Comment: Paper accepted at 14th International Conference on Mining Software
Repositories (MSR), pages 1-11, 201
Improving Prolog Programs: Refactoring for Prolog
Refactoring is an established technique from the OO-community to restructure
code: it aims at improving software readability, maintainability and
extensibility. Although refactoring is not tied to the OO-paradigm in
particular, its ideas have not been applied to Logic Programming until now.
This paper applies the ideas of refactoring to Prolog programs. A catalogue
is presented listing refactorings classified according to scope. Some of the
refactorings have been adapted from the OO-paradigm, while others have been
specifically designed for Prolog. Also the discrepancy between intended and
operational semantics in Prolog is addressed by some of the refactorings.
In addition, ViPReSS, a semi-automatic refactoring browser, is discussed and
the experience with applying \vipress to a large Prolog legacy system is
reported. Our main conclusion is that refactoring is not only a viable
technique in Prolog but also a rather desirable one.Comment: To appear in ICLP 200
Role of Patterns in Automated Task-Driven Grammar Refactoring
Grammarware engineering, and grammar-dependent software development has received considerable attention in recent years. Despite of this fact, grammar refactoring as a significant cornerstone of grammarware engineering is still weakly understood and little practiced. In this paper, we address this issue by proposing universal algorithm for automated refactoring of context-free grammars called mARTINICA, and formal specification language for preserving knowledge of grammar engineers called pLERO. Significant advantage of mARTINICA with respect to other automated refactoring approaches is that it performs grammar refactoring on the bases of user-defined refactoring task, rather then operating under some fixed objective of refactoring process. In order to be able to understand unified refactoring process of mARTINICA this paper also provides brief insight in grammar refactoring operators, which in our approach provide universal refactoring transformations for specific context-free grammars. For preserving of knowledge considering refactoring process we propose formalism based on patterns which are well-proven method of knowledge preservation in variety of other domains, such as software architectures
Recommended from our members
An empirical investigation into the impact of refactoring on regression testing
It is widely believed that refactoring improves software quality and developer’s productivity by making it easier to maintain and understand software systems. On the other hand, some believe that refactoring has the risk of functionality regression and increased testing cost. This paper investigates the impact of refactoring edits on regression tests using the version history of Java open source projects: (1) Are there adequate regression tests for refactoring in practice? (2) How many of existing regression tests are relevant to refactoring edits and thus need to be re-run for the new version? (3) What proportion of failure-inducing changes are relevant to refactorings? By using a refactoring reconstruction analysis and a change impact analysis in tandem, we investigate the relationship between the types and locations of refactoring edits identified by RefFinder and the affecting changes and affected tests identified by the FaultTracer change impact analysis. The results on three open source projects, JMeter, XMLSecurity, and ANT, show that only 22% of refactored methods and fields are tested by existing regression tests. While refactorings only constitutes 8% of atomic changes, 38% of affected tests are relevant to refactorings. Furthermore, refactorings are involved in almost a half of failed test cases. These results call for new automated regression test augmentation and selection techniques for validating refactoring edits.Electrical and Computer Engineerin
Serious Games for Software Refactoring
Software design issues can severely impede software development and maintenance. Thus, it is
important for the success of software projects that developers are aware of bad smells in code
artifacts and improve their skills to reduce these issues via refactoring. However, software refactoring
is a complex activity and involves multiple tasks and aspects. Therefore, imparting competences
for identifying bad smells and refactoring code efficiently is challenging for software engineering
education and training. The approaches proposed for teaching software refactoring in recent years
mostly concentrate on small and artificial tasks and fall short in terms of higher level competences,
such as analysis and evaluation. In this paper, we investigate the possibilities and challenges of
designing serious games for software refactoring on real-world code artifacts. In particular, we propose
a game design, where students can compete either against a predefined benchmark (technical debt) or
against each other. In addition, we describe a lightweight architecture as the technical foundation for
the game design that integrates pre-existing analysis tools such as test frameworks and software-quality
analyzers. Finally, we provide an exemplary game scenario to illustrate the application of serious
games in a learning setting
Applying ArchOptions to value the payoff of refactoring
ArchOptions is a real-options based model that we have pro-posed to value the flexibility of software architectures in response to future changes in requirements. In this paper, we build on ArchOptions to devise an options-based model, which values the architectural flexibility that results from a refactoring exercise. This value assists in understanding the payoff of investing in refactoring: if the refactored system results in an architecture that is more flexible, such that the expected added value (in the form of options) due to the en-hanced flexibility outweighs the cost of investing in this exer-cise, then refactoring is said to payoff. We apply our model to a refactoring case study from the literature
Apply Design Patterns to Refactor Software Design
Refactoring software design is a method of changing software design while explicitly preserving its unique design functionalities. Presented approach is to utilize design patterns as the basis for refactoring software design. Comparison of a design solution will be made through C++ programming language examples to exploit this approach. Developing reusable component will be discussed, the paper presents that the construction of such components can diminish the added burden of both refactoring and the use of design patterns
- …
