lization of software reuse in npm packages, and the
trivial packaging phenomenon. For each dependency
complement network we have identified 7 big clusters
used for various purposes. Moreover, we have found
that using development dependencies with high aver-
age complementarity has a positive correlation (0.06)
with the popularity in star counts of npm packages as
a statement of “you know what you are doing”.
From the applications’ analysis, one can observe
as main communities those of web development, mo-
bile development and desktop development. In addi-
tion, no community with respect to data science and
data processing projects was identified as those are
mainly supported by the Python and R ecosystems.
Other applications of such an approach could be use-
ful in recommender software systems, for instance:
• Through information retrieval techniques devel-
opers can identify packages that work well to-
gether in a domain (for example in linting or test-
ing) using keywords in a search engine.
• If a developer saves packageA as a dependency in
the package.json file, the system could suggest
to “use packageB along with packageA”.
• We could use the complementary networks to cal-
culate a metric of how well-together our depen-
dencies fit together by summing up the PMI of all
combinations between our “ingredients”.
Last but not least, a common question among devel-
oper forums is which development platform to use,
for example for web application development (e.g.
React?, Vue?, Angular? Ember?). Such an analy-
sis could reveal which platforms are more popular or
the ones that create a closed community that can only
use platform-specific packages, or even ones that are
more open to connections with third-party libraries.
An idea for future work would be to mine Stack Over-
flow in order to find packages that can substitute other
packages and build package substitute networks.
ACKNOWLEDGEMENTS
This research has been co-financed by the European
Regional Development Fund of the European Union
and Greek national funds through the Operational
Program Competitiveness, Entrepreneurship and In-
novation, under the call RESEARCH – CREATE –
INNOVATE (project code: T1EDK-02347).
REFERENCES
Abdalkareem, R., Nourry, O., Wehaibi, S., Mujahid, S.,
and Shihab, E. (2017). Why do developers use trivial
packages? an empirical case study on npm. In Proc.
of the 11th Joint Meeting on Foundations of Software
Engineering, pages 385–395, NY, USA. ACM.
Bastian, M., Heymann, S., and Jacomy, M. (2009). Gephi:
An Open Source Software for Exploring and Ma-
nipulating Networks. In Proc. of the Third Interna-
tional AAAI Conference on Weblogs and Social Me-
dia, ICWSM 2009, pages 361–362, Menlo Park, CA,
USA. AAAI Press.
Bogart, C., K
¨
astner, C., Herbsleb, J., and Thung, F. (2016).
How to break an api: Cost negotiation and community
values in three software ecosystems. In Proceedings
of the 2016 24th ACM SIGSOFT International Sym-
posium on Foundations of Software Engineering, FSE
2016, pages 109–120, New York, NY, USA. ACM.
Chatzidimitriou, K. C., Papamichail, M. D., Diamantopou-
los, T., Tsapanos, M., and Symeonidis, A. L. (2018).
Npm-miner: An infrastructure for measuring the qual-
ity of the npm registry. In Proc. of the 15th Interna-
tional Conference on Mining Software Repositories,
MSR ’18, pages 42–45, New York, NY, USA. ACM.
Decan, A., Mens, T., and Claes, M. (2016). On the topology
of package dependency networks: A comparison of
three programming language ecosystems. In Procced-
ings of the 10th European Conference on Software Ar-
chitecture Workshops, ECSAW ’16, pages 21:1–21:4,
New York, NY, USA. ACM.
Girvan, M. and Newman, M. E. J. (2002). Com-
munity structure in social and biological networks.
Proceedings of the National Academy of Sciences,
99(12):7821–7826.
Haney, D. (2016). NPM & left-pad: Have we forgotten how
to program? https://www.davidhaney.io/npm-left-
pad-have-we-forgotten-how-to-program/. Accessed:
2019-01-16.
Kikas, R., Gousios, G., Dumas, M., and Pfahl, D. (2017).
Structure and evolution of package dependency net-
works. In Proceedings of the 14th International Con-
ference on Mining Software Repositories, MSR ’17,
pages 102–112, Piscataway, NJ, USA. IEEE Press.
Salton, G. and Buckley, C. (1988). Term-weighting ap-
proaches in automatic text retrieval. Information pro-
cessing & management, 24(5):513–523.
Teng, C.-Y., Lin, Y.-R., and Adamic, L. A. (2012). Recipe
recommendation using ingredient networks. In Pro-
ceedings of the 4th Annual ACM Web Science Con-
ference, WebSci ’12, pages 298–307, New York, NY,
USA. ACM.
Williams, J. and Dabirsiaghi, A. (2014). The unfortunate
reality of insecure libraries. Technical report, Contrast
Security.
Wittern, E., Suter, P., and Rajagopalan, S. (2016). A look at
the dynamics of the javascript package ecosystem. In
Proceedings of the 13th International Conference on
Mining Software Repositories, MSR ’16, pages 351–
361, New York, NY, USA. ACM.
npm Packages as Ingredients: A Recipe-based Approach
551