Giter Club home page Giter Club logo

jpeek's People

Contributors

amihaiemil avatar dgarus avatar gnusinpavel avatar gsnoff avatar hdouss avatar ilyakharlamov avatar keddok avatar laithalebrahim avatar llorllale avatar magdel avatar metafates avatar mohamednizar avatar oridan avatar paulodamaso avatar pbenety avatar pnatashap avatar rexim avatar rok-povsic avatar rultor avatar sharpler avatar skapral avatar starkda avatar stepanov-dmitry avatar uurl avatar verkhovin avatar victornoel avatar vmotsak avatar vssekorin avatar vzurauskas avatar yegor256 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jpeek's Issues

NHD

Let's implement NHD cohesion metric.

S. Counsell, S. Swift, and J. Crampton, “The interpretation
and utility of three cohesion metrics for object-oriented design,”
ACM Transactions on Software Engineering and Methodology
(TOSEM), vol. 15, no. 2, pp. 123–149, 2006.

PDF: https://www.researchgate.net/profile/Stephen_Swift/publication/220403868_The_interpretation_and_utility_of_three_cohesion_metrics_for_object-oriented_design/links/00b7d52d0fc90cb989000000/The-interpretation-and-utility-of-three-cohesion-metrics-for-object-oriented-design.pdf

Too many open files

Analysing large projects fails as too many files are held open at the same time.

Scenario to reproduce:

  • Clone java-bullshifier
  • Generate sample project with 100 subprojects and 256 classes each
    • /tmp/java-bullshifier$ ./gradlew -Pclasses=256 -Psubprojects=100 clean run
    • /tmp/java-bullshifier/output$ ./gradlew fatjar
  • Use jpeek jar from Readme
  • Start analysis: /tmp/jpeek$ java -jar jpeek-0.5-jar-with-dependencies.jar /tmp/java-bullshifier/output /tmp/results

Run will fail following exception:

Exception in thread "main" java.io.IOException: java.io.UncheckedIOException: java.io.FileNotFoundException: /tmp/java-bullshifier/output/ProjAhgodwwubpj/build/tmp/fatjar-stage/ch/qos/logback/core/LogbackException.class (Too many open files)
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:74)
        at org.cactoos.scalar.IoCheckedScalar.value(IoCheckedScalar.java:60)
        at org.jpeek.App.analyze(App.java:115)
        at org.jpeek.Main.main(Main.java:61)
Caused by: java.io.UncheckedIOException: java.io.FileNotFoundException: /tmp/java-bullshifier/output/ProjAhgodwwubpj/build/tmp/fatjar-stage/ch/qos/logback/core/LogbackException.class (Too many open files)
        at org.cactoos.func.UncheckedFunc.apply(UncheckedFunc.java:61)
        at org.cactoos.iterator.Mapped.next(Mapped.java:70)
        at org.cactoos.iterator.Filtered.hasNext(Filtered.java:89)
        at org.cactoos.iterator.Mapped.hasNext(Mapped.java:65)
        at org.jpeek.metrics.JavassistClasses.metrics(JavassistClasses.java:139)
        at org.jpeek.metrics.JavassistClasses.xembly(JavassistClasses.java:103)
        at org.jpeek.metrics.cohesion.CAMC.xembly(CAMC.java:91)
        at org.jpeek.Report.xml(Report.java:124)
        at org.jpeek.Report.save(Report.java:88)
        at org.jpeek.App.lambda$analyze$0(App.java:112)
        at org.cactoos.func.FuncOf.lambda$new$3(FuncOf.java:88)
        at org.cactoos.func.FuncOf.apply(FuncOf.java:104)
        at org.cactoos.scalar.And.lambda$null$0(And.java:101)
        at org.cactoos.scalar.And.value(And.java:127)
        at org.cactoos.scalar.And.value(And.java:52)
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:66)
        ... 3 more
