Dependency Graph

Online documentation:

Dependency Matrix

Online documentation:

Visualizing Code Metrics through Treemaping

With the Online documentation, understand how Treemaping can help you see patterns in your code base, that would be hard to spot with other ways.

Abstractness versus Instability Diagram

The Abstractness versus Instability Diagram helps to detect which projects are potentially painful to maintain (i.e concrete and stable) and which projects are potentially useless (i.e abstract and instable).

Online documentation:

For beginners: Where to start

Quick Tips

Code Quality from Now!

Main
Main \ Rules
Main \ Group of Queries \ Object Oriented Design
Main \ Group of Queries \ API Breaking Changes
Main \ Group of Queries \ Code Diff Summary
Main \ Group of Queries \ Dead Code
Main \ Metrics \ Application Statistics
Main \ Metrics \ Projects Metrics
Main \ Metrics \ Packages Metrics
Main \ Metrics \ Types Metrics
Main \ Projects Dependencies
Main \ Packages Dependencies
Main \ Types Dependencies
Main \ Build Order
Main \ Analysis Log

JArchitect Report Build Summary


» Application name :
» Report build date :
» Analysis Duration :
» JArchitect version :
             New Project
08.02.2013 16:34:00
00:09
3.0.0.6435
        
[ For beginners: Where to start ]    [ Quick tips ]    [ JArchitect site ]

The present HTML report is a summary of data gathered by the analysis.
It is recommended to use the JArchitect interactive UI capabilities
to make the most of JArchitect by mastering all aspects of your code.
» Baseline for Comparison :   Not Defined. To define a Baseline for Comparison, please read this online documentation.
» Code Coverage Data :   Not Defined. To import Code Coverage Data, please read this online documentation.

Diagrams      

.NET Projects Dependency Graph      graphHelp

[ scaled ]
   [ full ]
Dependency Graph
.NET Projects Dependency Matrix      matrixhHelp

[ scaled ]
   [ full ]
Dependency Matrix
Treemap View      treemaphHelp

[ scaled ]
   [ full ]
Treemap Metric View
Abstractness versus Instability      abstInsthHelp

[ scaled ]
   [ full ]
Abstractness vs. Instability

Application Metrics

                    Note: Further Application Statistics are available.
# Lines of code :
# Projects : 21
# Packages : 0
# Types : 0
# Methods : 0
# Fields : 0
# Java source files :
# BC instruction : 0
# Lines of comment : N/A
# Classes : 0
# Abstract classes : 0
# Interfaces : 0
# Exception types : 0
#Annotation types : 0
# Enumeration types : 0
# Generic methods : 0
# Generic types : 0
Third Party Usage
 # Projects used : 0
 # Packages used : 0
 # Types used : 0
 # Methods used : 0
 # Fields used : 0
Percentage …
… code coverage : N/A
  … of comment : N/A
 … of public types : NaN%
 … of public methods : NaN%
 … of classes with public field(s) : NaN%

Rules summary  
 71 0 0 

This section lists all Rules violated, and Rules or Queries with Error
  • » Number of Rules or Queries with Error (syntax error, exception thrown, time-out): 0
  • » Number of Rules violated : 0

Application Statistics

Stat # Occurences Avg StdDev Max
Stat # Occurences Avg StdDev Max
Properties on interfaces interfaces 00-1 properties on
Methods on interfaces interfaces 00-1 methods on
Arguments on methods on interfaces methods 00-1 arguments on
Public properties on classes Classes 00-1 public properties on
Public methods on classes classes 00-1 public methods on
Arguments on public methods on classes methods 00-1 arguments on
BC instructions in non-abstract methods methods 00-1 BC instructions in
Cyclomatic complexity on non abstract Methods Methods 00 CC = -1 for

Projects Metrics

