hackedteam/fuzzer-windows

View on GitHub
fontfuzzer/parsers/TTF.py

Summary

Maintainability
F
1 mo
Test Coverage

File TTF.py has 1411 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import os
import sys
import math
import mmap
import random
Severity: Major
Found in fontfuzzer/parsers/TTF.py - About 3 days to fix

    Function __init__ has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
    Open

        def __init__(self, filename, simpleParsing = False):
            font_handle = open(filename,'rb')
            self.filename = filename
            self.fontOffsetTable = FontOffsetTable(font_handle)
            self.fontOffsetTableLength = font_handle.tell()
    Severity: Minor
    Found in fontfuzzer/parsers/TTF.py - 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 __init__ has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

            def __init__(self, handle, header):
    
                self.bytecodeStartFileOffset = None
                self.bytecodeEndFileOffset   = None 
    
    
    Severity: Minor
    Found in fontfuzzer/parsers/TTF.py - 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 fuzzBufferBenFuzz has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

        def fuzzBufferBenFuzz(buf, fuzzFactor2):
            buf = list(buf)
    
    
            # a] mutations
    Severity: Minor
    Found in fontfuzzer/parsers/TTF.py - About 2 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 fuzzBytecode has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
    Open

        def fuzzBytecode(self, fileInMemory):
    
            print '[DD] Start fuzz GLYPH'
    
            if self.glyph.bytecodeStartFileOffset is None or self.glyph.bytecodeEndFileOffset is None:
    Severity: Minor
    Found in fontfuzzer/parsers/TTF.py - About 2 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 rebuildFont has 51 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def rebuildFont(self, tag, newTagTable, originalFontBuffer):
    
    
            assert len(originalFontBuffer) % 4 == 0, 'File must be 4 byte aligned'
            assert len(newTagTable) % 4 == 0, 'New table must be 4 byte aligned'
    Severity: Major
    Found in fontfuzzer/parsers/TTF.py - About 2 hrs to fix

      Function __init__ has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

              def __init__(self, handle, header):
                  self.endPtsOfCountour = []
                  for i in range(0, header.numberOfCountours):
                      self.endPtsOfCountour.append( unpack('>H', handle.read(2))[0] )
                  #    LOGGER.debug('\tend of countours: {}'.format(self.endPtsOfCountour[-1]) )
      Severity: Minor
      Found in fontfuzzer/parsers/TTF.py - About 1 hr 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 rebuildFont has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

          def rebuildFont(self, tag, newTagTable, originalFontBuffer):
      
      
              assert len(originalFontBuffer) % 4 == 0, 'File must be 4 byte aligned'
              assert len(newTagTable) % 4 == 0, 'New table must be 4 byte aligned'
      Severity: Minor
      Found in fontfuzzer/parsers/TTF.py - About 1 hr 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 __init__ has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def __init__(self, handle):
      
              self.version = unpack('>H', handle.read(2) )[0]
              self.xAvgCharWidth = unpack('>h', handle.read(2) )[0]
              self.usWeightClass = unpack('>H', handle.read(2) )[0]
      Severity: Minor
      Found in fontfuzzer/parsers/TTF.py - About 1 hr to fix

        Function __init__ has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def __init__(self, filename, simpleParsing = False):
                font_handle = open(filename,'rb')
                self.filename = filename
                self.fontOffsetTable = FontOffsetTable(font_handle)
                self.fontOffsetTableLength = font_handle.tell()
        Severity: Minor
        Found in fontfuzzer/parsers/TTF.py - About 1 hr to fix

          Function __init__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

                  def __init__(self, handle):
          
                      self.count          = unpack('>H', handle.read(2))[0]
                      #print 'Count {}'.format(self.count)
          
          
          Severity: Minor
          Found in fontfuzzer/parsers/TTF.py - About 45 mins 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 doHeadChecksum has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def doHeadChecksum(self, handle):
                  """
                  To calculate the checkSum for the 'head' table which itself includes the checkSumAdjustment entry for the entire font, do the following:
          
                  1] Set the checkSumAdjustment to 0.
          Severity: Minor
          Found in fontfuzzer/parsers/TTF.py - About 35 mins 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 __init__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def __init__(self, handle, isLong, numberOfRecords):
          
                  # 0 for short offsets, 1 for long
                  self.isLong = isLong
          
          
          Severity: Minor
          Found in fontfuzzer/parsers/TTF.py - About 25 mins 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

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

              def __init__(self, handle, fontTableDirectory):
          
                  self.tableVersionNumber = unpack('>l', handle.read(4) )[0]
                  self.ascender = unpack('>h', handle.read(2) )[0]
                  self.descender = unpack('>h', handle.read(2) )[0]
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 3 days to fix
          fontfuzzer/parsers/TTF.py on lines 1306..1324

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

          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

              def __init__(self, handle):
          
                  self.tableVersionNumber = unpack('>l', handle.read(4) )[0]
                  self.fontRevision       = unpack('>l', handle.read(4) )[0]
                  self.checkSumAdjustement= unpack('>L', handle.read(4) )[0]
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 3 days to fix
          fontfuzzer/parsers/TTF.py on lines 1961..1979

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

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

                  for i in range(0, len(table), 4):
                      if i == 8:
                          data = 0
                          checkSumAdjustement = unpack('>I', table[i:i+4] ) [0]
                      else:
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 2 other locations - About 6 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 845..852
          fontfuzzer/parsers/TTF.py on lines 2280..2287

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

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

                  for i in range(0, len(table), 4):
                      if i == 8:    # actually useless
                          data = 0  # set checkSumAdjustement to 0 in the read buffer
                          checkSumAdjustement = unpack('>I', table[i:i+4] ) [0]
                      else:
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 2 other locations - About 6 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 918..925
          fontfuzzer/parsers/TTF.py on lines 2280..2287

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

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

                  for i in range(0, len(table), 4):
                      if i == 8:    # actually useless
                          data = 0  # set checkSumAdjustement to 0 in the read buffer
                          checkSumAdjustement = unpack('>I', table[i:i+4] ) [0]
                      else:
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 2 other locations - About 6 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 845..852
          fontfuzzer/parsers/TTF.py on lines 918..925

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

          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

                          elif self.weHaveATwoByTwo():
                              self.xscale      = unpack('>h', handle.read(2) )[0]
                              self.scale01     = unpack('>h', handle.read(2) )[0]
                              self.scale10     = unpack('>h', handle.read(2) )[0]
                              self.yscale      = unpack('>h', handle.read(2) )[0]
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 5 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 2242..2247

          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

                  def __init__(self, handle):
          
                      self.bCharSet = unpack('>B', handle.read(1) )[0]
                      self.xRatio = unpack('>B', handle.read(1) )[0]
                      self.yStartRatio = unpack('>B', handle.read(1) )[0]
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 5 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 1544..1548

          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

                      for i in range(0, len(self.glyphFlags) ):
          
                          if self.glyphFlags[i].isXshortVectorSet():
                              self.xCoordinates.append( unpack('>B', handle.read(1)) [0] )
                          else:
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 5 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 1685..1690

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

          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

                      for i in range(0, len(self.glyphFlags) ):
          
                          if self.glyphFlags[i].isYshortVectorSet():
                              self.yCoordinates.append( unpack('>B', handle.read(1)) [0] )
                          else:
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 5 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 1677..1682

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

          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

                  for d in dirToPlainCopy:
          
                      offset = self.fontTableDirectories[d].offset
                      tmpLength = self.fontTableDirectories[d].length
          
          
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 5 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 402..411

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

          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

                  for d in dirToRebase:
                      offset = self.fontTableDirectories[d].offset
                      length = self.fontTableDirectories[d].length
          
          
          
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 5 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 324..334

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

          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

                  fname = 'testcases//' + \
                      os.path.basename(self.filename).split('.ttf')[0] + \
                      '-' + \
                      ''.join( random.choice(string.ascii_lowercase + string.digits) for x in range(8) ) + \
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 4 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 679..682

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

          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

                  fname = 'testcases//' + \
                      os.path.basename(self.filename).split('.ttf')[0] + \
                      '-' + \
                      ''.join( random.choice(string.ascii_lowercase + string.digits) for x in range(8) ) + \
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 4 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 542..545

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

          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 t == 'prep':
                          LOGGER.debug( '[*] Parsing table prep' )
                          font_handle.seek(self.fontTableDirectories['prep'].offset)
                          self.fontTableDirectories['prep'].table = PrepTable(font_handle, self.fontTableDirectories['prep'].length)   
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 3 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 231..234

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

          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 t == 'fpgm':
                          LOGGER.debug( '[*] Parsing table fpgm' )
                          font_handle.seek(self.fontTableDirectories['fpgm'].offset)
                          self.fontTableDirectories['fpgm'].table = FpgmTable(font_handle, self.fontTableDirectories['fpgm'].length)   
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 3 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 206..209

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

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

                      if t == 'name':
                          LOGGER.debug('parsing table name')
                          font_handle.seek(self.fontTableDirectories['name'].offset)
                          self.fontTableDirectories['name'].table = NameTable(font_handle)   
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 4 other locations - About 2 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 211..214
          fontfuzzer/parsers/TTF.py on lines 217..220
          fontfuzzer/parsers/TTF.py on lines 224..227
          fontfuzzer/parsers/TTF.py on lines 236..239

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

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

                      if t == 'EBSC':
                          LOGGER.debug( '[*] Parsing table EBSC' )
                          font_handle.seek(self.fontTableDirectories['EBSC'].offset)
                          self.fontTableDirectories['EBSC'].table = EBSCTable(font_handle)   
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 4 other locations - About 2 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 211..214
          fontfuzzer/parsers/TTF.py on lines 217..220
          fontfuzzer/parsers/TTF.py on lines 236..239
          fontfuzzer/parsers/TTF.py on lines 241..244

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

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

                      if t == 'EBDT':
                          LOGGER.debug( '[*] Parsing table EBDT' )
                          font_handle.seek(self.fontTableDirectories['EBDT'].offset)
                          self.fontTableDirectories['EBDT'].table = EBDTTable(font_handle)   
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 4 other locations - About 2 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 217..220
          fontfuzzer/parsers/TTF.py on lines 224..227
          fontfuzzer/parsers/TTF.py on lines 236..239
          fontfuzzer/parsers/TTF.py on lines 241..244

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

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

                      if t == 'kern':
                          LOGGER.debug('parsing table kern')
                          font_handle.seek(self.fontTableDirectories['kern'].offset)
                          self.fontTableDirectories['kern'].table = KernTable(font_handle)   
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 4 other locations - About 2 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 211..214
          fontfuzzer/parsers/TTF.py on lines 217..220
          fontfuzzer/parsers/TTF.py on lines 224..227
          fontfuzzer/parsers/TTF.py on lines 241..244

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

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

                      if t == 'EBLC':
                          LOGGER.debug( '[*] Parsing table EBLC' )
                          font_handle.seek(self.fontTableDirectories['EBLC'].offset)
                          self.fontTableDirectories['EBLC'].table = EBLCTable(font_handle)   
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 4 other locations - About 2 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 211..214
          fontfuzzer/parsers/TTF.py on lines 224..227
          fontfuzzer/parsers/TTF.py on lines 236..239
          fontfuzzer/parsers/TTF.py on lines 241..244

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

          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

                  class ClassTable():
          
                      def __init__(self, handle):
          
                          self.firstGlyph = unpack('>H', handle.read(2) )[0]
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 2 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 1949..1953

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

          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

              class LongHorMetric():
          
                  def __init__(self, handle):
                      self.advanceWidth = unpack('>H', handle.read(2))[0]
                      self.lsb = unpack('>h', handle.read(2))[0]
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 2 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 2056..2061

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

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

                  for i in range(0, len(table), 4):
                      data = unpack('>I', table[i:i+4] ) [0]
                      total_data += data
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 4 other locations - About 2 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 804..806
          fontfuzzer/parsers/TTF.py on lines 866..868
          fontfuzzer/parsers/TTF.py on lines 952..954
          fontfuzzer/parsers/TTF.py on lines 2304..2306

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

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

                  for i in range(0, len(newFileInMemory), 4):
                      data = unpack('>I', newFileInMemory[i:i+4])[0]
                      total_data += data
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 4 other locations - About 2 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 782..784
          fontfuzzer/parsers/TTF.py on lines 804..806
          fontfuzzer/parsers/TTF.py on lines 866..868
          fontfuzzer/parsers/TTF.py on lines 952..954

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

          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 j in range(numwrites):
                      rbyte = random.randrange(256)
                      rn = random.randrange(len(fileInMemory))
                      fileInMemory[rn] = "%c"%(rbyte);
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 2 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 2398..2401

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

          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 j in range(numwrites):
                      rbyte = random.randrange(256)
                      rn = random.randrange(len(fileInMemory))
                      fileInMemory[rn] = "%c"%(rbyte);
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 2 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 660..663

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

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

                  for i in range(0, len(newFileInMemory), 4):
                      data = unpack('>I', newFileInMemory[i:i+4])[0]
                      total_data += data
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 4 other locations - About 2 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 782..784
          fontfuzzer/parsers/TTF.py on lines 804..806
          fontfuzzer/parsers/TTF.py on lines 952..954
          fontfuzzer/parsers/TTF.py on lines 2304..2306

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

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

                  for i in range(0, len(font), 4):
                      data = unpack('>I', font[i:i+4] ) [0]
                      total_data += data
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 4 other locations - About 2 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 782..784
          fontfuzzer/parsers/TTF.py on lines 804..806
          fontfuzzer/parsers/TTF.py on lines 866..868
          fontfuzzer/parsers/TTF.py on lines 2304..2306

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

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

                  for i in range(0, len(table), 4):
                      data = unpack('>I', table[i:i+4] ) [0]
                      total_data += data
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 4 other locations - About 2 hrs to fix
          fontfuzzer/parsers/TTF.py on lines 782..784
          fontfuzzer/parsers/TTF.py on lines 866..868
          fontfuzzer/parsers/TTF.py on lines 952..954
          fontfuzzer/parsers/TTF.py on lines 2304..2306

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

          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

                  newFileInMemory = fileInMemory[0:headDirectoryOffsetWithinTheFile + 4] +  pack('>L', headTableChecksum) + \
                      fileInMemory[headDirectoryOffsetWithinTheFile + 8:]
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 857..858

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

          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

                  newFileInMemory = fileInMemory[0:headDirectoryOffsetWithinTheFile + 4] +  pack('>L', headTableChecksum) + \
                      fileInMemory[headDirectoryOffsetWithinTheFile + 8:]
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 2293..2294

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

          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

              def __init__(self, handle, numberOfInstructions):
                  self.instructions = []
          
                  for i in range(0, numberOfInstructions):
                      self.instructions.append(unpack('>B', handle.read(1)))
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 1250..1256

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

          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

          class CVTTable(FontTable):
          
              def __init__(self, handle, numberOfElements):
          
                  self.values = []
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 1268..1272

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

          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

                          for i in range(0, self.segCountX2 / 2 ):
                              self.endCount.append(unpack('>H', handle.read(2) )[0])
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 3 other locations - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 1885..1886
          fontfuzzer/parsers/TTF.py on lines 1889..1890
          fontfuzzer/parsers/TTF.py on lines 1893..1894

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

                          for i in range(0, self.segCountX2 / 2 ):
                              self.idRangeOffset.append(unpack('>H', handle.read(2) )[0])
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 3 other locations - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 1878..1879
          fontfuzzer/parsers/TTF.py on lines 1885..1886
          fontfuzzer/parsers/TTF.py on lines 1889..1890

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

                          for i in range(0, self.segCountX2 / 2 ):
                              self.startCount.append(unpack('>H', handle.read(2) )[0])
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 3 other locations - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 1878..1879
          fontfuzzer/parsers/TTF.py on lines 1889..1890
          fontfuzzer/parsers/TTF.py on lines 1893..1894

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

                          for i in range(0, self.segCountX2 / 2 ):
                              self.idDelta.append(unpack('>H', handle.read(2) )[0])
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 3 other locations - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 1878..1879
          fontfuzzer/parsers/TTF.py on lines 1885..1886
          fontfuzzer/parsers/TTF.py on lines 1893..1894

          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

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

                  fileInMemory = fileInMemory[:headTableOffset + 8] + pack('>I', 0 ) + \
                      fileInMemory[headTableOffset  + 12:]
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 2273..2274

          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

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

                  newFileInMemory = newFileInMemory[:headTableOffset + 8] + pack('>I',newCheckSumAdjustement ) + \
                      newFileInMemory[headTableOffset  + 12:]
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 877..878

          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

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

                  newFileInMemory = newFileInMemory[:headTableOffset + 8] + pack('>I',newCheckSumAdjustement ) + \
                      newFileInMemory[headTableOffset  + 12:]
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 2315..2316

          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

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

                  fileInMemory = fileInMemory[:headTableOffset + 8] + pack('>I', 0 ) + \
                      fileInMemory[headTableOffset  + 12:]
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 838..839

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

                          fileMod = fileInMemory[0:table.offset] + buffer + fileInMemory[table.length + table.offset:]
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 762..762

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

          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

                  final_data = fileInMemory[0:self.offset] + output + fileInMemory[self.offset+self.length:]
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 583..583

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

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

                          for i in range(0, self.entryCount):
                              self.glyphIdArray.append( unpack('>H', handle.read(2))[0] )            
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 6 other locations - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 1504..1506
          fontfuzzer/parsers/TTF.py on lines 1627..1628
          fontfuzzer/parsers/TTF.py on lines 1645..1646
          fontfuzzer/parsers/TTF.py on lines 2185..2186
          fontfuzzer/parsers/TTF.py on lines 2205..2206
          fontfuzzer/parsers/TTF.py on lines 2234..2235

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

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

                      for i in range(0, self.length):
                          self.string.append( unpack('>c', handle.read(1) ) [0] )
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 6 other locations - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 1504..1506
          fontfuzzer/parsers/TTF.py on lines 1627..1628
          fontfuzzer/parsers/TTF.py on lines 1645..1646
          fontfuzzer/parsers/TTF.py on lines 1913..1914
          fontfuzzer/parsers/TTF.py on lines 2185..2186
          fontfuzzer/parsers/TTF.py on lines 2234..2235

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

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

                                  try:
                                      for i in range(0, self.numInstr):
                                          self.instr.append( unpack('>b', handle.read(1) ) [0] )
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 6 other locations - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 1627..1628
          fontfuzzer/parsers/TTF.py on lines 1645..1646
          fontfuzzer/parsers/TTF.py on lines 1913..1914
          fontfuzzer/parsers/TTF.py on lines 2185..2186
          fontfuzzer/parsers/TTF.py on lines 2205..2206
          fontfuzzer/parsers/TTF.py on lines 2234..2235

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

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

                      for i in range(0, self.numGlyphs):
                          self.glyphNameIndex.append( unpack('>H', handle.read(2) )[0] )
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 6 other locations - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 1504..1506
          fontfuzzer/parsers/TTF.py on lines 1627..1628
          fontfuzzer/parsers/TTF.py on lines 1645..1646
          fontfuzzer/parsers/TTF.py on lines 1913..1914
          fontfuzzer/parsers/TTF.py on lines 2205..2206
          fontfuzzer/parsers/TTF.py on lines 2234..2235

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

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

                  for i in range(0, self.numRatios):
                      self.offset.append( unpack('>H', handle.read(2) ) [0] )
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 6 other locations - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 1504..1506
          fontfuzzer/parsers/TTF.py on lines 1627..1628
          fontfuzzer/parsers/TTF.py on lines 1645..1646
          fontfuzzer/parsers/TTF.py on lines 1913..1914
          fontfuzzer/parsers/TTF.py on lines 2185..2186
          fontfuzzer/parsers/TTF.py on lines 2205..2206

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

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

                      for i in range(0, self.instructionLength):
                          self.instructions.append( unpack('>B', handle.read(1) ) [0] )
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 6 other locations - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 1504..1506
          fontfuzzer/parsers/TTF.py on lines 1627..1628
          fontfuzzer/parsers/TTF.py on lines 1913..1914
          fontfuzzer/parsers/TTF.py on lines 2185..2186
          fontfuzzer/parsers/TTF.py on lines 2205..2206
          fontfuzzer/parsers/TTF.py on lines 2234..2235

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

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

                      for i in range(0, header.numberOfCountours):
                          self.endPtsOfCountour.append( unpack('>H', handle.read(2))[0] )
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 6 other locations - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 1504..1506
          fontfuzzer/parsers/TTF.py on lines 1645..1646
          fontfuzzer/parsers/TTF.py on lines 1913..1914
          fontfuzzer/parsers/TTF.py on lines 2185..2186
          fontfuzzer/parsers/TTF.py on lines 2205..2206
          fontfuzzer/parsers/TTF.py on lines 2234..2235

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

          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

                  for i in range(0, numberOfInstructions):
                      self.instructions.append( unpack('>B', handle.read(1))[0])
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 1233..1235

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

          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 self.isLong:
                      for i in range(0, numberOfRecords):
                          self.offsets.append( unpack('>L', handle.read(4) ) [0] )
          Severity: Major
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 1 hr to fix
          fontfuzzer/parsers/TTF.py on lines 1107..1108

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

          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

                  numwrites = random.randrange( math.ceil( (float(len(fileInMemory) ) / fuzzFactor) ) )  + 1
          Severity: Minor
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 55 mins to fix
          fontfuzzer/parsers/TTF.py on lines 655..655

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

          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

                  numwrites = random.randrange( math.ceil( (float(len(fileInMemory)) / FuzzFactor) ) ) +1
          Severity: Minor
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 55 mins to fix
          fontfuzzer/parsers/TTF.py on lines 2387..2387

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

          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

                  while fuzzFactor < 1:
                      fuzzFactor = random.random() * random.random() * 10    
          Severity: Minor
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 45 mins to fix
          fontfuzzer/parsers/TTF.py on lines 2438..2439

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

          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

                  while fuzzFactor < 1:
                      fuzzFactor = random.random() * random.random() * 10    
          Severity: Minor
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 45 mins to fix
          fontfuzzer/parsers/TTF.py on lines 2480..2481

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

          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

                  newFont = newFont[:lengthOffsetWithinFontDirectoryTable] + \
                      newLength + \
                      newFont[lengthOffsetWithinFontDirectoryTable+4:]
          Severity: Minor
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 45 mins to fix
          fontfuzzer/parsers/TTF.py on lines 435..437

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

          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

                      newFont = newFont[:offsetOffsetWithinFontDirectoryTable] + \
                          newLength + \
                          newFont[offsetOffsetWithinFontDirectoryTable+4:]
          Severity: Minor
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 45 mins to fix
          fontfuzzer/parsers/TTF.py on lines 392..394

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

          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 k in keys:
          
                      newFont += originalFontBuffer[k:offsetLength[k] + k]
          Severity: Minor
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 35 mins to fix
          fontfuzzer/parsers/TTF.py on lines 342..343

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

          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 k in keys:
                      newFont += originalFontBuffer[k:offsetLength[k] + k]
          Severity: Minor
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 35 mins to fix
          fontfuzzer/parsers/TTF.py on lines 420..422

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

          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

                  headTableOffset = unpack('>L', fileInMemory[headDirectoryOffset + 8: headDirectoryOffset + 12 ])[0]
          Severity: Minor
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 30 mins to fix
          fontfuzzer/parsers/TTF.py on lines 2270..2270

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

          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

                  checksumLength = ( unpack('>L', fileInMemory[headDirectoryOffset + 12:headDirectoryOffset + 16])[0] + 3 ) & ~3
          Severity: Minor
          Found in fontfuzzer/parsers/TTF.py and 1 other location - About 30 mins to fix
          fontfuzzer/parsers/TTF.py on lines 2263..2263

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

          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