Searching for Replacement Classes
Malavika Samak, Jose Pablo Cambronero, Martin C. Rinard

TL;DR
This paper introduces ClassFinder, a system that effectively retrieves replacement classes for a given class in Java, using a combination of embeddings and type analysis to aid developers in code adaptation tasks.
Contribution
ClassFinder uniquely combines embeddings and type analysis to identify and rank replacement classes, providing mappings to assist developers in replacing components.
Findings
Successfully retrieved meaningful replacements for 24 Java classes.
Produced complete, functionally identical class mappings in many cases.
Operated on a dataset of approximately 600,000 open source Java classes.
Abstract
Software developers must often replace existing components in their systems to adapt to evolving environments or tooling. While traditional code search systems are effective at retrieving components with related functionality, it is much more challenging to retrieve components that can be used to directly replace existing functionality, as replacements must account for more fundamental program properties such as type compatibility. To address this problem, we introduce ClassFinder, a system which given a query class Q, and a search corpus S, returns a ranked subset of classes that can replace Q and its functionality. ClassFinder produces afield and method mapping between the classes that can provide useful hints to a developer and can be used to effectively refine the ranking of candidate replacement classes. Our technique leverages the complementary strengths of a distributed…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Software System Performance and Reliability