If you wish to define thresholds on projects ' Code Metrics, consider writing some Rules.
Clicking column header arrows sorts values.
Clicking column header title text redirect to the online Code Metric definition.
Projects # lines of code# BC instruction # Types # Abstract Types # lines of comment% Comment% CoverageAfferent CouplingEfferent CouplingRelational CohesionInstabilityAbstractnessDistance
Projects # lines of code# BC instruction # Types # Abstract Types # lines of comment% Comment% CoverageAfferent CouplingEfferent CouplingRelational CohesionInstabilityAbstractnessDistance
log4j v1.00000---000000
log4j-api v1.00000---000000
log4j-api v1.00000---000000
log4j-core v1.00000---000000
log4j-core v1.00000---000000
log4j-distribution v1.00000---000000
log4j-flume-ng v1.00000---000000
log4j-flume-ng v1.00000---000000
log4j-jcl v1.00000---000000
log4j-jcl v1.00000---000000
log4j-async v1.00000---000000
log4j-to-slf4j v1.00000---000000
log4j-1.2-api v1.00000---000000
log4j12-api v1.00000---000000
flume-common v1.00000---000000
flume-embedded v1.00000---000000
flume-remote v1.00000---000000
log4j-slf4j-impl v1.00000---000000
log4j-slf4j-impl v1.00000---000000
log4j-web v1.00000---000000
log4j-web v1.00000---000000

Types Metrics : Code Quality

For a particular Code Metric defined for types, values in red represent the 15% highest values.
If you wish to define thresholds on types' Code Metrics, consider writing some Rule.
Clicking column header arrows sorts values.
Clicking column header title text redirect to the online Code Metric definition.

Types Metrics : Code Members and Inheritance

Type Name # Instance Methods Nb Static Methods Nb Properties # Fields# Children ClassesDepth Of Inheritance Tree Type Package
Type Name Nb Instance Methods Nb Static Methods Nb Properties Nb FieldsNb Children ClassesDepth Of Inheritance Tree Type Package

Types Metrics : Lack Of Cohesion Of Methods and Association Between Classes

Packages Metrics

If you wish to define thresholds on namespaces' Code Metrics, consider writing some Rules.
Clicking column header arrows sorts values.
Clicking column header title text redirect to the online Code Metric definition.

Object Oriented Design

Base class should not use derivatives
// <Name>Base class should not use derivatives</Name>
warnif count > 0 
from baseClass in JustMyCode.Types
where baseClass.IsClass && baseClass.NbChildren > 0 // <-- for optimization!
let derivedClassesUsed = baseClass.DerivedTypes.UsedBy(baseClass)
where derivedClassesUsed.Count() > 0
select new { baseClass, derivedClassesUsed }

No types matched

Class shouldn't be too deep in inheritance tree
// <Name>Class shouldn't be too deep in inheritance tree</Name>
warnif count > 0 from t in JustMyCode.Types 
where t.IsClass
let baseClasses = t.BaseClasses.ExceptThirdParty()

// Warn for classes with 3 or more base classes.
// Notice that we don't count third-party classes 
// because this rule concerns your code design,
// not third-party libraries consumed design.
where baseClasses.Count() >= 3

select new { t, baseClasses, 
                
// The metric value DepthOfInheritance takes account
                // of third-party base classes
                t.DepthOfInheritance } 

// Branches too long in the derivation should be avoided.
// See the definition of the DepthOfInheritance metric here 
// http://www.jarchitect.com/Metrics.aspx#DIT

No types matched

Class with no descendant should be final if possible
// <Name>Class with no descendant should be final if possible</Name>
warnif count > 0 from t in JustMyCode.Types where 
  
t.IsClass && 
  
t.NbChildren ==0 && 
 
!t.IsFinal && 
 
!t.IsStatic 
  
// && !t.IsPublic <-- You might want to add this condition 
  //                    if you are developping a framework
  //                    with classes that are intended to be 
  //                    sub-classed by your clients.
  orderby t.NbLinesOfCode descending
select new { t, t.NbLinesOfCode }

No types matched

Avoid the Singleton pattern
//<Name>Avoid the Singleton pattern</Name>
warnif count > 0
from t in Application.Types
where !t.IsStatic && !t.IsAbstract && t.IsClass 

// All ctors of a singleton are private
where t.Constructors.Where(ctor => !ctor.IsPrivate).Count() == 0

// A singleton contains one static field of its parent type, to reference the unique instance
let staticFieldInstances = t.StaticFields.WithFieldType(t)
where staticFieldInstances.Count() == 1
select new { t, staticFieldInstance = staticFieldInstances.First() }

// The Singleton pattern consists in syntactically enforcing that a class 
// has just one unique instance.
// At first glance, this pattern looks appealing and it is widely used.
// However, we discourage you from using singleton classes because experience
// shows that singletons often result in less testable and less maintainable code.
// More details available in these discussions:
//  http://codebetter.com/patricksmacchia/2011/05/04/back-to-basics-usage-of-static-members/
//  http://adamschepis.com/blog/2011/05/02/im-adam-and-im-a-recovering-singleton-addict/

