ACM Home Page
Please provide us with feedback. Feedback
Removing duplication from java.io: a case study using traits
Full text PdfPdf (247 KB)
Source Conference on Object Oriented Programming Systems Languages and Applications archive
Companion to the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications table of contents
San Diego, CA, USA
SESSION: Practitioner reports table of contents
Pages: 282 - 291  
Year of Publication: 2005
ISBN:1-59593-193-7
Authors
Emerson R. Murphy-Hill  Portland State University, Portland, OR
Philip J. Quitslund  Portland State University, Portland, OR
Andrew P. Black  Portland State University, Portland, OR
Sponsors
ACM: Association for Computing Machinery
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 5,   Downloads (12 Months): 34,   Citation Count: 1
Additional Information:

abstract   references   cited by   index terms   review   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1094855.1094963
What is a DOI?

ABSTRACT

Code duplication is a serious problem with no easy solution, even in industrial-strength code. Single inheritance cannot provide for effective code reuse in all situations, and sometimes programmers are driven to duplicate code using copy and paste. A language feature called traits enables code to be shared across the inheritance hierarchy, and claims to permit the removal of most duplication. We attempted to validate this claim in a case study of the java.io library. Detecting duplication was more complex than we had imagined, but traits were indeed able to remove all that we found.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
2
 
3
CME: Concern Manipulation Environment. http://www.eclipse.org/cme/. April, 2005.
 
4
Duplication Management Framework for Eclipse. http://freshmeat.net/projects/dupman/. April, 2005.
 
5
 
6
 
7
G. Kiczales, J. Lamping, A. Menhdhekar, C. Maeda, C. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-oriented programming. In M. Aksit and S. Matsuoka, editors, Proceedings of the European Conference on Object-Oriented Programming, volume 1241, pages 220--242. Springer-Verlag, 1997.
 
8
M. Odersky. The Scala Programming Language. http://scala.epfl.ch/. (April, 2005).
 
9
PMD. http://pmd.sourceforge.net/. April, 2005.
 
10
P. J. Quitslund. Java traits --- improving opportunities for reuse. Technical Report CSE-04-005, OGI School of Science & Engineering, Beaverton, Oregon, USA, 2004.
 
11
P. J. Quitslund and A. P. Black. Java with traits --- improving opportunities for reuse. In Proceedings of the 3rd International Workshop on MechAnisms for SPEcialization, Generalization and inHerItance (ECOOP 2004), pages 45--49. Laboratoire Informatique, Signaux et Systèms de Sophia Antipolis (I3S), 2004.
12
 
13
N. Schärli, S. Ducasse, O. Nierstrasz, and A. Black. Traits: Composable units of behavior. In Proceedings of ECOOP 2003 - European Conference on Object-Oriented Programming, volume 2743 of Lecture Notes in Computer Science. Springer, 2003.
 
14
SimScan (Similarity Scanner). http://www.blue-edge.bg/download.html. April, 2005.
 
15
Traits Prototype in Squeak. http://www.iam.unibe.ch/~schaerli/smalltalk/traits/traitsPrototype.htm. July, 2005.



REVIEW

"Markus Wolf : Reviewer"

In object-oriented (OO) programming, traits are a mechanism for specifying and encapsulating behavior. Hence, they are similar to aspects, and related to classes and inheritance, but are not quite the same. Developers familiar with the standard te  more...

Collaborative Colleagues:
Emerson R. Murphy-Hill: colleagues
Philip J. Quitslund: colleagues
Andrew P. Black: colleagues