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

Issue:
Symbol preservation not honoured when symbol is repeated more than 3 times
### Real-life issue
Inn French, when reading the following line
`DD/MM/YYYY`
we can hear
`DD/MM/`

This is due to how NVDA reports repeated characters.

Note:
The French symbol file contains the following line to deal with synth not supporting character command, since "Y" can be a letter or a word:
`Y	igrèque	char	norep`

Below is an example of this issue with symbol $ instead of Y. It does not correspond to a real-life use case, but being in English, it will be better understood by everyone.


### Steps to reproduce:
Consider the two following lines:
`$$$$`
`$$`

1. Set symbol level on Some if not already and read both these lines with NVDA+upArrow.
2. Set symbol level on All and read both these lines with NVDA+upArrow.

### Actual behavior:
At step 1., nothing is read on the line containing 4 dollar symbols.
At step 1., "dollar dollar" is read on the line containing two dollar symbols.

### Expected behavior:
At step 1, we can see when reading the line with two dollar symbols that the synth pronounces the symbol "dollar" when dollar is passed to it.

So at step 1., we also expect that the synth reports something on the line containing 4 dollar symbols.

### NVDA logs, crash dumps and other attachments:
Not provided
### System configuration
Installed

#### NVDA version:
2022.4beta3
#### Windows version:
Windows 10 20H2 (x64) build 19042.2251

#### Name and version of other software in use when reproducing the issue:
OneCore Microsoft David, but other synth would have the same issue.

#### 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, 2022.3 and many other before feature the same issue.
#### 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?
Not tested but unrelated.


Discussion:

Resolving patch:
diff --git a/source/characterProcessing.py b/source/characterProcessing.py
--- a/source/characterProcessing.py
+++ b/source/characterProcessing.py
@@ -579,6 +579,8 @@ def _regexpRepl(self, m):
 			symbol = self.computedSymbols[text[0]]
 			if self._level >= symbol.level:
 				return "  {count} {char} ".format(count=len(text), char=symbol.replacement)
+			elif symbol.preserve in [SYMPRES_ALWAYS, SYMPRES_NOREP]:
+				return text
 			else:
 				return " "
 


Test patch:
Repository: nvaccess/nvda

Issue:
NVDA2022.3.3 throws error for a split second when computer goes to sleep
### Steps to reproduce:
alt+f4 Click on the sleep option in the dialog.
### Actual behavior:
At this point you will hear NVDA beeping as the error is logged.
### Expected behavior:
There are no errors.
### NVDA logs, crash dumps and other attachments:
[log.txt](https://github.com/nvaccess/nvda/files/10300046/log.txt)

### System configuration
#### NVDA installed/portable/running from source:
installed
#### NVDA version:
2022.3.3, 2022.4Beta4 and Alpha-27364,
#### Windows version:
Windows 10 22H2 (x64) build 19045.2364
#### 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.
Yes
#### 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/utils/security.py b/source/utils/security.py
--- a/source/utils/security.py
+++ b/source/utils/security.py
@@ -227,7 +227,10 @@ def _isWindowLockScreen(hwnd: winUser.HWNDVal) -> bool:
 	try:
 		return _isWindowBelowWindowMatchesCond(objWindowHandle, _isWindowLockScreen)
 	except _UnexpectedWindowCountError:
-		log.exception("Couldn't find lock screen")
+		log.debugWarning(
+			"Couldn't determine lock screen and NVDA object relative z-order",
+			exc_info=True
+		)
 		return False
 
 


Test patch:
Repository: nvaccess/nvda

Issue:
Espeak reads numbers more than 34 digits as 3647
### Steps to reproduce:
Try to read number 2748573849604723649583647594365737548 With espeak
### Actual behavior:
Espeak read this number as 3647
### Expected behavior:
Espeak should read large number correctly
### System configuration
#### NVDA installed/portable/running from source:
Installed
#### NVDA version:
alpha-26783,f749e49f
#### Windows version:
Build 19044.2006
#### Name and version of other software in use when reproducing the issue:
None
#### 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.
NVDA 2022.3 behave normally
#### If 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:
This is an issue on eSpeak's side. Here is the ref that was not present in initial description: https://github.com/espeak-ng/espeak-ng/issues/1385.
Please update espeak to the commit which fixes this issue.
Pr espeak-ng/espeak-ng#1458

Resolving patch:
diff --git a/source/synthDrivers/espeak.py b/source/synthDrivers/espeak.py
--- a/source/synthDrivers/espeak.py
+++ b/source/synthDrivers/espeak.py
@@ -334,9 +334,7 @@ def speak(self, speechSequence: SpeechSequence):  # noqa: C901
 				textList.append(langChangeXML)
 				langChanged = True
 			elif isinstance(item, BreakCommand):
-				# Break commands are ignored at the start of speech unless strength is specified.
-				# Refer to eSpeak issue: https://github.com/espeak-ng/espeak-ng/issues/1232
-				textList.append(f'<break time="{item.time}ms" strength="1" />')
+				textList.append(f'<break time="{item.time}ms" />')
 			elif type(item) in self.PROSODY_ATTRS:
 				if prosody:
 					# Close previous prosody tag.


Test patch:
Repository: nvaccess/nvda

Issue:
Windows 11 clipboard history: disable browse mode by default
Hi,

Coming from an add-on (once again):

### Is your feature request related to a problem? Please describe.
Windows 11'd modern keyboard, specifically clipboard history is treated as a browse mode document when it should be an application. This means browse mode is enabled when clipboard history opens. Among other things, this will not allow users to review clipboard item menu such as removing pinned items as browse mode will be engaged when moving away from clipboard history items.

### Describe the solution you'd like
Similar to Skype, disable browse mode by default in modern keyboard.

### Describe alternatives you've considered
None

### Additional context
This affects Windows 11, not Windows 10. A solution is part of Windows App Essentials add-on.



Discussion:

Resolving patch:
diff --git a/source/appModules/windowsinternal_composableshell_experiences_textinput_inputapp.py b/source/appModules/windowsinternal_composableshell_experiences_textinput_inputapp.py
--- a/source/appModules/windowsinternal_composableshell_experiences_textinput_inputapp.py
+++ b/source/appModules/windowsinternal_composableshell_experiences_textinput_inputapp.py
@@ -1,5 +1,5 @@
 # A part of NonVisual Desktop Access (NVDA)
-# Copyright (C) 2017-2022 NV Access Limited, Joseph Lee
+# Copyright (C) 2017-2023 NV Access Limited, Joseph Lee
 # This file is covered by the GNU General Public License.
 # See the file COPYING for more details.
 
@@ -112,6 +112,10 @@ class AppModule(appModuleHandler.AppModule):
 	# Cache the most recently selected item.
 	_recentlySelected = None
 
+	# In Windows 11, clipboard history is seen as a web document.
+	# Turn off browse mode by default so clipboard history entry menu items can be announced when tabbed to.
+	disableBrowseModeByDefault: bool = True
+
 	def event_UIA_elementSelected(self, obj, nextHandler):
 		# Logic for IME candidate items is handled all within its own object
 		# Therefore pass these events straight on.


Test patch:
Repository: nvaccess/nvda

Issue:
Landmarks read even if disabled from formatting preferences
### Steps to reproduce:

1. Ensure to use a NVDA alpha (last, previous... I estimate from November at least);
2. open preferences, Document formatting, and disable landmarks reporting;
3. go i.e. to [issues page](https://github.com/nvaccess/nvda/issues);
4. press 3 to find h3 Footer navigation.

### Actual behavior:

NVDA says (voice only, partially translated)
"Footer navigation landmark Footer navigation level 3".

### Expected behavior:

The usual, less verbose
"Footer navigation level 3".

### System configuration

#### NVDA installed/portable/running from source:

Installed.

#### NVDA version:

NVDA alpha-27446,6dd90020.

#### Windows version:

Windows 10 64-bit 22H2.

#### Name and version of other software in use when reproducing the issue:

Firefox 108.0.2, Google Chrome 108.0.5359.125.

### 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.

Tested with NVDA 2022.4 portable, no issue.

#### 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?

Not tested.


Discussion:
I can confirm that this is broken in alpha but not 2022.4. 

I'll perform a bisect to try and track the problem down.
Bisect determined that #14303 broke this

Resolving patch:
diff --git a/source/speech/speech.py b/source/speech/speech.py
--- a/source/speech/speech.py
+++ b/source/speech/speech.py
@@ -2072,7 +2072,14 @@ def getControlFieldSpeech(  # noqa: C901
 		# #10095, #3321, #709: Report the name and description of groupings (such as fieldsets) and tab pages
 		# #13307: report the label for landmarks and regions
 		nameAndRole = nameSequence[:]
-		nameAndRole.extend(roleTextSequence)
+		if (
+			role not in (
+				controlTypes.Role.LANDMARK,
+				controlTypes.Role.REGION,
+			)
+			or config.conf["documentFormatting"]["reportLandmarks"]
+		):
+			nameAndRole.extend(roleTextSequence)
 		types.logBadSequenceTypes(nameAndRole)
 		return nameAndRole
 	elif (


Test patch:
Repository: nvaccess/nvda

Issue:
NVDA 2023.1: Key labels are displayed in the system language instead of NVDA language set in preferences.
### Steps to reproduce:
1. Set  NVDA to the language different than your Windows language (in my case since my Windows is in English I'm going to use Polish for the rest of this example).
2. After restarting NVDA enable keyboard help and try pressing keys for which translation for your language provides localized labels e.g. space, left and right shift etc.
### Actual behavior:
Key labels are reported in the language of the system i.e. in my case 'space' is reported for the space bar key instead of the Polish equivalent 'spacja'.
### Expected behavior:
Key labels should be reported in the  language set in preferences similar to how this worked in NVDA 2022.4 and earlier.
### NVDA logs, crash dumps and other attachments:
None needed
### System configuration
#### NVDA installed/portable/running from source:
Tested from sources, but this does not matter.
#### NVDA version:
Latest beta
#### Windows version:
Windows 10 version 21H2, but this does not depend on the version of Windows which is used.
#### Name and version of other software in use when reproducing the issue:
None
#### 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.
This was introduced in PR #14528, so all versions after this PR have this bug.
#### If NVDA add-ons are disabled, is your problem still occurring?
Not relevant
#### Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Not relevant

## Additional details:
Upcoming PR


Discussion:

Resolving patch:
diff --git a/source/config/configFlags.py b/source/config/configFlags.py
--- a/source/config/configFlags.py
+++ b/source/config/configFlags.py
@@ -17,7 +17,6 @@
 	DisplayStringStrEnum,
 	DisplayStringIntFlag,
 )
-from keyLabels import localizedKeyLabels
 
 
 @unique
@@ -36,6 +35,8 @@ class NVDAKey(DisplayStringIntFlag):
 	
 	@property
 	def _displayStringLabels(self):
+		# Imported lazily since this module is imported before gettext translation is installed.
+		from keyLabels import localizedKeyLabels
 		return {
 			NVDAKey.CAPS_LOCK: localizedKeyLabels['capslock'],
 			NVDAKey.NUMPAD_INSERT: localizedKeyLabels['numpadinsert'],
diff --git a/source/keyLabels.py b/source/keyLabels.py
--- a/source/keyLabels.py
+++ b/source/keyLabels.py
@@ -4,6 +4,13 @@
 #See the file COPYING for more details.
 #Copyright (C) 2008-2016 NV Access Limited, Aleksey Sadovoy, Babbage B.v.
 
+"""Contains mapping from the Windows key names to their localized labels.
+
+As there are localizable strings at module level,
+this can only be imported once localization is set up via `languageHandler.initialize`.
+"""
+
+
 localizedKeyLabels = {
 	# Translators: This is the name of the back key found on multimedia keyboards for controlling the web-browser.
 	'browserback': _("back"),


Test patch:
Repository: nvaccess/nvda

Issue:
Strange behavior in dictionaries if replacement contains space
<!-- 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:

1. First, set symbol level of "\\" to have it reported (i.e., None);
2. open a dictionary and create something like "foo" replaced by "foo bar" (note the space in replacement);
3. read text: "test of foo".

### Actual behavior:

Voice says:
"test of foo\\bar"

### Expected behavior:
<!--
Use "Speak command keys" (NVDA+4) and speech viewer to copy and paste here. 
Use braille viewer to copy and paste here.
You may additionally include an explanation.
-->

Voice should say:
"test of foo bar"
without any "\\".

### System configuration

#### NVDA installed/portable/running from source:

Installed and running from source.

#### NVDA version:

NVDA alpha-27727,86e93666 (installed).

#### Windows version:

Windows 10 22H2 Build 19045.2604 64-bit.

#### Other information about your system:

Tested with Eloquence and Microsoft OneCore (Elsa) synthesizers.

### Other questions

#### Does the issue still occur after restarting your computer?

Not tested.

#### Have you tried any other versions of NVDA? If so, please report their behaviors.

2023.1beta1 seems to not have this issue.

#### 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?

Not tested.



Discussion:

Resolving patch:
diff --git a/source/speechDictHandler/__init__.py b/source/speechDictHandler/__init__.py
--- a/source/speechDictHandler/__init__.py
+++ b/source/speechDictHandler/__init__.py
@@ -44,7 +44,8 @@ def sub(self, text: str) -> str:
 		if self.type == ENTRY_TYPE_REGEXP:
 			replacement = self.replacement
 		else:
-			replacement = re.escape(self.replacement)
+			# Escape the backslashes for non-regexp replacements
+			replacement = self.replacement.replace('\\', '\\\\')
 		return self.compiled.sub(replacement, text)
 
 class SpeechDict(list):


Test patch:
Repository: nvaccess/nvda

Issue:
Report Link Destination partially broken for link titles with semicolons

### Steps to reproduce:

In a browser such as Firefox, enter the following into the address bar:

```html
data:text/html,<p>This is a test <a href="https://nvaccess.org/">link; to NV Access</a>.</p>
```

Navigate to the link, and press Ctrl+k (the report link destination key) twice.

### Actual behavior:

NVDA reports the title of the Window shown as:
```
Destination of: link
```

And the content of the window as:
```
to NV Access;
https://nvaccess.org/
```

### Expected behavior:

NVDA reports the title of the Window shown as:
```
Destination of: link; to NV Access;
```

And the content of the window as:
```
https://nvaccess.org/
```

### The reason:

The string (message and title) sent to `message.html`'s javascript from `ui.browseableMessage`, is naively split on a single semicolon. This could have happened before the link destination feature was added, for any `ui.browseableMessage` with a semicolon in its title.

Noticed while working on #14641.

Fix coming shortly.

### NVDA logs, crash dumps and other attachments:

N/A
### System configuration
#### NVDA installed/portable/running from source:

Portable

#### NVDA version:

2023.1 beta 1

#### Windows version:

10 Home

#### 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?

Not tested.

#### Have you tried any other versions of NVDA? If so, please report their behaviors.

Also true for alpha and source builds.

#### If NVDA add-ons are disabled, is your problem still occurring?

N/A

#### 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/ui.py b/source/ui.py
--- a/source/ui.py
+++ b/source/ui.py
@@ -88,6 +88,7 @@ def browseableMessage(message: str, title: Optional[str] = None, isHtml: bool =
 	@param title: The title for the message.
 	@param isHtml: Whether the message is html
 	"""
+	splitWith: str = "__NVDA:split-here__"  # Unambiguous regex splitter for javascript in message.html, #14667
 	if _isSecureDesktop():
 		import wx  # Late import to prevent circular dependency.
 		wx.CallAfter(_warnBrowsableMessageNotAvailableOnSecureScreens, title)
@@ -103,7 +104,7 @@ def browseableMessage(message: str, title: Optional[str] = None, isHtml: bool =
 		title = _("NVDA Message")
 	if not isHtml:
 		message = f"<pre>{escape(message)}</pre>"
-	dialogString = f"{title};{message}"
+	dialogString = f"{title}{splitWith}{message}"
 	dialogArguements = automation.VARIANT( dialogString )
 	gui.mainFrame.prePopup() 
 	windll.mshtml.ShowHTMLDialogEx( 


Test patch:
Repository: nvaccess/nvda

Issue:
Tab names not reported when switching in file explorer on Win11
When creating multiple tabs in file explorer, when pressing ctrl+tab to alternate tabs, NVDA announce only the folder name focused.
Teste using NVDA 2022.3 and higher, windows 11.



Discussion:
Hi,

Note: this is part of tabbed File Explorer introduced in Windows 11 22H2 Moment 1 (October 2022).

Technical: UIA element selected event is fired when switching between tabs, sometimes multiple times for the same tab. We can try detecting this and let NVDA announce the name of the tab being switched to, but then on braille display, this will be quickly replaced by the focused control information.

Thanks.
This is a new feature in Windows 11, is not supported by NVDA yet. I'd be happy to see a contribution for this.

@diegomatos16 in future please fill in the issue (new feature, bug) template, it helps to ensure that the information we need is captured.
Hi,

2023 update: see #14588 for an example of how to resolve this - the mechanics between tabbed Notepad and File Explorer tab switching are the same. In fact, Windows App Essentials add-on 23.02 will resolve this issue, with a potential pull request for NVDA Core to be done later.

Thanks.
Hi,

#14588 is now a thing, so let's resolve this issue - pull request coming very soon. The biggest difference will be that speech cannot be canceled as it will cut off items view/selected item announcement.

Thanks.

Resolving patch:
diff --git a/source/appModules/explorer.py b/source/appModules/explorer.py
--- a/source/appModules/explorer.py
+++ b/source/appModules/explorer.py
@@ -10,14 +10,17 @@
 
 from comtypes import COMError
 import time
+from typing import Callable
 import appModuleHandler
 import controlTypes
 import winUser
 import winVersion
 import api
 import speech
+import braille
 import eventHandler
 import mouseHandler
+from NVDAObjects import NVDAObject
 from NVDAObjects.IAccessible import IAccessible, List
 from NVDAObjects.UIA import UIA
 from NVDAObjects.behaviors import ToolTip
@@ -552,3 +555,23 @@ def event_UIA_window_windowOpen(self, obj, nextHandler):
 				eventHandler.executeEvent("UIA_window_windowOpen", inputPanelWindow)
 				return
 		nextHandler()
+
+	def event_UIA_elementSelected(self, obj: NVDAObject, nextHandler: Callable[[], None]):
+		# #14388: announce File Explorer tab switches (Windows 11 22H2 and later).
+		if (
+			obj.role == controlTypes.Role.TAB
+			and controlTypes.State.SELECTED in obj.states
+			and obj.parent.UIAAutomationId == "TabListView"
+			# this is done because 2 selection events are sent for the same object, so to prevent double speaking.
+			and not eventHandler.isPendingEvents(eventName="UIA_elementSelected")
+		):
+			speech.speakObject(obj, reason=controlTypes.OutputReason.FOCUS)
+			braille.handler.message(
+				braille.getPropertiesBraille(
+					name=obj.name,
+					role=obj.role,
+					states=obj.states,
+					positionInfo=obj.positionInfo
+				)
+			)
+		nextHandler()


Test patch:
Repository: TOMToolkit/tom_base

Issue:
"Since Time" filter in MARS query
Using the MARS query, the results do not depend on the value chosen for the "Since Time" filter.


Discussion:

Resolving patch:
diff --git a/tom_alerts/brokers/mars.py b/tom_alerts/brokers/mars.py
--- a/tom_alerts/brokers/mars.py
+++ b/tom_alerts/brokers/mars.py
@@ -26,9 +26,9 @@ class MARSQueryForm(GenericQueryForm):
         label='Time Upper',
         widget=forms.TextInput(attrs={'type': 'date'})
     )
-    since__time = forms.IntegerField(
+    time__since = forms.IntegerField(
         required=False,
-        label='Since Time',
+        label='Time Since',
         help_text='Alerts younger than this number of seconds'
     )
     jd__gt = forms.FloatField(required=False, label='JD Lower')
@@ -97,7 +97,7 @@ def __init__(self, *args, **kwargs):
             self.common_layout,
             Fieldset(
                 'Time based filters',
-                'since__time',
+                'time__since',
                 Div(
                     Div(
                         'time__gt',


Test patch: