Technical Report MSC-2017-27

 TR#: MSC-2017-27 Class: MSC Title: A Nano Patterns Language for Java Authors: Ori Marcovitch Supervisors: Prof. Yossi Gil PDF Currently accessibly only within the Technion network Abstract: Patterns, micro-patterns, and nano-patterns have many applications: program comprehension, code transformations, documentation aides, improving code robustness, etc. This work revisits nano-patterns, taken here to be predicates on short code snippets that represent some common and elementary programming missions such as ‟\emph{for each~$m∈M$ do …}”, or, ‟\emph{use~$x$ (but if~$x$ is \kk{null},~$y$ is a substitute)}”. The \papertype describes a taxonomized \emph{language} of~\total{nanos} nano-patterns for Java. We also describe the process of patterns harvesting we used and the underlying rationale, including the \emph{prevalence threshold} criterion, which, capitalizing on Hirsch's famous~$h$-index, makes a robust yard stick of pattern's significance. An empirical survey of 78 OSS Java projects indicates that the language has substantial prevalence in code: about a third of commands (executable statements) and half of methods are instances of nano patterns in the proposed language. Also, the language's prevalence is typically higher than that of languages harvested in a project specific, automated machine learning process. Nano-patterns are implementation/language level details for most high level software engineering purposes. A contribution here is in identifying this clutter, appreciating its presence, and imposing order on it. The language, the nano patterns in it, and the contributed automatic tool for tracing nano patterns in code, may help to deal systematically with this low-level, yet significant, portion of code. Copyright The above paper is copyright by the Technion, Author(s), or others. Please contact the author(s) for more information

Remark: Any link to this technical report should be to this page (http://www.cs.technion.ac.il/users/wwwb/cgi-bin/tr-info.cgi/2017/MSC/MSC-2017-27), rather than to the URL of the PDF files directly. The latter URLs may change without notice.