SlideShare a Scribd company logo
1 of 98
Download to read offline
Graph-Based Source Code Analysis
of JavaScript Repositories
Budapest University of Technology and Economics
Department of Measurement and Information Systems
Fault Tolerant Systems Research Group
Dániel Stein
Gábor Szárnyas
Content
1. Context
2. Tooling
3. Use Cases
4. Neo4j Observations
2
Continuous Integration (CI)
– Developers working together
– Prevent integration problems
– Examples
– Jenkins
– Hudson
– Travis CI
3
Verziókezelés
Fordítás
Fejlesztés
Egység- és
integrációs teszt
Development
Version
Control
System
Compilation
Unit and
Integration
Tests
4
Apple,
https://blog.codecentric.de/en/2014/02/curly-braces/
4
Apple,
https://blog.codecentric.de/en/2014/02/curly-braces/
4
whoops
Apple,
https://blog.codecentric.de/en/2014/02/curly-braces/
Static Analysis
– No need for compilation or
execution of the application
– Formatting, structural and
semantic rule checking
– Can extend the workflow of
continuous integration and
improve it
– In this research we used code
analysis utilizing pattern
matching
5
Verziókezelés
Fordítás
Fejlesztés
Egység- és
integrációs teszt
Kódanalízis
Verziókezelés
Fordítás
Fejlesztés
Egység- és
integrációs teszt
Kódanalízis
Development
Version
Control
System
Compilation
Unit and
Integration
Tests
Static
Analysis
Static Analysis
– No need for compilation or
execution of the application
– Formatting, structural and
semantic rule checking
– Can extend the workflow of
continuous integration and
improve it
– In this research we used code
analysis utilizing pattern
matching
5
Verziókezelés
Fordítás
Fejlesztés
Egység- és
integrációs teszt
Kódanalízis
Verziókezelés
Fordítás
Fejlesztés
Egység- és
integrációs teszt
Kódanalízis
Development
Version
Control
System
Compilation
Unit and
Integration
Tests
Static
Analysis
Static Analysis
– No need for compilation or
execution of the application
– Formatting, structural and
semantic rule checking
– Can extend the workflow of
continuous integration and
improve it
– In this research we used code
analysis utilizing pattern
matching
5
Verziókezelés
Fordítás
Fejlesztés
Egység- és
integrációs teszt
Kódanalízis
Verziókezelés
Fordítás
Fejlesztés
Egység- és
integrációs teszt
Kódanalízis
– Java
– FindBugs
– PMD
– CheckStyle
Development
Version
Control
System
Compilation
Unit and
Integration
Tests
Static
Analysis
Static Analysis
– No need for compilation or
execution of the application
– Formatting, structural and
semantic rule checking
– Can extend the workflow of
continuous integration and
improve it
– In this research we used code
analysis utilizing pattern
matching
5
Verziókezelés
Fordítás
Fejlesztés
Egység- és
integrációs teszt
Kódanalízis
Verziókezelés
Fordítás
Fejlesztés
Egység- és
integrációs teszt
Kódanalízis
– Java
– FindBugs
– PMD
– CheckStyle
– JavaScript
– ESLint
– Facebook Infer, Flow
– Tern
– TAJS
Development
Version
Control
System
Compilation
Unit and
Integration
Tests
Static
Analysis
– Thorough code analysis is time-consuming and resource-intensive
– For large projects it can be too slow
Problems to Solve
6
unit tests
static analysis
☼ ☆☾☆
– Thorough code analysis is time-consuming and resource-intensive
– For large projects it can be too slow
– Temporary solution: batching
Problems to Solve
6
unit tests
static analysis
☼ ☆☾☆
unit tests
static analyis
– Thorough code analysis is time-consuming and resource-intensive
– For large projects it can be too slow
– Temporary solution: batching
Present results
as soon and as fast
as possible.
Problems to Solve
6
unit tests
static analysis
☼ ☆☾☆
unit tests
static analyis
Problems to Solve
– Memory limits appear when...
– Global rules are checked
– Storing the structure in-memory
– For large code repositories
– Not being incremental
– Batched execution simply
does not cut it
– Small change induces
complete recheck
7
Our Approach
– Incremental methodology
– Instead of batched execution
– Update the prepared results with the
effects of the change
– Only store the required parts in the
memory
8
analyzer
Δ2.-1.1.
VCS Workspace Abstact Syntax
Tree
Abstract Semantic
Graph
Well-formedness
Rules
Query Execution Database
Main.js | ++----
Dependency.js | +++++-
FIterator.js | ----
Parser.js | ++
Automatic
Well-formedness
Rule Evaluation
Manual Execution
and Data Extraction
Querying and Transformation
.
discoverer
ChangeProcessor.js
CommandParser.js
FileIterator.js
iterators
DepCollector.js
FileDiscoverer.js
InitIterator.js
Main.js
whitepages
ConnectionMgr.js
DependencyMgr.js
neo4jValidation Report
<!>
<?>
<.>
Module
declaration
declarators
items
binding init
left right
Architecture overview
9
VCS Workspace Abstact Syntax
Tree
Abstract Semantic
Graph
Well-formedness
Rules
Query Execution Database
Main.js | ++----
Dependency.js | +++++-
FIterator.js | ----
Parser.js | ++
Automatic
Well-formedness
Rule Evaluation
Manual Execution
and Data Extraction
Querying and Transformation
.
discoverer
ChangeProcessor.js
CommandParser.js
FileIterator.js
iterators
DepCollector.js
FileDiscoverer.js
InitIterator.js
Main.js
whitepages
ConnectionMgr.js
DependencyMgr.js
neo4jValidation Report
<!>
<?>
<.>
Module
declaration
declarators
items
binding init
left right
Architecture overview
9
VCS Workspace Abstact Syntax
Tree
Abstract Semantic
Graph
Well-formedness
Rules
Query Execution Database
Main.js | ++----
Dependency.js | +++++-
FIterator.js | ----
Parser.js | ++
Automatic
Well-formedness
Rule Evaluation
Manual Execution
and Data Extraction
Querying and Transformation
.
discoverer
ChangeProcessor.js
CommandParser.js
FileIterator.js
iterators
DepCollector.js
FileDiscoverer.js
InitIterator.js
Main.js
whitepages
ConnectionMgr.js
DependencyMgr.js
neo4jValidation Report
<!>
<?>
<.>
Module
declaration
declarators
items
binding init
left right
Architecture overview
9
VCS Workspace Abstact Syntax
Tree
Abstract Semantic
Graph
Well-formedness
Rules
Query Execution Database
Main.js | ++----
Dependency.js | +++++-
FIterator.js | ----
Parser.js | ++
Automatic
Well-formedness
Rule Evaluation
Manual Execution
and Data Extraction
Querying and Transformation
.
discoverer
ChangeProcessor.js
CommandParser.js
FileIterator.js
iterators
DepCollector.js
FileDiscoverer.js
InitIterator.js
Main.js
whitepages
ConnectionMgr.js
DependencyMgr.js
neo4jValidation Report
<!>
<?>
<.>
Module
declaration
declarators
items
binding init
left right
Architecture overview
9
Code Processing Steps
20
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
Code Processing Steps
21
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
Code Processing Steps
22
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
Sequence of statements
formalized in a given language
Code Processing Steps
23
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
Sequence of statements
formalized in a given language
Code Processing Steps
24
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
Code Processing Steps
25
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
token – the shortest character
sequence still having meaning.
Code Processing Steps
26
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
token – the shortest character
sequence still having meaning.
Code Processing Steps
27
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
Token Token type
VAR (Keyword)
IDENTIFIER (Ident)
ASSIGN (Punctuator)
NUMBER (NumericLiteral)
DIV (Punctuator)
NUMBER (NumericLiteral)
token – the shortest character
sequence still having meaning.
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
Code Processing Steps
12
Module
VariableDeclarationStatement
VariableDeclaration
VariableDeclarator
BindingIdentifier
name = `foo`
BinaryExpression
operator = `Div`
LiteralNumericExpression
value = 1.0
LiteralNumericExpression
value = 0.0
declaration
declarators
items
binding init
left right
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
Code Processing Steps
12
Abstract Syntax Tree (AST)
– Tree representation of
– the grammar structure of
– the sequence of tokens.
Module
VariableDeclarationStatement
VariableDeclaration
VariableDeclarator
BindingIdentifier
name = `foo`
BinaryExpression
operator = `Div`
LiteralNumericExpression
value = 1.0
LiteralNumericExpression
value = 0.0
declaration
declarators
items
binding init
left right
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
Code Processing Steps
12
Module
VariableDeclarationStatement
VariableDeclaration
VariableDeclarator
BindingIdentifier
name = `foo`
BinaryExpression
operator = `Div`
LiteralNumericExpression
value = 1.0
LiteralNumericExpression
value = 0.0
declaration
declarators
items
binding init
left right
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
Code Processing Steps
13
Module
VariableDeclarationStatement
VariableDeclaration
VariableDeclarator
BindingIdentifier
name = `foo`
BinaryExpression
operator = `Div`
LiteralNumericExpression
value = 1.0
LiteralNumericExpression
value = 0.0
declaration
declarators
items
binding init
left right
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
Code Processing Steps
13
Module
VariableDeclarationState
VariableDeclaration
VariableDeclarator
BindingIdentifier
name = `foo`
BinaryE
operato
LiteralNumericExpression
value = 1.0
declaration
declarators
items
binding init
left right
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
Code Processing Steps
13
Module
VariableDeclarationState
VariableDeclaration
VariableDeclarator
BindingIdentifier
name = `foo`
BinaryE
operato
LiteralNumericExpression
value = 1.0
declaration
declarators
items
binding init
left right
GlobalScope
Scope
Variable
name = `foo`
Reference
accessibility = `Write`
variables
references
children
Declaration
kind = `Var`
declarations
node
astNode
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
Code Processing Steps
Abstract Semantic Graph
(ASG)
– Graph, not necessarily tree.
– Semantic information besides
the syntactic structure.
– Contains
cross-edges →
13
Module
VariableDeclarationState
VariableDeclaration
VariableDeclarator
BindingIdentifier
name = `foo`
BinaryE
operato
LiteralNumericExpression
value = 1.0
declaration
declarators
items
binding init
left right
GlobalScope
Scope
Variable
name = `foo`
Reference
accessibility = `Write`
variables
references
children
Declaration
kind = `Var`
declarations
node
astNode
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
Code Processing Steps
13
Module
VariableDeclarationState
VariableDeclaration
VariableDeclarator
BindingIdentifier
name = `foo`
BinaryE
operato
LiteralNumericExpression
value = 1.0
declaration
declarators
items
binding init
left right
GlobalScope
Scope
Variable
name = `foo`
Reference
accessibility = `Write`
variables
references
children
Declaration
kind = `Var`
declarations
node
astNode
AST vs ASG
14
AST vs ASG
14
AST vs ASG
14
1
SLOC
20-40-50
nodes
Overview of the Approach
15
Verziókezelés
Fordítás
Fejlesztés
Egység- és
integrációs teszt
Kódanalízis
Verziókezelés
Fordítás
Fejlesztés
Egység- és
integrációs teszt
Kódanalízis
Development
Version
Control
System
Compilation
Unit and
Integration
Tests
Static
Analysis
Overview of the Approach
16
Overview of the Approach
16
Version
Control
System
Integrated
Development
Environment
Git,VisualStudioCode
Overview of the Approach
16
Version
Control
System
Integrated
Development
Environment
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
Git,VisualStudioCode ShapeSecurityShift
Overview of the Approach
16
Version
Control
System
transformation
Integrated
Development
Environment
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
Git,VisualStudioCode ShapeSecurityShift Java,Cypher
Overview of the Approach
16
Version
Control
System
transformation
graph
database
Integrated
Development
Environment
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
Git,VisualStudioCode ShapeSecurityShift Java,Cypher Neo4j
Overview of the Approach
16
Version
Control
System
transformation
graph
database
Integrated
Development
Environment
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
result
processing
Git,VisualStudioCode ShapeSecurityShift Java,Cypher Neo4j
Overview of the Approach
16
Version
Control
System
transformation
graph
database
Integrated
Development
Environment
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
result
processing
Git,VisualStudioCode ShapeSecurityShift Java,Cypher Neo4j
Overview of the Approach
16
Version
Control
System
transformation
graph
database
Integrated
Development
Environment
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
result
processing
Git,VisualStudioCode ShapeSecurityShift Java,Cypher Neo4j
Overview of the Approach
16
Version
Control
System
transformation
graph
database
Integrated
Development
Environment
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
result
processing
Git,VisualStudioCode ShapeSecurityShift Java,Cypher Neo4j
Overview of the Approach
16
Version
Control
System
transformation
graph
database
Integrated
Development
Environment
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
result
processing
Git,VisualStudioCode ShapeSecurityShift Java,Cypher Neo4j
Overview of the Approach
16
Version
Control
System
transformationtransformation
graph
database
Integrated
Development
Environment
tokenizer
source code
tokens
AST
ASG
parser
scope analyzer
result
processing
result
processing
Git,VisualStudioCode ShapeSecurityShift Java,Cypher Neo4j
Graph Pattern Matching
17
VariableDeclarator
BindingIdentifier
name = `foo`
BinaryExpression
operator = `Div`
LNExpression
value = 1.0
LNExpression
value = 0.0
Graph Pattern Matching
– Graph pattern
– A declarative,
– graph-like formalism
– expressing constraints.
17
VariableDeclarator
BindingIdentifier
name = `foo`
BinaryExpression
operator = `Div`
LNExpression
value = 1.0
LNExpression
value = 0.0
Graph Pattern Matching
– Graph pattern
– A declarative,
– graph-like formalism
– expressing constraints.
17
VariableDeclarator
BindingIdentifier
name = `foo`
BinaryExpression
operator = `Div`
LNExpression
value = 1.0
LNExpression
value = 0.0
binding be
right
Graph Pattern Matching
– Graph pattern
– A declarative,
– graph-like formalism
– expressing constraints.
17
VariableDeclarator
BindingIdentifier
name = `foo`
BinaryExpression
operator = `Div`
LNExpression
value = 1.0
LNExpression
value = 0.0
binding be
right
Graph Pattern Matching
– Graph pattern
– A declarative,
– graph-like formalism
– expressing constraints.
17
BindingIdentifier
name = `foo`
Graphpatternquery
expressedinCypher
lookingfora
divisionbyzero
binding
Resultsofthe
patternmatching
Use Cases static analysis
– Searching for local bad
smells (linter warnings)
– without a case
– value set more than once
– Not used variable
– Global rules
– Unreachable code parts
– Framework
– Freely extendable
– User-defined rules
– Easier to use than visitor
pattern solutions
18
Use Cases transformation
Control Flow Graph (CFG)
– Graph representation of
– every possible
statement sequence
– during code execution.
19
Use Cases transformation
Control Flow Graph (CFG)
– Graph representation of
– every possible
statement sequence
– during code execution.
19
statement
Use Cases transformation
Control Flow Graph (CFG)
– Graph representation of
– every possible
statement sequence
– during code execution.
19
statement
statement
Use Cases transformation
Control Flow Graph (CFG)
– Graph representation of
– every possible
statement sequence
– during code execution.
19
statement
statement
if
Use Cases transformation
Control Flow Graph (CFG)
– Graph representation of
– every possible
statement sequence
– during code execution.
19
statement
statement
if condition
Use Cases transformation
Control Flow Graph (CFG)
– Graph representation of
– every possible
statement sequence
– during code execution.
19
statement
statement
statement statement
if condition
Use Cases transformation
Control Flow Graph (CFG)
– Graph representation of
– every possible
statement sequence
– during code execution.
19
statement
statement
statement statement
if
statement
condition
Use Cases transformation
Control Flow Graph (CFG)
– Graph representation of
– every possible
statement sequence
– during code execution.
19
statement
statement
statement statement
error
if
statement
condition
Use Cases transformation
Control Flow Graph (CFG)
– Graph representation of
– every possible
statement sequence
– during code execution.
19
statement
statement
statement statement
statement
error
if
statement
condition
Use Cases transformation
Control Flow Graph (CFG)
– Graph representation of
– every possible
statement sequence
– during code execution.
19
statement
statement
statement statement
statement
error
if
statement
condition
Use Cases transformation
Control Flow Graph (CFG)
– Graph representation of
– every possible
statement sequence
– during code execution.
19
statement
statement
statement statement
statement
error
if
return
statement
condition
error
Use Cases test generation
20
statement
statement
statement statement
statement
if
return
condition
statement
error
Use Cases test generation
– Inspecting control flows
– Is the given statement reachable
given the constraints on the
edges?
– Which one is the shortest route?
20
statement
statement
statement statement
statement
if
return
condition
statement
error
Use Cases test generation
– Inspecting control flows
– Is the given statement reachable
given the constraints on the
edges?
– Which one is the shortest route?
20
statement
statement
statement statement
statement
if
return
condition
statement
error
Use Cases test generation
– Inspecting control flows
– Is the given statement reachable
given the constraints on the
edges?
– Which one is the shortest route?
20
statement
statement
statement statement
statement
if
return
condition
statement
error
Use Cases test generation
– Inspecting control flows
– Is the given statement reachable
given the constraints on the
edges?
– Which one is the shortest route?
20
statement
statement
statement statement
statement
if
return
condition
statement
error
Use Cases test generation
– Inspecting control flows
– Is the given statement reachable
given the constraints on the
edges?
– Which one is the shortest route?
20
statement
statement
statement statement
statement
if
return
condition
statement
error
Use Cases test generation
– Inspecting control flows
– Is the given statement reachable
given the constraints on the
edges?
– Which one is the shortest route?
20
statement
statement
statement statement
statement
if
return
condition
statement
error
Use Cases test generation
– Inspecting control flows
– Is the given statement reachable
given the constraints on the
edges?
– Which one is the shortest route?
20
statement
statement
statement statement
statement
if
return
condition
statement
error
Use Cases test generation
– Inspecting control flows
– Is the given statement reachable
given the constraints on the
edges?
– Which one is the shortest route?
20
statement
statement
statement statement
statement
if
return
condition
statement
error
Use Cases test generation
– Inspecting control flows
– Is the given statement reachable
given the constraints on the
edges?
– Which one is the shortest route?
– Producing test input
for dynamic testing
20
statement
statement
statement statement
statement
if
return
condition
statement
Use Cases type inference
– Supporting dynamically typed languages
– Python
– JavaScript / ECMAScript
21
Use Cases type inference
– Supporting dynamically typed languages
– Python
– JavaScript / ECMAScript
21
http://marijnhaverbeke.nl/blog/tern.html
Use Cases impact analysis
– Adapting to the continuous integration workflow
– Handling multiple branches
– Following the modifications in a branch
– File-level incremental granularity
– Giving differential reports to the developers
22
Why Neo4j?
+++
– Quick prototyping
– Supporting transactions
– Great tooling
--
– Not scaling well
– Only disk-based
23
Remarks MERGE
– MATCH or CREATE
– Great for the lazy
– Can be expensive
– Possible solutions:
– Less MERGE
– Separating queries
– Create first if not present
– Use MATCH instead of MERGE
– Prevention
– Prepare the structure when
inserting the data
24
Remarks MERGE
25
3 1
Remarks if-then-else
– Not a language element in
Cypher
– Can be solved with a trick
– Verrrrrry sloww
– Solution:
– Two smaller, disjunct cases
26
Remarks if-then-else
– Not a language element in
Cypher
– Can be solved with a trick
– Verrrrrry sloww
– Solution:
– Two smaller, disjunct cases
26
Remarks if-then-else
27
Remarks if-then-else
28
Remarks if-then-else
28
Remarks if-then-else
28
Remarks if-then-else
28
Remarks if-then-else
28
∞ vs 15 sec
Remarks if-then-else
28
∞ vs 15 sec
These are not chickens.
Remarks reachability
– Transitive closure without
length constraints is slow.
– Transitive closure over
repeating node/edge pattern
is only possible using tricks.
29
A B
*
Remarks reachability
– Transitive closure without
length constraints is slow.
– Transitive closure over
repeating node/edge pattern
is only possible using tricks.
29
A B
*
Remarks reachability
– Transitive closure without
length constraints is slow.
– Transitive closure over
repeating node/edge pattern
is only possible using tricks.
29
A B
*
Conclusions
– Source code analyzer
framework
– Searching for global error
patterns
– Close to real time feedback
– Type inference possible
– Test input generation possible
– Approach for both dynamically
and statically typed languages
– Using Neo4j for
– Storing
– Pattern matching
– Transforming
– Version control
– Storing metadata
30
– Our work was supported by:
– ÚNKP*
– Microsoft Azure for Research
– MTA-BME Lendület Program
Project Details
– The framework
prototype is open-
source.
https://github.com/
ftsrg/codemodel-rifle
31
* Supported by the ÚNKP-16-2-I. New National Excellence
Program of the Ministry of Human Capacities.
Project Details
– Supervisors
– Ádám Lippai
– Dávid Honfi
– Gábor Szárnyas
– Helped my research
– Tamás Soma Lucz
– Industrial case study
32

