File1.cpp: void Component::initialize() File1.cpp: { File1.cpp: my_component = new ComponentClass(); File1.cpp: } File2.cpp: void Component::initialize() File2.cpp: { File2.cpp: if (doInit) File2.cpp: { File2.cpp: my_component = new ComponentClass(); File2.cpp: } File2.cpp: else File2.cpp: { File2.cpp: my_component.ptr = null; File2.cpp: } File2.cpp: } File3.cpp: /* A third file, containing the function to be replaced */ File3.cpp: void Component::initialize() File3.cpp: { File3.cpp: my_component = new ComponentClass(); File3.cpp: } File1.cpp with STXs for LFs: void Component::initialize()^B{^B my_component = new ComponentClass();^B}^B Replacement made: /* A third file, containing the function to be replaced */^Bvoid Component::initialize()^B{^B if (doInit)^B {^B my_component = new ComponentClass();^B }^B else^B {^B my_component.ptr = null;^B }^B}^B Final result, STXes converted back to LFs: /* A third file, containing the function to be replaced */ void Component::initialize() { if (doInit) { my_component = new ComponentClass(); } else { my_component.ptr = null; } }