Father if the Boston bomber was catholic could the church refuse to give him a funeral or burial in catholic cemetary under cannon law?
To the first question: Yes, the Church could refuse him a funeral.
We read in the Latin Code:
canon 1184: §1 “Unless they gave some signs of repentance before death, the following must be deprived of ecclesiastical funerals:
1° notorious apostates, heretics, and schismatics;
2° those who chose the cremation of their bodies for reasons contrary to Christian faith;
3° other manifest sinners who cannot be granted ecclesiastical funerals without public scandal of the faithful.
§2 If any doubt occurs, the local ordinary is to be consulted, and his judgment must be followed.
As far as denying them burial in a Catholic cemetery, there is no provision for this in universal law.
There may be particular law of a diocese that governs the discipline to be observed in cemeteries (canon 1243). The reason for this is that the Church recognizes that there may be civil laws which need to be respected (c. 22).
For example, civil laws may state that if a person (your theoretical Catholic terrorist) had purchased a cemetery plot in advance, his body may not be prevented from occupying it after his demise, regardless the circumstances.
In such a case, it should be buried without Catholic ceremony.
We should, of course, pray for God’s mercy for such people, as well as for His justice.