Caused by: java.io.FileNotFoundException: /tmp/java-bullshifier/output/ProjAhgodwwubpj/build/tmp/fatjar-stage/ch/qos/logback/core/LogbackException.class (Too many open files)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(FileInputStream.java:195)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at org.jpeek.metrics.JavassistClasses.lambda$metrics$2(JavassistClasses.java:132)
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:66)
        at org.cactoos.func.UncheckedFunc.apply(UncheckedFunc.java:59)
        ... 18 more

OCC

Let's implement OCC cohesion metric.

H. Aman, K. Yamasaki, H. Yamada, and M.-T. Noda, “A proposal
of class cohesion metrics using sizes of cohesive parts,” in Proc. of
Fifth Joint Conference on Knowledge-based Software Engineering,
2002, pp. 102–107.

https://www.researchgate.net/profile/Hirohisa_Aman/publication/268046583_A_Proposal_of_Class_Cohesion_Metrics_Using_Sizes_of_Cohesive_Parts/links/5729ca4b08ae057b0a060fa6/A-Proposal-of-Class-Cohesion-Metrics-Using-Sizes-of-Cohesive-Parts.pdf

skeleton

Let's create a skeleton. I'll do it.

Questions and analyze

I have analyzed some implemented metrics and also think about the following questions during implementation metrics where we counting methods of a class and types of method parameters or return types. Next questions relate to all metrics and I think it should be clarified for all who want to implement some new metric. To be easy it to understand what I want to say let's look to CAMC metric implementation. We can take any metric, but CAMC has easy description and formula.

See this one paper Class Cohesion Metrics for Software Engineering: A Critical Review, PDF, Table 2. Interface-based metrics. CAMC metric is described as:
camc

1. Letter l in formula is a number of distinct parameter types across all methods in a class. For example, if class has the next methods

public int length(String str) {
	return s.length();
}
public int bytes(String str) {
	return str.getBytes().length;
}

then l should be equals to 1 because two methods have the same parameter type String. But for committed to repository implementation l will be equals to 2. It happens because our implementation counts not only parameter types of method but also it counts return types of method. For code above it counts int and String. I think our implementation contradicts to definition in the paper, we should count only parameter types of method.

One more evidence for that: if we should count both parameter types of method and return types then it clearly is wrote in the paper. See description for MMAC metric. Paper clearly tells us that i is can be a parameter type of method or return type. In the description of CAMC metric l is defined only as count of parameter types.

So, am I right that we should count only parameter types of method for l?


2. For example class has the next method:

public int plus(int a, Integer b) {
	return a + b;
}

Let see the point 1 above, for CAMC metric we should calculate value l as a number of distinct parameter types for method. Our implmentation counts l as 2 because method has two distinct types: int and java.lang.Integer. Also we can see it in a bytecode of method:

public plus(ILjava/lang/Integer;)I
 L0
  LINENUMBER 13 L0
  // ... and other instructions  

For compiler int and java.lang.Integer it is two different types, but for human it is one type for integer values.

So, should we consider simple types and theirs analogous boxed types as the same types or consider them as different types (like compiler does)?


3. Letter k in CAMC formula is a number of all methods in a class.

So, is it correct that we consider constructors as methods?

Should we consider only public methods or consider all methods (public, private, protected, package-private)? I think we should consider all methods, but what do you think?

If class inherits from another class then should we consider methods from parent class? I think we shouldn't, but what do you think?


4. Also interesting bug in counting of all methods in a class when class overrides one or more generic methods from parent. Let's see the next code:

public final class OverrideGenericMethodFromInterface 
	implements GenericIncrementor1<Integer> {

  private final int num;

  public OverrideGenericMethodFromInterface(int num) {
    this.num = num;
  }

  @Override
  public Integer inc() {
    return num + 1;
  }
}

interface GenericIncrementor1<T> {
  T inc();
}

