抄録
IB-001
Automated Refactoring of Legacy Java Software to Default Methods
Raffi Khatchadourian(City Univ. of NY)・増原英彦(東工大)
A default methods in Java is a method definitions with a concrete body defined in an interface. It is known to be a useful alternative to skeletal implementations. However, migrating skeletal implementations to default methods is not an easy task as it relates to multiple classes, and there are many subtle restrictions to be correct. We proposed a refactoring tool that automatically finds skeletal implementations and migrates to default methods. We identified preconditions that make the migrated default methods preserve the semantics, and implemented the tool as an Eclipse plugin. We evaluated our tool proactively, namely by applying our tool to open source projects, and send the refactored code to the developers. Not only the some of projects accepted the refactored code, we also gained interesting feedback from the developers.