I am currently using IntelliJ IDEA 2016.3.3 to make a dependency analysis on a Java source code. I've begun with the Matrix Dependency analysis, or DSM. For instance I want to know what is the relantionship between the class ComparisonComponent (CC) and ComparisonDescriptor (CD). On the image below, the DSM matrix shows that CC depends on CD with a value of 6.
https://i.sstatic.net/PWvcg.jpg "image01"
When trying to know what that actually means in the source, you can right click the square (that says number 6) and click "Find usages for Dependencies". Which brings back to the source code, and tab shows where, in this case, the CD class is being used in the CC class. As seen on the image below, it shows that the class is used 5 times. All 5 places can be easily found.
https://i.sstatic.net/tiawq.jpg "image02"
I´ve read the DSM manual from Intellij and have been doing some research with no success. I want to know what that number 6 in the DSM matrix actually represents in the source code. There are other examples where the numbers matches (DSM matrix number and the actual usage) but there are examples where the number are really far apart from each other.
I appreciate any help!
Thank you very much!
Phyllipe
The differences in number are caused by the fact that DSM performs its analysis on the compiled class files, while Find Usages performs its search on the source files. The analysis on class files is done for performance, and DSM analysis on sources files would be many times slower. However there are differences in the number of references between class files and number of references between source files. One example is import statements in source files, which obviously are not present in class files. There are many more differences.
By invoking View | Show Bytecode on a Java source file in IntelliJ IDEA, it is possible to view the bytecode of the corresponding compiled class file. You can use this action to explore the differences between Java source and class files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With