[1] This is possible in US patent law with regard to applications not subject to the Leahy–Smith America Invents Act, since an inventor has one year after the publication of the description of an invention to get a patent application on file.
In order to get the patent, however, the inventor must submit a declaration supported by evidence that he or she conceived of the invention before the third-party publication.
The inventor must also provide evidence that he or she was diligent in either reducing the invention to practice or in filing the patent application.
[2] On December 28, 1995, a patent application by Synteni (now Incyte Genomics) WO/95/35505 was published describing a microarray invention.
A competitor, Affymetrix, filed a patent application describing almost exactly the same invention within six months.