MaibornWolff / MaibornWolff/codecharta

New filter: Clusteranalyzer

Open
#618 3 comments 0 reactions 0 assignees View on GitHub
feature pr-analysis research
Dominant language
TypeScript
Stars
529
Forks
56
Avg merge
7h 17m
Merged PRs (30d)
34

Description

# Feature request

Suppose you have an edge metric like `temporal coupling`. This metric describes which files are often commited together. What if we could use this metric to figure out if a building belongs to the package it is actually placed in? What if we had a metric that tells me in per cent how likely it is that a building belongs in the package it was placed in?

## Description

The idea is to write a new filter that can generate clusters for any given edge metric. These clusters need to be mostly stable over many weeks so the delta mode stays helpful. Between runs with a similar code base it should not generate completely different results. Based on these clusters the filter can then look at what files are placed in the same folder and what files are actually clustered.

For example:

* If all the files it is coupled to are in the same folder it has a 100% chance of being in the right folder
* If none of the files it is coupled to are in the same folder it has a 0% chance of being in the right folder

* **Given** file A is temporarly coupled to three files B, C, D
**and** file A is in the same folder with only 1 file B
**When** I run the cluster analysis
**Then** file A has a chance of 33% to be in the right folder

* **Given** file A is temporarly coupled to three files B, C, D
**and** file A is in the same folder with 2 files B and E
**When** I run the cluster analysis
**Then** file A has a chance of 33% to be in the right folder

The cluster metric will have to be researched.

## Note

* The name of the new filter is not final :)
* This issue requires some form of #678 to be done to store the calculated clusters in the cc.json.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by researching the cluster metric and how a new filter would generate stable clusters from an edge metric. Review the required #678 work for storing calculated clusters in cc.json, then define how folder membership percentages should be calculated and validated; no implementation files or tests are named.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
analytics, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.