No types matched

Don't assign static fields from instance methods
// <Name>Don't assign static fields from instance methods</Name>
// Assigning static fields from instance methods leads to
// poorly maintainable and non thread-safe code.
// It is advised to assign static fields inline or from class constructor.
warnif count > 0
from f in Application.Fields where 
  
f.IsStatic &&
 
!f.IsLiteral &&
 
!f.IsInitOnly &&
 
!f.IsGeneratedByCompiler &&
  
// Contract API define such a insideContractEvaluation static field
  f.Name != "insideContractEvaluation"
let assignedBy = f.MethodsAssigningMe.Where(m => !m.IsStatic)
where assignedBy .Count() > 0
select new { f, assignedBy }

No fields matched

Avoid empty interfaces
// <Name>Avoid empty interfaces</Name>
warnif count > 0 from t in JustMyCode.Types where 
  
t.IsInterface && 
  
t.NbMethods == 0
select new { t, t.TypesThatImplementMe }

// Interfaces define members that provide a behavior 
// or usage contract. The functionality described by 
// the interface can be adopted by any type, 
// regardless of where the type appears in the 
// inheritance hierarchy. A type implements an 
// interface by providing implementations for the 
// interface's members. An empty interface does not 
// define any members, and as such, does not define 
// a contract that can be implemented.

// If your design includes empty interfaces that 
// types are expected to implement, you are probably 
// using an interface as a marker, or a way of 
// identifying a group of types. If this identification 
// will occur at runtime, the correct way to accomplish
// this is to use a custom attribute. Use the presence 
// or absence of the attribute, or the attribute's 
// properties, to identify the target types. If the 
// identification must occurs at compile time, then using 
// an empty interface is acceptable.

No types matched

API Breaking Changes

API Breaking Changes: Types
// <Name>API Breaking Changes: Types</Name>
// This rule warns if a publicly visible type is 
// not publicly visible anymore or if it has been removed.
// Such type can break the code of your clients.

warnif count > 0 from t in codeBase.OlderVersion().Application.Types
where t.IsPubliclyVisible && 

     
// The type has been removed and its parent project hasn't been removed ...
     ( (t.WasRemoved() && !t.ParentProject.WasRemoved()) ||

     
// ... or the type is not publicly visible anymore
       !t.WasRemoved() && !t.NewerVersion().IsPubliclyVisible)

select new { t,
             
NewVisibility = (t.WasRemoved() ? " " : t.NewerVersion().Visibility.ToString()) }

No types matched

API Breaking Changes: Methods
// <Name>API Breaking Changes: Methods</Name>
// This rule warns if a publicly visible method is 
// not publicly visible anymore or if it has been removed.
// Such method can break the code of your clients.

warnif count > 0 from m in codeBase.OlderVersion().Application.Methods
where m.IsPubliclyVisible && 

     
// The method has been removed and its parent type hasn't been removed ...
     ( (m.WasRemoved() && !m.ParentType.WasRemoved()) ||

     
// ... or the method is not publicly visible anymore
       !m.WasRemoved() && !m.NewerVersion().IsPubliclyVisible)

select new { m,
             
NewVisibility = (m.WasRemoved() ? " " : m.NewerVersion().Visibility.ToString()) }

No methods matched

API Breaking Changes: Fields
// <Name>API Breaking Changes: Fields</Name>
// This rule warns if a publicly visible field is 
// not publicly visible anymore or if it has been removed.
// Such field can break the code of your clients.

warnif count > 0 from f in codeBase.OlderVersion().Application.Fields
where f.IsPubliclyVisible &&

     
// The field has been removed and its parent type hasn't been removed ...
     ( (f.WasRemoved() && !f.ParentType.WasRemoved()) ||

     
// ... or the field is not publicly visible anymore
       !f.WasRemoved() && !f.NewerVersion().IsPubliclyVisible)

select new { f,
             
NewVisibility = (f.WasRemoved() ? " " : f.NewerVersion().Visibility.ToString()) }

No fields matched

API Breaking Changes: Interfaces and Abstract Classes
// <Name>API Breaking Changes: Interfaces and Abstract Classes</Name>
// This rule warns if a publicly visible interface or abstract class 
// has been changed and contains new abstract methods or 
// if some abstract methods have been removed.
// This can break the code of clients 
// that implement such interface or derive from such abstract class.

warnif count > 0 from tNewer in Application.Types where 
 
(tNewer.IsInterface || tNewer.IsClass && tNewer.IsAbstract) && 
  
tNewer.IsPubliclyVisible && 
  
tNewer.IsPresentInBothBuilds()

let tOlder = tNewer.OlderVersion() where tOlder.IsPubliclyVisible

let methodsRemoved = tOlder.Methods.Where(m => m.IsAbstract && m.WasRemoved())
let methodsAdded = tNewer.Methods.Where(m => m.IsAbstract && m.WasAdded())

where methodsAdded.Count() > 0 || methodsRemoved.Count() > 0
select new { tNewer, methodsAdded, methodsRemoved }

No types matched

Avoid transforming immutable types into mutable types
// <Name>Avoid transforming immutable types into mutable types</Name>

// Immutability is a strong property on a type.
// Breaking immutability can result in serious problem for an algorithm consummer
// that has been written taking account of the type immutability.

// To visualize changes in code, right-click a matched type and select:
//  - Compare older and newer versions of source file
//  - Compare older and newer versions disassembled with Reflector

warnif count > 0 
from t in Application.Types where
  
t.IsPresentInBothBuilds() &&
 
!t.IsStatic &&
 
!t.IsImmutable && 
  
t.OlderVersion().IsImmutable

let mutableFields = from f in t.InstanceFields where !f.IsImmutable select f

select new { t, mutableFields }

No types matched

API: New publicly visible types
// <Name>API: New publicly visible types</Name>
// List types that are new in the public surface of your projects

from t in Application.Types
where t.IsPubliclyVisible && 

     
// The type has been removed and its parent project hasn't been removed ...
     ( (t.WasAdded() && !t.ParentProject.WasAdded()) ||

     
// ... or the type existed but was not publicly visible
       !t.WasAdded() && !t.OlderVersion().IsPubliclyVisible)

select new { t,
             
OldVisibility = (t.WasAdded() ? " " : t.OlderVersion().Visibility.ToString()) }

No types matched

API: New publicly visible methods
// <Name>API: New publicly visible methods</Name>
// List methods that are new in the public surface of your projects

from m in Application.Methods
where m.IsPubliclyVisible && 

     
// The method has been removed and its parent project hasn'm been removed ...
     ( (m.WasAdded() && !m.ParentType.WasAdded()) ||

     
// ... or the t existed but was not publicly visible
       !m.WasAdded() && !m.OlderVersion().IsPubliclyVisible)

select new { m,
             
OldVisibility = (m.WasAdded() ? " " : m.OlderVersion().Visibility.ToString()) }

No methods matched

API: New publicly visible fields
// <Name>API: New publicly visible fields</Name>
// List fields that are new in the public surface of your projects

from f in Application.Fields
where f.IsPubliclyVisible && 

     
// The method has been removed and its parent project hasn'f been removed ...
     ( (f.WasAdded() && !f.ParentType.WasAdded()) ||

     
// ... or the t existed but was not publicly visible
       !f.WasAdded() && !f.OlderVersion().IsPubliclyVisible)

select new { f,
             
OldVisibility = (f.WasAdded() ? " " : f.OlderVersion().Visibility.ToString()) }

No fields matched

Code Diff Summary

New projects
// <Name>New projects</Name>
from a in Application.Projects where a.WasAdded()
select new { a, a.NbLinesOfCode }

No projects matched

Projects removed
// <Name>Projects removed</Name>
from a in codeBase.OlderVersion().Application.Projects where a.WasRemoved()
select new { a, a.NbLinesOfCode }

No projects matched

Projects where code was changed
// <Name>Projects where code was changed</Name>
from a in Application.Projects where a.CodeWasChanged()
select new { a, a.NbLinesOfCode, 
             
oldNbLinesOfCode = a.OlderVersion().NbLinesOfCode.GetValueOrDefault() ,
             
delta = (int) a.NbLinesOfCode.GetValueOrDefault() - a.OlderVersion().NbLinesOfCode.GetValueOrDefault() }

No projects matched

New packages
// <Name>New packages</Name>
from n in Application.Packages where 
 
!n.ParentProject.WasAdded() &&
  
