The common analogy of likening faith to a fruit tree is unbiblical. It makes works inherent in faith, just like fruit is inherent in the seed. The analogy teaches a subtle form of works salvation. It has been the cause of endless suffering for Christians with sensitive consciences. It leaves people confused wondering how salvation isn't by works if works are the fruits and evidence of salvation. To say it plainly, the fruit tree analogy teaches a false gospel. The people who use the fruit tree analogy are either ignorant of its implications or they are knowingly teaching works salvation.
If I had to guess, I assume the fruit tree analogy was taken from the parable of the sower. However, in the parable of the sower, neither the seed nor the soil refer to faith. Also, the fruits of the Christian life are not referred to as the fruits of faith, but the fruits of the Spirit, among which faith is just one of the fruits (see Galatians 5:22-23 and 1 Corinthians 12:1-10).
In contrast to a fruit tree, the Bible likens faith to a body in James 2:26. The analogy clearly shows that James was not concerned with the authenticity of faith in James 2, for he certainly wasn't indicating that the body in verse 26 was a fake body. The context of verse 17 shows that when James refers to a "dead" faith, he doesn't mean non-existent or inauthentic. Rather, he is referring to a "idle" faith that is "no profit" in saving the poor man in verse 14 (i.e., the "him") or the destitute brother or sister in verses 15-17. James 2:26 teaches us that faith by itself can do nothing. (In actuality, this "idle" faith is the only type of faith that exists, for faith is nothing more than a mental state in which the mind is persuaded of the truth of something. This "idle" faith is the faith that justifies when it receives the witness of the Gospel as the truth. This is clearly what James believed because he never questioned the authenticity of the faith of his letter's recipients. Instead, he assumed they were justified believers, calling them born-again people in 1:18 and "beloved brothers" three times in 1:16, 1:19, and 2:5. In 2:1, he says that they had faith in Jesus Christ.) The problem that James was addressing was not the authenticity of their faith, but their complacency with it, to the disregard of other people. So, James' intention was to stir them up to action, telling them that just like a body is empowered by a spirit, so their faith needed to be empowered by good works. Good works not only benefit other people, but they honor God and deepen fellowship with Him. When good works are combined with faith, they have the synergistic benefit of perfecting faith (the Greek verb James uses in verse 22 is synergeo, which means "work together"). How can works perfect faith? In the same way wind can perfect a fire. Wind is not evidence of a fire, but when wind blows on a fire, it strengthens the fire. Likewise, works are not evidence of faith, but when works empower faith, they perfect faith. Faith and works are two separate things, just like a body and spirit are two separate things, but when these two separate things come together, good things happen.