skip to main content
10.1145/1529282.1529384acmconferencesArticle/Chapter ViewAbstractPublication PagessacConference Proceedingsconference-collections
research-article

Applying test-driven code search to the reuse of auxiliary functionality

Published: 08 March 2009 Publication History

Abstract

Software developers spend considerable effort implementing auxiliary functionality used by the main features of a system (e.g. compressing/decompressing files, encryption/decription of data, scaling/rotating images). With the increasing amount of open source code available on the Internet, time and effort can be saved by reusing these utilities through informal practices of code search and reuse. However, when this type of reuse is performed in an ad hoc manner, it can be tedious and error-prone: code results have to be manually inspected and extracted into the workspace. In this paper we introduce the use of test cases as an interface for automating code search and reuse and evaluate its applicability and performance in the reuse of auxiliary functionality. We call our approach Test-Driven Code Search (TDCS). Test cases serve two purposes: (1) they define the behavior of the desired functionality to be searched; and (2) they test the matching results for suitability in the local context. We present CodeGenie, an Eclipse plugin that performs TDCS using a code search engine called Sourcerer. Our evaluation presents evidence of the applicability and good performance of TDCS in the reuse of auxiliary functionality.

References

[1]
Scrapheap Challenge Workshop, OOPSLA 2005. http://www.postmodernprogramming.org/scrapheap/workshop.
[2]
Koders web site. http://www.koders.com.
[3]
Google Code Search. http://www.google.com/codesearch.
[4]
Sourcerer web site. http://sourcerer.ics.uci.edu.
[5]
S. Bajracharya, T. Ngo, E. Linstead, Y. Dou, P. Rigor, P. Baldi, and C. Lopes. Sourcerer: a search engine for open source code supporting structure-based search. In OOPSLA '06: Comp. to the 21st ACM SIGPLAN OOPSLA, pages 681--682, New York, NY, USA, 2006. ACM Press.
[6]
K. Beck. Test Driven Development: By Example. Addison-Wesley Professional, November 2002.
[7]
R. Cottrell, R. J. Walker, and J. Denzinger. Jigsaw: a tool for the small-scale reuse of source code. In ICSE Companion '08: Companion of the 30th Int'l Conf. on Softw. Eng., pages 933--934, New York, NY, USA, 2008. ACM.
[8]
H. Erdogmus, M. Morisio, and M. Torchiano. On the effectiveness of the test-first approach to programming. IEEE Trans. Softw. Eng., 31(3): 226--237, 2005.
[9]
R. Hoffmann, J. Fogarty, and D. S. Weld. Assieme: finding and leveraging implicit references in a web search interface for programmers. In UIST '07: Proc. of the 20th annual ACM symposium on User interface software and technology, pages 13--22, New York, NY, USA, 2007. ACM.
[10]
R. Holmes and R. J. Walker. Supporting the investigation and planning of pragmatic reuse tasks. In ICSE '07: Proc. of the 29th Int'l Conference on Softw. Eng., pages 447--457, Washington, DC, USA, 2007. IEEE Computer Society.
[11]
O. Hummel and C. Atkinson. Agile Processes in Software Engineering and Extreme Programming, chapter Supporting Agile Reuse Through Extreme Harvesting, pages 28--37. Springer-Verlag, 2007.
[12]
IEEE. IEEE Standard Glossary of Software Engineering Terminology. New York, 1990. IEEE Computer Society Press.
[13]
C. W. Krueger. Software reuse. ACM Comput. Surv., 24(2): 131--183, 1992.
[14]
L. Larsen and M. Harrold. Slicing object-oriented software. In Proc. of the 18th Int'l Conference on Softw. Eng., pages 495--505, Mar 1996.
[15]
O. A. L. Lemos, S. Bajrachary, and J. Ossher. Codegenie: a tool for test-driven source code search. In OOPSLA '07: Comp. to the 22nd ACM SIGPLAN OOPSLA, pages 917--918, New York, NY, USA, 2007. ACM.
[16]
M. D. McIlroy. Mass produced software components. In P. Naur and B. Randell, editors, Proc. of NATO Softw. Eng. Conference, pages 138--150. Garmisch, Germany, 1969.
[17]
H. Ossher and P. Tarr. Hyper/j: multi-dimensional separation of concerns for java. In ICSE '01: Proc. of the 23rd Int'l Conference on Softw. Eng., pages 821--822, Washington, DC, USA, 2001. IEEE Computer Society.
[18]
A. Podgurski and L. Pierce. Retrieving reusable software by sampling behavior. ACM Trans. Softw. Eng. Methodol., 2(3): 286--303, 1993.
[19]
S. E. Sim, C. L. A. Clarke, and R. C. Holt. Archetypal source code searches: A survey of software developers and maintainers. In IWPC, page 180, 1998.
[20]
J. Singer, T. Lethbridge, N. Vinson, and N. Anquetil. An examination of software engineering work practices. In CASCON '97: Proceedings of the 1997 conference of the Centre for Advanced Studies on Collaborative research, page 21. IBM Press, 1997.
[21]
M. Weiser. Program slicing. In ICSE '81: Proc. of the 5th Int'l conference on Softw. Eng., pages 439--449, Piscataway, NJ, USA, 1981. IEEE Press.

