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

Issue:
NVDA announces "selected" for every message row in Thunderbird
### Steps to reproduce:
1. Move to the message list in a folder in Thunderbird.
2. Arrow up and down between messages.
### Actual behavior:
NVDA reports "selected" after reading every message row.
### Expected behavior:
NVDA should only report that a message has been selected if no message was selected previously.
### System configuration:

#### NVDA Installed/portable/running from source:
Installed
#### NVDA version:
alpha-16209,b02ed2de
#### Windows version:
Windows 7 Professional Service Pack 1, 64-bit (6.1.7601)
#### Name and version of other software in use when reproducing the issue:
Mozilla Thunderbird 64.0b1 (32-bit)
#### Other information about your system:

### Other questions:

#### Does the issue still occur after restarting your PC?
Yes
#### Have you tried any other versions of NVDA?
No


Discussion:

Resolving patch:
diff --git a/source/speech.py b/source/speech.py
--- a/source/speech.py
+++ b/source/speech.py
@@ -325,8 +325,12 @@ def speakObjectProperties(obj,reason=controlTypes.REASON_QUERY,index=None,**allo
 			and obj.selectionContainer 
 			and obj.selectionContainer.getSelectedItemsCount(2)==1
 		):
+			# We must copy the states set and  put it back in newPropertyValues otherwise mutating the original states set in-place will wrongly change the cached states.
+			# This would then cause 'selected' to be announced as a change when any other state happens to change on this object in future.
+			states=states.copy()
 			states.discard(controlTypes.STATE_SELECTED)
 			states.discard(controlTypes.STATE_SELECTABLE)
+			newPropertyValues['states']=states
 	#Get the speech text for the properties we want to speak, and then speak it
 	text=getSpeechTextForProperties(reason,**newPropertyValues)
 	if text:


Test patch:
Repository: nvaccess/nvda

Issue:
scons: Fail early if running in 64 bit Python
We can't run in 64 bit Python. Building fails obscurely if someone tries this, as has happened a few times now; see [this thread](http://nabble.nvda-project.org/Espeak-Error-when-Trying-to-Build-Source-tp41882.html) for the latest example. We do document 32 bit Python, but people sometimes miss this or have multiple versions installed and use the wrong one. It should be simple enough to just have scons fail early if it detects 64 bit Python.


Discussion:

Resolving patch:
diff --git a/scons.py b/scons.py
--- a/scons.py
+++ b/scons.py
@@ -3,6 +3,19 @@
 
 import sys
 import os
+import platform
+# Variables for storing required version of Python, and the version which is used to run this script.
+requiredPythonMajor ="2"
+requiredPythonMinor = "7"
+requiredPythonArchitecture = "32bit"
+installedPythonMajor = str(sys.version_info.major)
+installedPythonMinor = str(sys.version_info.minor)
+installedPythonArchitecture = platform.architecture()[0]
+# Ensure, that we are running with required version of Python, otherwise inform the user and exit.
+if installedPythonArchitecture != requiredPythonArchitecture or installedPythonMajor != requiredPythonMajor or installedPythonMinor != requiredPythonMinor:
+	print("This script is started with Python %s.%s %s, however to build NVDA you have to use Python %s.%s %s." %(installedPythonMajor, installedPythonMinor, installedPythonArchitecture, requiredPythonMajor, requiredPythonMinor, requiredPythonArchitecture))
+	print("Please install the needed version of Python and launch SCons again, or if you have mulltiple versions of Python installed start this script with required version explicitly.")
+	sys.exit(1)
 sys.path.append(os.path.abspath(
 	os.path.join(__file__, "..", "source")))
 import sourceEnv


Test patch:
Repository: nvaccess/nvda

Issue:
Error after changing emoji parameters without modify replacement value
<!--
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/wiki/Github-issue-template-explanation-and-examples
-->

### Steps to reproduce:

