Skip to Main Content
Research has shown that code anomalies may be related to problems in the architecture design. Without proper mechanisms to support the identification of architecturally-relevant code anomalies, software systems will degrade and might be discontinued as a consequence. Nowadays, metrics-based detection strategy is the most common mechanism to identify code anomalies. However, these strategies often fail to detect architecturally-relevant code anomalies. A key limitation is that they solely exploit measurable static properties of the source code. This paper proposes and evaluates a suite of architecture-sensitive detection strategies. These strategies exploit information related to how fully-modularized and widely-scoped architectural concerns are realized by the code elements. The accuracy of the proposed detection strategies is assessed in a sample of nearly 3500 architecturally-relevant code anomalies and 950 architectural problems distributed in 6 software systems. Our findings show that more than the 60% of code anomalies detected by the proposed strategies were related to architectural problems. Additionally, the proposed strategies identified on average 50% more architecturally-relevant code anomalies than those gathered with using conventional strategies.