BTW,
As a back up for my post above:
If you will notice it appears to me that James is reiterating what Jesus said in:
And that a belief in Jesus produces good works, therefore we, not being able to judge the thoughts and intents of the heart, are able to see that they do indeed believe.Mat 7:20 Wherefore by their fruits ye shall know them.
Which is the opposite of what those who are judged in Matt. 7: 23 are by their works and those who are raised from the dead to face judgement in Re. 20. Who are not judged according to their beliefs but rather their works, and who had no belief.
However, the "Judge" is able to judge the thoughts and intents of their heart and knew they had no belief.
And it should also be noted that false prophets of old, and those today, have a form of godliness but deny the power there of: They looked good, they talked good, they performed miracles, note Janness and Jambres. but they did not believe.Heb_4:12 For the word of God is quick, and powerful, and sharper than any two edged sword, piercing even to the dividing asunder of soul and spirit, and of the joints and marrow, and is a discerner of the thoughts and intents of the heart.
They did not believe.2Ti 3:1 This know also, that in the last days perilous times shall come.
2Ti 3:2 For men shall be lovers of their own selves, covetous, boasters, proud, blasphemers, disobedient to parents, unthankful, unholy,
2Ti 3:3 Without natural affection, trucebreakers, false accusers, incontinent, fierce, despisers of those that are good,
2Ti 3:4 Traitors, heady, highminded, lovers of pleasures more than lovers of God;
2Ti 3:5 Having a form of godliness, but denying the power thereof: from such turn away.
2Ti 3:6 For of this sort are they which creep into houses, and lead captive silly women laden with sins, led away with divers lusts,
2Ti 3:7 Ever learning, and never able to come to the knowledge of the truth.
2Ti 3:8 Now as Jannes and Jambres withstood Moses, so do these also resist the truth: men of corrupt minds, reprobate concerning the faith.
2Ti 3:9 But they shall proceed no further: for their folly shall be manifest unto all men, as theirs also was.