Skip to content (access key 's')
Logo of Technion
Logo of CS Department
Logo of CS4People

The Taub Faculty of Computer Science Events and Talks

Nano-Patterns Language for Java
event speaker icon
Ori Marcovitch (M.Sc. Thesis Seminar)
event date icon
Tuesday, 14.02.2017, 13:30
event location icon
Taub 601
event speaker icon
Advisor: Prof. Y. Gil
Roughly speaking Nano-Patterns are recurring, short snippets of code which represent a common approach for dealing with small scale implementation issues. Examples include, e.g., ‟\emph{set and return old value}”, ‟\emph{defaults to}”, and the sequence of instructions required to implement the logical condition~$∃x∈S∙p(x)$ where~$S$ is a collection and~$p(·)$ is a logical predicate. This paper presents the notion of Nano-Patterns, offers criteria for evaluating their quality, and describes how they might be used for class design, effective communication between programmers, a concrete documentation aides, and in consideration of extension of the base programming language. We also offer a ‟language” of a couple of tens of Nano-Patterns for Java and evaluate it against a large corpus of open source projects. The empirical study shows that Nano-Patterns occur in about~$65\%$ of all methods. Moreover, we show that about~$35\%$ of all methods are completely characterized by a single Nano-Pattern, just as~$45\%$ of all statements,~$45\%$ of conditional statements and~$60\%$ of iterative statements. We conjecture that these characteristics of object oriented programming, in which functionality tends to be encoded in the class structure, rather than the imperative code found in methods.