Git Product home page Git Product logo

micro-patterns's Introduction

Micro Patterns

Micro patterns are well-defined code structures that can be automatically detected by a tool. They were first described in an OOPSLA 2005 paper titled "Micro Patterns in Java Code" (by Yossi Gil and Itay Maman). The code here is the original micro-patterns detector used for the research work described in that paper.

Prerequisite

Your local machine needs to have the following installed:

(yes, the former is implied by the latter...)

Usage

Run the mp.sh script to invoke the micro-patterns detector on a JAR of your choice. Example:

$ mp.sh "../../../tools/apache-maven-3.6.1/lib/jansi-1.17.1.jar"

This will result in an output such as:

Found 20906 classes (program + library) in 1.71 seconds [12226 classes/sec]
Checked 54 program classes in 0.09 seconds [600 classes/sec]

            Useless   0%
                Box   7%
       Compound Box  13%
            Sampler   0%
             Canopy   4%
          Immutable  22%
        Implementor   2%
       Pseudo Class   0%
               Pool  11%
Restricted Creation  17%
          Overrider  17%
               Sink  19%
          Stateless  13%
       Common State   6%
            Outline   0%
   Function Pointer   2%
    Function Object   9%
             Joiner   0%
         Designator   0%
             Record   0%
           Taxonomy   2%
           PureType  11%
     Augmented Type   0%
           Extender   4%
       Data Manager   0%
              Trait   0%
         Cobol Like   2%
      State Machine   7%
          Recursive   0%
       Limited Self  28%
                     ---
           Coverage  83%

micro-patterns's People

Contributors

imaman avatar

Stargazers

Adam Matan avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.