Global Metrics
path: .metrics.mi.mi_original
old: 16.548199479932165
new: 59.59888133344886
path: .metrics.mi.mi_sei
old: -23.193858097580776
new: 38.13181820594997
path: .metrics.mi.mi_visual_studio
old: 9.677309637387232
new: 34.85314697862506
path: .metrics.halstead.bugs
old: 1.9881018970321336
new: 0.17502270773474404
path: .metrics.halstead.n1
old: 29.0
new: 14.0
path: .metrics.halstead.estimated_program_length
old: 1507.3000733748622
new: 385.7776997161967
path: .metrics.halstead.effort
old: 460616.871887321
new: 12031.602623259712
path: .metrics.halstead.purity_ratio
old: 1.1896606735397492
new: 2.1551826799787523
path: .metrics.halstead.volume
old: 9782.632672092004
new: 1100.804734391338
path: .metrics.halstead.time
old: 25589.82621596228
new: 668.4223679588729
path: .metrics.halstead.level
old: 0.02123811190851275
new: 0.09149277688603533
path: .metrics.halstead.difficulty
old: 47.08516483516483
new: 10.929824561403509
path: .metrics.halstead.N2
old: 591.0
new: 89.0
path: .metrics.halstead.length
old: 1267.0
new: 179.0
path: .metrics.halstead.n2
old: 182.0
new: 57.0
path: .metrics.halstead.vocabulary
old: 211.0
new: 71.0
path: .metrics.halstead.N1
old: 676.0
new: 90.0
path: .metrics.nom.functions
old: 17.0
new: 1.0
path: .metrics.nom.total
old: 17.0
new: 1.0
path: .metrics.cognitive.average
old: 2.6470588235294117
new: 1.0
path: .metrics.cognitive.sum
old: 45.0
new: 1.0
path: .metrics.nexits.average
old: 1.0588235294117647
new: 0.0
path: .metrics.nexits.sum
old: 18.0
new: 0.0
path: .metrics.loc.sloc
old: 346.0
new: 94.0
path: .metrics.loc.ploc
old: 263.0
new: 65.0
path: .metrics.loc.lloc
old: 117.0
new: 0.0
path: .metrics.loc.blank
old: 49.0
new: 16.0
path: .metrics.loc.cloc
old: 34.0
new: 13.0
path: .metrics.cyclomatic.sum
old: 52.0
new: 6.0
path: .metrics.cyclomatic.average
old: 2.6
new: 1.5
path: .metrics.nargs.average
old: 1.6470588235294117
new: 0.0
path: .metrics.nargs.sum
old: 28.0
new: 0.0
Spaces Data
Minimal test - lines (43, 92)
path: .spaces[0].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[0].metrics.nexits.average
old: null
new: 0.0
path: .spaces[0].metrics.nargs.average
old: null
new: 0.0
path: .spaces[0].metrics.cyclomatic.sum
old: 1.0
new: 3.0
path: .spaces[0].metrics.mi.mi_original
old: 113.50218747718309
new: 71.66359754174415
path: .spaces[0].metrics.mi.mi_visual_studio
old: 66.37554823227082
new: 41.90853657411939
path: .spaces[0].metrics.mi.mi_sei
old: 129.66919403500154
new: 43.23857388721838
path: .spaces[0].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[0].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[0].metrics.loc.ploc
old: 6.0
new: 38.0
path: .spaces[0].metrics.loc.blank
old: 0.0
new: 10.0
path: .spaces[0].metrics.loc.sloc
old: 10.0
new: 50.0
path: .spaces[0].metrics.loc.cloc
old: 4.0
new: 2.0
path: .spaces[0].metrics.halstead.N1
old: 5.0
new: 82.0
path: .spaces[0].metrics.halstead.difficulty
old: 1.125
new: 9.545454545454543
path: .spaces[0].metrics.halstead.level
old: 0.8888888888888888
new: 0.10476190476190476
path: .spaces[0].metrics.halstead.vocabulary
old: 10.0
new: 56.0
path: .spaces[0].metrics.halstead.effort
old: 52.32036749447595
new: 8425.944050549031
path: .spaces[0].metrics.halstead.estimated_program_length
old: 26.0
new: 283.2345412286949
path: .spaces[0].metrics.halstead.bugs
old: 0.004662934007700876
new: 0.13802501170114742
path: .spaces[0].metrics.halstead.n1
old: 2.0
new: 12.0
path: .spaces[0].metrics.halstead.n2
old: 8.0
new: 44.0
path: .spaces[0].metrics.halstead.N2
old: 9.0
new: 70.0
path: .spaces[0].metrics.halstead.length
old: 14.0
new: 152.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.8571428571428572
new: 1.8633851396624663
path: .spaces[0].metrics.halstead.time
old: 2.906687083026442
new: 468.1080028082795
path: .spaces[0].metrics.halstead.volume
old: 46.50699332842307
new: 882.7179481527558
Code
class nsLocalFile final
#ifdef MOZ_WIDGET_COCOA
: public nsILocalFileMac
#else
: public nsIFile
#endif
{
public:
NS_DEFINE_STATIC_CID_ACCESSOR(NS_LOCAL_FILE_CID)
nsLocalFile();
explicit nsLocalFile(const nsACString& aFilePath);
static nsresult nsLocalFileConstructor(nsISupports* aOuter, const nsIID& aIID,
void** aInstancePtr);
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIFILE
#ifdef MOZ_WIDGET_COCOA
NS_DECL_NSILOCALFILEMAC
#endif
private:
nsLocalFile(const nsLocalFile& aOther);
~nsLocalFile() = default;
protected:
// This stat cache holds the *last stat* - it does not invalidate.
// Call "FillStatCache" whenever you want to stat our file.
struct STAT mCachedStat;
nsCString mPath;
void LocateNativeLeafName(nsACString::const_iterator&,
nsACString::const_iterator&);
nsresult CopyDirectoryTo(nsIFile* aNewParent);
nsresult CreateAllAncestors(uint32_t aPermissions);
nsresult GetNativeTargetPathName(nsIFile* aNewParent,
const nsACString& aNewName,
nsACString& aResult);
bool FillStatCache();
nsresult CreateAndKeepOpen(uint32_t aType, int aFlags, uint32_t aPermissions,
PRFileDesc** aResult);
nsresult SetLastModifiedTimeImpl(PRTime aLastModTime, bool aFollowLinks);
nsresult GetLastModifiedTimeImpl(PRTime* aLastModTime, bool aFollowLinks);
nsresult GetCreationTimeImpl(PRTime* aCreationTime, bool aFollowLinks);
};