-
Notifications
You must be signed in to change notification settings - Fork 1
/
ISSE21_Experiment.html
329 lines (301 loc) · 11.5 KB
/
ISSE21_Experiment.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-180076082-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-180076082-1');
</script>
<title>Refactoring Lab</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
div.box{
text.align: center;
}
/* Remove the navbar's default margin-bottom and rounded borders */
.navbar {
margin-bottom: 0;
border-radius: 0;
}
.button {
background-color: #555555;;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
border-radius: 8px;
}
/* Add a gray background color and some padding to the footer */
footer {
background-color: #f2f2f2;
padding: 25px;
}
</style>
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="active"><a href="index.html">Home</a></li>
<li class="active"><a href="ISSE21_Experiment.html">Experiment</a></li>
<li class="active"><a href="ISSE21_Example.html">Example</a></li>
</ul>
</div>
</div>
</nav>
<div class="jumbotron">
<div class="container text-center">
<h1>Refactoring for Reuse: An Empirical Study</h1>
</div>
</div>
<blockquote><h2>Research Questions and Findings</h2></blockquote>
<blockquote><strong>RQ1: Do developers refactor code differently for the purpose of improving
reusability?</strong></blockquote>
<blockquote><p>We have shown that the distribution of refactoring types,
applied in the context of reusability, is different from the distribution
of refactoring types in mainstream development. In the refactorings per-
formed to improve reusability, files are subject to more design level
types of refactorings (e.g., Move Method, Extract Method) in general,
and inheritance-related refactorings (e.g., Pull-up Method, Pull-up At-
tribute) in particular, while in other refactorings, files tend to undergo more
renames (e.g., Rename Method, Rename Variable) and data type changes
(e.g., Change Variable Type) to identifiers. Reusability refactorings heavily
impact, high-level code elements, such as packages, classes, and methods,
while typical refactorings, impact all code elements, including identifiers,
and parameters.</p></blockquote>
<div class="container text-center">
<br>
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">Distribution of code elements in reusability refactoring commits</div>
<div class="panel-body"><img src="./Images/ICSR_CodeElementDist.PNG" class="img-responsive" style="width:80%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
</div>
</div>
</div>
<hr>
<blockquote><strong>RQ2: What is the impact of reusability refactorings on structural metrics?</strong></blockquote>
<blockquote><p>When developers refactor their code for the purpose of
reusability, we found that the number of methods significantly increased,
but the majority of the state-of-the-art metrics did not capture any
improvement, or captured non significant improvement.</p></blockquote>
<div style="text-align: center" >
</div>
</div>
</div><br>
<div class="container">
<div class="row">
<div class="col-sm-4">
<div class="panel panel-primary">
<div class="panel-heading">LCOM
</div>
<div class="panel-body"><img src="./Images/ICSR_LCOM.PNG" class="img-responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-danger">
<div class="panel-heading">CBO
</div>
<div class="panel-body"><img src="./Images/ICSR_CBO.PNG" class="img-responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-success">
<div class="panel-heading">WMC
</div>
<div class="panel-body"><img src="./Images/ICSR_WMC.PNG" class="img-responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
</div>
</div><br>
<div class="container">
<div class="row">
<div class="col-sm-4">
<div class="panel panel-primary">
<div class="panel-heading">DIT
</div>
<div class="panel-body"><img src="./Images/ICSR_DIT.PNG" class="img-responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-danger">
<div class="panel-heading">NOC
</div>
<div class="panel-body"><img src="./Images/ICSR_NOC.PNG" class="img-responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-success">
<div class="panel-heading">RFC
</div>
<div class="panel-body"><img src="./Images/ICSR_RFC.PNG" class="img-responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
</div>
</div><br>
<div class="container">
<div class="row">
<div class="col-sm-4">
<div class="panel panel-primary">
<div class="panel-heading">LOC
</div>
<div class="panel-body"><img src="./Images/ICSR_LOC.PNG" class="img-responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-danger">
<div class="panel-heading">CC
</div>
<div class="panel-body"><img src="./Images/ICSR_CC.PNG" class="img-responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-success">
<div class="panel-heading">Paths
</div>
<div class="panel-body"><img src="./Images/ISSE_Paths.PNG" class="img-responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
</div>
</div><br>
<div class="container">
<div class="row">
<div class="col-sm-4">
<div class="panel panel-primary">
<div class="panel-heading">Nesting
</div>
<div class="panel-body"><img src="./Images/ISSE_Nesting.PNG" class="img-responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-danger">
<div class="panel-heading">Fan-in
</div>
<div class="panel-body"><img src="./Images/ISSE_Fan-in.PNG" class="img-responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-success">
<div class="panel-heading">Fan-out
</div>
<div class="panel-body"><img src="./Images/ISSE_Fan-out.PNG" class="img-responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
</div>
</div><br>
<div class="container">
<div class="row">
<div class="col-sm-4">
<div class="panel panel-primary">
<div class="panel-heading">Line with comments
</div>
<div class="panel-body"><img src="./Images/ISSE_LwC.PNG" class="img-responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-danger">
<div class="panel-heading">Statements
</div>
<div class="panel-body"><img src="./Images/ISSE_Statements.PNG" class="img-responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-success">
<div class="panel-heading">Classes
</div>
<div class="panel-body"><img src="./Images/ISSE_Classes.PNG" class="img-responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
</div>
</div><br>
<div class="container">
<div class="row">
<div class="col-sm-4">
<div class="panel panel-primary">
<div class="panel-heading">Instance Variables
</div>
<div class="panel-body"><img src="./Images/ISSE_InstanceVariables.PNG" class="img-responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-danger">
<div class="panel-heading">Instance Methods
</div>
<div class="panel-body"><img src="./Images/ISSE_InstanceMethods.PNG" class="img-responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-success">
<div class="panel-heading">Bases Classes
</div>
<div class="panel-body"><img src="./Images/ISSE_BaseClasses.PNG" class="img-responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
</div>
</div><br>
<blockquote><strong>RQ3: What triggers developers to refactor the code for the purpose of code reuse?</strong></blockquote>
<blockquote><p>Code reuse helps with various software development activities. Our analysis found that the extraction of reusable component leads the rationale behind reuse-related code changes. Refactoring reusable code also helps with API management, duplicate code removal, changes to visibility, test code reorganization, and implementing design patterns.</p></blockquote>
<div class="container text-center">
<br>
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">Distribution of code reuse context in reusability refactoring commits.</div>
<div class="panel-body"><img src="./Images/ISSE_taxonomy.PNG" class="img-responsive" style="width:80%" alt="Image"></div>
<div class="panel-footer"></div>
</div>
</div>
</div>
</div>
</div>
<hr>
<footer class="container-fluid text-center">
</footer>
<!-- Google Analytics -->
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','../../www.google-analytics.com/analytics.js','ga');ga('create','UA-180076082-1','auto');ga('send','pageview');</script>
</body>
</html>