46 research outputs found
Comparison of Block-Based and Hybrid-Based Environments in Transferring Programming Skills to Text-based Environments
Teachers face several challenges when presenting fundamental concepts of programming in the classroom. Several tools are introduced to give a visual dimension to support the learning process. They rely on code blocks, easily manipulated in a plug and play fashion, to build a program. These block-based tools intend to familiarize students with programming logic, before diving into text-based programming languages such as Java, Python, etc. However; when transitioning from block-based to text-based programming, students often encounter a gap in their learning. The student may not be able to apply block-based foundations in a text-based environment. To bridge the gap between both environments, we developed a hybrid-based learning approach. We found that on average a hybrid-based approach increases the students understanding of programming foundations, memorization, and ease of transition by more than 30% when compared to a block-based to text-based learning approach. Finally, we provide the community with an open source, hybrid-based learning tool that can be used by students when learning programming concepts or for future studies
Behind the Intent of Extract Method Refactoring: A Systematic Literature Review
Code refactoring is widely recognized as an essential software engineering
practice to improve the understandability and maintainability of the source
code. The Extract Method refactoring is considered as "Swiss army knife" of
refactorings, as developers often apply it to improve their code quality. In
recent years, several studies attempted to recommend Extract Method
refactorings allowing the collection, analysis, and revelation of actionable
data-driven insights about refactoring practices within software projects. In
this paper, we aim at reviewing the current body of knowledge on existing
Extract Method refactoring research and explore their limitations and potential
improvement opportunities for future research efforts. Hence, researchers and
practitioners begin to be aware of the state-of-the-art and identify new
research opportunities in this context. We review the body of knowledge related
to Extract Method refactoring in the form of a systematic literature review
(SLR). After compiling an initial pool of 1,367 papers, we conducted a
systematic selection and our final pool included 83 primary studies. We define
three sets of research questions and systematically develop and refine a
classification schema based on several criteria including their methodology,
applicability, and degree of automation. The results construct a catalog of 83
Extract Method approaches indicating that several techniques have been proposed
in the literature. Our results show that: (i) 38.6% of Extract Method
refactoring studies primarily focus on addressing code clones; (ii) Several of
the Extract Method tools incorporate the developer's involvement in the
decision-making process when applying the method extraction, and (iii) the
existing benchmarks are heterogeneous and do not contain the same type of
information, making standardizing them for the purpose of benchmarking
difficult
Toward the Automatic Classification of Self-Affirmed Refactoring
The concept of Self-Affirmed Refactoring (SAR) was introduced to explore how developers document their refactoring activities in commit messages, i.e., developers explicit documentation of refactoring operations intentionally introduced during a code change. In our previous study, we have manually identified refactoring patterns and defined three main common quality improvement categories including internal quality attributes, external quality attributes, and code smells, by only considering refactoring-related commits. However, this approach heavily depends on the manual inspection of commit messages. In this paper, we propose a two-step approach to first identify whether a commit describes developer-related refactoring events, then to classify it according to the refactoring common quality improvement categories. Specifically, we combine the N-Gram TF-IDF feature selection with binary and multiclass classifiers to build a new model to automate the classification of refactorings based on their quality improvement categories. We challenge our model using a total of 2,867 commit messages extracted from well engineered open-source Java projects. Our findings show that (1) our model is able to accurately classify SAR commits, outperforming the pattern-based and random classifier approaches, and allowing the discovery of 40 more relevent SAR patterns, and (2) our model reaches an F-measure of up to 90% even with a relatively small training datase
Mining and Managing Big Data Refactoring for Design Improvement: Are We There Yet?
Refactoring is a set of code changes applied to improve the internal structure of a program, without altering its external behavior. With the rise of continuous integration and the awareness of the necessity of managing technical debt, refactoring has become even more popular in recent software builds. Recent studies indicate that developers often perform refactorings. If we consider all refactorings performed across all projects, this consists of the refactoring knowledge that represents a rich source of information that can be useful for both developers and practitioners to better understand how refactoring is being applied in practice. However, mining, processing, and extracting useful insights, from this plethora of refactorings, seems to be challenging. In this book chapter, we take a dive into how refactoring can be mined and preprocessed. We discuss all design concepts and structural metrics that can also be mined along with refactoring operations to understand their impact better. We further investigate the many practical challenges for such extraction. The volume, velocity, and variety of extracted data require careful planning. We outline the appropriate techniques from a large number of available technologies for such system implementation
Can Refactoring be Self-Affirmed? An Exploratory Study on How Developers Document their Refactoring Activities in Commit Messages
Refactoring is a critical task in software maintenance and is usually performed to enforce best design practices, or to cope with design defects. Previous studies heavily rely on defining a set of keywords to identify refactoring commits from a list of general commits extracted from a small set of softwaresystems. All approaches thus far consider all commits without checking whether refactorings had actually happened or not. In this paper, we aim at exploring how developers document their refactoring activities during the software life cycle. We call such activity Self-Affirmed Refactoring, which is an indication ofthe developer-related refactoring events in the commit messages. Our approach relies on text mining refactoring-related change messages and identifying refactoring patterns by only consideringrefactoring commits. We found that (1) developers use a variety of patterns to purposefully target refactoring-related activities; (2) developers tend to explicitly mention the improvement of specific quality attributes and code smells; and (3) commit messages withself-affirmed refactoring patterns tend to have more significant refactoring activit
Automating Source Code Refactoring in the Classroom
Refactoring is the practice of improving software quality without altering
its external behavior. Developers intuitively refactor their code for multiple
purposes, such as improving program comprehension, reducing code complexity,
dealing with technical debt, and removing code smells. However, no prior
studies have exposed the students to an experience of the process of
antipatterns detection and refactoring correction, and provided students with
toolset to practice it. To understand and increase the awareness of refactoring
concepts, in this paper, we aim to reflect on our experience with teaching
refactoring and how it helps students become more aware of bad programming
practices and the importance of correcting them via refactoring. This paper
discusses the results of an experiment in the classroom that involved carrying
out various refactoring activities for the purpose of removing antipatterns
using JDeodorant, an Eclipse plugin that supports antipatterns detection and
refactoring. The results of the quantitative and qualitative analysis with 171
students show that students tend to appreciate the idea of learning refactoring
and are satisfied with various aspects of the JDeodorant plugin's operation.
Through this experiment, refactoring can turn into a vital part of the
computing educational plan. We envision our findings enabling educators to
support students with refactoring tools tuned towards safer and trustworthy
refactoring
Code Review Practices for Refactoring Changes: An Empirical Study on OpenStack
Modern code review is a widely used technique employed in both industrial and open-source projects to improve software quality, share knowledge, and ensure adherence to coding standards and guidelines. During code review, developers may discuss refactoring activities before merging code changes in the code base. To date, code review has been extensively studied to explore its general challenges, best practices and outcomes, and socio-technical aspects. However, little is known about how refactoring is being reviewed and what developers care about when they review refactored code. Hence, in this work, we present a quantitative and qualitative study to understand what are the main criteria developers rely on to develop a decision about accepting or rejecting a submitted refactored code, and what makes this process challenging. Through a case study of 11,010 refactoring and non-refactoring reviews spread across OpenStack open-source projects, we find that refactoring-related code reviews take significantly longer to be resolved in terms of code review efforts. Moreover, upon performing a thematic analysis on a significant sample of the refactoring code review discussions, we built a comprehensive taxonomy consisting of 28 refactoring review criteria. We envision our findings reaffirming the necessity of developing accurate and efficient tools and techniques that can assist developers in the review process in the presence of refactorings
Increasing the Trust In Refactoring Through Visualization
In software development, maintaining good design is essential. The process of refactoring enables developers to improve this design during development without altering the program’s existing behavior. However, this process can be time-consuming, introduce semantic errors, and be difficult for developers inexperienced with refactoring or unfamiliar with a given code base. Automated refactoring tools can help not only by applying these changes, but by identifying opportunities for refactoring. Yet, developers have not been quick to adopt these tools due to a lack of trust between the developer and the tool. We propose an approach in the form of a visualization to aid developers in understanding these suggested operations and increasing familiarity with automated refactoring tools. We also provide a manual validation of this approach and identify options to continue experimentation