We have generic interface GenericIncrementor1 and its implementation presented by class OverrideGenericMethodFromInterface. Visually we see only one method in OverrideGenericMethodFromInterface class, it is public Integer inc() { }. And when we count methods for some metric we expect that Javassist or ASM returns us only one method. But it doesn't. It returns two methods. Why does it happen? Let's see to the bytecode:

// class version 52.0 (52)
// access flags 0x31
// signature Ljava/lang/Object;LGenericIncrementor1<Ljava/lang/Integer;>;
// declaration: OverrideGenericMethodFromInterface implements GenericIncrementor1<java.lang.Integer>
public final class OverrideGenericMethodFromInterface implements GenericIncrementor1  {

  // compiled from: OverrideGenericMethodFromInterface.java

  // access flags 0x12
  private final I num

  // access flags 0x1
  public <init>(I)V
   L0
    LINENUMBER 5 L0
    ALOAD 0
    INVOKESPECIAL java/lang/Object.<init> ()V
   L1
    LINENUMBER 6 L1
    ALOAD 0
    ILOAD 1
    PUTFIELD OverrideGenericMethodFromInterface.num : I
   L2
    LINENUMBER 7 L2
    RETURN
    MAXSTACK = 2
    MAXLOCALS = 2

  // access flags 0x1
  public inc()Ljava/lang/Integer;
   L0
    LINENUMBER 11 L0
    ALOAD 0
    GETFIELD OverrideGenericMethodFromInterface.num : I
    ICONST_1
    IADD
    INVOKESTATIC java/lang/Integer.valueOf (I)Ljava/lang/Integer;
    ARETURN
    MAXSTACK = 2
    MAXLOCALS = 1

  // access flags 0x1041
  public synthetic bridge inc()Ljava/lang/Object;
   L0
    LINENUMBER 1 L0
    ALOAD 0
    INVOKEVIRTUAL OverrideGenericMethodFromInterface.inc ()Ljava/lang/Integer;
    ARETURN
    MAXSTACK = 1
    MAXLOCALS = 1
}

In the bytecode two methods is presented: public inc()Ljava/lang/Integer; and public synthetic bridge inc()Ljava/lang/Object;. And according that Javassist or ASM works properly when returning two methods, because bytecode contains two methods. Compiler always generates one more method on each implementation of generic method in a class. And it impacts all our metrics. To avoid incorrect counting of all methods in a classs we should exclude synthetic methods.

Let's discuss all points/questions and I will fix them if it will be needed.

running out of memory

Heroku logs:

2017-11-06T15:16:08.710384+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2017-11-06T15:16:31.142395+00:00 heroku[web.1]: Process running mem=594M(109.6%)
2017-11-06T15:16:31.142499+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2017-11-06T15:16:52.583138+00:00 heroku[web.1]: Process running mem=594M(109.6%)
2017-11-06T15:16:52.583189+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2017-11-06T15:17:14.414977+00:00 heroku[web.1]: Process running mem=594M(109.6%)
2017-11-06T15:17:14.415136+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2017-11-06T15:17:36.968745+00:00 heroku[web.1]: Process running mem=594M(109.6%)
2017-11-06T15:17:36.968940+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2017-11-06T15:17:59.260627+00:00 heroku[web.1]: Process running mem=594M(109.6%)
2017-11-06T15:17:59.260845+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2017-11-06T15:18:20.801884+00:00 heroku[web.1]: Process running mem=594M(109.6%)
2017-11-06T15:18:20.801884+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2017-11-06T15:18:42.533605+00:00 heroku[web.1]: Process running mem=594M(109.6%)
2017-11-06T15:18:42.533660+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2017-11-06T15:19:05.481493+00:00 heroku[web.1]: Process running mem=594M(109.6%)
2017-11-06T15:19:05.481529+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2017-11-06T15:19:27.573072+00:00 heroku[web.1]: Process running mem=594M(109.6%)
2017-11-06T15:19:27.573248+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)

We seem to be leaking memory resources somewhere. Let's investigate and fix.

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

