-
Notifications
You must be signed in to change notification settings - Fork 81
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
#19 OCC #21
#19 OCC #21
Conversation
@yegor256 please, pay attention to this pull request |
Job |
Codecov Report
@@ Coverage Diff @@
## master #21 +/- ##
===========================================
+ Coverage 94.11% 94.32% +0.2%
- Complexity 53 93 +40
===========================================
Files 8 10 +2
Lines 187 317 +130
Branches 21 41 +20
===========================================
+ Hits 176 299 +123
- Misses 5 10 +5
- Partials 6 8 +2
Continue to review full report at Codecov.
|
import org.xembly.Directive; | ||
|
||
/** | ||
* Optimistic Class Cohesion (OCC). |
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.
@vssekorin please, add a brief explanation of the logic here, like it's done in LCOM.java
@vssekorin indeed, it looks complex, but not messy. You can move that inner class out of the method, but it seems that such a refactoring will only decrease readability. I would leave everything the way it is now and only fix the things I mentioned above. |
@vssekorin good code, by the way, thanks! |
* @author Vseslav Sekorin (vssekorin@gmail.com) | ||
* @version $Id$ | ||
* @see <a href="https://www.researchgate.net/publication/268046583_A_Proposal_of_Class_Cohesion_Metrics_Using_Sizes_of_Cohesive_Parts">A Proposal of Class Cohesion Metrics Using Sizes of Cohesive Parts</a> | ||
* @since 0.2 |
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.
@vssekorin should be 0.4
XhtmlMatchers.xhtml( | ||
new Xembler( | ||
new OCC( | ||
new FakeBase("Test") |
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.
@vssekorin can you give this class a more meaningful name? You're not using Foo
for some reason. What is that reason? The name should say it. Make it TooComplex
or TwoAttributes
, something like that, to explain us what these classes are about.
XhtmlMatchers.xhtml( | ||
new Xembler( | ||
new OCC( | ||
new FakeBase("C") |
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.
@vssekorin the same here, C
is not really a good name :)
@vssekorin one more thing, don't forget to update the README and explain the metric there. |
@vssekorin and please add PDF to this folder: https://github.com/yegor256/jpeek/tree/master/papers |
@yegor256 thanks for your review. |
@rultor merge |
As per #19
OCC.java
introducedNow the class contains a very dirty code. I would like to receive advice on correcting.