# Buggy code
def Match(self, registry_key):
    """Determines if a Windows Registry key matches the filter.

    Args:
      registry_key: a Windows Registry key (instance of
                    dfwinreg.WinRegistryKey).

    Returns:
      A boolean value that indicates a match.
    """
    key_path = registry_key.path.upper()
    # Prevent this filter matching non-string MRUListEx values.
    for ignore_key_path_suffix in self._IGNORE_KEY_PATH_SUFFIXES:
        if key_path.endswith(ignore_key_path_suffix):
            return False

    if "\\BagMRU\\".upper() in key_path:
        return False

    return super(MRUListExStringRegistryKeyFilter, self).Match(registry_key)


# Traceback (WinRegistryValueError)
2015-11-27 16:57:21,504 [WARNING] (Worker_01 ) PID:10600 <worker> Unhandled exception while processing path spec: type: OS, location: /home/onager/code/plaso/test_data/SOFTWARE-RunTests
2015-11-27 16:57:21,504 [ERROR] (Worker_01 ) PID:10600 <worker> Unable to read data from value: lParam with error: pyregf_value_get_data_as_integer: unable to retrieve integer value. libregf_value_type_copy_to_32bit: invalid value data size value out of bounds. libregf_value_get_value_32bit: unable to set 32-bit value.
Traceback (most recent call last):
File "/home/onager/code/plaso/plaso/engine/worker.py", line 570, in _ProcessPathSpec
self._ProcessFileEntry(file_entry, data_stream_name=data_stream_name)
File "/home/onager/code/plaso/plaso/engine/worker.py", line 523, in _ProcessFileEntry
self._ProcessDataStream(file_entry, data_stream_name=data_stream_name)
File "/home/onager/code/plaso/plaso/engine/worker.py", line 464, in _ProcessDataStream
parser_object, file_entry, file_object=file_object)
File "/home/onager/code/plaso/plaso/engine/worker.py", line 261, in _ParseFileEntryWithParser
parser_object.Parse(self._parser_mediator, file_object)
File "/home/onager/code/plaso/plaso/parsers/interface.py", line 288, in Parse
self.ParseFileObject(parser_mediator, file_object, **kwargs)
File "/home/onager/code/plaso/plaso/parsers/winreg.py", line 119, in ParseFileObject
parser_mediator, registry_key)
File "/home/onager/code/plaso/plaso/parsers/winreg_plugins/interface.py", line 280, in UpdateChainAndProcess
self.Process(parser_mediator, registry_key, **kwargs)
File "/home/onager/code/plaso/plaso/parsers/winreg_plugins/interface.py", line 265, in Process
self.GetEntries(parser_mediator, registry_key, **kwargs)
File "/home/onager/code/plaso/plaso/parsers/winreg_plugins/default.py", line 50, in GetEntries
registry_value.data_type_string, registry_value.GetData())
File "/home/onager/code/plaso/plaso/dfwinreg/regf.py", line 175, in GetData
self._pyregf_value.name, exception))
WinRegistryValueError: Unable to read data from value: lParam with error: pyregf_value_get_data_as_integer: unable to retrieve integer value. libregf_value_type_copy_to_32bit: invalid value data size value out of bounds. libregf_value_get_value_32bit: unable to set 32-bit value.

# Fixed code
def Match(self, registry_key):
    """Determines if a Windows Registry key matches the filter.

    Args:
      registry_key: a Windows Registry key (instance of
                    dfwinreg.WinRegistryKey).

    Returns:
      A boolean value that indicates a match.
    """
    key_path_upper = registry_key.path.upper()
    # Prevent this filter matching non-string MRUListEx values.
    for ignore_key_path_suffix in self._IGNORE_KEY_PATH_SUFFIXES:
        if key_path_upper.endswith(ignore_key_path_suffix):
            return False

    for ignore_key_path_segment in self._IGNORE_KEY_PATH_SEGMENTS:
        if ignore_key_path_segment in key_path_upper:
            return False

    return super(MRUListExStringRegistryKeyFilter, self).Match(registry_key)