MCPcopy Create free account
hub / github.com/Lotus6/AutoRepeater / patch_deepCopy

Method patch_deepCopy

src/burp/Utils/diff_match_patch.java:1934–1949  ·  view source on GitHub ↗

Given an array of patches, return another array that is identical. @param patches Array of Patch objects. @return Array of Patch objects.

(LinkedList<Patch> patches)

Source from the content-addressed store, hash-verified

1932 * @return Array of Patch objects.
1933 */
1934 public LinkedList<Patch> patch_deepCopy(LinkedList<Patch> patches) {
1935 LinkedList<Patch> patchesCopy = new LinkedList<Patch>();
1936 for (Patch aPatch : patches) {
1937 Patch patchCopy = new Patch();
1938 for (Diff aDiff : aPatch.diffs) {
1939 Diff diffCopy = new Diff(aDiff.operation, aDiff.text);
1940 patchCopy.diffs.add(diffCopy);
1941 }
1942 patchCopy.start1 = aPatch.start1;
1943 patchCopy.start2 = aPatch.start2;
1944 patchCopy.length1 = aPatch.length1;
1945 patchCopy.length2 = aPatch.length2;
1946 patchesCopy.add(patchCopy);
1947 }
1948 return patchesCopy;
1949 }
1950
1951 /**
1952 * Merge a set of patches onto the text. Return a patched text, as well

Callers 1

patch_applyMethod · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected