Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter
-
Upload
luca-ponzanelli -
Category
Engineering
-
view
215 -
download
0
Transcript of Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter
![Page 1: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/1.jpg)
Mining StackOverflow to Turn the IDE into a Self-confident Programming Prompter
Luca Ponzanelli, Gabriele Bavota, Massimiliano Di Penta, Rocco Oliveto, and Michele Lanza
http://prompter.inf.usi.ch
![Page 2: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/2.jpg)
The Lone Developer
![Page 3: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/3.jpg)
Collaborating People
![Page 4: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/4.jpg)
Pair Programming
![Page 5: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/5.jpg)
Pair Programming
![Page 6: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/6.jpg)
Online Resources
![Page 7: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/7.jpg)
Recommender Systems for Software Engineering
M. P. Robillard, R. J. Walker, and T. Zimmerman Recommender systems for software engineering IEEE Software, 2010
“RSSEs are software applications that provide information estimated to be valuable for a software engineering task in a given context”
![Page 8: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/8.jpg)
No Spontaneous Recommendation
![Page 9: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/9.jpg)
No Spontaneous Recommendation
No Self-Confidence
![Page 10: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/10.jpg)
Pair Programming
![Page 11: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/11.jpg)
ThePrompter
![Page 12: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/12.jpg)
ProgrammingPrompter
![Page 14: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/14.jpg)
![Page 15: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/15.jpg)
●
NP P
2040
6080
100
Treatment
Com
pleteness
Development Task
NP = Without PrompterP = With Prompter
Prompter is effective in development tasks
![Page 16: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/16.jpg)
Prompter
Eclipse
![Page 17: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/17.jpg)
Query Generation Service
Prompter
Eclipse
Code Context
![Page 18: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/18.jpg)
Query Generation Service
Prompter
Eclipse
Code Context
org.tartarus.snowball.SnowballStemmerorg.tartarus.snowball.ext.englishStemmerjava.util.Listjava.util.ArrayListString
API Types
setCurrent, getCurrent, stem, addAPI Method Names
@Overridepublic List<String> filter(final List<String> tokens) {
final List<String> stemmed = new ArrayList<String>();for(final String t : tokens){
SnowballStemmer stemmer = new englishStemmer();stemmer.setCurrent(t);stemmer.stem();stemmed.add(stemmer.getCurrent());
}return stemmed;
}
Entity Code
![Page 19: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/19.jpg)
Query Generation Service
Prompter
Eclipse
Query
![Page 20: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/20.jpg)
Query Generation Service
Prompter
Eclipse
Query
@Overridepublic List<String> filter(final List<String> tokens) {
final List<String> stemmed = new ArrayList<String>();for(final String t : tokens){
SnowballStemmer stemmer = new englishStemmer();stemmer.setCurrent(t);stemmer.stem();stemmed.add(stemmer.getCurrent());
}return stemmed;
}
Term Frequency Entropy Frequency * (1- Entropy)
stemmer 6 0.15 5.1
stemmed 3 0.15 2.55
tokens 2 0.45 1.1
list 4 0.74 1.04
snowball 1 0.11 0.89
stem 1 0.25 0.75
english 1 0.51 0.49
filter 1 0.58 0.42
array 1 0.72 0.28
set 1 0.8 0.2
add 1 0.84 0.16
![Page 21: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/21.jpg)
Search Engines Proxy
Ranking Model
Query Generation Service
Search Service
Prompter
Eclipse
Query
Code Context
![Page 22: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/22.jpg)
Bing
Blekko
Search Engines
Query
Ranking Model
Search Engines Proxy
Search Service
Code Context
Query Generation Service
Prompter
Eclipse
Results
![Page 23: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/23.jpg)
Search Engines Proxy
Ranking ModelPrompter
Query Generation Service
Search Service
Eclipse
Discussions IDs
Stack Overflow API Service
Bing
Blekko
Search Engines
![Page 24: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/24.jpg)
Stack Overflow API Service
Ranking Model
Search Engines Proxy
Prompter
Query Generation Service
Search Service
Eclipse
Documents
Bing
Blekko
Search Engines
![Page 25: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/25.jpg)
Stack Overflow API Service
Search Engines Proxy
Search Service
Prompter
Eclipse
Ranked Results
Query Generation Service
Ranking Model
Bing
Blekko
Search Engines
![Page 26: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/26.jpg)
Stack Overflow API Service
Query Generation Service
Prompter
Eclipse
Code Context
Search Engines Proxy
Search Service
Prompter
Eclipse
Ranked Results
Ranking Model
Bing
Blekko
Search Engines
Prompter
Eclipse
QueryQuery
Code Context
Query
Results
Documents
![Page 27: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/27.jpg)
Query Generation Service
Ranking Model Stack Overflow
API Service
Prompter
Eclipse
Code Context
Search Engines Proxy
Search Service
Ranked Results
Bing
Blekko
Search EnginesQueryQuery
Code Context
Query
Results
Documents
![Page 28: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/28.jpg)
<code> …
</code>
![Page 29: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/29.jpg)
~ <code> …
</code>
@Overridepublic List<String> filter(final List<String> tokens) {
final List<String> stemmed = new ArrayList<String>();for(final String t : tokens){
SnowballStemmer stemmer = new englishStemmer();stemmer.setCurrent(t);stemmer.stem();stemmed.add(stemmer.getCurrent());
}return stemmed;
}
Entity Code
![Page 30: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/30.jpg)
Code Related
Textual Similarity
Code Similarity
API Types Similarity
API Method Names Similarity
Community Related
Question Score
Accepted Answer Score
User Reputation
Tags Similarity
Code Context Similarity Features
![Page 31: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/31.jpg)
74 Code Context
2
Retrieve Discussions(37 for Calibration)
1
Manual Classification
3 S =nX
i=1
wi · fi
nX
i=1
wi = 1
having
Model Calibration
4
![Page 32: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/32.jpg)
Find all wi that maximize the number of relevant discussions ranked at the top
Model Calibration
S =nX
i=1
wi · fi
nX
i=1
wi = 1
having
![Page 33: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/33.jpg)
Code Related (fi) wi
Textual Similarity 0.32
Code Similarity 0.00
API Types Similarity 0.00
API Method Names Similarity 0.30
Community Related (fi) wi
Question Score 0.07
Accepted Answer Score 0.00
User Reputation 0.13
Tags Similarity 0.18
S =nX
i=1
wi · fi
nX
i=1
wi = 1
having
Model Calibration
![Page 34: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/34.jpg)
Validation
![Page 35: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/35.jpg)
Study I Evaluating Recommendations Accuracy
Study II Evaluating Prompter with Developers
Validation
![Page 36: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/36.jpg)
33 Participants (Online Survey)Industry 13
Ph.D. 9
Master 7
Bachelor 2
Faculty 2
Study I Evaluating Recommendations Accuracy
![Page 37: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/37.jpg)
![Page 38: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/38.jpg)
“76% of the discussions where considered related (median 4) or strongly related (median 5) by developers, while only 10% was considered as unrelated.”
Study I Summary
![Page 39: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/39.jpg)
12 ParticipantsIndustry 6
Master 3
Bachelor 3
Study II Evaluating Prompter with Developers
![Page 40: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/40.jpg)
Development Maintenance
Prompter Prompter
Without PrompterWithout Prompter
![Page 41: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/41.jpg)
Development Maintenance
Prompter Prompter
Without PrompterWithout Prompter
![Page 42: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/42.jpg)
NP P
4060
80100
Treatment
Com
pleteness
●
NP P
2040
6080
100
TreatmentCom
pleteness
Maintenance Task Development Task
NP = Without PrompterP = With Prompter
Study II Quantitative Analysis
![Page 43: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/43.jpg)
Study II Qualitative Analysis
11 out of 12 Participants would use Prompter in their daily activities
![Page 44: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/44.jpg)
Study II Qualitative Analysis
11 out of 12 Participants would use Prompter in their daily activities
Explicitly write and execute queries
![Page 45: Mining Stack Overflow to Tun the IDE into a Self-confident Programming Prompter](https://reader034.fdocuments.us/reader034/viewer/2022042907/587a26bd1a28abbd388b52b3/html5/thumbnails/45.jpg)
Turn the IDE into a Self-Confident Programming Prompter
Luca Ponzanelli, Gabriele Bavota, Massimiliano Di Penta, Rocco Oliveto, and Michele Lanza
http://prompter.inf.usi.ch