-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Member Ignoring Method smell in ConditionSerializer class #311
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #311 +/- ##
============================================
+ Coverage 9.26% 17.38% +8.12%
============================================
Files 430 443 +13
Lines 12373 12975 +602
Branches 1411 1517 +106
============================================
+ Hits 1146 2256 +1110
+ Misses 10985 10408 -577
- Partials 242 311 +69
Continue to review full report at Codecov.
|
Thanks for the patch (though automatic I suppose, but I'll leave the comment anyway) :) Anyway, I'm happy to merge it. But could you please recheck the |
Do you mean a failing check? I think it is something wrong with codecov settings. |
json_situation.put(C.SPEC, LocalSkillRegistry.getInstance().condition().findSkill(condition).id()); | ||
json_situation.put(C.DATA, condition.serialize(PluginDataFormat.JSON)); | ||
return json_situation; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent is wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your feedback. Yeah, I already know this issue, it's because the tool works through ASTs, and I leave the default reformatting of the library when i write back the changes into source files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right... I misspelt the word.
Hi, I'm Emanuele Iannone, a master student at University of Salerno.
Since my bachelor's thesis I have been working on a **code smell refactoring plugin called aDoctor, which is able to identify and fix energy-related problems in Android apps.
I launched it on your project, finding different instances of code smells. I chose one of them and let the plugin automatically fix it.
In this case I chose Member Ignoring Method, that is present when a non static method does not use at all instance variables and other non static methods. These kind of smell may have a non trivial impact on energy consumption, as shown in this paper:
https://www.sciencedirect.com/science/article/pii/S0950584918301678
.Besides, this kind of refactoring does not impact on the functionalities of your app, so it is totally safe. Let me know if you are interested in this refactoring proposal.