-
Notifications
You must be signed in to change notification settings - Fork 32
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
Number of Polymorphic Methods (NOP) #118
Comments
When there are two subclasses of a class, and both contain a method with the same name, are these methods polymorphic? |
@ocelot335 I didn't understand the question. Can you give an example? |
@yegor256 How many polymorphic methods should there be in the following cases in your opinion?
Also, if there "getF()" method in Parent? Should we ignore this?
|
@ocelot335 they are not "subclasses", they are "nested" classes: https://docs.oracle.com/javase/tutorial/java/javaOO/nested.html (also known as inner or embedded). I suggest we only count methods inside one class, ignoring parent classes. |
@yegor256 Okay, did I understand correctly that NOP values will be 0 in appropriate cases?
|
@ocelot335 correct |
Let's add NOP metric to
ast.py
, should be relatively easy to calculate. A method is "polymorphic" if there exists another method with the same name:The text was updated successfully, but these errors were encountered: