The End-to-End Use of Source Code Example: An Exploratory Study ICSM'09
-
Upload
rylan-cottrell -
Category
Technology
-
view
1.087 -
download
1
description
Transcript of The End-to-End Use of Source Code Example: An Exploratory Study ICSM'09
![Page 1: The End-to-End Use of Source Code Example: An Exploratory Study ICSM'09](https://reader033.fdocuments.in/reader033/viewer/2022060203/559e04ba1a28ab2f6a8b48ae/html5/thumbnails/1.jpg)
The End-to-End Use of
Source Code Example: An
Exploratory Study
Rylan Cottrell, Robert J. Walker, Jörg Denzinger
University of Calgary
Reid Holmes
University of Washington
![Page 2: The End-to-End Use of Source Code Example: An Exploratory Study ICSM'09](https://reader033.fdocuments.in/reader033/viewer/2022060203/559e04ba1a28ab2f6a8b48ae/html5/thumbnails/2.jpg)
End-to-End Reuse Process
Integrate
Example Source Code
Use example Developer’s Context
ExampleRepository
SelectLocate
![Page 3: The End-to-End Use of Source Code Example: An Exploratory Study ICSM'09](https://reader033.fdocuments.in/reader033/viewer/2022060203/559e04ba1a28ab2f6a8b48ae/html5/thumbnails/3.jpg)
End-to-End Reuse Process
Integrate
Example Source Code
Use example Developer’s Context
ExampleRepository
SelectLocate
[Mcilroy 68][Fischer, et al. 91][Dusink&Katwijk 95][Frakes& Fox 96]
![Page 4: The End-to-End Use of Source Code Example: An Exploratory Study ICSM'09](https://reader033.fdocuments.in/reader033/viewer/2022060203/559e04ba1a28ab2f6a8b48ae/html5/thumbnails/4.jpg)
Example
![Page 5: The End-to-End Use of Source Code Example: An Exploratory Study ICSM'09](https://reader033.fdocuments.in/reader033/viewer/2022060203/559e04ba1a28ab2f6a8b48ae/html5/thumbnails/5.jpg)
Example
InterfacesComments
First 10 results return:4 Interfaces.5Implementations.
2 were specific to a particular library.3 had dependencies on other classes within its system.
1Test (dependent on specific system).
Only 21,690 more to go!
![Page 6: The End-to-End Use of Source Code Example: An Exploratory Study ICSM'09](https://reader033.fdocuments.in/reader033/viewer/2022060203/559e04ba1a28ab2f6a8b48ae/html5/thumbnails/6.jpg)
Example
• 3 out of 10 were possibly relevant.
• Worst case, developer could have to reuse roughly 1882 lines of code.
![Page 7: The End-to-End Use of Source Code Example: An Exploratory Study ICSM'09](https://reader033.fdocuments.in/reader033/viewer/2022060203/559e04ba1a28ab2f6a8b48ae/html5/thumbnails/7.jpg)
End-to-End Reuse Process
Integrate
Example Source Code
Use example Developer’s Context
ExampleRepository
SelectLocate
![Page 8: The End-to-End Use of Source Code Example: An Exploratory Study ICSM'09](https://reader033.fdocuments.in/reader033/viewer/2022060203/559e04ba1a28ab2f6a8b48ae/html5/thumbnails/8.jpg)
No End-to-End Tools Exist
Integrate
Example Source Code
Developer’s Context
ExampleRepository
SelectLocate
Google Code Search, XFinder, XSnip
pet, ProspectorJigsaw
PARSEWeb, Strathcona
![Page 9: The End-to-End Use of Source Code Example: An Exploratory Study ICSM'09](https://reader033.fdocuments.in/reader033/viewer/2022060203/559e04ba1a28ab2f6a8b48ae/html5/thumbnails/9.jpg)
Research Question
• Is pipelining existing tools enough?
![Page 10: The End-to-End Use of Source Code Example: An Exploratory Study ICSM'09](https://reader033.fdocuments.in/reader033/viewer/2022060203/559e04ba1a28ab2f6a8b48ae/html5/thumbnails/10.jpg)
Case Studies
• Four scenarios were chosen from the literature (PARSEWeb, Strathcona, XFinder, and XSnippet).
• Located examples using Strathcona and Google Code Search.
• Analyzed the first 5 returned results [Starke &Sillito 09].
• Integrated potentially relevant examples, manually and with the Jigsaw tool.
![Page 11: The End-to-End Use of Source Code Example: An Exploratory Study ICSM'09](https://reader033.fdocuments.in/reader033/viewer/2022060203/559e04ba1a28ab2f6a8b48ae/html5/thumbnails/11.jpg)
Lessons Learned
• Location
– Results were ordered with respect to the query and not the end-to-end task.
– Query does not capture the developer’s reuse context.
• Selection
– Determining example relevant is difficult.
![Page 12: The End-to-End Use of Source Code Example: An Exploratory Study ICSM'09](https://reader033.fdocuments.in/reader033/viewer/2022060203/559e04ba1a28ab2f6a8b48ae/html5/thumbnails/12.jpg)
Lessons Learned Cont’d
• Integration
– Manual. Identifying the dependencies the code example might have is non-trivial.
– Jigsaw. Configuration time often took more time than the actual integration.
![Page 13: The End-to-End Use of Source Code Example: An Exploratory Study ICSM'09](https://reader033.fdocuments.in/reader033/viewer/2022060203/559e04ba1a28ab2f6a8b48ae/html5/thumbnails/13.jpg)
Moving Forward
1.Repositories become out of date.Solution: Maintainers need to not only keep source code up-to-date, but also remove out-of-date source code.
2.Queries need to capture the developer’s context.
Solution: Syntax and semantics should be considered.
3. Example ordering is often ineffective.
Solution: Ordered relative to their utility to the developer.
![Page 14: The End-to-End Use of Source Code Example: An Exploratory Study ICSM'09](https://reader033.fdocuments.in/reader033/viewer/2022060203/559e04ba1a28ab2f6a8b48ae/html5/thumbnails/14.jpg)
Moving Forward Cont’d
4. Attempting multiple integrations is tedious.
Solution: Integration phase should be better supported.
5. Integration task are complex.
Solution: Developer secondary goals should be
considered.
![Page 15: The End-to-End Use of Source Code Example: An Exploratory Study ICSM'09](https://reader033.fdocuments.in/reader033/viewer/2022060203/559e04ba1a28ab2f6a8b48ae/html5/thumbnails/15.jpg)
Summary
• End-to-end reuse approach is not supported by any single tool.
• Current approaches using a collection of tools can inhibit the likelihood of successfully utilizing a source code example.