DocumentCode :
2706992
Title :
Beyond templates: a study of clones in the STL and some general implications
Author :
Basit, H.A. ; Rajapakse, Damith C. ; Jarzabek, Stan
Author_Institution :
Dept. of Comput. Sci., Singapore Nat. Univ., Singapore
fYear :
2005
fDate :
15-21 May 2005
Firstpage :
451
Lastpage :
459
Abstract :
Templates (or generics) help us write compact, generic code, which aids both reuse and maintenance. The STL is a powerful example of how templates help achieve these goals. Still, our study of the STL revealed substantial, and in our opinion, counter-productive repetitions (so-called clones) across groups of similar class or function templates. Clones occurred, as variations across these similar program structures were irregular and could not be unified by suitable template parameters in a natural way. We encountered similar problems in other class libraries as well as in application programs, written in a range of programming languages. In the paper, we present quantitative and qualitative results from our study. We argue that the difficulties we encountered affect programs in general. We present a solution that can treat such template-unfriendly cases of redundancies at the meta-level, complementing and extending the power of language features, such as templates, in areas of generic programming.
Keywords :
software libraries; software maintenance; software reusability; STL; meta-programming; program clones; software maintenance; Cloning; Computer languages; Computer science; Java; Permission; Software design; Software engineering; Software libraries; Software maintenance; Software reusability;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Software Engineering, 2005. ICSE 2005. Proceedings. 27th International Conference on
Print_ISBN :
1-59593-963-2
Type :
conf
DOI :
10.1109/ICSE.2005.1553588
Filename :
1553588
Link To Document :
بازگشت