Eliminating redundancies with a "composition with adaptation" meta-programming technique

Stan Jarzabek, Li Shubiao
2003 Proceedings of the 9th European software engineering conference held jointly with 10th ACM SIGSOFT international symposium on Foundations of software engineering - ESEC/FSE '03  
Redundant code obstructs program understanding and contributes to high maintenance costs. While most experts agree on that, opinions -on how serious the problem of redundancies really is and how to tackle it -differ. In this paper, we present the study of redundancies in the Java Buffer library, JDK 1.4.1, which was recently released by Sun. We found that at least 68% of code in the Buffer library is redundant in the sense that it recurs in many classes in the same or slightly modified form. We
more » ... effectively eliminated that 68% of code at the meta-level using a technique based on "composition with adaptation" called XVCL. We argue that such a program solution is easier to maintain than buffer classes with redundant code. In this experiment, we have designed our meta-representation so that we could produce buffer classes in exactly the same form as they appear in the original Buffer library. While we have been tempted to re-design the buffer classes, we chose not to do so, in order to allow for the seamless integration of the XVCL solution into contemporary programming methodologies and systems. This decision has not affected the essential results reported in this paper.
doi:10.1145/940103.940104 fatcat:tz5k6sldkvb63d2korth37mujq