same is a tool to find duplicate lines in multiple text files. Very useful to find and fix copy-and-paste programming. It has been designed to be simple, portable, and fast.
Be the first to post a text review of same. Rate and review a project by clicking thumbs up or thumbs down in the right column.
'same' is the opposite of diff: it detects duplicate lines of code in one or more source files. This offers a good starting point for refactoring your code, so that it obeys the DRY (Don't Repeat Yourself) principle (in XP circles also known as Once And Only Once). Originally this tool was developed internally within Baan Development (http://www.baan.com). But thanks to the gracious cooperation of Baan Development's management, 'same' is now open source. Try it, you'll like it.
This file describes the changes made to versions of 'same'. ======== Version 1.2: First open source version. * Renamed tool from 'duploc' to 'same', because a tool named 'duploc' with similar functionality already exists. * Reorganized the package structure. The entry point for the command line interface is now same.textui.SameCLI. ======== Version 1.1: Some bug fixes, refactoring. * Added the 'none' filter, which is now also the default. This does not filter the input at all. * Added some more statistics about the matches. * Fixed a bug that caused matches to be skipped sometimes. Unfortunately performance suffered. But: * Fixed a bug that caused many comparisons to be done more than once. That made performance come back to an acceptable level. * Fixed a bug that caused the 'number of filtered lines' to be too high. * Now uses a 64-bit hash code instead of a 32-bit one. Does not seem to reduce the number of potential matches significantly. * Moved all classes from the default package to com.baan.tools.duploc and com.baan.tools.test.duploc. * Separated the end-user I/O from the functionality. The entry point is now com.baan.tools.duploc.DupLocCLI (was previously DupLoc). This step makes it possible to create a new front end, which receives events through DupLoc.IListener. ======== Version 1.0: Initial published version
This file describes the changes made to versions of 'same'. ======== Version 1.2: First open source version. * Renamed tool from 'duploc' to 'same', because a tool named 'duploc' with similar functionality already exists. * Reorganized the package structure. The entry point for the command line interface is now same.textui.SameCLI. ======== Version 1.1: Some bug fixes, refactoring. * Added the 'none' filter, which is now also the default. This does not filter the input at all. * Added some more statistics about the matches. * Fixed a bug that caused matches to be skipped sometimes. Unfortunately performance suffered. But: * Fixed a bug that caused many comparisons to be done more than once. That made performance come back to an acceptable level. * Fixed a bug that caused the 'number of filtered lines' to be too high. * Now uses a 64-bit hash code instead of a 32-bit one. Does not seem to reduce the number of potential matches significantly. * Moved all classes from the default package to com.baan.tools.duploc and com.baan.tools.test.duploc. * Separated the end-user I/O from the functionality. The entry point is now com.baan.tools.duploc.DupLocCLI (was previously DupLoc). This step makes it possible to create a new front end, which receives events through DupLoc.IListener. ======== Version 1.0: Initial published version
Be the first person to add a text review.
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use
Thanks for your rating!
Would you also like to write a review?