Font Size: a A A

Coderebuilder: The Research And Implementation Of An Automated Java Concurrent Program Refactoring Tool

Posted on:2015-06-29Degree:MasterType:Thesis
Country:ChinaCandidate:B X TaoFull Text:PDF
GTID:2298330422980969Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
As an important supporting technology, software evolution can continuously improve the quality ofconcurrent code to improve the efficiency of software development and maintenance. Refactoring is animportant software evolution technique. It modifies a program’s internal structure to improve thereadability, maintainability, scalability, and etc. of software, without changing its external behavior.Concurrent code refactoring includes two kinds: sequential code parallelization refactoring andconcurrent code optimization refactoring. There are still some problems in these two areas. For thesequential code parallelization, the current researches may not identify many parallelization opportunitieswhen processing loops using containers, due to the data dependences caused by the container operationsinside these loops. To address this problem, this paper proposes a dynamic loop-level parallelismidentification method based on container annotation, and then does refactoring based on the foundparallelism information. The approach first manually annotates the containers with irrelevant access orders,and then instruments the program to collect runtime dependence information. Finally, it filters out thedependence caused by order-independent container objects and its cursors based on the annotationinformation. The proposed method can identify additional refactoring opportunities compared to theprevious work.For the concurrent code optimization, there is rarely any automated refactoring tool for existingrefactoring patterns such as split lock, split critical section, and make fields atomic. To address thisproblem, we propose three automated refactoring techniques for split lock, split critical section and makefield atomic refactorings. Our refactoring method infers synchronization requirements between class fieldsaccording to their appearance in critical sections, and then automatically refactors the code based on therequirements. The whole approach does not need user interaction, which is more automated than existingwork.Finally, we designed and implemented a Java concurrent program refactoring tool namedCODEREBUILDER in Eclipse LTK framework. For sequence code with loops, this tool can provide loopanalysis reports, recommending valuable parallelizable loops for users. For Java concurrency code, it canautomatically do the split lock, split critical section and field atomization refactorings. Our experiments onseveral open-source projects show the effectiveness of the approaches.
Keywords/Search Tags:Java, concurrent programs, synchronization, refactoring, optimization
PDF Full Text Request
Related items