More Related Content

Viewers also liked

Graph Databases, The Web of Data Storage Engines
Graph Databases, The Web of Data Storage EnginesGraph Databases, The Web of Data Storage Engines
Graph Databases, The Web of Data Storage EnginesPere Urbón-Bayes
 
Graph Databases: Trends in the Web of Data
Graph Databases: Trends in the Web of DataGraph Databases: Trends in the Web of Data
Graph Databases: Trends in the Web of DataMarko Rodriguez
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph DatabasesMax De Marzi
 
TEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of WorkTEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of WorkVolker Hirsch
 
Forráskódtárak gráfalapú statikus analízise
Forráskódtárak gráfalapú statikus analíziseForráskódtárak gráfalapú statikus analízise
Forráskódtárak gráfalapú statikus analíziseDániel Stein
 
Try NoSQL it doesn't hurts and is fun
Try NoSQL it doesn't hurts and is funTry NoSQL it doesn't hurts and is fun
Try NoSQL it doesn't hurts and is funPere Urbón-Bayes
 
GraphDevRoom Call for Sponsors
GraphDevRoom Call for SponsorsGraphDevRoom Call for Sponsors
GraphDevRoom Call for SponsorsPere Urbón-Bayes
 
Fix gcc lra bug
Fix gcc lra bugFix gcc lra bug
Fix gcc lra bugShiva Chen
 
