There is no question about whether they had faith....and it is...
The Corinthians where obviously not exhibiting true faith if they were living in sin.
Paul puts it this way : "purge out the old leaven, for you are unleavened". He recognizes they are saints, but that they are sinfully behaving
The better explanation, rather, is my view that it is possible to have faith, but not walk in faith, and that this state leads to condemnation, not maintenance of justification--both in the present, and, more importantly, in the future.
James nowhere addresses true and false faith, he merely admonishes the audience of "adulteresses" (unfaithful to God their husband--he believes they have "true" faith) to repent and walk in faith.Paul and James agree that their lack of fruit and good works indicates that their faith is not true. It is only by true faith that a man can be justified... and good works will follow as a natural consequence.
See how that works now? Not complicated at all really.
Simple.