npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dxworks/jafax

v0.5.1

Published

Java Fact Extractor (JaFaX) is a code analysis tool used to find irregularities with Java based software projects

Downloads

4

Readme

Java Fact eXtractor

Java Fact Extractor (JaFaX) is a code analysis tool used to find irregularities with Java based software projects.

Start Up

  • Import project with Maven
  • Run mvn clean install
  • Run with the path you want to analyze as an argument or run inside the project you wish to analyze
  • If a JSON file is found inside the directory, it will be used instead of creating an AST tree, otherwise it will create one
  • It will then continue to parse the JSON and calculate the relations and metrics. The JSON creation is done in order to allow the user to modify the JSON in case there are multiple projects with classes with the same signature.

Results

Layout

Class

|name|type|description| |----|----|-----------| |type|String|Property needed by the kotlinx serializer, always Class |id|Long|The unique id of the object (shared among all types)| |name|String|The name of the class| |fileName|String|The name of the containing file| |isInterface|Boolean|A value representing if the class is an interface or not, only appears if its value is true| |modifiers|List<String>|The modifiers of the class| |container|Long|The id of its container (class or method)| |superClass|Long|The id of its superClass| |interfaces|List<Long>|The list of ids of its interfaces| |isExternal|Boolean|A value representing if the class is from the source project or not, only appears if its value is true| |isTypeParameter|Boolean|A value representing if the class ia type parameter or not, only appears if its value is true| |instances|List<Long>|The list of ids of its parameter instances. Meaning that when you have A<T> and have an instance somewhere declared of A<String>, T will have String in its parameterInstances| |typeParameters|List<Long>|The list of ids of its type parameters| |containedFields|List<Long>|The list of ids of its directly contained fields| |containedClasses|List<Long>|The list of ids of its directly contained classes| |containedMethods|List<Long>|The list of ids of its directly contained methods| |accessedFields|List<Long>|The list of ids of its accessed fields inside the initializer of the class| |calledMethods|List<Long>|The list of ids of its called methods inside the initializer of the class|

Method

|name|type|description| |----|----|-----------| |type|String|Property needed by the kotlinx serializer, always Method |id|Long|The unique id of the object (shared among all types)| |name|String|The name of the method| |signature|String|The signature of the method| |isConstructor|Boolean|A value representing if the method is a constructor or not, only appears if its value is true| |isDefaultConstructor|Boolean|A value representing if the method is a default constructor or not, only appears if its value is true| |returnType|Long|The return type of the method| |modifiers|List<String>|The modifiers of the method| |container|Long|The id of its container (class or method)| |parameters|List<Long>|The list of ids of its parameters| |localVariables|List<Long>|The list of ids of its directly contained local variables| |typeParameters|List<Long>|The list of ids of its type parameters| |cyclomaticComplexity|Long|A value representing the method's cyclomatic complexity| |containedClasses|List<Long>|The list of ids of its directly contained classes| |containedMethods|List<Long>|The list of ids of its directly contained methods| |accessedFields|List<Long>|The list of ids of its directly accessed fields| |calledMethods|List<Long>|The list of ids of its directly called methods|

Attribute

|name|type|description| |----|----|-----------| |type|String|Property needed by the kotlinx serializer, always Attribute |id|Long|The unique id of the object (shared among all types)| |name|String|The name of the attribute| |returnType|Long|The type of the attribute| |modifiers|List<String>|The modifiers of the attribute| |kind|String|The attribute kind, can be either Parameter, Field or LocalVariable|

Relations

|name|calculation level|calculation formula| |----|-----------------|-------------------|

Metrics

|name|calculation formula| |----|-------------------| |ATFD|The sum of all public accessed attributes (outside of constructors) from inside a class. |ATFD2|The sum of all public accessed attributes which have a user-defined type (outside of constructors) from inside a class. |CC|The sum of all classes that call methods from the measured class. |CM|The sum of all methods that call methods from the measured class.

Anti-Patterns

|name|calculation level|calculation formula| |----|-----------------|-------------------|