Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Increase Kotlin duplication mass threshold #323

Merged
merged 1 commit into from
Jun 14, 2018

Conversation

larkinscott
Copy link
Contributor

@larkinscott larkinscott commented Jun 14, 2018

  • After looking at some of the duplication issues this was surfacing locally and running some metrics, I think it would be good to bump this from 40 to 60

Copy link
Contributor

@chrishulton chrishulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine, just interested how you came up with 60 (and not say, 50, 70, etc).

@larkinscott
Copy link
Contributor Author

larkinscott commented Jun 14, 2018

@chrishulton I was leaning towards 60 after looking at a range of the issues that were being surfaced, so I decided to try to get some metrics. It's not perfect, but I took a handful of Kotlin repos, dropped them into a directory, set the mass_threshold to 20 and collected all the resulting mass_thresholds using this: https://github.com/codeclimate/qm_qa/pull/16/files

The result was:

{'metrics': [{'language': 'Kotlin', '90th percentile': 84.0, '95th percentile': 126.0, 'Mean': 55.250245076196414, 'Average': 55.250245076196414, 'Median': 39.0, 'Standard deviatation': 80.4210381927305, 'Max value': 2777, 'Min value': 20}]}

I think the mean seems close here, so I ended up going with my first impression which was 60. Anything higher would eliminate some actual duplication issues.

@chrishulton
Copy link
Contributor

chrishulton commented Jun 14, 2018

Cool, I'm not really sure what kind of math makes sense here but that at least sounds reasonable.

If we had good issue status data (mark as confirmed / mark as invalid) this could be a good candidate for machine learning. Maybe something we can try out later ..........

@larkinscott larkinscott merged commit e48e3aa into master Jun 14, 2018
@larkinscott larkinscott deleted the sl/increase-kotlin-mass-threshold branch June 14, 2018 16:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants