internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: nvaccess/nvda

Issue:
NVDA not able to read the checkbox/radio button status in case of static non interactive(print form) pdf
<!-- Please read the text in this edit field before filling it in.
Please thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files.
Issues may be closed if the required information is not present.
https://github.com/nvaccess/nvda/blob/master/devDocs/githubIssueTemplateExplanationAndExamples.md
Please also note that the NVDA project has a Citizen and Contributor Code of Conduct which can be found at https://github.com/nvaccess/nvda/blob/master/CODE_OF_CONDUCT.md. NV Access expects that all contributors and other community members read and abide by the rules set out in this document while participating or contributing to this project. This includes creating or commenting on issues and pull requests. 

Each of the questions and sections below start with multiple hash symbols (#). Place your answers and information on the blank line below each question.
-->

### Steps to reproduce:
Open a static non interactive pdf containing checkbox. Try to read the state of checkbox using NVDA.
### Actual behavior:
NVDA does not read check/not checked
### Expected behavior:
NVDA  should speak checkbox checked(if checked) or vise versa
### System configuration
windows 10, pdf 1.7
#### NVDA installed/portable/running from source:

#### NVDA version:
NVDA 2020.4
#### Windows version:
windows 10
#### Name and version of other software in use when reproducing the issue:
Adobe Acrobat dc pro
#### Other information about your system:

### Other questions
####Is the issue reproducible for interactive static pdf as well? 
No

###Is the issue reproducible on Jaws?
NO 
[output_non.pdf](https://github.com/nvaccess/nvda/files/7958484/output_non.pdf)

#### Does the issue still occur after restarting your computer?
yes
#### Have you tried any other versions of NVDA? If so, please report their behaviors.

#### If NVDA add-ons are disabled, is your problem still occurring?

#### Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?



Discussion:
Confirmed this is a bug in NVDA.
We are incorrectly ignoring the accRole and accState for checkboxes. 
This is a small fix which we will get to soon.
Technical:
The checkbox has an Adobe STDName of 'Form'. We incorrectly map this to ROLE_FORM, where as the accRole is actually much more accurate as ROLE_SYSTEM_CHECKBUTTON.
We should remove the 'Form' mapping as it is hiding this and other possible controls. 

Resolving patch:
diff --git a/source/NVDAObjects/IAccessible/adobeAcrobat.py b/source/NVDAObjects/IAccessible/adobeAcrobat.py
--- a/source/NVDAObjects/IAccessible/adobeAcrobat.py
+++ b/source/NVDAObjects/IAccessible/adobeAcrobat.py
@@ -36,7 +36,7 @@
 	# H1 to H6 handled separately
 	# Span, Quote, Note, Reference, BibEntry, Code, Figure
 	"Formula": controlTypes.Role.MATH,
-	"Form": controlTypes.Role.FORM,
+	# form: a form field - MSAA roles are already much more specific here.
 }
 
 


Test patch:
Repository: nvaccess/nvda

Issue:
gecko_ia2 virtual buffer produces some errors while loading a page
### Steps to reproduce:
1. Open Firefox or a Chromium based web browser.
2. Load a page.
3. Wait for error sound.
### Actual behavior:
NVDA logs the following error:
```
ERROR - queueHandler.flushQueue (19:43:42.878) - MainThread (8840):
Error in func VirtualBuffer._loadBufferDone
Traceback (most recent call last):
  File "queueHandler.pyc", line 55, in flushQueue
  File "virtualBuffers\__init__.pyc", line 492, in _loadBufferDone
  File "browseMode.pyc", line 1306, in event_treeInterceptor_gainFocus
  File "virtualBuffers\gecko_ia2.pyc", line 532, in _getInitialCaretPos
  File "browseMode.pyc", line 1850, in _getInitialCaretPos
UnboundLocalError: local variable 'caretPos' referenced before assignment`
```
### Expected behavior:
NVDA should run without errors.
### System configuration
#### NVDA installed/portable/running from source:
Installed
#### NVDA version:
alpha-25209,21367c8e
#### Windows version:
Windows 11
#### Name and version of other software in use when reproducing the issue:
Google Chrome 100.0.4896.75
#### Other information about your system:
Not required
### Other questions
#### Does the issue still occur after restarting your computer?
Yes
#### Have you tried any other versions of NVDA? If so, please report their behaviors.
The issue was produced after merging #13589.
#### If NVDA add-ons are disabled, is your problem still occurring?
Yes
#### Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Yes


Discussion:
Cc @michaelDCurran, @feerrenrut 

Resolving patch:
diff --git a/source/browseMode.py b/source/browseMode.py
--- a/source/browseMode.py
+++ b/source/browseMode.py
@@ -1847,7 +1847,8 @@ def _getInitialCaretPos(self):
 				log.debug(f"No saved caret position for {docID}")
 				return None
 			log.debug(f"Found saved caret pos {caretPos} for document {docID}")
-		return caretPos
+			return caretPos
+		return None
 
 	def getEnclosingContainerRange(self, textRange):
 		textRange = textRange.copy()


Test patch:
Repository: nvaccess/nvda

Issue:
NVDA does not report disabled menu items as unavailable
Let's say I have a small Java application with a disabled menu item added to the top level menu:


      /**
       * @param args
       */
      public static void main(String[] args) {
        JFrame fr = new JFrame();
        JMenuBar mb = new JMenuBar();
        JMenu menu = new JMenu("windows");
        JMenuItem mi = new JMenuItem("abc");
        mi.setEnabled(false);
        menu.add(mi);
        mb.add(menu);
        fr.setJMenuBar(mb);
        fr.setSize(500, 500);
        fr.setVisible(true);
      }

NVDA reads the name of the "abc" menu item but it does not report in any way that it is disabled. JAWS on the other side reports the menu item as "unavailable".
I'm using Java 1.8 to run the sample code and using "nvda_2019.3.1"


Discussion:

Resolving patch:
diff --git a/source/NVDAObjects/JAB/__init__.py b/source/NVDAObjects/JAB/__init__.py
--- a/source/NVDAObjects/JAB/__init__.py
+++ b/source/NVDAObjects/JAB/__init__.py
@@ -328,6 +328,8 @@ def _get_states(self):
 			stateSet.add(controlTypes.State.OFFSCREEN)
 		if "expandable" not in stateStrings:
 			stateSet.discard(controlTypes.State.COLLAPSED)
+		if "enabled" not in stateStrings:
+			stateSet.add(controlTypes.State.UNAVAILABLE)
 		return stateSet
 
 	def _get_value(self):


Test patch:
Repository: nvaccess/nvda

Issue:
nvda alpha most resents not reading anything when entering outlook

### Steps to reproduce:
update nvda to the latest alpha version.
open microsoft outlook.
### Actual behavior:
nvda doesn't read anything, you can press any command on the keyboard and the nvda error repetitive sound is heard.
Even opening the log is almost impossible, nvda takes a long time to respond, it seems like it's busy just logging errors.
This is a regression, in yesterday's alpha everything was working fine.
### Expected behavior:
nvda should work with outlook same before nvda upgrade today.
### System configuration
#### NVDA installed/portable/running from source:
instaled
#### NVDA version:
nvda.exe, NVDA alpha-25614,6f211a13

#### Windows version:
11 22621.160

#### Name and version of other software in use when reproducing the issue:
Microsoft Office 16.0.15225.20204

#### Other information about your system:

### Other questions
#### Does the issue still occur after restarting your computer?
yes
#### Have you tried any other versions of NVDA? If so, please report their behaviors.
yes work
#### If NVDA add-ons are disabled, is your problem still occurring?
yes
#### Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
yes
log:
[outlook1.txt](https://github.com/nvaccess/nvda/files/8929248/outlook1.txt)
[outlook2.txt](https://github.com/nvaccess/nvda/files/8929251/outlook2.txt)



Discussion:

Resolving patch:
diff --git a/source/NVDAObjects/IAccessible/__init__.py b/source/NVDAObjects/IAccessible/__init__.py
--- a/source/NVDAObjects/IAccessible/__init__.py
+++ b/source/NVDAObjects/IAccessible/__init__.py
@@ -508,7 +508,7 @@ def findOverlayClasses(self,clsList):
 				from .winword import SpellCheckErrorField
 				clsList.append(SpellCheckErrorField)
 			else:
-				from .winword import WordDocument_WwN
+				from NVDAObjects.window.winword import WordDocument_WwN
 				clsList.append(WordDocument_WwN)
 		elif windowClassName=="DirectUIHWND" and role==oleacc.ROLE_SYSTEM_TOOLBAR:
 			parentWindow=winUser.getAncestor(self.windowHandle,winUser.GA_PARENT)
diff --git a/source/appModules/outlook.py b/source/appModules/outlook.py
--- a/source/appModules/outlook.py
+++ b/source/appModules/outlook.py
@@ -30,8 +30,13 @@
 import ui
 from NVDAObjects.IAccessible import IAccessible
 from NVDAObjects.window import Window
-from NVDAObjects.window.winword import WordDocument as BaseWordDocument
-from NVDAObjects.IAccessible.winword import WordDocument, WordDocumentTreeInterceptor, BrowseModeWordDocumentTextInfo, WordDocumentTextInfo
+from NVDAObjects.window.winword import (
+	WordDocument as BaseWordDocument,
+	WordDocumentTreeInterceptor,
+	BrowseModeWordDocumentTextInfo,
+	WordDocumentTextInfo,
+)
+from NVDAObjects.IAccessible.winword import WordDocument
 from NVDAObjects.IAccessible.MSHTML import MSHTML
 from NVDAObjects.behaviors import RowWithFakeNavigation, Dialog
 from NVDAObjects.UIA import UIA


Test patch:
Repository: nvaccess/nvda

Issue:
Regression: Attempt to import wrong appModule

### Steps to reproduce:
1. Enable loading custom code from Developer Scratchpad directory;
2.Try to create a new empty file qq.py in scratchpad/appModules;
3. Now feel free to start an application named '6.5.qq.exe' with a GUI;

### Actual behavior:
You get a bunch of errors and NVDA can't report anything in the application;
Error log attached: [NVDA.log](https://github.com/nvaccess/nvda/files/8933578/NVDA.log)

### Expected behavior:
NVDA can read the application normally, consistent with the 2022.1 behavior.
### System configuration
#### NVDA installed/portable/running from source:
installed
#### NVDA version:
2022.2Beta1
#### Windows version:
Windows 10 21H2 (x64) build 19044.1766
#### Name and version of other software in use when reproducing the issue:
None
#### Other information about your system:
None
### Other questions
#### Does the issue still occur after restarting your computer?
Yes
#### Have you tried any other versions of NVDA? If so, please report their behaviors.
2022.1 can work well
#### If NVDA add-ons are disabled, is your problem still occurring?
No(but this has nothing to do with any of the add-ons)
#### Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Yes


Discussion:
Note that this may be related to #13366
@cary-rowen Would you mint uploading the 6.5.qq.exe application, so I can try to reproduce on my machine?
Hi, @lukaszgo1 
The following is a sample application, it is safe, please feel free to test this.
[6.5.qq.exe.zip](https://github.com/nvaccess/nvda/files/8934527/6.5.qq.exe.zip)


Resolving patch:
diff --git a/source/appModuleHandler.py b/source/appModuleHandler.py
--- a/source/appModuleHandler.py
+++ b/source/appModuleHandler.py
@@ -156,7 +156,12 @@ def _getPossibleAppModuleNamesForExecutable(executableName: str) -> Tuple[str, .
 	return tuple(
 		aliasName for aliasName in (
 			_executableNamesToAppModsAddons.get(executableName),
-			executableName,
+			# #5323: Certain executables contain dots as part of their file names.
+			# Since Python threats dot as a package separator we replace it with undescore
+			# in the name of the Python module.
+			# For new App Modules consider adding an alias to `appModule.EXECUTABLE_NAMES_TO_APP_MODS`
+			# rather than rely on the fact that dots are replaced.
+			executableName.replace(".", "_"),
 			appModules.EXECUTABLE_NAMES_TO_APP_MODS.get(executableName)
 		) if aliasName is not None
 	)
@@ -254,8 +259,7 @@ def getAppModuleFromProcessID(processID: int) -> AppModule:
 	with _getAppModuleLock:
 		mod=runningTable.get(processID)
 		if not mod:
-			# #5323: Certain executables contain dots as part of their file names.
-			appName=getAppNameFromProcessID(processID).replace(".","_")
+			appName = getAppNameFromProcessID(processID)
 			mod=fetchAppModule(processID,appName)
 			if not mod:
 				raise RuntimeError("error fetching default appModule")


Test patch:
Repository: nvaccess/nvda

Issue:
Regression: Attempt to import wrong appModule

### Steps to reproduce:
1. Enable loading custom code from Developer Scratchpad directory;
2.Try to create a new empty file qq.py in scratchpad/appModules;
3. Now feel free to start an application named '6.5.qq.exe' with a GUI;

### Actual behavior:
You get a bunch of errors and NVDA can't report anything in the application;
Error log attached: [NVDA.log](https://github.com/nvaccess/nvda/files/8933578/NVDA.log)

### Expected behavior:
NVDA can read the application normally, consistent with the 2022.1 behavior.
### System configuration
#### NVDA installed/portable/running from source:
installed
#### NVDA version:
2022.2Beta1
#### Windows version:
Windows 10 21H2 (x64) build 19044.1766
#### Name and version of other software in use when reproducing the issue:
None
#### Other information about your system:
None
### Other questions
#### Does the issue still occur after restarting your computer?
Yes
#### Have you tried any other versions of NVDA? If so, please report their behaviors.
2022.1 can work well
#### If NVDA add-ons are disabled, is your problem still occurring?
No(but this has nothing to do with any of the add-ons)
#### Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Yes


Discussion:

Resolving patch:
diff --git a/source/appModuleHandler.py b/source/appModuleHandler.py
--- a/source/appModuleHandler.py
+++ b/source/appModuleHandler.py
@@ -156,7 +156,12 @@ def _getPossibleAppModuleNamesForExecutable(executableName: str) -> Tuple[str, .
 	return tuple(
 		aliasName for aliasName in (
 			_executableNamesToAppModsAddons.get(executableName),
-			executableName,
+			# #5323: Certain executables contain dots as part of their file names.
+			# Since Python threats dot as a package separator we replace it with undescore
+			# in the name of the Python module.
+			# For new App Modules consider adding an alias to `appModule.EXECUTABLE_NAMES_TO_APP_MODS`
+			# rather than rely on the fact that dots are replaced.
+			executableName.replace(".", "_"),
 			appModules.EXECUTABLE_NAMES_TO_APP_MODS.get(executableName)
 		) if aliasName is not None
 	)
@@ -254,8 +259,7 @@ def getAppModuleFromProcessID(processID: int) -> AppModule:
 	with _getAppModuleLock:
 		mod=runningTable.get(processID)
 		if not mod:
-			# #5323: Certain executables contain dots as part of their file names.
-			appName=getAppNameFromProcessID(processID).replace(".","_")
+			appName = getAppNameFromProcessID(processID)
 			mod=fetchAppModule(processID,appName)
 			if not mod:
 				raise RuntimeError("error fetching default appModule")


Test patch:
Repository: nvaccess/nvda

Issue:
NVDA incorrectly selects text when performing a say all in Notepad
### Steps to reproduce:
1. Open Notepad and perform a say all, for example by typing text like this.
Test
Test

### Actual behavior:
NVDA selects text, and as a result, selected and unselected announcements occur repeatedly, and say all repeats lines.
### Expected behavior:
NVDA shouldn't select text in say all.
### System configuration
#### NVDA installed/portable/running from source:
Installed
#### NVDA version:
alpha-25844,44086021
#### Windows version:
Windows 11, build 25151.1010
#### Name and version of other software in use when reproducing the issue:
Notepad 11.2205.11.0
#### Other information about your system:
N/A
### Other questions
#### Does the issue still occur after restarting your computer?
Yes
#### Have you tried any other versions of NVDA? If so, please report their behaviors.
Yes, this issue was first introduced in alpha-25838,82a4f861.
#### If NVDA add-ons are disabled, is your problem still occurring?
Yes
#### Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Yes


Discussion:
Cc @mltony as author of #13670.
I hope you can find a quick fix for this; it would be a pity to have to revert this work.

I'm looking into this
The problem appears to be that updating the caret is the same as updating the selection.

https://github.com/nvaccess/nvda/blob/6f211a13fc1d9e2dc6400504173c314d917391a7/source/NVDAObjects/UIA/__init__.py#L923-L926

Resolving patch:
diff --git a/source/NVDAObjects/IAccessible/MSHTML.py b/source/NVDAObjects/IAccessible/MSHTML.py
--- a/source/NVDAObjects/IAccessible/MSHTML.py
+++ b/source/NVDAObjects/IAccessible/MSHTML.py
@@ -402,7 +402,9 @@ def move(self,unit,direction, endPoint=None):
 		return res
 
 	def updateCaret(self):
-		self._rangeObj.select()
+		copyTextInfo = self.copy()
+		copyTextInfo.collapse()
+		copyTextInfo._rangeObj.select()
 
 	def updateSelection(self):
 		self._rangeObj.select()
diff --git a/source/NVDAObjects/UIA/__init__.py b/source/NVDAObjects/UIA/__init__.py
--- a/source/NVDAObjects/UIA/__init__.py
+++ b/source/NVDAObjects/UIA/__init__.py
@@ -923,7 +923,11 @@ def setEndPoint(self,other,which):
 	def updateSelection(self):
 		self._rangeObj.Select()
 
-	updateCaret = updateSelection
+	def updateCaret(self) -> None:
+		copyTextInfo = self.copy()
+		copyTextInfo.collapse()
+		copyTextInfo.updateSelection()
+
 
 class UIA(Window):
 	_UIACustomProps = UIAHandler.customProps.CustomPropertiesCommon.get()


Test patch:
Repository: nvaccess/nvda

Issue:
Windows versions: let NVDA recognize Windows 10/11 Version 22H2
### Background:
As of November 2021, Microsoft has moved to annual update cycle for Windows 10 and 11. This means there is no YYH1 updates, making it a bit easier to predict what the next version of Windows 10 and 11 will be. This also incresaes uncertainty somewhat as feature update builds can be a bit unpredictable:

* Windows 10: Windows 10 is in maintenance mode (Vibranium releases). While people can guess what the build number can be (see below), we don't know when the final feature update will be released (I'm guessing 2023 based on support lifecycle for Home/Pro versus Enterprise/Education).
* Windows 11: build prediction is unpredictable as Microsoft can sign off on a build some time in northern spring with refresh branches used to prepare cumulative updates for the base build (compare co_release vs. co_refresh branches from last year).

### Is your feature request related to a problem? Please describe.
With the impending release of Windows 10 and 11 Version 22H2, let NVDA recognize 22H2 builds. This can aid in detecting Sun Valley 2 (SV2) builds for UIA console and other work.

### Describe the solution you'd like
Recognize the following builds:

* Windows 10 Version 22H2: 19045
* Windows 11 Version 22H2 (nickel/SV2): 22621

In addition, update AppX manifest to state that the last tested version is 10.0.22621.0 and ask folks to use Windows 11 SDK build 22621 (now available).

### Describe alternatives you've considered
Leave things as is.

### Additional context
Typically, new Windows builds are recognized once builds move to release preview channel. For Windows 11, this took place on June 7, 2022, and for Windows 10, it is being worked on internally.

### Pull request strategy:
Choose from one of the following paths assuming that a PR is created:

1. Merge the upcoming PR.
2. Wait until Windows 10 Version 22H2 is released to release preview Insiders before merging the upcoming PR.

Thanks.


Discussion:

Resolving patch:
diff --git a/source/winVersion.py b/source/winVersion.py
--- a/source/winVersion.py
+++ b/source/winVersion.py
@@ -32,6 +32,7 @@
 	19042: "Windows 10 20H2",
 	19043: "Windows 10 21H1",
 	19044: "Windows 10 21H2",
+	19045: "Windows 10 22H2",
 	20348: "Windows Server 2022",
 	22000: "Windows 11 21H2",
 }
@@ -152,6 +153,7 @@ def __ge__(self, other):
 WIN10_20H2 = WinVersion(major=10, minor=0, build=19042)
 WIN10_21H1 = WinVersion(major=10, minor=0, build=19043)
 WIN10_21H2 = WinVersion(major=10, minor=0, build=19044)
+WIN10_22H2 = WinVersion(major=10, minor=0, build=19045)
 WINSERVER_2022 = WinVersion(major=10, minor=0, build=20348)
 WIN11 = WIN11_21H2 = WinVersion(major=10, minor=0, build=22000)
 


Test patch:
Repository: nvaccess/nvda

Issue:
The delete profile dialog should name the profile that is going to be deleted
### Steps to reproduce:

1. Open the NVDA menu.
2. Select `Configuration profiles`.
3. Choose a profile.
4. Press `delete`.

### Actual behavior:

Receive a dialog including the following text:

>This profile will be permanently deleted. This action cannot be undone.
>OK Cancel

### Expected behavior:

Receive a dialog containing text similar to this:

>The "PROFILE_NAME" profile will be permanently deleted. This action cannot be undone.
>OK Cancel

### System configuration
#### NVDA installed/portable/running from source:

All

#### NVDA version:

2022.1

#### Windows version:

Windows 10

#### Name and version of other software in use when reproducing the issue:

N/A

#### Other information about your system:

### Other questions
#### Does the issue still occur after restarting your computer?

Yes

#### Have you tried any other versions of NVDA? If so, please report their behaviors.

Yes, many, same.

#### If NVDA add-ons are disabled, is your problem still occurring?

Yes.

#### Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

Yes.



Discussion:

Resolving patch:
diff --git a/source/gui/configProfiles.py b/source/gui/configProfiles.py
--- a/source/gui/configProfiles.py
+++ b/source/gui/configProfiles.py
@@ -184,15 +184,16 @@ def onNew(self, evt):
 
 	def onDelete(self, evt):
 		index = self.profileList.Selection
+		name = self.profileNames[index]
 		if gui.messageBox(
 			# Translators: The confirmation prompt displayed when the user requests to delete a configuration profile.
-			_("This profile will be permanently deleted. This action cannot be undone."),
+			# The placeholder {} is replaced with the name of the configuration profile that will be deleted.
+			_("The profile {} will be permanently deleted. This action cannot be undone.").format(name),
 			# Translators: The title of the confirmation dialog for deletion of a configuration profile.
 			_("Confirm Deletion"),
-			wx.OK | wx.CANCEL | wx.ICON_QUESTION, self
+			wx.OK | wx.CANCEL | wx.CANCEL_DEFAULT | wx.ICON_QUESTION, self
 		) != wx.OK:
 			return
-		name = self.profileNames[index]
 		try:
 			config.conf.deleteProfile(name)
 		except:


Test patch: