code refactoring
Recently Published Documents


TOTAL DOCUMENTS

70
(FIVE YEARS 25)

H-INDEX

7
(FIVE YEARS 2)

2022 ◽  
Vol 19 (1) ◽  
pp. 1-25
Author(s):  
Muhammad Aditya Sasongko ◽  
Milind Chabbi ◽  
Mandana Bagheri Marzijarani ◽  
Didem Unat

One widely used metric that measures data locality is reuse distance —the number of unique memory locations that are accessed between two consecutive accesses to a particular memory location. State-of-the-art techniques that measure reuse distance in parallel applications rely on simulators or binary instrumentation tools that incur large performance and memory overheads. Moreover, the existing sampling-based tools are limited to measuring reuse distances of a single thread and discard interactions among threads in multi-threaded programs. In this work, we propose ReuseTracker —a fast and accurate reuse distance analyzer that leverages existing hardware features in commodity CPUs. ReuseTracker is designed for multi-threaded programs and takes cache-coherence effects into account. By utilizing hardware features like performance monitoring units and debug registers, ReuseTracker can accurately profile reuse distance in parallel applications with much lower overheads than existing tools. It introduces only 2.9× runtime and 2.8× memory overheads. Our tool achieves 92% accuracy when verified against a newly developed configurable benchmark that can generate a variety of different reuse distance patterns. We demonstrate the tool’s functionality with two use-case scenarios using PARSEC, Rodinia, and Synchrobench benchmark suites where ReuseTracker guides code refactoring in these benchmarks by detecting spatial reuses in shared caches that are also false sharing and successfully predicts whether some benchmarks in these suites can benefit from adjacent cache line prefetch optimization.


2021 ◽  
Vol 12 (4) ◽  
pp. 0-0

Code refactoring is the modification of structure with out altering its functionality. The refactoring task is critical for enhancing the qualities for non-functional attributes, such as efficiency, understandability, reusability, and flexibility. Our research aims to build an optimized model for refactoring prediction at the method level with 7 ensemble techniques and verities of SMOTE techniques. This research has considered 5 open source java projects to investigate the accuracy of our anticipated model, which forecasts refactoring applicants by the use of ensemble techniques (BAG-KNN, BAG-DT, BAG-LOGR, ADABST, EXTC, RANF, GRDBST). Data imbalance issues are handled using 3 sampling techniques (SMOTE, BLSMOTE, SVSMOTE) to improve refactoring prediction efficiency and also focused all features and significant features. The mean accuracy of the classifiers like BAG- DT is 99.53% ,RANF is 99.55%, and EXTC is 99.59. The mean accuracy of the BLSMOTE is 97.21%. The performance of classifiers and sampling techniques are shown in terms of the box-plot diagram.


2021 ◽  
Vol 27 (9) ◽  
pp. 955-978
Author(s):  
Paul Leger ◽  
Hiroaki Fukuda ◽  
Ismael Figueroa

JavaScript is one of the main programming languages to develop highly rich responsive and interactive Web applications. In these kinds of applications, the use of asynchronous operations that execute callbacks is crucial. However, the dependency among nested callbacks, known as callback hell, can make it difficult to understand and maintain them, which will eventually mix concerns. Unfortunately, current solutions for JavaScript do not fully address the aforementioned issue. This paper presents Sync/cc, a JavaScript package that works on modern browsers. This package is a proof-of-concept that uses continuations and aspects that allow developers to write event handlers that need nested callbacks in a synchronous style, preventing callback hell. Unlike current solutions, Sync/cc is modular, succinct, and customizable because it does not require ad-hoc and scattered constructs, code refactoring, or adding ad-hoc implementations such as state machines. In practice, our proposal uses a) continuations to only suspend the current handler execution until the asynchronous operation is resolved, and b) aspects to apply continuations in a non-intrusive way. We test Sync/cc with a management information system that administers courses at a university in Chile.


2021 ◽  
Vol 20 (5) ◽  
pp. 1-25
Author(s):  
Björn Forsberg ◽  
Marco Solieri ◽  
Marko Bertogna ◽  
Luca Benini ◽  
Andrea Marongiu