java.io.IOException: java.lang.IllegalStateException: java.util.concurrent.ExecutionException: java.io.UncheckedIOException: java.io.IOException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at org.cactoos.func.IoCheckedBiFunc.apply(IoCheckedBiFunc.java:74)
	at org.jpeek.web.TkReport.act(TkReport.java:74)
	at org.takes.facets.fork.FkRegex.route(FkRegex.java:209)
	at org.takes.facets.fork.FkChain.route(FkChain.java:75)
	at org.takes.facets.fork.TkFork.act(TkFork.java:100)
	at org.takes.facets.forward.TkForward.act(TkForward.java:68)
	at org.takes.tk.TkWrap.act(TkWrap.java:61)
	at org.takes.http.BkBasic.print(BkBasic.java:108)
	at org.takes.http.BkBasic.accept(BkBasic.java:84)
	at org.takes.http.BkSafe$1.accept(BkSafe.java:51)
	at org.takes.http.BkWrap.accept(BkWrap.java:52)
	at org.takes.http.BkTimeable.accept(BkTimeable.java:89)
	at org.takes.http.BkParallel$1$1.run(BkParallel.java:89)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: java.util.concurrent.ExecutionException: java.io.UncheckedIOException: java.io.IOException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at org.jpeek.web.AsyncReports.apply(AsyncReports.java:86)
	at org.jpeek.web.AsyncReports.apply(AsyncReports.java:54)
	at org.cactoos.func.IoCheckedBiFunc.apply(IoCheckedBiFunc.java:66)
	... 15 more
Caused by: java.util.concurrent.ExecutionException: java.io.UncheckedIOException: java.io.IOException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at org.jpeek.web.AsyncReports.apply(AsyncReports.java:84)
	... 17 more
Caused by: java.io.UncheckedIOException: java.io.IOException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at org.cactoos.func.UncheckedFunc.apply(UncheckedFunc.java:61)
	at org.cactoos.iterator.Mapped.next(Mapped.java:70)
	at org.cactoos.iterable.Joined.iterator(Joined.java:68)
	at org.cactoos.collection.Joined.iterator(Joined.java:97)
	at org.xembly.Directives.append(Directives.java:250)
	at org.jpeek.Index.value(Index.java:72)
	at org.jpeek.App.analyze(App.java:135)
	at org.jpeek.web.Reports.apply(Reports.java:136)
	at org.jpeek.web.Reports.apply(Reports.java:49)
	at org.jpeek.web.Futures.lambda$apply$0(Futures.java:72)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at com.jcabi.log.VerboseThreads$Wrap.run(VerboseThreads.java:220)
	... 1 more
Caused by: java.io.IOException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:74)
	at org.cactoos.func.UncheckedFunc.apply(UncheckedFunc.java:59)
	... 14 more
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.LinkedList.checkElementIndex(LinkedList.java:555)
	at java.util.LinkedList.get(LinkedList.java:476)
	at org.cactoos.list.Sorted.get(Sorted.java:185)
	at org.jpeek.Index.metric(Index.java:118)
	at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:66)
	... 15 more

LCOM

Let's implement LCOM cohesion metric.

S. R. Chidamber and C. F. Kemerer, A metrics suite for object oriented design. IEEE Transactions on Software Engineering, vol.20, no.6, 1994.

http://www.pitt.edu/~ckemerer/CK%20research%20papers/MetricForOOD_ChidamberKemerer94.pdf

Shyam R. Chidamber, Chris F. Kemerer. A Metrics suite for Object Oriented design. M.I.T. Sloan School of Management E53-315. 1993. http://uweb.txstate.edu/~mg43/CS5391/Papers/Metrics/OOMetrics.pdf

Victor Basili, Lionel Briand and Walcelio Melo. A Validation of Object-Oriented Design Metrics as Quality Indicators. IEEE Transactions on Software Engineering. Vol. 22, No. 10, October 1996. http://www.cs.umd.edu/users/basili/publications/journals/J60.pdf