n.WasAdded()
select new { n, n.NbLinesOfCode }

No namespaces matched

Packages removed
// <Name>Packages removed</Name>
from n in codeBase.OlderVersion().Application.Packages where 
 
!n.ParentProject.WasRemoved() &&
  
n.WasRemoved()
select new { n, n.NbLinesOfCode }

No namespaces matched

Packages where code was changed
// <Name>Packages where code was changed</Name>
from n in Application.Packages where n.CodeWasChanged()
select new { n, n.NbLinesOfCode, 
             
oldNbLinesOfCode = n.OlderVersion().NbLinesOfCode.GetValueOrDefault() ,
             
delta = (int) n.NbLinesOfCode.GetValueOrDefault() - n.OlderVersion().NbLinesOfCode.GetValueOrDefault() }

No namespaces matched

New types
// <Name>New types</Name>
from t in Application.Types where 
 
!t.ParentPackage.WasAdded() &&
  
t.WasAdded()
select new { t, t.NbLinesOfCode }

No types matched

Types removed
// <Name>Types removed</Name>
from t in codeBase.OlderVersion().Application.Types where 
 
!t.ParentPackage.WasRemoved() &&
  
t.WasRemoved()
select new { t, t.NbLinesOfCode }

No types matched

Types where code was changed
// <Name>Types where code was changed</Name>
// To visualize changes in code, right-click a matched type and select:
//  - Compare older and newer versions of source file
//  - Compare older and newer versions disassembled with Reflector

from t in Application.Types where t.CodeWasChanged() 
//select new { t, t.NbLinesOfCode }
select new { t, t.NbLinesOfCode, 
             
oldNbLinesOfCode = t.OlderVersion().NbLinesOfCode ,
             
delta = (int?) t.NbLinesOfCode - t.OlderVersion().NbLinesOfCode } 
/*from t in Application.Types where t.CodeWasChanged() && t.IsPresentInBothBuild
select new { t, t.NbLinesOfCode, 
             oldNbLinesOfCode = t.OlderVersion().NbLinesOfCode ,
             delta = (int) t.NbLinesOfCode - t.OlderVersion().NbLinesOfCode }*/

No types matched

Heuristic to find types moved from one package or project to another
// <Name>Heuristic to find types moved from one package or project to another</Name>
let typesRemoved = codeBase.OlderVersion().Types.Where(t => t.WasRemoved())
let typesAdded = Types.Where(t => t.WasAdded())

from tMoved in typesAdded.Join(
   
typesRemoved,
   
t => t.Name,
   
t => t.Name,
   
(tNewer, tOlder) => new { tNewer, 
                             
OlderParentpackage = tOlder.ParentPackage,
                             
OlderParentproject = tOlder.ParentProject  } ) 
select tMoved

No types matched

Types directly using one or several types changed
// <Name>Types directly using one or several types changed</Name>
let typesChanged = Application.Types.Where(t => t.CodeWasChanged()).ToHashSet()

from t2 in JustMyCode.Types.UsingAny(typesChanged) where
  
!t2.CodeWasChanged() && 
  
!t2.WasAdded()
let typesChangedUsed = t2.TypesUsed.Intersect(typesChanged) 
select new { t2, typesChangedUsed }

No types matched

Types indirectly using one or several types changed
// <Name>Types indirectly using one or several types changed</Name>
let typesChanged = Application.Types.Where(t => t.CodeWasChanged()).ToHashSet()

// 'depth' represents a code metric defined on types using
// directly or indirectly any type where code was changed.
let depth = JustMyCode.Types.DepthOfIsUsingAny(typesChanged) 

from t2 in depth.DefinitionDomain where
  
!t2.CodeWasChanged() && 
  
!t2.WasAdded()

let typesChangedDirectlyUsed = t2.TypesUsed.Intersect(typesChanged) 
let depthOfUsingTypesChanged = depth[t2]
orderby depthOfUsingTypesChanged 

select new { t2, depthOfUsingTypesChanged, typesChangedDirectlyUsed }

No types matched

New methods
// <Name>New methods</Name>
from m in Application.Methods where 
 
!m.ParentType.WasAdded() &&
  
m.WasAdded()
select new { m, m.NbLinesOfCode }

No methods matched

Methods removed
// <Name>Methods removed</Name>
from m in codeBase.OlderVersion().Application.Methods where 
 
!m.ParentType.WasRemoved() &&
  
