Skip to content

Conversation

@Siva-2707
Copy link
Contributor

Resolved some Implementations smells

SM_Method.java

  • parse() method was a Complex Method, so have extracted the code into various methods.

TypeInfo.java

  • Magic number (2) was used. Introduced a variable COMMA_LENGTH to give more understanding of the usage.

ImplementationSmellDetector.java

  • ABSTRACT_FUMCTION_CALL_FROM_CONSTRUCTOR was a very long variable name causing Long Identifier smell. I have changed that to ABST_FUNC_CALL_FRM_CTOR. Which makes it short and understandable.

@Siva-2707 Siva-2707 changed the title chore: Refactor to solve Implementation smells chore: Refactor to solve smells Nov 28, 2024
@Siva-2707
Copy link
Contributor Author

  • Resolved one Rebellious Hierarchy smell by introducing a Parsable interface.

  • Resolved Insufficient modularization smell in TypeMetrics class by moving the methods to a different class (TypeMetricsExtractor)

  • Resolved Broken Hierarchy smell. TypeMetics was extending MetricsExtrator) This was breaking is-a relationship which was causing the Broken Hierachy smell. Introduced a new class Metrics to resolve that. And moved the extraction method to the corresponding class.

@tushartushar tushartushar merged commit 47fb30c into tushartushar:master Dec 31, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants