Digging for diamonds: Identifying valuable web automation programs in repositories Jarrod Jackson 1, Chris Scaffidi 2, Katie Stolee 2 1 Oregon State University.

Slides:



Advertisements
Similar presentations
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
Advertisements

Refactoring Overview  What is refactoring?  What are four good reasons to refactor?  When should you refactor?  What is a bad smell (relative to refactoring.
Perceptron-based Global Confidence Estimation for Value Prediction Master’s Thesis Michael Black June 26, 2003.
Decision Tree Algorithm
Lisp. Versions of LISP Lisp is an old language with many variants –LISP is an acronym for List Processing language Lisp is alive and well today Most modern.
Learn how to search for information the smart way Choose your own adventure!
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
Lecture 24: Thurs. Dec. 4 Extra sum of squares F-tests (10.3) R-squared statistic (10.4.1) Residual plots (11.2) Influential observations (11.3,
Main task -write me a program
IS 1181 IS 118 Introduction to Development Tools VB Chapter 03.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
While Loops and Do Loops. Suppose you wanted to repeat the same code over and over again? System.out.println(“text”); System.out.println(“text”); System.out.println(“text”);
Advanced File Processing
CC0002NI – Computer Programming Computer Programming Er. Saroj Sharan Regmi Week 7.
1 Wikification CSE 6339 (Section 002) Abhijit Tendulkar.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
The Joel Test 12 Steps to Better Code. Readings The Joel Test (by Joel Spolsky) 043.html.
Lecture Set 5 Control Structures Part D - Repetition with Loops.
Lecture 2 Fundamental Data Types. Variable Declaration.
Code You Can Use: Searching for web automation scripts based on reusability James Admire, Abbas Al Zawwad, Abdulwahab Almorebah, Sanchit Karve, Christopher.
Mining and Analysis of Control Structure Variant Clones Guo Qiao.
Understanding and Predicting Personal Navigation Date : 2012/4/16 Source : WSDM 11 Speaker : Chiu, I- Chih Advisor : Dr. Koh Jia-ling 1.
Refactoring Improving the structure of existing code Refactoring1.
Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command to search for.
OHTO -99 SOFTWARE ENGINEERING “SOFTWARE PRODUCT QUALITY” Today: - Software quality - Quality Components - ”Good” software properties.
Mozilla Corporation Chris Hofmann Mozilla Test Day Sprint.
Towards Mining Informal Online Data to Guide Component-Reuse Decisions Sanchit Karve 1, Chris Scaffidi 2 1 McAfee Software (formerly Oregon State University)
Yazd University, Electrical and Computer Engineering Department Course Title: Advanced Software Engineering By: Mohammad Ali Zare Chahooki 1 Machine Learning.
AMERICAN METEOROLOGICAL SOCIETY 1 Harvey Stern 22 nd Conference on Interactive Information and Processing Systems, Atlanta, 30 January, Combining.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
Python uses boolean variables to evaluate conditions. The boolean values True and False are returned when an expression is compared or evaluated.
Computer Architecture
SOFTWARE METRICS. Software Process Revisited The Software Process has a common process framework containing: u framework activities - for all software.
THE IRISH SOFTWARE ENGINEERING RESEARCH CENTRELERO© What we currently know about software fault prediction: A systematic review of the fault prediction.
Surya Bhupatiraju MIT PRIMES May 20 th, 2012 On the Complexity of the Marginal Consistency Problem.
I Power Higher Computing Software Development Development Languages and Environments.
By Tharith Sriv. To write a web page you use: HHTML (HyperText Markup Language), AASP (Active Server Page), PPHP (HyperText Preprocessor), JJavaScript,
Design - programming Cmpe 450 Fall Dynamic Analysis Software quality Design carefully from the start Simple and clean Fewer errors Finding errors.
Protecting Browsers from Extension Vulnerabilities Paper by: Adam Barth, Adrienne Porter Felt, Prateek Saxena at University of California, Berkeley and.
Estimating “Size” of Software There are many ways to estimate the volume or size of software. ( understanding requirements is key to this activity ) –We.
Java Programming Fifth Edition Chapter 5 Making Decisions.
Chapter 5: Making Decisions. Objectives Plan decision-making logic Make decisions with the if and if…else structures Use multiple statements in if and.
1 MSTE Visual SourceSafe For more information, see:
 Who Uses Web Search for What? And How?. Contribution  Combine behavioral observation and demographic features of users  Provide important insight.
Predicting Reuse of End-User Web Macro Scripts Chris Scaffidi 1  2, Chris Bogart 2, Margaret Burnett 2, Allen Cypher 3, Brad Myers 1, Mary Shaw 1 1 Carnegie.
COMPUTER ORGANIZATION AND ASSEMBLY LANGUAGE Lecture 21 & 22 Processor Organization Register Organization Course Instructor: Engr. Aisha Danish.
Indexes Anthony Sealey University of Toronto This material is distributed under an Attribution-NonCommercial-ShareAlike 3.0 Unported Creative Commons License,
1 GLOBAL BIOMETRICS Biostatistics Clinical Data Management Epidemiology & Patient Reported Outcomes Statistical Programming and Analysis Strategic Planning,
Project 5: Using Pop-Up Windows Essentials for Design JavaScript Level One Michael Brooks.
Identifying “Best Bet” Web Search Results by Mining Past User Behavior Author: Eugene Agichtein, Zijian Zheng (Microsoft Research) Source: KDD2006 Reporter:
Perfecto Mobile Automation
Copyright © 2014 Curt Hill Algorithms From the Mathematical Perspective.
Irakli Garibashvili Director, National Scientific Library in Georgia.
Announcements Assignment 2 Out Today Quiz today - so I need to shut up at 4:25 1.
Design by Contract. The Goal Ensure the correctness of our software (correctness) Recover when it is not correct anyway (robustness) Correctness: Assertions.
Chris Knight Beginners’ workshop.
2011 Data Mining Industrial & Information Systems Engineering Pilsung Kang Industrial & Information Systems Engineering Seoul National University of Science.
IBM Software Group © 2008 IBM Corporation Tivoli Provisioning Manager Beta Program Web Replay Intro and Lab September, 2008 Robert Uthe.
Shadow Detection in Remotely Sensed Images Based on Self-Adaptive Feature Selection Jiahang Liu, Tao Fang, and Deren Li IEEE TRANSACTIONS ON GEOSCIENCE.
JavaScript Invented 1995 Steve, Tony & Sharon. A Scripting Language (A scripting language is a lightweight programming language that supports the writing.
Introduction to Digital Analytics Keith MacDonald Guest Presentation.
JavaScript Part 1 Introduction to scripting The ‘alert’ function.
CHAPTER NINE.
Alan P. Reynolds*, David W. Corne and Michael J. Chantler
“Under the hood”: Angry Birds Maze
Rule Induction for Classification Using
Building Java Programs Chapter 2
“Under the hood”: Angry Birds Maze
Presentation transcript:

Digging for diamonds: Identifying valuable web automation programs in repositories Jarrod Jackson 1, Chris Scaffidi 2, Katie Stolee 2 1 Oregon State University 2 University of Nebraska - Lincoln

2 Web scripts: Enabling users to enhance the browser IBM CoScripter Web Macro Problem  Approach  Evaluation  Conclusion

3 Web scripts: Enabling users to enhance the browser Yahoo Pipe Problem  Approach  Evaluation  Conclusion

4 Web scripts: Enabling users to enhance the browser GreaseMonkey UserScript Problem  Approach  Evaluation  Conclusion

5 Repositories of end-user code: The good, the great, and the “other” C. Bogart, et al. End-User Programming in the Wild: A Field Study of CoScripter Scripts. VL/HCC Previous study: Of 1445 web macros… ~ 10% had many runs ~ 10% had many users ~ 80% were “other” This is the largest web macro repository > 6000 users, > 3000 “public” scripts Problem  Approach  Evaluation  Conclusion

6 What if our repositories could… … omit pieces of code from search results if they are unlikely to be reused, anyway?... provide a UI for administrators to review (and remove?) old code that’s unlikely to be used? … advise programmers, when they upload code, about how to improve the reusability of their code? Problem  Approach  Evaluation  Conclusion

7 Needed: a model for predicting reuse Key questions for discovering such a model… –What information about the code indicates reusability? –How do we combine this information to predict reuse? Similar models have been successful on OO code –Predicting reuse based on coupling & cohesion –Predicting bugginess based on code complexity metrics, information about code authors, code churn, … Web scripts are much simpler (don’t call each other, don’t have inheritance, etc)… we need different information here. Problem  Approach  Evaluation  Conclusion

8 Prior work found 35 traits (in 8 categories) statistically related to reuse Mass appeal – eg popular keywords Language – eg data values are in English Annotations – eg comments Flexibility – eg parameterization (variables) Length – eg small # distinct lines of code Author information – eg early adopter? Advanced syntax – eg “control-click” keyword No Preconditions – eg no cookies needed All traits are computed automatically from one of four sources: executable code statements, URLs referenced, annotations, code history. Problem  Approach  Evaluation  Conclusion

9 Given a binary measure of reuse, for each trait –Find the threshold that optimally divides the reused scripts from the un-reused scripts Model that we developed (in words & pictures) Trait level Threshold Problem  Approach  Evaluation  Conclusion

10 Predicting if a macro will be reused Count how many predictors are satisfied Predict that the macro will be reused if this count exceeds some minimum –A tunable parameter –A higher minimum implies a higher bar that a script must overcome to be predicted as to be reused Fewer false positives, higher false negatives Problem  Approach  Evaluation  Conclusion

11Example E.g.: Suppose that our measure of reuse is “script is reused more than 75% of other scripts” Suppose that based on this measure of reuse, the best thresholds for four predictors are… comments ≥ 3 lines_of_code ≥ 40 prev_created ≥ 10 literals ≤ 4 The model would predict that some other script would satisfy the reuse measure criterion if the script satisfies at least n of these predictors Problem  Approach  Evaluation  Conclusion

12 How well does this approach work… … for different kinds of web scripts? … for different reuse measures? … when predicting future reuse based on past data? … when only a subset of traits are available? Problem  Approach  Evaluation  Conclusion

13 Scripts and measures for our evaluation Problem  Approach  Evaluation  Conclusion Measure cutoff

14 Accuracy varied little by measure or script type (e.g., TP ≥ 0.7 at FP = 0.4) Problem  Approach  Evaluation  Conclusion

15 Yahoo Pipe accuracy slipped a bit when using past to predict future Problem  Approach  Evaluation  Conclusion

16 Code-based traits gave nearly the full accuracy (History, URL, Annotations, Code) Problem  Approach  Evaluation  Conclusion

17Conclusions Model is equally accurate for a range of uses –And might only require code-based traits Problem  Approach  Evaluation  Conclusion

18 Conclusions and future work Model is equally accurate for a range of uses –And might only require code-based traits –But can we improve accuracy by using information available after reuse is attempted? –Can we also predict how happy people will be when reusing different pieces of code? And now to put the model to work… –Improving search engines –Providing UI for administrators to review macros –Giving programmers advice automatically Problem  Approach  Evaluation  Conclusion

19 Thank You To ICISA for this opportunity to present this paper Problem  Approach  Evaluation  Conclusion

20 So how do we separate the wheat from the chaff? Providing such features requires predicting whether code will ever be reused –Without relying on information that’s available after code is reused (“chicken and egg”) Ratings, reviews, etc… (For some features, of course, we can always add this information in later.) –With a fairly simple model for making predictions So that predictions can be explained to users Especially when we’re advising users about how to improve reusability of their code!!!!! Problem  Approach  Evaluation  Conclusion