michielbdejong/solid-panes

View on GitHub
src/microblogPane/microblogPane.js

Summary

Maintainability
F
3 wks
Test Coverage

Function render has a Cognitive Complexity of 330 (exceeds 5 allowed). Consider refactoring.
Open

  render: function (s, doc) {
    //* **********************************************
    // NAMESPACES  SECTION
    //* **********************************************
    var SIOC = UI.rdf.Namespace('http://rdfs.org/sioc/ns#')
Severity: Minor
Found in src/microblogPane/microblogPane.js - About 6 days to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function render has 1198 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  render: function (s, doc) {
    //* **********************************************
    // NAMESPACES  SECTION
    //* **********************************************
    var SIOC = UI.rdf.Namespace('http://rdfs.org/sioc/ns#')
Severity: Major
Found in src/microblogPane/microblogPane.js - About 5 days to fix

    File microblogPane.js has 1212 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     Microblog pane
     Charles McKenzie <charles2@mit.edu>
    */
    /* global alert */
    Severity: Major
    Found in src/microblogPane/microblogPane.js - About 3 days to fix

      Function header has 335 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          Pane.prototype.header = function (s, doc) {
            var that = this
            function lsFollowUser () {
              var myUser = kb.sym(mb.getMyURI())
              // var Ifollow = that.Ifollow
      Severity: Major
      Found in src/microblogPane/microblogPane.js - About 1 day to fix

        Function generatePost has 253 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            Pane.prototype.generatePost = function (post, _me) {
              /*
              generatePost - Creates and formats microblog posts
                  post - symbol of the uri the post in question
          */
        Severity: Major
        Found in src/microblogPane/microblogPane.js - About 1 day to fix

          Function generateNewMB has 129 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              Microblog.prototype.generateNewMB = function (id, name, avatar, loc) {
                var host = loc + '/' + id
                var rememberMicroblog = function () {
                  UI.preferences.set('acct', host + '#' + id)
                }
          Severity: Major
          Found in src/microblogPane/microblogPane.js - About 5 hrs to fix

            Function mbSubmitPost has 99 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  var mbSubmitPost = function () {
                    var meta = {
                      recipients: []
                    }
                    // user has selected a microblog to post to
            Severity: Major
            Found in src/microblogPane/microblogPane.js - About 3 hrs to fix

              Function mbDeletePost has 84 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    var mbDeletePost = function (evt) {
                      var lsconfirmNo = function () {
                        doc
                          .getElementById('notify-container')
                          .removeChild(xconfirmDeletionDialog)
              Severity: Major
              Found in src/microblogPane/microblogPane.js - About 3 hrs to fix

                Function statusUpdate has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    Microblog.prototype.statusUpdate = function (
                      statusMsg,
                      callback,
                      replyTo,
                      meta
                Severity: Major
                Found in src/microblogPane/microblogPane.js - About 3 hrs to fix

                  Function Pane has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      var Pane = function (s, doc, microblogPane) {
                        var TabManager = function (doc) {
                          this.tablist = {}
                          this.doc = doc
                          this.tabView = doc.createElement('ul')
                  Severity: Major
                  Found in src/microblogPane/microblogPane.js - About 2 hrs to fix

                    Function lsCreateNewMB has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          var lsCreateNewMB = function (_evt) {
                            // disable the create new microblog button.
                            // then prefills the information.
                            xcreateNewMB.disabled = true
                            var xcmb = doc.createElement('div')
                    Severity: Major
                    Found in src/microblogPane/microblogPane.js - About 2 hrs to fix

                      Function lsFollowUser has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                            function lsFollowUser () {
                              var myUser = kb.sym(mb.getMyURI())
                              // var Ifollow = that.Ifollow
                              var username = that.creator.name
                              var mbconfirmFollow = function (uri, success, _msg) {
                      Severity: Major
                      Found in src/microblogPane/microblogPane.js - About 2 hrs to fix

                        Function notificationsView has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            Pane.prototype.notificationsView = function (s, doc) {
                              var postNotificationContainer = doc.createElement('div')
                              postNotificationContainer.id = 'postNotificationContainer'
                              postNotificationContainer.className =
                                'notification-container view-container'
                        Severity: Minor
                        Found in src/microblogPane/microblogPane.js - About 1 hr to fix

                          Function reallyDelete has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  var reallyDelete = function () {
                                    // callback after deletion
                                    var mbconfirmDeletePost = function (a, success) {
                                      if (success) {
                                        that.notify('Post deleted.')
                          Severity: Minor
                          Found in src/microblogPane/microblogPane.js - About 1 hr to fix

                            Function getPost has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                Microblog.prototype.getPost = function (uri) {
                                  var Post = {}
                                  // date ----------
                                  var postLink = new Date(kb.anyValue(uri, terms('created')))
                                  var h = postLink.getHours()
                            Severity: Minor
                            Found in src/microblogPane/microblogPane.js - About 1 hr to fix

                              Function mbconfirmFollow has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      var mbconfirmFollow = function (uri, success, _msg) {
                                        if (success === true) {
                                          if (!that.Ifollow) {
                                            // prevent duplicate entries from being added to kb (because that was happening)
                                            if (
                              Severity: Minor
                              Found in src/microblogPane/microblogPane.js - About 1 hr to fix

                                Function streamView has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    Pane.prototype.streamView = function (s, doc) {
                                      var postContainer = doc.createElement('div')
                                      postContainer.id = 'postContainer'
                                      postContainer.className = 'post-container view-container active'
                                      var mbPosts = []
                                Severity: Minor
                                Found in src/microblogPane/microblogPane.js - About 1 hr to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                  for (var r in recipient[1]) {
                                                    xrecipients.appendChild(recipChoice(recipient[1][r], r))
                                                  }
                                  Severity: Major
                                  Found in src/microblogPane/microblogPane.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                    if (
                                                      String(
                                                        kb.any(kb.sym(mb.getMyURI()), SIOC('id'))
                                                      ).toLowerCase() === atUser.toLowerCase()
                                                    ) {
                                    Severity: Major
                                    Found in src/microblogPane/microblogPane.js - About 45 mins to fix

                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                      Open

                                          Favorites.prototype.add = function (post, callback) {
                                            var batch = new UI.rdf.Statement(
                                              this.favoritesURI,
                                              SIOC('container_of'),
                                              kb.sym(post),
                                      Severity: Major
                                      Found in src/microblogPane/microblogPane.js and 1 other location - About 5 hrs to fix
                                      src/microblogPane/microblogPane.js on lines 112..125

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 137.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                      Open

                                          Favorites.prototype.remove = function (post, callback) {
                                            var batch = new UI.rdf.Statement(
                                              this.favoritesURI,
                                              SIOC('container_of'),
                                              kb.sym(post),
                                      Severity: Major
                                      Found in src/microblogPane/microblogPane.js and 1 other location - About 5 hrs to fix
                                      src/microblogPane/microblogPane.js on lines 98..111

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 137.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                      Open

                                            var notify = function (messageString) {
                                              var xmsg = doc.createElement('li')
                                              xmsg.className = 'notify'
                                              xmsg.innerHTML = messageString
                                              doc.getElementById('notify-container').appendChild(xmsg)
                                      Severity: Major
                                      Found in src/microblogPane/microblogPane.js and 1 other location - About 3 hrs to fix
                                      src/microblogPane/microblogPane.js on lines 545..554

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 97.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                      Open

                                          Pane.prototype.notify = function (messageString) {
                                            var xmsg = doc.createElement('li')
                                            xmsg.className = 'notify'
                                            xmsg.innerHTML = messageString
                                            doc.getElementById('notify-container').appendChild(xmsg)
                                      Severity: Major
                                      Found in src/microblogPane/microblogPane.js and 1 other location - About 3 hrs to fix
                                      src/microblogPane/microblogPane.js on lines 613..622

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 97.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                      Open

                                              if (mb.getMyURI() !== themaker.uri) {
                                                var xreplyButton = doc.createElement('input')
                                                xreplyButton.type = 'button'
                                                xreplyButton.value = 'reply'
                                                xreplyButton.className = 'reply'
                                      Severity: Major
                                      Found in src/microblogPane/microblogPane.js and 1 other location - About 1 hr to fix
                                      src/microblogPane/microblogPane.js on lines 1163..1169

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 64.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                      Open

                                              } else {
                                                var xdeleteButton = doc.createElement('input')
                                                xdeleteButton.type = 'button'
                                                xdeleteButton.value = 'Delete'
                                                xdeleteButton.className = 'reply'
                                      Severity: Major
                                      Found in src/microblogPane/microblogPane.js and 1 other location - About 1 hr to fix
                                      src/microblogPane/microblogPane.js on lines 1157..1163

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 64.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                      Open

                                              if (
                                                kb.whether(creators[c], RDF('type'), SIOC('User')) &&
                                                kb.whether(
                                                  kb.any(creators[c], SIOC('creator_of')),
                                                  RDF('type'),
                                      Severity: Major
                                      Found in src/microblogPane/microblogPane.js and 1 other location - About 1 hr to fix
                                      src/microblogPane/microblogPane.js on lines 513..523

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 63.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                      Open

                                              if (
                                                kb.whether(accounts[a], RDF('type'), SIOC('User')) &&
                                                kb.whether(
                                                  kb.any(accounts[a], SIOC('creator_of')),
                                                  RDF('type'),
                                      Severity: Major
                                      Found in src/microblogPane/microblogPane.js and 1 other location - About 1 hr to fix
                                      src/microblogPane/microblogPane.js on lines 886..899

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 63.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                      Open

                                                for (var triple in d) {
                                                  kb.add(
                                                    d[triple].subject,
                                                    d[triple].predicate,
                                                    d[triple].object,
                                      Severity: Major
                                      Found in src/microblogPane/microblogPane.js and 1 other location - About 1 hr to fix
                                      src/microblogPane/microblogPane.js on lines 708..715

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 59.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                      Open

                                                    for (var triple in d) {
                                                      kb.add(
                                                        d[triple].subject,
                                                        d[triple].predicate,
                                                        d[triple].object,
                                      Severity: Major
                                      Found in src/microblogPane/microblogPane.js and 1 other location - About 1 hr to fix
                                      src/microblogPane/microblogPane.js on lines 334..341

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 59.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                              new UI.rdf.Statement(
                                                kb.sym(host + '#' + id),
                                                SIOC('creator_of'),
                                                kb.sym(host + '#fav'),
                                                kb.sym(host)
                                      Severity: Major
                                      Found in src/microblogPane/microblogPane.js and 2 other locations - About 1 hr to fix
                                      src/microblogPane/microblogPane.js on lines 353..358
                                      src/microblogPane/microblogPane.js on lines 359..364

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 56.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                      Open

                                              new UI.rdf.Statement(
                                                kb.sym(host + '#mb'),
                                                SIOC('has_creator'),
                                                kb.sym(host + '#' + id),
                                                kb.sym(host)
                                      Severity: Major
                                      Found in src/microblogPane/microblogPane.js and 3 other locations - About 1 hr to fix
                                      src/microblogPane/microblogPane.js on lines 415..420
                                      src/microblogPane/microblogPane.js on lines 421..426
                                      src/microblogPane/microblogPane.js on lines 434..439

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 56.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                              new UI.rdf.Statement(
                                                kb.sym(host + '#' + id),
                                                SIOC('creator_of'),
                                                kb.sym(host + '#mb'),
                                                kb.sym(host)
                                      Severity: Major
                                      Found in src/microblogPane/microblogPane.js and 2 other locations - About 1 hr to fix
                                      src/microblogPane/microblogPane.js on lines 359..364
                                      src/microblogPane/microblogPane.js on lines 365..370

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 56.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                      Open

                                              new UI.rdf.Statement(
                                                kb.sym(host + '#mbn'),
                                                SIOC('topic'),
                                                kb.sym(host + '#' + id),
                                                kb.sym(host)
                                      Severity: Major
                                      Found in src/microblogPane/microblogPane.js and 3 other locations - About 1 hr to fix
                                      src/microblogPane/microblogPane.js on lines 402..407
                                      src/microblogPane/microblogPane.js on lines 421..426
                                      src/microblogPane/microblogPane.js on lines 434..439

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 56.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                              new UI.rdf.Statement(
                                                kb.sym(host + '#' + id),
                                                SIOC('creator_of'),
                                                kb.sym(host + '#mbn'),
                                                kb.sym(host)
                                      Severity: Major
                                      Found in src/microblogPane/microblogPane.js and 2 other locations - About 1 hr to fix
                                      src/microblogPane/microblogPane.js on lines 353..358
                                      src/microblogPane/microblogPane.js on lines 365..370

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 56.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                      Open

                                              new UI.rdf.Statement(
                                                kb.sym(host + '#mbn'),
                                                SIOC('has_creator'),
                                                kb.sym(host + '#' + id),
                                                kb.sym(host)
                                      Severity: Major
                                      Found in src/microblogPane/microblogPane.js and 3 other locations - About 1 hr to fix
                                      src/microblogPane/microblogPane.js on lines 402..407
                                      src/microblogPane/microblogPane.js on lines 415..420
                                      src/microblogPane/microblogPane.js on lines 434..439

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 56.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                      Open

                                              new UI.rdf.Statement(
                                                kb.sym(host + '#fav'),
                                                SIOC('has_creator'),
                                                kb.sym(host + '#' + id),
                                                kb.sym(host)
                                      Severity: Major
                                      Found in src/microblogPane/microblogPane.js and 3 other locations - About 1 hr to fix
                                      src/microblogPane/microblogPane.js on lines 402..407
                                      src/microblogPane/microblogPane.js on lines 415..420
                                      src/microblogPane/microblogPane.js on lines 421..426

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 56.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                              new UI.rdf.Statement(
                                                kb.sym(host + '#fav'),
                                                RDF('type'),
                                                SIOCt('FavouriteThings'),
                                                kb.sym(host)
                                      Severity: Minor
                                      Found in src/microblogPane/microblogPane.js and 2 other locations - About 35 mins to fix
                                      src/microblogPane/microblogPane.js on lines 396..401
                                      src/microblogPane/microblogPane.js on lines 409..414

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 46.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                              new UI.rdf.Statement(
                                                kb.sym(host + '#mbn'),
                                                RDF('type'),
                                                SIOCt('Microblog'),
                                                kb.sym(host)
                                      Severity: Minor
                                      Found in src/microblogPane/microblogPane.js and 2 other locations - About 35 mins to fix
                                      src/microblogPane/microblogPane.js on lines 396..401
                                      src/microblogPane/microblogPane.js on lines 428..433

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 46.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                              new UI.rdf.Statement(
                                                kb.sym(host + '#mb'),
                                                RDF('type'),
                                                SIOCt('Microblog'),
                                                kb.sym(host)
                                      Severity: Minor
                                      Found in src/microblogPane/microblogPane.js and 2 other locations - About 35 mins to fix
                                      src/microblogPane/microblogPane.js on lines 409..414
                                      src/microblogPane/microblogPane.js on lines 428..433

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 46.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      There are no issues that match your filters.

                                      Category
                                      Status