Bindu S. Gupta: A Critique of Cohesion Measures in the Object-Oriented Paradigm. Master of Science Thesis. Michigan Technological University, Department of Computer Science. 1997.

badge

Let's implement it.

colors for metrics

Let's add colors to all metrics, to indicate their quality (red, green, yellow).

MWE

Let's implement MWE cohesion metric.

Y. Liu, D. Poshyvanyk, R. Ferenc, T. Gyim´othy, and N. Chrisochoides,
“Modeling class cohesion as mixtures of latent topics,”
in Software Maintenance, 2009. ICSM 2009. IEEE International
Conference on. IEEE, 2009, pp. 233–242.

PDF is not available :(

http://ieeexplore.ieee.org/document/5306318/

AST or bytecode

To calculate class cohesion metrics we need information about methods, attributes, and connections between them. We can get that from the bytecode directly, or from AST, which we should get through some parser. Which option is better? The decision is important, since it will affect the entire design of this tool.

sentry

Let's connect it to Sentry

web front

Let's create a simple web front for public Maven artifacts.

jpeek fails to run

I fail to run jpeek. I end up in exceptions when runnnig the maven repository jar and compiled sources.

When running the repository jar, given in the readme, some class is reported missing:

$ java -jar ~/tools/jpeek/jpeek-0.1-jar-with-dependencies.jar . /tmp/jpeek
Exception in thread "main" java.io.IOException: java.io.UncheckedIOException: java.io.IOException: java.lang.IllegalStateException: javassist.NotFoundException: com.company.releng.tools.deploy.locations.DeployLocations
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:74)
        at org.cactoos.scalar.IoCheckedScalar.value(IoCheckedScalar.java:60)
        at org.jpeek.App.analyze(App.java:96)
        at org.jpeek.Main.main(Main.java:61)
Caused by: java.io.UncheckedIOException: java.io.IOException: java.lang.IllegalStateException: javassist.NotFoundException: com.company.releng.tools.deploy.locations.DeployLocations
        at org.cactoos.func.UncheckedFunc.apply(UncheckedFunc.java:61)
        at org.cactoos.iterator.Mapped.next(Mapped.java:70)
        at org.jpeek.metrics.cohesion.CAMC.metrics(CAMC.java:118)
        at org.jpeek.metrics.cohesion.CAMC.xembly(CAMC.java:91)
        at org.jpeek.App.lambda$analyze$0(App.java:85)
        at org.cactoos.func.FuncOf.lambda$new$3(FuncOf.java:88)
        at org.cactoos.func.FuncOf.apply(FuncOf.java:104)
        at org.cactoos.scalar.And.lambda$null$0(And.java:101)
        at org.cactoos.scalar.And.value(And.java:127)
        at org.cactoos.scalar.And.value(And.java:52)
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:66)
        ... 3 more
Caused by: java.io.IOException: java.lang.IllegalStateException: javassist.NotFoundException: com.company.releng.tools.deploy.locations.DeployLocations
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:74)
        at org.cactoos.func.UncheckedFunc.apply(UncheckedFunc.java:59)
        ... 13 more
Caused by: java.lang.IllegalStateException: javassist.NotFoundException: com.company.releng.tools.deploy.locations.DeployLocations
        at org.jpeek.metrics.cohesion.CAMC.metric(CAMC.java:146)
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:66)
        ... 14 more
Caused by: javassist.NotFoundException: com.company.releng.tools.deploy.locations.DeployLocations
        at javassist.ClassPool.get(ClassPool.java:445)
        at javassist.bytecode.Descriptor.toCtClass(Descriptor.java:592)
        at javassist.bytecode.Descriptor.getParameterTypes(Descriptor.java:439)
        at javassist.CtBehavior.getParameterTypes(CtBehavior.java:298)
        at org.jpeek.metrics.cohesion.CAMC.methods(CAMC.java:196)
        at org.jpeek.metrics.cohesion.CAMC.cohesion(CAMC.java:157)
        at org.jpeek.metrics.cohesion.CAMC.metric(CAMC.java:142)
        ... 15 more

