René's URL Explorer Experiment


Title: Fuzzy patching does not account for earlier changes in line count · Issue #237 · java-diff-utils/java-diff-utils · GitHub

Open Graph Title: Fuzzy patching does not account for earlier changes in line count · Issue #237 · java-diff-utils/java-diff-utils

X Title: Fuzzy patching does not account for earlier changes in line count · Issue #237 · java-diff-utils/java-diff-utils

Description: applyFuzzy(source, 0) can fail on the unchanged source after an earlier change reduces the line count: import com.github.difflib.DiffUtils; import com.github.difflib.patch.Patch; import java.util.Arrays; import java.util.List; public cla...

Open Graph Description: applyFuzzy(source, 0) can fail on the unchanged source after an earlier change reduces the line count: import com.github.difflib.DiffUtils; import com.github.difflib.patch.Patch; import java.util.A...

X Description: applyFuzzy(source, 0) can fail on the unchanged source after an earlier change reduces the line count: import com.github.difflib.DiffUtils; import com.github.difflib.patch.Patch; import java.util.A...

Opengraph URL: https://github.com/java-diff-utils/java-diff-utils/issues/237

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Fuzzy patching does not account for earlier changes in line count","articleBody":"applyFuzzy(source, 0) can fail on the unchanged source after an earlier change reduces the line count:\n\n```java\nimport com.github.difflib.DiffUtils;\nimport com.github.difflib.patch.Patch;\nimport java.util.Arrays;\nimport java.util.List;\npublic class Reproduce {\n public static void main(String[] args) throws Exception {\n  List\u003cString> source=Arrays.asList(\"a\",\"b\",\"c\",\"d\",\"e\");\n  List\u003cString> target=Arrays.asList(\"x\",\"d\",\"y\");\n  Patch\u003cString> patch=DiffUtils.diff(source,target);\n  System.out.println(patch.getDeltas());\n  System.out.println(\"exact=\"+patch.applyTo(source));\n  System.out.println(\"fuzzy=\"+patch.applyFuzzy(source,0));\n }\n}\n```\n\napplyTo returns [x, d, y]. applyFuzzy throws IndexOutOfBoundsException with 4.17 and PatchFailedException with current master instead of returning the same result.\n\nAn expanding earlier change can also cause a later delta to modify a newly inserted matching line. lastPatchDelta only records the found position; it needs to include the difference between the target and source chunk sizes as well.\n","author":{"url":"https://github.com/PHJ2000","@type":"Person","name":"PHJ2000"},"datePublished":"2026-10-05T07:52:45Z","url":"https://github.com/java-diff-utils/java-diff-utils/issues/237"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0a35cf39-eece-f34c-5b44-ec07c19255d6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBC4C:3DCA81:2AF67:3BFBC:6AFBC35C
html-safe-nonce01a4bbda8fb0b2dbbce4b049c69263c721d470d8c3e1e7123ab5c8a1ed8b8ab0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzRDOjNEQ0E4MToyQUY2NzozQkZCQzo2QUZCQzM1QyIsInZpc2l0b3JfaWQiOiI5OTA2Mzk1NjQ0NDE1MDI1NTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacca8ebc6599702d84ea4eb1d340a6397b919afb2b941104dd4d70c022039ed7dc
hovercard-subject-tagissue:5708406988
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/java-diff-utils/java-diff-utils/237/issue_layout
twitter:imagehttps://opengraph.githubassets.com/365472211c7802e7c27a1d09eb5b575aa83a650f280a8b55d0bdb493d94ae1f3/java-diff-utils/java-diff-utils/issues/237
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/365472211c7802e7c27a1d09eb5b575aa83a650f280a8b55d0bdb493d94ae1f3/java-diff-utils/java-diff-utils/issues/237
og:image:altapplyFuzzy(source, 0) can fail on the unchanged source after an earlier change reduces the line count: import com.github.difflib.DiffUtils; import com.github.difflib.patch.Patch; import java.util.A...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamePHJ2000
hostnamegithub.com
expected-hostnamegithub.com
Noned440bda0d812801778b27bfe9f7c1ce9ff22420c73f6f95150c4fcbca311c50b
turbo-cache-controlno-preview
go-importgithub.com/java-diff-utils/java-diff-utils git https://github.com/java-diff-utils/java-diff-utils.git
octolytics-dimension-user_id40540835
octolytics-dimension-user_loginjava-diff-utils
octolytics-dimension-repository_id86663812
octolytics-dimension-repository_nwojava-diff-utils/java-diff-utils
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id86663812
octolytics-dimension-repository_network_root_nwojava-diff-utils/java-diff-utils
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2c43021aed8695990c86c0eaaedc600bfeffec36
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/java-diff-utils/java-diff-utils/issues/237#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjava-diff-utils%2Fjava-diff-utils%2Fissues%2F237
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjava-diff-utils%2Fjava-diff-utils%2Fissues%2F237
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=java-diff-utils%2Fjava-diff-utils
Reloadhttps://github.com/java-diff-utils/java-diff-utils/issues/237
Reloadhttps://github.com/java-diff-utils/java-diff-utils/issues/237
Reloadhttps://github.com/java-diff-utils/java-diff-utils/issues/237
java-diff-utilshttps://github.com/java-diff-utils
java-diff-utilshttps://github.com/java-diff-utils/java-diff-utils
Codehttps://github.com/java-diff-utils/java-diff-utils
Issues2 (2)https://github.com/java-diff-utils/java-diff-utils/issues
Pull requests2 (2)https://github.com/java-diff-utils/java-diff-utils/pulls
Discussionshttps://github.com/java-diff-utils/java-diff-utils/discussions
Actionshttps://github.com/java-diff-utils/java-diff-utils/actions
Projectshttps://github.com/java-diff-utils/java-diff-utils/projects
Wikihttps://github.com/java-diff-utils/java-diff-utils/wiki
Security and qualityhttps://github.com/java-diff-utils/java-diff-utils/security
Insightshttps://github.com/java-diff-utils/java-diff-utils/pulse
https://github.com/java-diff-utils/java-diff-utils
New issuehttps://github.com/login?return_to=https://github.com/java-diff-utils/java-diff-utils/issues/237
New issuehttps://github.com/login?return_to=https://github.com/java-diff-utils/java-diff-utils/issues/237
#238https://github.com/java-diff-utils/java-diff-utils/pull/238
Fuzzy patching does not account for earlier changes in line counthttps://github.com/java-diff-utils/java-diff-utils/issues/237#top
#238https://github.com/java-diff-utils/java-diff-utils/pull/238
https://github.com/PHJ2000
PHJ2000https://github.com/PHJ2000
on Oct 5, 2026https://github.com/java-diff-utils/java-diff-utils/issues/237#issue-5708406988
wumpzhttps://github.com/wumpz
completedhttps://github.com/java-diff-utils/java-diff-utils/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#238https://github.com/java-diff-utils/java-diff-utils/pull/238
on Oct 9, 2026https://github.com/java-diff-utils/java-diff-utils/issues/237#event-32914253584
Sign up for freehttps://github.com/signup?return_to=https://github.com/java-diff-utils/java-diff-utils/issues/237
Sign in to commenthttps://github.com/login?return_to=https://github.com/java-diff-utils/java-diff-utils/issues/237
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.