<p>The Modularity of software is a composite metric. Thus, first you need to define the modularity and participating metrics. The paper you mentioned (<a href="http://arxiv.org/ftp/arxiv/papers/1309/1309.5689.pdf" rel="nofollow">http://arxiv.org/ftp/arxiv/papers/1309/1309.5689.pdf</a>) offers one of the ways. 
An alternative way is to detect modularity design smells and form a modularity metric formula (that uses the number of detected instances of modularity design smells). The modularity design smells are: Insufficient Modularization, Broken Modularization, Cyclically-dependent Modularization, and Hub-like Modularization (refer "Refactoring for software design smells"). </p>
Calculation of modularity from sonarqube
<p>Is there a way to calculate modularity metric from the preexisting metrics in SonarQube? I want to calculate modularity so that I can use it for my technical debt calculation.</p>