original_docstring: Parse a mitigates string.
  
          Parse a @mitigates tag string using the defined regular expression and add the elements
          to the internal data structure.
  
          @mitigates is used to record the fact that the related code mitigates the referened threat.
  
          For example:
  
              @mitigates @crypto:@hash against @cwe_123_insufficient_entropy with use of cryptographically random salt
  
          Args:
              mitigates: Mitigation string to parse.
              source: PTSSource instance for the @mitigates line.
  
          Returns:
              Nothing.
          
docstring: Parse a mitigates string.
  Parse a @mitigates tag string using the defined regular expression and add the elements
  to the internal data structure.
  
  @mitigates is used to record the fact that the related code mitigates the referened threat.
  
  For example.
  
  @mitigates @crypto:@hash against @cwe_123_insufficient_entropy with use of cryptographically random salt
docstring_tokens: Parse a mitigates string . Parse a @mitigates tag string using the defined regular expression and add the elements to the internal data structure . @mitigates is used to record the fact that the related code mitigates the referened threat . For example . @mitigates @crypto : @hash against @cwe_123_insufficient_entropy with use of cryptographically random salt
code: def _parse_mitigates(self, mitigates, source):
          """Parse a mitigates string.
  
          Parse a @mitigates tag string using the defined regular expression and add the elements
          to the internal data structure.
  
          @mitigates is used to record the fact that the related code mitigates the referened threat.
  
          For example:
  
              @mitigates @crypto:@hash against @cwe_123_insufficient_entropy with use of cryptographically random salt
  
          Args:
              mitigates: Mitigation string to parse.
              source: PTSSource instance for the @mitigates line.
  
          Returns:
              Nothing.
          """
          match = re.findall(self.parse_patterns["mitigates"], mitigates, re.M | re.I)
          if match:
              boundary = remove_excessive_space(match[0][0])
              component = remove_excessive_space(match[0][1])
              threat = remove_excessive_space(match[0][2])
              mitigation_text = remove_excessive_space(match[0][3])
  
              boundary_id = self.add_boundary(boundary)
              component_id = self.add_component(boundary_id, component)
              threat_id = self.add_threat(threat)
  
              mitigation_id = text_to_identifier(mitigation_text)
  
              if mitigation_id not in self.mitigations:
                  self.mitigations[mitigation_id] = []
  
              mitigation = PTSMitigation(boundary_id, component_id, threat_id, mitigation_text, [])
              mitigation.source = source 
              self.mitigations[mitigation_id].append(mitigation)
          else:
              raise ValueError("@mitigates line contains an invalid pattern: {}".format(source))
code_tokens: def _parse_mitigates ( self , mitigates , source ) : match = re . findall ( self . parse_patterns [ "mitigates" ] , mitigates , re . M | re . I ) if match : boundary = remove_excessive_space ( match [ 0 ] [ 0 ] ) component = remove_excessive_space ( match [ 0 ] [ 1 ] ) threat = remove_excessive_space ( match [ 0 ] [ 2 ] ) mitigation_text = remove_excessive_space ( match [ 0 ] [ 3 ] ) boundary_id = self . add_boundary ( boundary ) component_id = self . add_component ( boundary_id , component ) threat_id = self . add_threat ( threat ) mitigation_id = text_to_identifier ( mitigation_text ) if mitigation_id not in self . mitigations : self . mitigations [ mitigation_id ] = [ ] mitigation = PTSMitigation ( boundary_id , component_id , threat_id , mitigation_text , [ ] ) mitigation . source = source self . mitigations [ mitigation_id ] . append ( mitigation ) else : raise ValueError ( "@mitigates line contains an invalid pattern: {}" . format ( source ) )
short_docstring: Parse a mitigates string.
short_docstring_tokens: Parse a mitigates string .
comment: """Parse a mitigates string.
  
          Parse a @mitigates tag string using the defined regular expression and add the elements
          to the internal data structure.
  
          @mitigates is used to record the fact that the related code mitigates the referened threat.
  
          For example:
  
              @mitigates @crypto:@hash against @cwe_123_insufficient_entropy with use of cryptographically random salt
  
          Args:
              mitigates: Mitigation string to parse.
              source: PTSSource instance for the @mitigates line.
  
          Returns:
              Nothing.
          """