IATA issues "controlled duplicates" for the two character codes and these are denoted by the * at the end of the code. The * should not be used in any distribution systems though, it is purely an administrative convenience.
There are a number of factors that go into controlled duplicate assignment, including geographical separation, type of operation (cargo/passenger, scheduled/charter, etc...) but in the end, basic common sense usually prevails. I've successfully petitioned IATA for a controlled duplicate alpha-alpha code assignment as recently as 2012 and it was a straightforward process if you have the proper arguments to make.
The official source for assigned codes (both airline and airport) is IATA itself and they offer a free search engine at :
http://www.iata.org/publications/Pages/code-search.aspx