Identifying Utility Functions in Java and JavaScript
Resumo
Utility functions provide generic services that can be reused in different types of systems. Theoretically, they must be implemented in specific modules. However, it is common to find such functions implemented with domain specific functions, decreasing their chances of reuse. In this paper, we propose a set of heuristics to identify utility functions. With such heuristics, recommendations can be provided to move the functions to appropriate modules. In a survey conducted with 33 developers, the proposed heuristics showed a precision of 66% and 67% when applied to Java and JavaScript systems, respectively.