Network analysis in basketball
Network analysis in basketballNetwork analysis in basketball
Network analysis in basketballSwaagie
 
Graph Databases introduction to rug-b
Graph Databases introduction to rug-bGraph Databases introduction to rug-b
Graph Databases introduction to rug-bPere Urbón-Bayes
 
Code is not text! How graph technologies can help us to understand our code b...
Code is not text! How graph technologies can help us to understand our code b...Code is not text! How graph technologies can help us to understand our code b...
Code is not text! How graph technologies can help us to understand our code b...Andreas Dewes
 
VAT fraud detection : the mysterious case of the missing trader
VAT fraud detection : the mysterious case of the missing traderVAT fraud detection : the mysterious case of the missing trader
VAT fraud detection : the mysterious case of the missing traderLinkurious
 
Change the World - One Trillion Dollar Market at a time / the opportunity in ...
Change the World - One Trillion Dollar Market at a time / the opportunity in ...Change the World - One Trillion Dollar Market at a time / the opportunity in ...
Change the World - One Trillion Dollar Market at a time / the opportunity in ...Volker Hirsch
 
AI & The Future of Work - Work & Life in the Age of Robots
AI & The Future of Work - Work & Life in the Age of RobotsAI & The Future of Work - Work & Life in the Age of Robots
AI & The Future of Work - Work & Life in the Age of RobotsVolker Hirsch
 
