Global Metrics

path: .metrics.cyclomatic.sum
old: 111.0
new: 3.0

path: .metrics.cyclomatic.average
old: 6.166666666666667
new: 1.0

path: .metrics.nexits.average
old: 0.9411764705882352
new: null

path: .metrics.nexits.sum
old: 16.0
new: 0.0

path: .metrics.mi.mi_original
old: -19.976084954930187
new: 66.92256706217607

path: .metrics.mi.mi_visual_studio
old: 0.0
new: 39.13600412992753

path: .metrics.mi.mi_sei
old: -64.10029082059827
new: 58.80982799082162

path: .metrics.cognitive.sum
old: 173.0
new: 0.0

path: .metrics.cognitive.average
old: 10.176470588235292
new: null

path: .metrics.nom.total
old: 17.0
new: 0.0

path: .metrics.nom.functions
old: 17.0
new: 0.0

path: .metrics.loc.sloc
old: 1031.0
new: 66.0

path: .metrics.loc.lloc
old: 330.0
new: 0.0

path: .metrics.loc.cloc
old: 166.0
new: 20.0

path: .metrics.loc.blank
old: 129.0
new: 11.0

path: .metrics.loc.ploc
old: 736.0
new: 35.0

path: .metrics.nargs.average
old: 3.1176470588235294
new: null

path: .metrics.nargs.sum
old: 53.0
new: 0.0

path: .metrics.halstead.n1
old: 39.0
new: 11.0

path: .metrics.halstead.vocabulary
old: 299.0
new: 55.0

path: .metrics.halstead.volume
old: 26933.60548299879
new: 925.0175541639456

path: .metrics.halstead.time
old: 153521.5512530931
new: 443.23757803689057

path: .metrics.halstead.level
old: 0.009746588693957116
new: 0.11594202898550723

path: .metrics.halstead.N1
old: 1907.0
new: 91.0

path: .metrics.halstead.N2
old: 1368.0
new: 69.0

path: .metrics.halstead.purity_ratio
old: 0.6998309367703897
new: 1.739179618906571

path: .metrics.halstead.bugs
old: 6.564071687044737
new: 0.13309185068028642

path: .metrics.halstead.estimated_program_length
old: 2291.946317923026
new: 278.26873902505133

path: .metrics.halstead.n2
old: 260.0
new: 44.0

path: .metrics.halstead.effort
old: 2763387.9225556757
new: 7978.27640466403

path: .metrics.halstead.length
old: 3275.0
new: 160.0

path: .metrics.halstead.difficulty
old: 102.6
new: 8.625

Spaces Data

Minimal test - lines (13, 13)

path: .spaces[0].metrics.cyclomatic.sum
old: 5.0
new: 1.0

path: .spaces[0].metrics.cyclomatic.average
old: 5.0
new: 1.0

path: .spaces[0].metrics.nom.total
old: 1.0
new: 0.0

path: .spaces[0].metrics.nom.functions
old: 1.0
new: 0.0

path: .spaces[0].metrics.nexits.sum
old: 1.0
new: 0.0

path: .spaces[0].metrics.nexits.average
old: 1.0
new: null

path: .spaces[0].metrics.nargs.average
old: 3.0
new: null

path: .spaces[0].metrics.nargs.sum
old: 3.0
new: 0.0

path: .spaces[0].metrics.loc.ploc
old: 71.0
new: 1.0

path: .spaces[0].metrics.loc.blank
old: 12.0
new: 0.0

path: .spaces[0].metrics.loc.lloc
old: 51.0
new: 0.0

path: .spaces[0].metrics.loc.sloc
old: 83.0
new: 1.0

path: .spaces[0].metrics.halstead.volume
old: 1887.8191692190496
new: 0.0

path: .spaces[0].metrics.halstead.time
old: 2190.8024926739586
new: 0.0

path: .spaces[0].metrics.halstead.estimated_program_length
old: 374.7639251168273
new: null

path: .spaces[0].metrics.halstead.length
old: 308.0
new: 1.0

path: .spaces[0].metrics.halstead.level
old: 0.047872340425531915
new: null

path: .spaces[0].metrics.halstead.n2
old: 54.0
new: 1.0

path: .spaces[0].metrics.halstead.difficulty
old: 20.88888888888889
new: 0.0

path: .spaces[0].metrics.halstead.purity_ratio
old: 1.2167659906390496
new: null

path: .spaces[0].metrics.halstead.vocabulary
old: 70.0
new: 1.0

path: .spaces[0].metrics.halstead.N1
old: 167.0
new: 0.0

path: .spaces[0].metrics.halstead.effort
old: 39434.44486813126
new: 0.0

path: .spaces[0].metrics.halstead.bugs
old: 0.3861854432642517
new: 0.0

path: .spaces[0].metrics.halstead.N2
old: 141.0
new: 1.0

path: .spaces[0].metrics.halstead.n1
old: 16.0
new: 0.0

path: .spaces[0].metrics.cognitive.sum
old: 2.0
new: 0.0

path: .spaces[0].metrics.cognitive.average
old: 2.0
new: null

path: .spaces[0].metrics.mi.mi_visual_studio
old: 34.52646714944997
new: null

path: .spaces[0].metrics.mi.mi_original
old: 59.04025882555945
new: null

