To study pcms pegasus erp cargo management system-release-7 from architecture perspective.
1. Analytical Architecture Report
Application:
Pegasus ERP Cargo Management System is one of the software solutions for cargo industry, which is totally
integrated with Accounts. Designed by experts from cargo and software industry it provides one stop
solution for data entry and decision support. The implementation of detailed function level checks ensures
reliability & date integrity of system. The embedded security through appropriate Access Controls allows
complete control of user access and data manipulation.
www.comsoftusa.us
www.comsoftuae.com
DevelopmentEnvironment:[Release-7,WebVersion]
MicrosoftVisual Studio2010, .Net4.0, Silverlight4.0,InfragisticGUI Controls,SQLServer2008
Application Metrics
Number of IL instructions: 737591
Number of lines of code: 102123
Number of lines of comment: 45003
Percentage comment: 30
Number of assemblies: 3
Number of classes: 1824
Number of types: 1846
Number of abstract classes: 3
Number of interfaces: 8
Number of value types: 2
Number of exception classes: 2
Number of attribute classes: 1
Number of delegate classes: 0
Number of enumerations classes: 12
Number of generic type definitions: 3
Number of generic method definitions: 2
Percentage of public types: 88.68%
Percentage of public methods: 86.72%
Percentage of classes with at least one public field: 5.2%
Stat
#
Occurren
ces
Avg StdDev Max
Properties on
Interfaces
8
Interfaces
0 0
0 properties on
PCMS_SL.SRBusinessManager.IBusinessManager
Methods on
Interfaces
8
Interfaces
197.5 361.47
1042 methods on
PCMS_SL.SRBusinessManager.IBusinessManager
Arguments on
Methods on
Interfaces
1580
Methods
1.53 1.31
11 arguments on
PCMS_SL.SRBusinessManager.IBusinessManager.BeginDTOPos
tUnpostGetByFilters(Int32,Int32,Int32,DateTime,DateTime,B
oolean,Int16,Boolean,Boolean,AsyncCallback,Object)
Public
Properties on
1824
Classes
6.52 10.4
85 public properties on
Pegasus.BusinessObjects.ShippingLine.SHBLMaster
2. Classes
Public
Methods on
Classes
1824
Classes
17.96 59.75
2099 public methods on
PCMS_SL.SRBusinessManager.BusinessManagerClient
Arguments on
Public
Methods on
Classes
32767
Methods
0.8 2.05
57 arguments on
Pegasus.BusinessObjects.MultiFreight.MultiMBL..ctor(String,
String,String,Boolean,String,String,String,String,Boolean,Car
goType,RateType,Int32,Decimal,Decimal,Decimal,DateTime
,DateTime,String,String,String,FreightCategory,Client,Client
,Client,CurrencyRate,Decimal,String,String,Locations,String,
VesselMaster,String,String,String,Decimal,Units,Boolean,Stri
ng,Decimal,String,String,String,FreightType,ShippingLines,M
oduleMaster,Employees,String,MultiJobCard,IList,IList,IList,
Company,Boolean,Employees,DateTime,Employees,DateTim
e)
IL Instructions
in non-
abstract
Methods
38025
Methods
19.4 48.42
1868 IL instructions in
Pegasus.BusinessObjects.PRCI.PRCICosting.getAllCosting(ISe
ssion,Int32,Int32,FreightType,ModuleMaster,Int32,Int32)
Cyclomatic
complexity on
non abstract
Methods
38025
Methods
1.93 4.64
CC = 156 for
PCMS_SL.Web.DTOBusinessObjects.DTOTMS.DTOTraTrip.Con
vertFromDTOTraTrip(ObservableCollection<DTOTraTrip>,ISe
ssion)
Assemblies Metrics
Assembly
#
Typ
es
#
Abstr
act
Type
s
# IL
instruc
tion
#
line
s of
cod
e
#
lines
of
comm
ent
%
comm
ent
Affer
ent
Coupl
ing
Effer
ent
Coupl
ing
Relati
onal
Cohesi
on
Instabi
lity
Abstract
ness
Dista
nce
Pegasus.Co
ntrols
v1.0.0.0
9 1 2524 428 162 27 93 22 0.89 0.19 0.11 0.7
PCMS-SL
v1.0.0.0
114
3
2 421862
557
56
6515 10 0 199 3.45 1 0 0
PCMS-
SL.Web
v1.0.0.0
694 7 313205
459
39
38326 45 0 148 7.74 1 0.01 0.01
Visual NDepend View
7. Assemblies build order
Pegasus.Controls
PCMS-SL
PCMS-SL.Web
NDepend information and warnings
11/05/2010 09:38:55 Begin full analysis with NDepend v3.2.0
No Baseline for Comparison loaded.
Assemblies loaded from {C:WINDOWSMicrosoft.NETFrameworkv4.0.30319} mscorlib.dll v4.0.0.0
System.dll v4.0.0.0 System.ServiceModel.dll v4.0.0.0 System.Net.dll v4.0.0.0 System.Core.dll v4.0.0.0
Microsoft.VisualBasic.dll v10.0.0.0 System.Runtime.Serialization.dll v4.0.0.0 System.Data.dll v4.0.0.0
System.ServiceModel.Web.dll v4.0.0.0 System.Xml.dll v4.0.0.0 System.Web.dll v4.0.0.0
Assemblies loaded from {D:ShareMePCMS-SLApp-NewPCMS-SLBinDebug} PCMS-SL.dll v1.0.0.0
Pegasus.Controls.dll v1.0.0.0 System.Windows.Controls.Navigation.dll v2.0.5.0
System.Windows.Controls.dll v2.0.5.0 System.Windows.Controls.Data.Input.dll v2.0.5.0
Infragistics.Silverlight.XamWebComboEditor.v10.1.dll v10.1.20101.2081
Infragistics.Silverlight.XamWebGrid.v10.1.dll v10.1.20101.2081
Infragistics.Silverlight.XamWebRibbon.v10.1.dll v10.1.20101.2081
Infragistics.Silverlight.XamWebDialogWindow.v10.1.dll v10.1.20101.2081
Infragistics.Silverlight.XamWebTree.v10.1.dll v10.1.20101.2081
Infragistics.Silverlight.XamWebEditors.v10.1.dll v10.1.20101.2081 Infragistics.Silverlight.v10.1.dll
v10.1.20101.2081
Assemblies loaded from {D:ShareMePCMS-SLApp-NewPCMS-SL.Webbin} PCMS-SL.Web.dll v1.0.0.0
NHibernate.dll v2.1.0.4000
800 source files parsed ; all source files found ; all source files in-sync with PDB
0 CQL constraint has been extracted from code.
No dependency cycle detected in assemblies referencement graph.
11/05/2010 09:39:06 Analyse dependencies of your application.
11/05/2010 09:39:07 Building the report (standard).
WARNING: Cant' load the assembly {System.Windows}: Can't find the .NET assembly {System.Windows}
in specified folders. Has it been compiled properly? Is the NDepend project missing the containing
folder of the .NET assembly?
WARNING: Cant' load the assembly {System.Windows.Browser}: Can't find the .NET assembly
{System.Windows.Browser} in specified folders. Has it been compiled properly? Is the NDepend project
missing the containing folder of the .NET assembly?
WARNING: Assembly {System.Net} doesn't contain any type.
WARNING: No application or third party assembly found in directory
{C:WINDOWSMicrosoft.NETFrameworkv4.0.30319WPF}
WARNING: Assembly {System.Windows} is referenced by {PCMS-SL} but is not found.
WARNING: Assembly {System.Windows.Browser} is referenced by {PCMS-SL} but is not found.
WARNING: Assembly {System.Windows} is referenced by {Pegasus.Controls} but is not found.
CQL Queries and Constraints
{Code Quality} Some CQL constraints are not satisfied.
{Code Quality Type Metrics} Some CQL constraints are not satisfied.
{Code Quality from Now!} All CQL queries compile and all CQL contraints are satisfied.
8. {Design} Some CQL constraints are not satisfied.
{Design Performance} Some CQL constraints are not satisfied.
{Unused Code / Dead Code} Some CQL constraints are not satisfied.
{Encapsulation} Some CQL constraints are not satisfied.
{Encapsulation Methods Optimal Encapsulation} Some CQL constraints are not satisfied.
{Encapsulation Types Optimal Encapsulation} Some CQL constraints are not satisfied.
{Encapsulation Fields Optimal Encapsulation} Some CQL constraints are not satisfied.
{Diff / Changes / Evolution} All CQL queries compile and all CQL contraints are satisfied.
{Diff / Changes / Evolution API Breaking Changes} All CQL queries compile and all CQL contraints
are satisfied.
{Test Coverage} Some CQL constraints are not satisfied.
{Purity / Immutability / Side-Effects} Some CQL constraints are not satisfied.
{Naming Conventions} Some CQL constraints are not satisfied.
{Naming Conventions Name too long} Some CQL constraints are not satisfied.
{Constraints extracted from Source Code} No active CQL query compiled.
WARNING: The following CQL constraint is not satisfied. 10 methods on 40132 tested match the
condition. --> Group {Code Quality}
// <Name>Quick summary of methods to refactor</Name>
WARN IF Count > 0 IN SELECT
TOP 10 METHODS /*OUT OF "YourGeneratedCode" */ WHERE
// Metrics' definitions
( NbLinesOfCode > 30 OR // http://www.ndepend.com/Metrics.aspx#Nb
LinesOfCode
NbILInstructions > 200 OR // http://www.ndepend.com/Metrics.aspx#Nb
ILInstructions
CyclomaticComplexity > 20 OR // http://www.ndepend.com/Metrics.aspx#CC
ILCyclomaticComplexity > 50 OR // http://www.ndepend.com/Metrics.aspx#IL
CC
ILNestingDepth > 4 OR // http://www.ndepend.com/Metrics.aspx#IL
NestingDepth
NbParameters > 5 OR // http://www.ndepend.com/Metrics.aspx#Nb
Parameters
NbVariables > 8 OR // http://www.ndepend.com/Metrics.aspx#Nb
Variables
NbOverloads > 6 ) // http://www.ndepend.com/Metrics.aspx#Nb
Overloads
AND
// Here are some ways to avoid taking account of generated methods.
!( NameIs "InitializeComponent()" OR
// NDepend.CQL.GeneratedAttribute is defined in
// the redistributable assembly $NDependInstallDir$LibNDepend.CQL.dll
// You can define your own attribute to mark "Generated".
HasAttribute "OPTIONAL:NDepend.CQL.GeneratedAttribute")
methods
#
li
n
e
s
o
f
c
# IL
inst
ruct
ions
Cyc
lom
atic
Co
mpl
exit
y
(CC
IL
Cyc
lom
atic
Co
mpl
exit
y
IL
N
es
ti
ng
D
ep
th
#
Par
am
ete
rs
#
Va
ria
ble
s
#
Ov
erl
oa
ds
Full Name
10. 1.
6
21 7
Variance:
2
0
0
5
0
332
176
453
.41
440
.49
7.
41
7.1
6
11.
16
0
WARNING: The following CQL constraint is not satisfied. 10 methods on 40132 tested match the
condition. --> Group {Code Quality}
// <Name>Methods too big (NbLinesOfCode)</Name>
WARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE
NbLinesOfCode > 30
ORDER BY NbLinesOfCode DESC
// METHODS WHERE NbLinesOfCode > 30 are extremely complex
// and should be split in smaller methods
// (except if they are automatically generated by a tool).
// See the definition of the NbLinesOfCode metric here
// http://www.ndepend.com/Metrics.aspx#NbLinesOfCode
methods
#
li
n
e
s
o
f
c
o
d
e
(
L
O
C
)
Full Name
SetPageMenuSettingsForGalleryTool(G
alleryTool)
4
0
7
PCMS_SL.MainPCMS.SetPageMenuSettingsForGalleryTool(Gall
eryTool)
SetPageMenuSettingsForButtonTool(B
uttonTool)
3
6
2
PCMS_SL.MainPCMS.SetPageMenuSettingsForButtonTool(Butt
onTool)
getAllCosting(ISession,Int32,Int32,Frei
ghtType,ModuleMaster,Int32,Int32)
3
3
4
Pegasus.BusinessObjects.PRCI.PRCICosting.getAllCosting(ISes
sion,Int32,Int32,FreightType,ModuleMaster,Int32,Int32)
DTOVoucherSaveUpdate(ISession,DTO
Voucher,IList<DTOVoucherDetails>,ILi
st<DTOVoucherDetails>,IList<DTOVou
cherDetails>)
1
8
0
PCMS_SL.Web.DTOBusinessObjects.DTOGeneral.DTOAccount
s.DTOVoucher.DTOVoucherSaveUpdate(ISession,DTOVoucher
,IList<DTOVoucherDetails>,IList<DTOVoucherDetails>,IList<D
TOVoucherDetails>)
xamDGCustomerWiseRateMaster_Cell 1 PCMS_SL.ViewManager.Masters.Central.CustomerWiseRateM
12. // METHODS WHERE NbILInstructions > 200 are extremely complex
// and should be split in smaller methods
// (except if they are automatically generated by a tool).
// See the definition of the NbILInstructions metric here
// http://www.ndepend.com/Metrics.aspx#NbILInstructions
methods
#
IL
ins
tru
cti
ons
Full Name
getAllCosting(ISession,Int32,Int32,Fre
ightType,ModuleMaster,Int32,Int32)
1
868
Pegasus.BusinessObjects.PRCI.PRCICosting.getAllCosting(ISe
ssion,Int32,Int32,FreightType,ModuleMaster,Int32,Int32)
SetPageMenuSettingsForGalleryTool(
GalleryTool)
1
760
PCMS_SL.MainPCMS.SetPageMenuSettingsForGalleryTool(Gal
leryTool)
SetPageMenuSettingsForButtonTool(B
uttonTool)
1
477
PCMS_SL.MainPCMS.SetPageMenuSettingsForButtonTool(But
tonTool)
CheckGrid()
1
315
PCMS_SL.ViewManager.TMS.TMSJobCard.CheckGrid()
DTOVoucherSaveUpdate(ISession,DTO
Voucher,IList<DTOVoucherDetails>,IL
ist<DTOVoucherDetails>,IList<DTOVo
ucherDetails>)
1
187
PCMS_SL.Web.DTOBusinessObjects.DTOGeneral.DTOAccoun
ts.DTOVoucher.DTOVoucherSaveUpdate(ISession,DTOVouch
er,IList<DTOVoucherDetails>,IList<DTOVoucherDetails>,IList
<DTOVoucherDetails>)
xamDGRateMaster_CellEnteredEditM
ode(Object,EditingCellEventArgs)
976
PCMS_SL.ViewManager.Masters.Central.RateMaster.xamDGR
ateMaster_CellEnteredEditMode(Object,EditingCellEventArg
s)
xamDGCustomerWiseRateMaster_Cell
EnteredEditMode(Object,EditingCellE
ventArgs)
976
PCMS_SL.ViewManager.Masters.Central.CustomerWiseRateM
aster.xamDGCustomerWiseRateMaster_CellEnteredEditMode
(Object,EditingCellEventArgs)
EnableDisableControls(Boolean) 921
PCMS_SL.ViewManager.TMS.TMSJobCard.EnableDisableCont
rols(Boolean)
GetWHSARacksAndLocations(WHMast
er)
904
Pegasus.BusinessObjects.Warehouse.WHSARack.GetWHSARa
cksAndLocations(WHMaster)
ConvertFromDTOTraTrip(ObservableC
ollection<DTOTraTrip>,ISession)
891
PCMS_SL.Web.DTOBusinessObjects.DTOTMS.DTOTraTrip.Co
nvertFromDTOTraTrip(ObservableCollection<DTOTraTrip>,I
Session)
Sum:
12
275
Average:
1
227
Minimum: 891
Maximum:
1
868
Standard deviation:
346
.94
Variance:
120
367
13. WARNING: The following CQL constraint is not satisfied. 10 methods on 40132 tested match the
condition. --> Group {Code Quality}
// <Name>Methods too complex (CyclomaticComplexity)</Name>
WARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE
CyclomaticComplexity > 20
ORDER BY CyclomaticComplexity DESC
// METHODS WHERE CyclomaticComplexity > 15 are hard to understand and maintai
n.
// METHODS WHERE CyclomaticComplexity > 30 are extremely complex
// and should be split in smaller methods
// (except if they are automatically generated by a tool).
// See the definition of the CyclomaticComplexity metric here
// http://www.ndepend.com/Metrics.aspx#CC
methods
Cycl
oma
tic
Co
mpl
exit
y
(CC)
Full Name
ConvertFromDTOTraTrip(Obser
vableCollection<DTOTraTrip>,I
Session)
110
PCMS_SL.Web.DTOBusinessObjects.DTOTMS.DTOTraTrip.Convert
FromDTOTraTrip(ObservableCollection<DTOTraTrip>,ISession)
ConvertFromDTOTraTrip(IList<
DTOTraTrip>,ISession)
110
PCMS_SL.Web.DTOBusinessObjects.DTOTMS.DTOTraTrip.Convert
FromDTOTraTrip(IList<DTOTraTrip>,ISession)
ConvertFromDTOTraTrip(DTOTr
aTrip,ISession)
109
PCMS_SL.Web.DTOBusinessObjects.DTOTMS.DTOTraTrip.Convert
FromDTOTraTrip(DTOTraTrip,ISession)
ConvertFromDTOCustomerWise
RateMaster(DTOCustomerWise
RateMaster,ISession)
99
PCMS_SL.Web.DTOBusinessObjects.DTOGeneral.DTOMain.DTOCu
stomerWiseRateMaster.ConvertFromDTOCustomerWiseRateMaste
r(DTOCustomerWiseRateMaster,ISession)
ConvertFromDTORateMaster(D
TORateMaster,ISession)
94
PCMS_SL.Web.DTOBusinessObjects.DTOGeneral.DTOMain.DTORat
eMaster.ConvertFromDTORateMaster(DTORateMaster,ISession)
ConvertFromDTOTraTripShiftin
g(DTOTraTripShifting,ISession)
89
PCMS_SL.Web.DTOBusinessObjects.DTOTMS.DTOTraTripShifting.
ConvertFromDTOTraTripShifting(DTOTraTripShifting,ISession)
EnableDisableControls(Boolean
)
87
PCMS_SL.ViewManager.TMS.TMSJobCard.EnableDisableControls(B
oolean)
SetDefaultValues(ISession) 86
Pegasus.BusinessObjects.SLParentClass<T>.SetDefaultValues(ISes
sion)
CheckGrid() 85 PCMS_SL.ViewManager.Masters.Central.RateMaster.CheckGrid()
CheckGrid() 85
PCMS_SL.ViewManager.Masters.Central.CustomerWiseRateMaster
.CheckGrid()
Sum: 954
Average: 95.4
Minimum: 85
14. Maximum: 110
Standard deviation:
10.2
1
Variance:
104.
24
WARNING: The following CQL constraint is not satisfied. 10 methods on 40132 tested match the
condition. --> Group {Code Quality}
// <Name>Methods too complex (ILCyclomaticComplexity)</Name>
WARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE
ILCyclomaticComplexity > 40
ORDER BY ILCyclomaticComplexity DESC
// METHODS WHERE ILCyclomaticComplexity > 20
// are hard to understand and maintain.
// METHODS WHERE ILCyclomaticComplexity > 40
// are extremely complex and should be split
// in smaller methods
// (except if they are automatically generated by a tool).
// See the definition of the ILCyclomaticComplexity metric here
// http://www.ndepend.com/Metrics.aspx#ILCC
methods
IL
Cycl
oma
tic
Co
mpl
exit
y
(ILC
C)
Full Name
ConvertFromDTOTraTrip(IList<D
TOTraTrip>,ISession)
156
PCMS_SL.Web.DTOBusinessObjects.DTOTMS.DTOTraTrip.Conver
tFromDTOTraTrip(IList<DTOTraTrip>,ISession)
ConvertFromDTOTraTrip(Observ
ableCollection<DTOTraTrip>,ISe
ssion)
156
PCMS_SL.Web.DTOBusinessObjects.DTOTMS.DTOTraTrip.Conver
tFromDTOTraTrip(ObservableCollection<DTOTraTrip>,ISession)
ConvertFromDTOTraTrip(DTOTr
aTrip,ISession)
152
PCMS_SL.Web.DTOBusinessObjects.DTOTMS.DTOTraTrip.Conver
tFromDTOTraTrip(DTOTraTrip,ISession)
ConvertFromDTOCustomerWiseR
ateMaster(DTOCustomerWiseRat
eMaster,ISession)
138
PCMS_SL.Web.DTOBusinessObjects.DTOGeneral.DTOMain.DTOC
ustomerWiseRateMaster.ConvertFromDTOCustomerWiseRateMas
ter(DTOCustomerWiseRateMaster,ISession)
ConvertFromDTORateMaster(DT
ORateMaster,ISession)
131
PCMS_SL.Web.DTOBusinessObjects.DTOGeneral.DTOMain.DTOR
ateMaster.ConvertFromDTORateMaster(DTORateMaster,ISession)
EnableDisableControls(Boolean) 125
PCMS_SL.ViewManager.TMS.TMSJobCard.EnableDisableControls(
Boolean)
ConvertFromDTOTraTripShifting
(DTOTraTripShifting,ISession)
122
PCMS_SL.Web.DTOBusinessObjects.DTOTMS.DTOTraTripShifting.
ConvertFromDTOTraTripShifting(DTOTraTripShifting,ISession)
ConvertFromDTOTraJobcardMas 117 PCMS_SL.Web.DTOBusinessObjects.DTOTMS.DTOTraJobcardMast
18. 2
4
WARNING: The following CQL constraint is not satisfied. 10 methods on 40132 tested match the
condition. --> Group {Code Quality}
// <Name>Methods with too many parameters (NbParameters)</Name>
WARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE
NbParameters > 5
ORDER BY NbParameters DESC
// METHODS WHERE NbParameters > 5 might be painful to call
// and might degrade performance. You should prefer using
// additional properties/fields to the declaring type to
// handle numerous states. Another alternative is to provide
// a class or structure dedicated to handle arguments passing
// (for example see the class System.Diagnostics.ProcessStartInfo
// and the method System.Diagnostics.Process.Start(ProcessStartInfo))
// See the definition of the NbParameters metric here
// http://www.ndepend.com/Metrics.aspx#NbParameters
methods
#
P
a
r
a
m
e
t
e
r
s
Full Name
.ctor(String,String,String,Boolean,String,String,St
ring,String,Boolean,CargoType,RateType,Int32,D
ecimal,Decimal,Decimal,DateTime,DateTime,Stri
ng,String,String,FreightCategory,Client,Client,Cli
ent,CurrencyRate,Decimal,String,String,Locations
,String,VesselMaster,String,String,String,Decimal,
Units,Boolean,String,Decimal,String,String,String,
FreightType,ShippingLines,ModuleMaster,Employ
ees,String,SeaJobCard,SeaMBL,IList,IList,Compan
y,Boolean,Employees,DateTime,Employees,DateT
ime)
5
7
Pegasus.BusinessObjects.SeaFreight.SeaHBL..ctor
(String,String,String,Boolean,String,String,String,
String,Boolean,CargoType,RateType,Int32,Decim
al,Decimal,Decimal,DateTime,DateTime,String,St
ring,String,FreightCategory,Client,Client,Client,C
urrencyRate,Decimal,String,String,Locations,Strin
g,VesselMaster,String,String,String,Decimal,Units
,Boolean,String,Decimal,String,String,String,Freig
htType,ShippingLines,ModuleMaster,Employees,St
ring,SeaJobCard,SeaMBL,IList,IList,Company,Bool
ean,Employees,DateTime,Employees,DateTime)
.ctor(String,String,String,Boolean,String,String,St
ring,String,Boolean,CargoType,RateType,Int32,D
ecimal,Decimal,Decimal,DateTime,DateTime,Stri
ng,String,String,FreightCategory,Client,Client,Cli
ent,CurrencyRate,Decimal,String,String,Locations
,String,VesselMaster,String,String,String,Decimal,
Units,Boolean,String,Decimal,String,String,String,
FreightType,ShippingLines,ModuleMaster,Employ
ees,String,CnFJobCard,CnFMBL,IList,IList,Compan
y,Boolean,Employees,DateTime,Employees,DateT
ime)
5
7
Pegasus.BusinessObjects.CnF.CnFHBL..ctor(String
,String,String,Boolean,String,String,String,String,
Boolean,CargoType,RateType,Int32,Decimal,Deci
mal,Decimal,DateTime,DateTime,String,String,St
ring,FreightCategory,Client,Client,Client,Currenc
yRate,Decimal,String,String,Locations,String,Vess
elMaster,String,String,String,Decimal,Units,Boole
an,String,Decimal,String,String,String,FreightTyp
e,ShippingLines,ModuleMaster,Employees,String,
CnFJobCard,CnFMBL,IList,IList,Company,Boolean,
Employees,DateTime,Employees,DateTime)
21. 3
6
3
Variance:
2
.
3
6
0
1
WARNING: The following CQL constraint is not satisfied. 10 methods on 40132 tested match the
condition. --> Group {Code Quality}
// <Name>Methods with too many local variables (NbVariables)</Name>
WARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE
NbVariables > 15
ORDER BY NbVariables DESC
// METHODS WHERE NbVariables > 8 are hard to understand and maintain.
// METHODS WHERE NbVariables > 15 are extremely complex
// and should be split in smaller methods
// (except if they are automatically generated by a tool).
// See the definition of the Nbvariables metric here
// http://www.ndepend.com/Metrics.aspx#Nbvariables
methods
#
Varia
bles
Full Name
GetWHSARacksAndLocations(WHMa
ster)
27
Pegasus.BusinessObjects.Warehouse.WHSARack.GetWHSARa
cksAndLocations(WHMaster)
getSearchList(Type,Boolean) 26
Pegasus.BusinessObjects.ParentClass<T>.getSearchList(Typ
e,Boolean)
getSearchList(Type) 26
Pegasus.BusinessObjects.ParentClass<T>.getSearchList(Typ
e)
getSearchList(Boolean,String) 26
Pegasus.BusinessObjects.General.ParentObjects.Freight.Jo
bCard.getSearchList(Boolean,String)
getSearchListForAllCargo(Type,Bool
ean)
26
Pegasus.BusinessObjects.ParentClass<T>.getSearchListForAl
lCargo(Type,Boolean)
getSearchList(Type,ISession) 25
Pegasus.BusinessObjects.SLParentClass<T>.getSearchList(Ty
pe,ISession)
getSearchListForAllCargo(Type,Bool
ean,ISession)
25
Pegasus.BusinessObjects.SLParentClass<T>.getSearchListFor
AllCargo(Type,Boolean,ISession)
getSearchList(Type,Boolean,ISessio
n)
25
Pegasus.BusinessObjects.SLParentClass<T>.getSearchList(Ty
pe,Boolean,ISession)
xamDG_CellExitingEditMode(Object
,ExitEditingCellEventArgs)
24
PCMS_SL.ViewManager.Accounts.Voucher.xamDG_CellExitin
gEditMode(Object,ExitEditingCellEventArgs)
getList(Object[,],String) 24
Pegasus.BusinessObjects.ParentClass<T>.getList(Object[,],S
tring)
Sum: 254
22. Average: 25.4
Minimum: 24
Maximum: 27
Standard deviation:
0.916
53
Variance:
0.840
02
WARNING: The following CQL constraint is not satisfied. 10 methods on 40132 tested match the
condition. --> Group {Code Quality}
// <Name>Methods with too many overloads (NbOverloads)</Name>
WARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE
NbOverloads > 6
ORDER BY NbOverloads DESC
// METHODS WHERE NbOverloads > 6 might
// be a problem to maintain and provoke higher coupling
// than necessary.
// This might also reveal a potential misused of the
// C# and VB.NET language that since C#3 and VB9 support
// object initialization. This feature helps reducing the number
// of constructors of a class.
// See the definition of the NbOverloads metric here
// http://www.ndepend.com/Metrics.aspx#NbOverloads
methods
#
Overl
oads
Full Name
Validate(ArrayList,ArrayList,String,
Nullable<Int16>,ISession)
7
Pegasus.BusinessObjects.SLParentClass<T>.Validate(ArrayLi
st,ArrayList,String,Nullable<Int16>,ISession)
Validate(ArrayList,String,Nullable<
Int32>,ISession)
7
Pegasus.BusinessObjects.SLParentClass<T>.Validate(ArrayLi
st,String,Nullable<Int32>,ISession)
Validate(ArrayList,ArrayList,String,
Nullable<Int32>,ISession)
7
Pegasus.BusinessObjects.SLParentClass<T>.Validate(ArrayLi
st,ArrayList,String,Nullable<Int32>,ISession)
Validate(String,String,String,Nulla
ble<Int32>,ISession)
7
Pegasus.BusinessObjects.SLParentClass<T>.Validate(String,S
tring,String,Nullable<Int32>,ISession)
Validate(ISession) 7
Pegasus.BusinessObjects.SLParentClass<T>.Validate(ISession
)
Validate(String,String,ISession) 7
Pegasus.BusinessObjects.SLParentClass<T>.Validate(String,S
tring,ISession)
Validate(String,String,String,Nulla
ble<Int16>,ISession)
7
Pegasus.BusinessObjects.SLParentClass<T>.Validate(String,S
tring,String,Nullable<Int16>,ISession)
Validate(ArrayList,ArrayList,String,
Nullable<Int16>)
7
Pegasus.BusinessObjects.ParentClass<T>.Validate(ArrayList,
ArrayList,String,Nullable<Int16>)
Validate(ArrayList,String,Nullable<
Int32>)
7
Pegasus.BusinessObjects.ParentClass<T>.Validate(ArrayList,
String,Nullable<Int32>)
Validate(ArrayList,ArrayList,String, 7 Pegasus.BusinessObjects.ParentClass<T>.Validate(ArrayList,
23. Nullable<Int32>) ArrayList,String,Nullable<Int32>)
Sum: 70
Average: 7
Minimum: 7
Maximum: 7
Standard deviation: 0
Variance: 0
WARNING: The following CQL constraint is not satisfied. 10 types on 2145 tested match the
condition. --> Group {Code Quality Type Metrics}
// <Name>Types with too many methods</Name>
WARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE
NbMethods > 20
ORDER BY NbMethods DESC
// TYPES WHERE NbMethods > 20 might be hard to
// understand and maintain
// but there might be cases where it is relevant
// to have a high value for NbMethods.
// For example, the System.Windows.Forms.DataGridView
// standard class has more than 1000 methods.
// See the definition of the NbMethods metric here
// http://www.ndepend.com/Metrics.aspx#NbMethods
types
#
Meth
ods
Full Name
BusinessManagerClient 4 711 PCMS_SL.SRBusinessManager.BusinessManagerClient
BusinessManagerClient+BusinessMana
gerClientChannel
1 043
PCMS_SL.SRBusinessManager.BusinessManagerClient+Busi
nessManagerClientChannel
IBusinessManager 1 042 PCMS_SL.SRBusinessManager.IBusinessManager
BusinessManager 523 PCMS_SL.Web.BusinessManagers.BusinessManager
IBusinessManager 521 PCMS_SL.Web.BusinessManagers.IBusinessManager
SHHBLMaster 176 Pegasus.BusinessObjects.ShippingLine.SHHBLMaster
NVBLMaster 176 Pegasus.BusinessObjects.NVOCC.NVBLMaster
SHBLMaster 176 Pegasus.BusinessObjects.ShippingLine.SHBLMaster
NVHBLMaster 176 Pegasus.BusinessObjects.NVOCC.NVHBLMaster
NVJobCardHead 159 Pegasus.BusinessObjects.NVOCC.NVJobCardHead
Sum: 8 703
Average: 870.3
Minimum: 159
Maximum: 4 711
Standard deviation: 1 322
24. Variance:
1 748
706
WARNING: The following CQL constraint is not satisfied. 10 types on 2145 tested match the
condition. --> Group {Code Quality Type Metrics}
// <Name>Types with too many fields</Name>
WARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE
NbFields > 20 AND
!IsEnumeration
ORDER BY NbFields DESC
// TYPES WHERE NbFields > 20 AND !IsEnumeration
// might be hard to understand and maintain
// but there might be cases where it is relevant
// to have a high value for NbFields.
// For example, the System.Windows.Forms.Control
// standard class has more than 200 fields.
// The value of the metric NbFields might be a better
// indicator of complex type.
// See the definition of the NbFields metric here
// http://www.ndepend.com/Metrics.aspx#NbFields
types # Fields Full Name
BusinessManagerClient 2 092 PCMS_SL.SRBusinessManager.BusinessManagerClient
TMSJobCard 88 PCMS_SL.ViewManager.TMS.TMSJobCard
TMSVehicle 87 PCMS_SL.ViewManager.Masters.TMS.TMSVehicle
MainPCMS 87 PCMS_SL.MainPCMS
SHBLMaster 85 Pegasus.BusinessObjects.ShippingLine.SHBLMaster
NVHBLMaster 85 Pegasus.BusinessObjects.NVOCC.NVHBLMaster
SHHBLMaster 85 Pegasus.BusinessObjects.ShippingLine.SHHBLMaster
NVBLMaster 85 Pegasus.BusinessObjects.NVOCC.NVBLMaster
PRCICustomerFeedback 82 PCMS_SL.ViewManager.PRCI.PRCICustomerFeedback
TMSQuotation 81 PCMS_SL.ViewManager.TMS.TMSQuotation
Sum: 2 857
Average: 285.7
Minimum: 81
Maximum: 2 092
Standard deviation: 602.1
Variance: 362 528
WARNING: The following CQL constraint is not satisfied. 10 types on 2145 tested match the
condition. --> Group {Code Quality Type Metrics}
// <Name>Types with poor cohesion (LCOM)</Name>
WARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE
LCOM > 0.8 AND
25. NbFields > 10 AND
NbMethods >10
ORDER BY LCOM DESC
// TYPES WHERE LCOM > 0.8 AND NbFields > 10
// AND NbMethods >10 might be problematic.
// However, it is very hard to avoid such
// non-cohesive types. The LCOMHS metric
// is often considered as more efficient to
// detect non-cohesive types.
// See the definition of the LCOM metric here
// http://www.ndepend.com/Metrics.aspx#LCOM
types
Lack of
Cohesion
Of
Methods
(LCOM)
#
Fields
#
Method
s
Full Name
BusinessManagerClien
t
0.99968 2 092 4 711 PCMS_SL.SRBusinessManager.BusinessManagerClient
NVHBLMaster 0.98864 85 176 Pegasus.BusinessObjects.NVOCC.NVHBLMaster
SHBLMaster 0.98864 85 176 Pegasus.BusinessObjects.ShippingLine.SHBLMaster
NVBLMaster 0.98864 85 176 Pegasus.BusinessObjects.NVOCC.NVBLMaster
SHHBLMaster 0.98864 85 176 Pegasus.BusinessObjects.ShippingLine.SHHBLMaster
NVJobCardHead 0.98742 75 159 Pegasus.BusinessObjects.NVOCC.NVJobCardHead
SHJobCardHead 0.98734 75 158
Pegasus.BusinessObjects.ShippingLine.SHJobCardHe
ad
FlightJobCard 0.98592 67 142 Pegasus.BusinessObjects.FlightCargo.FlightJobCard
WHJobCardHead 0.98148 50 108
Pegasus.BusinessObjects.Warehouse.WHJobCardHea
d
FlightMAWB 0.97959 44 98 Pegasus.BusinessObjects.FlightCargo.FlightMAWB
Sum: 9.876 2 743 6 080
Average: 0.9876 274.3 608
Minimum: 0.97959 44 98
Maximum: 0.99968 2 092 4 711
Standard deviation:
0.005014
9
606.0
6
1 367
Variance:
2.5149E-
05
367
313
1 871
246
WARNING: The following CQL constraint is not satisfied. 10 types on 2145 tested match the
condition. --> Group {Code Quality Type Metrics}
// <Name>Types with poor cohesion (LCOMHS)</Name>
WARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE
LCOMHS > 0.95 AND
NbFields > 10 AND
NbMethods >10
26. ORDER BY LCOMHS DESC
// TYPES WHERE LCOMHS > 1.0 AND NbFields > 10 AND
// NbMethods >10 should be avoided.
// Note that this constraint is stronger
// than the constraint
// TYPES WHERE LCOM > 0.8 AND NbFields > 10 AND NbMethods >10.
// See the definition of the LCOMHS metric here
// http://www.ndepend.com/Metrics.aspx#LCOMHS
types
LCOM
Henderson
-Sellers
(LCOMHS)
#
Fields
#
Method
s
Full Name
BusinessManagerClie
nt
0.99989 2 092 4 711
PCMS_SL.SRBusinessManager.BusinessManagerClien
t
SHHBLMaster 0.99429 85 176
Pegasus.BusinessObjects.ShippingLine.SHHBLMaste
r
NVHBLMaster 0.99429 85 176 Pegasus.BusinessObjects.NVOCC.NVHBLMaster
SHBLMaster 0.99429 85 176 Pegasus.BusinessObjects.ShippingLine.SHBLMaster
NVBLMaster 0.99429 85 176 Pegasus.BusinessObjects.NVOCC.NVBLMaster
NVJobCardHead 0.99367 75 159 Pegasus.BusinessObjects.NVOCC.NVJobCardHead
SHJobCardHead 0.99363 75 158
Pegasus.BusinessObjects.ShippingLine.SHJobCardH
ead
FlightJobCard 0.99291 67 142 Pegasus.BusinessObjects.FlightCargo.FlightJobCard
WHJobCardHead 0.99065 50 108
Pegasus.BusinessObjects.Warehouse.WHJobCardHe
ad
FlightMAWB 0.98969 44 98 Pegasus.BusinessObjects.FlightCargo.FlightMAWB
Sum: 9.9376 2 743 6 080
Average: 0.99376 274.3 608
Minimum: 0.98969 44 98
Maximum: 0.99989 2 092 4 711
Standard deviation: 0.0025853
606.0
6
1 367
Variance:
6.683685E-
06
367
313
1 871
246
WARNING: The following CQL constraint is not satisfied. 2 assemblies on 25 tested match the
condition. --> Group {Design}
// <Name>Assembly should not contain namespaces dependency cycles</Name>
WARN IF Count > 0 IN SELECT TOP 10 ASSEMBLIES WHERE
ContainsNamespaceDependencyCycle
// Dependency cycles between namespaces must be avoided
// in order to have a levelized and comprehensive design.
// More info available on the screencast 'Reduce the complexity'
// http://s3.amazonaws.com/NDependOnlineDemos/NDependReducingComplexity_viewl
27. et_swf.html
// You can also read this article
// http://www.theserverside.net/tt/articles/showarticle.tss?id=ControllingDep
endencies
// For any assembly matched, to display internal namespaces dependency cycle(
s),
// just right-click the assembly and select:
// --> View internal Dependency Cycles on Graph ... or ...
// --> View internal Dependency Cycles on Matrix (Recommended)
// In the Matrix, dependency cycles are represented with red squares and bla
ck cells.
// To browse easily dependency cycles, the Matrix comes with the option:
// --> Display Direct and Indirect Dependencies
assemblies # lines of code (LOC) Full Name
PCMS-SL 55 756 PCMS-SL
PCMS-SL.Web 45 939 PCMS-SL.Web
Sum: 101 695
Average: 50 847
Minimum: 45 939
Maximum: 55 756
Standard deviation: 4 908
Variance: 24 093 344
WARNING: The following CQL constraint is not satisfied. 10 types on 1846 tested match the
condition. --> Group {Design}
// <Name>Type should not have too many responsabilities (Efferent Coupling)</
Name>
WARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE
TypeCe > 50
ORDER BY TypeCe DESC
// The Efferent Coupling (TypeCe) for a particular type is
// the number of types it directly depends on. Notice that
// types declared in third party assemblies are taken into account.
// Types that depends on too many others type (more than 50)
// are complex and have more than one responsability. They
// are good candidate for refactoring.
// More information available in this article:
// http://codebetter.com/blogs/patricksmacchia/archive/2008/02/15/code-
metrics-on-coupling-dead-code-design-flaws-and-re-engineering.aspx
types
Effere
nt
coupli
ng
(Type
Full Name
28. Ce)
BusinessManagerClient 772 PCMS_SL.SRBusinessManager.BusinessManagerClient
BusinessManager 314 PCMS_SL.Web.BusinessManagers.BusinessManager
IBusinessManager 239 PCMS_SL.Web.BusinessManagers.IBusinessManager
BusinessManagerClient+BusinessMana
gerClientChannel
238
PCMS_SL.SRBusinessManager.BusinessManagerClient+Busi
nessManagerClientChannel
IBusinessManager 237 PCMS_SL.SRBusinessManager.IBusinessManager
SLParentClass<T> 170 Pegasus.BusinessObjects.SLParentClass<T>
MainPCMS 145 PCMS_SL.MainPCMS
TMSJobCard 143 PCMS_SL.ViewManager.TMS.TMSJobCard
TMSQuotation 134 PCMS_SL.ViewManager.TMS.TMSQuotation
CustomerWiseRateMaster 118
PCMS_SL.ViewManager.Masters.Central.CustomerWiseRat
eMaster
Sum: 2 510
Average: 251
Minimum: 118
Maximum: 772
Standard deviation:
183.5
1
Variance:
33
675
WARNING: The following CQL constraint is not satisfied. 10 types on 2145 tested match the
condition. --> Group {Design}
// <Name>A stateless class or structure might be turned into a static type</N
ame>
WARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE
SizeOfInst ==0 AND
// For accuracy, this constraint doesn't take
// account of types that implement some interfaces.
// and classes that have a base class and don't
// derive directly from System.Object, or classes
// that have sub-classes children.
NbInterfacesImplemented == 0 AND
((IsClass AND DepthOfInheritance == 1
AND NbChildren == 0)
OR IsStructure) AND
!IsStatic AND
!IsGeneric
// this rule indicates stateless types that might
// eventually be turned into static classes.
// See the definition of the SizeOfInst metric here
// http://www.ndepend.com/Metrics.aspx#SizeOfInst
types Size of # Depth of # Full Name
29. instan
ce
interfaces
implement
ed
inheritan
ce
Childr
en
Message 0 0 1 0 Pegasus.Controls.Message
ArrayList 0 0 1 0 System.Collections.ArrayList
PCMSResource 0 0 1 0 PCMS_SL.PCMSResource
sGlobal 0 0 1 0 PCMS_SL.sGlobal
Resources 0 0 1 0 PCMS_SL.Properties.Resources
DynamicObjectBui
lder
0 0 1 0 PCMS.DS.DynamicObjectBuilder
DTOConverter 0 0 1 0
PCMS_SL.Web.DTOBusinessObjects.DTOC
onverter
clsNHiber 0 0 1 0 Pegasus.Common.clsNHiber
SuperGlobals 0 0 1 0 Pegasus.BusinessObjects.SuperGlobals
sGlobal 0 0 1 0 Pegasus.BusinessObjects.sGlobal
Sum: 0 0 10 0
Average: 0 0 1 0
Minimum: 0 0 1 0
Maximum: 0 0 1 0
Standard
deviation:
0 0 0 0
Variance: 0 0 0 0
WARNING: The following CQL constraint is not satisfied. 10 types on 2145 tested match the
condition. --> Group {Design}
// <Name>Class with no descendant should be sealed if possible</Name>
WARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE
IsClass AND
NbChildren ==0 AND
!IsSealed AND
!IsStatic
// AND !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.
ORDER BY NbLinesOfCode
types
#
Child
ren
#
line
s of
cod
e
(LO
C)
Full Name
DTOAllocationDetailIte 0 0 PCMS_SL.Web.DTOBusinessObjects.DTOGeneral.DTOAccounts.DTO
30. mSummary AllocationDetailItemSummary
DTOAccountWithEntity 0 0
PCMS_SL.Web.DTOBusinessObjects.DTOGeneral.DTOAccounts.DTO
AccountWithEntity
VourcherItem 0 0
PCMS_SL.Web.DTOBusinessObjects.DTOGeneral.DTOAccounts.Vou
rcherItem
DTOAllocationDetailBa
g
0 0
PCMS_SL.Web.DTOBusinessObjects.DTOGeneral.DTOAccounts.DTO
AllocationDetailBag
DTOPRCIInvoiceTaxTyp
e
0 0
PCMS_SL.Web.DTOBusinessObjects.DTOPRCI.DTOPRCIInvoiceTaxT
ype
TreeDataItem 0 0 PCMS_SL.ViewManager.Accounts.TreeDataItem
CargoEnquiryContainer
s
0 0 Pegasus.BusinessObjects.General.Cargo.CargoEnquiryContainers
AreaLocations 0 0 PCMS_SL.SRBusinessManager.AreaLocations
TreeDataItemCOA 0 0 PCMS_SL.ViewManager.Accounts.TreeDataItemCOA
ProductPieces 0 0 Pegasus.BusinessObjects.Warehouse.ProductPieces
Sum: 0 0
Average: 0 0
Minimum: 0 0
Maximum: 0 0
Standard deviation: 0 0
Variance: 0 0
WARNING: The following CQL constraint is not satisfied. 10 types on 2145 tested match the
condition. --> Group {Design}
// <Name>Classes that are candidate to be turned into Structures</Name>
WARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE
IsClass AND
!IsStatic AND
SizeOfInst > 0 AND
SizeOfInst <= 16 AND // Structure instance must not be too big,
// else it degrades performance.
NbChildren == 0 AND // Must not have children
DepthOfInheritance == 1 // Must derive directly from System.Object
// AND IsSealed <-- You might want to add this condition
// to restreint the set.
// AND IsImmutable <-- Structures should be immutable type.
// AND !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.
types
Size
of
insta
#
Childr
en
Depth
of
inherita
Full Name
31. nce nce
App+<>c__DisplayClass2 8 0 1 PCMS_SL.App+<>c__DisplayClass2
DTOPRCIInvoiceTaxType 12 0 1
PCMS_SL.SRBusinessManager.DTOPRCIInvoiceTax
Type
DTOTraImprovementOppert
unityCombo
16 0 1
PCMS_SL.SRBusinessManager.DTOTraImprovemen
tOppertunityCombo
DTOTraSituationTypeMaster
Combo
14 0 1
PCMS_SL.SRBusinessManager.DTOTraSituationTyp
eMasterCombo
DTOTraMultiPointMovement
Combo
12 0 1
PCMS_SL.SRBusinessManager.DTOTraMultiPointM
ovementCombo
DTOTraTripCombo 12 0 1 PCMS_SL.SRBusinessManager.DTOTraTripCombo
DTOTraTripShiftingCombo 12 0 1
PCMS_SL.SRBusinessManager.DTOTraTripShifting
Combo
DTOTraFlatMovementComb
o
12 0 1
PCMS_SL.SRBusinessManager.DTOTraFlatMoveme
ntCombo
DTOTraVehicleMovementCo
mbo
12 0 1
PCMS_SL.SRBusinessManager.DTOTraVehicleMove
mentCombo
DTOPDCClearanceUpdate 16 0 1
PCMS_SL.SRBusinessManager.DTOPDCClearanceU
pdate
Sum: 126 0 10
Average: 12.6 0 1
Minimum: 8 0 1
Maximum: 16 0 1
Standard deviation: 2.2 0 0
Variance: 4.84 0 0
WARNING: The following CQL constraint is not satisfied. 10 namespaces on 117 tested match the
condition. --> Group {Design}
// <Name>Avoid namespaces with few types</Name>
WARN IF Count > 0 IN SELECT TOP 10 NAMESPACES WHERE
NbTypes < 5
ORDER BY NbTypes ASC
// Make sure that there is a logical organization
// to each of your namespaces, and that there is a
// valid reason for putting types in a sparsely
// populated namespace. Namespaces should contain
// types that are used together in most scenarios.
// When their applications are mutually exclusive,
// types should be located in separate namespaces
namespaces
#
Type
s
Full Name
Pegasus.BusinessObjects.General.ShippingLines
.ISOCode
1
Pegasus.BusinessObjects.General.ShippingLines
.ISOCode
32. Pegasus.Common.Utilities 1 Pegasus.Common.Utilities
Pegasus.BusinessObjects.General.Inventory 1 Pegasus.BusinessObjects.General.Inventory
System.Collections 1 System.Collections
PCMS_SL.Properties 1 PCMS_SL.Properties
Pegasus.BusinessObjects.Job 2 Pegasus.BusinessObjects.Job
Pegasus.BusinessObjects.INV 2 Pegasus.BusinessObjects.INV
Pegasus.BusinessObjects.General.HRPayroll 2 Pegasus.BusinessObjects.General.HRPayroll
PCMS_SL.Web.DTOBusinessObjects 2 PCMS_SL.Web.DTOBusinessObjects
PCMS_SL.Web 2 PCMS_SL.Web
Sum: 15
Average: 1.5
Minimum: 1
Maximum: 2
Standard deviation: 0.5
Variance: 0.25
WARNING: The following CQL constraint is not satisfied. 10 types on 2145 tested match the
condition. --> Group {Design}
// <Name>Nested types should not be visible</Name>
WARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE
IsNested AND
!IsPrivate AND
!IsInFrameworkAssembly
// A nested type is a type declared within the
// scope of another type. Nested types are useful
// for encapsulating private implementation details
// of the containing type. Used for this purpose,
// nested types should not be externally visible.
// Do not use externally visible nested types for
// logical grouping or to avoid name collisions;
// instead, use namespaces.
types
#
line
s of
cod
e
(LO
C)
Full Name
Message+DialogResult N/A Pegasus.Controls.Message+DialogResult
Message+MessageBoxButtons N/A Pegasus.Controls.Message+MessageBoxButtons
Message+MessageBoxImage N/A Pegasus.Controls.Message+MessageBoxImage
Buttons+ButtonsMode N/A Pegasus.Controls.Buttons+ButtonsMode
sGlobal+pParams 0 PCMS_SL.sGlobal+pParams
33. TMSJobCard+CustomClass 1 PCMS_SL.ViewManager.TMS.TMSJobCard+CustomClass
TMSQuotation+CustomClass 1 PCMS_SL.ViewManager.TMS.TMSQuotation+CustomClass
TMSMultiPointMovement+CustomClas
s
1
PCMS_SL.ViewManager.TMS.TMSMultiPointMovement+Custo
mClass
TMSMultiPointMovement+CustomClas
sContainers
1
PCMS_SL.ViewManager.TMS.TMSMultiPointMovement+Custo
mClassContainers
TMSTrips+CustomClass 1 PCMS_SL.ViewManager.TMS.TMSTrips+CustomClass
Sum: 5
Average: 0.5
Minimum: 0
Maximum: 1
Standard deviation: 0.5
Variance: 0.25
WARNING: The following CQL constraint is not satisfied. 1 types on 2145 tested match the
condition. --> Group {Design}
// <Name>Avoid empty interfaces</Name>
WARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE
IsInterface AND
NbMethods == 0
// 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.
types # Methods Full Name
IBusinessManagerChannel 0 PCMS_SL.SRBusinessManager.IBusinessManagerChannel
Sum: 0
Average: 0
Minimum: 0
34. Maximum: 0
Standard deviation: 0
Variance: 0
WARNING: The following CQL constraint is not satisfied. 1 assemblies on 25 tested match the
condition. --> Group {Design}
// <Name>Assemblies with poor cohesion (RelationalCohesion)</Name>
WARN IF Count > 0 IN SELECT TOP 10 ASSEMBLIES WHERE
NbTypes > 20 AND // Relational Cohesion metrics is relevant only if there a
re several types
(RelationalCohesion < 1.5 OR
RelationalCohesion > 4.0)
// As classes inside an assembly should be strongly related,
// the cohesion should be high. On the other hand, a value
// which is too high may indicate over-coupling. A good range
// for RelationalCohesion is 1.5 to 4.0.
// See the definition of the RelationalCohesion metric here
// http://www.ndepend.com/Metrics.aspx#RelationalCohesion
assemblies # Types Relational cohesion Full Name
PCMS-SL.Web 694 7.7392 PCMS-SL.Web
Sum: 694 7.7392
Average: 694 7.7392
Minimum: 694 7.7392
Maximum: 694 7.7392
Standard deviation: 0 NaN
Variance: 0 -4.437898E-07
WARNING: The following CQL constraint is not satisfied. 10 types on 2145 tested match the
condition. --> Group {Design Performance}
// <Name>Instances size shouldn't be too big (SizeOfInst)</Name>
WARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE
SizeOfInst > 64
ORDER BY SizeOfInst DESC
// TYPES WHERE SizeOfInst > 64 might degrade performance
// (depending on the number of instances created at runtime)
// and might be hard to maintain. However it is not a rule
// since sometime there is no alternative (the size of
// instances of the System.Net.NetworkInformation.SystemIcmpV6Statistics
// standard class is 2064 bytes).
// See the definition of the SizeOfInst metric here
// http://www.ndepend.com/Metrics.aspx#SizeOfInst
types Size of instance Full Name
BusinessManagerClient 8 389 PCMS_SL.SRBusinessManager.BusinessManagerClient
MainPCMS 600 PCMS_SL.MainPCMS
35. TMSVehicle 592 PCMS_SL.ViewManager.Masters.TMS.TMSVehicle
TMSJobCard 577 PCMS_SL.ViewManager.TMS.TMSJobCard
PRCICustomerFeedback 573 PCMS_SL.ViewManager.PRCI.PRCICustomerFeedback
TMSQuotation 553 PCMS_SL.ViewManager.TMS.TMSQuotation
TMSTrips 536 PCMS_SL.ViewManager.TMS.TMSTrips
Invoice 520 PCMS_SL.ViewManager.PRCI.Invoice
TMSInquiry 508 PCMS_SL.ViewManager.TMS.TMSInquiry
Client 501 PCMS_SL.ViewManager.Masters.Main.Client
Sum: 13 349
Average: 1 334
Minimum: 501
Maximum: 8 389
Standard deviation: 2 351
Variance: 5 530 002
WARNING: The following CQL constraint is not satisfied. 381 types on 2145 tested match the
condition. --> Group {Design Performance}
// <Name>Boxing/unboxing should be avoided (Type)</Name>
WARN IF Percentage > 5 IN SELECT TYPES WHERE
IsUsingBoxing OR
IsUsingUnboxing
// Thanks to generics, boxing and unboxing should be rare.
types # lines of code (LOC) Full Name
Sum: 54 962
Average: 144.26
Minimum: 4
Maximum: 8 807
Standard deviation: 542.51
Variance: 294 320
WARNING: The following CQL constraint is not satisfied. 1 types on 2145 tested match the
condition. --> Group {Design Performance}
// <Name>Attribute classes should be sealed</Name>
WARN IF Count > 0 IN SELECT TYPES WHERE
IsAttributeClass AND
!IsSealed AND
!IsAbstract AND
IsPublic AND
!IsInFrameworkAssembly
// The .NET Framework class library provides methods
// for retrieving custom attributes. By default,
36. // these methods search the attribute inheritance
// hierarchy; for example System.Attribute.GetCustomAttribute
// searches for the specified attribute type, or any
// attribute type that extends the specified attribute
// type. Sealing the attribute eliminates the search
// through the inheritance hierarchy, and can improve
// performance.
types
#
line
s of
cod
e
(LO
C)
Full Name
ReferencePreservingDataContractFo
rmatAttribute
4
PCMS_SL.Web.BusinessManagers.ReferencePreservingDataCo
ntractFormatAttribute
Sum: 4
Average: 4
Minimum: 4
Maximum: 4
Standard deviation: 0
Variance: 0
WARNING: The following CQL constraint is not satisfied. 10 methods on 39605 tested match the
condition. --> Group {Unused Code / Dead Code}
// <Name>Potentially unused methods</Name>
WARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE
MethodCa == 0 AND // Ca=0 -> No Afferent Coupling ->
// The method is not used in the
// context of this application.
!IsPublic AND // Public methods might be used by
// client applications of your assemblies.
!IsEntryPoint AND // Main() method is not used by-design.
!IsExplicitInterfaceImpl // The IL code never explicitely
AND // calls explicit interface methods
// implementation.
!IsClassConstructor AND // The IL code never explicitely
// calls class constructors.
!IsFinalizer // The IL code never explicitely
// calls finalizers.
methods
Affere
nt
coupli
ng
(Metho
Full Name
38. !NameIs "value__" // Field named 'value__' are relative
// to enumerations and the IL code
// never explicitely uses them.
fields
Afferent
coupling
(FieldCa
)
Full Name
dtObjects 0 PCMS_SL.LoginScreen.dtObjects
s 0 PCMS_SL.SLSearchEngine.s
_BaseCurrencyMas
k
0 PCMS_SL.sGlobal._BaseCurrencyMask
CommonBranchId 0 PCMS_SL.ViewManager.TMS.TMSJobCard.CommonBranchId
CustomerSelected 0 PCMS_SL.ViewManager.TMS.TMSJobCard.CustomerSelected
CommonBranchId 0 PCMS_SL.ViewManager.TMS.TMSQuotation.CommonBranchId
CommonBranchId 0 PCMS_SL.ViewManager.TMS.TMSMultiPointMovement.CommonBranchId
CommonBranchId 0
PCMS_SL.ViewManager.TMS.TMSImprovementOppertunity.CommonBranc
hId
CommonBranchId 0 PCMS_SL.ViewManager.TMS.TMSDeliveryOrder.CommonBranchId
CommonBranchId 0 PCMS_SL.ViewManager.TMS.TMSTWB.CommonBranchId
Sum: 0
Average: 0
Minimum: 0
Maximum: 0
Standard
deviation:
0
Variance: 0
WARNING: The following CQL constraint is not satisfied. 5 types on 1846 tested match the
condition. --> Group {Unused Code / Dead Code}
// <Name>Potentially unused types</Name>
WARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE
TypeCa == 0 AND // Ca=0 -> No Afferent Coupling ->
// The type is not used in the
// context of this application.
!IsPublic AND // Public types might be used
// by client applications of your
// assemblies.
!NameIs "Program" // Generally, types named Program
// contain a Main() entry-point
// method and this condition avoid
// to consider such type as
// unused code.
39. types
Afferen
t
couplin
g
(TypeCa
)
Full Name
ArrayList 0 System.Collections.ArrayList
Helper 0 PCMS_SL.Web.BusinessManagers.Helper
VourcherItem 0
PCMS_SL.Web.DTOBusinessObjects.DTOGeneral.DTOAccounts.Vourche
rItem
ICommon 0 Pegasus.Common.ICommon
CargoEnquiryContaine
rs
0 Pegasus.BusinessObjects.General.Cargo.CargoEnquiryContainers
Sum: 0
Average: 0
Minimum: 0
Maximum: 0
Standard deviation: 0
Variance: 0
WARNING: The following CQL constraint is not satisfied. 10 fields on 17620 tested match the
condition. --> Group {Encapsulation}
// <Name>Fields should be declared as private</Name>
WARN IF Count > 0 IN SELECT TOP 10 FIELDS WHERE
!IsPrivate AND
// These conditions filter cases where fields
// doesn't represent state that should be encapsulated.
!IsInFrameworkAssembly AND
!IsGeneratedByCompiler AND
!IsSpecialName AND
!IsInitOnly AND
!IsLiteral AND
!IsEnumValue
fields Size of instance Full Name
objControl 4 Pegasus.Controls.Buttons.objControl
spOperations 4 Pegasus.Controls.Buttons.spOperations
btnPost 4 Pegasus.Controls.Buttons.btnPost
btnPrint 4 Pegasus.Controls.Buttons.btnPrint
btnFind 4 Pegasus.Controls.Buttons.btnFind
btnDelete 4 Pegasus.Controls.Buttons.btnDelete
btnClear 4 Pegasus.Controls.Buttons.btnClear
btnEdit 4 Pegasus.Controls.Buttons.btnEdit
40. btnSave 4 Pegasus.Controls.Buttons.btnSave
btnCancel 4 Pegasus.Controls.Buttons.btnCancel
Sum: 40
Average: 4
Minimum: 4
Maximum: 4
Standard deviation: 0
Variance: 0
WARNING: The following CQL constraint is not satisfied. 10 methods on 40132 tested match the
condition. --> Group {Encapsulation Methods Optimal Encapsulation}
// <Name>Methods that could be declared as 'internal' in C#, 'Friend' in VB.
NET</Name>
WARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE
CouldBeInternal AND
// Eliminate default constructor from the result.
// Whatever the visibility of the declaring class,
// default constructors are public and introduce noise
// in the current rule.
! ( IsConstructor AND
IsPublic AND
NbILInstructions == 3)
methods # lines of code (LOC) Full Name
openTab(String,String,String) 56 PCMS_SL.MainPCMS.openTab(String,String,String)
.ctor() 16 PCMS_SL.MainPCMS..ctor()
.ctor(Exception) 4 PCMS_SL.ErrorWindow..ctor(Exception)
.ctor(Uri) 4 PCMS_SL.ErrorWindow..ctor(Uri)
.ctor(String,String) 3 PCMS_SL.ErrorWindow..ctor(String,String)
.ctor() 5 PCMS_SL.LoginScreen..ctor()
set_NoticeText(String) 1 PCMS_SL.WaitingWindow.set_NoticeText(String)
.ctor() 2 PCMS_SL.WaitingWindow..ctor()
set_SearchList(IList) 2 PCMS_SL.SLSearchEngine.set_SearchList(IList)
set_FormType(Type) 1 PCMS_SL.SLSearchEngine.set_FormType(Type)
Sum: 94
Average: 9.4
Minimum: 1
Maximum: 56
Standard deviation: 16.076
Variance: 258.44
41. WARNING: The following CQL constraint is not satisfied. 10 methods on 40132 tested match the
condition. --> Group {Encapsulation Methods Optimal Encapsulation}
// <Name>Methods that could be declared as 'private' in C#, 'Private' in VB.
NET</Name>
WARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE
CouldBePrivate
methods
#
lines
of
code
(LOC
)
Full Name
.ctor() N/A Pegasus.Controls.Message..ctor()
set_ClickedButton(Button) 1 Pegasus.Controls.Buttons.set_ClickedButton(Button)
set_ShouldButtonDisableAfterSave(B
oolean)
1
Pegasus.Controls.Buttons.set_ShouldButtonDisableAfterSa
ve(Boolean)
RoutedEvents(Object,RoutedEventAr
gs)
6
Pegasus.Controls.Buttons.RoutedEvents(Object,RoutedEve
ntArgs)
GridDoubleClick() 6 Pegasus.Controls.Buttons.GridDoubleClick()
AllowAll(Boolean) 13 Pegasus.Controls.Buttons.AllowAll(Boolean)
SetButtonCaption(String) 1 Pegasus.Controls.Buttons.SetButtonCaption(String)
AllowForCusser() 9 Pegasus.Controls.Buttons.AllowForCusser()
ButtonTypeGrid() 6 Pegasus.Controls.Buttons.ButtonTypeGrid()
ShowMessages(String) 3 Pegasus.Controls.Buttons.ShowMessages(String)
Sum: 46
Average: 4.6
Minimum: 0
Maximum: 13
Standard deviation:
3.979
9
Variance: 15.84
WARNING: The following CQL constraint is not satisfied. 10 types on 2145 tested match the
condition. --> Group {Encapsulation Types Optimal Encapsulation}
// <Name>Types that could be declared as internal</Name>
WARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE
CouldBeInternal
types # lines of code (LOC) Full Name
Message 0 Pegasus.Controls.Message
PCMSResource 47 PCMS_SL.PCMSResource
MainPCMS 1 274 PCMS_SL.MainPCMS
ErrorWindow 22 PCMS_SL.ErrorWindow
42. LoginScreen 195 PCMS_SL.LoginScreen
WaitingWindow 9 PCMS_SL.WaitingWindow
App 25 PCMS_SL.App
PageTest 51 PCMS_SL.PageTest
SLSearchEngine 68 PCMS_SL.SLSearchEngine
ValidationException 4 PCMS_SL.ValidationException
Sum: 1 695
Average: 169.5
Minimum: 0
Maximum: 1 274
Standard deviation: 372.08
Variance: 138 443
WARNING: The following CQL constraint is not satisfied. 10 types on 2145 tested match the
condition. --> Group {Encapsulation Types Optimal Encapsulation}
// <Name>Types that could be declared as 'private' in C#, 'Private' in VB.NE
T</Name>
WARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE
CouldBePrivate
types
#
line
s of
cod
e
(LO
C)
Full Name
sGlobal+pParams 0 PCMS_SL.sGlobal+pParams
TMSJobCard+CustomClass 1 PCMS_SL.ViewManager.TMS.TMSJobCard+CustomClass
TMSQuotation+CustomClass 1 PCMS_SL.ViewManager.TMS.TMSQuotation+CustomClass
TMSMultiPointMovement+CustomClas
s
1
PCMS_SL.ViewManager.TMS.TMSMultiPointMovement+Custo
mClass
TMSMultiPointMovement+CustomClas
sContainers
1
PCMS_SL.ViewManager.TMS.TMSMultiPointMovement+Custo
mClassContainers
TMSTrips+CustomClass 1 PCMS_SL.ViewManager.TMS.TMSTrips+CustomClass
PRCIJobClosing+CustomClass 1 PCMS_SL.ViewManager.PRCI.PRCIJobClosing+CustomClass
PRCICustomerFeedback+CustomClass 1
PCMS_SL.ViewManager.PRCI.PRCICustomerFeedback+Custo
mClass
UserManagement+UserGroupClass 1
PCMS_SL.ViewManager.Security.UserManagement+UserGro
upClass
Commodities+CustomClass 1
PCMS_SL.ViewManager.Masters.Others.Commodities+Custo
mClass
Sum: 9
43. Average: 0.9
Minimum: 0
Maximum: 1
Standard deviation: 0.3
Variance: 0.09
WARNING: The following CQL constraint is not satisfied. 4 fields on 17620 tested match the
condition. --> Group {Encapsulation Fields Optimal Encapsulation}
// <Name>Fields that could be declared as internal</Name>
WARN IF Count > 0 IN SELECT TOP 10 FIELDS WHERE
CouldBeInternal
fields Size of instance Full Name
objToOpen 4 PCMS_SL.MainPCMS.objToOpen
pSection 4 Pegasus.BusinessObjects.sGlobal+pParams.pSection
pName 4 Pegasus.BusinessObjects.sGlobal+pParams.pName
pValue 4 Pegasus.BusinessObjects.sGlobal+pParams.pValue
Sum: 16
Average: 4
Minimum: 4
Maximum: 4
Standard deviation: 0
Variance: 0
WARNING: The following CQL constraint is not satisfied. 10 fields on 17620 tested match the
condition. --> Group {Encapsulation Fields Optimal Encapsulation}
// <Name>Fields that could be declared as 'private' in C#, 'Private' in VB.N
ET</Name>
WARN IF Count > 0 IN SELECT TOP 10 FIELDS WHERE
CouldBePrivate
fields Size of instance Full Name
objControl 4 Pegasus.Controls.Buttons.objControl
spOperations 4 Pegasus.Controls.Buttons.spOperations
btnPost 4 Pegasus.Controls.Buttons.btnPost
btnPrint 4 Pegasus.Controls.Buttons.btnPrint
btnFind 4 Pegasus.Controls.Buttons.btnFind
btnDelete 4 Pegasus.Controls.Buttons.btnDelete
btnClear 4 Pegasus.Controls.Buttons.btnClear
btnEdit 4 Pegasus.Controls.Buttons.btnEdit
btnSave 4 Pegasus.Controls.Buttons.btnSave
44. btnCancel 4 Pegasus.Controls.Buttons.btnCancel
Sum: 40
Average: 4
Minimum: 4
Maximum: 4
Standard deviation: 0
Variance: 0
WARNING: The following CQL constraint is not satisfied. 10 methods on 40132 tested match the
condition. --> Group {Test Coverage}
// <Name>Complex methods should be 100% covered by tests</Name>
WARN IF Count > 0 IN SELECT TOP 10 METHODS
/*OUT OF "YourGeneratedCode" */
WHERE
// These metrics' definitions are available here:
// http://www.ndepend.com/Metrics.aspx#MetricsOnMethods
( NbILInstructions > 200 OR
ILCyclomaticComplexity > 50 OR
ILNestingDepth > 4 OR
NbParameters > 5 OR
NbVariables > 8 OR
NbOverloads > 6 ) AND
PercentageCoverage < 100
// To run this constraint properly coverage data must be
// gathered from NCover™ or Visual Studio™ Coverage.
// This can be done throught the menu:
// NDepend -> Coverage -> Import Coverage Files
// This can be done at analysis time throught the menu:
// Project Properties -> Analysis -> Code Coverage
// More information on how to import coverage data here:
// http://www.ndepend.com/Coverage.aspx
methods
# IL
inst
ruct
ions
IL
Cyc
lom
atic
Co
mpl
exit
y
(ILC
C)
IL
Ne
sti
ng
De
pt
h
#
Par
am
ete
rs
#
Va
ria
ble
s
#
Ov
erl
oad
s
Per
cen
tag
e
Cov
era
ge
Full Name
SetButtonMode(Buttons+But
tonsMode)
647 12 1 1 1 1 0
Pegasus.Controls.Buttons.SetButtonM
ode(Buttons+ButtonsMode)
Enabled(Boolean,Boolean,B
oolean,Boolean,Boolean,Bo
olean,Boolean,Boolean)
42 1 0 8 0 1 0
Pegasus.Controls.Buttons.Enabled(Bo
olean,Boolean,Boolean,Boolean,Bool
ean,Boolean,Boolean,Boolean)
EnableDisable(Object) 299 10 7 1 3 1 0
Pegasus.Controls.Buttons.EnableDisa
ble(Object)
45. Show(Boolean,Boolean,Bool
ean,Boolean,Boolean,Boole
an,Boolean,Boolean)
74 17 1 8 0 1 0
Pegasus.Controls.Buttons.Show(Boole
an,Boolean,Boolean,Boolean,Boolean
,Boolean,Boolean,Boolean)
SetButtonAccess(IList) 136 13 5 1 5 1 0
Pegasus.Controls.Buttons.SetButtonA
ccess(IList)
UserControl_KeyDown(Obje
ct,KeyEventArgs)
226 29 2 2 1 1 0
Pegasus.Controls.Buttons.UserControl
_KeyDown(Object,KeyEventArgs)
ButtonTool_Click(Object,Ri
bbonToolEventArgs)
219 28 9 2 4 1 0
PCMS_SL.MainPCMS.ButtonTool_Click
(Object,RibbonToolEventArgs)
SetPageMenuSettingsForBut
tonTool(ButtonTool)
1
477
71 3 1 3 1 0
PCMS_SL.MainPCMS.SetPageMenuSett
ingsForButtonTool(ButtonTool)
SetPageMenuSettingsForGall
eryTool(GalleryTool)
1
760
58 2 1 3 1 0
PCMS_SL.MainPCMS.SetPageMenuSett
ingsForGalleryTool(GalleryTool)
openTab(String,String,String
)
293 22 3 3 12 1 0
PCMS_SL.MainPCMS.openTab(String,S
tring,String)
Sum:
5
173
261 33 28 32 10 0
Average:
517.
3
26.
1
3.
3
2.8 3.2 1 0
Minimum: 42 1 0 1 0 1 0
Maximum:
1
760
71 9 8 12 1 0
Standard deviation:
576.
35
20.
988
2.
72
21
2.6
758
3.3
40
7
0 0
Variance:
332
176
440
.49
7.
41
7.1
6
11.
16
0 0
WARNING: The following CQL constraint is not satisfied. 1885 fields on 17620 tested match the
condition. --> Group {Purity / Immutability / Side-Effects}
// <Name>Fields should be marked as ReadOnly when possible</Name>
WARN IF Count > 0 IN SELECT FIELDS WHERE
IsImmutable AND
!IsInitOnly AND
!IsGeneratedByCompiler
// A field that matches the condition IsImmutable
// is a field that is assigned only by constructors
// of its class.
// For an instance field, this means its value
// will remain constant throught the lifetime
// of the object.
// For a static field, this means its value will
// remain constant throught the lifetime of the
// program.
// In both cases, such field can safely be marked
// with the C# readonly keyword
// (ReadOnly in VB.NET).
46. // The condition IsInitOnly matches fields that
// are marked with the C# readonly keyword
// (ReadOnly in VB.NET).
fields Size of instance Full Name
Sum: 7 050
Average: 3.7401
Minimum: 0
Maximum: 4
Standard deviation: 0.81713
Variance: 0.66771
WARNING: The following CQL constraint is not satisfied. 2 types on 2145 tested match the
condition. --> Group {Purity / Immutability / Side-Effects}
// <Name>Structures should be immutable</Name>
WARN IF Count > 0 IN SELECT TYPES WHERE
IsStructure AND
!IsImmutable AND
!IsInFrameworkAssembly
// It is deemed as a good practice to make
// your structure immutable.
// An object is immutable if its state doesn’t
// change once the object has been created.
// Consequently, a structure is immutable if
// its instances are immutable.
// Immutable types naturally simplify code by
// limiting side-effects.
// See some explanations on immutability and
// how NDepend supports it here:
// http://codebetter.com/blogs/patricksmacchia/archive/2008/01/13/immutable-
types-understand-them-and-use-them.aspx
types # lines of code (LOC) Full Name
Sum: 0
Average: 0
Minimum: 0
Maximum: 0
Standard deviation: 0
Variance: 0
WARNING: The following CQL constraint is not satisfied. 3 methods on 40132 tested match the
condition. --> Group {Purity / Immutability / Side-Effects}
47. // <Name>Instance Property Getter should be immutable</Name>
WARN IF Count > 0 IN SELECT METHODS WHERE
IsPropertyGetter AND
!IsStatic AND
ChangesObjectState
// This rule might be violated in the case of object lazy initialized
// when the property getter is accessed the first time.
methods
# lines of
code
(LOC)
Full Name
get_AllowedOperations() 2 PCMS_SL.AppSecurity.AppClientSecurity.get_AllowedOperations()
get_Columns() 3 PCMS.DS.DataTable.get_Columns()
get_Rows() 4 PCMS.DS.DataTable.get_Rows()
Sum: 9
Average: 3
Minimum: 2
Maximum: 4
Standard deviation: 0.8165
Variance: 0.66667
WARNING: The following CQL constraint is not satisfied. 6 methods on 40132 tested match the
condition. --> Group {Purity / Immutability / Side-Effects}
// <Name>Static Property Getter should be immutable</Name>
WARN IF Count > 0 IN SELECT METHODS WHERE
IsPropertyGetter AND
IsStatic AND
ChangesTypeState
// Generated property getter Resources.get_ResourceManager()
// provokes a read-only property lazy-initialized
AND !FullNameLike "Resources.get_ResourceManager()"
// This rule might be violated in the case of object lazy initialized
// when the property getter is accessed the first time.
methods # lines of code (LOC) Full Name
get_Instance() 3 Pegasus.Controls.PegasusMessageBox.get_Instance()
get_ResourceManager() 4 PCMS_SL.PCMSResource.get_ResourceManager()
get_Client() 10 PCMS_SL.sGlobal.get_Client()
get_Instance() 3 PCMS_SL.AppSecurity.AppClientSecurity.get_Instance()
get_Instance() 5 Pegasus.Common.clsNHiber.get_Instance()
get_Instance() 3 Pegasus.Common.Common.get_Instance()
Sum: 28
48. Average: 4.6667
Minimum: 3
Maximum: 10
Standard deviation: 2.4944
Variance: 6.2222
WARNING: The following CQL constraint is not satisfied. 10 fields on 17620 tested match the
condition. --> Group {Naming Conventions}
// <Name>Instance fields should be prefixed with a 'm_'</Name>
WARN IF Count > 0 IN SELECT TOP 10 FIELDS WHERE
!NameLike "^m_" AND
!IsStatic AND
!IsLiteral AND
!IsGeneratedByCompiler AND
!IsSpecialName AND
!IsEventDelegateObject
// This naming convention provokes debate.
// Don't hesitate to customize the regex of
// NameLike to your preference.
fields
Size of
instance
Full Name
_GridType 1 Pegasus.Controls.Buttons._GridType
objControl 4 Pegasus.Controls.Buttons.objControl
shouldButtonDisableAfterSave 1 Pegasus.Controls.Buttons.shouldButtonDisableAfterSave
buttonClicked 4 Pegasus.Controls.Buttons.buttonClicked
ButtonPageList 4 Pegasus.Controls.Buttons.ButtonPageList
_ClickedButton 4 Pegasus.Controls.Buttons._ClickedButton
spOperations 4 Pegasus.Controls.Buttons.spOperations
btnPost 4 Pegasus.Controls.Buttons.btnPost
btnPrint 4 Pegasus.Controls.Buttons.btnPrint
btnFind 4 Pegasus.Controls.Buttons.btnFind
Sum: 34
Average: 3.4
Minimum: 1
Maximum: 4
Standard deviation: 1.2
Variance: 1.44
WARNING: The following CQL constraint is not satisfied. 10 fields on 17620 tested match the
condition. --> Group {Naming Conventions}
49. // <Name>Static fields should be prefixed with a 's_'</Name>
WARN IF Count > 0 IN SELECT TOP 10 FIELDS WHERE
!NameLike "^s_" AND
IsStatic AND
!IsLiteral AND
!IsGeneratedByCompiler AND
!IsSpecialName AND
!IsEventDelegateObject
// This naming convention provokes debate.
// Don't hesitate to customize the regex of
// NameLike to your preference.
fields Size of instance Full Name
_Instance 0 Pegasus.Controls.PegasusMessageBox._Instance
resourceMan 0 PCMS_SL.PCMSResource.resourceMan
resourceCulture 0 PCMS_SL.PCMSResource.resourceCulture
mTons 0 PCMS_SL.sGlobal.mTons
mChg 0 PCMS_SL.sGlobal.mChg
_Employee 0 PCMS_SL.sGlobal._Employee
_BranchID 0 PCMS_SL.sGlobal._BranchID
_FYID 0 PCMS_SL.sGlobal._FYID
_BaseCurrency 0 PCMS_SL.sGlobal._BaseCurrency
_FinanialYear 0 PCMS_SL.sGlobal._FinanialYear
Sum: 0
Average: 0
Minimum: 0
Maximum: 0
Standard deviation: 0
Variance: 0
WARNING: The following CQL constraint is not satisfied. 3 types on 2145 tested match the
condition. --> Group {Naming Conventions}
// <Name>Abstract base class should be suffixed with 'Base'</Name>
WARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE
IsAbstract AND
IsClass AND
// equivalent to: DepthOfDeriveFrom "System.Object" == 1
DepthOfInheritance == 1 AND
((!IsGeneric AND !NameLike "Base$") OR
( IsGeneric AND !NameLike "Base<"))
types Depth of inheritance Full Name
DynamicObject 1 PCMS.DS.DynamicObject
50. ParentClass<T> 1 Pegasus.BusinessObjects.ParentClass<T>
SLParentClass<T> 1 Pegasus.BusinessObjects.SLParentClass<T>
Sum: 3
Average: 1
Minimum: 1
Maximum: 1
Standard deviation: 0
Variance: 0
WARNING: The following CQL constraint is not satisfied. 6 types on 2145 tested match the
condition. --> Group {Naming Conventions}
// <Name>Types name should begin with an Upper character</Name>
WARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE
// The name of a type should begin with an Upper letter.
!NameLike "^[A-Z]" AND
// Except if it is generated by compiler or ...
!IsGeneratedByCompiler AND
// ... if it is declared in a third party assembly.
!IsInFrameworkAssembly
types
#
lines
of
code
(LOC
)
Full Name
sGlobal 99 PCMS_SL.sGlobal
sGlobal+pParams 0 PCMS_SL.sGlobal+pParams
getCurrencyActiveListCompletedEv
entArgs
4
PCMS_SL.SRBusinessManager.getCurrencyActiveListComplet
edEventArgs
clsNHiber 15 Pegasus.Common.clsNHiber
sGlobal 79 Pegasus.BusinessObjects.sGlobal
sGlobal+pParams 0 Pegasus.BusinessObjects.sGlobal+pParams
Sum: 197
Average:
32.83
3
Minimum: 0
Maximum: 99
Standard deviation:
40.44
5
Variance: 1 635
51. WARNING: The following CQL constraint is not satisfied. 10 methods on 40132 tested match the
condition. --> Group {Naming Conventions}
// <Name>Methods name should begin with an Upper character</Name>
WARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE
!NameLike "^[A-Z]" AND
!( IsClassConstructor OR IsConstructor OR
IsPropertyGetter OR IsPropertySetter OR
IsIndexerGetter OR IsIndexerSetter OR
IsEventAdder OR IsEventRemover OR
IsOperator) AND
!IsGeneratedByCompiler AND
!IsInFrameworkAssembly
// The name of a regular method should
// begin with an Upper letter.
methods
#
lines
of
code
(LOC)
Full Name
btnOk_Click(Object,RoutedEventA
rgs)
1
Pegasus.Controls.Buttons.btnOk_Click(Object,RoutedEventA
rgs)
btnMbOk_Click(Object,RoutedEve
ntArgs)
0
Pegasus.Controls.Buttons.btnMbOk_Click(Object,RoutedEve
ntArgs)
btnMbCancel_Click(Object,Routed
EventArgs)
0
Pegasus.Controls.Buttons.btnMbCancel_Click(Object,Routed
EventArgs)
btn_Click(Object,RoutedEventArgs
)
1
Pegasus.Controls.Buttons.btn_Click(Object,RoutedEventArgs
)
_this_Loaded(Object,RoutedEvent
Args)
0
Pegasus.Controls.PegasusMessageBox._this_Loaded(Object,R
outedEventArgs)
ok_Click(Object,RoutedEventArgs) 2
Pegasus.Controls.PegasusMessageBox.ok_Click(Object,Route
dEventArgs)
yes_Click(Object,RoutedEventArgs
)
2
Pegasus.Controls.PegasusMessageBox.yes_Click(Object,Rout
edEventArgs)
no_Click(Object,RoutedEventArgs) 2
Pegasus.Controls.PegasusMessageBox.no_Click(Object,Route
dEventArgs)
cancel_Click(Object,RoutedEvent
Args)
2
Pegasus.Controls.PegasusMessageBox.cancel_Click(Object,R
outedEventArgs)
btnClose_Click(Object,RoutedEve
ntArgs)
1
Pegasus.Controls.PegasusMessageBox.btnClose_Click(Object
,RoutedEventArgs)
Sum: 11
Average: 1.1
Minimum: 0
Maximum: 2
Standard deviation:
0.830
66
52. Variance: 0.69
WARNING: The following CQL constraint is not satisfied. 10 methods on 40132 tested match the
condition. --> Group {Naming Conventions Name too long}
// <Name>Avoid methods with name too long</Name>
WARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE
NameLike "^[^<(]{35,}.*$" AND
!IsExplicitInterfaceImpl AND
!IsInFrameworkAssembly
// The regex matches methods with name longer
// than 35 characters.
// Method Name doesn't contain the type and namespace
// prefix, FullName does.
// The regex computes the method name length from
// the beginning until the first open parenthesis
// or first lower than (for generic methods).
// Explicit Interface Implementation methods are
// discarded because their names are prefixed
// with the interface name.
methods
#
li
n
e
s
of
c
o
d
e
(L
O
C
)
Full Name
BusinessManagerClient_DTOSecurityObjectGet
MenuRightsObjectsCompleted(Object,DTOSec
urityObjectGetMenuRightsObjectsCompletedE
ventArgs)
9
PCMS_SL.MainPCMS.BusinessManagerClient_DTOSecu
rityObjectGetMenuRightsObjectsCompleted(Object,
DTOSecurityObjectGetMenuRightsObjectsCompleted
EventArgs)
Client_SaveIsolatedStorageCompleted(Object,
AsyncCompletedEventArgs)
1
PCMS_SL.LoginScreen.Client_SaveIsolatedStorageCo
mpleted(Object,AsyncCompletedEventArgs)
Client_CurrencyRateGetBaseCurrencyComplet
ed(Object,CurrencyRateGetBaseCurrencyCom
pletedEventArgs)
1
1
PCMS_SL.LoginScreen.Client_CurrencyRateGetBaseC
urrencyCompleted(Object,CurrencyRateGetBaseCurr
encyCompletedEventArgs)
Client_DTOCompanyComboGetCompaniesCom
pleted(Object,DTOCompanyComboGetCompan
iesCompletedEventArgs)
5
PCMS_SL.LoginScreen.Client_DTOCompanyComboGe
tCompaniesCompleted(Object,DTOCompanyComboG
etCompaniesCompletedEventArgs)
Client_GetDTOFinancialYearsCompleted(Obje
ct,GetFinancialYearsCompletedEventArgs)
2
PCMS_SL.LoginScreen.Client_GetDTOFinancialYearsC
ompleted(Object,GetFinancialYearsCompletedEvent
Args)
55. // namespace prefix, FullName does.
fields
Size of
instan
ce
Full Name
giMastersMenuKeyMasterLeasingCompa
ny
4
PCMS_SL.MainPCMS.giMastersMenuKeyMasterLeasingCo
mpany
giMastersMenuKeyMasterJobCardStatus 4
PCMS_SL.MainPCMS.giMastersMenuKeyMasterJobCardSt
atus
giMastersMenuKeyMasterDepositStatus 4
PCMS_SL.MainPCMS.giMastersMenuKeyMasterDepositSta
tus
giMastersMenuKeyMasterShippingTerm
s
4
PCMS_SL.MainPCMS.giMastersMenuKeyMasterShippingT
erms
giMastersMenuKeyMasterFreightCatego
ries
4
PCMS_SL.MainPCMS.giMastersMenuKeyMasterFreightCat
egories
giMastersMenuKeyMasterJobCategories 4
PCMS_SL.MainPCMS.giMastersMenuKeyMasterJobCatego
ries
giMastersMenuKeyMasterContainerStat
us
4
PCMS_SL.MainPCMS.giMastersMenuKeyMasterContainer
Status
giMastersMenuKeyMasterContainerClas
sification
4
PCMS_SL.MainPCMS.giMastersMenuKeyMasterContainer
Classification
giMastersMenuKeyMasterEquipmentsTy
pes
4
PCMS_SL.MainPCMS.giMastersMenuKeyMasterEquipmen
tsTypes
gigMastersMenuKeyMasterAdministrati
onGallery
4
PCMS_SL.MainPCMS.gigMastersMenuKeyMasterAdminist
rationGallery
Sum: 40
Average: 4
Minimum: 4
Maximum: 4
Standard deviation: 0
Variance: 0
Types Metrics
If the code base analyzed has too many types, NDepend doesn't list Types Metrics to avoid a too big
report. The section Types Metrics can be activated by unchecking the option:
NDepend Project Properties > Report > Avoid too big report for large code base > Hide section
Types Metrics if...
It is recommended to use the NDepend interactive UI capabilities to browse large applications.