Identifying and Quantifying Architectural Debt Lu Xiao * , Yuanfang Cai*, Rick Kazman ⱡ , Ran Mo* and Qiong Feng* *Drexel University ⱡ University of Hawaii & SEI/CMU
Architectural Flaws vs. Real Debts Architectural Flaws Architectural Debts 2
Architectural Debts vs. Real Debts Debt in Life Architectural Debt Cost: 1,500$ Where are the debts? Interest: 14.24% How much extra maintenance cost? Cost: 20,000$ How fast does penalty Interest: 4.46% accumulate over time (interest rate)? Cost: 1000,000$ Interest: 4.75% 3
Problems to Solve Architectural Debt Identification Penalty Quantification Interest Rate Calculation 4
Definition Architectural debt (ArchDebt) : a group of architecturally connected files that incur high maintenance costs over time due to their flawed connections. ArchDebt = < FileSetSequence, DebtModel> FileSetSequence = (FileSet 1 ,FileSet 2 ,…FileSet 3 ) 5
ArchDebt Modeling Design Rule Space (DRSpace) Modeling [1] Model structural, historical, probability dependencies simultaneously Files #b #b #b #b br br br br 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 1 ObjectHelper 1 ObjectHelper 1 ObjectHelper 1 ObjectHelper 60 60 60 60 1% (1) 1% (1) 1% (1) 1% (1) dp, dp, dp, dp, 2 FileUtil 2 FileUtil 2 FileUtil 2 FileUtil 24 24 24 24 3% dp, 3% dp, 3% dp, 3% dp, (2) (2) (2) (2) 3 DefaultExchange 3 DefaultExchange 3 DefaultExchange 3 DefaultExchange 17 17 17 17 7% dp, 7% dp, 7% dp ,18 7% dp ,18 (3) (3) (3) (3) dp, dp, dp, dp, 4 ExchangeHelper 4 ExchangeHelper 4 ExchangeHelper 4 ExchangeHelper 20 20 20 20 5% dp, 5% dp, 5% dp, 5% dp, dp, dp,32 (4) dp,32 (4) dp, (4) (4) 5 IntrospectionSupport 5 IntrospectionSupport 5 IntrospectionSupport 5 IntrospectionSupport 15 10% dp ,22 15 10% dp, 15 10% dp, 15 10% dp ,22 (5) (5) (5) (5) 6 URISupport 6 URISupport 6 URISupport 6 URISupport 14 10% dp, 14 10% dp, 14 10% dp, 14 10% dp, (6) (6) (6) (6) 7 EndpointHelper 7 EndpointHelper 7 EndpointHelper 7 EndpointHelper 12 15% dp, 12 15% dp, 12 15% dp, 12 15% dp, dp, dp, (7) dp, dp, (7) dp, dp, (7) dp, dp, (7) 8 ExpressionBuilder 8 ExpressionBuilder 8 ExpressionBuilder 8 ExpressionBuilder 13 12% dp ,26 13 12% dp, 13 12% dp, 13 12% dp ,26 ,18 , , ,18 (8) (8) (8) (8) 9 OnExceptionDefinition 9 OnExceptionDefinition 9 OnExceptionDefinition 9 OnExceptionDefinition 14 10% dp, 14 10% dp, 14 10% dp, 14 10% dp, dp, (9) dp, (9) dp, (9) dp, (9) ih, ih, ih, ih, dp, dp, dp, dp, 10 OnCompletionDefinition 10 OnCompletionDefinition 10 OnCompletionDefinition 10 OnCompletionDefinition 11 18% 11 18% 11 18% 11 18% (10) (10) (10) (10) ih, ih, ih, ih, dp, dp, dp, dp, 11 RouteDefinitionHelper 11 RouteDefinitionHelper 11 RouteDefinitionHelper 11 RouteDefinitionHelper 10 10% dp, 10 10% dp, 10 10% dp, 10 10% dp, dp, dp, dp, dp, dp, dp, dp, dp, (11) (11) (11) (11) dp, dp, dp, dp, dp, dp, dp, dp, 12 ProcessorDefinition 12 ProcessorDefinition 12 ProcessorDefinition 12 ProcessorDefinition 48 48 48 48 1% dp, 1% dp, 1% dp, 1% dp, dp, dp, dp, dp, dp, dp, dp, dp, dp, dp ,24 dp ,24 dp, dp ,24 dp ,24 dp, dp, (12) (12) (12) (12) dp, dp, dp, dp, 13 DefaultRouteContext 13 DefaultRouteContext 13 DefaultRouteContext 13 DefaultRouteContext 13 12% dp, 13 12% dp, 13 12% dp, 13 12% dp, (13) (13) (13) (13) ag, ag, ag, ag, 14 ErrorHandlerBuilderRef 14 ErrorHandlerBuilderRef 14 ErrorHandlerBuilderRef 14 ErrorHandlerBuilderRef 12 15% dp, 12 15% dp, 12 15% dp, 12 15% dp, (14) dp, (14) dp, (14) dp, (14) dp, 15 RouteDefinition 15 RouteDefinition 15 RouteDefinition 15 RouteDefinition 17 17 17 17 7% dp, 7% dp, 7% dp, 7% dp, dp,16 ih,26 dp, dp, dp,16 ih,26 dp, dp, ih, ih, dp, dp, dp, dp, dp, dp, (15) (15) (15) (15) Files 16 GenericFileEndpoint 16 GenericFileEndpoint 16 GenericFileEndpoint 16 GenericFileEndpoint 20 20 20 20 5% dp, 5% dp, 5% dp, 5% dp, dp, dp, dp, dp, (16) dp, (16) dp, (16) dp, (16) dp, dp, dp, dp, dp, 17 GenericFileConsumer 17 GenericFileConsumer 17 GenericFileConsumer 17 GenericFileConsumer 23 23 23 23 4% dp, 4% dp, 4% dp, 4% dp, ag, ag, ag, ag, (17) dp, (17) dp, (17) dp, (17) dp, 18 GenericFile 18 GenericFile 18 GenericFile 18 GenericFile 20 20 20 20 5% dp, 5% dp, 5% dp, 5% dp, dp ,16 dp, dp ,16 dp, (18) (18) (18) (18) 19 GenericFileProducer 19 GenericFileProducer 19 GenericFileProducer 19 GenericFileProducer 15 10% dp, 15 10% dp, 15 10% dp, 15 10% dp, dp, dp, dp, dp, dp, dp, dp, dp, ag, ag, ag, ag, ,60 ,60 (19) (19) (19) (19) 20 FileOperations 20 FileOperations 20 FileOperations 20 FileOperations 19 19 19 19 6% dp, 6% dp, 6% dp, 6% dp, dp, dp, dp, dp, ,36 ,36 (20) (20) (20) (20) ag, ag, ag, ag, 21 FileConsumer 21 FileConsumer 21 FileConsumer 21 FileConsumer 33 33 33 33 2% dp, 2% dp, 2% dp, 2% dp, dp, dp, dp, dp, dp, dp, dp, dp, ih, ih, ih, ih, dp ,74 dp, dp, dp ,74 (21) (21) (21) (21) dp, dp, dp, dp, 22 FileEndpoint 22 FileEndpoint 22 FileEndpoint 22 FileEndpoint 14 14 14 14 6% dp, 6% dp, 6% dp, 6% dp, dp, dp, dp, dp, ih, ih, ih, ih, dp ,30 dp, dp ,30 dp, dp, dp, dp, dp, ag, ag, ag, ag, dp,56 (22) dp,56 (22) dp, dp, (22) (22) The largest 5 spaces usually capture 50% to 95% of all the error-prone files 23 MulticastProcessor 23 MulticastProcessor 23 MulticastProcessor 23 MulticastProcessor 58 58 58 58 1% dp, 1% dp, 1% dp, 1% dp, dp, dp, dp, dp, (23) (23) (23) (23) 24 Splitter 24 Splitter 24 Splitter 24 Splitter 13 12% dp, 13 12% dp, 13 12% dp, 13 12% dp, dp ,18 dp ,18 dp, dp, ,20 ,20 ih ,58 (24) ih, ih ,58 (24) ih, (24) (24) 25 XmlConverter 25 XmlConverter 25 XmlConverter 25 XmlConverter 19 19 19 19 6% dp, 6% dp, 6% dp, 6% dp, (25) (25) (25) (25) 26 XsltBuilder 26 XsltBuilder 26 XsltBuilder 26 XsltBuilder 17 17 17 17 7% dp, 7% dp, 7% dp, 7% dp, dp, dp, dp, dp, ag, ag, ag, ag, (26) (26) (26) (26) [1] L. Xiao, Y . Cai, and R. Kazman. Design rule spaces: A new form of architecture insight. In 6 Proc. 36 th International Conference on Software Engineering, 2014.
A Sample ArchDebt (Camel) (1) Architecturally connected file group with high maintenance cost. R-2.0.0, 11Files, 392 lines 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 1 ProcessorDefinition 1 ProcessorDefinition 1 ProcessorDefinition (1) (1) (1) dp, dp, dp, dp, dp, dp, dp, dp, dp, dp, dp, dp, dp, dp, dp, dp, dp, dp, dp,dp, dp, dp,dp, dp, dp,dp, dp, dp, dp, dp, dp, dp, dp, 2 LoadBalanceDefinition Extend,dp,100% (2) 2 LoadBalanceDefinition Extend,dp,100% (2) 2 LoadBalanceDefinition Extend,dp,100% (2) dp, dp, dp, 3 ChoiceDefinition 3 ChoiceDefinition 3 ChoiceDefinition Extend,dp,100% Extend,dp,100% Extend,dp,100% (3) (3) (3) dp, dp, dp, ,100% ,100% ,100% 4 RollbackDefinition 4 RollbackDefinition 4 RollbackDefinition Extend,dp,100% Extend,dp,100% Extend,dp,100% (4) dp, (4) dp, (4) dp, 5 RouteContext 5 RouteContext 5 RouteContext dp,67% dp,67% dp,67% (5) (5) (5) ,33% ,33% ,33% ,67% ,67% ,67% ,33% ,33% ,33% ,33% dp,33% ,33% dp,33% ,33% dp,33% 6 MarshalDefinition 6 MarshalDefinition 6 MarshalDefinition dp,100% dp,100% dp,100% dp,67% (6) dp,67% (6) dp,67% (6) ,100% ,100% ,100% ,100% ,50% ,100% ,100% ,50% ,100% ,100% ,50% ,100% 7 PolicyDefinition 7 PolicyDefinition 7 PolicyDefinition dp,67% dp,67% dp,67% dp,44% ,33% dp,44% ,33% dp,44% ,33% (7) (7) (7) ,33% ,33% ,33% ,33% ,33% ,33% ,33% ,33% ,33% 8 TryDefinition 8 TryDefinition 8 TryDefinition dp,100% dp,100% dp,100% ,100% ,100% ,100% dp, dp, dp, (8) (8) (8) 9 UnmarshalDefinition 9 UnmarshalDefinition 9 UnmarshalDefinition dp,100% dp,100% dp,100% dp,67% ,100% ,100% dp,67% ,100% ,100% dp,67% ,100% ,100% (9) (9) (9) ,50% ,100% ,50% ,100% ,50% ,100% 10 ErrorHandlerBuilderRef dp,50% 10 ErrorHandlerBuilderRef dp,50% 10 ErrorHandlerBuilderRef dp,50% dp, dp, dp, ,33% ,33% ,33% (10) (10) (10) 11 InterceptStrategy 11 InterceptStrategy 11 InterceptStrategy dp,50% dp,50% dp,50% ,33% ,33% ,33% ,50% ,50% ,50% ,50% ,50% ,50% ,50% ,50% ,50% (11) (11) (11) 7
A Sample ArchDebt (Camel) (2) Accumulated penalty over time. R-2.0.0, 11 Files, 392 lines 1 2 3 4 5 6 7 8 9 10 11 1 ProcessorDefinition (1) dp, dp, dp, dp, dp, dp, dp,dp, dp, dp, dp, 2 LoadBalanceDefinition Extend,dp,100% (2) dp, R-2.2.0, 20 Files, +379 lines 3 ChoiceDefinition Extend,dp,100% (3) dp, ,100% 4 RollbackDefinition Extend,dp,100% (4) dp, 5 RouteContext dp,67% (5) ,33% ,67% ,33% ,33% dp,33% 6 MarshalDefinition dp,100% dp,67% (6) ,100% ,100% ,50% ,100% 7 PolicyDefinition dp,67% dp,44% ,33% (7) ,33% ,33% ,33% 8 TryDefinition dp,100% ,100% dp, (8) 9 UnmarshalDefinition dp,100% dp,67% ,100% ,100% (9) ,50% ,100% 10 ErrorHandlerBuilderRef dp,50% dp, ,33% (10) 11 InterceptStrategy dp,50% ,33% ,50% ,50% ,50% (11) R-2.12.4, 28 Files, +1742 lines 8
Architectural Debt Identification 9
Recommend
More recommend