Cloned code finder offered for Visual Studio

Open-source technology to help developers eliminate duplicate code.

Clone Detective for Visual Studio is available under the Apache 2.0 license

Clone Detective for Visual Studio is available under the Apache 2.0 license

An open-source technology has been launched to help developers using Microsoft Visual Studio 2008 find duplicated code in their software projects.

Called Clone Detective for Visual Studio, the product allows developers to analyze C# projects for source code duplicated elsewhere. These duplicates can lead to inconsistencies and indicate poorly factored code, according to the Clone Detective Web page at Microsoft's CodePlex site for open-source projects.

Version 1.0.0.0 of Clone Detective for Visual Studio was released on August 16 under an Apache 2.0 license.

"Duplicated source code can be an indicator for quality problems," said project coordinator Immo Landwerth. "Having the same algorithm spread across the whole application in slightly different variations will lead to increased maintenance effort, which ultimately may result in inconsistencies."

Among the reasons for code duplication is "lazy" developers who only know how to cut and paste, Landwerth said. Other reasons could include architectural constraints and methodology issues.

While currently limited to C# code, the next release will add capabilities to examine Visual Basic .Net and C++ code, Landwerth said. The integration between Clone Detective and Visual Studio was developed by Landwerth and colleague Thomas Dallmair in cooperation with Technical University of Munich.

"Clone Detective makes it easy for developers to perform a clone detection and visualize the existing clones. However, in some cases, the source duplication cannot be easily removed (e.g. the cost of removing the clones outweighs the costs of keeping them due to heavy design change requirements)," Landwerth said. "In this case, Clone Detective helps by reminding you that a given portion of code is duplicated (by a purple bar in the code editor). So if you make changes to it you should review the other occurrences and make sure you keep your application consistent."

Clone Detective leverages the university's ConQUAT (continuous quality assessment toolkit) tool for clone detection.

The next version of Clone Detective will be able to find "fuzzy clones," said Landwerth. "Fuzzy clones are clones that are almost identical but not token by token. This will allow you to find existing inconsistencies in your code base," he said.

Separately in the Visual Studio realm, TeamExpand this week is offering timesheet-tracking software for Visual Studio.Net software development teams. Functioning with the Microsoft TFS (Team Foundation Server) application lifecycle management server, TeamExpand's commercial release of its TX Chrono timesheet application allows project managers to submit and analyze timesheets.

The Web-based application features a set of notifications and reporting capabilities lacking in TFS, TeamExpand said. TX Chrono offers workflow and TFS compatibility to make software development activities more predictable and visible, the company said. Bug fixes are included as well.

TX Chrono offers:

  • Automated notifications and alerts on projects, individuals and activities.
  • Timesheet submission and approval.
  • Individual and non-standard schedules.
  • Non-standard working hours per day or week.
  • Separate billable and non-billable tasks.
  • Custom timetables.
  • Advanced reporting.

TX Chrono is licensed at US$15 per seat each month. A 30-day free trial version is available at this Web page.

Join the PC World newsletter!

Error: Please check your email address.

Tags .netvisualstudioopensourcevisualbasic

Our Back to Business guide highlights the best products for you to boost your productivity at home, on the road, at the office, or in the classroom.

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Paul Krill

InfoWorld
Show Comments

Essentials

Microsoft L5V-00027 Sculpt Ergonomic Keyboard Desktop

Learn more >

Lexar® JumpDrive® S57 USB 3.0 flash drive

Learn more >

Mobile

Lexar® JumpDrive® S45 USB 3.0 flash drive 

Learn more >

Exec

HD Pan/Tilt Wi-Fi Camera with Night Vision NC450

Learn more >

Audio-Technica ATH-ANC70 Noise Cancelling Headphones

Learn more >

Lexar® JumpDrive® C20c USB Type-C flash drive 

Learn more >

Lexar® Professional 1800x microSDHC™/microSDXC™ UHS-II cards 

Learn more >

Budget

Back To Business Guide

Click for more ›

Most Popular Reviews

Latest News Articles

Resources

PCW Evaluation Team

Azadeh Williams

HP OfficeJet Pro 8730

A smarter way to print for busy small business owners, combining speedy printing with scanning and copying, making it easier to produce high quality documents and images at a touch of a button.

Andrew Grant

HP OfficeJet Pro 8730

I've had a multifunction printer in the office going on 10 years now. It was a neat bit of kit back in the day -- print, copy, scan, fax -- when printing over WiFi felt a bit like magic. It’s seen better days though and an upgrade’s well overdue. This HP OfficeJet Pro 8730 looks like it ticks all the same boxes: print, copy, scan, and fax. (Really? Does anyone fax anything any more? I guess it's good to know the facility’s there, just in case.) Printing over WiFi is more-or- less standard these days.

Ed Dawson

HP OfficeJet Pro 8730

As a freelance writer who is always on the go, I like my technology to be both efficient and effective so I can do my job well. The HP OfficeJet Pro 8730 Inkjet Printer ticks all the boxes in terms of form factor, performance and user interface.

Michael Hargreaves

Windows 10 for Business / Dell XPS 13

I’d happily recommend this touchscreen laptop and Windows 10 as a great way to get serious work done at a desk or on the road.

Aysha Strobbe

Windows 10 / HP Spectre x360

Ultimately, I think the Windows 10 environment is excellent for me as it caters for so many different uses. The inclusion of the Xbox app is also great for when you need some downtime too!

Mark Escubio

Windows 10 / Lenovo Yoga 910

For me, the Xbox Play Anywhere is a great new feature as it allows you to play your current Xbox games with higher resolutions and better graphics without forking out extra cash for another copy. Although available titles are still scarce, but I’m sure it will grow in time.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?