Cited By

View all
  • (2023)Big Code Search: A BibliographyACM Computing Surveys10.1145/360490556:1(1-49)Online publication date: 26-Aug-2023
  • (2020)Exempla gratis (E.G.): code examples for freeProceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3368089.3417052(1353-1364)Online publication date: 8-Nov-2020
  • (2019)Easy-going Development of Event-Driven Applications by Iterating a Search-Select-Superpose LoopJournal of Information Processing10.2197/ipsjjip.27.25727(257-267)Online publication date: 2019
  • Show More Cited By

Index Terms

  1. Applying test-driven code search to the reuse of auxiliary functionality

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    SAC '09: Proceedings of the 2009 ACM symposium on Applied Computing
    March 2009
    2347 pages
    ISBN:9781605581668
    DOI:10.1145/1529282
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 08 March 2009

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. TDD
    2. software reuse
    3. source code search
    4. test-first

    Qualifiers

    • Research-article

    Conference

    SAC09
    Sponsor:
    SAC09: The 2009 ACM Symposium on Applied Computing
    March 8, 2009 - March 12, 2008
    Hawaii, Honolulu

    Acceptance Rates

    Overall Acceptance Rate 1,650 of 6,669 submissions, 25%

    Upcoming Conference

    SAC '25
    The 40th ACM/SIGAPP Symposium on Applied Computing
    March 31 - April 4, 2025
    Catania , Italy

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)4
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 28 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)Big Code Search: A BibliographyACM Computing Surveys10.1145/360490556:1(1-49)Online publication date: 26-Aug-2023
    • (2020)Exempla gratis (E.G.): code examples for freeProceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3368089.3417052(1353-1364)Online publication date: 8-Nov-2020
    • (2019)Easy-going Development of Event-Driven Applications by Iterating a Search-Select-Superpose LoopJournal of Information Processing10.2197/ipsjjip.27.25727(257-267)Online publication date: 2019
    • (2019)On the Efficacy of Dynamic Behavior Comparison for Judging Functional Equivalence2019 19th International Working Conference on Source Code Analysis and Manipulation (SCAM)10.1109/SCAM.2019.00030(193-203)Online publication date: Sep-2019
    • (2018)Program splicingProceedings of the 40th International Conference on Software Engineering10.1145/3180155.3180190(338-349)Online publication date: 27-May-2018
    • (2016)Hunter: next-generation code reuse for JavaProceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering10.1145/2950290.2983934(1028-1032)Online publication date: 1-Nov-2016
    • (2014)CodewebsProceedings of the 23rd international conference on World wide web10.1145/2566486.2568023(491-502)Online publication date: 7-Apr-2014
    • (2014)The market for open source: An intelligent virtual open source marketplace2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering (CSMR-WCRE)10.1109/CSMR-WCRE.2014.6747204(399-402)Online publication date: Feb-2014
    • (2014)SourcererScience of Computer Programming10.1016/j.scico.2012.04.00879(241-259)Online publication date: 1-Jan-2014
    • (2013)Systematizing pragmatic software reuseACM Transactions on Software Engineering and Methodology10.1145/2377656.237765721:4(1-44)Online publication date: 7-Feb-2013
    • Show More Cited By

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media