Purpose of 2nd order filter for processing temperature measurement
By itself, the code you exhibit doesn't look like a 2nd order filter to me. At least not in the sense that this involves the unique behaviors associated with them: the ability to be under-damped, over-damped, or critically-damped; no more, no less.

Of course, if this is part of PID (or something similar) then you can have all three of those behaviors. But you don't show the rest of the code. Only those three lines. I don't want you to be confused by the idea that those three lines, by themselves, represent a 2nd order filter. However, if this is part of a PID control loop and an external plant under control, then of course it may be 2nd order behavior. But then that's a different question, too. These three lines by themselves aren't 2nd order.

What I see is something like this:

$$\begin{align*}
\Delta &amp;= T_\text{SET} -\frac{\Sigma}{A}\tag{1}\\\\
\Sigma_y&amp;=\frac{A-1}{A}\Sigma_y+\Delta\tag{2}\\\\
\Sigma&amp;=\Sigma+\frac{\Sigma_y}{B}\tag{3}
\end{align*}$$

The first line is a simple temporary computation of an error term of some sort. (In this case, I can't say exactly why an accumulator itself is being directly applied in this differencing calculation. I can only take note of it.) Note also that I adjusted the use of the factor FILTER_TERM_A in the first equation. For now, I just wanted to focus on what is happening more than on the details of how it is happening.

The second line is an accumulator. Depending on the value of FILTER_TERM_A (above and hereinafter noted as simply \$A\$), this accumulator (or integrator) value may have no meaning at all. So for example, if \$A=1\$, then \$\Sigma_y=\Delta\$ and it doesn't accumulate anything. It's just the error, or \$\Delta\$. But as \$A\$ increases in value beyond \$1\$, the accumulator starts operating and has an increasing effect. The larger that \$A\$ becomes, the less impact \$\Delta\$ has on adjusting the other accumulator, \$\Sigma\$, and the more impact that accumulator \$\Sigma_y\$ has on it. This second equation, more than the others, points up the purpose of \$A\$.

The third line is most probably the global integrator variable. The value of FILTER_TERM_B (above and hereinafter noted as simply \$B\$) determines how much impact the overall error term has (where the error term may itself be strongly filtered, or not filtered at all, depending on \$A\$.) If \$B\$ is very large, then the PID integrator term barely moves, at all, and will not play a significant role in the closed loop control system behavior. However, if \$B\$ is small, then the PID integrator has a greater impact on what follows (in the code you didn't provide) and the overall closed loop control as a complete system.

My guess about the reason for multiplying by \$A\$ in your first line of code is more about the use of integer variables, than much else. Had floating point been in use, it would have been sufficient to create a multiplier out of \$\frac{A-1}{A}\$ and simply used that factor in the 2nd equation rather than go to the trouble they did. But it's just a guess, as you also didn't say anything about the variable declarations.