Giter Site home page Giter Site logo

data-clumps-doctor's Introduction

Data-Clumps-Doctor

https://lottiefiles.com/animations/data-scanning-9P3AsKKZ59

Check your code for data clumps and refactor them

About

A library to parse files and folders to check for data clumps and refactor them.

Dataset

We're excited to share our public Data-Clumps Dataset with you. We invite you to explore it and consider contributing to our growing repository. By uploading your analyzed data, you can help enrich our dataset and support the broader community in their software analysis endeavors. Together, we can enhance our understanding of data-clumps and their impact on software development.

Reporting Format

In our endeavor to ensure precision and standardization in reporting data clumps, we utilize the following specification: Data-Clumps-Type-Context.

Requirements

  • The project to be analyzed can not have Wildcard imports
    • It will not break but the detector may generate false positives
    • Since a static source-code analysis is made, the detector does not know where the import comes exactly from
  • Node Version 18.19.1 (test on this. Newer and older versions might also work)
  • Java 19
    • openjdk version "19.0.1" 2022-10-18
    • OpenJDK Runtime Environment (build 19.0.1+10-21)
    • OpenJDK 64-Bit Server VM (build 19.0.1+10-21, mixed mode, sharing)
  • Git needs to be installed

Installation

cd data-clumps-doctor/analyse/src/ignoreCoverage/astGenerator && make build
cd data-clumps-doctor/analyse && npm ci && npm run build

Usage

cd data-clumps-doctor/analyse
node ./build/ignoreCoverage/cli.js <Path_to_your_project_to_analyse>

Example to analyse local project completely:

node ./build/ignoreCoverage/cli.js --output /Users/nbaumgartner/Documents/GitHub/Data-Clumps-Dataset/Data/Projects/{project_name}/tags/{project_commit}.json --commit_selection tags --path_to_project /Users/nbaumgartner/Desktop/argouml

Example to analyse git ArgoUML completely:

node ./build/ignoreCoverage/cli.js --output /Users/nbaumgartner/Documents/GitHub/Data-Clumps-Dataset/Data/Projects/{project_name}/tags/{project_commit}.json --commit_selection tags --git_project_url_to_analyse https://github.com/argouml-tigris-org/argouml

Example to analyse multiple git completely:

node ./build/ignoreCoverage/cli.js --output /Users/nbaumgartner/Documents/GitHub/Data-Clumps-Dataset/Data/Projects/{project_name}/tags/{project_commit}.json --commit_selection tags --git_project_url_to_analyse https://github.com/argouml-tigris-org/argouml
node ./build/ignoreCoverage/cli.js --output /Users/nbaumgartner/Documents/GitHub/Data-Clumps-Dataset/Data/Projects/{project_name}/tags/{project_commit}.json --commit_selection tags --git_project_url_to_analyse https://github.com/ben-manes/caffeine
node ./build/ignoreCoverage/cli.js --output /Users/nbaumgartner/Documents/GitHub/Data-Clumps-Dataset/Data/Projects/{project_name}/tags/{project_commit}.json --commit_selection tags --git_project_url_to_analyse https://github.com/apache/dolphinscheduler
node ./build/ignoreCoverage/cli.js --output /Users/nbaumgartner/Documents/GitHub/Data-Clumps-Dataset/Data/Projects/{project_name}/tags/{project_commit}.json --commit_selection tags --git_project_url_to_analyse https://github.com/jflex-de/jflex
node ./build/ignoreCoverage/cli.js --output /Users/nbaumgartner/Documents/GitHub/Data-Clumps-Dataset/Data/Projects/{project_name}/tags/{project_commit}.json --commit_selection tags --git_project_url_to_analyse https://github.com/jfree/jfreechart
node ./build/ignoreCoverage/cli.js --output /Users/nbaumgartner/Documents/GitHub/Data-Clumps-Dataset/Data/Projects/{project_name}/tags/{project_commit}.json --commit_selection tags --git_project_url_to_analyse https://github.com/apache/rocketmq
node ./build/ignoreCoverage/cli.js --output /Users/nbaumgartner/Documents/GitHub/Data-Clumps-Dataset/Data/Projects/{project_name}/tags/{project_commit}.json --commit_selection tags --git_project_url_to_analyse https://github.com/apache/xerces2-j

Commit Selection

All Git Tags

--commit_selection tags

All Commits

--commit_selection full

Current

--commit_selection current

Help

cd data-clumps-doctor/analyse
node ./build/ignoreCoverage/cli.js --help

Roadmap

  • Support cli
  • Verbose option
    • Improve options and add documentation
  • Parser
    • Support Java - PMD
    • Support TypeScript
    • Support JavaScript
    • Support Python
    • Support C#
    • Support C++
  • Refactoring
    • Support Java

Roadmap - Future improvements

License

All Rights Reserved.

Copyright (c) 2023 Nils Baumgartner

No part of this software may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the copyright holder, except in the case of brief quotations embodied in critical reviews and certain other noncommercial uses permitted by copyright law.

For permission requests, please contact the copyright holder at [email protected]

Contributors

Nils Baumgartner

Contributors

data-clumps-doctor's People

Contributors

nilsbaumgartner1994 avatar penify-dev[bot] avatar

Watchers

 avatar  avatar

Forkers

compf

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.