ai techniques in software engineering paradigm · ai techniques in software engineering paradigm...
TRANSCRIPT
![Page 1: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/1.jpg)
AI Techniques in Software Engineering
Paradigm
Computer Science & Engineering Department
The Chinese University of Hong Kong
Rung-Tsong Michael LYU
ICPE 2018
Berlin
April 12, 2018
![Page 2: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/2.jpg)
2
Introduction
AI Techniques
Operational Phase
Analysis Phase
香港中文大学Chinese University of Hong Kong
Development Phase
Conclusion
![Page 3: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/3.jpg)
A Brief History of the IT World
ENIAC
Birth of Internet
The MITS Altair
Apple II
IBM Desktop PC
Time Magazine
Person of the Year
Apple Macintosh
Birth of WWW
Birth of XML
Birth of Web 2.0
Attention
Age
Time Magazine
Person of the Year
3
Birth of iPhone
1750 1945 1969 1975 1981 1983 1984 1989 1996 2004 2006
Industrial
Revolution
Information
AgeWWW
Age
Internet
Age
2007
![Page 4: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/4.jpg)
A Brief History of AI Development
Representation
Language of LogicBirth of “AI” Basic Structure
Symbolics Machine
Deep Blue vs
Kasparov
The Age of AI
Go Game
1956 1965 1974 Mid 80’s 1990-2000 2010 2016 Now
Artificial
Intelligence
Logic
Programming
Big DataExpert
Systems
Neural
NetworkAlpha Go beats
Lee Sedol
Breakthrough IBM Watson
wins on Jeopardy
2011
Turing test
1950
What is
“Intelligence”?IBM’s Watson
4
![Page 5: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/5.jpg)
What is Artificial Intelligence (AI)
Human Intelligence
learning reasoning
perceiving
understanding
feeling
Artificial Intelligence
Artificial Intelligence is the science and
engineering of making intelligent machines
Turing Test (1950)
Boston Dynamics: Atlas
…
5
![Page 6: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/6.jpg)
• Search space is huge: ≈ 10360
What Impact Has AlphaGo Achieved?
6
![Page 7: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/7.jpg)
7
Reborn of Artificial Intelligence
Face recognition
Speech recognition
Natural language
processing
Intelligent systems
(e.g., self-driving)
AI will be
everywhere
![Page 8: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/8.jpg)
8
Software Engineering with AI
• Software Engineering with Artificial Intelligence:
Employing Machine Learning (ML) techniques to assist in
labor-intensive and error-prone tasks.
![Page 9: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/9.jpg)
9
Software Engineering with Intelligence
Development
Operation
Analysis
Source
codes
User
behavior
data
QoS
values
User
reviews
System
logs
Apply ML
Techniques
Logging
statements
![Page 10: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/10.jpg)
10
Introduction
AI Techniques
Operational Phase
Analysis Phase
香港中文大学Chinese University of Hong Kong
Development Phase
Conclusion
![Page 11: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/11.jpg)
11
Artificial Intelligence for Software Engineering
Development
OperationalAnalysis
Machine
Learning
![Page 12: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/12.jpg)
12
Artificial Intelligence for Software Engineering
Development
Operational
Analysis
Machine
Learning
Code completion
Learning to logRNN with Attention
Classification
App issues prioritizing
Emerging issues detection
Service reliability prediction
Log Management
Classification,
Topic modeling,
Matrix factorization,
Classification,
Parallel computing platform
Tasks Techniques
![Page 13: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/13.jpg)
Machine Learning Framework
General framework:
Iterative Update:
Unchanged Data Frequently updated
Parameter
Very Big: cannot be
handled with single
PC
Gradient Descent: Computed in Distributed Environment
13
![Page 14: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/14.jpg)
Matrix Factorization
R UTV
R v1 v2 v3 v4 v5 v6 v7 v8 v1 v2 v3 v4 v5 v6 v7 v8
14
![Page 15: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/15.jpg)
Low-Rank Matrix Factorization
• Objective function
Ui ,Vj : low dimension column vectors to represent user/item preferences.
Regularization termsMain Objective
15
![Page 16: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/16.jpg)
16
The Growing of Deep Learning
Deep learning trends at Google. Source: SIGMOD/Jeff Dean
![Page 17: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/17.jpg)
more computeAccuracy
Scale (data size, model
size)
neural
networks
other ML
approaches
1980s and1990s
Deep Learning Is Neural Networks
17
![Page 18: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/18.jpg)
more computeAccuracy
Scale (data size, model
size)
neural
networks
other ML
approaches
Now
Deep Learning Is Neural Networks
18
![Page 19: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/19.jpg)
19
Deep Learning
Feedforward Neural Networks (FFN)
y = w · x + b
![Page 20: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/20.jpg)
20
Deep Learning
Convolutional Neural Networks (CNN)
![Page 21: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/21.jpg)
“cat”
● A powerful class of machine learning model● Modern reincarnation of artificial neural networks● Collection of simple, trainable mathematical functions
● Compatible with many variants of machine learning
21
What is Deep Learning?
![Page 22: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/22.jpg)
“cat”
● Loosely based on (what little) we know about thebrain
What is Deep Learning?
22
![Page 23: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/23.jpg)
How Do Neural Networks Work?
23
![Page 24: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/24.jpg)
see image
cat
clickif cat
0.1sec: neurons fire
only 10 times!
How Do Neural Networks Work?
Anything humans can do in 0.1 sec, the right
big 10-layer network can do too24
![Page 25: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/25.jpg)
Combining Vision with Robotics
“Deep Learning for Robots:
Learning from Large-Scale
Interaction”, Google Research
Blog, March, 2016
“Learning Hand-Eye
Coordination for Robotic
Grasping with Deep Learning
and Large-Scale Data Collection”,
Sergey Levine, Peter Pastor, Alex
Krizhevsky, & Deirdre Quillen,
Arxiv, arxiv.org/abs/1603.02199
Computers Can Now See
25
![Page 26: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/26.jpg)
What Can Neural Networks Compute?
Human perception is very fast (0.1 second)
• Recognize objects (“see”)
• Recognize speech (“hear”)
• Recognize emotion
• Instantly see how to solve some problems
• And many more!
These can all be computed by Neural
Networks.26
![Page 27: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/27.jpg)
27
Deep Learning
Recurrent Neural Networks (RNN)
A standard RNN An LSTM network
![Page 28: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/28.jpg)
28
Deep Learning
Sequence-to-Sequence Models
![Page 29: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/29.jpg)
29
Deep Learning Platforms
![Page 30: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/30.jpg)
30
Introduction
AI Techniques
Operational Phase
Analysis Phase
香港中文大学Chinese University of Hong Kong
Development Phase
Conclusion
Code completion
Learning to log
![Page 31: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/31.jpg)
31
Development: Code Completion
• Code completion
• Intelligent code completion is essential for software
engineers
• Programming languages: static vs dynamic
• Out-of-Vocabulary (OoV) problem: many words are sparse,
e.g. user-defined identifiers
![Page 32: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/32.jpg)
32
Development: Code Completion
• Abstract syntax tree (AST)
• Locally repeated terms
A Python program and its corresponding abstract syntax tree
![Page 33: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/33.jpg)
33
Development: Code Completion
• Contributions:
– Pointer mixture network for better predicting OoV words
– Effectiveness of attention mechanism
– Significant improvements in code completion task
• Pointer mixture network
– Global RNN component
– Local pointer component
– Controller
![Page 34: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/34.jpg)
34
Development: Code Completion
• Case study
• Pointer Mixture Network successfully point to employee_id,
which is an OoV word
![Page 35: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/35.jpg)
35
Development: Code Completion
• Dataset
– JavaScript (JS) and Python (PY)
• Accuracies on next value prediction with different vocabulary sizes
![Page 36: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/36.jpg)
36
Development: Code Completion
• Comparisons against the state-of-the-arts
– Note that Pointer Mixture Network can be only used for predicting VALUE
node (TYPE node has small size of vocabulary)
• Observations: our models outperform the state-of-the-art in almost all cases
![Page 37: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/37.jpg)
37
Development: Learning to Log
• Challenges of logging
– Logging too little• Miss valuable runtime information
• Increase the difficulty for problem diagnosis
– Logging too much
• Additional cost of code dev. & maintenance
• Runtime overhead
• Producing a lot of trivial logs
• Storage overhead
![Page 38: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/38.jpg)
38
Development: Learning to Log
• What is logging?
– A common programming practice to record runtime system information
– Logging functions: e.g., printf, cout, writeline, etc.
• Logs are crucial for system management
– Various tasks of log analysis
• Anomaly detection, failure diagnosis, etc.
– The only data available for diagnosing production failures
Logging is important!
![Page 39: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/39.jpg)
39
Development: Learning to Log
• Focused snippets: potential error sites
– Exception snippets: try-catch blocks
– Return-value-check snippets: function-return errors
try {method(…);
}catch (IOException) {
log(…);…
}
var res = method(…);if (res == null) {
log(…);…
}
Example 1 Example 2
![Page 40: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/40.jpg)
40
Development: Learning to Log
• Framework of learning to log
– Similar to other machine learning applications (e.g., defect prediction)
![Page 41: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/41.jpg)
41
Development: Learning to Log
• Structural features: structural info of code
private int LoadRulesFromAssembly (string assembly, ...){//Code in Setting try {
AssemblyName aname = AssemblyName.GetAssemblyName(Path.GetFullPath (assembly));Assembly a = Assembly.Load (aname);
}catch (FileNotFoundException) {
Console.Error.WriteLine ("Could not load rulesFrom assembly '{0}'.", assembly); return 0; }... }
}
Exception Type: 0.39 (System.IO.FileNotFoundException)
Containing method: Gendarme.Settings.LoadRulesFromAssembly
Invoked methods: System.IO.Path.GetFullPath, System.Reflection.AssemblyName.GetAssemblyName, System.Reflection.Assembly.Load
/* A code example taken from MonoDevelop (v.4.3.3), at file: * main\external\mono-tools\gendarme\console\Settings.cs, * line: 116. Some lines are omitted for ease of presentation. */
![Page 42: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/42.jpg)
0
0.2
0.4
0.6
0.8
1
42
Development: Learning to Log
• Within-project evaluation
– Random: randomly logging (as a new developer)
– ErrLog [Yuan et al., OSDI’12]: conservatively logging all focused snippets
– LogAdvisor: 0.846 ~ 0.934 accuracy achieved
0
0.2
0.4
0.6
0.8
1
Random
ErrLog
LogAdvisor
Exception snippets Return-value-check snippets
![Page 43: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/43.jpg)
46
Introduction
AI Techniques
Operational Phase
Analysis Phase
香港中文大学Chinese University of Hong Kong
Development Phase
Conclusion
App issues prioritizing
Emerging issues detection
![Page 44: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/44.jpg)
47
Operation: App Issues Prioritizing
• User reviews are valuable source for pinpointing emerging
issues for app development.
• Capturing user-concerned issues and tracking their trends
2,200,000 apps2,800,000 apps 669,000 apps
Changelog
![Page 45: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/45.jpg)
48
①Data Crawling ②Preprocessing ③Filtering
A. Data Extraction
④Phrase Generation ⑤Topic Grouping
B. App Issue Generation
⑥Issue
Prioritizing
C. Visualization and Issue Analysis
1.Call quality2.Free stickers3.Galaxy tab4. …..
⑦Visualization ⑧Issue Analysis
Framework of PAID
Operation: App Issues Prioritizing
![Page 46: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/46.jpg)
49
App # 37
Review # 2,089,737
Time Period 10 months
ID Title Review Date Stars Version
1 CrashLike it cause it doesn’t crash on
androids
2014-11-
09T08:55:475 15.0.0.15.13
2 Rubbish
When I try to connect with
Mobile Network Package, this
don't work and giving
"Connecting.. Problem".
2014-11-
12T18:32:25 1 15.0.0.15.10
Google Play Crawler
Operation: App Issues Prioritizing
![Page 47: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/47.jpg)
50
Rank phrases for each topic by:
▪ Semantic aspect:KL-Divergence
▪ Sentiment aspect:
▪ Total score:
Based on topic modeling, each
topic is labeled with one phrase.
Topic Labeling Process:
Operation: App Issues Prioritizing
![Page 48: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/48.jpg)
51The Themeriver of Viber.
Operation: App Issues Prioritizing
![Page 49: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/49.jpg)
52
The Top Three Reviews Related to “Activation Code”
Rank top reviews for each topic:
Operation: App Issues Prioritizing
![Page 50: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/50.jpg)
Operation: Emerging Issues Detection
R UTV
53
Number of Privacy Related Reviews in Facebook
during July 2013 to April 2015
![Page 51: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/51.jpg)
IDEA
54
Automatic tool for app review analysis
Discovering emerging issues dynamically
Comprehensive issue interpretation
Visualizing issue progression over versions
IDentifying Emerging Issues from App Reviews
![Page 52: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/52.jpg)
Overall Framework
55
![Page 53: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/53.jpg)
Online Topic Modeling
56
![Page 54: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/54.jpg)
Emerging Issue Detection
57
Anomaly Detection - Jensen-Shannon Divergence
𝜷𝟏
𝚽𝟏
ReviewsVersion 1
𝜷𝟐
𝚽𝟐
ReviewsVersion 2
𝜷𝟑
𝚽𝟑
ReviewsVersion 3
𝜷𝟒
𝚽𝟒
ReviewsVersion 4
…
![Page 56: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/56.jpg)
59
Introduction
AI Techniques
Operational Phase
Analysis Phase
香港中文大学Chinese University of Hong Kong
Development Phase
Conclusion
Service reliability prediction
Log Management
![Page 57: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/57.jpg)
Software Reliability Prediction: Small
Data Modeling
𝑹𝒆𝒍𝒊𝒂𝒃𝒊𝒍𝒊𝒕𝒚 𝑹 𝒕 = 𝒆− 𝟎𝒕 𝒙 𝒅𝒙
Present
Present
Objective
Additional Time
Execution Time t
FailureIntensity
(t)
Total Failures
![Page 58: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/58.jpg)
61
Approach 1: Neighborhood-based
• Key idea: Using past usage
experiences of similar users.
• Issue: How to calculate user
similarity?
Service user 1 in Asia
Unreliable
Web service
in US
Service user 2 in US
Reliable
Service-Oriented System
?
Reliability is extended to Quality-of-Service (QoS)
Analysis: Service Reliability Prediction
![Page 59: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/59.jpg)
62
Similarity Computation
• User-item matrix: M× N, each entry is the failure probability of a Web service
• Pearson Correlation Coefficient (PCC)
?0.5
𝑤𝑠1 𝑤𝑠2 𝑤𝑠3 𝑤𝑠4 𝑤𝑠5 𝑤𝑠6
Analysis: Service Reliability Prediction
![Page 60: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/60.jpg)
63
WSRec: Hybrid Prediction Approach
• Similar users + Similar Web services
UPCC
IPCC
Analysis: Service Reliability Prediction
![Page 61: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/61.jpg)
64
Performance Comparison
Analysis: Service Reliability Prediction
![Page 62: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/62.jpg)
65
Drawbacks of Neighborhood-based Approach
• Computational complexity
• Matrix sparsity problem
–Not easy to find similar users (or similar items)
Analysis: Service Reliability Prediction
![Page 63: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/63.jpg)
66
Approach 2: Model-based Approach
• Each row of UT is a set of feature factors, and each column of V is a set of linear predictors Matrix Factorization (MF)
s1 s2 s3 s4 s5 s6The error between the actual
Value and the prediction
Regularization terms
UT V
Analysis: Service Reliability Prediction
![Page 64: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/64.jpg)
67
NIMF: Neighborhood–Integrated Matrix Factorization
User’s own rating Rating due to similar users
Analysis: Service Reliability Prediction
![Page 65: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/65.jpg)
68
Performance Comparison
Analysis: Service Reliability Prediction
![Page 66: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/66.jpg)
69
Reliability Prediction of Web Services
• Approach 1: Neighborhood-based approach – to consider users
• Approach 2: Model-based approach – to consider data sparsity
• Approach 3: Time-aware approach – to consider temporal factor
• Approach 4: Network coordinate based approach – to consider
spatial factor
• Approach 5: Ranking-based approach – to consider ranking
![Page 67: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/67.jpg)
70
Analysis: Log Management
Log Analysis Framework
![Page 68: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/68.jpg)
71Log Parsing
Analysis: Log Management
![Page 69: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/69.jpg)
72
• We design and implement a parallel log parser (namely POP) on top of Spark.
• It can process 200 million lines of raw log messages within 7 min while keeping
high accuracy.
Analysis: Log Management
![Page 70: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/70.jpg)
73
Analysis: Log Management
Existing anomaly detection methods: SVM (left) and PCA (right)
![Page 71: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/71.jpg)
74
Our method: Deep Log Embedding based Anomaly Detection (D-Lead)
Analysis: Log Management
![Page 72: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/72.jpg)
75
LogPAI
(Log Powered by AI)
https://github.com/logpai
Analysis: Log Management
![Page 73: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/73.jpg)
76
Defect Prediction
• Software defect prediction: build classifiers to predict code
areas that potentially contain defects, based on code features.
More effective feature extraction
--Deep Learning
![Page 74: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/74.jpg)
77
Defect Prediction
The overall workflow of proposed DP-CNN
Abstract Syntax
Tree (AST)
1. Parsing source code
and extracting token
vectors
2. Encoding token
vectors
4. Predicting
defects
3. Generating
features via CNN
![Page 75: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/75.jpg)
78
Defect Prediction
Performance on 8 open source projects
![Page 76: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/76.jpg)
79
Introduction
AI Techniques
Operational Phase
Analysis Phase
香港中文大学Chinese University of Hong Kong
Development Phase
Conclusion
![Page 77: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/77.jpg)
80
Conclusion
Before AI becomes conscientious, its intelligence is still
artificial.
Software is eating the world, and AI is eating the software.
---Nvidia CEO Jensen Huang
AI may replace many people’s job, but it will certainly
enhance software engineers to do a better job.
Our goal is to employ AI to provide more efficient and
effective software development, operation, and analysis.
The current achievement is just a small step ahead in a
largely unexplored area in existing software engineering
research paradigms.
![Page 78: AI Techniques in Software Engineering Paradigm · AI Techniques in Software Engineering Paradigm Computer Science & Engineering Department The Chinese University of Hong Kong Rung-Tsong](https://reader036.vdocuments.pub/reader036/viewer/2022071020/5fd45ff3294ede734e407a06/html5/thumbnails/78.jpg)
Thank You!
81