m.WasRemoved()
select new { m, m.NbLinesOfCode }

No methods matched

Methods where code was changed
// <Name>Methods where code was changed</Name>
// To visualize changes in code, right-click a matched method and select:
//  - Compare older and newer versions of source file
//  - Compare older and newer versions disassembled with Reflector

from m in Application.Methods where m.CodeWasChanged()
select new { m, m.NbLinesOfCode, 
             
oldNbLinesOfCode = m.OlderVersion().NbLinesOfCode ,
             
delta = (int?) m.NbLinesOfCode - m.OlderVersion().NbLinesOfCode }

No methods matched

Methods directly calling one or several methods changed
// <Name>Methods directly calling one or several methods changed</Name>
let methodsChanged = Application.Methods.Where(m => m.CodeWasChanged()).ToHashSet()

from m2 in JustMyCode.Methods.UsingAny(methodsChanged ) where
  
!m2.CodeWasChanged() && 
  
!m2.WasAdded()
let methodsChangedCalled = m2.MethodsCalled.Intersect(methodsChanged) 
select new { m2, methodsChangedCalled }

No methods matched

Methods indirectly calling one or several methods changed
// <Name>Methods indirectly calling one or several methods changed</Name>
let methodsChanged = Application.Methods.Where(m => m.CodeWasChanged()).ToHashSet()

// 'depth' represents a code metric defined on methods using
// directly or indirectly any method where code was changed.
let depth = JustMyCode.Methods.DepthOfIsUsingAny(methodsChanged) 

from m2 in depth.DefinitionDomain where
  
!m2.CodeWasChanged() && 
  
!m2.WasAdded()

let methodsChangedDirectlyUsed = m2.MethodsCalled.Intersect(methodsChanged) 
let depthOfUsingMethodsChanged = depth[m2]
orderby depthOfUsingMethodsChanged 

select new { m2, depthOfUsingMethodsChanged, methodsChangedDirectlyUsed }

No methods matched

New fields
// <Name>New fields</Name>
from f in Application.Fields where 
 
!f.ParentType.WasAdded() &&
  
f.WasAdded()
select new { f }

No fields matched

Fields removed
// <Name>Fields removed</Name>
from f in codeBase.OlderVersion().Application.Fields where 
 
!f.ParentType.WasRemoved() &&
  
f.WasRemoved()
select new { f }

No fields matched

Third party types that were not used and that are now used
// <Name>Third party types that were not used and that are now used</Name>
from t in ThirdParty.Types where t.IsUsedRecently()
select new { t, t.Methods, t.Fields, t.TypesUsingMe }

No types matched

Third party types that were used and that are not used anymore
// <Name>Third party types that were used and that are not used anymore</Name>
from t in codeBase.OlderVersion().Types where t.IsNotUsedAnymore()
select new { t, t.Methods, t.Fields, TypesThatUsedMe = t.TypesUsingMe }

No types matched

Third party methods that were not used and that are now used
// <Name>Third party methods that were not used and that are now used</Name>
from m in ThirdParty.Methods where 
  
m.IsUsedRecently() &&
 
!m.ParentType.IsUsedRecently()
select new { m, m.MethodsCallingMe }

No methods matched

Third party methods that were used and that are not used anymore
// <Name>Third party methods that were used and that are not used anymore</Name>
from m in codeBase.OlderVersion().Methods where 
  
m.IsNotUsedAnymore() &&
 
!m.ParentType.IsNotUsedAnymore()
select new { m, MethodsThatCalledMe = m.MethodsCallingMe}

No methods matched

Third party fields that were not used and that are now used
// <Name>Third party fields that were not used and that are now used</Name>
from f in ThirdParty.Fields where 
  
f.IsUsedRecently() &&
 
!f.ParentType.IsUsedRecently()
select new { f, f.MethodsUsingMe }

No fields matched

Third party fields that were used and that are not used anymore
// <Name>Third party fields that were used and that are not used anymore</Name>
from f in codeBase.OlderVersion().Fields where 
  
f.IsNotUsedAnymore() &&
 
!f.ParentType.IsNotUsedAnymore()
select new { f, MethodsThatUsedMe = f.MethodsUsingMe }

No fields matched

Dead Code