When trying to build the tool from source using mvn clean package , the build fails due to errors in tests:

# Build tests fail

Tests in error: 
  AppTest.createsXmlReports:50 » IO java.lang.IllegalArgumentException: 40 error...
  MainTest.createsXmlReports:47 » IO java.lang.IllegalArgumentException: 40 erro...

Tests run: 11, Failures: 4, Errors: 2, Skipped: 0

Building with mvn clean package -DskipTests produces the desired jar.

However when running this file, another exception occurs:

~/git/master$ java -jar ~/source/jpeek/target/jpeek-1.0-SNAPSHOT-jar-with-dependencies.jar . /tmp/jpeek
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.io.IOException: java.io.UncheckedIOException: java.io.IOException: javassist.NotFoundException: org.apache.commons.cli.CommandLine
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:74)
        at org.cactoos.scalar.IoCheckedScalar.value(IoCheckedScalar.java:60)
        at org.jpeek.App.analyze(App.java:114)
        at org.jpeek.Main.main(Main.java:61)
Caused by: java.io.UncheckedIOException: java.io.IOException: javassist.NotFoundException: org.apache.commons.cli.CommandLine
        at org.cactoos.func.UncheckedFunc.apply(UncheckedFunc.java:61)
        at org.cactoos.iterator.Mapped.next(Mapped.java:70)
        at org.jpeek.metrics.JavassistClasses.metrics(JavassistClasses.java:129)
        at org.jpeek.metrics.JavassistClasses.xembly(JavassistClasses.java:101)
        at org.jpeek.metrics.cohesion.CAMC.xembly(CAMC.java:76)
        at org.jpeek.App.xml(App.java:134)
        at org.jpeek.App.lambda$analyze$0(App.java:102)
        at org.cactoos.func.FuncOf.lambda$new$3(FuncOf.java:88)
        at org.cactoos.func.FuncOf.apply(FuncOf.java:104)
        at org.cactoos.scalar.And.lambda$null$0(And.java:101)
        at org.cactoos.scalar.And.value(And.java:127)
        at org.cactoos.scalar.And.value(And.java:52)
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:66)
        ... 3 more
Caused by: java.io.IOException: javassist.NotFoundException: org.apache.commons.cli.CommandLine
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:74)
        at org.jpeek.metrics.JavassistClasses.metric(JavassistClasses.java:147)
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:66)
        at org.cactoos.func.UncheckedFunc.apply(UncheckedFunc.java:59)
        ... 15 more
Caused by: javassist.NotFoundException: org.apache.commons.cli.CommandLine
        at javassist.ClassPool.get(ClassPool.java:445)
        at javassist.bytecode.Descriptor.toCtClass(Descriptor.java:592)
        at javassist.bytecode.Descriptor.getParameterTypes(Descriptor.java:439)
        at javassist.CtBehavior.getParameterTypes(CtBehavior.java:298)
        at org.jpeek.metrics.cohesion.CAMC.methods(CAMC.java:139)
        at org.jpeek.metrics.cohesion.CAMC.cohesion(CAMC.java:86)
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:66)
        ... 18 more

Am I missing something or did I catch the project in an unfortunate state?

integration testing is absent

Let's add integration testing phase to make sure our JAR actually works with an external code base. Let's use maven-invoker-plugin.

link to GitHub

Let's add GitHub link to those repos, which have that in their .pom files. When we download artifact in Reports, we should pay attention to the .pom file inside. If it contains the link to GitHub repo, in its /project/scm/url -- we should call App with an additional parameter: github, equal to the repository name. Later, we will use this param in XSL processing, to point classes to their sources.

Also, let's send /project/version in version parameter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.