21 Hidden LinkedIn Hacks Revealed
21 Hidden LinkedIn Hacks Revealed21 Hidden LinkedIn Hacks Revealed
21 Hidden LinkedIn Hacks RevealedEmma Brudner
 
15 Tips for Compelling Company Updates on LinkedIn
15 Tips for Compelling Company Updates on LinkedIn15 Tips for Compelling Company Updates on LinkedIn
15 Tips for Compelling Company Updates on LinkedInLinkedIn
 

Viewers also liked (20)

Gcc porting
Gcc portingGcc porting
Gcc porting
 
Graph Databases, The Web of Data Storage Engines
Graph Databases, The Web of Data Storage EnginesGraph Databases, The Web of Data Storage Engines
Graph Databases, The Web of Data Storage Engines
 
Graph Databases: Trends in the Web of Data
Graph Databases: Trends in the Web of DataGraph Databases: Trends in the Web of Data
Graph Databases: Trends in the Web of Data
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph Databases
 
TEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of WorkTEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of Work
 
Forráskódtárak gráfalapú statikus analízise
Forráskódtárak gráfalapú statikus analíziseForráskódtárak gráfalapú statikus analízise
Forráskódtárak gráfalapú statikus analízise
 
Try NoSQL it doesn't hurts and is fun
Try NoSQL it doesn't hurts and is funTry NoSQL it doesn't hurts and is fun
Try NoSQL it doesn't hurts and is fun
 
GraphDevRoom Call for Sponsors
GraphDevRoom Call for SponsorsGraphDevRoom Call for Sponsors
GraphDevRoom Call for Sponsors
 
Cooking Software101
Cooking Software101Cooking Software101
Cooking Software101
 
Fix gcc lra bug
Fix gcc lra bugFix gcc lra bug
Fix gcc lra bug
 
Network analysis in basketball
Network analysis in basketballNetwork analysis in basketball
Network analysis in basketball
 
Graph Databases introduction to rug-b
Graph Databases introduction to rug-bGraph Databases introduction to rug-b
Graph Databases introduction to rug-b
 
Code is not text! How graph technologies can help us to understand our code b...
Code is not text! How graph technologies can help us to understand our code b...Code is not text! How graph technologies can help us to understand our code b...
Code is not text! How graph technologies can help us to understand our code b...
 
VAT fraud detection : the mysterious case of the missing trader
VAT fraud detection : the mysterious case of the missing traderVAT fraud detection : the mysterious case of the missing trader
VAT fraud detection : the mysterious case of the missing trader
 
Change the World - One Trillion Dollar Market at a time / the opportunity in ...
Change the World - One Trillion Dollar Market at a time / the opportunity in ...Change the World - One Trillion Dollar Market at a time / the opportunity in ...
Change the World - One Trillion Dollar Market at a time / the opportunity in ...
 
AI & The Future of Work - Work & Life in the Age of Robots
AI & The Future of Work - Work & Life in the Age of RobotsAI & The Future of Work - Work & Life in the Age of Robots
AI & The Future of Work - Work & Life in the Age of Robots
 
How to Create a Twitter Cover Photo in PowerPoint [Tutorial]
How to Create a Twitter Cover Photo in PowerPoint [Tutorial]How to Create a Twitter Cover Photo in PowerPoint [Tutorial]
How to Create a Twitter Cover Photo in PowerPoint [Tutorial]
 
5 Things You Should Be Doing on LinkedIn
5 Things You Should Be Doing on LinkedIn5 Things You Should Be Doing on LinkedIn
5 Things You Should Be Doing on LinkedIn
 
21 Hidden LinkedIn Hacks Revealed
21 Hidden LinkedIn Hacks Revealed21 Hidden LinkedIn Hacks Revealed
21 Hidden LinkedIn Hacks Revealed
 
15 Tips for Compelling Company Updates on LinkedIn
15 Tips for Compelling Company Updates on LinkedIn15 Tips for Compelling Company Updates on LinkedIn
15 Tips for Compelling Company Updates on LinkedIn
 

Similar to Graph-Based Source Code Analysis of JavaScript Repositories

Agile DevOps Implementation
Agile DevOps ImplementationAgile DevOps Implementation
Agile DevOps ImplementationManikandan R
 
End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020Abhijeet Vaikar
 
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)Neotys_Partner
 
Code Review with Sonar
Code Review with SonarCode Review with Sonar
Code Review with SonarMax Kleiner
 
QA Meetup at Signavio (Berlin, 06.06.19)
QA Meetup at Signavio (Berlin, 06.06.19)QA Meetup at Signavio (Berlin, 06.06.19)
QA Meetup at Signavio (Berlin, 06.06.19)Anesthezia
 
SCM Transformation Challenges and How to Overcome Them
SCM Transformation Challenges and How to Overcome ThemSCM Transformation Challenges and How to Overcome Them
SCM Transformation Challenges and How to Overcome ThemCompuware
 
Building functional Quality Gates with ReportPortal
Building functional Quality Gates with ReportPortalBuilding functional Quality Gates with ReportPortal
Building functional Quality Gates with ReportPortalDmitriy Gumeniuk
 
Legacy Renewal of Central Framework in the Enterprise
Legacy Renewal of Central Framework in the EnterpriseLegacy Renewal of Central Framework in the Enterprise
Legacy Renewal of Central Framework in the EnterpriseAnatole Tresch
 
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Parasoft .TEST, Write better C# Code Using  Data Flow Analysis Parasoft .TEST, Write better C# Code Using  Data Flow Analysis
Parasoft .TEST, Write better C# Code Using Data Flow Analysis Engineering Software Lab
 
Презентация
ПрезентацияПрезентация
Презентацияguest22d71d
 
Presentation Verification & Validation
Presentation Verification & ValidationPresentation Verification & Validation
Presentation Verification & ValidationElmar Selbach
 
GPCE16: Automatic Non-functional Testing of Code Generators Families
GPCE16: Automatic Non-functional Testing of Code Generators FamiliesGPCE16: Automatic Non-functional Testing of Code Generators Families
GPCE16: Automatic Non-functional Testing of Code Generators FamiliesMohamed BOUSSAA
 
Sharded Joins for Scalable Incremental Graph Queries
Sharded Joins for Scalable Incremental Graph QueriesSharded Joins for Scalable Incremental Graph Queries
Sharded Joins for Scalable Incremental Graph QueriesGábor Szárnyas
 
PVS-Studio for Linux (CoreHard presentation)
PVS-Studio for Linux (CoreHard presentation)PVS-Studio for Linux (CoreHard presentation)
PVS-Studio for Linux (CoreHard presentation)Andrey Karpov
 
PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...
PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...
PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...Alexandr Savchenko
 
"Different software evolutions from Start till Release in PHP product" Oleksa...
"Different software evolutions from Start till Release in PHP product" Oleksa..."Different software evolutions from Start till Release in PHP product" Oleksa...
"Different software evolutions from Start till Release in PHP product" Oleksa...Fwdays
 
Towards a Macrobenchmark Framework for Performance Analysis of Java Applications
Towards a Macrobenchmark Framework for Performance Analysis of Java ApplicationsTowards a Macrobenchmark Framework for Performance Analysis of Java Applications
Towards a Macrobenchmark Framework for Performance Analysis of Java ApplicationsGábor Szárnyas
 

Similar to Graph-Based Source Code Analysis of JavaScript Repositories (20)

Agile DevOps Implementation
Agile DevOps ImplementationAgile DevOps Implementation
Agile DevOps Implementation
 
End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020
 
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
 
Code Review with Sonar
Code Review with SonarCode Review with Sonar
Code Review with Sonar
 
QA Meetup at Signavio (Berlin, 06.06.19)
QA Meetup at Signavio (Berlin, 06.06.19)QA Meetup at Signavio (Berlin, 06.06.19)
QA Meetup at Signavio (Berlin, 06.06.19)
 
Code Quality Analysis
Code Quality AnalysisCode Quality Analysis
Code Quality Analysis
 
SCM Transformation Challenges and How to Overcome Them
SCM Transformation Challenges and How to Overcome ThemSCM Transformation Challenges and How to Overcome Them
SCM Transformation Challenges and How to Overcome Them
 
Building functional Quality Gates with ReportPortal
Building functional Quality Gates with ReportPortalBuilding functional Quality Gates with ReportPortal
Building functional Quality Gates with ReportPortal
 
Legacy Renewal of Central Framework in the Enterprise
Legacy Renewal of Central Framework in the EnterpriseLegacy Renewal of Central Framework in the Enterprise
Legacy Renewal of Central Framework in the Enterprise
 
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Parasoft .TEST, Write better C# Code Using  Data Flow Analysis Parasoft .TEST, Write better C# Code Using  Data Flow Analysis
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
 
Презентация
ПрезентацияПрезентация
Презентация
 
10 Ways To Improve Your Code
10 Ways To Improve Your Code10 Ways To Improve Your Code
10 Ways To Improve Your Code
 
Presentation Verification & Validation
Presentation Verification & ValidationPresentation Verification & Validation
Presentation Verification & Validation
 
GPCE16: Automatic Non-functional Testing of Code Generators Families
GPCE16: Automatic Non-functional Testing of Code Generators FamiliesGPCE16: Automatic Non-functional Testing of Code Generators Families
GPCE16: Automatic Non-functional Testing of Code Generators Families
 
Sharded Joins for Scalable Incremental Graph Queries
Sharded Joins for Scalable Incremental Graph QueriesSharded Joins for Scalable Incremental Graph Queries
Sharded Joins for Scalable Incremental Graph Queries
 
Ssbse10.ppt
Ssbse10.pptSsbse10.ppt
Ssbse10.ppt
 
PVS-Studio for Linux (CoreHard presentation)
PVS-Studio for Linux (CoreHard presentation)PVS-Studio for Linux (CoreHard presentation)
PVS-Studio for Linux (CoreHard presentation)
 
PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...
PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...
PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...
 
"Different software evolutions from Start till Release in PHP product" Oleksa...
"Different software evolutions from Start till Release in PHP product" Oleksa..."Different software evolutions from Start till Release in PHP product" Oleksa...
"Different software evolutions from Start till Release in PHP product" Oleksa...
 
Towards a Macrobenchmark Framework for Performance Analysis of Java Applications
Towards a Macrobenchmark Framework for Performance Analysis of Java ApplicationsTowards a Macrobenchmark Framework for Performance Analysis of Java Applications
Towards a Macrobenchmark Framework for Performance Analysis of Java Applications
 

