Can we predict dependencies using domain information?

21
Can we predict dependencies using domain information? Amir Aryani Fabrizio Perin Mircea Lungu Abdun Mahmood Oscar Nierstrasz University of Bern, Switzerland RMIT University, Australia Presented at 18th Working Conference on Reverse Engineering (WCRE), IEEE, Limerick, Ireland, October, 2011

description

Presented at 18th Working Conference on Reverse Engineering (WCRE), IEEE, Limerick, Ireland, October, 2011

Transcript of Can we predict dependencies using domain information?

Page 1: Can we predict dependencies using domain information?

Can we predict dependencies using domain information?

Amir Aryani Fabrizio Perin Mircea Lungu Abdun Mahmood Oscar Nierstrasz

University of Bern, Switzerland

RMIT University, Australia

Presented at 18th Working Conference on Reverse Engineering (WCRE), IEEE, Limerick, Ireland, October, 2011

Page 2: Can we predict dependencies using domain information?

Outline• A method for finding architectural dependencies

• without looking at the source code,

• without looking at design documents.

• A case study on ADempiere.

• Research collaboration opportunities.

Page 3: Can we predict dependencies using domain information?

$1.8 trillion

Development Cost of MIS systems in USA, Capers Jones, Applied Software Measurement: Global analysis of productivity and quality, Third Edition, McGraw-Hill, 2008

915,250Management Information Systems (MIS)

Page 4: Can we predict dependencies using domain information?

Motivation example: It is required to remove Business Partner tab from this screen.

Fact: There are 346 other screens in this software

Page 5: Can we predict dependencies using domain information?

Common problems in software maintenance

• Systems with legacy code, e.g., COBOL

• Hybrid systems, e.g., Python and Java

• Missing design documents

• Inaccessible maintenance history

Page 6: Can we predict dependencies using domain information?

Motivations

• Domain-based approach works

• without access to source code,

• without access to design documents.

• It might be cost efficient.

• You can collaborate with domain experts.

Page 7: Can we predict dependencies using domain information?

• Domain-based Coupling

• A case study on ADempiere

How does it work?

Page 8: Can we predict dependencies using domain information?

Example of related screens

Domain variables

Page 9: Can we predict dependencies using domain information?

Domain-level relationshipsUser Interface Component

f1 f2 f3

HAS

USES

Domain Functions

d1

d5

d3

d4

d9

d1

d3

Domain Variables

Aryani et al. ICSM 2010

Page 10: Can we predict dependencies using domain information?

Domain-based coupling| UIC1.HAS.USE ∩ UIC2.HAS.USE |

| UIC1.HAS.USE ∪ UIC2.HAS.USE |

d1

d5

d3

d4

d7

d9

d2

d8

d6

d1

d5

d3d4

d7

d9d2

d8

d1

d5

d3

d4

d7

d9d7

d1

d5d3 d4d7

d9

UIC 1 f1 f2 UIC 2 f3 f4

HAS.USEHAS.USE

[0..1]

Aryani et al. ICSM 2010

Page 11: Can we predict dependencies using domain information?

Does domain-based coupling reflect architectural

dependencies?

Page 12: Can we predict dependencies using domain information?

• 120,111 times downloaded in 2011

• 3,531 Java Classes

• 2,569,854 lines of code

• Four distinct interfaces

• 347 screens

Case Study

Page 13: Can we predict dependencies using domain information?

Architectural Dependencies

PostgreSQL/Oracle

ApplicationDictionary

SQL

PresentationLayer

Source CodeLayer

DataLayer

17,605 Architectural dependencies

M. Lungu and M. Lanza, Softwarenaut, CSMR 2006

14,898 Source code dependencies

20,310 Database dependencies

Page 14: Can we predict dependencies using domain information?

64%

64% of architecturally connected UICs have domain-based coupling.

Recall

Page 15: Can we predict dependencies using domain information?

Precision & Accuracy

TNM=223

FPM=76

TPM=31FNM=18Dependencies

Predictions

PM =TPi

TPi + FPi= 30%

AM =TPi + TNi

TPi + FPi + TNi + FNi= 73%

Page 16: Can we predict dependencies using domain information?

Improving Precision

Accuracy

Precision

Recall

Page 17: Can we predict dependencies using domain information?

Visual Comparison

Domain-based Coupling Graph Dependency Graph

Page 18: Can we predict dependencies using domain information?

What are the related research opportunities?

Page 19: Can we predict dependencies using domain information?

Future work

• Extending the case study to other systems

• Studying finer-grained components, e.g., Tabs

• Qualitative analysis of false negatives

Page 20: Can we predict dependencies using domain information?

Further research opportunities

• Can we develop a hybrid method for impact analysis which uses code analysis and domain information?

• Can we use domain-based coupling to modularise the source code to more domain relevant blocks?

• Can domain information assist dynamic analysis?

Page 21: Can we predict dependencies using domain information?

Conclusion• Domain-based coupling can be used for

approximating dependencies where• source code analysis is not an option,• design documents are outdated or

missing.• In future work, we plan to experiment other

applications of domain-based coupling.