SysMO-DB/seek

View on GitHub
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js

Summary

Maintainability
F
3 wks
Test Coverage

Function ResizeableTextbox has 239 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function ResizeableTextbox(id, parent)
{
  var MINWIDTH = 125;
  var MINHEIGHT = 80;
  var MINSIZE = 38;
Severity: Major
Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js - About 1 day to fix

    File javascript.js has 470 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    function Position(x, y)
    {
      this.X = x;
      this.Y = y;
      
    Severity: Minor
    Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js - About 7 hrs to fix

      Function Position has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
      Open

      function Position(x, y)
      {
        this.X = x;
        this.Y = y;
        
      Severity: Minor
      Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js - About 6 hrs 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 ResizeableTextbox has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
      Open

      function ResizeableTextbox(id, parent)
      {
        var MINWIDTH = 125;
        var MINHEIGHT = 80;
        var MINSIZE = 38;
      Severity: Minor
      Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js - About 5 hrs 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 dragObject has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
      Open

      function dragObject(element, attachElement, lowerBound, upperBound, startCallback, moveCallback, endCallback, attachLater)
      {
        if(typeof(element) == "string")
          element = document.getElementById(element);
        if(element == null)
      Severity: Minor
      Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js - About 3 hrs 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 dragObject has 89 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function dragObject(element, attachElement, lowerBound, upperBound, startCallback, moveCallback, endCallback, attachLater)
      {
        if(typeof(element) == "string")
          element = document.getElementById(element);
        if(element == null)
      Severity: Major
      Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js - About 3 hrs to fix

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

        function Position(x, y)
        {
          this.X = x;
          this.Y = y;
          
        Severity: Major
        Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js - About 2 hrs to fix

          Function dragObject has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function dragObject(element, attachElement, lowerBound, upperBound, startCallback, moveCallback, endCallback, attachLater)
          Severity: Major
          Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js - About 1 hr to fix

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

            function Position(x, y)
            {
              this.X = x;
              this.Y = y;
              
            Severity: Major
            Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js and 1 other location - About 4 days to fix
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 1..87

            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 786.

            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

            function dragObject(element, attachElement, lowerBound, upperBound, startCallback, moveCallback, endCallback, attachLater)
            {
              if(typeof(element) == "string")
                element = document.getElementById(element);
              if(element == null)
            Severity: Major
            Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js and 1 other location - About 4 days to fix
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 156..269

            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 755.

            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

              function UpdatePositions()
              {
                if(_width < _minWidth)
                  _width = _minWidth;
                if(_width > _maxWidth)
            Severity: Major
            Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js and 1 other location - About 2 days to fix
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 399..428

            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 390.

            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

              function AddToDocument()
              {
                if(typeof(parent) == "string")
                  parent = document.getElementById(parent);
                
            Severity: Major
            Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js and 1 other location - About 1 day to fix
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 446..467

            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 214.

            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

              function UpdateBounds()
              {
                _rightHandleDrag.GetLowerBound().X = _minWidth - EDGE_THICKNESS;
                _rightHandleDrag.GetUpperBound().X = _maxWidth - EDGE_THICKNESS;
                _bottomHandleDrag.GetLowerBound().Y = _minHeight - EDGE_THICKNESS;
            Severity: Major
            Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js and 1 other location - About 7 hrs to fix
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 387..397

            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 184.

            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

            function absoluteCursorPostion(eventObj)
            {
              eventObj = eventObj ? eventObj : window.event;
              
              if(isNaN(window.scrollX))
            Severity: Major
            Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js and 1 other location - About 5 hrs to fix
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 145..154

            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 135.

            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

            function cancelEvent(e)
            {
              e = e ? e : window.event;
              if(e.stopPropagation)
                e.stopPropagation();
            Severity: Major
            Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js and 1 other location - About 3 hrs to fix
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 115..126

            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 98.

            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

            function hookEvent(element, eventName, callback)
            {
              if(typeof(element) == "string")
                element = document.getElementById(element);
              if(element == null)
            Severity: Major
            Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js and 1 other location - About 2 hrs to fix
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 89..101

            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 94.

            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

              function moveStart(eventObj, element)
              {
                if(element == _cornerHandle)
                  document.body.style.cursor = 'se-resize';
                else if(element == _bottomEdge)
            Severity: Major
            Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js and 1 other location - About 2 hrs to fix
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 352..360

            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 93.

            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

            function getMousePos(eventObj)
            {
              eventObj = eventObj ? eventObj : window.event;
              var pos;
              if(isNaN(eventObj.layerX))
            Severity: Major
            Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js and 1 other location - About 2 hrs to fix
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 128..137

            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 93.

            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

            function unhookEvent(element, eventName, callback)
            {
              if(typeof(element) == "string")
                element = document.getElementById(element);
              if(element == null)
            Severity: Major
            Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js and 1 other location - About 2 hrs to fix
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 103..113

            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 91.

            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

              function Listen(yes)
              {
                if(yes)
                {
                  _rightHandleDrag.StartListening();
            Severity: Major
            Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js and 1 other location - About 2 hrs to fix
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 430..444

            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 80.

            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 8 locations. Consider refactoring.
            Open

              this.SetMaxHeight = function(value)
              {
                value = parseInt(value);
                if(isNaN(value) || value < MINSIZE)
                  value = MINSIZE;
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 499..509
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 511..521
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 534..544
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 546..556
            app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 509..519
            app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 521..531
            app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 544..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 70.

            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 8 locations. Consider refactoring.
            Open

              this.SetMaxWidth = function(value)
              {
                value = parseInt(value);
                if(isNaN(value) || value < MINSIZE)
                  value = MINSIZE;
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 499..509
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 511..521
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 534..544
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 546..556
            app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 509..519
            app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 544..554
            app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 556..566

            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 70.

            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 8 locations. Consider refactoring.
            Open

              this.SetMinHeight = function(value)
              {
                value = parseInt(value);
                if(isNaN(value) || value < MINSIZE)
                  value = MINSIZE;
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 499..509
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 511..521
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 534..544
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 546..556
            app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 509..519
            app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 521..531
            app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 556..566

            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 70.

            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 8 locations. Consider refactoring.
            Open

              this.SetMinWidth = function(value)
              {
                value = parseInt(value);
                if(isNaN(value) || value < MINSIZE)
                  value = MINSIZE;
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 499..509
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 511..521
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 534..544
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 546..556
            app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 521..531
            app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 544..554
            app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 556..566

            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 70.

            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

              this.SetCurrentWidth = function(value)
              {
                value = parseInt(value);
                if(isNaN(value))
                  value = 0;
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 523..532
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 558..567
            app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 568..577

            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

              this.SetCurrentHeight = function(value)
              {
                value = parseInt(value);
                if(isNaN(value))
                  value = 0;
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 523..532
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 558..567
            app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 533..542

            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

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

            function getEventTarget(e)
            {
              e = e ? e : window.event;
              return e.target ? e.target : e.srcElement;
            }
            Severity: Minor
            Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js and 1 other location - About 35 mins to fix
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 139..143

            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 47.

            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

              function cornerHandleMove(newPos, element)
              {
                _width = newPos.X + EDGE_THICKNESS;
                _height = newPos.Y + EDGE_THICKNESS;
                UpdatePositions();
            Severity: Minor
            Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js and 1 other location - About 35 mins to fix
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 380..385

            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