A Case Study on Type Hints in Method Argument Names in Pharo Smalltalk Projects

Spasojevic, Boris; Lungu, Mircea; Nierstrasz, Oscar Marius (March 2016). A Case Study on Type Hints in Method Argument Names in Pharo Smalltalk Projects. In: 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER) 1 (pp. 283-292). IEEE 10.1109/SANER.2016.41

Full text not available from this repository. (Request a copy)

A common practice when writing Smalltalk source code is to name method arguments in a way that hints at their expected type (i.e., aString, anInteger, aDictionary). This practice makes code more readable, but the prevalence of this practice is unknown, thus its reliability is questionable. Tools such as the auto complete feature in the Pharo Smalltalk code editor rely on these hints to improve the developer experience. The default algorithm used in Pharo to extract type information from these hints succeeds in extracting a type in slightly over 36 of method arguments taken from 114 Pharo projects. In this paper we present the results of analyzing the failing method argument names, and provide several simple heuristics that can increase the rate of success to slightly over 50. We also present a case study on the relation between type hints and run-time types of method arguments that shows that type hints, in a great majority of cases, reflect run-time types.

Item Type: Conference or Workshop Item (Paper)
Division/Institute: 08 Faculty of Science > Institute of Computer Science (INF)
08 Faculty of Science > Institute of Computer Science (INF) > Software Composition Group (SCG)
UniBE Contributor: Spasojevic, Boris; Lungu, Mircea and Nierstrasz, Oscar Marius
Subjects: 000 Computer science, knowledge & systems
500 Science > 510 Mathematics
ISBN: 978-1-5090-1855-0
Publisher: IEEE
Language: English
Submitter: Oscar Marius Nierstrasz
Date Deposited: 03 Feb 2017 15:31
Last Modified: 03 Feb 2017 15:31
Publisher DOI: 10.1109/SANER.2016.41
Uncontrolled Keywords: scg-pub snf-asa1 scg16 jb16 Spasojevic
URI: http://boris.unibe.ch/id/eprint/94650

Actions (login required)

Edit item Edit item
Provide Feedback