If you cut the nails holding one of the corner studs to the bottom plate and the top plate with a Sawzall, you can use a flat bar (or a flat bar plus a wrecking bar) to pull the stud off the sheathing nails. Either re-use the stud, or buy a new stud, and install the stud with toenails as shown in the link I provided in Comment #51 (this link: Outside corner detail).
The problem was that the installer was doing his first spray foam job ever, and the thickness of the insulation varied from zero (visible roof deck) to about 9". Unfortunately, good average thickness doesn't cut it. The coverage needs to be uniform because a lot of heat will go through the under-insulated areas. (See my article on flat or lumpy insulation performance.)
While the R value will vary, most ocSPF products have an R value of around 3.8 per inch. Unlike medium-density closed-cell SPF, ocSPF is not a vapour barrier. When installed at 5.5 inches or more, ocSPF does act as an air barrier. It is often used for interior walls because it provides sound reduction by blocking and absorbing air leakage. It is usually only recommended for indoor applications.

Spray Foam Basement Ceiling

Spray foam insulation, when properly installed is both an air barrier and when closed cell foam is used at the proper depth a vapor barrier!  Before hiring any contractor you should establish the brand of foam being used and verify that with the named manufacture.  Please ask for ESR reports and MSDS sheets on any foam being installed in your home. A couple areas where you might consider spray foam insulation include:
A: It can be applied in the similar manner that we apply paint. We can use a paint roller to apply it without any hassle and use of special tools. You can also check the specific manual of instructions from the maker for particular directions. You should also check if it requires single or double coating or the use of a primer before its application.
Note: The practice of foam insulating the attic has raised eyebrows in the building industry because "standard" roofing techniques call for the attic to be ventilated; however, in a vented attic situation it will become approximately 130 degrees in the summer. There's no reason for an air-conditioning and vent-ductwork to have to work in that type of severe conditions. By applying Icynene right on the underside of the roof deck, the severe temperatures no longer exist in the attic. In short, the attic is now a "conditioned" space of the house that is just as comfortable as any other room in the home. This is called a "Compact Roof", which means you can frame right up against it. The one drawback of using expanded foam on the inside of the roof is that this will cause the temperature of the shingles to rise, but how much is not yet known. And how much damage a rise in temperatures could cause is debatable.

Roof Spray Foam Insulation