prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  ABIEncoderV2 flagged as solidity version
  The following Solidity code is flagged as being different solidity versions:
  
  ```sol
  pragma solidity 0.5.12;
  pragma experimental ABIEncoderV2;
  ```
  
  Outputs:
  
  ```
  INFO:Detectors:
  Different versions of Solidity is used in :
  	- Version used: ['0.5.12', 'ABIEncoderV2']
  	- 0.5.12 (Contract.sol#1)
  	- ABIEncoderV2 (Contract.sol#2)
  ```
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `slither/core/declarations/pragma_directive.py`
  Content:
  ```
  1 from slither.core.source_mapping.source_mapping import SourceMapping
  2 
  3 class Pragma(SourceMapping):
  4 
  5     def __init__(self, directive):
  6         super(Pragma, self).__init__()
  7         self._directive = directive
  8 
  9     @property
  10     def directive(self):
  11         '''
  12             list(str)
  13         '''
  14         return self._directive
  15 
  16     @property
  17     def version(self):
  18         return ''.join(self.directive[1:])
  19 
  20     @property
  21     def name(self):
  22         return self.version
  23 
  24     def __str__(self):
  25         return 'pragma '+''.join(self.directive)
  26
  ```
  
  Path: `slither/detectors/attributes/constant_pragma.py`
  Content:
  ```
  1 """
  2     Check that the same pragma is used in all the files
  3 """
  4 
  5 from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
  6 from slither.formatters.attributes.constant_pragma import format
  7 
  8 
  9 class ConstantPragma(AbstractDetector):
  10     """
  11     Check that the same pragma is used in all the files
  12     """
  13 
  14     ARGUMENT = 'pragma'
  15     HELP = 'If different pragma directives are used'
  16     IMPACT = DetectorClassification.INFORMATIONAL
  17     CONFIDENCE = DetectorClassification.HIGH
  18 
  19     WIKI = 'https://github.com/crytic/slither/wiki/Detector-Documentation#different-pragma-directives-are-used'
  20 
  21 
  22     WIKI_TITLE = 'Different pragma directives are used'
  23     WIKI_DESCRIPTION = 'Detect if different Solidity versions are used.'
  24     WIKI_RECOMMENDATION = 'Use one Solidity version.'
  25 
  26     def _detect(self):
  27         results = []
  28         pragma = self.slither.pragma_directives
  29         versions = [p.version for p in pragma]
  30         versions = sorted(list(set(versions)))
  31 
  32         if len(versions) > 1:
  33             info = [f"Different versions of Solidity is used in {self.filename}:\n"]
  34             info += [f"\t- Version used: {[str(v) for v in versions]}\n"]
  35 
  36             for p in pragma:
  37                 info += ["\t- ", p, "\n"]
  38 
  39             res = self.generate_result(info)
  40 
  41             results.append(res)
  42 
  43         return results
  44 
  45     @staticmethod
  46     def _format(slither, result):
  47         format(slither, result)
  48
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/slither/core/declarations/pragma_directive.py b/slither/core/declarations/pragma_directive.py
  --- a/slither/core/declarations/pragma_directive.py
  +++ b/slither/core/declarations/pragma_directive.py
  @@ -21,5 +21,11 @@
       def name(self):
           return self.version
   
  +    @property
  +    def is_solidity_version(self):
  +        if len(self._directive) > 0:
  +            return self._directive[0].lower() == 'solidity'
  +        return False
  +
       def __str__(self):
           return 'pragma '+''.join(self.directive)
  diff --git a/slither/detectors/attributes/constant_pragma.py b/slither/detectors/attributes/constant_pragma.py
  --- a/slither/detectors/attributes/constant_pragma.py
  +++ b/slither/detectors/attributes/constant_pragma.py
  @@ -26,7 +26,7 @@
       def _detect(self):
           results = []
           pragma = self.slither.pragma_directives
  -        versions = [p.version for p in pragma]
  +        versions = [p.version for p in pragma if p.is_solidity_version]
           versions = sorted(list(set(versions)))
   
           if len(versions) > 1:
  
verification_info: {"golden_diff": "diff --git a/slither/core/declarations/pragma_directive.py b/slither/core/declarations/pragma_directive.py\n--- a/slither/core/declarations/pragma_directive.py\n+++ b/slither/core/declarations/pragma_directive.py\n@@ -21,5 +21,11 @@\n     def name(self):\n         return self.version\n \n+    @property\n+    def is_solidity_version(self):\n+        if len(self._directive) > 0:\n+            return self._directive[0].lower() == 'solidity'\n+        return False\n+\n     def __str__(self):\n         return 'pragma '+''.join(self.directive)\ndiff --git a/slither/detectors/attributes/constant_pragma.py b/slither/detectors/attributes/constant_pragma.py\n--- a/slither/detectors/attributes/constant_pragma.py\n+++ b/slither/detectors/attributes/constant_pragma.py\n@@ -26,7 +26,7 @@\n     def _detect(self):\n         results = []\n         pragma = self.slither.pragma_directives\n-        versions = [p.version for p in pragma]\n+        versions = [p.version for p in pragma if p.is_solidity_version]\n         versions = sorted(list(set(versions)))\n \n         if len(versions) > 1:\n", "issue": "ABIEncoderV2 flagged as solidity version\nThe following Solidity code is flagged as being different solidity versions:\r\n\r\n```sol\r\npragma solidity 0.5.12;\r\npragma experimental ABIEncoderV2;\r\n```\r\n\r\nOutputs:\r\n\r\n```\r\nINFO:Detectors:\r\nDifferent versions of Solidity is used in :\r\n\t- Version used: ['0.5.12', 'ABIEncoderV2']\r\n\t- 0.5.12 (Contract.sol#1)\r\n\t- ABIEncoderV2 (Contract.sol#2)\r\n```\n", "before_files": [{"content": "from slither.core.source_mapping.source_mapping import SourceMapping\n\nclass Pragma(SourceMapping):\n\n    def __init__(self, directive):\n        super(Pragma, self).__init__()\n        self._directive = directive\n\n    @property\n    def directive(self):\n        '''\n            list(str)\n        '''\n        return self._directive\n\n    @property\n    def version(self):\n        return ''.join(self.directive[1:])\n\n    @property\n    def name(self):\n        return self.version\n\n    def __str__(self):\n        return 'pragma '+''.join(self.directive)\n", "path": "slither/core/declarations/pragma_directive.py"}, {"content": "\"\"\"\n    Check that the same pragma is used in all the files\n\"\"\"\n\nfrom slither.detectors.abstract_detector import AbstractDetector, DetectorClassification\nfrom slither.formatters.attributes.constant_pragma import format\n\n\nclass ConstantPragma(AbstractDetector):\n    \"\"\"\n    Check that the same pragma is used in all the files\n    \"\"\"\n\n    ARGUMENT = 'pragma'\n    HELP = 'If different pragma directives are used'\n    IMPACT = DetectorClassification.INFORMATIONAL\n    CONFIDENCE = DetectorClassification.HIGH\n\n    WIKI = 'https://github.com/crytic/slither/wiki/Detector-Documentation#different-pragma-directives-are-used'\n\n\n    WIKI_TITLE = 'Different pragma directives are used'\n    WIKI_DESCRIPTION = 'Detect if different Solidity versions are used.'\n    WIKI_RECOMMENDATION = 'Use one Solidity version.'\n\n    def _detect(self):\n        results = []\n        pragma = self.slither.pragma_directives\n        versions = [p.version for p in pragma]\n        versions = sorted(list(set(versions)))\n\n        if len(versions) > 1:\n            info = [f\"Different versions of Solidity is used in {self.filename}:\\n\"]\n            info += [f\"\\t- Version used: {[str(v) for v in versions]}\\n\"]\n\n            for p in pragma:\n                info += [\"\\t- \", p, \"\\n\"]\n\n            res = self.generate_result(info)\n\n            results.append(res)\n\n        return results\n\n    @staticmethod\n    def _format(slither, result):\n        format(slither, result)\n", "path": "slither/detectors/attributes/constant_pragma.py"}], "after_files": [{"content": "from slither.core.source_mapping.source_mapping import SourceMapping\n\nclass Pragma(SourceMapping):\n\n    def __init__(self, directive):\n        super(Pragma, self).__init__()\n        self._directive = directive\n\n    @property\n    def directive(self):\n        '''\n            list(str)\n        '''\n        return self._directive\n\n    @property\n    def version(self):\n        return ''.join(self.directive[1:])\n\n    @property\n    def name(self):\n        return self.version\n\n    @property\n    def is_solidity_version(self):\n        if len(self._directive) > 0:\n            return self._directive[0].lower() == 'solidity'\n        return False\n\n    def __str__(self):\n        return 'pragma '+''.join(self.directive)\n", "path": "slither/core/declarations/pragma_directive.py"}, {"content": "\"\"\"\n    Check that the same pragma is used in all the files\n\"\"\"\n\nfrom slither.detectors.abstract_detector import AbstractDetector, DetectorClassification\nfrom slither.formatters.attributes.constant_pragma import format\n\n\nclass ConstantPragma(AbstractDetector):\n    \"\"\"\n    Check that the same pragma is used in all the files\n    \"\"\"\n\n    ARGUMENT = 'pragma'\n    HELP = 'If different pragma directives are used'\n    IMPACT = DetectorClassification.INFORMATIONAL\n    CONFIDENCE = DetectorClassification.HIGH\n\n    WIKI = 'https://github.com/crytic/slither/wiki/Detector-Documentation#different-pragma-directives-are-used'\n\n\n    WIKI_TITLE = 'Different pragma directives are used'\n    WIKI_DESCRIPTION = 'Detect if different Solidity versions are used.'\n    WIKI_RECOMMENDATION = 'Use one Solidity version.'\n\n    def _detect(self):\n        results = []\n        pragma = self.slither.pragma_directives\n        versions = [p.version for p in pragma if p.is_solidity_version]\n        versions = sorted(list(set(versions)))\n\n        if len(versions) > 1:\n            info = [f\"Different versions of Solidity is used in {self.filename}:\\n\"]\n            info += [f\"\\t- Version used: {[str(v) for v in versions]}\\n\"]\n\n            for p in pragma:\n                info += [\"\\t- \", p, \"\\n\"]\n\n            res = self.generate_result(info)\n\n            results.append(res)\n\n        return results\n\n    @staticmethod\n    def _format(slither, result):\n        format(slither, result)\n", "path": "slither/detectors/attributes/constant_pragma.py"}]}