如何比较类似的代码库? [英] How can I compare similar codebases?

查看:144
本文介绍了如何比较类似的代码库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有几个C ++项目是从同一个代码库构建的。它们之间有很多相似之处和共同的代码,但它们是独立开发的;源不以任何方式共享。即使基本代码没有更改,并且单个行已被调整,更改和替换,类和文件也将被重命名。

We have several C++ projects that were built from the same codebase. There's a lot of similarities and common code between them but they were developed independently; source was not shared in any way. Classes and files will have been renamed even if the underlying code hasn't changed and individual lines will have been tweaked, changed and replaced.

我希望能够比较不同的代码库,并找出有多少代码是相同的。它可以是相当高的水平 - %的代码是相同的是罚款。我还需要能够自动化这个过程。

I'd like to be able to compare the different codebases and find out how much of the code is still the same. It can be fairly high level - % of code that is the same is fine. I also need to be able to automate this process.

有一个工具,我可以在代码库上运行,并得到一些报告/评估, ?

Is there a tool that I can run on the codebases and get some sort of report/assessment of how much is common?

推荐答案

我没有这方面的经验,但它让我回想起我的学校时代我们的大学将通过一个程序运行每个人的代码来找到骗子。这带来了以下链接:

I don't have much experience with this sort of thing, but it made me think back to my school days when our University would run everyones code through a program to find cheaters. This brought me to the following link:

源代码相似性检测

它列出了一些可以满足您需求的开源软件和商业软件。

It names some open source and commercial software that should meet your needs.

这篇关于如何比较类似的代码库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