# Automatically Injecting Robustness Statements into Distributed Applications
## 2 Related Works  
The Java RMI mechanism is frequently used in distributed systems to enable communication between client components and a server side. The state of the art encompasses numerous approaches that analyze the Java RMI supporting library, focusing on aspects such as security, cryptography, asynchronous computing, and cloud computing. A tool that encrypts and decrypts data, subsequently transmitting the data via the internet using Socket and RMI technology, was developed and proposed in [5]. The proposed approach employed the CBC mode of Advanced Encryption Standard (AES) algorithms to encrypt data after clients partition the data from a large file. The encrypted data are then sent to a daemon for parallel map-reduce processing. Moreover, RMIs are used in a cloud environment, and to facilitate development, language translators were used to convert design concepts to Java RMIs and provide the way for deployment on Amazon Web Services (AWS) Elastic Cloud Computing (EC2) [12]. A comprehensive assessment of RMI vulnerabilities using the Metasploit framework was presented in [6]. Encryption algorithms were investigated to ensure the security of transmitted data or objects using RMI [7]. Specifically, the authors applied AES and Data Encryption Standard (DES) algorithms, comparing their efficacy in conjunction with the RMI APIs. Such approaches focused on various applications of the Java RMI library; however, none of them aimed at enhancing the robustness and efficiency of RMIs. To the best of our knowledge, our proposed approach is novel in that it automatically transforms RMIs used in an application into code, handling the calls in a dedicated thread (asynchronous) and adding actions for recovery in case of potential faults or relevant delays. Concurrent computing has gained significant popularity with the advent of multicore hardware. Numerous studies have proposed the design of automatic tools to efficiently refactor sequential code into its parallel equivalent. Asynchronous programming is prevalent in Android applications due to UI access and I/O operations [23]. [PERSON] et al. [24] proposed a tool to automatically detect long-running operations and refactor them into asynchronous ones. Additionally, [PERSON] et al. [25] described a tool for identifying the improper use of asynchronous constructs and making necessary changes. Unlike our approach, these methods are apt for analyzing parallel code to find defects. JavaScript ecosystems also provide synchronous and asynchronous calls for handling various I/O operations. [PERSON] et al. [26] presented a refactoring approach to assist developers in transforming synchronous operations into asynchronous ones. [PERSON] et al. [27] proposed an approach to reorder asynchronous calls for earlier execution, yielding significant performance benefits. This method requires the input code to be parallel, with developers choosing the parts to parallelize. In another approach, [PERSON] et al. [28] proposed lock refactoring to automatically convert built-in monitor locks in Java's synchronized blocks to the locks provided by the java.util.concurrent.locks library, such as ReentrantLock and ReadWriteLock. Various analyses ensured that the transformations preserved application behavior and enhanced performance. Several approaches focus on refactoring for loops to make them suitable for parallel executions [29; 30]. In contrast to the previous approaches, our proposal provides (i) automation in the identification of the method calls that can be executed in parallel (which are RMI calls), and (ii) the automatic injection of statements that make the execution of identified calls both parallel and robust. This frees developers from manually identifying the suitable parts of code and implementing more robust code. [PERSON] et al. [31] presented an automated approach to convert synchronized locks into StampedLock. Later, [PERSON] et al.