M.Sc Thesis

M.Sc StudentMarcovitch Ori
SubjectA Nano Patterns Language for Java
DepartmentDepartment of Computer Science
Supervisor ASSOCIATE PROF. Joseph Gil
Full Thesis textFull thesis text - English Version


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 ‟for each mM do ?”, or, use x (but if x is null, y is a substitute)”.

The thesis describes a taxonomized language of 38 nano-patterns for Java. We also describe the process of patterns harvesting we used and the underlying rationale, including the 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.