the end-to-end use of source code example: an exploratory study icsm'09

15
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

Upload: rylan-cottrell

Post on 09-Jul-2015

1.088 views

Category:

Technology


1 download

DESCRIPTION

Exploratory study on the currently available tools in supporting developers performing the end-to-end reuse process.

TRANSCRIPT

Page 1: The End-to-End Use of Source Code Example: An Exploratory Study  ICSM'09

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

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

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

Example

Page 5: The End-to-End Use of Source Code Example: An Exploratory Study  ICSM'09

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

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

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

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

Research Question

• Is pipelining existing tools enough?

Page 10: The End-to-End Use of Source Code Example: An Exploratory Study  ICSM'09

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

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

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

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

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

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.