3,884 results on '"Code refactoring"'
Search Results
2. An Accurate Identifier Renaming Prediction and Suggestion Approach.
- Author
-
JINGXUAN ZHANG, JUNPENG LUO, JIAHUI LIANG, LINA GONG, and ZHIQIU HUANG
- Subjects
SOURCE code ,RANDOM forest algorithms ,RESEARCH personnel ,FORECASTING - Abstract
Identifiers play an important role in helping developers analyze and comprehend source code. However, many identifiers exist that are inconsistent with the corresponding code conventions or semantic functions, leading to flawed identifiers. Hence, identifiers need to be renamed regularly. Even though researchers have proposed several approaches to identify identifiers that need renaming and further suggest correct identifiers for them, these approaches only focus on a single or a limited number of granularities of identifiers without universally considering all the granularities and suggest a series of sub-tokens for composing identifiers without completely generating new identifiers. In this article, we propose a novel identifier renaming prediction and suggestion approach. Specifically, given a set of training source code, we first extract all the identifiers in multiple granularities. Then, we design and extract five groups of features from identifiers to capture inherent properties of identifiers themselves and the relationships between identifiers and code conventions, as well as other related code entities, enclosing files, and change history. By parsing the change history of identifiers, we can figure out whether specific identifiers have been renamed or not. These identifier features and their renaming history are used to train a Random Forest classifier, which can be further used to predict whether a given new identifier needs to be renamed or not. Subsequently, for the identifiers that need renaming, we extract all the related code entities and their renaming change history. Based on the intuition that identifiers are co-evolved as their relevant code entities with similar patterns and renaming sequences, we could suggest and recommend a series of new identifiers for those identifiers. We conduct extensive experiments to validate our approach in both the Java projects and the Android projects. Experimental results demonstrate that our approach could identify identifiers that need renaming with an average F-measure of more than 89%, which outperforms the state-of-the-art approach by 8.30% in the Java projects and 21.38% in the Android projects. In addition, our approach achieves a Hit@10 of 48.58% and 40.97% in the Java and Android projects in suggesting correct identifiers and outperforms the state-of-the-art approach by 29.62% and 15.75%, respectively. [ABSTRACT FROM AUTHOR]
- Published
- 2023
- Full Text
- View/download PDF
3. Post-Refactoring Recovery of Unit Tests: An Automated Approach .
- Author
-
Qusef, Abdallah, Murad, Sharefa, Alsalhi, Najeh, and Shudayfat, Eman
- Subjects
SOFTWARE refactoring ,PROGRAMMING languages ,SOURCE code - Abstract
In application development lifecycle, specifically in test-driven development, refactoring plays a crucial role in sustaining ease. However, inspite of bringing ease, refactoring does not ensure the desired behaviour of code after it is applied. Because refactoring tends to worsen the alignments between source code and its corresponding units. One significant solution to the aforementioned issue is the technique called unit testing. As unit testing enable the developers to confidently apply refactoring while avoiding undesired code behaviour. Unit testing provides effective preventive measures for avoiding bugs by providing immediate feedback, thus assisting to mitigate the fear of change. In this work, we present a tool called GreenRefPlus which efficiently enables the developers to maintain the veracity of code after the process of refactoring is applied. The proposed tool provides automatic recovery for the unit tests after the code is refactored. In this work, we consider Java as our target programming language and we focus on five various types of refactoring, which include Rename Method, Extract Method, Move Method, Parameter Addition and Parameter Removal. Our experiments indicate that the proposed tool GreenRefPlus enables us to consistently refactor the code and apply unit tests. The results presented in our work reveal that the proposed tool assists developers in saving approximately 43% of the total time required to manually recover from broken unit tests. [ABSTRACT FROM AUTHOR]
- Published
- 2023
- Full Text
- View/download PDF
4. Tales from the Code #2: A Detailed Assessment of Code Refactoring’s Impact on Energy Consumption
- Author
-
Ournani, Zakaria, Rouvoy, Romain, Rust, Pierre, Penhoat, Joel, Filipe, Joaquim, Editorial Board Member, Ghosh, Ashish, Editorial Board Member, Prates, Raquel Oliveira, Editorial Board Member, Zhou, Lizhu, Editorial Board Member, Fill, Hans-Georg, editor, van Sinderen, Marten, editor, and Maciaszek, Leszek A., editor
- Published
- 2022
- Full Text
- View/download PDF
5. Comparative Analysis of Mikado Method Approach to Refactor Legacy Code to Common Approach in Software Quality Measuring
- Author
-
Susanto, Hansel, Alexander, Kelvin, Sanjaya, Louis Vincent, Gunawan, Alexander Agung Santoso, Kacprzyk, Janusz, Series Editor, Gomide, Fernando, Advisory Editor, Kaynak, Okyay, Advisory Editor, Liu, Derong, Advisory Editor, Pedrycz, Witold, Advisory Editor, Polycarpou, Marios M., Advisory Editor, Rudas, Imre J., Advisory Editor, Wang, Jun, Advisory Editor, and Silhavy, Radek, editor
- Published
- 2022
- Full Text
- View/download PDF
6. On the accuracy of code complexity metrics: A neuroscience-based guideline for improvement
- Author
-
Gao Hao, Haytham Hijazi, João Durães, Júlio Medeiros, Ricardo Couceiro, Chan Tong Lam, César Teixeira, João Castelhano, Miguel Castelo Branco, Paulo Carvalho, and Henrique Madeira
- Subjects
code complexity metrics ,code comprehension ,EEG ,cognitive load ,mental effort ,code refactoring ,Neurosciences. Biological psychiatry. Neuropsychiatry ,RC321-571 - Abstract
Complexity is the key element of software quality. This article investigates the problem of measuring code complexity and discusses the results of a controlled experiment to compare different views and methods to measure code complexity. Participants (27 programmers) were asked to read and (try to) understand a set of programs, while the complexity of such programs is assessed through different methods and perspectives: (a) classic code complexity metrics such as McCabe and Halstead metrics, (b) cognitive complexity metrics based on scored code constructs, (c) cognitive complexity metrics from state-of-the-art tools such as SonarQube, (d) human-centered metrics relying on the direct assessment of programmers’ behavioral features (e.g., reading time, and revisits) using eye tracking, and (e) cognitive load/mental effort assessed using electroencephalography (EEG). The human-centered perspective was complemented by the subjective evaluation of participants on the mental effort required to understand the programs using the NASA Task Load Index (TLX). Additionally, the evaluation of the code complexity is measured at both the program level and, whenever possible, at the very low level of code constructs/code regions, to identify the actual code elements and the code context that may trigger a complexity surge in the programmers’ perception of code comprehension difficulty. The programmers’ cognitive load measured using EEG was used as a reference to evaluate how the different metrics can express the (human) difficulty in comprehending the code. Extensive experimental results show that popular metrics such as V(g) and the complexity metric from SonarSource tools deviate considerably from the programmers’ perception of code complexity and often do not show the expected monotonic behavior. The article summarizes the findings in a set of guidelines to improve existing code complexity metrics, particularly state-of-the-art metrics such as cognitive complexity from SonarSource tools.
- Published
- 2023
- Full Text
- View/download PDF
7. Modernization and optimization of a legacy open-source CFD code for high-performance computing architectures
- Author
-
Kalinkin, Alexander [Intel Corp., Novosibirsk (Russia)]
- Published
- 2017
- Full Text
- View/download PDF
8. Metrics in Software Development and Evolution with Design Patterns
- Author
-
Derezińska, Anna, Kacprzyk, Janusz, Series Editor, Pal, Nikhil R., Advisory Editor, Bello Perez, Rafael, Advisory Editor, Corchado, Emilio S., Advisory Editor, Hagras, Hani, Advisory Editor, Kóczy, László T., Advisory Editor, Kreinovich, Vladik, Advisory Editor, Lin, Chin-Teng, Advisory Editor, Lu, Jie, Advisory Editor, Melin, Patricia, Advisory Editor, Nedjah, Nadia, Advisory Editor, Nguyen, Ngoc Thanh, Advisory Editor, Wang, Jun, Advisory Editor, and Silhavy, Radek, editor
- Published
- 2019
- Full Text
- View/download PDF
9. Modernizing Titan2D, a Parallel AMR Geophysical Flow Code to Support Multiple Rheologies and Extendability
- Author
-
Simakov, Nikolay A., Jones-Ivey, Renette L., Akhavan-Safaei, Ali, Aghakhani, Hossein, Jones, Matthew D., Patra, Abani K., Goos, Gerhard, Founding Editor, Hartmanis, Juris, Founding Editor, Bertino, Elisa, Editorial Board Member, Gao, Wen, Editorial Board Member, Steffen, Bernhard, Editorial Board Member, Woeginger, Gerhard, Editorial Board Member, Yung, Moti, Editorial Board Member, Weiland, Michèle, editor, Juckeland, Guido, editor, Alam, Sadaf, editor, and Jagode, Heike, editor
- Published
- 2019
- Full Text
- View/download PDF
10. XScan: An Integrated Tool for Understanding Open Source Community-Based Scientific Code
- Author
-
Zheng, Weijian, Wang, Dali, Song, Fengguang, Hutchison, David, Editorial Board Member, Kanade, Takeo, Editorial Board Member, Kittler, Josef, Editorial Board Member, Kleinberg, Jon M., Editorial Board Member, Mattern, Friedemann, Editorial Board Member, Mitchell, John C., Editorial Board Member, Naor, Moni, Editorial Board Member, Pandu Rangan, C., Editorial Board Member, Steffen, Bernhard, Editorial Board Member, Terzopoulos, Demetri, Editorial Board Member, Tygar, Doug, Editorial Board Member, Goos, Gerhard, Founding Editor, Hartmanis, Juris, Founding Editor, Rodrigues, João M. F., editor, Cardoso, Pedro J. S., editor, Monteiro, Jânio, editor, Lam, Roberto, editor, Krzhizhanovskaya, Valeria V., editor, Lees, Michael H., editor, Dongarra, Jack J., editor, and Sloot, Peter M.A., editor
- Published
- 2019
- Full Text
- View/download PDF
11. Installing and Managing Extensions
- Author
-
Del Sole, Alessandro and Del Sole, Alessandro
- Published
- 2019
- Full Text
- View/download PDF
12. Measuring Class Cohesion Based on Client Similarities Between Method Pairs: An Improved Approach That Supports Refactoring
- Author
-
Musaad Alzahrani
- Subjects
Software engineering ,software measurement ,cohesion metrics ,code refactoring ,Electrical engineering. Electronics. Nuclear engineering ,TK1-9971 - Abstract
Class cohesion is an important quality attribute that has an impact on other quality attributes such understandability, testability, and maintainability. Therefore, classes with low cohesion should be refactored in order to improve their overall qualities. Many cohesion metrics have been introduced in the literature to automatically assess the quality of the class and support refactoring activities. Most existing metrics measure the class cohesion based on how the methods of a class are internally related to each other, while a few metrics measure the class cohesion based on how the methods are externally used by the clients of the class. Unfortunately, the existing client-based cohesion metrics cannot automatically support refactoring techniques such as the Extract Class refactoring. Therefore, this article proposes a new client-based cohesion metric that can be used to automatically identify Extract Class refactoring opportunities. The proposed metric is theoretically evaluated by proving the compliance of the metric to the mathematical cohesion properties, while it is empirically evaluated by conducting a large case study on three systems to compare the metric with other cohesion metrics. Finally, the paper introduces and evaluates an Extract Class refactoring approach based the proposed cohesion metric.
- Published
- 2020
- Full Text
- View/download PDF
13. Python Code Smell Refactoring Route Generation Based on Association Rule and Correlation.
- Author
-
Wang, Guanglei, Chen, Junhua, Gao, Jianhua, and Huang, Zijie
- Subjects
PYTHON programming language ,COMPUTER software quality control ,SOFTWARE architecture ,SMELL ,RANK correlation (Statistics) ,DESIGN software - Abstract
Code smell is a software quality problem caused by software design flaws. Refactoring code smells can improve software maintainability. While prior works mostly focused on Java code smells, only a few prior researches detect and refactor code smells of Python. Therefore, we intend to outline a route (i.e. sequential refactoring operation) for refactoring Python code smells, including LC, LM, LMC, LPL, LSC, LBCL, LLF, MNC, CCC and LTCE. The route could instruct developers to save effort by refactoring the smell strongly correlated with other smells in advance. As a result, more smells could be resolved by a single refactoring. First, we reveal the co-occurrence and the inter-causation between smells. Then, we evaluate the smells' correlation. Results highlight seven groups of smells with high co-occurrence. Meanwhile, 10 groups of smells correlate with each other in a significant level of Spearman's correlation coefficient at 0.01. Finally, we generate the refactoring route based on the association rules, we exploit an empirical verification with 10 developers involved. The results of Kendall's Tau show that the proposed refactoring route has a high inter-agreement with the developer's perception. In conclusion, we propose four refactoring routes to provide guidance for practitioners, i.e. {LPL → LLF}, {LPL → LBCL}, {LPL → LMC} and {LPL → LM → LC → CCC → MNC}. [ABSTRACT FROM AUTHOR]
- Published
- 2021
- Full Text
- View/download PDF
14. Accelerated Application Development: The ORNL Titan Experience
- Author
-
Turner, John [Oak Ridge National Lab. (ORNL), Oak Ridge, TN (United States)]
- Published
- 2015
- Full Text
- View/download PDF
15. A Structure-Driven Process of Automated Refactoring to Design Patterns
- Author
-
Derezińska, Anna, Kacprzyk, Janusz, Series editor, Pal, Nikhil R., Advisory editor, Bello Perez, Rafael, Advisory editor, Corchado, Emilio S., Advisory editor, Hagras, Hani, Advisory editor, Kóczy, László T., Advisory editor, Kreinovich, Vladik, Advisory editor, Lin, Chin-Teng, Advisory editor, Lu, Jie, Advisory editor, Melin, Patricia, Advisory editor, Nedjah, Nadia, Advisory editor, Nguyen, Ngoc Thanh, Advisory editor, Wang, Jun, Advisory editor, Świątek, Jerzy, editor, Borzemski, Leszek, editor, and Wilimowska, Zofia, editor
- Published
- 2018
- Full Text
- View/download PDF
16. 一种基于DBSCAN算法的代码包层次重构改进方法.
- Author
-
李文昊, 李英梅, and 边奕心
- Abstract
In the research of code refactoring at the package level, in order to obtain the software structure of "high cohesion and low coupling", the hierarchical clustering algorithm is considered to be a better software clustering algorithm because of its simple and effective characteristics and high clustering accuracy. However, the time complexity of the hierarchical clustering algorithm is high, which is not conducive to processing large-scale software. The DBSCAN algorithm, on the other hand, has faster clustering speed but lower accuracy. Therefore, a software hierarchical clustering algorithm based on DBSCAN is proposed, which uses the classes generated by the DBSCAN algorithm to constrain the clustering space of the hierarchical clustering algorithm. This algorithm can keep the accuracy of the hierarchical clustering algorithm unchanged, and its time complexity lies between DBSCAN and the hierarchical clustering algorithm. The experimental results show that the algorithm can effectively divide the software reasonably, and prove that the performance of the algorithm is better than other common clustering algorithms through expert evaluation, module division metrics and algorithm running time comparison. [ABSTRACT FROM AUTHOR]
- Published
- 2021
- Full Text
- View/download PDF
17. Technical feasibility of a software project for virtualization of tasks performed by students in the higher education course - problems and solutions in evolutionary development
- Author
-
Ivan Kuyumdzhiev
- Subjects
code refactoring ,database ,database management systems ,NoSQL ,software changes ,Electronic computers. Computer science ,QA75.5-76.95 ,Economics as a science ,HB71-74 - Abstract
The dynamics of business requirements necessitates the modernization of teaching methods in schools and universities. The purpose of the publication is to explore the technological aspects of creating and maintaining a complex software system for virtual learning. In order to assess technical feasibility, a classifier of potential software changes is proposed, taking into account the impact they have on the database administrators and developers. The article offers different approaches to managing changes, both at the programming code level and at the database level. The limitations imposed by the technologies used are analyzed and, on this basis, the best methods for managing changes in the virtual learning software system are outlined. The results of the study can be useful for software system designers and database administrators.
- Published
- 2019
18. Software smell detection techniques: A systematic literature review.
- Author
-
AbuHassan, Amjad, Alshayeb, Mohammad, and Ghouti, Lahouari
- Subjects
- *
SOFTWARE maintenance , *AUTHORSHIP , *SOFTWARE architecture , *SYSTEMS software - Abstract
Software smells indicate design or code issues that might degrade the evolution and maintenance of software systems. Detecting and identifying these issues are challenging tasks. This paper explores, identifies, and analyzes the existing software smell detection techniques at design and code levels. We carried out a systematic literature review (SLR) to identify and collect 145 primary studies related to smell detection in software design and code. Based on these studies, we address several questions related to the analysis of the existing smell detection techniques in terms of abstraction level (design or code), targeted smells, used metrics, implementation, and validation. Our analysis identified several detection techniques categories. We observed that 57% of the studies did not use any performance measures, 41% of them omitted details on the targeted programing language, and the detection techniques were not validated in 14% of these studies. With respect to the abstraction level, only 18% of the studies addressed bad smell detection at the design level. This low coverage urges for more focus on bad smell detection at the design level to handle them at early stages. Finally, our SLR brings to the attention of the research community several opportunities for future research. [ABSTRACT FROM AUTHOR]
- Published
- 2021
- Full Text
- View/download PDF
19. Refactoring Legacy Software for Layer Separation.
- Author
-
Khalilipour, Alireza, Challenger, Moharram, Onat, Mehmet, Gezgen, Hale, and Kardas, Geylani
- Subjects
SOFTWARE refactoring ,SOFTWARE architecture ,SOFTWARE maintenance ,LEGACY systems ,OPTICAL scanners ,INFORMATION storage & retrieval systems - Abstract
One of the main aims in the layered software architecture is to divide the code into different layers so that each layer contains related modules and serves its upper layers. Although layered software architecture is matured now; many legacy information systems do not benefit from the advantages of this architecture and their code for the process/business and data access are mostly in a single layer. In many legacy systems, due to the integration of the code in one layer, changes to the software and its maintenance are mostly difficult. In addition, the big size of a single layer causes the load concentration and turns the server into a bottleneck where all requests must be executed on it. In order to eliminate these deficiencies, this paper presents a refactoring mechanism for the automatic separation of the business and data access layers by detecting the data access code based on a series of patterns in the input code and transferring it to a new layer. For this purpose, we introduce a code scanner which detects the target points based on these patterns and hence automatically makes the changes required for the layered architecture. According to the experimental evaluation results, the performance of the system is increased for the layer separated software using the proposed approach. Furthermore, it is examined that the application of the proposed approach provides additional benefits considering the qualitative criteria such as loosely coupling and tightly coherency. [ABSTRACT FROM AUTHOR]
- Published
- 2021
- Full Text
- View/download PDF
20. X-SBR: On the Use of the History of Refactorings for Explainable Search-Based Refactoring and Intelligent Change Operators
- Author
-
Chaima Abid, Dhia Rzig, Tushar Sharma, Marouane Kessentini, and Thiago do Nascimento Ferreira
- Subjects
Code refactoring ,Computer science ,business.industry ,Search-based software engineering ,Software system ,computer.software_genre ,Software engineering ,business ,computer ,Software - Published
- 2022
21. Efficient Relational Sentence Ordering Network
- Author
-
Yingming Li, Baiyun Cui, and Zhongfei Mark Zhang
- Subjects
Computer science ,business.industry ,Applied Mathematics ,computer.software_genre ,Automatic summarization ,Task (computing) ,Computational Theory and Mathematics ,Code refactoring ,Artificial Intelligence ,Pointer (computer programming) ,Computer Vision and Pattern Recognition ,Language model ,Artificial intelligence ,Paragraph ,business ,computer ,Encoder ,Software ,Natural language processing ,Sentence - Abstract
In this paper, we propose a novel deep Efficient Relational Sentence Ordering Network (referred to as ERSON) by leveraging pre-trained language model in both encoder and decoder architectures to strengthen the coherence modeling of the entire model. Specifically, we first introduce a divide-and-fuse BERT (referred to as DF-BERT), a new refactor of BERT network, where lower layers in the improved model encode each sentence in the paragraph independently, which are shared by different sentence pairs, and the higher layers learn the cross-attention between sentence pairs jointly. It enables us to capture the semantic concepts and contextual information between the sentences of the paragraph, while significantly reducing the runtime and memory consumption without sacrificing the model performance. Besides, a Relational Pointer Decoder (referred to as RPD) is developed, which utilizes the pre-trained Next Sentence Prediction (NSP) task of BERT to capture the useful relative ordering information between sentences to enhance the order predictions. In addition, a variety of knowledge distillation based losses are added as auxiliary supervision to further improve the ordering performance. The extensive evaluations on Sentence Ordering, Order Discrimination, and Multi-Document Summarization tasks show the superiority of ERSON to the state-of-the-art ordering methods.
- Published
- 2022
22. Verification Approach for Refactoring Transformation Rules of State-Based Models
- Author
-
Bogdan Korel, Nada Almasri, and Luay Tahat
- Subjects
Computer science ,Programming language ,business.industry ,Extended finite-state machine ,computer.software_genre ,Automation ,Automaton ,Transformation (function) ,Software ,Code refactoring ,Unified Modeling Language ,State (computer science) ,business ,computer ,computer.programming_language - Published
- 2022
23. Design of satellite tracking platform based on software defined radio
- Author
-
Kang Guodong, Xue Chao, Li Linlin, and Cui Yufu
- Subjects
software defined radios(SDR) ,satellite tracking platform ,code refactoring ,Electronics ,TK7800-8360 - Abstract
This paper proposes a kind of design for satellite tracking platform which is based on software defined radio(SDR) technology and constructed with several properties such as open, modularization, code refactoring, etc. Compared with those platforms without code refactoring, the function of dynamic code refactoring in this platform behaves some characters of task switching, equipment reusability, configuration flexibility, high-speed. This platform can update and extend its function to meet different requirements for satellite tracking tasks.
- Published
- 2019
- Full Text
- View/download PDF
24. Software Development Lifecycle for Energy Efficiency: Techniques and Tools.
- Author
-
GEORGIOU, STEFANOS, RIZOU, STAMATIA, and SPINELLIS, DIOMIDIS
- Subjects
- *
ENERGY development , *COMPUTER software development , *ENERGY consumption , *PARALLEL programming , *SOFTWARE verification , *DATA structures - Abstract
Motivation: In modern it systems, the increasing demand for computational power is tightly coupled with ever higher energy consumption. Traditionally, energy efficiency research has focused on reducing energy consumption at the hardware level. Nevertheless, the software itself provides numerous opportunities for improving energy efficiency. Goal: Given that energy efficiency for it systems is a rising concern, we investigate existing work in the area of energy-aware software development and identify open research challenges. Our goal is to reveal limitations, features, and tradeoffs regarding energy-performance for software development and provide insights on existing approaches, tools, and techniques for energy-efficient programming. Method: We analyze and categorize research work mostly extracted from top-tier conferences and journals concerning energy efficiency across the software development lifecycle phases. Results: Our analysis shows that related work in this area has focused mainly on the implementation and verification phases of the software development lifecycle. Existing work shows that the use of parallel and approximate programming, source code analyzers, efficient data structures, coding practices, and specific programming languages can significantly increase energy efficiency. Moreover, the utilization of energy monitoring tools and benchmarks can provide insights for the software practitioners and raise energy-awareness during the development phase. [ABSTRACT FROM AUTHOR]
- Published
- 2020
- Full Text
- View/download PDF
25. Programming Real-Time Sound in Python.
- Author
-
De Pra, Yuri and Fontana, Federico
- Subjects
PYTHON programming language ,REAL-time programming ,AGILE software development ,COMPUTER music ,PROGRAMMING languages - Abstract
For its versatility, Python has become one of the most popular programming languages. In spite of its possibility to straightforwardly link native code with powerful libraries for scientific computing, the use of Python for real-time sound applications development is often neglected in favor of alternative programming languages, which are tailored to the digital music domain. This article introduces Python as a real-time software programming tool to interested readers, including Python developers who are new to the real time or, conversely, sound programmers who have not yet taken this language into consideration. Cython and Numba are proposed as libraries supporting agile development of efficient software running at machine level. Moreover, it is shown that refactoring few critical parts of the program under these libraries can dramatically improve the performances of a sound algorithm. Such improvements can be directly benchmarked within Python, thanks to the existence of appropriate code parsing resources. After introducing a simple sound processing example, two algorithms that are known from the literature are coded to show how Python can be effectively employed to program sound software. Finally, issues of efficiency are mainly discussed in terms of latency of the resulting applications. Overall, such issues suggest that the use of real-time Python should be limited to the prototyping phase, where the benefits of language flexibility prevail on low latency requirements, for instance, needed during computer music live performances. [ABSTRACT FROM AUTHOR]
- Published
- 2020
- Full Text
- View/download PDF
26. Recovering Android Bad Smells from Android Applications.
- Author
-
Rasool, Ghulam and Ali, Azhar
- Subjects
- *
ODORS , *APPLICATION software , *WEB-based user interfaces , *MOBILE apps , *COMPUTER software quality control , *SOFTWARE measurement , *OBJECT-oriented programming - Abstract
The demand for Android mobile software applications is continuously increasing with the evolution of technology and new enriching features to make the life of people easy and comfortable. The mobile-based software applications are frequently updated as compared to other web and desktop applications. Due to these frequent updating cycles, the developers sometimes make changes in a rush which leads to poor design choices known as antipatterns or code bad smells. Code bad smells degrade the performance of applications and make evolution difficult. The recovery of bad smells from mobile software applications is still at infancy but it is a very important research realm that requires the attention of researchers and practitioners. The results of recovery may be used for comprehension, maintenance, reengineering, evolution and refactoring of these applications. Most state-of-the-art approaches focused on the detection of code bad smells from object-oriented applications and they target only a few code smells. We present a novel approach supplemented with tool support to recover 25 Android code bad smells from Android-specific software applications. We evaluate our approach by performing experiments on 4 open source and 3 industrial Android-specific software applications and measure accuracy using standard metrics. [ABSTRACT FROM AUTHOR]
- Published
- 2020
- Full Text
- View/download PDF
27. Code Smell Detection and Refactoring Using AST Visitor.
- Author
-
Ilyas, M., Razzaq, S., Maqbool, F., Ahmed, W., and Adnan, S. M.
- Subjects
ODORS ,SOFTWARE engineering ,DESIGN software ,REVERSE engineering ,SOURCE code ,SMELL ,MEDICAL software - Abstract
Software design inspection is a broad research area encircling technique that assist in different software engineering activities, such as requirement, design, development, testing, deployment, maintenance, reverse engineering etc. Covered methods include study, development and evaluation of multiple approaches for visually analyzing the software system, including their structure, execution behavior, and evolution. Code smells are the surfaces that indicate usually a deeper problem in the system. Code smells are the violation of fundamental design principles. This paper reveals a newly developed tool named, "Code Smell Visualizer" that detect the code smells automatically from java source code. Give refactoring suggestions, perform refactoring of speculative generality. [ABSTRACT FROM AUTHOR]
- Published
- 2020
28. Assessment of the Code Refactoring Dataset Regarding the Maintainability of Methods
- Author
-
Kádár, István, Hegedűs, Péter, Ferenc, Rudolf, Gyimóthy, Tibor, Hutchison, David, Series editor, Kanade, Takeo, Series editor, Kittler, Josef, Series editor, Kleinberg, Jon M., Series editor, Mattern, Friedemann, Series editor, Mitchell, John C., Series editor, Naor, Moni, Series editor, Pandu Rangan, C., Series editor, Steffen, Bernhard, Series editor, Terzopoulos, Demetri, Series editor, Tygar, Doug, Series editor, Weikum, Gerhard, Series editor, Gervasi, Osvaldo, editor, Murgante, Beniamino, editor, Misra, Sanjay, editor, Rocha, Ana Maria A.C., editor, Torre, Carmelo M., editor, Taniar, David, editor, Apduhan, Bernady O., editor, Stankova, Elena, editor, and Wang, Shangguang, editor
- Published
- 2016
- Full Text
- View/download PDF
29. Improve the Performance of Mobile Applications Based on Code Optimization Techniques Using PMD and Android Lint
- Author
-
Nguyen, Man D., Huynh, Thang Q., Nguyen, T. Hung, Hutchison, David, Series editor, Kanade, Takeo, Series editor, Kittler, Josef, Series editor, Kleinberg, Jon M., Series editor, Mattern, Friedemann, Series editor, Mitchell, John C., Series editor, Naor, Moni, Series editor, Pandu Rangan, C., Series editor, Steffen, Bernhard, Series editor, Terzopoulos, Demetri, Series editor, Tygar, Doug, Series editor, Weikum, Gerhard, Series editor, Huynh, Van-Nam, editor, Inuiguchi, Masahiro, editor, Le, Bac, editor, Le, Bao Nguyen, editor, and Denoeux, Thierry, editor
- Published
- 2016
- Full Text
- View/download PDF
30. Refactoring
- Author
-
Davis, Adam L. and Davis, Adam L.
- Published
- 2016
- Full Text
- View/download PDF
31. Green software: Refactoring approach
- Author
-
Rajni Sehgal, Ramanuj Sharma, Deepti Mehrotra, and Renuka Nagpal
- Subjects
General Computer Science ,Java ,Computer science ,business.industry ,Information technology ,Code smell ,020206 networking & telecommunications ,02 engineering and technology ,Energy consumption ,computer.software_genre ,Software ,Code refactoring ,0202 electrical engineering, electronic engineering, information engineering ,020201 artificial intelligence & image processing ,Software system ,business ,Software engineering ,computer ,computer.programming_language ,Efficient energy use - Abstract
An energy efficient information and communication system is a need of the day. Information technology related industries are making efforts to reduce power consumption by improvising both the hardware infrastructure and software systems. The hardware is driven by software; hence, design and development of software may have a significant impact energy need of the overall system. Many times it is observed that complex software performs useless tasks leading to power consumption, referred to as energy leak. The solution of energy leaks for mobile applications has attracted the interest of researchers, but still handling energy leaks issues for applications developed using Java-based technology need to be explored. While designing software during maintenance phase, code smells are introduced which not only reduce performance of the software also may lead to execution of useless code thus enhancing the energy leak. The common practice of the software industry to remove the code smells is use of refactoring strategy. The basic idea of this study is to understand the impact of refactoring on total energy consumption. To explore this hypothesis a set of Java based applications are selected, code smell present in these applications are discovered and a suitable refactoring strategy is applied to reduce the code smell. Power consumption is estimated using an open source tool Microsoft Joulemeter, it monitors energy usage by machine resources and estimates power consumption. The energy consumption before and after refactoring is recorded and statistical t-test is performed to validate the proposed concept.
- Published
- 2022
32. PowerCog: A Practical Method for Recognizing Power Quality Disturbances Accurately in a Noisy Environment
- Author
-
Lei Fu, Ke Yan, and Tiantian Zhu
- Subjects
business.industry ,Computer science ,Wavelet transform ,Pattern recognition ,computer.software_genre ,Automation ,Convolutional neural network ,Computer Science Applications ,Support vector machine ,Electric power system ,Code refactoring ,Control and Systems Engineering ,Principal component analysis ,Classifier (linguistics) ,Artificial intelligence ,Electrical and Electronic Engineering ,business ,computer ,Information Systems - Abstract
Currently, with the growing applicability of nonlinear electrical devices, power quality disturbances (PQDs) often occur in power systems. Previous works usually extracted statistical features from electrical signals manually and constructed classifiers with traditional machine learning methods for PQD monitoring. Furthermore, noisy tags or unlabeled data (different from noisy signals) are usually ignored in the traditional training stage, and these methods fail to meet the high accuracy and automation demands of real-world scenarios. To overcome the shortcomings of existing methods, this paper proposes a practical method called PowerCog for accurately recognizing PQDs in noisy environments. First, an input voltage waveform signal is divided into several intrinsic mode functions by an empirical wavelet transform (EWT), and these functions are then aligned into columns to form a matrix. Second, tri-training is utilized for label refactoring to improve the generalization ability of the model in a noisy environment. Then, an optimized convolutional neural network (CNN) structure combined with principal component analysis (PCA) is deployed to extract and select the universal features automatically. Finally, a support vector machine (SVM) classifier is constructed to recognize PQD patterns. Several comparative experiments are performed to verify the effectiveness and accuracy of PowerCog in complex environments.
- Published
- 2022
33. Enabling Decision and Objective Space Exploration for Interactive Multi-Objective Refactoring
- Author
-
Rick Kazman, Marouane Kessentini, Soumaya Rebai, Vahid Alizadeh, and Houcem Fehri
- Subjects
Focus (computing) ,Process (engineering) ,business.industry ,Computer science ,media_common.quotation_subject ,Space (commercial competition) ,computer.software_genre ,Space exploration ,Code refactoring ,Code (cryptography) ,Quality (business) ,Software engineering ,business ,Cluster analysis ,computer ,Software ,media_common - Abstract
Due to the conflicting nature of quality measures, there are always multiple refactoring options to fix quality issues. Thus, interaction with developers is critical to inject their preferences. While several interactive techniques have been proposed, developers still need to examine large numbers of possible refactorings, which makes the interaction time-consuming. Furthermore, existing interactive tools are limited to the "objective space" to show developers the impacts of refactorings on quality attributes. However, the "decision space" is also important since developers may want to focus on specific code locations. In this paper, we propose an interactive approach that enables developers to pinpoint their preference simultaneously in the objective (quality metrics) and decision (code location) spaces. Developers may be interested in looking at refactoring strategies that can improve a specific quality attribute, such as extendibility (objective space), but they are related to different code locations (decision space). A plethora of solutions is generated at first using multi-objective search that tries to find the possible trade-offs between quality objectives. Then, an unsupervised learning algorithm clusters the trade-off solutions based on their quality metrics, and another clustering algorithm is applied to each cluster of the objective space to identify solutions related to different code locations. The objective and decision spaces can now be explored more efficiently by the developer, who can give feedback on a smaller number of solutions. This feedback is then used to generate constraints for the optimization process, to focus on the developer's regions of interest in both the decision and objective spaces. The manual validation of selected refactoring solutions by developers confirms that our approach outperforms state of the art refactoring techniques.
- Published
- 2022
34. Enabling Large-Scale Simulation of CAM on the Sunway TaihuLight Supercomputer
- Author
-
Yuxuan Li, Wubin Wan, Wei Xue, Xiaohui Duan, Haohuan Fu, Jinzhe Yang, Lin Gan, Guangwen Yang, Weiguo Liu, Kai Xu, and Yuhu Chen
- Subjects
Computer simulation ,Computer science ,Domain decomposition methods ,Parallel computing ,computer.software_genre ,Supercomputer ,Porting ,Theoretical Computer Science ,Computational Theory and Mathematics ,Code refactoring ,Hardware and Architecture ,Vectorization (mathematics) ,Code (cryptography) ,computer ,Software ,Sunway TaihuLight - Abstract
The Community Atmosphere Model (CAM) has been ported, redesigned, and scaled to the full system of the Sunway TaihuLight, and provides peta-scale climate modeling performance. Based on a novel domain decomposition method, we have fully optimized the complete model code by using both OpenACC refactoring and more aggressive and finer-grained Athread approaches. The Athread approach enables us to achieve exceptional memory control and usage, efficient vectorization, and sophisticated utilization of the thread-level communication mechanism. We have also further refined the load-balance behaviors towards ultra-large-scale numerical simulation. By combining all these novelties, we achieved a simulation speed of 7.2 and 25.6 simulation-year-per-day (SYPD) for global 25-km and 100-km resolution, respectively (1.2- to 2.2-fold improvements over previous efforts), and a sustainable double-precision performance of 3.3 PFlops for a 750 m global simulation when using 10,075,000 cores.
- Published
- 2022
35. Optimization of Software Release Planning Considering Architectural Dependencies, Cost, and Value
- Author
-
Raghvinder S. Sangwan, Ipek Ozkaya, Robert L. Nord, and Ashkan Negahban
- Subjects
Structure (mathematical logic) ,Iterative and incremental development ,Measure (data warehouse) ,Code refactoring ,Computer science ,Order (exchange) ,Value (economics) ,Rework ,computer.software_genre ,computer ,Software ,Reliability engineering ,Software release life cycle - Abstract
Within any incremental development paradigm, there exists a tension between the desire to deliver value to the customer early and the desire to reduce cost by avoiding architectural refactoring and rework in subsequent releases. What is lacking is an analytical framework that quantifies opportunities and risks of choosing one or the other of these strategies or a blend of the two. This paper demonstrates the use of design structure and domain mapping matrices for analyzing architectural dependencies and proposes an optimization-based decision-making technique to support effective release planning. The optimization models recommend the order in which architectural elements and features should be implemented across different releases so as to: (a) minimize rework cost; (b) maximize early value delivery; or, (c) optimize an integrated measure of cost and value. These analytic models can be applied earlier in the life cycle and, hence, provide timely information about the progress and changes that occur at each iteration.
- Published
- 2022
36. Functionally Equivalent C Code Clone Refactoring by Combining Static Analysis with Dynamic Testing
- Author
-
Su, Xiaohong, Zhang, Fanlong, Li, Xia, Ma, Peijun, Wang, Tiantian, Kacprzyk, Janusz, Series editor, Patnaik, Srikanta, editor, and Li, Xiaolong, editor
- Published
- 2014
- Full Text
- View/download PDF
37. Supporting structured parallel program design, development and tuning in FastFlow.
- Author
-
Gazzarri, Leonardo and Danelutto, Marco
- Subjects
- *
PARALLEL programming , *C++ - Abstract
The design and tuning of parallel programs is known to be a hard and error-prone process. Structured parallel programming helps overcoming part of the related problems by properly and carefully ensuring separation of concerns in between application and system programmers. In this work, we describe the design and the implementation of ff-RPL, a shell supporting structured parallel programming development in FastFlow. The shell provides ways to explore the space of functionally equivalent, alternative parallel implementations of the same application with different non functional properties. It also provides ways to tune and optimize existing parallel applications standalone or while targeting particular hardware architectures. The tool is entirely written in C++. It has been designed in such a way it can be easily extended to take into account new non functional features, refactoring and optimization rules, as well as different parallel patterns. Experimental results are shown validating the general ff-RPL design as well as its FastFlow code generation features. [ABSTRACT FROM AUTHOR]
- Published
- 2019
- Full Text
- View/download PDF
38. Reducing energy usage in resource-intensive Java-based scientific applications via micro-benchmark based code refactorings.
- Author
-
Longo, Mathias, Rodriguez, Ana, Mateos, Cristian, and Zunino, Alejandro
- Abstract
In-silico research has grown considerably. Today's scientific code involves long-running computer simulations and hence powerful computing infrastructures are needed. Traditionally, research in high-performance computing has focused on executing code as fast as possible, while energy has been recently recognized as another goal to consider. Yet, energy-driven research has mostly focused on the hardware and middleware layers, but few efforts target the application level, where many energy-aware optimizations are possible. We revisit a catalog of Java primitives commonly used in OO scientific programming, or micro-benchmarks, to identify energy-friendly versions of the same primitive. We then apply the micro-benchmarks to classical scientific application kernels and machine learning algorithms for both single-thread and multi-thread implementations on a server. Energy usage reductions at the micro-benchmark level are substantial, while for applications obtained reductions range from 3.90% to 99.18%. [ABSTRACT FROM AUTHOR]
- Published
- 2019
- Full Text
- View/download PDF
39. WCET optimization strategy based on source code refactoring.
- Author
-
Meng, Fanqi and Su, Xiaohong
- Subjects
- *
SOURCE code , *SOFTWARE refactoring , *FLOWGRAPHS , *MAINTAINABILITY (Engineering) , *CYBER physical systems - Abstract
For safety-critical real-time software, if worst-case execution time (WCET) violates a time constraint, it is considered having a timeliness defect. To fix the defect early with lower cost, a WCET optimization strategy is proposed based on source code refactoring. The strategy guides programmers to search refactoring opportunities in the correct positions and perform refactorings by a reasonable sequence. To this end, the worst-case execution path (WCEP) of a target program is firstly extracted from its control flow graph. Then the WCEP is mapped onto source code by the back-annotation technique. An abstract syntax tree-based invariant path identification algorithm is developed for recognizing the invariant paths from the source-level WCEP. According to the invariant paths and loop statements, the source code is divided into four optimization regions with different priorities. Thus the searching scopes are reduced, and invalid refactorings are avoided. On the basis, the refactoring which has the lowest cost in the same region is performed first. To support the strategy, a cost model of source code refactoring is designed. It mainly considers adverse effects of refactorings on the maintainability of source code. The experimental results showed that the optimization strategy reduced WCET effectively and maximally kept the maintainability. Therefore it is more suitable for WCET optimization in an early programming phase. It is helpful to fix the defects early and then guarantee the timeliness safety of the software. [ABSTRACT FROM AUTHOR]
- Published
- 2019
- Full Text
- View/download PDF
40. RefactoringMiner 2.0
- Author
-
Nikolaos Tsantalis, Ameya Ketkar, and Danny Dig
- Subjects
Code review ,Computer science ,business.industry ,020207 software engineering ,02 engineering and technology ,computer.software_genre ,Machine learning ,Maintenance engineering ,Code refactoring ,Application domain ,0202 electrical engineering, electronic engineering, information engineering ,Task analysis ,Code (cryptography) ,Software system ,Artificial intelligence ,business ,computer ,Software - Abstract
Refactoring detection is crucial for a variety of applications and tasks: (i) empirical studies about code evolution, (ii) tools for library API migration, (iii) code reviews and change comprehension. However, recent research has questioned the accuracy of the state-of-the-art refactoring mining tools, which poses threats to the reliability of the detected refactorings. Moreover, the majority of refactoring mining tools depend on code similarity thresholds. Finding universal threshold values that can work well for all projects, regardless of their architectural style, application domain, and development practices is extremely challenging. Therefore, in a previous work [1], we introduced the first refactoring mining tool that does not require any code similarity thresholds to operate. In this work, we extend our tool to support low-level refactorings that take place within the body of methods. To evaluate our tool, we created one of the most accurate, complete, and representative refactoring oracles to date, including 7,223 true instances for 40 different refactoring types detected by one (minimum) up to six (maximum) different tools, and validated by one up to four refactoring experts. Our evaluation showed that our approach achieves the highest average precision (99.6%) and recall (94%) among all competitive tools, and on median is 2.6 times faster than the second faster competitive tool.
- Published
- 2022
41. RefDiff 2.0: A Multi-Language Refactoring Detection Tool
- Author
-
João Carlos Riccó Plácido da Silva, Marco Tulio Valente, Danilo Silva, Ricardo Terra, and Gustavo Santos
- Subjects
Source code ,Java ,business.industry ,Computer science ,media_common.quotation_subject ,020207 software engineering ,02 engineering and technology ,JavaScript ,computer.software_genre ,Software ,Code refactoring ,0202 electrical engineering, electronic engineering, information engineering ,Plug-in ,Software engineering ,business ,Precision and recall ,computer ,Software evolution ,media_common ,computer.programming_language - Abstract
Identifying refactoring operations in source code changes is valuable to understand software evolution. Therefore, several tools have been proposed to automatically detect refactorings applied in a system by comparing source code between revisions. The availability of such infrastructure has enabled researchers to study refactoring practice in large scale, leading to important advances on refactoring knowledge. However, although a plethora of programming languages are used in practice, the vast majority of existing studies are restricted to the Java language due to limitations of the underlying tools. This fact poses an important threat to external validity. Thus, to overcome such limitation, in this paper we propose RefDiff 2.0, a multi-language refactoring detection tool. Our approach leverages techniques proposed in our previous work and introduces a novel refactoring detection algorithm that relies on the Code Structure Tree (CST), a simple yet powerful representation of the source code that abstracts away the specificities of particular programming languages. Despite its language-agnostic design, our evaluation shows that RefDiff's precision (96%) and recall (80%) are on par with state-of-the-art refactoring detection approaches specialized in the Java language. Our modular architecture also enables one to seamless extend RefDiff to support other languages via a plugin system. As a proof of this, we implemented plugins to support two other popular programming languages: JavaScript and C. Our evaluation in these languages reveals that precision and recall ranges from 88% to 91%. With these results, we envision RefDiff as a viable alternative for breaking the single-language barrier in refactoring research and in practical applications of refactoring detection.
- Published
- 2021
42. Echinobase: leveraging an extant model organism database to build a knowledgebase supporting research on the genomics and biology of echinoderms
- Author
-
Arshinoff, Bradley, Cary, Gregory, Karimi, Kamran, Foley, Saoirse, Agalakov, Sergei, Delgado, Francisco, Lotay, Vaneet, Ku, Carolyn, Pells, Troy, Beatman, Thomas, Kim, Eugene, Cameron, R Andrew, Vize, Peter, Telmer, Cheryl A, Croce, Jenifer, Ettensohn, Charles, Hinman, Veronica, Telmer, Cheryl, Laboratoire de Biologie du Développement de Villefranche sur mer (LBDV), Sorbonne Université (SU)-Centre National de la Recherche Scientifique (CNRS)-Institut de la Mer de Villefranche (IMEV), and Sorbonne Université (SU)-Centre National de la Recherche Scientifique (CNRS)-Sorbonne Université (SU)-Centre National de la Recherche Scientifique (CNRS)
- Subjects
AcademicSubjects/SCI00010 ,Knowledge Bases ,Xenopus ,Genomics ,Genome browser ,Ontology (information science) ,Biology ,computer.software_genre ,User-Computer Interface ,03 medical and health sciences ,Databases, Genetic ,Genetics ,Animals ,Database Issue ,Gene Regulatory Networks ,Xenbase ,Web application development ,[SDV.BDD]Life Sciences [q-bio]/Development Biology ,Phylogeny ,030304 developmental biology ,Internet ,0303 health sciences ,Genome ,business.industry ,030302 biochemistry & molecular biology ,Molecular Sequence Annotation ,Data science ,Gene nomenclature ,Code refactoring ,Web resource ,business ,computer ,Echinodermata - Abstract
Echinobase (www.echinobase.org) is a third generation web resource supporting genomic research on echinoderms. The new version was built by cloning the mature Xenopus model organism knowledgebase, Xenbase, refactoring data ingestion pipelines and modifying the user interface to adapt to multispecies echinoderm content. This approach leveraged over 15 years of previous database and web application development to generate a new fully featured informatics resource in a single year. In addition to the software stack, Echinobase uses the private cloud and physical hosts that support Xenbase. Echinobase currently supports six echinoderm species, focused on those used for genomics, developmental biology and gene regulatory network analyses. Over 38 000 gene pages, 18 000 publications, new improved genome assemblies, JBrowse genome browser and BLAST + services are available and supported by the development of a new echinoderm anatomical ontology, uniformly applied formal gene nomenclature, and consistent orthology predictions. A novel feature of Echinobase is integrating support for multiple, disparate species. New genomes from the diverse echinoderm phylum will be added and supported as data becomes available. The common code development design of the integrated knowledgebases ensures parallel improvements as each resource evolves. This approach is widely applicable for developing new model organism informatics resources.
- Published
- 2021
43. Error Refactor loss based on error analysis in image classification
- Author
-
Li Fuchao, Guofu Zhou, Chen Yinglu, Yu Xiaoyu, Liu Yan, and Zhifei Wang
- Subjects
Contextual image classification ,Computer science ,business.industry ,Computer applications to medicine. Medical informatics ,R858-859.7 ,Pattern recognition ,similar features ,ER‐loss ,computer.software_genre ,softmax ,QA76.75-76.765 ,Code refactoring ,Error analysis ,Softmax function ,Computer software ,Computer Vision and Pattern Recognition ,Artificial intelligence ,business ,computer ,error analysis ,Software ,image classification - Abstract
The loss function is a criterion to evaluate the learning quality of a deep convolutional neural network, which represents the gap between prediction and ground truth. However, as the most commonly used loss function in image classification tasks, Cross‐Entropy loss does not encourage the model to distinguish the similarity between features. In this work, the authors investigate inter‐class separability of similar features learnt by convolutional networks and propose a loss function called Error Refactor Loss (ER‐Loss). ER‐Loss is based on the error caused by convolutional networks; it can improve the inter‐class separability and is simple to implement and can easily replace the Cross‐Entropy loss. Compared with softmax loss, ER‐Loss adds a dynamic penalty item which can help ER‐Loss monitor the actual situation of model training and adjust the value of the penalty item according to model training. The ER‐Loss on CIFAR100 and part of ImageNet ILSVRC 2012 is evaluated and the experimental result showed that the ER‐Loss can improve the accuracy of the model.
- Published
- 2021
44. Refactoring the Whitby Intelligent Tutoring System for Clean Architecture
- Author
-
Anthony G. Cohn, Vania Dimitrova, Glen Hart, Paul S. Brown, and Paulo Moura
- Subjects
FOS: Computer and information sciences ,Computer science ,02 engineering and technology ,Ontology (information science) ,computer.software_genre ,Intelligent tutoring system ,Theoretical Computer Science ,Prolog ,Artificial Intelligence ,0202 electrical engineering, electronic engineering, information engineering ,0501 psychology and cognitive sciences ,050107 human factors ,computer.programming_language ,Computer Science - Programming Languages ,Programming language ,05 social sciences ,Code reuse ,020207 software engineering ,Semantic reasoner ,Logtalk ,Computational Theory and Mathematics ,Code refactoring ,Hardware and Architecture ,Situation calculus ,computer ,Software ,Programming Languages (cs.PL) - Abstract
Whitby is the server-side of an Intelligent Tutoring System application for learning System-Theoretic Process Analysis (STPA), a methodology used to ensure the safety of anything that can be represented with a systems model. The underlying logic driving the reasoning behind Whitby is Situation Calculus, which is a many-sorted logic with situation, action, and object sorts. The Situation Calculus is applied to Ontology Authoring and Contingent Scaffolding: the primary activities within Whitby. Thus many fluents and actions are aggregated in Whitby from these two sub-applications and from Whitby itself, but all are available through a common situation query interface that does not depend upon any of the fluents or actions. Each STPA project in Whitby is a single situation term, which is queried for fluents that include the ontology, and to determine what pedagogical interventions to offer. Initially Whitby was written in Prolog using a module system. In the interest of a cleaner architecture and implementation with improved code reuse and extensibility, the initial application was refactored into Logtalk. This refactoring includes decoupling the Situation Calculus reasoner, Ontology Authoring framework, and Contingent Scaffolding framework into third-party libraries that can be reused in other applications. This extraction was achieved by inverting dependencies via Logtalk protocols and categories, which are reusable interfaces and components that provide functionally cohesive sets of predicate declarations and predicate definitions. In this paper the architectures of two iterations of Whitby are evaluated with respect to the motivations behind the refactor: clean architecture enabling code reuse and extensibility., Under consideration for acceptance in TPLP. Paper presented at the 37th International Conference on Logic Programming (ICLP 2021), 16 pages
- Published
- 2021
45. Refactoring‐based learning for fine‐grained lock in concurrent programming course
- Author
-
Yang Zhang
- Subjects
General Computer Science ,Code refactoring ,Programming language ,Computer science ,General Engineering ,Concurrent computing ,Computer education ,computer.software_genre ,computer ,Education ,Course (navigation) - Published
- 2021
46. Automatic migration from synchronous to asynchronous JavaScript APIs
- Author
-
Alexi Turcotte, Satyajit Gokhale, and Frank Tip
- Subjects
Application programming interface ,Programming language ,Computer science ,020207 software engineering ,02 engineering and technology ,Static analysis ,Call graph ,computer.software_genre ,JavaScript ,Blocking (computing) ,Code refactoring ,Asynchronous communication ,0202 electrical engineering, electronic engineering, information engineering ,Callback ,Safety, Risk, Reliability and Quality ,computer ,Software ,computer.programming_language - Abstract
The JavaScript ecosystem provides equivalent synchronous and asynchronous Application Programming Interfaces (APIs) for many commonly used I/O operations. Synchronous APIs involve straightforward sequential control flow that makes them easy to use and understand, but their "blocking" behavior may result in poor responsiveness or performance. Asynchronous APIs impose a higher syntactic burden that relies on callbacks, promises, and higher-order functions. On the other hand, their nonblocking behavior enables applications to scale better and remain responsive while I/O requests are being processed. While it is generally understood that asynchronous APIs have better performance characteristics, many applications still rely on synchronous APIs. In this paper, we present a refactoring technique for assisting programmers with the migration from synchronous to asynchronous APIs. The technique relies on static analysis to determine where calls to synchronous API functions can be replaced with their asynchronous counterparts, relying on JavaScript's async/await feature to minimize disruption to the source code. Since the static analysis is potentially unsound, the proposed refactorings are presented as suggestions that must be reviewed and confirmed by the programmer. The technique was implemented in a tool named Desynchronizer. In an empirical evaluation on 12 subject applications containing 316 synchronous API calls, Desynchronizer identified 256 of these as candidates for refactoring. Of these candidates, 244 were transformed successfully, and only 12 resulted in behavioral changes. Further inspection of these cases revealed that the majority of these issues can be attributed to unsoundness in the call graph.
- Published
- 2021
47. Software restructuring models for object oriented programming languages using the fuzzy based clustering algorithm
- Author
-
S Bobde and R Phalnikar
- Subjects
member function ,Theoretical computer science ,k-nearest neighbour ,Computer science ,Cohesion (computer science) ,Member variable ,computer.software_genre ,Fuzzy logic ,Software restructuring ,K nearest neighbour ,Cluster analysis ,refactoring ,Object-oriented programming ,Mechanical Engineering ,frequent usage pattern ,QC350-467 ,QA75.5-76.95 ,Optics. Light ,Atomic and Molecular Physics, and Optics ,Computer Science Applications ,Electronic, Optical and Magnetic Materials ,member variable ,cohesion ,Code refactoring ,fuzzy c-means clustering ,Electronic computers. Computer science ,computer ,Information Systems ,clustering - Abstract
Advances in the domain of software-based technology pave the way for widespread use of object-oriented programs. There is a need to develop a well-established software system that will reduce maintenance costs and enhance the usability of the component. While designing a software system, its internal structure deteriorates due to prolonged or delayed maintenance activities. In such situations, restructuring of the software is a superior approach to improve the structure without changing external behaviour of the system. One approach to carry out restructuring is to use refactoring on the existing source code for improving the internal structure of the code. Code refactoring is an effective technique for software development that improves the software’s internal structure without changing its external behaviour. The purpose of refactoring is to improve the cohesion of existing code and minimize coupling in the existing module of a software system. Among numerous methods, clustering is one of the effective approaches to increase the cohesion of the system. Hence in this paper, the authors suggest to extract member functions and member variables and propose to find their similarity by Frequent Usage Pattern approach. Next, the proposed fuzzy based clustering algorithm perform effective code refactoring. The proposed method utilizes multiple refactoring methods to increase the cohesion of the component without any change in the meaning of the software system. The proposed system will offer automated support to change low-cohesive to high-cohesive functions. Finally, the proposed model has been experimentally tested with object-oriented programs.
- Published
- 2021
48. Supporting Proactive Refactoring: An Exploratory Study on Decaying Modules and Their Prediction
- Author
-
Sae-Lim, Natthawute, Hayashi, Shinpei, and SAEKI, MOTOSHI
- Subjects
business.industry ,Computer science ,Exploratory research ,Code smell ,computer.software_genre ,Software quality ,Code refactoring ,Artificial Intelligence ,Hardware and Architecture ,Computer Vision and Pattern Recognition ,Electrical and Electronic Engineering ,Software engineering ,business ,computer ,Software - Published
- 2021
49. Vulnerabilities preservation using code mutation
- Author
-
Cruz, Jorge Fernando Alves da, Pinto, Jorge Sousa, Cruz, Daniela Carneiro, and Universidade do Minho
- Subjects
Refatoração de código ,Application security testing ,Teste de segurança de aplicações ,Code refactoring ,Code mutation ,Mutação de código ,Engenharia e Tecnologia::Outras Engenharias e Tecnologias - Abstract
Dissertação de mestrado integrado em Informatics Engineering, The main goal of software security testing is to assess the security risks of an application so that programmers can eliminate all vulnerabilities, as early as possible, before they are exploited by attackers. There are several tools on the market that allow to perform these tests during the software development life cycle to ensure that there are no security flaws in the final product. However, like all tools, these can also have imperfections, one of them being unable to detect weaknesses in vulnerable software. The project of this dissertation aims to tackle this problem, so that it is possible to find and correct flaws in security tests in order to, consequently, increase the effectiveness of the tools that intend to certify the security of applications. For this, the solution studied in this document is to apply syntactic transformations in vulnerable code samples without interfering in the presence of the vulnerabilities that should later be detected. This process is based on: 𝑖) code refactoring techniques that allow improving the internal quality of the software; 𝑖𝑖) the mutation testing system used to evaluate the quality of software testing. To implement this idea, a tool called VSG was developed with the functionality of producing new code samples with security flaws. This document describes the whole development process, from the architecture to the implementation of the tool. In the end, there is an analysis with the results obtained when trying to detect the vulnerabilities present in the samples produced through the CxSAST application of the company Checkmarx, from which this dissertation emerged., O objetivo principal de testes de segurança de software consiste em avaliar os riscos de segurança de uma aplicação para que os programadores possam eliminar todas as vulnerabilidades o mais cedo possível, antes que sejam exploradas por atacantes. Existem várias ferramentas no mercado que permitem realizar estes testes durante o processo de desenvolvimento de software para garantir que não existam falhas de segurança no produto final. Porém, tal como todas as ferramentas, estas também podem apresentar imperfeições, sendo uma delas não conseguir detetar fraquezas em software vulnerável. O projeto desta dissertação pretende combater este problema, de modo a que seja possível encontrar e corrigir falhas nos testes de segurança para, consequentemente, aumentar a eficácia das ferramentas que pretendem certificar a segurança das aplicações. Para isto, a solução estudada neste documento passa por aplicar transformações sintáticas em amostras de código vulneráveis sem interferir na presença das vulnerabilidades que deverão, posteriormente, ser detetadas. Este processo baseia-se: 𝑖) nas técnicas de refatoração de código que permitem melhorar a qualidade interna do software; 𝑖𝑖) no sistema de testes de mutação usado para avaliar a qualidade de testes de software. Para implementar esta ideia, uma ferramenta chamada VSG foi desenvolvida com a funcionalidade de produzir novas amostras de código com falhas de segurança. Neste documento é descrito todo o processo de desenvolvimento, desde a arquitetura até à implementação da ferramenta. No final, existe uma análise com os resultados obtidos ao tentar detetar as vulnerabilidades presentes nas amostras produzidas através da aplicação CxSAST da empresa Checkmarx, da qual esta dissertação surgiu.
- Published
- 2022
50. Measuring the Overall Complexity of Graphical and Textual IEC 61131-3 Control Software
- Author
-
Matthias Bengel, Nikolai Langer, Juliane Fischer, Markus Felger, Birgit Vogel-Heuser, and Heiko Schneider
- Subjects
FOS: Computer and information sciences ,Control and Optimization ,Computer science ,IEC 61131-3 ,Programming complexity ,Biomedical Engineering ,computer.software_genre ,Domain (software engineering) ,Computer Science - Software Engineering ,Software ,Artificial Intelligence ,Software measurement ,computer.programming_language ,business.industry ,Mechanical Engineering ,Data structure ,Software quality ,Computer Science Applications ,Software Engineering (cs.SE) ,Human-Computer Interaction ,Code refactoring ,Control and Systems Engineering ,Computer Vision and Pattern Recognition ,Software engineering ,business ,computer - Abstract
Software implements a significant proportion of functionality in factory automation. Thus, efficient development and the reuse of software parts, so-called units, enhance competitiveness. Thereby, complex control software units are more difficult to understand, leading to increased development, testing and maintenance costs. However, measuring complexity is challenging due to many different, subjective views on the topic. This paper compares different complexity definitions from literature and considers with a qualitative questionnaire study the complexity perception of domain experts, who confirm the importance of objective measures to compare complexity. The paper proposes a set of metrics that measure various classes of software complexity to identify the most complex software units as a prerequisite for refactoring. The metrics include complexity caused by size, data structure, control flow, information flow and lexical structure. Unlike most literature approaches, the metrics are compliant with graphical and textual languages from the IEC 61131-3 standard. Further, a concept for interpreting the metric results is presented. A comprehensive evaluation with industrial software from two German plant manufacturers validates the metrics' suitability to measure complexity., 8 pages, https://ieeexplore.ieee.org/abstract/document/9444196/
- Published
- 2022
Catalog
Discovery Service for Jio Institute Digital Library
For full access to our library's resources, please sign in.