path: .spaces[0].metrics.mi.mi_sei
old: 9.985335925445057
new: null

Code

class nsIHandlerApp;

Minimal test - lines (15, 64)

path: .spaces[1].metrics.mi.mi_original
old: 19.49193140513482
new: 72.21174288464819

path: .spaces[1].metrics.mi.mi_visual_studio
old: 11.39879029540048
new: 42.22908940622701

path: .spaces[1].metrics.mi.mi_sei
old: -14.223877320663584
new: 66.09590058195514

path: .spaces[1].metrics.halstead.effort
old: 667484.2290415509
new: 7637.353480430421

path: .spaces[1].metrics.halstead.estimated_program_length
old: 718.8727164872837
new: 250.93087160050476

path: .spaces[1].metrics.halstead.N2
old: 504.0
new: 64.0

path: .spaces[1].metrics.halstead.vocabulary
old: 118.0
new: 51.0

path: .spaces[1].metrics.halstead.bugs
old: 2.54588872592914
new: 0.12927285479729742

path: .spaces[1].metrics.halstead.purity_ratio
old: 0.5811420505151849
new: 1.6400710562124494

path: .spaces[1].metrics.halstead.N1
old: 733.0
new: 89.0

path: .spaces[1].metrics.halstead.difficulty
old: 78.4
new: 8.8

path: .spaces[1].metrics.halstead.level
old: 0.012755102040816323
new: 0.11363636363636365

path: .spaces[1].metrics.halstead.n2
old: 90.0
new: 40.0

path: .spaces[1].metrics.halstead.length
old: 1237.0
new: 153.0

path: .spaces[1].metrics.halstead.volume
old: 8513.829452060598
new: 867.8810773216387

path: .spaces[1].metrics.halstead.n1
old: 28.0
new: 11.0

path: .spaces[1].metrics.halstead.time
old: 37082.45716897505
new: 424.29741557946784

path: .spaces[1].metrics.nexits.average
old: 2.0
new: null

path: .spaces[1].metrics.nexits.sum
old: 2.0
new: 0.0

path: .spaces[1].metrics.nom.functions
old: 1.0
new: 0.0

path: .spaces[1].metrics.nom.total
old: 1.0
new: 0.0

path: .spaces[1].metrics.cognitive.sum
old: 96.0
new: 0.0

path: .spaces[1].metrics.cognitive.average
old: 96.0
new: null

path: .spaces[1].metrics.loc.sloc
old: 368.0
new: 50.0

path: .spaces[1].metrics.loc.ploc
old: 254.0
new: 29.0

path: .spaces[1].metrics.loc.lloc
old: 118.0
new: 0.0

path: .spaces[1].metrics.loc.cloc
old: 61.0
new: 15.0

path: .spaces[1].metrics.loc.blank
old: 53.0
new: 6.0

path: .spaces[1].metrics.cyclomatic.average
old: 38.0
new: 1.0

path: .spaces[1].metrics.cyclomatic.sum
old: 38.0
new: 1.0

path: .spaces[1].metrics.nargs.average
old: 7.0
new: null

path: .spaces[1].metrics.nargs.sum
old: 7.0
new: 0.0

Code

class HandlerServiceParent final : public mozilla::dom::PHandlerServiceParent {
 public:
  HandlerServiceParent();
  NS_INLINE_DECL_REFCOUNTING(HandlerServiceParent, final)

 private:
  virtual ~HandlerServiceParent();
  void ActorDestroy(ActorDestroyReason aWhy) override;

  mozilla::ipc::IPCResult RecvFillHandlerInfo(
      const HandlerInfo& aHandlerInfoData, const nsCString& aOverrideType,
      HandlerInfo* handlerInfoData) override;

  mozilla::ipc::IPCResult RecvGetMIMEInfoFromOS(const nsCString& aMIMEType,
                                                const nsCString& aExtension,
                                                nsresult* aRv,
                                                HandlerInfo* aHandlerInfoData,
                                                bool* aFound) override;

  mozilla::ipc::IPCResult RecvExists(const HandlerInfo& aHandlerInfo,
                                     bool* exists) override;

  mozilla::ipc::IPCResult RecvGetTypeFromExtension(
      const nsCString& aFileExtension, nsCString* type) override;

  mozilla::ipc::IPCResult RecvExistsForProtocolOS(
      const nsCString& aProtocolScheme, bool* aHandlerExists) override;

  mozilla::ipc::IPCResult RecvExistsForProtocol(
      const nsCString& aProtocolScheme, bool* aHandlerExists) override;

  mozilla::ipc::IPCResult RecvGetApplicationDescription(
      const nsCString& aScheme, nsresult* aRv, nsString* aDescription) override;

  /*
   * Limit the length of MIME types, filename extensions, and protocol
   * schemes we'll consider.
   */
  static const size_t MAX_MIMETYPE_LENGTH = 129; /* Per RFC 6838, type and
                                                    subtype should be limited
                                                    to 64 characters. We add
                                                    one more to account for
                                                    a '/' separator. */
  static const size_t MAX_EXT_LENGTH = 64;       /* Arbitratily chosen to be
                                                    longer than any known
                                                    extension */
  static const size_t MAX_SCHEME_LENGTH = 1024;  /* Arbitratily chosen to be
                                                    longer than any known
                                                    protocol scheme */
};