Potentially dead Types
// <Name>Potentially dead Types</Name>
warnif count > 0
// Filter procedure for types that should'nt be considered as dead
let canTypeBeConsideredAsDeadProc = new Func<IType, bool>(
   
t => !t.IsPublic && //   Public types might be used by client applications of your projects.
         t.Name != "Program" && 
        
!t.IsGeneratedByCompiler 
        
)

// Select types unused
let typesUnused = 
   
from t2 in JustMyCode.Types where
   
t2.NbTypesUsingMe == 0 && canTypeBeConsideredAsDeadProc(t2)
   
select t2

// Dead types = types used only by unused types (recursive)
let deadTypesMetric = typesUnused.FillIterative(
types => from t3 in codeBase.Application.Types.UsedByAny(types).Except(types)
         
where canTypeBeConsideredAsDeadProc(t3) &&
               
t3.TypesUsingMe.Intersect(types).Count() == t3.NbTypesUsingMe
         
select t3)

from t4 in deadTypesMetric.DefinitionDomain
select new { t4, t4.TypesUsingMe, depth = deadTypesMetric[t4] }

No types matched

Potentially dead Methods
// <Name>Potentially dead Methods</Name>
warnif count > 0
// Filter procedure for methods that should'nt be considered as dead
let canMethodBeConsideredAsDeadProc = new Func<IMethod, bool>(
    
m => !m.IsPubliclyVisible &&       // Public methods might be used by client applications of your projects.
         !m.IsEntryPoint &&            // Main() method is not used by-design.
         !m.IsClassConstructor &&      // The BC code never explicitely calls class constructors.
         !(m.IsConstructor &&          // Don't take account of protected ctor that might be call by a derived ctors.
           m.IsProtected) &&
         
!m.IsGeneratedByCompiler)

// Get methods unused
let methodsUnused = 
   
from m2 in JustMyCode.Methods where 
   
m2.NbMethodsCallingMe == 0 && 
   
canMethodBeConsideredAsDeadProc(m2)
   
select m2

// Dead methods = methods used only by unused methods (recursive)
let deadMethodsMetric = methodsUnused.FillIterative(
   
methods => // Unique loop, just to let a chance to build the hashset.
              from o in (new object()).ToEnumerable()
              
// Use a hashet to make Intersect calls much faster!
              let hashset = methods.ToHashSet()
              
from m3 in codeBase.Application.Methods.UsedByAny(methods).Except(methods)
              
where canMethodBeConsideredAsDeadProc(m3) &&
                    
// Select methods called only by methods already considered as dead
                    hashset.Intersect(m3.MethodsCallingMe).Count() == m3.NbMethodsCallingMe
              
select m3)

from m4 in JustMyCode.Methods.Intersect(deadMethodsMetric.DefinitionDomain)
select new { m4, m4.MethodsCallingMe, depth = deadMethodsMetric[m4] }

No methods matched

Potentially dead Fields
// <Name>Potentially dead Fields</Name>
warnif count > 0
from f in JustMyCode.Fields where
   
f.NbMethodsUsingMe == 0 && 
   
!f.IsPublic &&     // Although not recommended, public fields might be used by client applications of your projects.
   !f.IsLiteral &&    // The BC code never explicitely uses literal fields.
   !f.IsEnumValue  // The BC code never explicitely uses enumeration value.
    
   
select f

No fields matched

Projects Dependencies

Project Depends on Is referenced by
Project Depends on Is referenced by
log4j v1.0 - -
log4j-api v1.0 - -
log4j-api v1.0 - -
log4j-core v1.0 - -
log4j-core v1.0 - -
log4j-distribution v1.0 - -
log4j-flume-ng v1.0 - -
log4j-flume-ng v1.0 - -
log4j-jcl v1.0 - -
log4j-jcl v1.0 - -
log4j-async v1.0 - -
log4j-to-slf4j v1.0 - -
log4j-1.2-api v1.0 - -
log4j12-api v1.0 - -
flume-common v1.0 - -
flume-embedded v1.0 - -
flume-remote v1.0 - -
log4j-slf4j-impl v1.0 - -
log4j-slf4j-impl v1.0 - -
log4j-web v1.0 - -
log4j-web v1.0 - -

