Show simple item record

dc.contributor.advisorMichael Ernst
dc.contributor.authorKiezun, Adam
dc.contributor.authorErnst, Michael D.
dc.contributor.authorTip, Frank
dc.contributor.authorFuhrer, Robert M.
dc.contributor.otherProgram Analysis
dc.date.accessioned2006-09-07T20:30:25Z
dc.date.available2006-09-07T20:30:25Z
dc.date.issued2006-09-05
dc.identifier.otherMIT-CSAIL-TR-2006-061
dc.identifier.urihttp://hdl.handle.net/1721.1/33965
dc.description.abstractType safety and expressiveness of many existing Java libraries and theirclient applications would improve, if the libraries were upgraded to definegeneric classes. Efficient and accurate tools exist to assist clientapplications to use generics libraries, but so far the libraries themselvesmust be parameterized manually, which is a tedious, time-consuming, anderror-prone task. We present a type-constraint-based algorithm forconverting non-generic libraries to add type parameters. The algorithmhandles the full Java language and preserves backward compatibility, thusmaking it safe for existing clients. Among other features, it is capableof inferring wildcard types and introducing type parameters formutually-dependent classes. We have implemented the algorithm as a fullyautomatic refactoring in Eclipse.We evaluated our work in two ways. First, our tool parameterized code thatwas lacking type parameters. We contacted the developers of several ofthese applications, and in all cases where we received a response, theyconfirmed that the resulting parameterizations were correct and useful.Second, to better quantify its effectiveness, our tool parameterizedclasses from already-generic libraries, and we compared the results tothose that were created by the libraries' authors. Our tool performed therefactoring accurately -- in 87% of cases the results were as good as thosecreated manually by a human expert, in 9% of cases the tool results werebetter, and in 4% of cases the tool results were worse.
dc.format.extent11 p.
dc.format.extent268513 bytes
dc.format.extent1340485 bytes
dc.format.mimetypeapplication/pdf
dc.format.mimetypeapplication/postscript
dc.language.isoen_US
dc.relation.ispartofseriesMassachusetts Institute of Technology Computer Science and Artificial Intelligence Laboratory
dc.titleRefactoring for parameterizing Java classes


Files in this item

Thumbnail
Thumbnail

This item appears in the following Collection(s)

Show simple item record