Unifying clones with a generative programming technique: a case study
Software clones—similar program structures repeated in variant forms—increase the risk of update anomalies, blow up the program size and complexity, possibly contributing to high maintenance costs. Yet, programs are often polluted by clones. In this paper, we present a case study of cloning in the J...
Uloženo v:
| Vydáno v: | Journal of software maintenance and evolution Ročník 18; číslo 4; s. 267 - 292 |
|---|---|
| Hlavní autoři: | , |
| Médium: | Journal Article |
| Jazyk: | angličtina |
| Vydáno: |
Chichester, UK
John Wiley & Sons, Ltd
01.07.2006
|
| Témata: | |
| ISSN: | 1532-060X, 1532-0618 |
| On-line přístup: | Získat plný text |
| Tagy: |
Přidat tag
Žádné tagy, Buďte první, kdo vytvoří štítek k tomuto záznamu!
|
| Shrnutí: | Software clones—similar program structures repeated in variant forms—increase the risk of update anomalies, blow up the program size and complexity, possibly contributing to high maintenance costs. Yet, programs are often polluted by clones. In this paper, we present a case study of cloning in the Java Buffer library, JDK 1.5. We found that at least 68% of the code in the Buffer library was contained in cloned classes or class methods. Close analysis of program situations that led to cloning revealed difficulties in eliminating clones with conventional program design techniques. As a possible solution, we applied a generative technique of XVCL (XML‐based Variant Configuration Language) to represent similar classes and methods in generic, adaptable form. Concrete buffer classes could be automatically produced from the generic structures. We argue, on analytical and empirical grounds, that unifying clones reduced conceptual complexity and enhanced the changeability of the Buffer library at rates proportional to code size reduction (68%). We evaluated our solution in qualitative and quantitative ways, and conducted a controlled experiment to support this claim. The approach presented in the paper can be used to enhance genericity and changeability of any program, independently of an application domain or programming language. As the solution is not without pitfalls, we discuss trade‐offs involved in its project application. Copyright © 2006 John Wiley & Sons, Ltd. |
|---|---|
| Bibliografie: | ark:/67375/WNG-R8FKFCBD-T istex:69C5D458BFC78254114BAD96A0CC53E993E90006 ArticleID:SMR333 National University of Singapore Research Grant - No. R-252-000-239-112 ObjectType-Article-2 SourceType-Scholarly Journals-1 ObjectType-Feature-1 content type line 23 |
| ISSN: | 1532-060X 1532-0618 |
| DOI: | 10.1002/smr.333 |