关键词:
Java programming language
摘要:
Java thread mechanisms, such as Thread and Executor, are different in the thread management pattern, code and the performance. To implement the automated refactoring between different thread mechanism and help programmers to choose the right thread mechanism, an automated refactoring method was proposed for Java thread mechanism able refactoring between Thread and Executor. To test the validity of the method, an automated refactoring tool named Rethreader was developed in Eclipse JDT. In the experimentation, several programs in the Java Grande Form (JGF) were tested, including Series, Crypt, Lufact, Sparsematmult and montecarlo. The experimental results show that the Rethreader can successfully implement the automatic refactoring from Thread to Executor within 1 s. © 2018, Editorial Department of Transaction of Beijing Institute of Technology. All right reserved.