greg4cr / coupling-mapping Goto Github PK
View Code? Open in Web Editor NEWA utility for mapping dependencies between Java projects.
License: Mozilla Public License 2.0
A utility for mapping dependencies between Java projects.
License: Mozilla Public License 2.0
See title
X y = new X (z.length);
z.length is thought of as being part of class X.
This is due to the changes introduced to fix issue #4
Some that stand out:
newStringBuilder.append.append.append.append.append.append.append'.toString
(the character mark)
newCompareToBuilder.append,other.getLeft.append,other.getMiddle.append,other.getRight.toComparison
(comma-sep list, think a "new" might be getting merged in)
Look over next week.
For example:
(new BigDecimal(Double.toString(x)).setScale(scale,roundingMethod)).doubleValue
There is a "." inside the parentheses (the .setScale). Currently, expressions assume that segments (between ".") are independent (unless they are arguments). Need to adjust how these expressions are handled.
See title. Currently, an inner class that references methods from the outer class results in an unresolved coupling (i.e., 'escapeRegex.append').
Need to filter out "this" on the Type/var replace.
Ternary expressions with couplings are placed in the coupling list. Everything before the "." is considered the be the variable name:
Coupled to non-project class: value==1?iSingularText:iPluralText.length
These get caught and removed, and the actual coupling ('iPluralText.length') is caught, so there is no effect on the end results. Still, these should be filtered out to prevent confusion.
See:
@Override
public Iterator<Entry> iterator() {
final Iterator<Entry> i = v.iterator();
return new Iterator<Entry>() {
/** The current entry. */
private final UnmodifiableEntry e = new UnmodifiableEntry();
/** {@inheritDoc} */
public boolean hasNext() {
return i.hasNext();
}
/** {@inheritDoc} */
public Entry next() {
e.setIndex(i.next().getIndex());
return e;
}
/**
* {@inheritDoc}
*
* @throws MathUnsupportedOperationException in all
* circumstances.
*/
public void remove() throws MathUnsupportedOperationException {
throw new MathUnsupportedOperationException();
}
};
}
The nested class refers to variable i. Currently, we can't see "i", as the parent of the anonymous class is "Iterator".
When there is an embedded class, i.e.:
private static final ToStringStyle TO_STRING_STYLE = new ToStringStyle() {
...
}
Couplings are captured as though they are part of the outer class.
For instance, super.appendDetail
stays the same, as the outer class has no parent.
When dealing with List classes, we get couplings that look like:
List<X>.get.getInterpolatedSecondaryState
However, the type we're dealing with is clearly not List, but X. On one hand, we can't always make this assumption, as we lack info on the inner-workings of non-project classes. On the other, we can make assumptions about known concrete List types from Java. Should we keep a list of those and override the current logic if such as class applies?
When compiled, these appear as Parent$1, Parent$2, etc. Rename these to match.
If class variables are defined after a method, i.e.:
void test(){
...
}
x = y.z();
The coupling to y.z()
will be labeled as being part of test()
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.