• No results found

Improving the productivity of software developers

N/A
N/A
Protected

Academic year: 2021

Share "Improving the productivity of software developers"

Copied!
45
0
0

Loading.... (view fulltext now)

Full text

(1)

Improving the productivity of software developers

Lecture 1 - What recommenders can be built?

Gail C. Murphy

University of British Columbia
 Tasktop Technologies


@gail_murphy

Laser Summer School 2014 - Lecture 1

(2)

Robillard, Walker and Zimmermann, Recommendation systems for software engineering, IEEE Software 27(4), 80-86, 2010.

“a software application that provides

information items estimated to be valuable for a software engineering task in a given context”

a recommendation system for SE is …

(3)

Robillard, Walker and Zimmermann, Recommendation systems for software engineering, IEEE Software 27(4), 80-86, 2010.

“a software application that provides

information items estimated to be valuable for a software engineering task in a given context”

a recommendation system for SE is …

(4)

Robillard, Walker and Zimmermann, Recommendation systems for software engineering, IEEE Software 27(4), 80-86, 2010.

“a software application that provides

information items estimated to be valuable for a software engineering task in a given context”

various ways to think about the space of SE recommenders

(5)

information spaces

source code

reusable software components (e.g., APIs)

project history (e.g., version control)

software process information (e.g., issues)

interaction information

web information

(6)

intent

consider the range of recommenders to aid software development tasks that have been investigated

consider characteristics of recommenders and their use that will underly remaining lectures

representative examples not indicative of all SE recommenders that have been built!

For more examples, see:

Recommendation Systems in Software Engineering edited by Robillard, Maalej, Walker and Zimmermann, Springer, 2014.

(7)

source code

(8)

examples of recommenders based on source code

quick fixes

code completion

refactoring (e.g., jDeodorant)

program transformation

Image from: http://www.opensourceforu.com/2012/04/foss-is-fun-the-fifth-freedom-part-2/

some questions to consider for each:

1. how are recommendations generated?

2. how accurate are the recommendations?

3. how hard is it to determine which recommendation to take?


4. how easy is it to back out of a wrong choice?

(9)

quick fix

(10)

quick fix

(11)

quick fix

some questions to consider for each:

1. how are recommendations generated?

2. how accurate are the recommendations?

3. how hard is it to determine which recommendation to take?


4. how easy is it to back out of a wrong choice?

(12)

code completion

(13)

refactoring


(e.g., jDeodorant)

identify Feature Envy smells in Java code

generate moveMethod refactorings to reduce smell

!

[Fokaefs et al 2007]

(14)

program transformation

provide examples of similar changes made to source generate edit script (programming by demonstration) recommend similar code

apply edit script

[Meng et al 2013]

LASE approach and tool

(15)

code recommendation
 summary

recommender generation accuracy selecting undoing

quick fix heuristic high but not quantified

expertise

required limits of undo code

completion

type

information 100% often easy easy jDeodorant


(refactoring)

heuristic

metric ?? easy difficult

LASE


(transformation) AST precision

often 100% expert difficult

disclaimer: accuracy are as reported but we aren’t giving experimental

context here so tread carefully.

Selecting and undoing are subjective.

(16)

reusable software

components

(17)

examples of recommenders based on reusable software components

FrUiT

Strathcona

CodeBroker

Image from: EEWeb.com

(18)

FrUiT

support the usage of frameworks

!

1. extract structural relations from applications using an API 2. use association rule mining to identify structural relations 


that are commonly used

3. recommend all rules that mention any of the source code entities in the current file in the editor

[Bruch et al 2006]

(19)

FrUiT

[Bruch et al 2006]

(20)

Strathcona

find examples of API use

!

1. build a db of structural relations from example code

2. if developer needs help, extract context from developer’s
 existing code

3. query db with context

4. use heuristics to match examples (similarity of structural
 relations)

5. return examples as UML class diagram fragments

[Holmes & Murphy, 2005]

(21)

Strathcona

[Holmes & Murphy, 2005]

(22)

Codebroker

help develop new methods based on similar existing ones

!

1. monitor methods being written and extract words used
 in comments, signature and types

2. use LSA to match to existing methods modelled similarly 3. filter matches based on similarity of types

4. recommend most similar

!

[Ye & Fischer 2005]

(23)

Codebroker

[Ye & Fischer 2005]

(24)

api recommendation
 summary

recommender generation accuracy selecting undoing

FrUiT associate

rule mining ~85% expertise

required limits of undo

Strathcona heuristic case study

eval difficult limits of undo

Codebroker LSA high of ~35% easy difficult

disclaimer: accuracy are as reported but we aren’t giving experimental

context here so tread carefully.

Selecting and undoing are subjective.

(25)

project history

(26)

examples of recommenders based on project history

eROSE

expertise recommender

Image from: EEWeb.com

(27)

eROSE

recommend program elements likely to change together

1. mine the version control system to form rules
 of which elements commonly change together
 2. when a developer changes element e, find all 


rules with e and suggest any other elements that
 usually change with e

[Zimmermann et al 2004]

(28)
(29)

expertise recommender

use who changed the file to determine who is an
 expert in the file

[McDonald & Ackerman 2000]

(30)

software process

information

(31)

examples of recommenders based on software process information

who should fix this bug

Image from www.geekcomic.com

(32)

who should fix this bug?

(33)

who should fix this bug?

during bug triage, a bug needs to be assigned

use machine learning to determine which values


in the bug fields suggest particular developers to fix the bug

[Anvik & Murphy 2006]

(34)

interaction information

(35)

examples of recommenders based on interaction information

Eclipse Mylyn

command recommendation

Image from: EEWeb.com

(36)

examples of recommenders

based on interaction information

Eclipse Mylyn

command recommendation

Image from: EEWeb.com

interaction history is!

a sequential record of the ! commands, artifacts, etc. !

that a developer!

has interacted with

(37)

Eclipse Mylyn

track the program elements associated with each task performed to ease recall, sharing, code


recommendations, etc.

[Kersten & Murphy 2006]

(38)
(39)

command recommenders

recommend new commands in a development environment that a developer is not using

yet many peers are

!

requires interaction data from the crowd

!

requires interaction data from a user

!

many algorithms possible, several based on collaborative filtering

[Murphy-Hill et al 2012]

(40)

web information

(41)

examples of recommenders based on web information

Reverb

(42)

Reverb

23% of all revisits of web pages by developers
 are related to code Reverb recommends the 
 web pages to revisit

[Sawadsky et al 2013]

(43)

summary


(non-code, non-API)

recommender generation accuracy selecting undoing eROSE association

rules ~26% moderate easy

expertise
 recommender

heuristic &

metrics no data easy not

applicable who should fix

this bug

machine learning

(SVM)

~40% moderate moderate Eclipse Mylyn degree-of-

interest 100% recall easy easy command

recommenders

collaborative

filtering ~20% easy easy

Reverb heuristic ~40% easy easy

disclaimer: accuracy are as reported but we aren’t giving experimental

context here so tread carefully.

Selecting and undoing are subjective.

(44)

summary

wide range of recommenders have been built, lots of room for more to be built

techniques used to generate vary substantially

accuracy varies greatly (can only be assessed in context of a task)

what’s next?

common technique overview (lectures 2 & 3)

how to deliver recommendations (lecture 4)

how to evaluate a recommender (lecture 5)

(45)

references

Anvik & Murphy. Who should fix this bug? ICSE 2006.

!

Bruch, Schäfer, & Mezini. FrUiT: IDE support for framework understanding. ETX 2006.

!

Fokaefs, Tsantalis & Chatzigeorgiou, jDeodorant: identification and removal of feature envy bad smells. ICSM 07.

!

Holmes & Murphy, Using structural context to recommend source code examples. ICSE 2005.

!

Kertsen & Murphy. Using a task context to improve programmer productivity. FSE 2006.

!

Meng, Kim & McKinley. LASE: locating and applying systematic edits by learning from examples. ICSE 2013.


McDonald & Ackerman. Expertise recommender: a flexible recommendation system and architecture. CSCW 2000.

!

Murphy-Hill, Jiresal and Murphy. Improving software developers’ fluency by recommending development environment commands. FSE 2012.

!

Robillard, Walker and Zimmermann. Recommendation systems for software engineering, IEEE Software 27(4), 80-86, 2010.

!

Robillard, Maalej, Walker and Zimmerann (editors). Recommendation Systems in Software Engineering, Springer 2014.


Sawadsky, Jiresal and Murphy. Reverb: Recommending code-related web pages. ICSE 2013.

!

Ye & Fischer. Reuse-conducive development environments. Automat. SE Int J., 2005.


Zimmermann, Weissgerber, Diehl and Zeller. Mining version histories to guide changes. ICSE 2004.

References

Related documents

In this section the effectiveness of the FMICW waveforms is shown through radar images of stationary targets created using the SAR approach (with 7 measurement

[r]

· 32 This particular variable could lead to an underestimation of effect. The above points may serve to highlight the complex interaction between resident duty hours and

2012 Leap of Sight, Galleri Olsson, Stockholm, Sweden 2011 Hide-outs, The Company, Los Angeles, CA 2010 Video Screenings , Inman Gallery, Houston, TX.. Sigrid Sandström,

In a multi-server installation, an Additional Server Configuration Package file (ACP file) is used, which contains the information needed by the crossTank Server and crossTerm

The dimensionality of structural entities is influenced by the ratio of sequestered to unsequestered cations, and the formation of one-dimensional strands in Zintl phases of

Based on the results of trial excavations which unearthed a number of canal sections (see paragraph “ System of canals in the sanctuary of Pachacamac ”), and other ancillary

The study of Madahi, Samadzade & Javidi (2013) showed that there is a significant negative relationship between marital dissatisfaction and mutual constructive