Projects Build Order

  1. log4j
  2. log4j-api
  3. log4j-api
  4. log4j-core
  5. log4j-core
  6. log4j-distribution
  7. log4j-flume-ng
  8. log4j-flume-ng
  9. log4j-jcl
  10. log4j-jcl
  11. log4j-async
  12. log4j-to-slf4j
  13. log4j-1.2-api
  14. log4j12-api
  15. flume-common
  16. flume-embedded
  17. flume-remote
  18. log4j-slf4j-impl
  19. log4j-slf4j-impl
  20. log4j-web
  21. log4j-web

Analysis Log : Information and Warnings

Here are Logs emitted during JArchitect analysis.
The Warnings can reveal potential flaws concerning the health of the build process.
A particular warn can be disabled through the JArchitect interactive UI, panel Error List, tick the checkbox Disabled corresponding to the warn to disable.


Kind Message
Kind Message
Info08.02.2013 16:33:51 Begin full analysis with JArchitect v3.0.0
InfoNo Baseline for Comparison loaded.
InfoBytecode parsing
WarningOutput where classes are generated for project:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/log4j.iml not found, please check that the project was built
WarningOutput where classes are generated for project:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/api/log4j-api.iml not found, please check that the project was built
WarningOutput where classes are generated for project:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/core/log4j-core.iml not found, please check that the project was built
WarningOutput where classes are generated for project:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/dist/log4j-distribution.iml not found, please check that the project was built
WarningOutput where classes are generated for project:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/flume-ng/log4j-flume-ng.iml not found, please check that the project was built
WarningOutput where classes are generated for project:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/jcl-bridge/log4j-jcl.iml not found, please check that the project was built
WarningOutput where classes are generated for project:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/log4j12-api/log4j12-api.iml not found, please check that the project was built
WarningOutput where classes are generated for project:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/slf4j-impl/log4j-slf4j-impl.iml not found, please check that the project was built
WarningOutput where classes are generated for project:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/web/log4j-web.iml not found, please check that the project was built
WarningNo classes founds for project:log4j under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/target/classes; please check if the project was built
WarningNo classes founds for project:log4j-api under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/api/target/classes; please check if the project was built
WarningNo classes founds for project:log4j-api under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/api/target/classes; please check if the project was built
WarningNo classes founds for project:log4j-core under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/core/target/classes; please check if the project was built
WarningNo classes founds for project:log4j-core under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/core/target/classes; please check if the project was built
WarningNo classes founds for project:log4j-distribution under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/dist/target/classes; please check if the project was built
WarningNo classes founds for project:log4j-flume-ng under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/flume-ng/target/classes; please check if the project was built
WarningNo classes founds for project:log4j-flume-ng under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/flume-ng/target/classes; please check if the project was built
WarningNo classes founds for project:log4j-jcl under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/jcl-bridge/target/classes; please check if the project was built
WarningNo classes founds for project:log4j-jcl under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/jcl-bridge/target/classes; please check if the project was built
WarningNo classes founds for project:log4j-async under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/log4j-async/target/classes; please check if the project was built
WarningNo classes founds for project:log4j-to-slf4j under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/log4j-to-slf4j/target/classes; please check if the project was built
WarningNo classes founds for project:log4j-1.2-api under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/log4j12-api/target/classes; please check if the project was built
WarningNo classes founds for project:log4j12-api under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/log4j12-api/target/classes; please check if the project was built
WarningNo classes founds for project:flume-common under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/samples/flume-common/target/classes; please check if the project was built
WarningNo classes founds for project:flume-embedded under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/samples/flume-embedded/target/classes; please check if the project was built
WarningNo classes founds for project:flume-remote under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/samples/flume-remote/target/classes; please check if the project was built
WarningNo classes founds for project:log4j-slf4j-impl under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/slf4j-impl/target/classes; please check if the project was built
WarningNo classes founds for project:log4j-slf4j-impl under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/slf4j-impl/target/classes; please check if the project was built
WarningNo classes founds for project:log4j-web under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/web/target/classes; please check if the project was built
WarningNo classes founds for project:log4j-web under output directory:/Users/cy/Documents/Development/log4j2-trunk/log4j-trunk/web/target/classes; please check if the project was built
InfoThird Party parsing
InfoParsing Source Files
WarningSource code info won't be available : Some code metrics like CyclomaticComplexity,Comments,NBLineofCode won't be available. Source files directories could be added in the project properties panel
InfoNo dependency cycle detected in assemblies referencement graph.
Info08.02.2013 16:33:53 Analyse dependencies of your application.
Info08.02.2013 16:33:53 Building the report (standard).