The Refactor Miner tool detected a code smell ("LongMethod") in the prepareContext method, indicating that it is excessively long and complex. Specifically, the method has 33 lines of code, a cyclomatic complexity of 5, and accesses a significant number of variables (10), which makes it difficult to read and maintain. To improve readability and reduce complexity, the prepareContext method was divided into two smaller methods: setupContext and configureContextSettings. This refactoring does not change any existing functionality but simply enhances the readability of the code.
This pull request is part of a requirement to obtain a grade in the "Software Quality" course of the Software Engineering program at the State University of Santa Catarina (UDESC).
Comment From: pivotal-cla
@Mateus-Gabardo Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
Comment From: wilkinsona
Thanks for the pull request. Unfortunately, I don't think this has made the code any easier to read. There doesn't appear to be a natural reason for some code to be in setupContext and some to be in configureContextSettings. As such, I think that, if anything, it's made the code harder to read. It will also be harder to maintain in the future as, if some new functionality is needed, it's unclear to which of these two methods it should be added.
Comment From: philwebb
Although I'm sure the intention is good, we've now had three pull-requests from folks obtaining a grade in the "Software Quality" course of the Software Engineering program at the State University of Santa Catarina (UDESC) (#41113, #41115, #41116).
Unfortunately reviewing pull-requests like these takes time and puts undue burden on the project maintainers. We kindly ask that UDESC reconsiders this practice and removes the requirement to contribute code to Spring Boot.
Thanks for your understanding.