Recently uploaded

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 

Recently uploaded (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

Graph-Based Source Code Analysis of JavaScript Repositories

  • 1. Graph-Based Source Code Analysis of JavaScript Repositories Budapest University of Technology and Economics Department of Measurement and Information Systems Fault Tolerant Systems Research Group Dániel Stein Gábor Szárnyas
  • 2. Content 1. Context 2. Tooling 3. Use Cases 4. Neo4j Observations 2
  • 3. Continuous Integration (CI) – Developers working together – Prevent integration problems – Examples – Jenkins – Hudson – Travis CI 3 Verziókezelés Fordítás Fejlesztés Egység- és integrációs teszt Development Version Control System Compilation Unit and Integration Tests
  • 7. Static Analysis – No need for compilation or execution of the application – Formatting, structural and semantic rule checking – Can extend the workflow of continuous integration and improve it – In this research we used code analysis utilizing pattern matching 5 Verziókezelés Fordítás Fejlesztés Egység- és integrációs teszt Kódanalízis Verziókezelés Fordítás Fejlesztés Egység- és integrációs teszt Kódanalízis Development Version Control System Compilation Unit and Integration Tests Static Analysis
  • 8. Static Analysis – No need for compilation or execution of the application – Formatting, structural and semantic rule checking – Can extend the workflow of continuous integration and improve it – In this research we used code analysis utilizing pattern matching 5 Verziókezelés Fordítás Fejlesztés Egység- és integrációs teszt Kódanalízis Verziókezelés Fordítás Fejlesztés Egység- és integrációs teszt Kódanalízis Development Version Control System Compilation Unit and Integration Tests Static Analysis
  • 9. Static Analysis – No need for compilation or execution of the application – Formatting, structural and semantic rule checking – Can extend the workflow of continuous integration and improve it – In this research we used code analysis utilizing pattern matching 5 Verziókezelés Fordítás Fejlesztés Egység- és integrációs teszt Kódanalízis Verziókezelés Fordítás Fejlesztés Egység- és integrációs teszt Kódanalízis – Java – FindBugs – PMD – CheckStyle Development Version Control System Compilation Unit and Integration Tests Static Analysis
  • 10. Static Analysis – No need for compilation or execution of the application – Formatting, structural and semantic rule checking – Can extend the workflow of continuous integration and improve it – In this research we used code analysis utilizing pattern matching 5 Verziókezelés Fordítás Fejlesztés Egység- és integrációs teszt Kódanalízis Verziókezelés Fordítás Fejlesztés Egység- és integrációs teszt Kódanalízis – Java – FindBugs – PMD – CheckStyle – JavaScript – ESLint – Facebook Infer, Flow – Tern – TAJS Development Version Control System Compilation Unit and Integration Tests Static Analysis
  • 11. – Thorough code analysis is time-consuming and resource-intensive – For large projects it can be too slow Problems to Solve 6 unit tests static analysis ☼ ☆☾☆
  • 12. – Thorough code analysis is time-consuming and resource-intensive – For large projects it can be too slow – Temporary solution: batching Problems to Solve 6 unit tests static analysis ☼ ☆☾☆ unit tests static analyis
  • 13. – Thorough code analysis is time-consuming and resource-intensive – For large projects it can be too slow – Temporary solution: batching Present results as soon and as fast as possible. Problems to Solve 6 unit tests static analysis ☼ ☆☾☆ unit tests static analyis
  • 14. Problems to Solve – Memory limits appear when... – Global rules are checked – Storing the structure in-memory – For large code repositories – Not being incremental – Batched execution simply does not cut it – Small change induces complete recheck 7
  • 15. Our Approach – Incremental methodology – Instead of batched execution – Update the prepared results with the effects of the change – Only store the required parts in the memory 8 analyzer Δ2.-1.1.
  • 16. VCS Workspace Abstact Syntax Tree Abstract Semantic Graph Well-formedness Rules Query Execution Database Main.js | ++---- Dependency.js | +++++- FIterator.js | ---- Parser.js | ++ Automatic Well-formedness Rule Evaluation Manual Execution and Data Extraction Querying and Transformation . discoverer ChangeProcessor.js CommandParser.js FileIterator.js iterators DepCollector.js FileDiscoverer.js InitIterator.js Main.js whitepages ConnectionMgr.js DependencyMgr.js neo4jValidation Report <!> <?> <.> Module declaration declarators items binding init left right Architecture overview 9
  • 17. VCS Workspace Abstact Syntax Tree Abstract Semantic Graph Well-formedness Rules Query Execution Database Main.js | ++---- Dependency.js | +++++- FIterator.js | ---- Parser.js | ++ Automatic Well-formedness Rule Evaluation Manual Execution and Data Extraction Querying and Transformation . discoverer ChangeProcessor.js CommandParser.js FileIterator.js iterators DepCollector.js FileDiscoverer.js InitIterator.js Main.js whitepages ConnectionMgr.js DependencyMgr.js neo4jValidation Report <!> <?> <.> Module declaration declarators items binding init left right Architecture overview 9
  • 18. VCS Workspace Abstact Syntax Tree Abstract Semantic Graph Well-formedness Rules Query Execution Database Main.js | ++---- Dependency.js | +++++- FIterator.js | ---- Parser.js | ++ Automatic Well-formedness Rule Evaluation Manual Execution and Data Extraction Querying and Transformation . discoverer ChangeProcessor.js CommandParser.js FileIterator.js iterators DepCollector.js FileDiscoverer.js InitIterator.js Main.js whitepages ConnectionMgr.js DependencyMgr.js neo4jValidation Report <!> <?> <.> Module declaration declarators items binding init left right Architecture overview 9
  • 19. VCS Workspace Abstact Syntax Tree Abstract Semantic Graph Well-formedness Rules Query Execution Database Main.js | ++---- Dependency.js | +++++- FIterator.js | ---- Parser.js | ++ Automatic Well-formedness Rule Evaluation Manual Execution and Data Extraction Querying and Transformation . discoverer ChangeProcessor.js CommandParser.js FileIterator.js iterators DepCollector.js FileDiscoverer.js InitIterator.js Main.js whitepages ConnectionMgr.js DependencyMgr.js neo4jValidation Report <!> <?> <.> Module declaration declarators items binding init left right Architecture overview 9
  • 20. Code Processing Steps 20 tokenizer source code tokens AST ASG parser scope analyzer tokenizer source code tokens AST ASG parser scope analyzer
  • 21. Code Processing Steps 21 tokenizer source code tokens AST ASG parser scope analyzer
  • 22. Code Processing Steps 22 tokenizer source code tokens AST ASG parser scope analyzer Sequence of statements formalized in a given language
  • 23. Code Processing Steps 23 tokenizer source code tokens AST ASG parser scope analyzer Sequence of statements formalized in a given language
  • 24. Code Processing Steps 24 tokenizer source code tokens AST ASG parser scope analyzer
  • 25. Code Processing Steps 25 tokenizer source code tokens AST ASG parser scope analyzer token – the shortest character sequence still having meaning.
  • 26. Code Processing Steps 26 tokenizer source code tokens AST ASG parser scope analyzer token – the shortest character sequence still having meaning.
  • 27. Code Processing Steps 27 tokenizer source code tokens AST ASG parser scope analyzer Token Token type VAR (Keyword) IDENTIFIER (Ident) ASSIGN (Punctuator) NUMBER (NumericLiteral) DIV (Punctuator) NUMBER (NumericLiteral) token – the shortest character sequence still having meaning.
  • 28. tokenizer source code tokens AST ASG parser scope analyzer Code Processing Steps 12 Module VariableDeclarationStatement VariableDeclaration VariableDeclarator BindingIdentifier name = `foo` BinaryExpression operator = `Div` LiteralNumericExpression value = 1.0 LiteralNumericExpression value = 0.0 declaration declarators items binding init left right
  • 29. tokenizer source code tokens AST ASG parser scope analyzer Code Processing Steps 12 Abstract Syntax Tree (AST) – Tree representation of – the grammar structure of – the sequence of tokens. Module VariableDeclarationStatement VariableDeclaration VariableDeclarator BindingIdentifier name = `foo` BinaryExpression operator = `Div` LiteralNumericExpression value = 1.0 LiteralNumericExpression value = 0.0 declaration declarators items binding init left right
  • 30. tokenizer source code tokens AST ASG parser scope analyzer Code Processing Steps 12 Module VariableDeclarationStatement VariableDeclaration VariableDeclarator BindingIdentifier name = `foo` BinaryExpression operator = `Div` LiteralNumericExpression value = 1.0 LiteralNumericExpression value = 0.0 declaration declarators items binding init left right
  • 31. tokenizer source code tokens AST ASG parser scope analyzer Code Processing Steps 13 Module VariableDeclarationStatement VariableDeclaration VariableDeclarator BindingIdentifier name = `foo` BinaryExpression operator = `Div` LiteralNumericExpression value = 1.0 LiteralNumericExpression value = 0.0 declaration declarators items binding init left right
  • 32. tokenizer source code tokens AST ASG parser scope analyzer Code Processing Steps 13 Module VariableDeclarationState VariableDeclaration VariableDeclarator BindingIdentifier name = `foo` BinaryE operato LiteralNumericExpression value = 1.0 declaration declarators items binding init left right
  • 33. tokenizer source code tokens AST ASG parser scope analyzer Code Processing Steps 13 Module VariableDeclarationState VariableDeclaration VariableDeclarator BindingIdentifier name = `foo` BinaryE operato LiteralNumericExpression value = 1.0 declaration declarators items binding init left right GlobalScope Scope Variable name = `foo` Reference accessibility = `Write` variables references children Declaration kind = `Var` declarations node astNode
  • 34. tokenizer source code tokens AST ASG parser scope analyzer Code Processing Steps Abstract Semantic Graph (ASG) – Graph, not necessarily tree. – Semantic information besides the syntactic structure. – Contains cross-edges → 13 Module VariableDeclarationState VariableDeclaration VariableDeclarator BindingIdentifier name = `foo` BinaryE operato LiteralNumericExpression value = 1.0 declaration declarators items binding init left right GlobalScope Scope Variable name = `foo` Reference accessibility = `Write` variables references children Declaration kind = `Var` declarations node astNode
  • 35. tokenizer source code tokens AST ASG parser scope analyzer Code Processing Steps 13 Module VariableDeclarationState VariableDeclaration VariableDeclarator BindingIdentifier name = `foo` BinaryE operato LiteralNumericExpression value = 1.0 declaration declarators items binding init left right GlobalScope Scope Variable name = `foo` Reference accessibility = `Write` variables references children Declaration kind = `Var` declarations node astNode
  • 39. Overview of the Approach 15 Verziókezelés Fordítás Fejlesztés Egység- és integrációs teszt Kódanalízis Verziókezelés Fordítás Fejlesztés Egység- és integrációs teszt Kódanalízis Development Version Control System Compilation Unit and Integration Tests Static Analysis
  • 40. Overview of the Approach 16
  • 41. Overview of the Approach 16 Version Control System Integrated Development Environment Git,VisualStudioCode
  • 42. Overview of the Approach 16 Version Control System Integrated Development Environment tokenizer source code tokens AST ASG parser scope analyzer Git,VisualStudioCode ShapeSecurityShift
  • 43. Overview of the Approach 16 Version Control System transformation Integrated Development Environment tokenizer source code tokens AST ASG parser scope analyzer Git,VisualStudioCode ShapeSecurityShift Java,Cypher
  • 44. Overview of the Approach 16 Version Control System transformation graph database Integrated Development Environment tokenizer source code tokens AST ASG parser scope analyzer Git,VisualStudioCode ShapeSecurityShift Java,Cypher Neo4j
  • 45. Overview of the Approach 16 Version Control System transformation graph database Integrated Development Environment tokenizer source code tokens AST ASG parser scope analyzer result processing Git,VisualStudioCode ShapeSecurityShift Java,Cypher Neo4j
  • 46. Overview of the Approach 16 Version Control System transformation graph database Integrated Development Environment tokenizer source code tokens AST ASG parser scope analyzer result processing Git,VisualStudioCode ShapeSecurityShift Java,Cypher Neo4j
  • 47. Overview of the Approach 16 Version Control System transformation graph database Integrated Development Environment tokenizer source code tokens AST ASG parser scope analyzer result processing Git,VisualStudioCode ShapeSecurityShift Java,Cypher Neo4j
  • 48. Overview of the Approach 16 Version Control System transformation graph database Integrated Development Environment tokenizer source code tokens AST ASG parser scope analyzer result processing Git,VisualStudioCode ShapeSecurityShift Java,Cypher Neo4j
  • 49. Overview of the Approach 16 Version Control System transformation graph database Integrated Development Environment tokenizer source code tokens AST ASG parser scope analyzer result processing Git,VisualStudioCode ShapeSecurityShift Java,Cypher Neo4j
  • 50. Overview of the Approach 16 Version Control System transformationtransformation graph database Integrated Development Environment tokenizer source code tokens AST ASG parser scope analyzer result processing result processing Git,VisualStudioCode ShapeSecurityShift Java,Cypher Neo4j
  • 51. Graph Pattern Matching 17 VariableDeclarator BindingIdentifier name = `foo` BinaryExpression operator = `Div` LNExpression value = 1.0 LNExpression value = 0.0
  • 52. Graph Pattern Matching – Graph pattern – A declarative, – graph-like formalism – expressing constraints. 17 VariableDeclarator BindingIdentifier name = `foo` BinaryExpression operator = `Div` LNExpression value = 1.0 LNExpression value = 0.0
  • 53. Graph Pattern Matching – Graph pattern – A declarative, – graph-like formalism – expressing constraints. 17 VariableDeclarator BindingIdentifier name = `foo` BinaryExpression operator = `Div` LNExpression value = 1.0 LNExpression value = 0.0 binding be right
  • 54. Graph Pattern Matching – Graph pattern – A declarative, – graph-like formalism – expressing constraints. 17 VariableDeclarator BindingIdentifier name = `foo` BinaryExpression operator = `Div` LNExpression value = 1.0 LNExpression value = 0.0 binding be right
  • 55. Graph Pattern Matching – Graph pattern – A declarative, – graph-like formalism – expressing constraints. 17 BindingIdentifier name = `foo` Graphpatternquery expressedinCypher lookingfora divisionbyzero binding Resultsofthe patternmatching
  • 56. Use Cases static analysis – Searching for local bad smells (linter warnings) – without a case – value set more than once – Not used variable – Global rules – Unreachable code parts – Framework – Freely extendable – User-defined rules – Easier to use than visitor pattern solutions 18
  • 57. Use Cases transformation Control Flow Graph (CFG) – Graph representation of – every possible statement sequence – during code execution. 19
  • 58. Use Cases transformation Control Flow Graph (CFG) – Graph representation of – every possible statement sequence – during code execution. 19 statement
  • 59. Use Cases transformation Control Flow Graph (CFG) – Graph representation of – every possible statement sequence – during code execution. 19 statement statement
  • 60. Use Cases transformation Control Flow Graph (CFG) – Graph representation of – every possible statement sequence – during code execution. 19 statement statement if
  • 61. Use Cases transformation Control Flow Graph (CFG) – Graph representation of – every possible statement sequence – during code execution. 19 statement statement if condition
  • 62. Use Cases transformation Control Flow Graph (CFG) – Graph representation of – every possible statement sequence – during code execution. 19 statement statement statement statement if condition
  • 63. Use Cases transformation Control Flow Graph (CFG) – Graph representation of – every possible statement sequence – during code execution. 19 statement statement statement statement if statement condition
  • 64. Use Cases transformation Control Flow Graph (CFG) – Graph representation of – every possible statement sequence – during code execution. 19 statement statement statement statement error if statement condition
  • 65. Use Cases transformation Control Flow Graph (CFG) – Graph representation of – every possible statement sequence – during code execution. 19 statement statement statement statement statement error if statement condition
  • 66. Use Cases transformation Control Flow Graph (CFG) – Graph representation of – every possible statement sequence – during code execution. 19 statement statement statement statement statement error if statement condition
  • 67. Use Cases transformation Control Flow Graph (CFG) – Graph representation of – every possible statement sequence – during code execution. 19 statement statement statement statement statement error if return statement condition
  • 68. error Use Cases test generation 20 statement statement statement statement statement if return condition statement
  • 69. error Use Cases test generation – Inspecting control flows – Is the given statement reachable given the constraints on the edges? – Which one is the shortest route? 20 statement statement statement statement statement if return condition statement
  • 70. error Use Cases test generation – Inspecting control flows – Is the given statement reachable given the constraints on the edges? – Which one is the shortest route? 20 statement statement statement statement statement if return condition statement
  • 71. error Use Cases test generation – Inspecting control flows – Is the given statement reachable given the constraints on the edges? – Which one is the shortest route? 20 statement statement statement statement statement if return condition statement
  • 72. error Use Cases test generation – Inspecting control flows – Is the given statement reachable given the constraints on the edges? – Which one is the shortest route? 20 statement statement statement statement statement if return condition statement
  • 73. error Use Cases test generation – Inspecting control flows – Is the given statement reachable given the constraints on the edges? – Which one is the shortest route? 20 statement statement statement statement statement if return condition statement
  • 74. error Use Cases test generation – Inspecting control flows – Is the given statement reachable given the constraints on the edges? – Which one is the shortest route? 20 statement statement statement statement statement if return condition statement
  • 75. error Use Cases test generation – Inspecting control flows – Is the given statement reachable given the constraints on the edges? – Which one is the shortest route? 20 statement statement statement statement statement if return condition statement
  • 76. error Use Cases test generation – Inspecting control flows – Is the given statement reachable given the constraints on the edges? – Which one is the shortest route? 20 statement statement statement statement statement if return condition statement
  • 77. error Use Cases test generation – Inspecting control flows – Is the given statement reachable given the constraints on the edges? – Which one is the shortest route? – Producing test input for dynamic testing 20 statement statement statement statement statement if return condition statement
  • 78. Use Cases type inference – Supporting dynamically typed languages – Python – JavaScript / ECMAScript 21
  • 79. Use Cases type inference – Supporting dynamically typed languages – Python – JavaScript / ECMAScript 21 http://marijnhaverbeke.nl/blog/tern.html
  • 80. Use Cases impact analysis – Adapting to the continuous integration workflow – Handling multiple branches – Following the modifications in a branch – File-level incremental granularity – Giving differential reports to the developers 22
  • 81. Why Neo4j? +++ – Quick prototyping – Supporting transactions – Great tooling -- – Not scaling well – Only disk-based 23
  • 82. Remarks MERGE – MATCH or CREATE – Great for the lazy – Can be expensive – Possible solutions: – Less MERGE – Separating queries – Create first if not present – Use MATCH instead of MERGE – Prevention – Prepare the structure when inserting the data 24
  • 84. Remarks if-then-else – Not a language element in Cypher – Can be solved with a trick – Verrrrrry sloww – Solution: – Two smaller, disjunct cases 26
  • 85. Remarks if-then-else – Not a language element in Cypher – Can be solved with a trick – Verrrrrry sloww – Solution: – Two smaller, disjunct cases 26
  • 92. Remarks if-then-else 28 ∞ vs 15 sec These are not chickens.
  • 93. Remarks reachability – Transitive closure without length constraints is slow. – Transitive closure over repeating node/edge pattern is only possible using tricks. 29 A B *
  • 94. Remarks reachability – Transitive closure without length constraints is slow. – Transitive closure over repeating node/edge pattern is only possible using tricks. 29 A B *
  • 95. Remarks reachability – Transitive closure without length constraints is slow. – Transitive closure over repeating node/edge pattern is only possible using tricks. 29 A B *
  • 96. Conclusions – Source code analyzer framework – Searching for global error patterns – Close to real time feedback – Type inference possible – Test input generation possible – Approach for both dynamically and statically typed languages – Using Neo4j for – Storing – Pattern matching – Transforming – Version control – Storing metadata 30
  • 97. – Our work was supported by: – ÚNKP* – Microsoft Azure for Research – MTA-BME Lendület Program Project Details – The framework prototype is open- source. https://github.com/ ftsrg/codemodel-rifle 31 * Supported by the ÚNKP-16-2-I. New National Excellence Program of the Ministry of Human Capacities.
  • 98. Project Details – Supervisors – Ádám Lippai – Dávid Honfi – Gábor Szárnyas – Helped my research – Tamás Soma Lucz – Industrial case study 32