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

Method patch_make

src/burp/Utils/diff_match_patch.java:1796–1807  ·  view source on GitHub ↗

Compute a list of patches to turn text1 into text2. A set of diffs will be computed. @param text1 Old text. @param text2 New text. @return LinkedList of Patch objects.

(String text1, String text2)

Source from the content-addressed store, hash-verified

1794 * @return LinkedList of Patch objects.
1795 */
1796 public LinkedList<Patch> patch_make(String text1, String text2) {
1797 if (text1 == null || text2 == null) {
1798 throw new IllegalArgumentException("Null inputs. (patch_make)");
1799 }
1800 // No diffs provided, compute our own.
1801 LinkedList<Diff> diffs = diff_main(text1, text2, true);
1802 if (diffs.size() > 2) {
1803 diff_cleanupSemantic(diffs);
1804 diff_cleanupEfficiency(diffs);
1805 }
1806 return patch_make(text1, diffs);
1807 }
1808
1809 /**
1810 * Compute a list of patches to turn text1 into text2.

Callers

nothing calls this directly

Calls 6

diff_mainMethod · 0.95
diff_cleanupSemanticMethod · 0.95
diff_text1Method · 0.95
patch_addContextMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected