msr asia summit
DESCRIPTION
Quality, maintability, quality models, good practices, developers' studies, social studies, data mining, challenges.TRANSCRIPT
Yann-Gaël Guéhéneuc
This work is licensed under a Creative Commons Attribution-NonCommercial-
ShareAlike 3.0 Unported License
Some Challenges of Quality Assurance withMulti-language Systems
MSR Asia Summit13/10/28
2/67
3/67
Software development services?
4/67
5/67
Software costs?
6/67
7/67
8/67
Cost of bugshttp://www.di.unito.it/~damiani/ariane5rep.html
9/67
10/67
12/67
Maintainability is the ease with which a software system can be modified
—IEEE Standard Glossary of Software Engineering Terminology, 2013
13/67
Agenda
Maintainability– Quality models– Good practices– Social studies– Developers studies
Multi-language Systems Challenges
– Maintainability– Not only for quality assurance!
14/67
Maintainability
Quality Models Models
Good Practices Definition
Metrics
Detection Occurrences
Social Studies Characteristics
Developers Studies Behaviour
Factors
Measures
15/67
Maintainability
Quality Models Models
Good Practices Definition
Metrics
Detection Occurrences
Social Studies Characteristics
Developers Studies Behaviour
Factors
Measures
16/67
Quality model are models with the objective to describe, assess, and–or predict quality
—Deissenboeck et al., WOSQ, 2009(With minor adaptations)
17/67
Quality Models
Basis for quality models – Software measures (aka metrics)– Relationships among characteristics and metrics
• Theoretical• Practical
18/67
Quality Models
Metrics have been well researched– Chidamber and Kemerer– Hitz and Montazeri– Lorenz and Kidd– McCabe– …
(Do not miss Briand et al.’s surveys on cohesion and coupling metrics)
19/67
Quality Models
Different input metrics, different output characteristics– Bansiya and Davis’ QMOOD
• Design metrics• Maintainability-related characteristics
– Zimmermann et al.’s models• Code and historical metrics• Fault-proneness
– …
20/67
Quality Models
Feedback– Measures– Occurrences– Factors
to build “better” quality models
21/67
Maintainability
Quality Models Models
Good Practices Definition
Metrics
Detection Occurrences
Social Studies Characteristics
Developers Studies Behaviour
Factors
Measures
22/67
23/67
Important assumptions– That practices can be codified in such a way that
they can be shared between different designers– That reuse will lead to “better” designs. There is
an obvious question here of what constitutes “better”, but a key measure is maintainability
—Zhang and Budgen, 2012 (With minor adaptations)
24/67
Good Practices
We can identifyin the architectureof a systemsmicro-architectures similar todesign motifsto explain theproblem solved
Figure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
To compose objectsin a tree-like structureto describe whole–parthierarchies
Frame
DrawingEditor
Tool
Handle
Panel
DrawingView
Drawing
Figure
AbstractFigure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
Component
operation()
Leaf
operation()
Composite
add(Component)remove(Component)getComponent(int)operation()
ramification
For each componentscomponent.operation()
1..nClient
25/67
Good Practices
We can identifyin the architectureof a systemsmicro-architectures similar todesign motifsto explain theproblem solved
Figure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
To compose objectsin a tree-like structureto describe whole–parthierarchies
Frame
DrawingEditor
Tool
Handle
Panel
DrawingView
Drawing
Figure
AbstractFigure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
Component
operation()
Leaf
operation()
Composite
add(Component)remove(Component)getComponent(int)operation()
ramification
For each componentscomponent.operation()
1..nClient
26/67
Good Practices
We can identifyin the architectureof a systemsmicro-architectures similar todesign motifsto explain theproblem solved
Figure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
To compose objectsin a tree-like structureto describe whole–parthierarchies
Frame
DrawingEditor
Tool
Handle
Panel
DrawingView
Drawing
Figure
AbstractFigure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
Component
operation()
Leaf
operation()
Composite
add(Component)remove(Component)getComponent(int)operation()
ramification
For each componentscomponent.operation()
1..nClient
27/67
Good Practices
We can identifyin the architectureof a systemsmicro-architectures similar todesign motifsto explain theproblem solved
Figure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
To compose objectsin a tree-like structureto describe whole–parthierarchies
Frame
DrawingEditor
Tool
Handle
Panel
DrawingView
Drawing
Figure
AbstractFigure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
Component
operation()
Leaf
operation()
Composite
add(Component)remove(Component)getComponent(int)operation()
ramification
For each componentscomponent.operation()
1..nClient
28/67
Good Practices
Impact of practices– “Good”, such as DPs
• Comprehension by Lange et al.• Quality metrics by Masuda et al.• Change-proneness by Bieman et al. and Khomh et al.
– “Bad”, such as APs• Comprehension by Deligiannis et al. and Abbes et al.• Change-proneness by Khomh et al.• Fault-proneness by Li et al.
Feedback in quality models?
29/67
Maintainability
Quality Models Models
Good Practices Definition
Metrics
Detection Occurrences
Social Studies Characteristics
Developers Studies Behaviour
Factors
Measures
30/67
Social Studies
Developers’ characteristics– Gender– Status – Expertise– Training– Processes– …
31/67
32/67
Social Studies
Need for social studies, typically in the form of experiments– Independent variable (few)– Dependent variables (many)– Statistical analyses (few)
– Threats to validity (many)
33/67
Social Studies
For example, impact on identifiers on program understandability– Identifier styles by Sharif et al. and Binkley et al.– Identifier quality by Lawrie et al.– Identifiers styles and gender by Sharafi et al.– …
34/67
Maintainability
Quality Models Models
Good Practices Definition
Metrics
Detection Occurrences
Social Studies Characteristics
Developers Studies Behaviour
Factors
Measures
35/67
Developers Studies
Developers’ thought processes– Cognitive theories
• Brooks’• Von Mayrhauser’s• Pennington’s• Soloway’s
– Mental models• Gentner and Stevens’ mental models
– Memory theories• Kelly’s categories• Minsky’s frames• Piaget’s schema• Schank’s scripts
36/67
Developers Studies
Picking into developers’ thought processes
37/67
Developers Studies
Picking into developers’ thought processes
38/67
Developers Studies
Developers’ thought processes– Reading code by Hansen et al. and Sharafi et al.– Reading design models
• Content by Kagdi et al. and Sharafi et al.• Form by Cepeda et al.
– …
39/67
40/67
What’s with today’s systems?
41/67
42/67
43/67
44/67
45/67
46/67
47/67
48/67
49/67
50/67
51/67
Multi-language Systems
Today’s systems are multi-languages– Facebook– Twitter– …
– Even your “regular” software system is now multi-language, typically a Web application
52/67
Multi-language Systems
New problems– Different computational models– Complex interfaces (API)– Wrong assumptions– Wrong conversions– …
53/67
Multi-language Systems
For example, control- and data-flows between Java and “native” C/C++ code
native methods in Java are used by Java classes but (typically) implemented in C/C++
54/67
Multi-language Systems
Control-flow interactions– Java code calls native code– Native code calls Java methods– Native code can “throw” and must catch
exceptions Data-flow interactions
– Java code passes objects (pointers)– Native code creates objects– …
55/67
Multi-language Systems
Different computational modelsstatic void *xmalloc(JNIEnv *env, size_t size) {
void *p = malloc(size);if (p == NULL)
JNU_ThrowOutOfMemoryError(env, NULL);return p;
}
#define NEW(type, n) ((type *) xmalloc(env, (n) * sizeof(type)))
static const char *const *splitPath(JNIEnv *env, const char *path) {...pathv = NEW(char *, count+1);pathv[count] = NULL;...
}
56/67
Multi-language Systems
Different computational modelsstatic void *xmalloc(JNIEnv *env, size_t size) {
void *p = malloc(size);if (p == NULL)
JNU_ThrowOutOfMemoryError(env, NULL);return p;
}
#define NEW(type, n) ((type *) xmalloc(env, (n) * sizeof(type)))
static const char *const *splitPath(JNIEnv *env, const char *path) {...pathv = NEW(char *, count+1);pathv[count] = NULL;...
}
No diversion of control flow!
57/67
58/67
What challenges?
59/67
Unbalanced focus on “mono”-language systems vs. multi-language systems
60/67
Challenges
Maintainability– Quality models
• Metrics?• Relations?
– Good practices• “Border-line” practices?
– Social and developers’ studies• Independent variables?
61/67
Challenges
Not only for quality assurance!(Just for examples…)
62/67
Challenges
Not only for quality assurance!(Just for examples…)
Build systemsdescriptions
63/67
Challenges
Not only for quality assurance!(Just for examples…)
Build systemsdescriptions
Legal issues dueto interrelations
64/67
Challenges
Not only for quality assurance!(Just for examples…)
Clone definitionand detection
Build systemsdescriptions
Legal issues dueto interrelations
65/67
Challenges
Not only for quality assurance!(Just for examples…)
Clone definitionand detection
Build systemsdescriptions
Legal issues dueto interrelations
Impact on studiesof large systems
66/67
Conclusion
67/67
68/67