A Search Engine for Code
Introduction
CVSSearch searches for code fragments using CVS comments. Specifically, it takes
advantage of the fact that a CVS comment describes the lines of code involved
in the commit and that this description will typically hold for many future versions.
The CVS comment history greatly aids understanding
what the code does - including its motivation and history.
So CVSSearch offers a better search than just looking at the most recent version
of the code can.
CVSSearch is a CGI application, so you can easily make its powerful features
available within your organisation, or across the internet.
News
- 2004-03-23: I slipped up after the CVS server move, and managed to
check some changes into SF. Everything is now remerged, and I've
disabled CVS on SF to prevent this happening again.
- 2004-03-15: cvssearch CVS has moved to a more reliable server - updated
the links on this page.
- 2003-11-26: cvssearch in CVS should now build with any recent GCC. I've
just installed it locally and will check that everything works. Expect a
demo and another beta release fairly soon.
- 2003-10-10: cvssearch in CVS is now buildable with GCC 3.3, using the
latest version of Xapian and Sleepycat 4.0.x or 4.1.x. Things are progressing!
- 2003-06-02: cvssearch development gains a new lease of life!
I've taken over the cvssearch project with the
blessing of the original cvssearch developers. I'm in the process of
getting the code to build with a recent version of GCC and the third
party libraries which the code is built upon. Once this is done, I'll
release another beta and set up a demo. Feel free to contact me if
you have any questions or want to help out -- Olly Betts
Source Code
Until we release a beta version, you can get the code from CVS:
cvs -z3 -d:pserver:cvsuser@cvs.xapian.org:/usr/data/cvs login
enter the password anonymous
cvs -z3 -d:pserver:cvsuser@cvs.xapian.org:/usr/data/cvs co xapian/xapian-applications/cvssearch
Alternatively, you might find the regular
CVS snapshot more convenient.
Please read the installation and usage instructions in the README.
Demonstration
- KDE demo with 240 apps from official KDE CVS repository [Currently offline]
Papers
- "CVSSearch: Searching through Source Code using CVS Comments"
International Conference on Software Maintenance, pages 364-373, 2001. [ ps.gz / pdf ]
- "Code Search based on CVS Comments: A Preliminary Evaluation" (UNSW CSE TR 0106) [ ps.gz / pdf ]
Sample Queries
Try these conventional queries on various applications:
- configuration
- event
- menu
- paste
- drag drop
Also, some queries that you would not typically do using grep on code but that now become possible:
- bug fixes (find error-prone code and details of past bugs)
- port (find ports of various kinds)
- hack (find hacks that people have done in the past with this code)
- leak (look for code fragments prone to memory leaks)
- qt (qt related issues)
Contact
Please send all bugs/comments to Olly Betts.
Funding
We are looking for sponsors to fund this project. We intend
to provide a truly useful search tool for the open source community.
Other Work
Some of the original developers have been recently working on a tool for design recovery/reverse engineering of interactive graphical applications.