|
| This Article | ||
| ||
| Share | ||
| Bibliographic References | ||
| Add to: | ||
| | ||
| Search | ||
| ||
| ASCII Text | x | ||
| Michael Pradel, Thomas Gross, "Name-based Analysis of Equally Typed Method Arguments," IEEE Transactions on Software Engineering, vol. 99, no. 1, pp. 1, , 5555. | |||
| BibTex | x | ||
| @article{ 10.1109/TSE.2013.7, author = {Michael Pradel and Thomas Gross}, title = {Name-based Analysis of Equally Typed Method Arguments}, journal ={IEEE Transactions on Software Engineering}, volume = {99}, number = {1}, issn = {0098-5589}, year = {5555}, pages = {1}, doi = {http://doi.ieeecomputersociety.org/10.1109/TSE.2013.7}, publisher = {IEEE Computer Society}, address = {Los Alamitos, CA, USA}, } | |||
| RefWorks Procite/RefMan/Endnote | x | ||
| TY - JOUR JO - IEEE Transactions on Software Engineering TI - Name-based Analysis of Equally Typed Method Arguments IS - 1 SN - 0098-5589 SP EP EPD - 1 A1 - Michael Pradel, A1 - Thomas Gross, PY - 5555 KW - Java KW - Access control KW - Engines KW - Feature extraction KW - Context KW - Robustness KW - Program processors KW - and Enhancement KW - D Software/Software Engineering KW - D.2 Software Engineering KW - D.2.5 Testing and Debugging KW - D Software/Software Engineering KW - D.2 Software Engineering KW - D.2.7 Distribution KW - Maintenance VL - 99 JA - IEEE Transactions on Software Engineering ER - | |||
DOI Bookmark: http://doi.ieeecomputersociety.org/10.1109/TSE.2013.7
When calling a method that requires multiple arguments, programmers must pass the arguments in the expected order. For statically typed languages, the compiler helps programmers by checking that the type of each argument matches the type of the formal parameter. Unfortunately, types are futile for methods with multiple parameters of the same type. How can a programmer check that equally typed arguments are passed in the correct order? This paper presents two simple yet effective, static program analyses that detect problems related to the order of equally typed arguments. The key idea is to leverage identifier names to infer the semantics of arguments and their intended positions. The analyses reveal problems that affect the correctness, understandability, and maintainability of a program, such as accidentally reversed arguments and misleading parameter names. Most parts of the analyses are language-agnostic. We evaluate the approach with 24 real-world programs written in Java and C. Our results show the analyses to be effective and efficient. One analysis reveals anomalies in the order of equally typed arguments; it finds 54 relevant problems with a precision of 82%. The other analysis warns about misleading parameter names and finds 31 naming bugs with a precision of 39%.
Index Terms:
Java,Access control,Engines,Feature extraction,Context,Robustness,Program processors,and Enhancement,D Software/Software Engineering,D.2 Software Engineering,D.2.5 Testing and Debugging,D Software/Software Engineering,D.2 Software Engineering,D.2.7 Distribution,Maintenance
Citation:
Michael Pradel, Thomas Gross, "Name-based Analysis of Equally Typed Method Arguments," IEEE Transactions on Software Engineering, 11 April 2013. IEEE computer Society Digital Library. IEEE Computer Society, <http://doi.ieeecomputersociety.org/10.1109/TSE.2013.7>
Usage of this product signifies your acceptance of the Terms of Use.