Adoption of multi- and many-core processors in real-time systems has so far been slowed down, if not totally barred, due do the difficulty in providing analytical real-time guarantees on worst-case execution times. The Predictable Execution Model (PREM) has been proposed to solve this problem, but its practical support requires significant code refactoring, a task better suited for a compilation tool chain than human programmers. Implementing a PREM compiler presents significant challenges to conform to PREM requirements, such as guaranteed upper bounds on memory footprint and the generation of efficient schedulable non-preemptive regions. This article presents a comprehensive description on how a PREM compiler can be implemented, based on several years of experience from the community. We provide accumulated insights on how to best balance conformance to real-time requirements and performance and present novel techniques that extend the applicability from simple benchmark suites to real-world applications. We show that code transformed by the PREM compiler enables timing predictable execution on modern commercial off-the-shelf hardware, providing novel insights on how PREM can protect 99.4% of memory accesses on random replacement policy caches at only 16% performance loss on benchmarks from the PolyBench benchmark suite. Finally, we show that the requirements imposed on the programming model are well-aligned with current coding guidelines for timing critical software, promoting easy adoption.


Information system technology continues to evolve over time. Various fields of science including agriculture also utilize information system to improve quality and services in the agricultural sector. Indonesia is an agrarian country where most of the populations work in the agricultural sector. Based on this fact, the Indonesian government is also very supportive towards improving and developing technology in agriculture. Dutatani is one of the Agricultural Information Systems (SIP) that has been consistently developed since 2016 towards precision agriculture. One of the technologies developed is web-based technology which has many sub-systems in it. This raises the problem regarding system scalability wherein each sub-system is developed separately and uses a different development model. Each system uses a specific framework and a native. Therefore this study aims to identify which sub-systems are suitable to be developed and refactored to become a new agricultural information system portal. The identification process used a code smell and metric-based approach. The metrics used were Line of Code (LOC), Complexity, Lack of Cohesion of Methods (LCOM) and God Class. From the results of detection using a code smell, the code detected was 55.17%. This study also revealed a fact that code with a good structure would be easier to detect. Modular code that used a framework and was orderly structured could be read well by detection tools, and showed a high LCOM rate compared to structured and nativecode


Author(s):  
Sharif, K.Y Et.al

Code changes due to software change requests and bug fixing are inevitable in software lifecycle. The code modification may slowly deviate the code structure from its original structure that leads to unreadable code. Even though the code structure does not affect the software behaviour, it affects the code understandability and maintainability of software. Code refactoring is typically conducted to enhance the code structure; however, this task needs a lot of developers’ effort. Thus, this paper aims at developing a tool that will help programmers identify possible code refactoring.Weconsider two aspects of refactoring:(i) refactoring activities, and (ii) refactoring prediction model. In terms of refactoring activity, we focus on Extract Class. The object-oriented metrics are used to predict the possibility of code refactoring. The combination of two refactoring aspects recommends the possible refactoring effort and identify classes that are involved. As a result, we managed to get 79% percent of accuracy based on the 11 correct results out of 14 that the tool correctly detected. On top of supporting programmers in improving codes, this work also may give more insight into how refactoring improvessystems.


2020 ◽  
Vol 13 (4) ◽  
pp. 572-578 ◽  
Author(s):  
Mamdouh Alenezi ◽  
Mohammad Zarour ◽  
Mohammed Akour

Background: Software complexity affects its quality; a complex software is not only difficult to read, maintain and less efficient, but it also can be less secure with many vulnerabilities. Complexity metrics, e.g. cyclomatic complexity and nesting levels, are commonly used to predict and benchmark software cost and efficiency. Complexity metrics are also used to decide if code refactoring is needed. Objective: Software systems with high complexity need more time to develop and test and may lead to bad understandability and more errors. Nesting level in the target structure may result in developing more complex software in what is so-called the nesting problem. Nesting problem should be shortened by rewriting the code or breaking into several functional procedures. Method: In this paper, the relationship between the nesting levels, the cyclomatic complexity, and lines of code (LOC) metrics are measured through several software releases. In order to address how strong a relationship between these factors with the nesting level, correlation coefficients are calculated. Moreover, to examine to what extent the developers are aware of and tackle the nesting problem, the evolution of nesting levels for ten releases of five open sources systems is studied to see if it is improving over successive versions or not. Results: The result shows that the nesting level has variant effects on the cyclomatic complexity and SLOC for the five studied systems. Conclusion: nesting level has the tendency to have a positive correlation with other factors (cyclomatic complexity and LOC).


Sign in / Sign up

Export Citation Format

Share Document