/
duplicated_optimize.html
138 lines (129 loc) · 5.49 KB
/
duplicated_optimize.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<HTML>
<HEAD>
<TITLE> CloneDigger Report </TITLE>
<script type="text/javascript">
function unhide(divID) {
var item = document.getElementById(divID);
if (item) {
item.className=(item.className=='hidden')?'unhidden':'hidden';
}
}
</script>
<style type="text/css">
.hidden { display: none; }
.unhidden { display: block; }
.preformatted {
border: 1px dashed #3c78b5;
font-size: 11px;
font-family: Courier;
margin: 10px;
line-height: 13px;
}
.preformattedHeader {
background-color: #f0f0f0;
border-bottom: 1px dashed #3c78b5;
padding: 3px;
text-align: center;
}
.preformattedContent {
background-color: #f0f0f0;
padding: 3px;
}
<!--
<div class="preformatted"><div class="preformattedContent">
<pre>Clone Digger
</pre>
</div></div>
-->
</style>
</HEAD>
<BODY>
<P>Source files: 3</P>
<a href = "javascript:unhide('files');">Click here to show/hide file names</a><div id="files" class="hidden"><P><B>Source files:</B><BR>optimize/customcg.py, <BR>optimize/optimize.py, <BR>optimize/__init__.py</P></div>
<P>Clones detected: 3</P>
<P>15 of 384 lines are duplicates (3.91%) </P>
<P>
<B>Parameters<BR> </B>
clustering_threshold = 10<BR>
distance_threshold = 5<BR>
size_threshold = 5<BR>
hashing_depth = 1<BR>
clusterize_using_hash = False<BR>
clusterize_using_dcup = False<BR>
</P>
<B>Time elapsed</B><BR>Construction of AST : 0.09 seconds<BR>
Building statement hash : 0.00 seconds<BR>
Building patterns : 0.07 seconds<BR>
Marking similar statements : 0.08 seconds<BR>
Finding similar sequences of statements : 0.01 seconds<BR>
Refining candidates : 0.00 seconds<BR>
Total time: 0.26<BR>
Started at: Mon Aug 1 06:56:33 2016<BR>
Finished at: Mon Aug 1 06:56:34 2016
<P><B>Clone # 1</B><BR>Distance between two fragments = 2 <BR>Clone size = 5<TABLE NOWRAP WIDTH=100% BORDER=1><TD>Source file "optimize/optimize.py"<BR>The first line is 292</TD><TD></TD><TD>Source file "optimize/optimize.py"<BR>The first line is 222</TD></TR><TR>
<TD>
if <span style="color: rgb(255, 0, 0);">counter</span> < <span style="color: rgb(255, 0, 0);">maxiter</span>:<BR>
solution.success = True<BR>
else:<BR>
solution.success = False<BR>
solution.message = 'Maximum iterations exceeded'</TD>
<TD style="width: 10px;" BGCOLOR=RED> </TD><TD>
if <span style="color: rgb(255, 0, 0);">i</span> < <span style="color: rgb(255, 0, 0);">max_outer_iter</span>:<BR>
solution.success = True<BR>
else:<BR>
solution.success = False<BR>
solution.message = 'Maximum iterations exceeded'</TD>
</TR>
<TR>
<TD>
return solution</TD>
<TD style="width: 10px;" BGCOLOR=AQUA> </TD><TD>
return solution</TD>
</TR>
</TABLE> </P> <HR><BR>
<P><B>Clone # 2</B><BR>Distance between two fragments = 2 <BR>Clone size = 5<TABLE NOWRAP WIDTH=100% BORDER=1><TD>Source file "optimize/optimize.py"<BR>The first line is 292</TD><TD></TD><TD>Source file "optimize/customcg.py"<BR>The first line is 127</TD></TR><TR>
<TD>
if <span style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">counter</span></span> < <span style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">maxiter</span></span>:<BR>
solution.success = True<BR>
else:<BR>
solution.success = False<BR>
solution.message = 'Maximum iterations exceeded'</TD>
<TD style="width: 10px;" BGCOLOR=RED> </TD><TD>
if <span style="color: rgb(255, 0, 0);">step</span> < <span style="color: rgb(255, 0, 0);">maxiters</span>:<BR>
solution.success = True<BR>
else:<BR>
solution.success = False<BR>
solution.message = 'Maximum iterations exceeded'</TD>
</TR>
<TR>
<TD>
return solution</TD>
<TD style="width: 10px;" BGCOLOR=AQUA> </TD><TD>
return solution</TD>
</TR>
</TABLE> </P> <HR><BR>
<P><B>Clone # 3</B><BR>Distance between two fragments = 2 <BR>Clone size = 5<TABLE NOWRAP WIDTH=100% BORDER=1><TD>Source file "optimize/optimize.py"<BR>The first line is 222</TD><TD></TD><TD>Source file "optimize/customcg.py"<BR>The first line is 127</TD></TR><TR>
<TD>
if <span style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">i</span></span> < <span style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">max_outer_iter</span></span>:<BR>
solution.success = True<BR>
else:<BR>
solution.success = False<BR>
solution.message = 'Maximum iterations exceeded'</TD>
<TD style="width: 10px;" BGCOLOR=RED> </TD><TD>
if <span style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">step</span></span> < <span style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">maxiters</span></span>:<BR>
solution.success = True<BR>
else:<BR>
solution.success = False<BR>
solution.message = 'Maximum iterations exceeded'</TD>
</TR>
<TR>
<TD>
return solution</TD>
<TD style="width: 10px;" BGCOLOR=AQUA> </TD><TD>
return solution</TD>
</TR>
</TABLE> </P> <HR>
<HR>
Clone Digger is aimed to find software clones in Python and Java programs. It is provided under the GPL license and can be downloaded from the site <a href="http://clonedigger.sourceforge.net">http://clonedigger.sourceforge.net</a>
</BODY>
</HTML>