1. Press NVDA+control+v to verify that Include Consortium Unicode data is checked
2. Open Symbols dialog
3. Try to add an existing emoji to search it, pressing the Add button and pasting 😂
4. Change a parameter other than the replacement, for example punctuation level, and press OK
5. Press NVDA+control+v and uncheck Include Consortium Unicode data
6. Try to read 😂  (press NVDA+c if it's copied in clipboard)

### Actual behavior:

An error sound is heart and the symbol isn't read.

### Expected behavior:

The symbol should be read according with the chosen parameters, even when other emojis are excluded.

### System configuration:

#### NVDA Installed/portable/running from source:

Tested in portable and running from source

#### NVDA version:

alpha-16235,153b12df

#### Windows version:

Windows 10 Version	10.0.17134 build 17134

#### Name and version of other software in use when reproducing the issue:
N/A
#### Other information about your system:
N/A
### Other questions:

#### Does the issue still occur after restarting your PC?
Yes
#### Have you tried any other versions of NVDA?
Beta from source



Discussion:
[nvdaLogAndSymbolsDic.zip](https://github.com/nvaccess/nvda/files/2564930/nvdaLogAndSymbolsDic.zip)

Confirmed. I'll try to address this.

Resolving patch:
diff --git a/source/characterProcessing.py b/source/characterProcessing.py
--- a/source/characterProcessing.py
+++ b/source/characterProcessing.py
@@ -468,6 +468,13 @@ def __init__(self, locale):
 				log.warning(u"Replacement not defined in locale {locale} for symbol: {symbol}".format(
 					symbol=symbol.identifier, locale=self.locale))
 				del symbols[symbol.identifier]
+				try:
+					if len(symbol.identifier) == 1:
+						characters.remove(symbol.identifier)
+					else:
+						multiChars.remove(symbol.identifier)
+				except ValueError:
+					pass
 				try:
 					complexSymbolsList.remove(symbol)
 				except ValueError:


Test patch:
Repository: nvaccess/nvda

Issue:
Somali is not recognized on Windows 7 in NVDA language list.
### Steps to reproduce:
1. Start NVDA on Windows 7.
2. Open general settings with NVDA_CTRL+G.
3. Look for Somali on the list of languages.
### Actual behavior:
There is entry named so, but not somali.
### Expected behavior:
The entry for Somali should be present.
### System configuration:

#### NVDA Installed/portable/running from source:
Installed
#### NVDA version:
2018.4 beta 2

#### Windows version:
Windows 7 x64
#### 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 PC?
Yes
#### Have you tried any other versions of NVDA?

No


Discussion:

Resolving patch:
diff --git a/source/languageHandler.py b/source/languageHandler.py
--- a/source/languageHandler.py
+++ b/source/languageHandler.py
@@ -83,6 +83,8 @@ def getLanguageDescription(language):
 			"kmr":pgettext("languageName","Northern Kurdish"),
 			# Translators: The name of a language supported by NVDA.
 			"my":pgettext("languageName","Burmese"),
+			# Translators: The name of a language supported by NVDA.
+			"so":pgettext("languageName","Somali"),
 		}.get(language,None)
 	return desc
 


Test patch:
Repository: nvaccess/nvda

Issue:
MS Word with UIA, table navigation breaks on empty cells
cc @michaeldcurran

### Steps to reproduce:
1. Create a Word document with a table that contains empty cells. [table.docx](https://github.com/nvaccess/nvda/files/2333182/table.docx) is an example that implements a table with 3 columns and two rows. On the first row, the middle cell is empty, whereas in row 2, the right most cell is empty.
2. Navigate with table navigation through all the cells.

### Actual behavior:
NVDA announces out of table when coming across an empty cell, and table navigation does not work any more, unless you manually move back in the table.

### Expected behavior:
It should be possible to access every cell with table navigation.

### System configuration:

#### NVDA Installed/portable/running from source:
Installed

#### NVDA version:
NVDA alpha-15933

#### Windows version:
Version 1809 (OS Build 17746.1000). Also reproducible in the April update.

#### Name and version of other software in use when reproducing the issue:
MS Word 16.0.10325.20118

### Other questions:

#### Does the issue still occur after restarting your PC?
Yes

#### Have you tried any other versions of NVDA?
Not yet


Discussion:

Resolving patch:
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
@@ -342,8 +342,12 @@ def _get_UIAElementAtStart(self):
 		# Thus we must check getChildren before getEnclosingElement.
 		tempInfo.expand(textInfos.UNIT_CHARACTER)
 		tempRange=tempInfo._rangeObj
-		children=getChildrenWithCacheFromUIATextRange(tempRange,UIAHandler.handler.baseCacheRequest)
-		if children.length==1:
+		try:
+			children=getChildrenWithCacheFromUIATextRange(tempRange,UIAHandler.handler.baseCacheRequest)
+		except COMError as e:
+			log.debugWarning("Could not get children from UIA text range, %s"%e)
+			children=None
+		if children and children.length==1:
 			child=children.getElement(0)
 		else:
 			child=getEnclosingElementWithCacheFromUIATextRange(tempRange,UIAHandler.handler.baseCacheRequest)
diff --git a/source/NVDAObjects/UIA/wordDocument.py b/source/NVDAObjects/UIA/wordDocument.py
--- a/source/NVDAObjects/UIA/wordDocument.py
+++ b/source/NVDAObjects/UIA/wordDocument.py
@@ -180,14 +180,6 @@ def expand(self,unit):
 				docInfo=self.obj.makeTextInfo(textInfos.POSITION_ALL)
 				self.setEndPoint(docInfo,"endToEnd")
 
-	def _get_isCollapsed(self):
-		res=super(WordDocumentTextInfo,self).isCollapsed
-		if res: 
-			return True
-		# MS Word does not seem to be able to fully collapse ranges when on links and tables etc.
-		# Therefore class a range as collapsed if it has no text
-		return not bool(self.text)
-
 	def getTextWithFields(self,formatConfig=None):
 		if self.isCollapsed:
 			# #7652: We cannot fetch fields on collapsed ranges otherwise we end up with repeating controlFields in braille (such as list list list). 


Test patch:
Repository: nvaccess/nvda

Issue:
The dialog for installing incompatible add-ons is not centered on the screen
### Steps to reproduce:
1. Install the latest NVDA alpha snapshot, which contains the feature to check for add-on compatibility.
2. Try to install an add-on, which is not marked as compatible with this version of NVDA.

### Actual behavior:
The dialog which appears at first and asks us if we are sure we want to install this add-on is not centered on the screen.

### Expected behavior:
The dialog which appears at first and asks us if we are sure we want to install this add-on should be centered on the screen.

### System configuration
- Operating system: Windows 10 Pro version 1809 (build 17763.168), 64-bit, in Bulgarian with all locale settings set to "Bulgarian".
- NVDA version: alpha-16401,83b3e839.
- Processor: Intel Core i5-4670 at 3.40GHz.
- RAM Memory: 8.00GB.
- Graphics: MSI GeForce GTX-1050TI Gaming X 4G, 4096MB dedicated memory + 4065MB shared system memory, desktop resolution set to 1920x1080.
- Sound Card: Realtek ALC887 at Intel Lynx Point PCH - High Definition Audio Controller.


Discussion:

Resolving patch:
diff --git a/source/gui/addonGui.py b/source/gui/addonGui.py
--- a/source/gui/addonGui.py
+++ b/source/gui/addonGui.py
@@ -17,9 +17,9 @@
 import addonHandler
 import globalVars
 import buildVersion
-import guiHelper
-import nvdaControls
-from dpiScalingHelper import DpiScalingHelperMixin
+from . import guiHelper
+from . import nvdaControls
+from .dpiScalingHelper import DpiScalingHelperMixin
 
 def promptUserForRestart():
 	# Translators: A message asking the user if they wish to restart NVDA as addons have been added, enabled/disabled or removed.
@@ -91,7 +91,7 @@ def __init__(self, parent, title, message,
 				id=wx.ID_YES,
 				# Translators: A button in the addon installation warning dialog which allows the user to agree to installing
 				#  the add-on
-				label=_("Yes")
+				label=_("&Yes")
 			)
 			yesButton.SetDefault()
 			yesButton.Bind(wx.EVT_BUTTON, lambda evt: self.EndModal(wx.YES))
@@ -103,7 +103,7 @@ def __init__(self, parent, title, message,
 				id=wx.ID_NO,
 				# Translators: A button in the addon installation warning dialog which allows the user to decide not to
 				# install the add-on
-				label=_("No")
+				label=_("&No")
 			)
 			noButton.Bind(wx.EVT_BUTTON, lambda evt: self.EndModal(wx.NO))
 		contentsSizer.addDialogDismissButtons(buttonHelper)
@@ -115,6 +115,7 @@ def __init__(self, parent, title, message,
 		)
 		mainSizer.Fit(self)
 		self.SetSizer(mainSizer)
+		self.Center(wx.BOTH | wx.CENTER_ON_SCREEN)
 
 	def _toggleEnabledStateOfAffirmativeAction(self, evt):
 		self.yesButton.Enable(self.confirmedCheckbox.IsChecked())


Test patch:
Repository: nvaccess/nvda

Issue:
Update check: 'install pending update' fails to locate version tuple for add-on compatibility checks
Hi,

Perhaps another oversight from #6275:

### Steps to reproduce:
1. Check for NVDA updates.
2. If updates are available, download it, and postpone the update.
3. Press NVDA+Q, then from exit dialog, select "install pending update".

### Actual behavior:
Version info raises traceback.

### Expected behavior:
Update is installed, or if there are incompatible add-ons, a warning dialog is shown.

### System configuration
#### NVDA installed/portable/running from source:
Installed

#### NVDA version:
2019.1.alpha.16448

#### Windows version:
Windows 10 Version 1809

#### 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 PC?
Yes

#### Have you tried any other versions of NVDA?
No

### Cause:
Not only the new update version must be checked, the tuple must be saved, too.

Thanks.


Discussion:

Resolving patch:
diff --git a/source/gui/__init__.py b/source/gui/__init__.py
--- a/source/gui/__init__.py
+++ b/source/gui/__init__.py
@@ -214,10 +214,10 @@ def onTemporaryDictionaryCommand(self,evt):
 	def onExecuteUpdateCommand(self, evt):
 		if updateCheck and updateCheck.isPendingUpdate():
 			updateTuple = updateCheck.getPendingUpdate()
-			newNVDAVersionTuple = versionInfo.getNVDAVersionTupleFromString(updateTuple[1])
+			newNVDAVersionTuple = updateTuple[2]
 			from addonHandler import getAddonsWithoutKnownCompatibility
 			if any(getAddonsWithoutKnownCompatibility(newNVDAVersionTuple)):
-				confirmUpdateDialog = updateCheck.UpdateAskInstallDialog(gui.mainFrame, updateTuple[0], updateTuple[1])
+				confirmUpdateDialog = updateCheck.UpdateAskInstallDialog(gui.mainFrame, updateTuple[0], updateTuple[1], newNVDAVersionTuple)
 				gui.runScriptModalDialog(confirmUpdateDialog)
 			else:
 				updateCheck.executePendingUpdate()
@@ -861,10 +861,10 @@ def onOk(self, evt):
 		elif action == 4:
 			if updateCheck:
 				updateTuple = updateCheck.getPendingUpdate()
-				newNVDAVersionTuple = versionInfo.getNVDAVersionTupleFromString(updateTuple[1])
+				newNVDAVersionTuple = updateTuple[2]
 				from addonHandler import getAddonsWithoutKnownCompatibility
 				if any(getAddonsWithoutKnownCompatibility(newNVDAVersionTuple)):
-					confirmUpdateDialog = updateCheck.UpdateAskInstallDialog(gui.mainFrame, updateTuple[0], updateTuple[1])
+					confirmUpdateDialog = updateCheck.UpdateAskInstallDialog(gui.mainFrame, updateTuple[0], updateTuple[1], newNVDAVersionTuple)
 					confirmUpdateDialog.ShowModal()
 				else:
 					updateCheck.executePendingUpdate()


Test patch:
Repository: nvaccess/nvda

Issue:
wx.Locale: Aragonese does not have wx.LanguageInfo
Hi,

Reported on NvDA translations mailing list and subsequently confirmed: NVDA 2018.4 fails to start properly if UI language is set to Aragonese.

### Steps to reproduce:
1. Install NVDA 2018.4 and current alpha.
2. From NVDA settings/General, switch language to "Aragonese" and press Enter, and confirm if asked to restart.

### Actual behavior:
The following traceback is recorded:

CRITICAL - __main__ (11:26:22.013):
core failure
Traceback (most recent call last):
  File "nvda.pyw", line 233, in <module>
  File "core.pyc", line 390, in main
AttributeError: 'NoneType' object has no attribute 'Language'

### Expected behavior:
NVDA starts properly with language set to Aragonese.

### System configuration
#### NVDA installed/portable/running from source:
Installed

#### NVDA version:
2018.4

#### Windows version:
Windows 10 Version 1809

#### 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 PC?
Yes

#### Have you tried any other versions of NVDA?
Yes - alpha.16458.

### Technical information:
Not all languages come with wx.LanguageInfo, and Aragonese is one of those that  isnt' supported by wxPython natively. Thus see if wxLang itself is something and act accordingly.

Thanks.


Discussion:

Resolving patch:
diff --git a/source/core.py b/source/core.py
--- a/source/core.py
+++ b/source/core.py
@@ -385,8 +385,10 @@ def handlePowerStatusChange(self):
 		locale.AddCatalogLookupPathPrefix(os.path.join(os.getcwdu(),"locale"))
 	# #8064: Wx might know the language, but may not actually contain a translation database for that language.
 	# If we try to initialize this language, wx will show a warning dialog.
-	# Therefore treat this situation like wx not knowing the language at all.
-	if not locale.IsAvailable(wxLang.Language):
+	# #9089: some languages (such as Aragonese) do not have language info, causing language getter to fail.
+	# In this case, wxLang is already set to None.
+	# Therefore treat these situations like wx not knowing the language at all.
+	if wxLang and not locale.IsAvailable(wxLang.Language):
 		wxLang=None
 	if wxLang:
 		try:


Test patch:
Repository: nvaccess/nvda

Issue:
NVDA doesn’t Detect and Announce the Presence of Formulas in Lotus Symphony Spreadsheets
**Reported by Pat on 2010-08-25 18:33**
One has to guess the presence of a formula as this feature isn’t available.

NVDA doesn’t Detect and Announce the Presence of Formulas in Lotus Symphony Spreadsheets
**Reported by Pat on 2010-08-25 18:33**
One has to guess the presence of a formula as this feature isn’t available.



Discussion:
Confirmed in LibreOffice. Accessibility of LibreOffice Calc isn't very good anyway.
It looks like LibreOffice Calc does now expose the presence of a formula via IAccessible2 object attributes:

> `IAccessible2 attributes: u'Formula:1+1;Note:;Shadow:;TopBorder:;BottomBorder:;LeftBorder:;RightBorder:;isdropdown:false;'`

Note the "Formula" (capital f) attribute. When there is no formula, it is still exposed, but with an empty value.

So, it should be possible to map this to NVDA's STATE_HASFORMULA in the soffice app module.

P4 for now, but good for a new developer to tackle.
Actually, let's go for p3, since it's not that difficult to implement.
Confirmed in LibreOffice. Accessibility of LibreOffice Calc isn't very good anyway.
It looks like LibreOffice Calc does now expose the presence of a formula via IAccessible2 object attributes:

> `IAccessible2 attributes: u'Formula:1+1;Note:;Shadow:;TopBorder:;BottomBorder:;LeftBorder:;RightBorder:;isdropdown:false;'`

Note the "Formula" (capital f) attribute. When there is no formula, it is still exposed, but with an empty value.

So, it should be possible to map this to NVDA's STATE_HASFORMULA in the soffice app module.

P4 for now, but good for a new developer to tackle.
Actually, let's go for p3, since it's not that difficult to implement.

Resolving patch:
diff --git a/source/appModules/soffice.py b/source/appModules/soffice.py
--- a/source/appModules/soffice.py
+++ b/source/appModules/soffice.py
@@ -2,7 +2,7 @@
 #A part of NonVisual Desktop Access (NVDA)
 #This file is covered by the GNU General Public License.
 #See the file COPYING for more details.
-#Copyright (C) 2006-2010 Michael Curran <mick@kulgan.net>, James Teh <jamie@jantrid.net>
+#Copyright (C) 2006-2019 NV Access Limited, Bill Dengler
 
 from comtypes import COMError
 import IAccessibleHandler
@@ -220,6 +220,9 @@ def _get_states(self):
 			# #8988: Cells in Libre Office do not have the selected state when a single cell is selected (i.e. has focus).
 			# Since #8898, the negative selected state is announced for table cells with the selectable state.
 			states.add(controlTypes.STATE_SELECTED)
+ 		if self.IA2Attributes.get('Formula'):
+			# #860: Recent versions of Calc expose has formula state via IAccessible 2.
+			states.add(controlTypes.STATE_HASFORMULA)
 		return states
 
 class SymphonyTable(IAccessible):


Test patch:
Repository: nvaccess/nvda

Issue:
Update Norwegian 8-dot Braille table from no-no-comp8.ctb to no-no-8dot.utb
<!--
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/wiki/Github-issue-template-explanation-and-examples
-->

### Is your feature request related to a problem? Please describe.
The current Norwegian 8-dot Braille table in use is an older version which has numerous characters either missing or corrupted.

A new, extended version of the Norwegian 8-dot table is available on LibLouis which addresses these issues.

### Describe the solution you'd like

Swap from using no-no-comp8.ctb to no-no-8dot.utb

### Describe alternatives you've considered

### Additional context
As per conversation on NVDA list at https://nvda.groups.io/g/nvda/message/53392

(Edited to correct table names).


Discussion:

Resolving patch:
diff --git a/source/brailleTables.py b/source/brailleTables.py
--- a/source/brailleTables.py
+++ b/source/brailleTables.py
@@ -2,7 +2,7 @@
 #A part of NonVisual Desktop Access (NVDA)
 #This file is covered by the GNU General Public License.
 #See the file COPYING for more details.
-#Copyright (C) 2008-2017 NV Access Limited, Joseph Lee
+#Copyright (C) 2008-2019 NV Access Limited, Joseph Lee
 
 """Manages information about available braille translation tables.
 """
@@ -76,7 +76,8 @@ def listTables():
 	"mn-MN.utb":"mn-MN-g1.utb",
 	"nl-BE-g1.ctb":"nl-BE-g0.utb",
 	"nl-NL-g1.ctb":"nl-NL-g0.utb",
-	"no-no.ctb":"no-no-comp8.ctb",
+	"no-no.ctb":"no-no-8dot.utb",
+	"no-no-comp8.ctb":"no-no-8dot.utb",
 	"ru-compbrl.ctb":"ru.ctb",
 	"sk-sk-g1.utb":"sk-g1.ctb",
 	"UEBC-g1.ctb":"en-ueb-g1.ctb",
@@ -86,6 +87,9 @@ def listTables():
 # Add builtin tables.
 # Translators: The name of a braille table displayed in the
 # braille settings dialog.
+addTable("afr-za-g1.ctb", _("Afrikaans grade 1"))
+# Translators: The name of a braille table displayed in the
+# braille settings dialog.
 addTable("ar-ar-comp8.utb", _("Arabic 8 dot computer braille"))
 # Translators: The name of a braille table displayed in the
 # braille settings dialog.
@@ -305,7 +309,7 @@ def listTables():
 addTable("nl-NL-g0.utb", _("Dutch (Netherlands)"))
 # Translators: The name of a braille table displayed in the
 # braille settings dialog.
-addTable("no-no-comp8.ctb", _("Norwegian 8 dot computer braille"))
+addTable("no-no-8dot.utb", _("Norwegian 8 dot computer braille"))
 # Translators: The name of a braille table displayed in the
 # braille settings dialog.
 addTable("No-No-g0.utb", _("Norwegian grade 0"))


Test patch: