CVE-2023-4218 (published 2023-11-09T09:15Z)

In Eclipse IDE versions < 2023-09 (4.29) some files with xml content are parsed vulnerable against all sorts of XXE attacks. The user just needs to open any evil project or update an open project with a vulnerable file (for example for review a foreign repository or patch).\n

CVSS v3 base score: 5.0, MEDIUM (CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N)

Weakness information:
cwe_id: CWE-611
cwe_name: Improper Restriction of XML External Entity Reference
description: The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.
extended_description: 
            XML documents optionally contain a Document Type Definition (DTD), which, among other features, enables the definition of XML entities. It is possible to define an entity by providing a substitution string in the form of a URI. The XML parser can access the contents of this URI and embed these contents back into the XML document for further processing.
            By submitting an XML file that defines an external entity with a file:// URI, an attacker can cause the processing application to read the contents of a local file. For example, a URI such as "file:///c:/winnt/win.ini" designates (in Windows) the file C:\Winnt\win.ini, or file:///etc/passwd designates the password file in Unix-based systems. Using URIs with other schemes such as http://, the attacker can force the application to make outgoing requests to servers that the attacker cannot reach directly, which can be used to bypass firewall restrictions or hide the source of attacks such as port scanning.
            Once the content of the URI is read, it is fed back into the application that is processing the XML. This application may echo back the data (e.g. in an error message), thereby exposing the file contents.
         
         

Fix information:
repo_url: https://github.com/eclipse-platform/eclipse.platform.ui
commit_details: repo_url: https://github.com/eclipse-platform/eclipse.platform.ui
author: Jörg Kubitz
author_date: 2023-07-20 15:48:42+02:00
msg: Refactor XML handling
repository: repo_url: https://github.com/eclipse-platform/eclipse.platform.ui
repo_name: eclipse-platform/eclipse.platform.ui
description: Eclipse Platform
repo_language: Java
owner: eclipse-platform
file_changes: filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -10,7 +10,7 @@ Export-Package:
  org.eclipse.core.filebuffers.manipulation,
  org.eclipse.core.internal.filebuffers;x-internal:=true
 Require-Bundle: 
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)";resolution:=optional,
  org.eclipse.text;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.core.filesystem;bundle-version="[1.2.0,2.0.0)"

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -6,7 +6,7 @@ Bundle-Version: 0.4.100.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Require-Bundle: org.apache.commons.jxpath;bundle-version="1.2.0",
  org.eclipse.emf.ecore;bundle-version="2.6.0",
- org.eclipse.core.runtime;bundle-version="3.16.100"
+ org.eclipse.core.runtime;bundle-version="3.29.0"
 Export-Package: org.eclipse.e4.emf.internal.xpath;x-internal:=true,
  org.eclipse.e4.emf.internal.xpath.helper;x-friends:="org.eclipse.e4.emf.xpath.test,org.eclipse.e4.ui.model.workbench,org.eclipse.e4.ui.workbench",
  org.eclipse.e4.emf.xpath

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -41,6 +41,6 @@ Export-Package: org.eclipse.e4.ui.css.core;x-internal:=true,
 Require-Bundle: org.w3c.css.sac;bundle-version="1.3.0",
  org.apache.batik.css;bundle-version="[1.9.1,2.0.0)",
  org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.27.0,4.0.0)"
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)"
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Automatic-Module-Name: org.eclipse.e4.ui.css.core

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -10,7 +10,7 @@ Require-Bundle: org.eclipse.swt;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.e4.ui.css.swt;bundle-version="0.13.100",
  org.eclipse.e4.ui.css.core;bundle-version="0.12.200",
  org.w3c.css.sac;bundle-version="1.3.0",
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)"
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)"
 Service-Component: OSGI-INF/org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngineManager.xml
 Bundle-ActivationPolicy: lazy
 Export-Package: org.eclipse.e4.ui.css.swt.internal.theme;x-internal:=true,

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -30,7 +30,7 @@ Export-Package: org.eclipse.e4.ui.css.swt;x-friends:="org.eclipse.ui.workbench",
 Require-Bundle: org.eclipse.e4.ui.css.core;bundle-version="0.12.200",
  org.eclipse.swt;bundle-version="[3.106.0,4.0.0)",
  org.w3c.css.sac;bundle-version="1.3.0",
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)"
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)"
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Bundle-ActivationPolicy: lazy
 Import-Package: org.eclipse.jface.resource

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -10,5 +10,5 @@ Export-Package: org.eclipse.e4.ui.dialogs.filteredtree,
  org.eclipse.e4.ui.dialogs.textbundles;x-internal:=true,
  org.eclipse.e4.ui.internal.dialogs.about;x-internal:=true
 Require-Bundle: org.eclipse.jface;bundle-version="3.11.0",
- org.eclipse.core.runtime;bundle-version="3.27.0"
+ org.eclipse.core.runtime;bundle-version="3.29.0"
 Automatic-Module-Name: org.eclipse.e4.ui.dialogs

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -6,7 +6,7 @@ Bundle-Version: 3.17.100.qualifier
 Bundle-Name: %Bundle-Name
 Bundle-Vendor: %Bundle-Vendor
 Bundle-RequiredExecutionEnvironment: JavaSE-17
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.7.0,4.0.0)";resolution:=optional,
  org.eclipse.swt;bundle-version="[3.107.0,4.0.0)"
 Export-Package: org.eclipse.e4.ui.internal.workspace.markers;x-friends:="org.eclipse.ui.ide"

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -66,7 +66,7 @@ Export-Package: org.eclipse.e4.ui.model;x-friends:="org.eclipse.e4.ui.workbench,
  org.eclipse.e4.ui.model.fragment.impl;x-friends:="org.eclipse.e4.ui.workbench",
  org.eclipse.e4.ui.model.fragment.util;x-internal:=true,
  org.eclipse.e4.ui.model.internal;x-friends:="org.eclipse.e4.ui.workbench"
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.e4.core.services;bundle-version="0.9.0",
  org.eclipse.e4.core.contexts;bundle-version="1.0.0",
  org.eclipse.core.commands;bundle-version="[3.5.0,4.0.0)",

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -14,7 +14,7 @@ Require-Bundle: org.eclipse.e4.core.di;bundle-version="1.3.0",
  org.eclipse.e4.core.contexts,
  org.eclipse.e4.ui.model.workbench,
  org.eclipse.e4.ui.workbench.swt,
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.e4.ui.services
 Import-Package: javax.annotation;version="[1.3.0,2.0.0)",
  javax.inject;version="[1.0.0,2.0.0)"

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -14,7 +14,7 @@ Require-Bundle: org.eclipse.e4.ui.model.workbench;bundle-version="1.0.0",
  org.eclipse.e4.ui.widgets;bundle-version="0.11.0",
  org.eclipse.swt;bundle-version="[3.7.0,4.0.0)",
  org.eclipse.jface;bundle-version="[3.7.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.7.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.e4.ui.di;bundle-version="0.10.0",
  org.eclipse.e4.ui.services;bundle-version="1.0.0",
  org.eclipse.emf.ecore.xmi;bundle-version="2.7.0"

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -23,7 +23,7 @@ Require-Bundle: org.eclipse.e4.ui.workbench;bundle-version="0.9.0",
  org.eclipse.emf.ecore;bundle-version="2.7.0",
  org.eclipse.e4.ui.css.swt;bundle-version="0.11.0",
  org.eclipse.e4.core.di.extensions;bundle-version="0.12.0",
- org.eclipse.core.runtime;bundle-version="3.17.100"
+ org.eclipse.core.runtime;bundle-version="3.29.0"
 Export-Package: org.eclipse.e4.ui.internal.workbench.renderers.swt;x-friends:="org.eclipse.ui.workbench",
  org.eclipse.e4.ui.workbench.renderers.swt;x-friends:="org.eclipse.e4.ui.workbench.addons.swt,org.eclipse.ui.workbench"
 Bundle-ActivationPolicy: lazy

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -21,7 +21,7 @@ Require-Bundle: org.eclipse.e4.ui.workbench;bundle-version="0.10.0",
  org.eclipse.e4.core.di;bundle-version="1.1.0",
  org.eclipse.e4.ui.css.swt.theme;bundle-version="0.12.0",
  org.eclipse.core.expressions;bundle-version="[3.4.200,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.e4.core.commands;bundle-version="0.9.0",
  org.eclipse.e4.ui.widgets;bundle-version="0.11.0",
  org.eclipse.e4.ui.di;bundle-version="0.9.0",

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -17,7 +17,7 @@ Require-Bundle: org.eclipse.e4.ui.model.workbench;bundle-version="1.2.0",
  org.eclipse.e4.ui.di;bundle-version="0.9.0",
  org.eclipse.emf.ecore.xmi;bundle-version="2.7.0",
  org.eclipse.e4.core.di.extensions,
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)"
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)"
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Export-Package: org.eclipse.e4.ui.internal.workbench;

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -9,7 +9,7 @@ Bundle-RequiredExecutionEnvironment: JavaSE-17
 Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.7.0,4.0.0)",
  org.eclipse.swt;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.equinox.registry;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)"
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)"
 Export-Package: org.eclipse.ui.testing,
  org.eclipse.ui.testing.dumps
 Automatic-Module-Name: org.eclipse.e4.ui.workbench3

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -9,5 +9,5 @@ Bundle-RequiredExecutionEnvironment: JavaSE-17
 Export-Package: org.eclipse.jface.notifications,
  org.eclipse.jface.notifications.internal;x-internal:=true
 Automatic-Module-Name: org.eclipse.jface.notifications
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.18.0",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.29.0",
  org.eclipse.jface;bundle-version="3.20.0"

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -33,7 +33,7 @@ Export-Package:
  org.eclipse.jface.text.templates,
  org.eclipse.jface.text.templates.persistence
 Require-Bundle: 
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.text;bundle-version="[3.8.0,4.0.0)";visibility:=reexport,
  org.eclipse.swt;bundle-version="[3.117.0,4.0.0)",
  org.eclipse.jface;bundle-version="[3.19.0,4.0.0)"

programming_language: CoffeeScript
filename: DialogSettings.java
change_type: ModificationType.MODIFY
diff: @@ -36,9 +36,9 @@ import java.util.Map;
 import java.util.Map.Entry;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
+import org.eclipse.jface.internal.XmlProcessorFactoryJFace;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -260,8 +260,7 @@ public class DialogSettings implements IDialogSettings {
 	public void load(Reader r) {
 		Document document = null;
 		try {
-			DocumentBuilder parser = DocumentBuilderFactory.newInstance()
-					.newDocumentBuilder();
+			DocumentBuilder parser = XmlProcessorFactoryJFace.createDocumentBuilderWithErrorOnDOCTYPE();
 			//		parser.setProcessNamespace(true);
 			document = parser.parse(new InputSource(r));
 

programming_language: Java
filename: XmlProcessorFactoryJFace.java
change_type: ModificationType.ADD
diff: @@ -0,0 +1,59 @@
+/*******************************************************************************
+ *  Copyright (c) 2023 Joerg Kubitz and others.
+ *
+ *  This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License 2.0
+ *  which accompanies this distribution, and is available at
+ *  https://www.eclipse.org/legal/epl-2.0/
+ *
+ *  SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************/
+package org.eclipse.jface.internal;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+/**
+ * XML processing which prohibits external entities.
+ *
+ * @see <a href="https://rules.sonarsource.com/java/RSPEC-2755/">RSPEC-2755</a>
+ */
+/* A copy of org.eclipse.core.internal.runtime.XmlProcessorFactory for jface. */
+public class XmlProcessorFactoryJFace {
+	private XmlProcessorFactoryJFace() {
+		// static Utility only
+	}
+
+	private static final DocumentBuilderFactory DOCUMENT_BUILDER_FACTORY_ERROR_ON_DOCTYPE = createDocumentBuilderFactoryWithErrorOnDOCTYPE();
+
+	/**
+	 * Creates DocumentBuilderFactory which throws SAXParseException when detecting
+	 * external entities. It's magnitudes faster to call
+	 * {@link #createDocumentBuilderWithErrorOnDOCTYPE()}.
+	 *
+	 * @return javax.xml.parsers.DocumentBuilderFactory
+	 */
+	public static synchronized DocumentBuilderFactory createDocumentBuilderFactoryWithErrorOnDOCTYPE() {
+		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+		// completely disable DOCTYPE declaration:
+		try {
+			factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); //$NON-NLS-1$
+		} catch (ParserConfigurationException e) {
+			throw new RuntimeException(e.getMessage(), e);
+		}
+		return factory;
+	}
+
+	/**
+	 * Creates DocumentBuilder which throws SAXParseException when detecting
+	 * external entities. The builder is not thread safe.
+	 *
+	 * @return javax.xml.parsers.DocumentBuilder
+	 * @throws ParserConfigurationException
+	 */
+	public static DocumentBuilder createDocumentBuilderWithErrorOnDOCTYPE() throws ParserConfigurationException {
+		return DOCUMENT_BUILDER_FACTORY_ERROR_ON_DOCTYPE.newDocumentBuilder();
+	}
+
+}
\ No newline at end of file

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -20,7 +20,7 @@ Export-Package: org.eclipse.search.core.text,
  org.eclipse.search2.internal.ui.text;x-internal:=true,
  org.eclipse.search2.internal.ui.text2;x-internal:=true
 Require-Bundle: 
- org.eclipse.core.runtime;bundle-version="[3.27.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)",
  org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)",
  org.eclipse.core.filebuffers;bundle-version="[3.5.0,4.0.0)",

programming_language: CoffeeScript
filename: org.eclipse.jdt.core.prefs
change_type: ModificationType.MODIFY
diff: @@ -1,4 +1,5 @@
 eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
 org.eclipse.jdt.core.builder.invalidClasspath=abort
@@ -21,8 +22,11 @@ org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
 org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
 org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
 org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
 org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
 org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
 org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
@@ -34,6 +38,8 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
+org.eclipse.jdt.core.compiler.problem.APILeak=warning
+org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=info
@@ -42,7 +48,7 @@ org.eclipse.jdt.core.compiler.problem.deadCode=error
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
 org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
@@ -85,12 +91,14 @@ org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
 org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
 org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
 org.eclipse.jdt.core.compiler.problem.nullReference=error
 org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
 org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
 org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
 org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
 org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
 org.eclipse.jdt.core.compiler.problem.potentialNullReference=info
 org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=info
@@ -106,17 +114,23 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
 org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info
 org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
 org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
 org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
 org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
 org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
 org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
 org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=info
 org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
+org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -18,6 +18,6 @@ Require-Bundle:
  org.eclipse.core.commands;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.equinox.preferences;bundle-version="[3.7.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)"
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)"
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Automatic-Module-Name: org.eclipse.text

programming_language: CoffeeScript
filename: TemplateReaderWriter.java
change_type: ModificationType.MODIFY
diff: @@ -27,12 +27,10 @@ import java.util.ResourceBundle;
 import java.util.Set;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
@@ -157,8 +155,8 @@ public class TemplateReaderWriter {
 			Collection<TemplatePersistenceData> templates= new ArrayList<>();
 			Set<String> ids= new HashSet<>();
 
-			DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
-			DocumentBuilder parser= factory.newDocumentBuilder();
+			@SuppressWarnings("restriction")
+			DocumentBuilder parser= org.eclipse.core.internal.runtime.XmlProcessorFactory.createDocumentBuilderWithErrorOnDOCTYPE();
 			parser.setErrorHandler(new DefaultHandler());
 			Document document= parser.parse(source);
 
@@ -263,10 +261,8 @@ public class TemplateReaderWriter {
 	 */
 	private void save(TemplatePersistenceData[] templates, StreamResult result) throws IOException {
 		try {
-			DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
-			DocumentBuilder builder= factory.newDocumentBuilder();
-			Document document= builder.newDocument();
-
+			@SuppressWarnings("restriction")
+			Document document= org.eclipse.core.internal.runtime.XmlProcessorFactory.newDocumentWithErrorOnDOCTYPE();
 			Node root= document.createElement(TEMPLATE_ROOT);
 			document.appendChild(root);
 
@@ -322,9 +318,8 @@ public class TemplateReaderWriter {
 					node.appendChild(pattern);
 				}
 			}
-
-
-			Transformer transformer=TransformerFactory.newInstance().newTransformer();
+			@SuppressWarnings("restriction")
+			Transformer transformer= org.eclipse.core.internal.runtime.XmlProcessorFactory.createTransformerFactoryWithErrorOnDOCTYPE().newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.ENCODING, StandardCharsets.UTF_8.name());
 			DOMSource source = new DOMSource(document);

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -10,7 +10,7 @@ Export-Package: org.eclipse.ui.browser,
  org.eclipse.ui.internal.browser;x-friends:="org.eclipse.ua.tests,org.eclipse.ui.tests.browser",
  org.eclipse.ui.internal.browser.browsers;x-internal:=true,
  org.eclipse.ui.internal.browser.macosx;x-internal:=true
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.27.0,4.0.0)",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.urischeme;bundle-version="1.1.0"
 Bundle-RequiredExecutionEnvironment: JavaSE-17

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -16,7 +16,7 @@ Export-Package:
  org.eclipse.ui.internal.texteditor;x-internal:=true,
  org.eclipse.ui.texteditor
 Require-Bundle: 
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.swt;bundle-version="[3.101.0,4.0.0)",
  org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)",

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -13,7 +13,7 @@ Export-Package: org.eclipse.ui.forms,
  org.eclipse.ui.internal.forms.css.dom;x-internal:=true,
  org.eclipse.ui.internal.forms.css.properties.css2;x-internal:=true,
  org.eclipse.ui.internal.forms.widgets;x-friends:="org.eclipse.ui.tests.forms"
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.27.0,4.0.0)",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.jface;bundle-version="[3.18.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.105.0,4.0.0)";resolution:=optional,
  org.eclipse.e4.ui.css.core;bundle-version="0.10.100",

programming_language: CoffeeScript
filename: FormTextModel.java
change_type: ModificationType.MODIFY
diff: @@ -56,8 +56,9 @@ public class FormTextModel {
 		}
 	}
 
-	private static final DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory
-			.newInstance();
+	@SuppressWarnings("restriction")
+	private static final DocumentBuilderFactory DOCUMENT_BUILDER_FACTORY = org.eclipse.core.internal.runtime.XmlProcessorFactory
+			.createDocumentBuilderFactoryWithErrorOnDOCTYPE();
 
 	private boolean whitespaceNormalized = true;
 
@@ -132,13 +133,12 @@ public class FormTextModel {
 
 	public void parseInputStream(InputStream is, boolean expandURLs) {
 
-		documentBuilderFactory.setNamespaceAware(true);
-		documentBuilderFactory.setIgnoringComments(true);
+		DOCUMENT_BUILDER_FACTORY.setNamespaceAware(true);
+		DOCUMENT_BUILDER_FACTORY.setIgnoringComments(true);
 
 		reset();
 		try {
-			DocumentBuilder parser = documentBuilderFactory
-					.newDocumentBuilder();
+			DocumentBuilder parser = DOCUMENT_BUILDER_FACTORY.newDocumentBuilder();
 			parser.setErrorHandler(new ParseErrorHandler());
 			InputSource source = new InputSource(is);
 			Document doc = parser.parse(source);

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -9,7 +9,7 @@ Require-Bundle: org.eclipse.ui.workbench.texteditor;bundle-version="3.10.0",
  org.eclipse.ui.editors;bundle-version="3.14.0",
  org.eclipse.text;bundle-version="3.6.0",
  org.eclipse.jface.text;bundle-version="3.24.0",
- org.eclipse.core.runtime;bundle-version="3.12.0",
+ org.eclipse.core.runtime;bundle-version="3.29.0",
  org.eclipse.ui.workbench;bundle-version="3.109.0",
  org.eclipse.jface;bundle-version="3.12.0",
  org.eclipse.ui.ide;bundle-version="3.12.0",

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -6,7 +6,7 @@ Bundle-Version: 1.5.100.qualifier
 Bundle-Vendor: %Plugin.providerName
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.16.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.27.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.15.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.114.0,4.0.0)",
  org.eclipse.ui.navigator.resources;bundle-version="[3.4.0,4.0.0)",

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -46,7 +46,7 @@ Export-Package: org.eclipse.ui,
  org.eclipse.ui.wizards.datatransfer,
  org.eclipse.ui.wizards.newresource
 Require-Bundle: org.eclipse.core.resources;bundle-version="[3.17.0,4.0.0)";resolution:=optional,
- org.eclipse.core.runtime;bundle-version="[3.27.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.core.filesystem;bundle-version="[1.0.0,2.0.0)",
  org.eclipse.help;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.202.0,4.0.0)",

programming_language: Java
filename: WelcomeEditor.java
change_type: ModificationType.MODIFY
diff: @@ -19,8 +19,6 @@ import java.io.InputStream;
 import java.net.URL;
 import java.util.ArrayList;
 
-import javax.xml.parsers.ParserConfigurationException;
-
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -63,7 +61,6 @@ import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
 import org.eclipse.ui.part.EditorPart;
-import org.xml.sax.SAXException;
 
 /**
  * A "fake" editor to show a welcome page
@@ -850,7 +847,7 @@ public class WelcomeEditor extends EditorPart {
 	 *
 	 * @see IEditorPart
 	 */
-	public void gotoMarker(IMarker marker) {
+	public void gotoMarker(@SuppressWarnings({ "unused", "javadoc" }) IMarker marker) {
 		// do nothing
 	}
 
@@ -917,7 +914,7 @@ public class WelcomeEditor extends EditorPart {
 	public void read(InputStream is) throws IOException {
 		try {
 			parser = new WelcomeParser();
-		} catch (ParserConfigurationException | SAXException e) {
+		} catch (Exception e) {
 			throw (IOException) (new IOException().initCause(e));
 		}
 		parser.parse(is);

programming_language: Java
filename: WelcomeParser.java
change_type: ModificationType.MODIFY
diff: @@ -21,7 +21,6 @@ import java.util.ArrayList;
 import javax.xml.parsers.FactoryConfigurationError;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
 
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
@@ -333,14 +332,15 @@ public class WelcomeParser extends DefaultHandler {
 
 	/**
 	 * Creates a new welcome parser.
+	 *
+	 * @throws ParserConfigurationException
+	 * @throws SAXException
+	 * @throws FactoryConfigurationError
 	 */
-	public WelcomeParser() throws ParserConfigurationException, SAXException,
-			FactoryConfigurationError {
-		super();
-		SAXParserFactory factory = SAXParserFactory.newInstance();
-		factory.setFeature("http://xml.org/sax/features/namespaces", true); //$NON-NLS-1$
-		parser = factory.newSAXParser();
-
+	public WelcomeParser() throws ParserConfigurationException, SAXException, FactoryConfigurationError {
+		@SuppressWarnings("restriction")
+		SAXParser p = org.eclipse.core.internal.runtime.XmlProcessorFactory.createSAXParserWithErrorOnDOCTYPE(true);
+		parser = p;
 		parser.getXMLReader().setContentHandler(this);
 		parser.getXMLReader().setDTDHandler(this);
 		parser.getXMLReader().setEntityResolver(this);

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -10,7 +10,7 @@ Bundle-Version: 1.3.100.qualifier
 Export-Package: org.eclipse.ui.internal.monitoring;x-internal:=true,
  org.eclipse.ui.internal.monitoring.preferences;x-internal:=true,
  org.eclipse.ui.monitoring;x-internal:=true
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.jface;bundle-version="[3.10.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.106.0,4.0.0)"
 Automatic-Module-Name: org.eclipse.ui.monitoring

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -18,7 +18,7 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.15.0,4.0.0)",
  org.eclipse.jface;bundle-version="[3.18.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.ui.navigator;bundle-version="[3.9.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.27.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.ui.views.properties.tabbed;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.ui.workbench.texteditor;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.ltk.core.refactoring;bundle-version="[3.5.0,4.0.0)",

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -15,7 +15,7 @@ Export-Package: org.eclipse.ui.internal.navigator;x-friends:="org.eclipse.ui.nav
  org.eclipse.ui.internal.navigator.sorters;x-internal:=true,
  org.eclipse.ui.internal.navigator.wizards;x-friends:="org.eclipse.ui.navigator.resources,org.eclipse.ui.ide",
  org.eclipse.ui.navigator
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.jface;bundle-version="[3.18.0,4.0.0)"

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.ui.views.log;singleton:=true
 Bundle-Version: 1.4.100.qualifier
 Bundle-Activator: org.eclipse.ui.internal.views.log.Activator
 Bundle-Vendor: %provider-name
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.27.0,4.0.0)",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)";resolution:=optional,
  org.eclipse.ui;bundle-version="[3.3.0,4.0.0)",
  org.eclipse.ui.ide;bundle-version="[3.3.0,4.0.0)";resolution:=optional,

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -13,7 +13,7 @@ Export-Package: org.eclipse.ui.internal.views.properties.tabbed;x-internal:=true
 Require-Bundle: org.eclipse.ui.forms;bundle-version="[3.3.0,4.0.0)";visibility:=reexport,
  org.eclipse.ui.views;bundle-version="[3.2.0,4.0.0)";visibility:=reexport,
  org.eclipse.ui;bundle-version="[3.3.0,4.0.0)";visibility:=reexport,
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.e4.ui.css.core;bundle-version="0.12.100",
  org.eclipse.e4.ui.css.swt,
  org.eclipse.jface;bundle-version="[3.18.0,4.0.0)"

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -9,7 +9,7 @@ Export-Package: org.eclipse.ui.internal.views.contentoutline;x-internal:=true,
  org.eclipse.ui.internal.views.properties; ui.views="split"; mandatory:="ui.views"; x-internal:=true,
  org.eclipse.ui.views.contentoutline,
  org.eclipse.ui.views.properties; ui.views="split"; mandatory:="ui.views"
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.help;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.jface;bundle-version="[3.18.0,4.0.0)"

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -24,7 +24,7 @@ Export-Package:
  org.eclipse.ui.texteditor.spelling,
  org.eclipse.ui.texteditor.templates
 Require-Bundle: 
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.compare.core;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.core.expressions;bundle-version="[3.4.100,4.0.0)",
  org.eclipse.jface.text;bundle-version="[3.19.0,4.0.0)",

programming_language: CoffeeScript
filename: XMLMemento.java
change_type: ModificationType.MODIFY
diff: @@ -19,9 +19,7 @@ import java.io.Reader;
 import java.io.StringWriter;
 import java.io.Writer;
 import java.util.ArrayList;
-import java.util.Arrays;
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import org.eclipse.ui.internal.WorkbenchMessages;
 import org.eclipse.ui.internal.WorkbenchPlugin;
@@ -52,8 +50,6 @@ public final class XMLMemento implements IMemento {
 
 	private Element element;
 
-	private static String FILE_STRING = "file"; //$NON-NLS-1$
-
 	/**
 	 * Creates a <code>Document</code> from the <code>Reader</code> and returns a
 	 * memento on the first <code>Element</code> for reading the document.
@@ -69,28 +65,6 @@ public final class XMLMemento implements IMemento {
 		return createReadRoot(reader, null);
 	}
 
-	/**
-	 * Clients who need to use the "file" protocol can override this method to
-	 * return the original attribute value
-	 *
-	 * @param attributeOldValue
-	 * @return return the new attribute value after concatenating the "file"
-	 *         protocol restriction if does not exist already
-	 */
-	private static String getAttributeNewValue(Object attributeOldValue) {
-		StringBuilder strNewValue = new StringBuilder(FILE_STRING);
-		if (attributeOldValue instanceof String && ((String) attributeOldValue).length() != 0) {
-			String strOldValue = (String) attributeOldValue;
-			boolean exists = Arrays.asList(strOldValue.split(",")).stream().anyMatch(x -> x.trim().equals(FILE_STRING)); //$NON-NLS-1$
-			if (!exists) {
-				strNewValue.append(", ").append(strOldValue); //$NON-NLS-1$
-			} else {
-				strNewValue = new StringBuilder(strOldValue);
-			}
-		}
-		return strNewValue.toString();
-	}
-
 	/**
 	 * Creates a <code>Document</code> from the <code>Reader</code> and returns a
 	 * memento on the first <code>Element</code> for reading the document.
@@ -107,22 +81,10 @@ public final class XMLMemento implements IMemento {
 	public static XMLMemento createReadRoot(Reader reader, String baseDir) throws WorkbenchException {
 		String errorMessage = null;
 		Exception exception = null;
-		DocumentBuilderFactory factory = null;
-		Object attributeDTDOldValue = null;
-		Object attributeSchemaOldValue = null;
 		try {
-			factory = DocumentBuilderFactory.newInstance();
-			try {
-				attributeDTDOldValue = factory.getAttribute(javax.xml.XMLConstants.ACCESS_EXTERNAL_DTD);
-				attributeSchemaOldValue = factory.getAttribute(javax.xml.XMLConstants.ACCESS_EXTERNAL_SCHEMA);
-			} catch (NullPointerException | IllegalArgumentException e) {
-				// Attributes not defined
-			}
-			factory.setAttribute(javax.xml.XMLConstants.ACCESS_EXTERNAL_DTD,
-					getAttributeNewValue(attributeDTDOldValue));
-			factory.setAttribute(javax.xml.XMLConstants.ACCESS_EXTERNAL_SCHEMA,
-					getAttributeNewValue(attributeSchemaOldValue));
-			DocumentBuilder parser = factory.newDocumentBuilder();
+			@SuppressWarnings("restriction")
+			DocumentBuilder parser = org.eclipse.core.internal.runtime.XmlProcessorFactory
+					.createDocumentBuilderWithErrorOnDOCTYPE();
 			InputSource source = new InputSource(reader);
 			if (baseDir != null) {
 				source.setSystemId(baseDir);
@@ -162,11 +124,6 @@ public final class XMLMemento implements IMemento {
 		} catch (SAXException e) {
 			exception = e;
 			errorMessage = WorkbenchMessages.XMLMemento_formatError;
-		} finally {
-			if (factory != null) {
-				factory.setAttribute(javax.xml.XMLConstants.ACCESS_EXTERNAL_DTD, attributeDTDOldValue);
-				factory.setAttribute(javax.xml.XMLConstants.ACCESS_EXTERNAL_SCHEMA, attributeSchemaOldValue);
-			}
 		}
 
 		String problemText = null;
@@ -188,14 +145,13 @@ public final class XMLMemento implements IMemento {
 	 *                      type
 	 */
 	public static XMLMemento createWriteRoot(String type) throws DOMException {
-		Document document;
 		try {
-			document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+			@SuppressWarnings("restriction")
+			Document document = org.eclipse.core.internal.runtime.XmlProcessorFactory.newDocumentWithErrorOnDOCTYPE();
 			Element element = document.createElement(type);
 			document.appendChild(element);
 			return new XMLMemento(document, element);
 		} catch (ParserConfigurationException e) {
-//            throw new Error(e);
 			throw new Error(e.getMessage());
 		}
 	}

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -93,7 +93,7 @@ Export-Package: org.eclipse.e4.ui.workbench.addons.perspectiveswitcher;x-interna
  org.eclipse.ui.themes,
  org.eclipse.ui.views,
  org.eclipse.ui.wizards
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.help;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.jface;bundle-version="[3.18.0,4.0.0)",
  org.eclipse.jface.databinding;bundle-version="[1.3.0,2.0.0)",

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -8,7 +8,7 @@ Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %Plugin.providerName
 Bundle-Localization: plugin
 Export-Package: org.eclipse.ui.internal;x-internal:=true
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.swt;bundle-version="[3.103.0,4.0.0)";visibility:=reexport,
  org.eclipse.jface;bundle-version="[3.19.0,4.0.0)";visibility:=reexport,
  org.eclipse.ui.workbench;bundle-version="[3.128.0,4.0.0)";visibility:=reexport,

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -7,7 +7,7 @@ Automatic-Module-Name: org.eclipse.urischeme
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.8.0,4.0.0)",
  org.eclipse.equinox.registry;bundle-version="[3.8.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  com.sun.jna;bundle-version="[5.8.0,6.0.0)",
  com.sun.jna.platform;bundle-version="[5.8.0,6.0.0)"
 Export-Package: org.eclipse.urischeme;x-friends:="org.eclipse.e4.ui.workbench.swt,org.eclipse.ui.examples.uriSchemeHandler,org.eclipse.ui.browser,org.eclipse.ui.ide.application"

programming_language: CoffeeScript
filename: PlistFileWriter.java
change_type: ModificationType.MODIFY
diff: @@ -14,13 +14,10 @@
 package org.eclipse.urischeme.internal.registration;
 
 import java.io.BufferedWriter;
-import java.io.Closeable;
 import java.io.IOException;
 import java.io.Reader;
 import java.io.Writer;
 
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.TransformerException;
 import javax.xml.transform.TransformerFactory;
@@ -204,33 +201,24 @@ public class PlistFileWriter {
 	}
 
 	private void transformDocument(Writer writer) {
-		try {
+		try (writer) {
 			DOMSource source = new DOMSource(this.document);
-			TransformerFactory.newInstance().newTransformer().transform(source, new StreamResult(writer));
-		} catch (TransformerException e) {
+			@SuppressWarnings("restriction")
+			TransformerFactory f = org.eclipse.core.internal.runtime.XmlProcessorFactory
+			.createTransformerFactoryWithErrorOnDOCTYPE();
+			f.newTransformer().transform(source, new StreamResult(writer));
+		} catch (TransformerException | IOException e) {
 			throw new IllegalStateException(e);
-		} finally {
-			close(writer);
 		}
 	}
 
+	@SuppressWarnings("restriction")
 	private Document getDom(Reader reader) {
-		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-		try {
-			DocumentBuilder builder = factory.newDocumentBuilder();
-			return builder.parse(new InputSource(reader));
+		try (reader) {
+			return org.eclipse.core.internal.runtime.XmlProcessorFactory
+					.parseWithErrorOnDOCTYPE(new InputSource(reader));
 		} catch (ParserConfigurationException | IOException | SAXException e) {
 			throw new IllegalArgumentException(e);
-		} finally {
-			close(reader);
-		}
-	}
-
-	private void close(Closeable closeable) {
-		try {
-			closeable.close();
-		} catch (IOException e) {
-			throw new IllegalStateException(e);
 		}
 	}
 

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -11,7 +11,7 @@ Import-Package: javax.inject;version="[1.0.0,2.0.0)",
  org.osgi.framework;version="[1.5.0,2.0.0)"
 Require-Bundle: org.eclipse.equinox.app,
  org.eclipse.equinox.common;bundle-version="3.4.0",
- org.eclipse.core.runtime;bundle-version="3.4.0",
+ org.eclipse.core.runtime;bundle-version="3.29.0",
  org.eclipse.e4.core.contexts,
  org.eclipse.e4.core.services,
  org.eclipse.e4.core.di

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.ui.examples.navigator;singleton:=true
 Bundle-Version: 3.4.0.qualifier
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.core.resources,
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.ui.navigator,
  org.eclipse.ui.views,
  org.eclipse.ui,

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -8,7 +8,7 @@ Bundle-Vendor: %Plugin.providerName
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.resources,
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.ui.views,
  org.eclipse.ui.ide,
  org.eclipse.jface.text,

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -10,7 +10,7 @@ Require-Bundle: org.eclipse.ui.genericeditor;bundle-version="1.0.0",
  org.eclipse.jface.text;bundle-version="3.11.0",
  org.eclipse.core.resources;bundle-version="3.11.0",
  org.eclipse.ui;bundle-version="3.108.0",
- org.eclipse.core.runtime;bundle-version="3.11.0",
+ org.eclipse.core.runtime;bundle-version="3.29.0",
  org.eclipse.ui.workbench.texteditor;bundle-version="3.10.100",
  org.eclipse.e4.core.commands;bundle-version="0.12.100",
  org.eclipse.ui.ide

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -9,7 +9,7 @@ Bundle-Vendor: %Plugin.providerName
 Bundle-Localization: plugin
 Export-Package: org.eclipse.core.filebuffers.tests;x-internal:=true
 Require-Bundle: 
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.core.filesystem;bundle-version="[1.2.0,2.0.0)",
  org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)";resolution:=optional,
  org.eclipse.core.filebuffers;bundle-version="[3.5.0,4.0.0)",

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -8,7 +8,7 @@ Bundle-Localization: plugin
 Require-Bundle: org.eclipse.emf.ecore.xmi;bundle-version="2.4.0",
  org.eclipse.jface;bundle-version="3.4.0",
  org.eclipse.e4.ui.services;bundle-version="0.9.0",
- org.eclipse.core.runtime;bundle-version="3.4.0",
+ org.eclipse.core.runtime;bundle-version="3.29.0",
  org.eclipse.core.databinding;bundle-version="1.2.0",
  org.eclipse.jface.databinding;bundle-version="1.3.0",
  org.eclipse.e4.core.services;bundle-version="0.9.0",

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -11,4 +11,4 @@ Require-Bundle: org.junit,
  org.eclipse.swt,
  org.eclipse.jface,
  org.eclipse.ui.forms,
- org.eclipse.core.runtime;bundle-version="3.24.0"
+ org.eclipse.core.runtime;bundle-version="3.29.0"

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -20,7 +20,7 @@ Require-Bundle:
  org.eclipse.jface;bundle-version="[3.5.0,4.0.0)",
  org.junit;bundle-version="4.12.0",
  org.eclipse.text.tests;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.ui.workbench.texteditor,
  org.eclipse.test.performance;bundle-version="3.13.0"
 Bundle-RequiredExecutionEnvironment: JavaSE-17

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -13,7 +13,7 @@ Require-Bundle:
  org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.search;bundle-version="[3.5.100,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.27.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)",
  org.junit;bundle-version="4.12.0",
  org.eclipse.ui.workbench.texteditor;bundle-version="[3.5.0,4.0.0)",

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -11,7 +11,7 @@ Export-Package:
  org.eclipse.text.tests.templates
 Require-Bundle: 
  org.eclipse.core.commands;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.text;bundle-version="[3.6.3,4.0.0)",
  org.junit;bundle-version="4.12.0"
 Bundle-RequiredExecutionEnvironment: JavaSE-17

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -7,7 +7,7 @@ Bundle-Vendor: %Plugin.providerName
 Bundle-Localization: plugin
 Export-Package: org.eclipse.ui.editors.tests
 Require-Bundle: 
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.junit;bundle-version="4.12.0",
  org.eclipse.jface;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.text;bundle-version="[3.5.0,4.0.0)",

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -7,7 +7,7 @@ Bundle-Vendor: %Plugin.providerName
 Bundle-Localization: plugin
 Export-Package: org.eclipse.ui.genericeditor.tests,
  org.eclipse.ui.genericeditor.tests.contributions
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.junit;bundle-version="4.12.0",
  org.eclipse.jface;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.text;bundle-version="[3.5.0,4.0.0)",

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.ui.tests.navigator;singleton:=true
 Bundle-Version: 3.7.200.qualifier
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.core.resources,
- org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.ui.navigator;bundle-version="3.8.0",
  org.eclipse.ui,
  org.eclipse.ui.ide,

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -6,7 +6,7 @@ Bundle-Version: 1.2.100.qualifier
 Automatic-Module-Name: org.eclipse.ui.tests.pluginchecks
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Require-Bundle: org.junit;bundle-version="4.12.0",
- org.eclipse.core.runtime;bundle-version="3.14.100",
+ org.eclipse.core.runtime;bundle-version="3.29.0",
  org.eclipse.e4.ui.css.swt;bundle-version="0.13.200",
  org.eclipse.e4.ui.model.workbench;bundle-version="2.1.100",
  org.eclipse.e4.ui.workbench.swt;bundle-version="0.14.300",

programming_language: CoffeeScript
filename: PluginWalkerTest.java
change_type: ModificationType.MODIFY
diff: @@ -31,6 +31,7 @@ import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
+import org.eclipse.core.internal.runtime.XmlProcessorFactory;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtension;
 import org.eclipse.core.runtime.IExtensionPoint;
@@ -60,6 +61,7 @@ import org.xml.sax.SAXException;
  * be accessed
  *
  */
+@SuppressWarnings("restriction")
 public class PluginWalkerTest {
 
 	private BundleContext bundleContext;
@@ -187,7 +189,7 @@ public class PluginWalkerTest {
 	}
 
 	private static DocumentBuilder createDocumentBuilder() throws ParserConfigurationException {
-		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+		DocumentBuilderFactory factory = XmlProcessorFactory.createDocumentBuilderFactoryWithErrorOnDOCTYPE();
 		factory.setNamespaceAware(true);
 		return factory.newDocumentBuilder();
 	}

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -11,7 +11,7 @@ Export-Package:
  org.eclipse.ui.workbench.texteditor.tests.revisions,
  org.eclipse.ui.workbench.texteditor.tests.rulers
 Require-Bundle: 
- org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.jface.text;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.ui.workbench.texteditor;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.e4.tools.compat;singleton:=true
 Bundle-Version: 4.9.100.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
- org.eclipse.core.runtime;bundle-version="3.6.0",
+ org.eclipse.core.runtime;bundle-version="3.29.0",
  org.eclipse.e4.core.contexts;bundle-version="0.9.0",
  org.eclipse.e4.core.services;bundle-version="0.9.1",
  org.eclipse.e4.ui.services;bundle-version="0.9.1",

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -7,7 +7,7 @@ Bundle-Version: 1.1.100.qualifier
 Automatic-Module-Name: org.eclipse.e4.tools.compatibiliy.migration
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Require-Bundle: org.eclipse.e4.tools.persistence;bundle-version="1.0.0",
- org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.e4.ui.workbench;bundle-version="[1.10.0,2.0.0)",
  org.eclipse.ui;bundle-version="[3.110.0,4.0.0)",
  org.eclipse.e4.core.contexts

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.e4.tools.emf.editor3x;singleton:=true
 Bundle-Version: 4.9.100.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
- org.eclipse.core.runtime;bundle-version="3.6.0",
+ org.eclipse.core.runtime;bundle-version="3.29.0",
  org.eclipse.emf.common;bundle-version="2.6.0",
  org.eclipse.core.databinding.observable;bundle-version="1.3.0",
  org.eclipse.e4.tools.emf.ui;bundle-version="0.9.0",

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -6,7 +6,7 @@ Bundle-Version: 4.8.100.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-17
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.27.0",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.29.0",
  org.eclipse.core.databinding.property;bundle-version="1.2.100",
  org.eclipse.e4.ui.model.workbench;bundle-version="0.9.1",
  org.eclipse.jface.databinding;bundle-version="1.4.0",

programming_language: CoffeeScript
filename: DocUtil.java
change_type: ModificationType.MODIFY
diff: @@ -14,8 +14,8 @@
 
 package org.eclipse.e4.tools.emf.ui.internal.common.component.tabs;
 
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
+
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -25,6 +25,7 @@ import org.w3c.dom.Element;
  * @author Steven Spungin
  *
  */
+@SuppressWarnings("restriction")
 public class DocUtil {
 
 	public static Element createChild(Element parent, String name) {
@@ -34,7 +35,7 @@ public class DocUtil {
 	}
 
 	public static Document createDocument(String name) throws ParserConfigurationException {
-		Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+		Document doc = org.eclipse.core.internal.runtime.XmlProcessorFactory.newDocumentWithErrorOnDOCTYPE();
 		doc.appendChild(doc.createElement(name));
 		return doc;
 	}

programming_language: Java
filename: ListTab.java
change_type: ModificationType.MODIFY
diff: @@ -29,7 +29,6 @@ import java.util.concurrent.ConcurrentHashMap;
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 import javax.inject.Inject;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
@@ -250,8 +249,9 @@ public class ListTab implements IViewEObjects {
 		final String xml = pref.get("list-tab-xml", ""); //$NON-NLS-1$ //$NON-NLS-2$
 		if (E.notEmpty(xml)) {
 			try {
-				final Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder()
-						.parse(new InputSource(new StringReader(xml)));
+				@SuppressWarnings("restriction")
+				final Document doc = org.eclipse.core.internal.runtime.XmlProcessorFactory
+						.parseWithErrorOnDOCTYPE(new InputSource(new StringReader(xml)));
 				final XPath xpath = XPathFactory.newInstance().newXPath();
 				NodeList list;
 				if (restoreColumns) {
@@ -323,7 +323,9 @@ public class ListTab implements IViewEObjects {
 
 	// @Refactor
 	static private String docToString(Document doc) throws TransformerException {
-		final TransformerFactory tf = TransformerFactory.newInstance();
+		@SuppressWarnings("restriction")
+		final TransformerFactory tf = org.eclipse.core.internal.runtime.XmlProcessorFactory
+				.createTransformerFactoryWithErrorOnDOCTYPE();
 		final Transformer transformer = tf.newTransformer();
 		transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); //$NON-NLS-1$
 		final StringWriter writer = new StringWriter();

programming_language: Java
filename: TargetPlatformContributionCollector.java
change_type: ModificationType.MODIFY
diff: @@ -36,11 +36,11 @@ import java.util.regex.Pattern;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.xpath.XPath;
 import javax.xml.xpath.XPathConstants;
 import javax.xml.xpath.XPathFactory;
 
+import org.eclipse.core.internal.runtime.XmlProcessorFactory;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IWorkspace;
 import org.eclipse.core.runtime.IPath;
@@ -85,6 +85,7 @@ import org.w3c.dom.NodeList;
  * @author Steven Spungin
  *
  */
+@SuppressWarnings("restriction")
 public abstract class TargetPlatformContributionCollector extends ClassContributionCollector {
 
 	CopyOnWriteArrayList<Entry> cacheEntry = new CopyOnWriteArrayList<>();
@@ -588,8 +589,8 @@ public abstract class TargetPlatformContributionCollector extends ClassContribut
 			ret = new ArrayList<>();
 			outputDirectories.put(installLocation, ret);
 			try {
-				final Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder()
-						.parse(new File(installLocation + File.separator + ".classpath")); //$NON-NLS-1$
+				File file = new File(installLocation + File.separator + ".classpath"); //$NON-NLS-1$
+				final Document doc = XmlProcessorFactory.parseWithErrorOnDOCTYPE(file);
 				final XPath xp = XPathFactory.newInstance().newXPath();
 				final NodeList list = (NodeList) xp.evaluate(
 						"//classpathentry[@kind='output']/@path", doc, XPathConstants.NODESET); //$NON-NLS-1$

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -9,7 +9,7 @@ Require-Bundle: org.eclipse.jdt.ui;bundle-version="3.20.0",
  org.eclipse.ui.editors;bundle-version="3.6.0",
  org.eclipse.jface.text;bundle-version="3.6.0",
  org.eclipse.jdt.core;bundle-version="3.6.0",
- org.eclipse.core.runtime;bundle-version="3.6.0"
+ org.eclipse.core.runtime;bundle-version="3.29.0"
 Export-Package: org.eclipse.e4.internal.tools.jdt.templates;version="0.12.0.qualifier";x-internal:=true
 Bundle-Vendor: %providerName
 Automatic-Module-Name: org.eclipse.e4.tools.jdt.templates

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -7,7 +7,7 @@ Automatic-Module-Name: org.eclipse.e4.tools.persistence
 Bundle-Version: 1.1.100.qualifier
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %Bundle-Vendor
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.emf.ecore;bundle-version="[2.10.0,3.0.0)";visibility:=reexport,
  org.eclipse.e4.ui.model.workbench;bundle-version="[2.1.0,3.0.0)";visibility:=reexport,
  org.eclipse.e4.core.contexts;bundle-version="[1.8.0,2.0.0)",

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.e4.tools;singleton:=true
 Bundle-Version: 4.10.100.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
- org.eclipse.core.runtime;bundle-version="3.27.0",
+ org.eclipse.core.runtime;bundle-version="3.29.0",
  org.eclipse.e4.ui.model.workbench;bundle-version="0.9.1",
  org.eclipse.core.resources;bundle-version="3.6.0",
  org.eclipse.jdt.core;bundle-version="3.6.0",

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -11,7 +11,7 @@ Require-Bundle: org.eclipse.swt;bundle-version="[3.110.0,4.0.0)",
  org.eclipse.e4.tools.compatibility.migration;bundle-version="[1.0.0,2.0.0)",
  org.eclipse.e4.ui.model.workbench;bundle-version="[2.1.0,3.0.0)",
  org.junit;bundle-version="[4.12.0,5.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.ui.tests.harness;bundle-version="[1.8.100,2.0.0)"
 Bundle-ActivationPolicy: lazy
 Import-Package: org.junit.jupiter.api;version="[5.8.1,6.0.0)"

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -6,7 +6,7 @@ Bundle-Vendor: Eclipse.org
 Bundle-Version: 1.1.0.qualifier
 Automatic-Module-Name: org.eclipse.e4.tools.persistence.tests
 Bundle-RequiredExecutionEnvironment: JavaSE-17
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.24.0",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.29.0",
  org.eclipse.ui;bundle-version="3.201.0",
  org.junit;bundle-version="4.13.2",
  org.eclipse.swt,

programming_language: CoffeeScript
repo_url: https://github.com/eclipse-jdt/eclipse.jdt.ui
commit_details: repo_url: https://github.com/eclipse-jdt/eclipse.jdt.ui
author: Jörg Kubitz
author_date: 2023-07-20 07:42:53+02:00
msg: Merge pull request from GHSA-q6xr-9x9x-g7w2

Co-authored-by: Jörg Kubitz <jkubitz-eclipse@gmx.de>
repository: repo_url: https://github.com/eclipse-jdt/eclipse.jdt.ui
repo_name: eclipse-jdt/eclipse.jdt.ui
repo_language: Java
owner: eclipse-jdt
file_changes: filename: JUnitModel.java
change_type: ModificationType.MODIFY
diff: @@ -33,7 +33,6 @@ import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.TransformerFactoryConfigurationError;
 import javax.xml.transform.sax.SAXSource;
 import javax.xml.transform.stream.StreamResult;
@@ -66,6 +65,7 @@ import org.eclipse.jdt.internal.junit.JUnitPreferencesConstants;
 import org.eclipse.jdt.internal.junit.Messages;
 import org.eclipse.jdt.internal.junit.launcher.JUnitLaunchConfigurationConstants;
 import org.eclipse.jdt.internal.junit.model.TestElement.Status;
+import org.eclipse.jdt.internal.junit.util.XmlProcessorFactoryJdtJunit;
 
 /**
  * Central registry for JUnit test runs.
@@ -385,7 +385,7 @@ public final class JUnitModel {
 	 */
 	public static TestRunSession importTestRunSession(File file) throws CoreException {
 		try {
-			SAXParserFactory parserFactory= SAXParserFactory.newInstance();
+			SAXParserFactory parserFactory= XmlProcessorFactoryJdtJunit.createSAXFactoryWithErrorOnDOCTYPE();
 //			parserFactory.setValidating(true); // TODO: add DTD and debug flag
 			SAXParser parser= parserFactory.newSAXParser();
 			TestRunHandler handler= new TestRunHandler();
@@ -426,7 +426,7 @@ public final class JUnitModel {
 			@Override
 			public void run() {
 				try {
-					SAXParserFactory parserFactory= SAXParserFactory.newInstance();
+					SAXParserFactory parserFactory= XmlProcessorFactoryJdtJunit.createSAXFactoryWithErrorOnDOCTYPE();
 //					parserFactory.setValidating(true); // TODO: add DTD and debug flag
 					SAXParser parser= parserFactory.newSAXParser();
 					parser.parse(trimmedUrl, handler);
@@ -472,7 +472,7 @@ public final class JUnitModel {
 
 	public static void importIntoTestRunSession(File swapFile, TestRunSession testRunSession) throws CoreException {
 		try {
-			SAXParserFactory parserFactory= SAXParserFactory.newInstance();
+			SAXParserFactory parserFactory= XmlProcessorFactoryJdtJunit.createSAXFactoryWithErrorOnDOCTYPE();
 //			parserFactory.setValidating(true); // TODO: add DTD and debug flag
 			SAXParser parser= parserFactory.newSAXParser();
 			TestRunHandler handler= new TestRunHandler(testRunSession);
@@ -507,7 +507,7 @@ public final class JUnitModel {
 	public static void exportTestRunSession(TestRunSession testRunSession, OutputStream out)
 			throws TransformerFactoryConfigurationError, TransformerException {
 
-		Transformer transformer= TransformerFactory.newInstance().newTransformer();
+		Transformer transformer= XmlProcessorFactoryJdtJunit.createTransformerFactoryWithErrorOnDOCTYPE().newTransformer();
 		InputSource inputSource= new InputSource();
 		SAXSource source= new SAXSource(new TestRunSessionSerializer(testRunSession), inputSource);
 		StreamResult result= new StreamResult(out);

programming_language: Java
filename: XmlProcessorFactoryJdtJunit.java
change_type: ModificationType.ADD
diff: @@ -0,0 +1,166 @@
+/*******************************************************************************
+ *  Copyright (c) 2023 Joerg Kubitz and others.
+ *
+ *  This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License 2.0
+ *  which accompanies this distribution, and is available at
+ *  https://www.eclipse.org/legal/epl-2.0/
+ *
+ *  SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit.util;
+
+import javax.xml.XMLConstants;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.TransformerFactory;
+
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.SAXNotSupportedException;
+
+/**
+ * XML processing which prohibits external entities.
+ *
+ * @see <a href="https://rules.sonarsource.com/java/RSPEC-2755/">RSPEC-2755</a>
+ */
+public class XmlProcessorFactoryJdtJunit {
+	private XmlProcessorFactoryJdtJunit() {
+		// static Utility only
+	}
+
+	private static final DocumentBuilderFactory DOCUMENT_BUILDER_FACTORY_ERROR_ON_DOCTYPE = createDocumentBuilderFactoryWithErrorOnDOCTYPE();
+	private static final SAXParserFactory SAX_FACTORY_ERROR_ON_DOCTYPE = createSAXFactoryWithErrorOnDOCTYPE(false);
+	private static final SAXParserFactory SAX_FACTORY_ERROR_ON_DOCTYPE_NS = createSAXFactoryWithErrorOnDOCTYPE(true);
+	private static final SAXParserFactory SAX_FACTORY_IGNORING_DOCTYPE = createSAXFactoryIgnoringDOCTYPE();
+
+	/**
+	 * Creates TransformerFactory which throws TransformerException when
+	 * detecting external entities.
+	 *
+	 * @return javax.xml.transform.TransformerFactory
+	 */
+	public static TransformerFactory createTransformerFactoryWithErrorOnDOCTYPE() {
+		TransformerFactory factory = TransformerFactory.newInstance();
+		// prohibit the use of all protocols by external entities:
+		factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); //$NON-NLS-1$
+		factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, ""); //$NON-NLS-1$
+		return factory;
+	}
+
+	/**
+	 * Creates DocumentBuilderFactory which throws SAXParseException when
+	 * detecting external entities. It's magnitudes faster to call
+	 * {@link #createDocumentBuilderWithErrorOnDOCTYPE()}.
+	 *
+	 * @return javax.xml.parsers.DocumentBuilderFactory
+	 */
+	public static synchronized DocumentBuilderFactory createDocumentBuilderFactoryWithErrorOnDOCTYPE() {
+		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+		// completely disable DOCTYPE declaration:
+		try {
+			factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); //$NON-NLS-1$
+		} catch (ParserConfigurationException e) {
+			throw new RuntimeException(e.getMessage(), e);
+		}
+		return factory;
+	}
+
+	/**
+	 * Creates DocumentBuilder which throws SAXParseException when detecting
+	 * external entities. The builder is not thread safe.
+	 *
+	 * @return javax.xml.parsers.DocumentBuilder
+	 * @throws ParserConfigurationException
+	 */
+	public static DocumentBuilder createDocumentBuilderWithErrorOnDOCTYPE() throws ParserConfigurationException {
+		return DOCUMENT_BUILDER_FACTORY_ERROR_ON_DOCTYPE.newDocumentBuilder();
+	}
+
+	/**
+	 * Creates DocumentBuilderFactory which throws SAXParseException when
+	 * detecting external entities.
+	 *
+	 * @return javax.xml.parsers.DocumentBuilderFactory
+	 */
+	public static SAXParserFactory createSAXFactoryWithErrorOnDOCTYPE() {
+		SAXParserFactory f = SAXParserFactory.newInstance();
+		try {
+			// force org.xml.sax.SAXParseException for any DOCTYPE:
+			f.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); //$NON-NLS-1$
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return f;
+	}
+
+	private static synchronized SAXParserFactory createSAXFactoryWithErrorOnDOCTYPE(boolean awareness) {
+		SAXParserFactory f = SAXParserFactory.newInstance();
+		f.setNamespaceAware(awareness);
+		try {
+			// force org.xml.sax.SAXParseException for any DOCTYPE:
+			f.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); //$NON-NLS-1$
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return f;
+	}
+
+	private static synchronized SAXParserFactory createSAXFactoryIgnoringDOCTYPE() {
+		SAXParserFactory f = SAXParserFactory.newInstance();
+		try {
+			// ignore DOCTYPE:
+			f.setFeature("http://xml.org/sax/features/external-general-entities", false); //$NON-NLS-1$
+			f.setFeature("http://xml.org/sax/features/external-parameter-entities", false); //$NON-NLS-1$
+			f.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); //$NON-NLS-1$
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return f;
+	}
+
+	/**
+	 * Creates SAXParser which throws SAXParseException when detecting external
+	 * entities.
+	 *
+	 * @return javax.xml.parsers.SAXParser
+	 */
+
+	public static SAXParser createSAXParserWithErrorOnDOCTYPE() throws ParserConfigurationException, SAXException {
+		return createSAXParserWithErrorOnDOCTYPE(false);
+	}
+
+	/**
+	 * Creates SAXParser which throws SAXParseException when detecting external
+	 * entities.
+	 *
+	 * @param namespaceAware
+	 *            parameter for SAXParserFactory
+	 *
+	 * @return javax.xml.parsers.SAXParser
+	 */
+	public static SAXParser createSAXParserWithErrorOnDOCTYPE(boolean namespaceAware)
+			throws ParserConfigurationException, SAXException {
+		if (namespaceAware) {
+			return SAX_FACTORY_ERROR_ON_DOCTYPE_NS.newSAXParser();
+		}
+		return SAX_FACTORY_ERROR_ON_DOCTYPE.newSAXParser();
+	}
+
+	/**
+	 * Creates SAXParser which does not throw Exception when detecting external
+	 * entities but ignores them.
+	 *
+	 * @return javax.xml.parsers.SAXParser
+	 */
+	public static SAXParser createSAXParserIgnoringDOCTYPE()
+			throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException, SAXException {
+		SAXParser parser = SAX_FACTORY_IGNORING_DOCTYPE.newSAXParser();
+		parser.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, ""); //$NON-NLS-1$
+		parser.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, ""); //$NON-NLS-1$
+		return parser;
+	}
+}
\ No newline at end of file

programming_language: Java
filename: FatJarExportTests.java
change_type: ModificationType.MODIFY
diff: @@ -34,7 +34,6 @@ import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 
 import org.junit.After;
 import org.junit.Before;
@@ -81,6 +80,7 @@ import org.eclipse.jdt.core.IPackageFragmentRoot;
 import org.eclipse.jdt.core.JavaCore;
 
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
+import org.eclipse.jdt.internal.junit.util.XmlProcessorFactoryJdtJunit;
 
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
 import org.eclipse.jdt.launching.IVMInstall;
@@ -673,7 +673,7 @@ public class FatJarExportTests {
 	 */
 	private static Element readXML(IPath xmlFilePath) throws Exception {
 		try (InputStream in = new FileInputStream(xmlFilePath.toFile())) {
-			DocumentBuilder parser= DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder parser= XmlProcessorFactoryJdtJunit.createDocumentBuilderFactoryWithErrorOnDOCTYPE().newDocumentBuilder();
 			parser.setErrorHandler(new DefaultHandler());
 			Element root= parser.parse(new InputSource(in)).getDocumentElement();
 			in.close();

programming_language: Java
filename: TemplateSet.java
change_type: ModificationType.MODIFY
diff: @@ -28,7 +28,6 @@ import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
@@ -52,6 +51,8 @@ import org.eclipse.jface.text.templates.Template;
 import org.eclipse.jface.text.templates.TemplateContextType;
 import org.eclipse.jface.text.templates.TemplateException;
 
+import org.eclipse.jdt.internal.ui.util.XmlProcessorFactoryJdtUi;
+
 /**
  * <code>TemplateSet</code> manages a collection of templates and makes them
  * persistent.
@@ -108,7 +109,7 @@ public class TemplateSet {
 	 */
 	public void addFromStream(InputStream stream, boolean allowDuplicates) throws CoreException {
 		try {
-			DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
+			DocumentBuilderFactory factory= XmlProcessorFactoryJdtUi.createDocumentBuilderFactoryWithErrorOnDOCTYPE();
 			DocumentBuilder parser= factory.newDocumentBuilder();
 			parser.setErrorHandler(new DefaultHandler());
 			Document document= parser.parse(new InputSource(stream));
@@ -205,7 +206,7 @@ public class TemplateSet {
 	 */
 	public void saveToStream(OutputStream stream) throws CoreException {
 		try {
-			DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
+			DocumentBuilderFactory factory= XmlProcessorFactoryJdtUi.createDocumentBuilderFactoryWithErrorOnDOCTYPE();
 			DocumentBuilder builder= factory.newDocumentBuilder();
 			Document document= builder.newDocument();
 
@@ -235,7 +236,7 @@ public class TemplateSet {
 			}
 
 
-			Transformer transformer=TransformerFactory.newInstance().newTransformer();
+			Transformer transformer= XmlProcessorFactoryJdtUi.createTransformerFactoryWithErrorOnDOCTYPE().newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
 			DOMSource source = new DOMSource(document);

programming_language: Java
filename: History.java
change_type: ModificationType.MODIFY
diff: @@ -32,7 +32,6 @@ import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.TransformerFactoryConfigurationError;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
@@ -56,6 +55,7 @@ import org.eclipse.jdt.internal.corext.CorextMessages;
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.JavaUIException;
 import org.eclipse.jdt.internal.ui.JavaUIStatus;
+import org.eclipse.jdt.internal.ui.util.XmlProcessorFactoryJdtUi;
 
 /**
  * History stores a list of key, object pairs. The list is bounded at size
@@ -232,7 +232,7 @@ public abstract class History<K, V> {
 	private void load(InputSource inputSource) throws CoreException {
 		Element root;
 		try {
-			DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder parser = XmlProcessorFactoryJdtUi.createDocumentBuilderFactoryWithErrorOnDOCTYPE().newDocumentBuilder();
 			parser.setErrorHandler(new DefaultHandler());
 			root = parser.parse(inputSource).getDocumentElement();
 		} catch (SAXException | ParserConfigurationException | IOException e) {
@@ -262,7 +262,7 @@ public abstract class History<K, V> {
 
 	private void save(OutputStream stream) throws CoreException {
 		try {
-			DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
+			DocumentBuilderFactory factory= XmlProcessorFactoryJdtUi.createDocumentBuilderFactoryWithErrorOnDOCTYPE();
 			DocumentBuilder builder= factory.newDocumentBuilder();
 			Document document= builder.newDocument();
 
@@ -277,7 +277,7 @@ public abstract class History<K, V> {
 				rootElement.appendChild(element);
 			}
 
-			Transformer transformer=TransformerFactory.newInstance().newTransformer();
+			Transformer transformer= XmlProcessorFactoryJdtUi.createTransformerFactoryWithErrorOnDOCTYPE().newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$

programming_language: Java
filename: JarPackageReader.java
change_type: ModificationType.MODIFY
diff: @@ -69,6 +69,7 @@ import org.eclipse.jdt.ui.jarpackager.JarPackageData;
 
 import org.eclipse.jdt.internal.ui.IJavaStatusConstants;
 import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.util.XmlProcessorFactoryJdtUi;
 
 /**
  * Reads data from an InputStream and returns a JarPackage
@@ -120,7 +121,7 @@ public class JarPackageReader extends Object implements IJarDescriptionReader {
 	}
 
 	public JarPackageData readXML(JarPackageData jarPackage) throws IOException, SAXException {
-	  	DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
+	  	DocumentBuilderFactory factory= XmlProcessorFactoryJdtUi.createDocumentBuilderFactoryWithErrorOnDOCTYPE();
     	factory.setValidating(false);
 		DocumentBuilder parser= null;
 

programming_language: Java
filename: JarPackageWriter.java
change_type: ModificationType.MODIFY
diff: @@ -27,7 +27,6 @@ import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
@@ -56,6 +55,7 @@ import org.eclipse.jdt.ui.jarpackager.JarPackageData;
 
 import org.eclipse.jdt.internal.ui.IJavaStatusConstants;
 import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.util.XmlProcessorFactoryJdtUi;
 
 /**
  * Writes a JarPackage to an underlying OutputStream
@@ -97,7 +97,7 @@ public class JarPackageWriter extends Object implements IJarDescriptionWriter {
 	public void writeXML(JarPackageData jarPackage) throws IOException {
 		Assert.isNotNull(jarPackage);
 		DocumentBuilder docBuilder= null;
-		DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
+		DocumentBuilderFactory factory= XmlProcessorFactoryJdtUi.createDocumentBuilderFactoryWithErrorOnDOCTYPE();
 		factory.setValidating(false);
 		try {
 	    	docBuilder= factory.newDocumentBuilder();
@@ -119,7 +119,7 @@ public class JarPackageWriter extends Object implements IJarDescriptionWriter {
 
 		try {
 			// Write the document to the stream
-			Transformer transformer=TransformerFactory.newInstance().newTransformer();
+			Transformer transformer= XmlProcessorFactoryJdtUi.createTransformerFactoryWithErrorOnDOCTYPE().newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.ENCODING, fEncoding);
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$

programming_language: Java
filename: FatJarRsrcUrlAntExporter.java
change_type: ModificationType.MODIFY
diff: @@ -31,7 +31,6 @@ import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
@@ -44,6 +43,7 @@ import org.eclipse.core.runtime.IPath;
 import org.eclipse.debug.core.ILaunchConfiguration;
 
 import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.util.XmlProcessorFactoryJdtUi;
 
 /**
  * Create an ANT script for a runnable JAR with class loader export. The script is generated based
@@ -82,7 +82,7 @@ public class FatJarRsrcUrlAntExporter extends FatJarAntExporter {
 		String absJarname= absJarfile.toString();
 
 		DocumentBuilder docBuilder= null;
-		DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
+		DocumentBuilderFactory factory= XmlProcessorFactoryJdtUi.createDocumentBuilderFactoryWithErrorOnDOCTYPE();
 		factory.setValidating(false);
 		try {
 			docBuilder= factory.newDocumentBuilder();
@@ -164,7 +164,7 @@ public class FatJarRsrcUrlAntExporter extends FatJarAntExporter {
 
 		try {
 			// Write the document to the stream
-			Transformer transformer= TransformerFactory.newInstance().newTransformer();
+			Transformer transformer= XmlProcessorFactoryJdtUi.createTransformerFactoryWithErrorOnDOCTYPE().newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$

programming_language: Java
filename: UnpackFatJarAntExporter.java
change_type: ModificationType.MODIFY
diff: @@ -27,7 +27,6 @@ import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
@@ -39,6 +38,8 @@ import org.eclipse.core.runtime.IPath;
 
 import org.eclipse.debug.core.ILaunchConfiguration;
 
+import org.eclipse.jdt.internal.ui.util.XmlProcessorFactoryJdtUi;
+
 /**
  * @since 3.5
  */
@@ -54,7 +55,7 @@ public class UnpackFatJarAntExporter extends FatJarAntExporter {
 			String absJarname= absJarfile.toString();
 
 			DocumentBuilder docBuilder= null;
-			DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
+			DocumentBuilderFactory factory= XmlProcessorFactoryJdtUi.createDocumentBuilderFactoryWithErrorOnDOCTYPE();
 			factory.setValidating(false);
 			try {
 				docBuilder= factory.newDocumentBuilder();
@@ -114,7 +115,7 @@ public class UnpackFatJarAntExporter extends FatJarAntExporter {
 
 			try {
 				// Write the document to the stream
-				Transformer transformer= TransformerFactory.newInstance().newTransformer();
+				Transformer transformer= XmlProcessorFactoryJdtUi.createTransformerFactoryWithErrorOnDOCTYPE().newTransformer();
 				transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 				transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
 				transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$

programming_language: Java
filename: UnpackJarAntExporter.java
change_type: ModificationType.MODIFY
diff: @@ -28,7 +28,6 @@ import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
@@ -40,6 +39,8 @@ import org.eclipse.core.runtime.IPath;
 
 import org.eclipse.debug.core.ILaunchConfiguration;
 
+import org.eclipse.jdt.internal.ui.util.XmlProcessorFactoryJdtUi;
+
 /**
  * Create an ANT script for a runnable JAR wit libraries in a sub-folder. The script is generated
  * based on the classpath of the selected launch-configuration.
@@ -60,7 +61,7 @@ public class UnpackJarAntExporter extends FatJarAntExporter {
 			String absSubfolder= absJarfile.removeLastSegments(1).append(subfolder).toString();
 
 			DocumentBuilder docBuilder= null;
-			DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
+			DocumentBuilderFactory factory= XmlProcessorFactoryJdtUi.createDocumentBuilderFactoryWithErrorOnDOCTYPE();
 			factory.setValidating(false);
 			try {
 				docBuilder= factory.newDocumentBuilder();
@@ -147,7 +148,7 @@ public class UnpackJarAntExporter extends FatJarAntExporter {
 
 			try {
 				// Write the document to the stream
-				Transformer transformer= TransformerFactory.newInstance().newTransformer();
+				Transformer transformer= XmlProcessorFactoryJdtUi.createTransformerFactoryWithErrorOnDOCTYPE().newTransformer();
 				transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 				transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
 				transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$

programming_language: Java
filename: JavadocReader.java
change_type: ModificationType.MODIFY
diff: @@ -31,6 +31,8 @@ import org.w3c.dom.NodeList;
 
 import org.eclipse.core.runtime.Assert;
 
+import org.eclipse.jdt.internal.ui.util.XmlProcessorFactoryJdtUi;
+
 
 /**
  * Reads data from an InputStream and returns a JarPackage
@@ -62,7 +64,7 @@ public class JavadocReader extends Object {
 
 	public Element readXML() throws IOException, SAXException {
 
-		DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
+		DocumentBuilderFactory factory= XmlProcessorFactoryJdtUi.createDocumentBuilderFactoryWithErrorOnDOCTYPE();
 		factory.setValidating(false);
 		DocumentBuilder parser= null;
 		try {

programming_language: Java
filename: JavadocWriter.java
change_type: ModificationType.MODIFY
diff: @@ -26,7 +26,6 @@ import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
@@ -45,6 +44,8 @@ import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IPackageFragment;
 
+import org.eclipse.jdt.internal.ui.util.XmlProcessorFactoryJdtUi;
+
 public class JavadocWriter {
 
 	private static final char PATH_SEPARATOR= '/'; // use forward slash for all platforms
@@ -64,7 +65,7 @@ public class JavadocWriter {
 	}
 
 	public Element createXML(JavadocOptionsManager store) throws ParserConfigurationException {
-		DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
+		DocumentBuilderFactory factory= XmlProcessorFactoryJdtUi.createDocumentBuilderFactoryWithErrorOnDOCTYPE();
 		factory.setValidating(false);
 		DocumentBuilder docBuilder= factory.newDocumentBuilder();
 		Document document= docBuilder.newDocument();
@@ -101,7 +102,7 @@ public class JavadocWriter {
 	public static void writeDocument(Element javadocElement, String encoding, OutputStream outputStream) throws TransformerException {
 
 		// Write the document to the stream
-		Transformer transformer=TransformerFactory.newInstance().newTransformer();
+		Transformer transformer= XmlProcessorFactoryJdtUi.createTransformerFactoryWithErrorOnDOCTYPE().newTransformer();
 		transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 		transformer.setOutputProperty(OutputKeys.ENCODING, encoding);
 		transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$

programming_language: Java
filename: UserLibraryPreferencePage.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,6 @@ import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
@@ -116,6 +115,7 @@ import org.eclipse.jdt.internal.ui.IUIConstants;
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
 import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
+import org.eclipse.jdt.internal.ui.util.XmlProcessorFactoryJdtUi;
 import org.eclipse.jdt.internal.ui.wizards.buildpaths.AccessRulesDialog;
 import org.eclipse.jdt.internal.ui.wizards.buildpaths.ArchiveFileFilter;
 import org.eclipse.jdt.internal.ui.wizards.buildpaths.BuildPathSupport;
@@ -559,7 +559,7 @@ public class UserLibraryPreferencePage extends PreferencePage implements IWorkbe
 		protected static void saveLibraries(List<CPUserLibraryElement> libraries, File file, String encoding, IProgressMonitor monitor) throws IOException {
 			OutputStream stream= new FileOutputStream(file);
 			try {
-				DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
+				DocumentBuilderFactory factory= XmlProcessorFactoryJdtUi.createDocumentBuilderFactoryWithErrorOnDOCTYPE();
 				factory.setValidating(false);
 				DocumentBuilder docBuilder= factory.newDocumentBuilder();
 				Document document= docBuilder.newDocument();
@@ -613,7 +613,7 @@ public class UserLibraryPreferencePage extends PreferencePage implements IWorkbe
 				}
 
 				// Write the document to the stream
-				Transformer transformer=TransformerFactory.newInstance().newTransformer();
+				Transformer transformer= XmlProcessorFactoryJdtUi.createTransformerFactoryWithErrorOnDOCTYPE().newTransformer();
 				transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 				transformer.setOutputProperty(OutputKeys.ENCODING, encoding);
 				transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
@@ -640,7 +640,7 @@ public class UserLibraryPreferencePage extends PreferencePage implements IWorkbe
 			InputStream stream= new FileInputStream(file);
 			Element cpElement;
 			try {
-				DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+				DocumentBuilder parser = XmlProcessorFactoryJdtUi.createDocumentBuilderFactoryWithErrorOnDOCTYPE().newDocumentBuilder();
 				parser.setErrorHandler(new DefaultHandler());
 				cpElement = parser.parse(new InputSource(stream)).getDocumentElement();
 			} catch (SAXException | ParserConfigurationException e) {

programming_language: Java
filename: ProfileStore.java
change_type: ModificationType.MODIFY
diff: @@ -38,7 +38,6 @@ import javax.xml.parsers.SAXParserFactory;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
@@ -62,6 +61,7 @@ import org.eclipse.jdt.internal.ui.JavaUIException;
 import org.eclipse.jdt.internal.ui.JavaUIStatus;
 import org.eclipse.jdt.internal.ui.preferences.formatter.ProfileManager.CustomProfile;
 import org.eclipse.jdt.internal.ui.preferences.formatter.ProfileManager.Profile;
+import org.eclipse.jdt.internal.ui.util.XmlProcessorFactoryJdtUi;
 
 
 /**
@@ -238,7 +238,7 @@ public class ProfileStore {
 
 		final ProfileDefaultHandler handler= new ProfileDefaultHandler();
 		try {
-		    final SAXParserFactory factory= SAXParserFactory.newInstance();
+		    final SAXParserFactory factory= XmlProcessorFactoryJdtUi.createSAXFactoryWithErrorOnDOCTYPE();
 			final SAXParser parser= factory.newSAXParser();
 			parser.parse(inputSource, handler);
 		} catch (SAXException | IOException | ParserConfigurationException e) {
@@ -278,7 +278,7 @@ public class ProfileStore {
 	public static void writeProfilesToStream(Collection<Profile> profiles, OutputStream stream, String encoding, IProfileVersioner profileVersioner) throws CoreException {
 
 		try {
-			final DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
+			final DocumentBuilderFactory factory= XmlProcessorFactoryJdtUi.createDocumentBuilderFactoryWithErrorOnDOCTYPE();
 			final DocumentBuilder builder= factory.newDocumentBuilder();
 			final Document document= builder.newDocument();
 
@@ -294,7 +294,7 @@ public class ProfileStore {
 				}
 			}
 
-			Transformer transformer=TransformerFactory.newInstance().newTransformer();
+			Transformer transformer= XmlProcessorFactoryJdtUi.createTransformerFactoryWithErrorOnDOCTYPE().newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.ENCODING, encoding);
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$

programming_language: Java
filename: ContentAssistHistory.java
change_type: ModificationType.MODIFY
diff: @@ -34,7 +34,6 @@ import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
@@ -62,6 +61,7 @@ import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.JavaUIException;
 import org.eclipse.jdt.internal.ui.JavaUIStatus;
+import org.eclipse.jdt.internal.ui.util.XmlProcessorFactoryJdtUi;
 
 /**
  * An LRU cache for code assist.
@@ -85,7 +85,7 @@ public final class ContentAssistHistory {
 
 		public void store(ContentAssistHistory history, StreamResult result) throws CoreException {
 			try {
-				DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
+				DocumentBuilderFactory factory= XmlProcessorFactoryJdtUi.createDocumentBuilderFactoryWithErrorOnDOCTYPE();
 				DocumentBuilder builder= factory.newDocumentBuilder();
 				Document document= builder.newDocument();
 
@@ -106,7 +106,7 @@ public final class ContentAssistHistory {
 					}
 				}
 
-				Transformer transformer=TransformerFactory.newInstance().newTransformer();
+				Transformer transformer= XmlProcessorFactoryJdtUi.createTransformerFactoryWithErrorOnDOCTYPE().newTransformer();
 				transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 				transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
 				transformer.setOutputProperty(OutputKeys.INDENT, "no"); //$NON-NLS-1$
@@ -121,7 +121,7 @@ public final class ContentAssistHistory {
 		public ContentAssistHistory load(InputSource source) throws CoreException {
 			Element root;
 			try {
-				DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+				DocumentBuilder parser = XmlProcessorFactoryJdtUi.createDocumentBuilderFactoryWithErrorOnDOCTYPE().newDocumentBuilder();
 				parser.setErrorHandler(new DefaultHandler());
 				root = parser.parse(source).getDocumentElement();
 			} catch (SAXException | ParserConfigurationException | IOException e) {

programming_language: Java
filename: XmlProcessorFactoryJdtUi.java
change_type: ModificationType.ADD
diff: @@ -0,0 +1,166 @@
+/*******************************************************************************
+ *  Copyright (c) 2023 Joerg Kubitz and others.
+ *
+ *  This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License 2.0
+ *  which accompanies this distribution, and is available at
+ *  https://www.eclipse.org/legal/epl-2.0/
+ *
+ *  SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************/
+package org.eclipse.jdt.internal.ui.util;
+
+import javax.xml.XMLConstants;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.TransformerFactory;
+
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.SAXNotSupportedException;
+
+/**
+ * XML processing which prohibits external entities.
+ *
+ * @see <a href="https://rules.sonarsource.com/java/RSPEC-2755/">RSPEC-2755</a>
+ */
+public class XmlProcessorFactoryJdtUi {
+	private XmlProcessorFactoryJdtUi() {
+		// static Utility only
+	}
+
+	private static final DocumentBuilderFactory DOCUMENT_BUILDER_FACTORY_ERROR_ON_DOCTYPE = createDocumentBuilderFactoryWithErrorOnDOCTYPE();
+	private static final SAXParserFactory SAX_FACTORY_ERROR_ON_DOCTYPE = createSAXFactoryWithErrorOnDOCTYPE(false);
+	private static final SAXParserFactory SAX_FACTORY_ERROR_ON_DOCTYPE_NS = createSAXFactoryWithErrorOnDOCTYPE(true);
+	private static final SAXParserFactory SAX_FACTORY_IGNORING_DOCTYPE = createSAXFactoryIgnoringDOCTYPE();
+
+	/**
+	 * Creates TransformerFactory which throws TransformerException when
+	 * detecting external entities.
+	 *
+	 * @return javax.xml.transform.TransformerFactory
+	 */
+	public static TransformerFactory createTransformerFactoryWithErrorOnDOCTYPE() {
+		TransformerFactory factory = TransformerFactory.newInstance();
+		// prohibit the use of all protocols by external entities:
+		factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); //$NON-NLS-1$
+		factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, ""); //$NON-NLS-1$
+		return factory;
+	}
+
+	/**
+	 * Creates DocumentBuilderFactory which throws SAXParseException when
+	 * detecting external entities. It's magnitudes faster to call
+	 * {@link #createDocumentBuilderWithErrorOnDOCTYPE()}.
+	 *
+	 * @return javax.xml.parsers.DocumentBuilderFactory
+	 */
+	public static synchronized DocumentBuilderFactory createDocumentBuilderFactoryWithErrorOnDOCTYPE() {
+		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+		// completely disable DOCTYPE declaration:
+		try {
+			factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); //$NON-NLS-1$
+		} catch (ParserConfigurationException e) {
+			throw new RuntimeException(e.getMessage(), e);
+		}
+		return factory;
+	}
+
+	/**
+	 * Creates DocumentBuilder which throws SAXParseException when detecting
+	 * external entities. The builder is not thread safe.
+	 *
+	 * @return javax.xml.parsers.DocumentBuilder
+	 * @throws ParserConfigurationException
+	 */
+	public static DocumentBuilder createDocumentBuilderWithErrorOnDOCTYPE() throws ParserConfigurationException {
+		return DOCUMENT_BUILDER_FACTORY_ERROR_ON_DOCTYPE.newDocumentBuilder();
+	}
+
+	/**
+	 * Creates DocumentBuilderFactory which throws SAXParseException when
+	 * detecting external entities.
+	 *
+	 * @return javax.xml.parsers.DocumentBuilderFactory
+	 */
+	public static SAXParserFactory createSAXFactoryWithErrorOnDOCTYPE() {
+		SAXParserFactory f = SAXParserFactory.newInstance();
+		try {
+			// force org.xml.sax.SAXParseException for any DOCTYPE:
+			f.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); //$NON-NLS-1$
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return f;
+	}
+
+	private static synchronized SAXParserFactory createSAXFactoryWithErrorOnDOCTYPE(boolean awareness) {
+		SAXParserFactory f = SAXParserFactory.newInstance();
+		f.setNamespaceAware(awareness);
+		try {
+			// force org.xml.sax.SAXParseException for any DOCTYPE:
+			f.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); //$NON-NLS-1$
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return f;
+	}
+
+	private static synchronized SAXParserFactory createSAXFactoryIgnoringDOCTYPE() {
+		SAXParserFactory f = SAXParserFactory.newInstance();
+		try {
+			// ignore DOCTYPE:
+			f.setFeature("http://xml.org/sax/features/external-general-entities", false); //$NON-NLS-1$
+			f.setFeature("http://xml.org/sax/features/external-parameter-entities", false); //$NON-NLS-1$
+			f.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); //$NON-NLS-1$
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return f;
+	}
+
+	/**
+	 * Creates SAXParser which throws SAXParseException when detecting external
+	 * entities.
+	 *
+	 * @return javax.xml.parsers.SAXParser
+	 */
+
+	public static SAXParser createSAXParserWithErrorOnDOCTYPE() throws ParserConfigurationException, SAXException {
+		return createSAXParserWithErrorOnDOCTYPE(false);
+	}
+
+	/**
+	 * Creates SAXParser which throws SAXParseException when detecting external
+	 * entities.
+	 *
+	 * @param namespaceAware
+	 *            parameter for SAXParserFactory
+	 *
+	 * @return javax.xml.parsers.SAXParser
+	 */
+	public static SAXParser createSAXParserWithErrorOnDOCTYPE(boolean namespaceAware)
+			throws ParserConfigurationException, SAXException {
+		if (namespaceAware) {
+			return SAX_FACTORY_ERROR_ON_DOCTYPE_NS.newSAXParser();
+		}
+		return SAX_FACTORY_ERROR_ON_DOCTYPE.newSAXParser();
+	}
+
+	/**
+	 * Creates SAXParser which does not throw Exception when detecting external
+	 * entities but ignores them.
+	 *
+	 * @return javax.xml.parsers.SAXParser
+	 */
+	public static SAXParser createSAXParserIgnoringDOCTYPE()
+			throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException, SAXException {
+		SAXParser parser = SAX_FACTORY_IGNORING_DOCTYPE.newSAXParser();
+		parser.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, ""); //$NON-NLS-1$
+		parser.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, ""); //$NON-NLS-1$
+		return parser;
+	}
+}
\ No newline at end of file

programming_language: Java
filename: RefactoringSessionReader.java
change_type: ModificationType.MODIFY
diff: @@ -136,7 +136,7 @@ public final class RefactoringSessionReader extends DefaultHandler {
 		fSessionFound= false;
 		try {
 			source.setSystemId("/"); //$NON-NLS-1$
-			createParser(SAXParserFactory.newInstance()).parse(source, this);
+			createParser(XmlProcessorFactoryLtk.createSAXFactoryWithErrorOnDOCTYPE()).parse(source, this);
 			if (!fSessionFound)
 				throw new CoreException(new Status(IStatus.ERROR, RefactoringCorePlugin.getPluginId(), IRefactoringCoreStatusCodes.REFACTORING_HISTORY_FORMAT_ERROR, RefactoringCoreMessages.RefactoringSessionReader_no_session, null));
 			if (fRefactoringDescriptors != null) {

programming_language: Java
filename: RefactoringSessionTransformer.java
change_type: ModificationType.MODIFY
diff: @@ -19,7 +19,6 @@ import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
 
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.FactoryConfigurationError;
 import javax.xml.parsers.ParserConfigurationException;
 
@@ -135,7 +134,7 @@ public final class RefactoringSessionTransformer {
 		Assert.isTrue(flags >= RefactoringDescriptor.NONE);
 		try {
 			if (fDocument == null)
-				fDocument= DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+				fDocument= XmlProcessorFactoryLtk.createDocumentBuilderFactoryWithErrorOnDOCTYPE().newDocumentBuilder().newDocument();
 		} catch (ParserConfigurationException | FactoryConfigurationError exception) {
 			throw new CoreException(new Status(IStatus.ERROR, RefactoringCorePlugin.getPluginId(), IRefactoringCoreStatusCodes.REFACTORING_HISTORY_IO_ERROR, exception.getLocalizedMessage(), null));
 		}
@@ -200,7 +199,7 @@ public final class RefactoringSessionTransformer {
 	public void beginSession(final String comment, final String version) throws CoreException {
 		if (fDocument == null) {
 			try {
-				fDocument= DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+				fDocument= XmlProcessorFactoryLtk.createDocumentBuilderFactoryWithErrorOnDOCTYPE().newDocumentBuilder().newDocument();
 				fSession= fDocument.createElement(IRefactoringSerializationConstants.ELEMENT_SESSION);
 				fSessionArguments= new ArrayList<>(2);
 				Attr attribute= fDocument.createAttribute(IRefactoringSerializationConstants.ATTRIBUTE_VERSION);

programming_language: Java
filename: XmlProcessorFactoryLtk.java
change_type: ModificationType.ADD
diff: @@ -0,0 +1,166 @@
+/*******************************************************************************
+ *  Copyright (c) 2023 Joerg Kubitz and others.
+ *
+ *  This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License 2.0
+ *  which accompanies this distribution, and is available at
+ *  https://www.eclipse.org/legal/epl-2.0/
+ *
+ *  SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************/
+package org.eclipse.ltk.internal.core.refactoring;
+
+import javax.xml.XMLConstants;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.TransformerFactory;
+
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.SAXNotSupportedException;
+
+/**
+ * XML processing which prohibits external entities.
+ *
+ * @see <a href="https://rules.sonarsource.com/java/RSPEC-2755/">RSPEC-2755</a>
+ */
+public class XmlProcessorFactoryLtk {
+	private XmlProcessorFactoryLtk() {
+		// static Utility only
+	}
+
+	private static final DocumentBuilderFactory DOCUMENT_BUILDER_FACTORY_ERROR_ON_DOCTYPE = createDocumentBuilderFactoryWithErrorOnDOCTYPE();
+	private static final SAXParserFactory SAX_FACTORY_ERROR_ON_DOCTYPE = createSAXFactoryWithErrorOnDOCTYPE(false);
+	private static final SAXParserFactory SAX_FACTORY_ERROR_ON_DOCTYPE_NS = createSAXFactoryWithErrorOnDOCTYPE(true);
+	private static final SAXParserFactory SAX_FACTORY_IGNORING_DOCTYPE = createSAXFactoryIgnoringDOCTYPE();
+
+	/**
+	 * Creates TransformerFactory which throws TransformerException when
+	 * detecting external entities.
+	 *
+	 * @return javax.xml.transform.TransformerFactory
+	 */
+	public static TransformerFactory createTransformerFactoryWithErrorOnDOCTYPE() {
+		TransformerFactory factory = TransformerFactory.newInstance();
+		// prohibit the use of all protocols by external entities:
+		factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); //$NON-NLS-1$
+		factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, ""); //$NON-NLS-1$
+		return factory;
+	}
+
+	/**
+	 * Creates DocumentBuilderFactory which throws SAXParseException when
+	 * detecting external entities. It's magnitudes faster to call
+	 * {@link #createDocumentBuilderWithErrorOnDOCTYPE()}.
+	 *
+	 * @return javax.xml.parsers.DocumentBuilderFactory
+	 */
+	public static synchronized DocumentBuilderFactory createDocumentBuilderFactoryWithErrorOnDOCTYPE() {
+		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+		// completely disable DOCTYPE declaration:
+		try {
+			factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); //$NON-NLS-1$
+		} catch (ParserConfigurationException e) {
+			throw new RuntimeException(e.getMessage(), e);
+		}
+		return factory;
+	}
+
+	/**
+	 * Creates DocumentBuilder which throws SAXParseException when detecting
+	 * external entities. The builder is not thread safe.
+	 *
+	 * @return javax.xml.parsers.DocumentBuilder
+	 * @throws ParserConfigurationException
+	 */
+	public static DocumentBuilder createDocumentBuilderWithErrorOnDOCTYPE() throws ParserConfigurationException {
+		return DOCUMENT_BUILDER_FACTORY_ERROR_ON_DOCTYPE.newDocumentBuilder();
+	}
+
+	/**
+	 * Creates DocumentBuilderFactory which throws SAXParseException when
+	 * detecting external entities.
+	 *
+	 * @return javax.xml.parsers.DocumentBuilderFactory
+	 */
+	public static SAXParserFactory createSAXFactoryWithErrorOnDOCTYPE() {
+		SAXParserFactory f = SAXParserFactory.newInstance();
+		try {
+			// force org.xml.sax.SAXParseException for any DOCTYPE:
+			f.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); //$NON-NLS-1$
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return f;
+	}
+
+	private static synchronized SAXParserFactory createSAXFactoryWithErrorOnDOCTYPE(boolean awareness) {
+		SAXParserFactory f = SAXParserFactory.newInstance();
+		f.setNamespaceAware(awareness);
+		try {
+			// force org.xml.sax.SAXParseException for any DOCTYPE:
+			f.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); //$NON-NLS-1$
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return f;
+	}
+
+	private static synchronized SAXParserFactory createSAXFactoryIgnoringDOCTYPE() {
+		SAXParserFactory f = SAXParserFactory.newInstance();
+		try {
+			// ignore DOCTYPE:
+			f.setFeature("http://xml.org/sax/features/external-general-entities", false); //$NON-NLS-1$
+			f.setFeature("http://xml.org/sax/features/external-parameter-entities", false); //$NON-NLS-1$
+			f.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); //$NON-NLS-1$
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return f;
+	}
+
+	/**
+	 * Creates SAXParser which throws SAXParseException when detecting external
+	 * entities.
+	 *
+	 * @return javax.xml.parsers.SAXParser
+	 */
+
+	public static SAXParser createSAXParserWithErrorOnDOCTYPE() throws ParserConfigurationException, SAXException {
+		return createSAXParserWithErrorOnDOCTYPE(false);
+	}
+
+	/**
+	 * Creates SAXParser which throws SAXParseException when detecting external
+	 * entities.
+	 *
+	 * @param namespaceAware
+	 *            parameter for SAXParserFactory
+	 *
+	 * @return javax.xml.parsers.SAXParser
+	 */
+	public static SAXParser createSAXParserWithErrorOnDOCTYPE(boolean namespaceAware)
+			throws ParserConfigurationException, SAXException {
+		if (namespaceAware) {
+			return SAX_FACTORY_ERROR_ON_DOCTYPE_NS.newSAXParser();
+		}
+		return SAX_FACTORY_ERROR_ON_DOCTYPE.newSAXParser();
+	}
+
+	/**
+	 * Creates SAXParser which does not throw Exception when detecting external
+	 * entities but ignores them.
+	 *
+	 * @return javax.xml.parsers.SAXParser
+	 */
+	public static SAXParser createSAXParserIgnoringDOCTYPE()
+			throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException, SAXException {
+		SAXParser parser = SAX_FACTORY_IGNORING_DOCTYPE.newSAXParser();
+		parser.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, ""); //$NON-NLS-1$
+		parser.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, ""); //$NON-NLS-1$
+		return parser;
+	}
+}
\ No newline at end of file

programming_language: Java
filename: RefactoringHistoryManager.java
change_type: ModificationType.MODIFY
diff: @@ -39,7 +39,6 @@ import java.util.Set;
 import java.util.TimeZone;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
 import org.xml.sax.InputSource;
@@ -84,6 +83,7 @@ import org.eclipse.ltk.internal.core.refactoring.RefactoringCoreMessages;
 import org.eclipse.ltk.internal.core.refactoring.RefactoringCorePlugin;
 import org.eclipse.ltk.internal.core.refactoring.RefactoringSessionReader;
 import org.eclipse.ltk.internal.core.refactoring.RefactoringSessionTransformer;
+import org.eclipse.ltk.internal.core.refactoring.XmlProcessorFactoryLtk;
 
 /**
  * Manager for persistable refactoring histories.
@@ -865,7 +865,7 @@ public final class RefactoringHistoryManager {
 	private Document getCachedDocument(final IPath path, final InputStream input) throws SAXException, IOException, ParserConfigurationException {
 		if (path.equals(fCachedPath) && fCachedDocument != null)
 			return fCachedDocument;
-		DocumentBuilder parser= DocumentBuilderFactory.newInstance().newDocumentBuilder();
+		DocumentBuilder parser= XmlProcessorFactoryLtk.createDocumentBuilderFactoryWithErrorOnDOCTYPE().newDocumentBuilder();
 		parser.setErrorHandler(new DefaultHandler());
 		final Document document= parser.parse(new InputSource(input));
 		fCachedDocument= document;

programming_language: Java
repo_url: https://github.com/eclipse-jdt/eclipse.jdt.core
commit_details: repo_url: https://github.com/eclipse-jdt/eclipse.jdt.core
author: Jörg Kubitz
author_date: 2023-07-17 09:10:20+02:00
msg: Refactor XML parsing
repository: repo_url: https://github.com/eclipse-jdt/eclipse.jdt.core
repo_name: eclipse-jdt/eclipse.jdt.core
repo_language: Java
owner: eclipse-jdt
file_changes: filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -19,7 +19,7 @@ Export-Package: com.sun.mirror.apt,
  org.eclipse.jdt.apt.core.internal.util;x-friends:="org.eclipse.jdt.apt.pluggable.core,org.eclipse.jdt.apt.tests,org.eclipse.jdt.apt.ui,org.eclipse.jdt.apt.pluggable.tests",
  org.eclipse.jdt.apt.core.util
 Require-Bundle: org.eclipse.jdt.core;bundle-version="[3.34.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.5.100,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.6.0,4.0.0)",
  org.apache.ant;bundle-version="1.6.5"
 Bundle-Activator: org.eclipse.jdt.apt.core.internal.AptPlugin

programming_language: Java
filename: FactoryPathUtil.java
change_type: ModificationType.MODIFY
diff: @@ -25,6 +25,7 @@ import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
+import org.eclipse.core.internal.runtime.XmlProcessorFactory;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
@@ -221,8 +222,9 @@ public final class FactoryPathUtil {
 		Element fpElement = null;
 
 		try {
-			DocumentBuilder parser =
-				DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			@SuppressWarnings("restriction")
+			DocumentBuilder parser = org.eclipse.core.internal.runtime.XmlProcessorFactory
+					.createDocumentBuilderWithErrorOnDOCTYPE();
 			fpElement = parser.parse(new InputSource(reader)).getDocumentElement();
 
 		}

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -9,7 +9,7 @@ Require-Bundle: org.eclipse.jdt.apt.core;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.jdt.ui;bundle-version="[3.14.0,4.0.0)",
  org.eclipse.jdt.core;bundle-version="[3.34.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.ui.forms;bundle-version="[3.2.0,4.0.0)"
 Bundle-ActivationPolicy: lazy

programming_language: CoffeeScript
filename: XMLComparer.java
change_type: ModificationType.MODIFY
diff: @@ -165,8 +165,7 @@ public class XMLComparer implements IXMLNames {
 			"</model>\n";
 
 		// create "actual" model
-		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-		Document actualModel = factory.newDocumentBuilder().newDocument();
+		Document actualModel = org.eclipse.core.internal.runtime.XmlProcessorFactory.createDocumentBuilderWithErrorOnDOCTYPE().newDocument();
 		Element modelNode = actualModel.createElement(MODEL_TAG);
 		// primary type
 		Element typeNode = actualModel.createElement(TYPE_ELEMENT_TAG);
@@ -204,7 +203,7 @@ public class XMLComparer implements IXMLNames {
 
 		// load reference model
     	InputSource source = new InputSource(new StringReader(XML_FRAMEWORK_TEST_MODEL));
-        Document expectedModel = factory.newDocumentBuilder().parse(source);
+        Document expectedModel = org.eclipse.core.internal.runtime.XmlProcessorFactory.createDocumentBuilderWithErrorOnDOCTYPE().parse(source);
 
         // compare actual and reference
         ByteArrayOutputStream out = new ByteArrayOutputStream();

programming_language: Java
filename: XMLConverter.java
change_type: ModificationType.MODIFY
diff: @@ -65,7 +65,7 @@ public class XMLConverter extends ElementScanner6<Void, Node> implements IXMLNam
 		StringWriter s = new StringWriter();
 		DOMSource domSource = new DOMSource(model);
 		StreamResult streamResult = new StreamResult(s);
-		TransformerFactory tf = TransformerFactory.newInstance();
+		TransformerFactory tf = org.eclipse.core.internal.runtime.XmlProcessorFactory.createTransformerFactoryWithErrorOnDOCTYPE();
 		Transformer serializer;
 		try {
 			serializer = tf.newTransformer();
@@ -146,8 +146,7 @@ public class XMLConverter extends ElementScanner6<Void, Node> implements IXMLNam
 	 * @throws ParserConfigurationException
 	 */
 	public static Document convertModel(Iterable<? extends javax.lang.model.element.Element> declarations) throws ParserConfigurationException {
-		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-		Document model = factory.newDocumentBuilder().newDocument();
+		Document model = org.eclipse.core.internal.runtime.XmlProcessorFactory.createDocumentBuilderWithErrorOnDOCTYPE().newDocument();
 		org.w3c.dom.Element modelNode = model.createElement(MODEL_TAG);
 
 		XMLConverter converter = new XMLConverter(model);

programming_language: Java
filename: NegativeModelProc.java
change_type: ModificationType.MODIFY
diff: @@ -41,7 +41,6 @@ import javax.lang.model.type.DeclaredType;
 import javax.lang.model.type.TypeKind;
 import javax.lang.model.type.TypeMirror;
 import javax.lang.model.util.Elements;
-import javax.xml.parsers.DocumentBuilderFactory;
 
 import org.eclipse.jdt.compiler.apt.tests.processors.base.XMLComparer;
 import org.eclipse.jdt.compiler.apt.tests.processors.base.XMLConverter;
@@ -844,8 +843,7 @@ public class NegativeModelProc extends AbstractProcessor
 		Document actualModel = XMLConverter.convertModel(rootElements);
 
     	InputSource source = new InputSource(new StringReader(expected));
-    	DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-        Document expectedModel = factory.newDocumentBuilder().parse(source);
+        Document expectedModel = org.eclipse.core.internal.runtime.XmlProcessorFactory.createDocumentBuilderWithErrorOnDOCTYPE().parse(source);
 
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         StringBuilder summary = new StringBuilder();

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -6,6 +6,7 @@ Bundle-Version: 1.2.0.qualifier
 Bundle-Vendor: %providerName
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Export-Package: META-INF.services
-Require-Bundle: org.eclipse.jdt.core.compiler.batch;bundle-version="3.35.0"
+Require-Bundle: org.eclipse.jdt.core.compiler.batch;bundle-version="3.35.0",
+ org.eclipse.core.runtime;bundle-version="3.29.0"
 Automatic-Module-Name: org.eclipse.jdt.core.internal.tools
 

programming_language: CoffeeScript
filename: TableBuilder.java
change_type: ModificationType.MODIFY
diff: @@ -42,11 +42,10 @@ public class TableBuilder {
 		List<String> result = new ArrayList<>();
 		SAXParser saxParser = null;
 		try {
-			saxParser = SAXParserFactory.newInstance().newSAXParser();
-		} catch (ParserConfigurationException e) {
-			e.printStackTrace();
-			return null;
-		} catch (SAXException e) {
+			@SuppressWarnings("restriction")
+			SAXParser p = org.eclipse.core.internal.runtime.XmlProcessorFactory.createSAXParserWithErrorOnDOCTYPE();
+			saxParser =p;
+		} catch (SAXException | ParserConfigurationException e) {
 			e.printStackTrace();
 			return null;
 		}

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -10,7 +10,7 @@ Require-Bundle: org.junit;bundle-version="3.8.1",
  org.eclipse.jdt.core;bundle-version="[3.34.0,4.0.0)",
  org.eclipse.jdt.core.tests.compiler;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.test.performance;bundle-version="[3.1.0,4.0.0)",
  org.eclipse.jdt.annotation;bundle-version="[1.1.0,2.0.0)";resolution:=optional,
  org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional

programming_language: Batchfile
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -18,7 +18,7 @@ Export-Package: org.eclipse.jdt.core.tests.compiler,
 Require-Bundle: org.junit;bundle-version="3.8.1",
  org.eclipse.jdt.debug;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.jdt.core;bundle-version="[3.34.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.test.performance;bundle-version="[3.10.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.jdt.annotation;bundle-version="[1.1.0,2.0.0)";resolution:=optional,

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -14,7 +14,7 @@ Export-Package: org.eclipse.jdt.core.tests,
  org.eclipse.jdt.core.tests.rewrite.describing,
  org.eclipse.jdt.core.tests.rewrite.modifying
 Require-Bundle: org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.jdt.core;bundle-version="[3.34.0,4.0.0)",
  org.junit;bundle-version="3.8.1",
  org.eclipse.test.performance;bundle-version="[3.1.0,4.0.0)",

programming_language: CoffeeScript
filename: DecodeCodeFormatterPreferences.java
change_type: ModificationType.MODIFY
diff: @@ -26,8 +26,8 @@ import java.util.zip.ZipFile;
 import javax.xml.parsers.FactoryConfigurationError;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
 
+import org.eclipse.core.internal.runtime.XmlProcessorFactory;
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.DefaultHandler;
@@ -63,7 +63,7 @@ public class DecodeCodeFormatterPreferences extends DefaultHandler {
 
 	public static Map decodeCodeFormatterOptions(String fileName, String profileName) {
 		try {
-			SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser();
+			SAXParser saxParser = XmlProcessorFactory.createSAXParserWithErrorOnDOCTYPE();
 			final DecodeCodeFormatterPreferences preferences = new DecodeCodeFormatterPreferences(profileName);
 			saxParser.parse(new File(fileName), preferences);
 			return preferences.getEntries();
@@ -89,7 +89,7 @@ public class DecodeCodeFormatterPreferences extends DefaultHandler {
 				return null;
 			}
 			inputStream = new BufferedInputStream(zipFile.getInputStream(zipEntry));
-			SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser();
+			SAXParser saxParser = XmlProcessorFactory.createSAXParserWithErrorOnDOCTYPE();
 			final DecodeCodeFormatterPreferences preferences = new DecodeCodeFormatterPreferences(profileName);
 			saxParser.parse(inputStream, preferences);
 			return preferences.getEntries();

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -8,7 +8,7 @@ Bundle-Localization: plugin
 Export-Package: org.eclipse.jdt.core.tests.performance,
  org.eclipse.jdt.core.tests.performance.util
 Require-Bundle: org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.jdt.core;bundle-version="[3.34.0,4.0.0)",
  org.eclipse.jdt.core.tests.builder;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.jdt.core.tests.compiler;bundle-version="[3.4.0,4.0.0)",

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -43,7 +43,7 @@ Export-Package: org.eclipse.jdt.core,
  org.eclipse.jdt.internal.formatter.linewrap;x-internal:=true,
  org.eclipse.jdt.internal.formatter.old;x-internal:=true
 Require-Bundle: org.eclipse.core.resources;bundle-version="[3.18.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.13.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.core.filesystem;bundle-version="[1.7.0,2.0.0)",
  org.eclipse.text;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.team.core;bundle-version="[3.1.0,4.0.0)";resolution:=optional,

programming_language: Java
filename: JavaModelManager.java
change_type: ModificationType.MODIFY
diff: @@ -60,7 +60,6 @@ import java.util.zip.ZipException;
 import java.util.zip.ZipFile;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
 import org.eclipse.core.resources.IFile;
@@ -3566,7 +3565,8 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 				StringReader reader = new StringReader(xmlString);
 				Element cpElement;
 				try {
-					DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+					@SuppressWarnings("restriction")
+					DocumentBuilder parser = org.eclipse.core.internal.runtime.XmlProcessorFactory.createDocumentBuilderWithErrorOnDOCTYPE();
 					cpElement = parser.parse(new InputSource(reader)).getDocumentElement();
 				} catch(SAXException | ParserConfigurationException e){
 					return;

programming_language: Java
filename: JavaProject.java
change_type: ModificationType.MODIFY
diff: @@ -39,7 +39,6 @@ import java.util.jar.Manifest;
 import java.util.stream.Collectors;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import org.eclipse.core.resources.ICommand;
 import org.eclipse.core.resources.IFile;
@@ -1317,7 +1316,8 @@ public class JavaProject
 		StringReader reader = new StringReader(xmlClasspath);
 		Element cpElement;
 		try {
-			DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			@SuppressWarnings("restriction")
+			DocumentBuilder parser = org.eclipse.core.internal.runtime.XmlProcessorFactory.createDocumentBuilderWithErrorOnDOCTYPE();
 			cpElement = parser.parse(new InputSource(reader)).getDocumentElement();
 		} catch (SAXException | ParserConfigurationException e) {
 			throw new IOException(Messages.file_badFormat, e);
@@ -1378,8 +1378,9 @@ public class JavaProject
 			Element node;
 
 			try {
+				@SuppressWarnings("restriction")
 				DocumentBuilder parser =
-					DocumentBuilderFactory.newInstance().newDocumentBuilder();
+						org.eclipse.core.internal.runtime.XmlProcessorFactory.createDocumentBuilderWithErrorOnDOCTYPE();
 				node = parser.parse(new InputSource(reader)).getDocumentElement();
 			} catch (SAXException | ParserConfigurationException e) {
 				return null;

programming_language: Java
filename: UserLibrary.java
change_type: ModificationType.MODIFY
diff: @@ -20,7 +20,6 @@ import java.io.StringWriter;
 import java.util.ArrayList;
 import java.util.HashMap;
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
 import org.eclipse.core.runtime.Assert;
@@ -148,7 +147,8 @@ public class UserLibrary {
 	public static UserLibrary createFromString(Reader reader) throws IOException {
 		Element cpElement;
 		try {
-			DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			@SuppressWarnings("restriction")
+			DocumentBuilder parser = org.eclipse.core.internal.runtime.XmlProcessorFactory.createDocumentBuilderWithErrorOnDOCTYPE();
 			cpElement = parser.parse(new InputSource(reader)).getDocumentElement();
 		} catch (SAXException | ParserConfigurationException e) {
 			throw new IOException(Messages.file_badFormat, e);

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -7,7 +7,7 @@ Bundle-Activator: org.eclipse.jdt.tests.latestbree.Activator
 Require-Bundle: org.junit;bundle-version="3.8.1",
  org.eclipse.jdt.debug;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.jdt.core;bundle-version="[3.10.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
  org.eclipse.test.performance;bundle-version="[3.10.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.jdt.annotation;bundle-version="[1.1.0,2.0.0)";resolution:=optional,

programming_language: CoffeeScript
repo_url: https://github.com/eclipse-platform/eclipse.platform.swt
commit_details: repo_url: https://github.com/eclipse-platform/eclipse.platform.swt
author: Jörg Kubitz
author_date: 2023-07-12 16:07:51+02:00
msg: Refactor XML parsing
repository: repo_url: https://github.com/eclipse-platform/eclipse.platform.swt
repo_name: eclipse-platform/eclipse.platform.swt
description: Eclipse SWT
repo_language: Java
owner: eclipse-platform
file_changes: filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -9,7 +9,7 @@ Export-Package: org.eclipse.swt.tools.internal,
 Bundle-ActivationPolicy: lazy
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-17
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.0",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.29.0",
  org.eclipse.swt.tools.base;bundle-version="3.106.0",
  org.eclipse.e4.ui.model.workbench;bundle-version="2.1.400",
  org.eclipse.swt;bundle-version="3.119.0",

programming_language: CoffeeScript
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -8,7 +8,7 @@ Export-Package: org.eclipse.swt.tools.internal; x-internal:=true
 Bundle-ActivationPolicy: lazy
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-17
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.0",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.29.0",
  org.eclipse.core.resources;bundle-version="3.4.0",
  org.eclipse.jdt.core;bundle-version="3.4.0",
  org.eclipse.ui;bundle-version="3.4.0",

programming_language: CoffeeScript
filename: MacGenerator.java
change_type: ModificationType.MODIFY
diff: @@ -17,8 +17,6 @@ import java.io.*;
 import java.util.*;
 import java.util.Map.*;
 
-import javax.xml.parsers.*;
-
 import org.w3c.dom.*;
 import org.xml.sax.*;
 
@@ -948,7 +946,9 @@ public void setSelectorEnum(String selectorEnumName) {
 Document getDocument(String xmlPath) {
 	try (InputStream is = createInputStream(xmlPath))  {
 		if (is != null) {
-			return DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(is));
+			@SuppressWarnings("restriction")
+			Document d = org.eclipse.core.internal.runtime.XmlProcessorFactory.parseWithErrorOnDOCTYPE(new InputSource(is));
+			return d;
 		}
 	} catch (Exception e) {
 		//ignored

programming_language: Java
repo_url: https://github.com/eclipse-cdt/cdt
commit_details: repo_url: https://github.com/eclipse-cdt/cdt
author: Jonah Graham
author_date: 2023-08-11 08:31:09-04:00
msg: Refactor XML file handling
repository: repo_url: https://github.com/eclipse-cdt/cdt
repo_name: eclipse-cdt/cdt
description: Eclipse CDT™ C/C++ Development Tools
repo_language: Java
owner: eclipse-cdt
file_changes: filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %Bundle-Name.0
 Bundle-SymbolicName: org.eclipse.cdt.autotools.core;singleton:=true
-Bundle-Version: 2.2.0.qualifier
+Bundle-Version: 2.2.100.qualifier
 Bundle-Activator: org.eclipse.cdt.autotools.core.AutotoolsPlugin
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.ui;bundle-version="3.4.0",
@@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.4.0",
  org.eclipse.core.resources;bundle-version="3.4.0",
  org.eclipse.ui.ide;bundle-version="3.4.0",
  org.eclipse.cdt.managedbuilder.core;bundle-version="5.0.100",
- org.eclipse.cdt.core;bundle-version="6.5.0",
+ org.eclipse.cdt.core;bundle-version="8.3.0",
  org.eclipse.cdt.ui;bundle-version="5.1.0",
  org.eclipse.cdt.managedbuilder.ui;bundle-version="5.0.100",
  org.eclipse.cdt.managedbuilder.gnu.ui;bundle-version="5.0.100",

programming_language: CoffeeScript
filename: AutotoolsConfigurationManager.java
change_type: ModificationType.MODIFY
diff: @@ -27,7 +27,6 @@ import java.util.Map.Entry;
 import java.util.Random;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
 import org.eclipse.cdt.autotools.core.AutotoolsNewProjectNature;
@@ -38,6 +37,7 @@ import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
 import org.eclipse.cdt.core.settings.model.ICProjectDescription;
 import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
 import org.eclipse.cdt.internal.autotools.core.configure.AutotoolsConfiguration.Option;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.managedbuilder.core.BuildException;
 import org.eclipse.cdt.managedbuilder.core.IConfiguration;
 import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
@@ -55,6 +55,7 @@ import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -203,8 +204,7 @@ public class AutotoolsConfigurationManager implements IResourceChangeListener {
 				IPath fileLocation = project.getLocation().append(CFG_FILE_NAME);
 				File dirFile = fileLocation.toFile();
 				Map<String, IAConfiguration> cfgList = new HashMap<>();
-				DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-				DocumentBuilder db = dbf.newDocumentBuilder();
+				DocumentBuilder db = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 				if (dirFile.exists()) {
 					Document d = db.parse(dirFile);
 					Element e = d.getDocumentElement();
@@ -269,7 +269,8 @@ public class AutotoolsConfigurationManager implements IResourceChangeListener {
 					}
 				}
 			} catch (ParserConfigurationException | SAXException | IOException e) {
-				e.printStackTrace();
+				Platform.getLog(AutotoolsConfigurationManager.class)
+						.error("Error while parsing .autotools file in project", e); //$NON-NLS-1$
 			}
 		}
 		return list;

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
 Bundle-SymbolicName: org.eclipse.cdt.autotools.tests;singleton:=true
-Bundle-Version: 2.1.0.qualifier
+Bundle-Version: 2.1.100.qualifier
 Bundle-Vendor: %provider
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.ui,
@@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.ui,
  org.junit,
  org.eclipse.ui.ide,
  org.eclipse.jface.text,
- org.eclipse.cdt.core,
+ org.eclipse.cdt.core;bundle-version="8.3.0",
  org.eclipse.cdt.autotools.ui;bundle-version="1.0.0",
  org.eclipse.cdt.core.tests
 Bundle-ActivationPolicy: lazy

programming_language: CoffeeScript
filename: UpdateConfigureTest.java
change_type: ModificationType.MODIFY
diff: @@ -25,7 +25,6 @@ import java.io.IOException;
 import java.util.Map;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
 import org.eclipse.cdt.autotools.core.AutotoolsOptionConstants;
@@ -33,6 +32,7 @@ import org.eclipse.cdt.autotools.core.IAutotoolsOption;
 import org.eclipse.cdt.core.model.CoreModel;
 import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
 import org.eclipse.cdt.internal.autotools.core.configure.AutotoolsConfigurationManager;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.managedbuilder.core.IConfiguration;
 import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
 import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
@@ -535,8 +535,7 @@ public class UpdateConfigureTest {
 		try {
 			IPath fileLocation = testProject.getLocation().append(".autotools"); //$NON-NLS-1$
 			File dirFile = fileLocation.toFile();
-			DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-			DocumentBuilder db = dbf.newDocumentBuilder();
+			DocumentBuilder db = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			assertTrue(dirFile.exists());
 			Document d = db.parse(dirFile);
 			Element e = d.getDocumentElement();

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -2,11 +2,11 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
 Bundle-SymbolicName: org.eclipse.cdt.autotools.ui.tests
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.1.100.qualifier
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.swtbot.go,
  org.eclipse.core.resources,
- org.eclipse.cdt.core
+ org.eclipse.cdt.core;bundle-version="8.3.0"
 Bundle-ActivationPolicy: lazy
 Fragment-Host: org.eclipse.cdt.autotools.ui
 Bundle-RequiredExecutionEnvironment: JavaSE-17

programming_language: CoffeeScript
filename: SetConfigurationParameterTest.java
change_type: ModificationType.MODIFY
diff: @@ -24,8 +24,8 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IWorkspace;
 import org.eclipse.core.resources.IWorkspaceRoot;
@@ -108,8 +108,7 @@ public class SetConfigurationParameterTest extends AbstractTest {
 		File f = new File(path.toOSString());
 		assertTrue(f.exists());
 
-		DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-		DocumentBuilder db = dbf.newDocumentBuilder();
+		DocumentBuilder db = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 		Document d = db.parse(f);
 		Element e = d.getDocumentElement();
 		// Get the stored configuration data
@@ -320,8 +319,7 @@ public class SetConfigurationParameterTest extends AbstractTest {
 		path = project.getLocation().append(".autotools");
 		f = new File(path.toOSString());
 		assertTrue(f.exists());
-		DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-		DocumentBuilder db = dbf.newDocumentBuilder();
+		DocumentBuilder db = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 		Document d = db.parse(f);
 		Element e = d.getDocumentElement();
 		// Get the stored configuration data

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -2,14 +2,14 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %Bundle-Name.0
 Bundle-SymbolicName: org.eclipse.cdt.autotools.ui;singleton:=true
-Bundle-Version: 2.2.100.qualifier
+Bundle-Version: 2.2.200.qualifier
 Bundle-Activator: org.eclipse.cdt.autotools.ui.AutotoolsUIPlugin
 Bundle-Localization: plugin
 Bundle-Vendor: %provider
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
  org.eclipse.cdt.autotools.core;bundle-version="1.0.0",
- org.eclipse.cdt.core;bundle-version="5.1.0",
+ org.eclipse.cdt.core;bundle-version="8.3.0",
  org.eclipse.core.resources;bundle-version="3.5.0",
  org.eclipse.cdt.managedbuilder.core;bundle-version="6.0.0",
  org.eclipse.jface.text;bundle-version="3.5.0",

programming_language: CoffeeScript
filename: AutoconfTextHover.java
change_type: ModificationType.MODIFY
diff: @@ -42,6 +42,7 @@ import org.eclipse.cdt.internal.autotools.ui.CWordFinder;
 import org.eclipse.cdt.internal.autotools.ui.HTMLPrinter;
 import org.eclipse.cdt.internal.autotools.ui.HTMLTextPresenter;
 import org.eclipse.cdt.internal.autotools.ui.preferences.AutotoolsEditorPreferenceConstants;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.core.filesystem.URIUtil;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
@@ -168,12 +169,14 @@ public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
 							docStream = new FileInputStream(p.toFile());
 						}
 					}
-					DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+					DocumentBuilderFactory factory = XmlProcessorFactoryCdt
+							.createDocumentBuilderFactoryIgnoringDOCTYPE();
 					factory.setValidating(false);
 					try {
 						DocumentBuilder builder = factory.newDocumentBuilder();
 						doc = builder.parse(docStream);
 					} catch (SAXException | ParserConfigurationException | IOException saxEx) {
+						AutotoolsPlugin.log(saxEx);
 						doc = null;
 					} finally {
 						if (docStream != null)
@@ -218,7 +221,8 @@ public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
 							docStream = new FileInputStream(p.toFile());
 						}
 					}
-					DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+					DocumentBuilderFactory factory = XmlProcessorFactoryCdt
+							.createDocumentBuilderFactoryIgnoringDOCTYPE();
 					factory.setValidating(false);
 					try {
 						DocumentBuilder builder = factory.newDocumentBuilder();

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.cdt.make.core; singleton:=true
-Bundle-Version: 7.6.200.qualifier
+Bundle-Version: 7.6.300.qualifier
 Bundle-Activator: org.eclipse.cdt.make.core.MakeCorePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -19,7 +19,7 @@ Export-Package: org.eclipse.cdt.make.core,
  org.eclipse.cdt.make.internal.core.scannerconfig.jobs;x-internal:=true,
  org.eclipse.cdt.make.internal.core.scannerconfig.util;x-internal:=true,
  org.eclipse.cdt.make.internal.core.scannerconfig2;x-internal:=true
-Require-Bundle: org.eclipse.cdt.core;bundle-version="[8.0.0,9.0.0)",
+Require-Bundle: org.eclipse.cdt.core;bundle-version="[8.3.0,9.0.0)",
  org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.core.variables;bundle-version="[3.1.100,4.0.0)",
  org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",

programming_language: CoffeeScript
filename: ProjectTargets.java
change_type: ModificationType.MODIFY
diff: @@ -24,12 +24,11 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map.Entry;
 
-import javax.xml.parsers.DocumentBuilderFactory;
-
 import org.eclipse.cdt.core.CCorePlugin;
 import org.eclipse.cdt.core.ICDescriptor;
 import org.eclipse.cdt.core.settings.model.ICStorageElement;
 import org.eclipse.cdt.core.settings.model.XmlStorageUtil;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.make.core.IMakeCommonBuildInfo;
 import org.eclipse.cdt.make.core.IMakeTarget;
 import org.eclipse.cdt.make.core.MakeCorePlugin;
@@ -237,7 +236,7 @@ public class ProjectTargets {
 	 */
 	protected ICStorageElement translateInputStreamToDocument(InputStream input) {
 		try {
-			Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(input);
+			Document document = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE().parse(input);
 			return XmlStorageUtil.createCStorageTree(document);
 		} catch (Exception e) {
 			MakeCorePlugin.log(e);

programming_language: Java
filename: DiscoveredScannerInfoStore.java
change_type: ModificationType.MODIFY
diff: @@ -25,15 +25,14 @@ import java.util.HashMap;
 import java.util.Map;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.make.core.MakeCorePlugin;
 import org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IDiscoveredScannerInfoSerializable;
 import org.eclipse.cdt.make.core.scannerconfig.InfoContext;
@@ -159,7 +158,7 @@ public final class DiscoveredScannerInfoStore {
 		Document document = ref != null ? ref.get() : null;
 		if (document == null) {
 			try {
-				DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+				DocumentBuilder builder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 				IPath path = getDiscoveredScannerConfigStore(project);
 				if (path.toFile().exists()) {
 					// read form file
@@ -292,7 +291,8 @@ public final class DiscoveredScannerInfoStore {
 
 			// Transform the document to something we can save in a file
 			ByteArrayOutputStream stream = new ByteArrayOutputStream();
-			Transformer transformer = TransformerFactory.newInstance().newTransformer();
+			Transformer transformer = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE()
+					.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -33,7 +33,7 @@ Export-Package: org.eclipse.cdt.build.core.scannerconfig,
  org.eclipse.cdt.managedbuilder.templateengine,
  org.eclipse.cdt.managedbuilder.templateengine.processes,
  org.eclipse.cdt.newmake.core
-Require-Bundle: org.eclipse.cdt.core;bundle-version="[8.0.0,9.0.0)",
+Require-Bundle: org.eclipse.cdt.core;bundle-version="[8.3.0,9.0.0)",
  org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)",
  org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",

programming_language: CoffeeScript
filename: ManagedBuildManager.java
change_type: ModificationType.MODIFY
diff: @@ -38,14 +38,12 @@ import java.util.SortedMap;
 import java.util.TreeMap;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.FactoryConfigurationError;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.TransformerFactoryConfigurationError;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
@@ -67,6 +65,7 @@ import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
 import org.eclipse.cdt.core.settings.model.ICSettingEntry;
 import org.eclipse.cdt.core.settings.model.XmlStorageUtil;
 import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.managedbuilder.buildproperties.IBuildProperty;
 import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyManager;
 import org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider;
@@ -1089,7 +1088,7 @@ public class ManagedBuildManager extends AbstractCExtension {
 		// Create document
 		Exception err = null;
 		try {
-			DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder builder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document doc = builder.newDocument();
 
 			// Get the build information for the project
@@ -1111,7 +1110,8 @@ public class ManagedBuildManager extends AbstractCExtension {
 
 				// Transform the document to something we can save in a file
 				ByteArrayOutputStream stream = new ByteArrayOutputStream();
-				Transformer transformer = TransformerFactory.newInstance().newTransformer();
+				Transformer transformer = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE()
+						.newTransformer();
 				transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 				transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
 				transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
@@ -1261,7 +1261,7 @@ public class ManagedBuildManager extends AbstractCExtension {
 		// Create document
 		Exception err = null;
 		try {
-			DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder builder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document doc = builder.newDocument();
 
 			// Get the build information for the project
@@ -1284,7 +1284,7 @@ public class ManagedBuildManager extends AbstractCExtension {
 
 				// Transform the document to something we can save in a file
 				ByteArrayOutputStream stream = new ByteArrayOutputStream();
-				Transformer transformer = TransformerFactory.newInstance().newTransformer();
+				Transformer transformer = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE().newTransformer();
 				transformer.setOutputProperty(OutputKeys.METHOD, "xml");	//$NON-NLS-1$
 				transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
 				transformer.setOutputProperty(OutputKeys.INDENT, "yes");	//$NON-NLS-1$
@@ -1836,7 +1836,7 @@ public class ManagedBuildManager extends AbstractCExtension {
 
 		// So there is a project file, load the information there
 		try (InputStream stream = new FileInputStream(cdtbuild)) {
-			DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document document = parser.parse(stream);
 			String fileVersion = null;
 
@@ -2516,7 +2516,7 @@ public class ManagedBuildManager extends AbstractCExtension {
 		//		if (file.exists()) {
 		//			try {
 		//				InputStream stream = file.getContents();
-		//				DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+		//				DocumentBuilder parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 		//				Document document = parser.parse(stream);
 		//				NodeList nodes = document.getElementsByTagName(ROOT_NODE_NAME);
 		//				return (nodes.getLength() > 0);

programming_language: Java
filename: UpdateManagedProject12.java
change_type: ModificationType.MODIFY
diff: @@ -23,8 +23,8 @@ import java.util.NoSuchElementException;
 import java.util.Vector;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.managedbuilder.core.BuildException;
 import org.eclipse.cdt.managedbuilder.core.IBuildObject;
 import org.eclipse.cdt.managedbuilder.core.IConfiguration;
@@ -709,7 +709,7 @@ class UpdateManagedProject12 {
 		try {
 			// Load the old build file
 			InputStream stream = new FileInputStream(settingsFile);
-			DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document document = parser.parse(stream);
 
 			// Clone the target based on the proper target definition

programming_language: Java
filename: UpdateManagedProject20.java
change_type: ModificationType.MODIFY
diff: @@ -19,8 +19,8 @@ import java.io.InputStream;
 import java.util.Vector;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.managedbuilder.core.BuildException;
 import org.eclipse.cdt.managedbuilder.core.IBuilder;
 import org.eclipse.cdt.managedbuilder.core.IConfiguration;
@@ -78,7 +78,7 @@ class UpdateManagedProject20 {
 		try {
 			// Load the old build file
 			InputStream stream = new FileInputStream(settingsFile);
-			DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document document = parser.parse(stream);
 
 			// Clone the target based on the proper target definition

programming_language: Java
filename: XMLDumper.java
change_type: ModificationType.MODIFY
diff: @@ -19,14 +19,13 @@ import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.util.HashMap;
 
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -53,7 +52,8 @@ public class XMLDumper {
 			Document document = dumper.getDocument();
 			StringWriter writer = new StringWriter();
 
-			Transformer transformer = TransformerFactory.newInstance().newTransformer();
+			Transformer transformer = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE()
+					.newTransformer();
 			transformer.transform(new DOMSource(document), new StreamResult(writer));
 
 			System.out.println("STRXML = " + writer.toString()); //Spit out DOM as a String //$NON-NLS-1$
@@ -74,7 +74,7 @@ public class XMLDumper {
 	}
 
 	public XMLDumper(Object obj) throws ParserConfigurationException {
-		document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+		document = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE().newDocument();
 		document.appendChild(createObject(obj));
 	}
 

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -55,7 +55,16 @@ Export-Package: org.eclipse.cdt.core,
    org.eclipse.cdt.make.ui,
    org.eclipse.cdt.managedbuilder.core,
    org.eclipse.cdt.managedbuilder.ui,
-   org.eclipse.cdt.ui",
+   org.eclipse.cdt.ui,
+   org.eclipse.cdt.autotools.core,
+   org.eclipse.cdt.autotools.tests,
+   org.eclipse.cdt.autotools.ui,
+   org.eclipse.cdt.autotools.ui.tests,
+   org.eclipse.cdt.core.tests,
+   org.eclipse.cdt.debug.ui,
+   org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui,
+   org.eclipse.cdt.testsrunner.boost,
+   org.eclipse.cdt.testsrunner.qttest",
  org.eclipse.cdt.internal.core.browser;x-friends:="org.eclipse.cdt.ui",
  org.eclipse.cdt.internal.core.cdtvariables;x-internal:=true,
  org.eclipse.cdt.internal.core.dom;x-internal:=true,

programming_language: Java
filename: LanguageMappingStore.java
change_type: ModificationType.MODIFY
diff: @@ -23,12 +23,10 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.TreeMap;
 
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.TransformerFactoryConfigurationError;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
@@ -41,6 +39,7 @@ import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
 import org.eclipse.cdt.core.settings.model.ICProjectDescription;
 import org.eclipse.cdt.core.settings.model.ICStorageElement;
 import org.eclipse.cdt.internal.core.Util;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.preferences.DefaultScope;
@@ -194,7 +193,7 @@ public class LanguageMappingStore {
 	public void storeMappings(WorkspaceLanguageConfiguration config) throws CoreException {
 		try {
 			// Encode mappings as XML and serialize as a String.
-			Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+			Document doc = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE().newDocument();
 			Element rootElement = doc.createElement(WORKSPACE_MAPPINGS);
 			doc.appendChild(rootElement);
 			addContentTypeMappings(config.getWorkspaceMappings(), rootElement);
@@ -233,7 +232,7 @@ public class LanguageMappingStore {
 		// The mappings are encoded as XML in a String so we need to parse it.
 		InputSource input = new InputSource(new StringReader(encodedMappings));
 		try {
-			Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(input);
+			Document document = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE().parse(input);
 			config.setWorkspaceMappings(decodeContentTypeMappings(document.getDocumentElement()));
 			return config;
 		} catch (SAXException e) {
@@ -247,7 +246,7 @@ public class LanguageMappingStore {
 
 	private Transformer createSerializer() throws CoreException {
 		try {
-			return TransformerFactory.newInstance().newTransformer();
+			return XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE().newTransformer();
 		} catch (TransformerConfigurationException e) {
 			throw new CoreException(Util.createStatus(e));
 		} catch (TransformerFactoryConfigurationError e) {

programming_language: Java
filename: CProjectDescriptionManager.java
change_type: ModificationType.MODIFY
diff: @@ -45,14 +45,12 @@ import java.util.Set;
 import java.util.concurrent.CopyOnWriteArraySet;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.FactoryConfigurationError;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
@@ -98,6 +96,7 @@ import org.eclipse.cdt.core.settings.model.util.ListComparator;
 import org.eclipse.cdt.core.settings.model.util.PathSettingsContainer;
 import org.eclipse.cdt.core.settings.model.util.PatternNameMap;
 import org.eclipse.cdt.internal.core.CConfigBasedDescriptorManager;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.internal.core.model.CElementDelta;
 import org.eclipse.cdt.internal.core.settings.model.CExternalSettinsDeltaCalculator.ExtSettingsDelta;
 import org.eclipse.cdt.internal.core.settings.model.xml.InternalXmlStorageElement;
@@ -918,7 +917,8 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
 		ByteArrayOutputStream stream = new ByteArrayOutputStream();
 		FileOutputStream fileStream = null;
 		try {
-			Transformer transformer = TransformerFactory.newInstance().newTransformer();
+			Transformer transformer = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE()
+					.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
@@ -1234,7 +1234,7 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
 	public ICStorageElement createPreferenceStorage(String key, boolean createEmptyIfNotFound, boolean readOnly)
 			throws CoreException {
 		try {
-			DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder builder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document doc = null;
 			Element element = null;
 			InputStream stream = null;

programming_language: Java
filename: CProjectDescriptionStorageManager.java
change_type: ModificationType.MODIFY
diff: @@ -27,13 +27,11 @@ import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.TransformerFactoryConfigurationError;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
@@ -41,6 +39,7 @@ import javax.xml.transform.stream.StreamResult;
 import org.eclipse.cdt.core.CCorePlugin;
 import org.eclipse.cdt.core.settings.model.ICProjectDescription;
 import org.eclipse.cdt.internal.core.CConfigBasedDescriptorManager;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.internal.core.XmlUtil;
 import org.eclipse.cdt.internal.core.settings.model.ICProjectDescriptionStorageType.CProjectDescriptionStorageTypeProxy;
 import org.eclipse.cdt.internal.core.settings.model.xml.XmlProjectDescriptionStorage;
@@ -67,6 +66,7 @@ import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.w3c.dom.ProcessingInstruction;
+import org.xml.sax.SAXException;
 
 /**
  * Class that marshals creation of AbstractCProjectDescriptionStorages
@@ -163,7 +163,7 @@ public class CProjectDescriptionStorageManager {
 			throws CoreException {
 		Document doc;
 		try {
-			doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+			doc = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE().newDocument();
 			// Set the version
 			ProcessingInstruction instruction = doc.createProcessingInstruction(
 					ICProjectDescriptionStorageType.STORAGE_VERSION_NAME, type.version.toString());
@@ -175,7 +175,8 @@ public class CProjectDescriptionStorageManager {
 			XmlUtil.prettyFormat(doc);
 
 			ByteArrayOutputStream stream = new ByteArrayOutputStream();
-			Transformer transformer = TransformerFactory.newInstance().newTransformer();
+			Transformer transformer = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE()
+					.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
 			// Indentation is done with XmlUtil.prettyFormat(doc)
@@ -222,7 +223,7 @@ public class CProjectDescriptionStorageManager {
 
 		InputStream stream = null;
 		try {
-			DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder builder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			stream = getInputStreamForIFile(project, ICProjectDescriptionStorageType.STORAGE_FILE_NAME);
 			if (stream != null) {
 				Document doc = builder.parse(stream);
@@ -352,7 +353,7 @@ public class CProjectDescriptionStorageManager {
 					CProjectDescriptionStorageTypeProxy type = initStorageType(configEl);
 					if (type != null) {
 						if (!m.containsKey(type.id))
-							m.put(type.id, new LinkedList<CProjectDescriptionStorageTypeProxy>());
+							m.put(type.id, new LinkedList<>());
 						m.get(type.id).add(type);
 					}
 				}

programming_language: Java
filename: XmlProjectDescriptionStorage.java
change_type: ModificationType.MODIFY
diff: @@ -26,14 +26,12 @@ import java.lang.ref.SoftReference;
 import java.net.URI;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.FactoryConfigurationError;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
@@ -44,6 +42,7 @@ import org.eclipse.cdt.core.settings.model.ICSettingsStorage;
 import org.eclipse.cdt.core.settings.model.ICStorageElement;
 import org.eclipse.cdt.core.settings.model.extension.ICProjectConverter;
 import org.eclipse.cdt.core.settings.model.util.CDataUtil;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.internal.core.XmlUtil;
 import org.eclipse.cdt.internal.core.envvar.ContributedEnvironment;
 import org.eclipse.cdt.internal.core.language.settings.providers.LanguageSettingsProvidersSerializer;
@@ -543,7 +542,8 @@ public class XmlProjectDescriptionStorage extends AbstractCProjectDescriptionSto
 
 		ByteArrayOutputStream stream = new ByteArrayOutputStream();
 		try {
-			Transformer transformer = TransformerFactory.newInstance().newTransformer();
+			Transformer transformer = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE()
+					.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
 			// Indentation is done with XmlUtil.prettyFormat(doc)
@@ -632,7 +632,7 @@ public class XmlProjectDescriptionStorage extends AbstractCProjectDescriptionSto
 	private ICStorageElement readOldCDTProjectFile(IProject project) throws CoreException {
 		ICStorageElement storage = null;
 		try {
-			DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder builder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document doc = null;
 			InputStream stream = getSharedProperty(project, OLD_CDTPROJECT_FILE_NAME);
 			if (stream != null) {
@@ -669,7 +669,7 @@ public class XmlProjectDescriptionStorage extends AbstractCProjectDescriptionSto
 	protected InternalXmlStorageElement createStorage(IContainer container, String fileName, boolean reCreate,
 			boolean createEmptyIfNotFound, boolean readOnly) throws CoreException {
 		try {
-			DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder builder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document doc = null;
 			Element element = null;
 			InputStream stream = null;
@@ -851,7 +851,7 @@ public class XmlProjectDescriptionStorage extends AbstractCProjectDescriptionSto
 	 */
 	public Element createXmlElementCopy(InternalXmlStorageElement el) throws CoreException {
 		try {
-			DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder builder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document doc = builder.newDocument();
 			Element newXmlEl = null;
 			synchronized (doc) {

programming_language: Java
filename: XmlStorageElement.java
change_type: ModificationType.MODIFY
diff: @@ -22,17 +22,16 @@ import java.util.List;
 import java.util.Set;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.FactoryConfigurationError;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
 import org.eclipse.cdt.core.settings.model.ICSettingsStorage;
 import org.eclipse.cdt.core.settings.model.ICStorageElement;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.internal.core.settings.model.ExceptionFactory;
 import org.eclipse.core.runtime.CoreException;
 import org.w3c.dom.Document;
@@ -462,7 +461,7 @@ public class XmlStorageElement implements ICStorageElement {
 		try {
 			synchronized (fLock) {
 				Element newXmlEl = null;
-				DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+				DocumentBuilder builder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 				Document doc = builder.newDocument();
 				synchronized (doc) {
 					if (fElement.getParentNode().getNodeType() == Node.DOCUMENT_NODE) {
@@ -513,7 +512,8 @@ public class XmlStorageElement implements ICStorageElement {
 		synchronized (fLock) {
 			try {
 				ByteArrayOutputStream stream = new ByteArrayOutputStream();
-				Transformer transformer = TransformerFactory.newInstance().newTransformer();
+				Transformer transformer = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE()
+						.newTransformer();
 				// Indentation is done with XmlUtil.prettyFormat(doc).
 				// For debugging, the prettyFormat may not have been run yet,
 				// so turning this to "yes" may be helpful on occasion.

programming_language: Java
filename: UserDefinedVariableSupplier.java
change_type: ModificationType.MODIFY
diff: @@ -25,13 +25,11 @@ import java.util.Objects;
 import java.util.Set;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
@@ -39,6 +37,7 @@ import org.eclipse.cdt.core.CCorePlugin;
 import org.eclipse.cdt.core.cdtvariables.CdtVariableException;
 import org.eclipse.cdt.core.cdtvariables.ICdtVariable;
 import org.eclipse.cdt.core.settings.model.ICStorageElement;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.internal.core.settings.model.CConfigurationSpecSettings;
 import org.eclipse.cdt.internal.core.settings.model.ExceptionFactory;
 import org.eclipse.cdt.internal.core.settings.model.IInternalCCfgInfo;
@@ -94,7 +93,7 @@ public class UserDefinedVariableSupplier extends CoreMacroSupplierBase {
 	}
 
 	private UserDefinedVariableSupplier() {
-		fListeners = Collections.synchronizedSet(new HashSet<ICdtVariableChangeListener>());
+		fListeners = Collections.synchronizedSet(new HashSet<>());
 	}
 
 	public static UserDefinedVariableSupplier getInstance() {
@@ -532,7 +531,7 @@ public class UserDefinedVariableSupplier extends CoreMacroSupplierBase {
 
 	private StorableCdtVariables loadMacrosFromStream(InputStream stream, boolean readOnly) {
 		try {
-			DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			InputSource inputSource = new InputSource(stream);
 			Document document = parser.parse(inputSource);
 			Element rootElement = document.getDocumentElement();
@@ -554,8 +553,7 @@ public class UserDefinedVariableSupplier extends CoreMacroSupplierBase {
 
 	private ByteArrayOutputStream storeMacrosToStream(StorableCdtVariables macros) throws CoreException {
 		try {
-			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-			DocumentBuilder builder = factory.newDocumentBuilder();
+			DocumentBuilder builder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document document = builder.newDocument();
 
 			Element rootElement = document.createElement(StorableCdtVariables.MACROS_ELEMENT_NAME);
@@ -563,7 +561,8 @@ public class UserDefinedVariableSupplier extends CoreMacroSupplierBase {
 			ICStorageElement storageElement = new XmlStorageElement(rootElement);
 			macros.serialize(storageElement);
 
-			Transformer transformer = TransformerFactory.newInstance().newTransformer();
+			Transformer transformer = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE()
+					.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$

programming_language: Java
filename: SharedDefaults.java
change_type: ModificationType.MODIFY
diff: @@ -20,7 +20,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.Result;
 import javax.xml.transform.TransformerConfigurationException;
@@ -29,6 +28,7 @@ import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -126,7 +126,7 @@ public class SharedDefaults extends HashMap<String, String> {
 			if (length == 0) {
 				parsedXML = createDefaultXMLFormat(parsedXML);
 			}
-			document = DocumentBuilderFactory.newInstance().newDocumentBuilder()
+			document = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE()
 					.parse(parsedXML.toURI().toURL().openStream());
 		} catch (Exception exp) {
 			TemplateEngineUtil.log(exp);
@@ -198,7 +198,7 @@ public class SharedDefaults extends HashMap<String, String> {
 	 */
 	public void updateToBackEndStorage(String updateName, String updateValue) {
 		try {
-			document = DocumentBuilderFactory.newInstance().newDocumentBuilder()
+			document = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE()
 					.parse(parsedXML.toURI().toURL().openStream());
 		} catch (Exception exp) {
 			TemplateEngineUtil.log(exp);
@@ -227,7 +227,7 @@ public class SharedDefaults extends HashMap<String, String> {
 	 */
 	public void deleteBackEndStorage(String[] deleteName) {
 		try {
-			document = DocumentBuilderFactory.newInstance().newDocumentBuilder()
+			document = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE()
 					.parse(parsedXML.toURI().toURL().openStream());
 		} catch (Exception exp) {
 			TemplateEngineUtil.log(exp);
@@ -261,7 +261,7 @@ public class SharedDefaults extends HashMap<String, String> {
 	private File createDefaultXMLFormat(File xmlFile) {
 		Document d;
 		try {
-			d = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+			d = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE().newDocument();
 		} catch (ParserConfigurationException e) {
 			TemplateEngineUtil.log(e);
 			return xmlFile;
@@ -272,7 +272,7 @@ public class SharedDefaults extends HashMap<String, String> {
 		element.setAttribute(TemplateEngineHelper.VALUE, ""); //$NON-NLS-1$
 
 		DOMSource domSource = new DOMSource(d);
-		TransformerFactory transFactory = TransformerFactory.newInstance();
+		TransformerFactory transFactory = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE();
 
 		try {
 			FileOutputStream fos = null;
@@ -303,7 +303,7 @@ public class SharedDefaults extends HashMap<String, String> {
 	private void generateSharedXML(File xmlFile) {
 		Document d;
 		try {
-			d = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+			d = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE().newDocument();
 		} catch (ParserConfigurationException e) {
 			TemplateEngineUtil.log(e);
 			return;
@@ -317,7 +317,7 @@ public class SharedDefaults extends HashMap<String, String> {
 		}
 
 		DOMSource domSource = new DOMSource(d);
-		TransformerFactory transFactory = TransformerFactory.newInstance();
+		TransformerFactory transFactory = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE();
 		Result fileResult = new StreamResult(xmlFile);
 		try {
 			transFactory.newTransformer().transform(domSource, fileResult);

programming_language: Java
filename: TemplateDescriptor.java
change_type: ModificationType.MODIFY
diff: @@ -20,9 +20,9 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.osgi.util.NLS;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -54,7 +54,8 @@ public class TemplateDescriptor {
 	public TemplateDescriptor(URL descriptorURL, String pluginId) throws TemplateInitializationException {
 		String msg = NLS.bind(Messages.TemplateCore_init_failed, descriptorURL.toString());
 		try {
-			this.document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(descriptorURL.openStream());
+			this.document = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE()
+					.parse(descriptorURL.openStream());
 		} catch (ParserConfigurationException pce) {
 			throw new TemplateInitializationException(msg, pce);
 		} catch (IOException ioe) {

programming_language: Java
filename: XmlProcessorFactoryCdt.java
change_type: ModificationType.ADD
diff: @@ -0,0 +1,189 @@
+/*******************************************************************************
+ *  Copyright (c) 2023 Joerg Kubitz and others.
+ *
+ *  This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License 2.0
+ *  which accompanies this distribution, and is available at
+ *  https://www.eclipse.org/legal/epl-2.0/
+ *
+ *  SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************/
+package org.eclipse.cdt.internal.core;
+
+import javax.xml.XMLConstants;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.TransformerFactory;
+
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.SAXNotSupportedException;
+
+/**
+ * XML processing which prohibits external entities.
+ *
+ * Copied from https://github.com/eclipse-jdt/eclipse.jdt.debug/blob/1d59af8a6a37f9cf8143d73d94e4c1c3555363d6/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/XmlProcessorFactoryJdtDebug.java
+ *
+ * @see <a href="https://rules.sonarsource.com/java/RSPEC-2755/">RSPEC-2755</a>
+ */
+public class XmlProcessorFactoryCdt {
+	private XmlProcessorFactoryCdt() {
+		// static Utility only
+	}
+
+	private static final DocumentBuilderFactory DOCUMENT_BUILDER_FACTORY_ERROR_ON_DOCTYPE = createDocumentBuilderFactoryWithErrorOnDOCTYPE();
+	private static final DocumentBuilderFactory DOCUMENT_BUILDER_FACTORY_IGNORING_DOCTYPE = createDocumentBuilderFactoryIgnoringDOCTYPE();
+	private static final SAXParserFactory SAX_FACTORY_ERROR_ON_DOCTYPE = createSAXFactoryWithErrorOnDOCTYPE(false);
+	private static final SAXParserFactory SAX_FACTORY_ERROR_ON_DOCTYPE_NS = createSAXFactoryWithErrorOnDOCTYPE(true);
+	private static final SAXParserFactory SAX_FACTORY_IGNORING_DOCTYPE = createSAXFactoryIgnoringDOCTYPE();
+
+	/**
+	 * Creates TransformerFactory which throws TransformerException when detecting external entities.
+	 *
+	 * @return javax.xml.transform.TransformerFactory
+	 */
+	public static TransformerFactory createTransformerFactoryWithErrorOnDOCTYPE() {
+		TransformerFactory factory = TransformerFactory.newInstance();
+		// prohibit the use of all protocols by external entities:
+		factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); //$NON-NLS-1$
+		factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, ""); //$NON-NLS-1$
+		return factory;
+	}
+
+	/**
+	 * Creates DocumentBuilderFactory which throws SAXParseException when detecting external entities. It's magnitudes faster to call
+	 * {@link #createDocumentBuilderWithErrorOnDOCTYPE()}.
+	 *
+	 * @return javax.xml.parsers.DocumentBuilderFactory
+	 */
+	public static synchronized DocumentBuilderFactory createDocumentBuilderFactoryWithErrorOnDOCTYPE() {
+		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+		// completely disable DOCTYPE declaration:
+		try {
+			factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); //$NON-NLS-1$
+		} catch (ParserConfigurationException e) {
+			throw new RuntimeException(e.getMessage(), e);
+		}
+		return factory;
+	}
+
+	/**
+	 * Creates DocumentBuilderFactory which ignores external entities. It's magnitudes faster to call {@link #createDocumentBuilderIgnoringDOCTYPE()}.
+	 *
+	 * @return javax.xml.parsers.DocumentBuilderFactory
+	 */
+	public static synchronized DocumentBuilderFactory createDocumentBuilderFactoryIgnoringDOCTYPE() {
+		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+		try {
+			// completely disable external entities declarations:
+			factory.setFeature("http://xml.org/sax/features/external-general-entities", false); //$NON-NLS-1$
+			factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false); //$NON-NLS-1$
+		} catch (ParserConfigurationException e) {
+			throw new RuntimeException(e.getMessage(), e);
+		}
+		return factory;
+	}
+
+	/**
+	 * Creates DocumentBuilder which throws SAXParseException when detecting external entities. The builder is not thread safe.
+	 *
+	 * @return javax.xml.parsers.DocumentBuilder
+	 * @throws ParserConfigurationException
+	 */
+	public static DocumentBuilder createDocumentBuilderWithErrorOnDOCTYPE() throws ParserConfigurationException {
+		return DOCUMENT_BUILDER_FACTORY_ERROR_ON_DOCTYPE.newDocumentBuilder();
+	}
+
+	/**
+	 * Creates DocumentBuilder which ignores external entities. The builder is not thread safe.
+	 *
+	 * @return javax.xml.parsers.DocumentBuilder
+	 * @throws ParserConfigurationException
+	 */
+	public static DocumentBuilder createDocumentBuilderIgnoringDOCTYPE() throws ParserConfigurationException {
+		return DOCUMENT_BUILDER_FACTORY_IGNORING_DOCTYPE.newDocumentBuilder();
+	}
+
+	/**
+	 * Creates DocumentBuilderFactory which throws SAXParseException when detecting external entities.
+	 *
+	 * @return javax.xml.parsers.DocumentBuilderFactory
+	 */
+	public static SAXParserFactory createSAXFactoryWithErrorOnDOCTYPE() {
+		SAXParserFactory f = SAXParserFactory.newInstance();
+		try {
+			// force org.xml.sax.SAXParseException for any DOCTYPE:
+			f.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); //$NON-NLS-1$
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return f;
+	}
+
+	private static synchronized SAXParserFactory createSAXFactoryWithErrorOnDOCTYPE(boolean awareness) {
+		SAXParserFactory f = SAXParserFactory.newInstance();
+		f.setNamespaceAware(awareness);
+		try {
+			// force org.xml.sax.SAXParseException for any DOCTYPE:
+			f.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); //$NON-NLS-1$
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return f;
+	}
+
+	private static synchronized SAXParserFactory createSAXFactoryIgnoringDOCTYPE() {
+		SAXParserFactory f = SAXParserFactory.newInstance();
+		try {
+			// ignore DOCTYPE:
+			f.setFeature("http://xml.org/sax/features/external-general-entities", false); //$NON-NLS-1$
+			f.setFeature("http://xml.org/sax/features/external-parameter-entities", false); //$NON-NLS-1$
+			f.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); //$NON-NLS-1$
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return f;
+	}
+
+	/**
+	 * Creates SAXParser which throws SAXParseException when detecting external entities.
+	 *
+	 * @return javax.xml.parsers.SAXParser
+	 */
+
+	public static SAXParser createSAXParserWithErrorOnDOCTYPE() throws ParserConfigurationException, SAXException {
+		return createSAXParserWithErrorOnDOCTYPE(false);
+	}
+
+	/**
+	 * Creates SAXParser which throws SAXParseException when detecting external entities.
+	 *
+	 * @param namespaceAware
+	 *            parameter for SAXParserFactory
+	 *
+	 * @return javax.xml.parsers.SAXParser
+	 */
+	public static SAXParser createSAXParserWithErrorOnDOCTYPE(boolean namespaceAware)
+			throws ParserConfigurationException, SAXException {
+		if (namespaceAware) {
+			return SAX_FACTORY_ERROR_ON_DOCTYPE_NS.newSAXParser();
+		}
+		return SAX_FACTORY_ERROR_ON_DOCTYPE.newSAXParser();
+	}
+
+	/**
+	 * Creates SAXParser which does not throw Exception when detecting external entities but ignores them.
+	 *
+	 * @return javax.xml.parsers.SAXParser
+	 */
+	public static SAXParser createSAXParserIgnoringDOCTYPE()
+			throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException, SAXException {
+		SAXParser parser = SAX_FACTORY_IGNORING_DOCTYPE.newSAXParser();
+		parser.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, ""); //$NON-NLS-1$
+		parser.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, ""); //$NON-NLS-1$
+		return parser;
+	}
+}
\ No newline at end of file

programming_language: Java
filename: XmlUtil.java
change_type: ModificationType.MODIFY
diff: @@ -25,12 +25,10 @@ import java.net.URI;
 import java.util.Arrays;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
@@ -63,7 +61,7 @@ public class XmlUtil {
 	 * @throws ParserConfigurationException in case of a problem retrieving {@link DocumentBuilder}.
 	 */
 	public static Document newDocument() throws ParserConfigurationException {
-		DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+		DocumentBuilder builder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 		return builder.newDocument();
 	}
 
@@ -227,7 +225,7 @@ public class XmlUtil {
 	 */
 	private static Document loadXml(InputStream xmlStream) throws CoreException {
 		try {
-			DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder builder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			return builder.parse(xmlStream);
 		} catch (Exception e) {
 			throw new CoreException(CCorePlugin.createStatus(Messages.XmlUtil_InternalErrorLoading, e));
@@ -370,7 +368,8 @@ public class XmlUtil {
 	private static byte[] toByteArray(Document doc) throws CoreException {
 		try {
 			ByteArrayOutputStream stream = new ByteArrayOutputStream();
-			Transformer transformer = TransformerFactory.newInstance().newTransformer();
+			Transformer transformer = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE()
+					.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.ENCODING, ENCODING_UTF_8);
 			// Indentation is done with XmlUtil.prettyFormat(doc).

programming_language: Java
filename: StorableEnvironmentLoader.java
change_type: ModificationType.MODIFY
diff: @@ -20,18 +20,17 @@ import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
 import org.eclipse.cdt.core.CCorePlugin;
 import org.eclipse.cdt.core.settings.model.ICStorageElement;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.internal.core.settings.model.xml.XmlStorageElement;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
@@ -148,7 +147,7 @@ public abstract class StorableEnvironmentLoader {
 		if (env == null)
 			return null;
 		try {
-			DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			InputSource inputSource = new InputSource(new ByteArrayInputStream(env.getBytes()));
 			Document document = parser.parse(inputSource);
 			Element el = document.getDocumentElement();
@@ -170,8 +169,7 @@ public abstract class StorableEnvironmentLoader {
 
 	private ByteArrayOutputStream storeEnvironmentToStream(StorableEnvironment env) throws CoreException {
 		try {
-			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-			DocumentBuilder builder = factory.newDocumentBuilder();
+			DocumentBuilder builder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document document = builder.newDocument();
 
 			Element el = document.createElement(StorableEnvironment.ENVIRONMENT_ELEMENT_NAME);
@@ -179,7 +177,8 @@ public abstract class StorableEnvironmentLoader {
 			XmlStorageElement rootElement = new XmlStorageElement(el);
 			env.serialize(rootElement);
 
-			Transformer transformer = TransformerFactory.newInstance().newTransformer();
+			Transformer transformer = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE()
+					.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.cdt.ui.tests; singleton:=true
-Bundle-Version: 5.5.300.qualifier
+Bundle-Version: 5.5.400.qualifier
 Bundle-Activator: org.eclipse.cdt.ui.testplugin.CTestPlugin
 Bundle-Localization: plugin
 Export-Package: org.eclipse.cdt.ui.testplugin,
@@ -26,7 +26,7 @@ Require-Bundle: org.eclipse.jface.text,
  org.eclipse.ui.views,
  org.eclipse.ui.workbench.texteditor,
  org.junit,
- org.eclipse.cdt.core,
+ org.eclipse.cdt.core;bundle-version="8.3.0",
  org.eclipse.cdt.core.tests,
  org.eclipse.help,
  org.eclipse.core.runtime,

programming_language: CoffeeScript
filename: pom.xml
change_type: ModificationType.MODIFY
diff: @@ -21,7 +21,7 @@
 		<relativePath>../../pom.xml</relativePath>
 	</parent>
 
-	<version>5.5.300-SNAPSHOT</version>
+	<version>5.5.400-SNAPSHOT</version>
 	<artifactId>org.eclipse.cdt.ui.tests</artifactId>
 	<packaging>eclipse-test-plugin</packaging>
 

programming_language: CoffeeScript
filename: TestSharedDefaults.java
change_type: ModificationType.MODIFY
diff: @@ -16,12 +16,11 @@ package org.eclipse.cdt.ui.tests.templateengine;
 import java.io.File;
 import java.util.List;
 
-import javax.xml.parsers.DocumentBuilderFactory;
-
 import org.eclipse.cdt.core.templateengine.SharedDefaults;
 import org.eclipse.cdt.core.templateengine.TemplateEngine;
 import org.eclipse.cdt.core.templateengine.TemplateEngineHelper;
 import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -59,7 +58,7 @@ public class TestSharedDefaults extends BaseTestCase {
 	private String getValueFromBackEndStorate(String key) throws Exception {
 		File parsedXML = TemplateEngineHelper.getSharedDefaultLocation("shareddefaults.xml");
 
-		Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder()
+		Document document = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE()
 				.parse(parsedXML.toURI().toURL().openStream());
 
 		List<Element> sharedElementList = TemplateEngine.getChildrenOfElement(document.getDocumentElement());

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -104,7 +104,7 @@ Export-Package: org.eclipse.cdt.internal.corext;x-internal:=true,
  org.eclipse.cdt.ui.wizards.conversion,
  org.eclipse.cdt.utils.ui.controls
 Import-Package: org.apache.commons.io;version="[2.8.0,3.0.0)"
-Require-Bundle: org.eclipse.cdt.core;bundle-version="[8.0.0,9.0.0)",
+Require-Bundle: org.eclipse.cdt.core;bundle-version="[8.3.0,9.0.0)",
  org.eclipse.compare;bundle-version="[3.8.500,4.0.0)",
  org.eclipse.core.expressions;bundle-version="[3.8.200,4.0.0)",
  org.eclipse.core.filesystem;bundle-version="[1.9.500,2.0.0)",

programming_language: Java
filename: CHelpProviderManager.java
change_type: ModificationType.MODIFY
diff: @@ -19,17 +19,16 @@ import java.io.FileWriter;
 import java.io.IOException;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
 import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.internal.ui.text.CHelpBookDescriptor;
 import org.eclipse.cdt.internal.ui.text.CHelpSettings;
 import org.eclipse.cdt.ui.CUIPlugin;
@@ -104,7 +103,7 @@ public class CHelpProviderManager {
 
 		if (file.isFile()) {
 			try {
-				DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+				DocumentBuilder builder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 				Document doc = builder.parse(file);
 				NodeList nodes = doc.getElementsByTagName(ELEMENT_ROOT);
 
@@ -187,7 +186,7 @@ public class CHelpProviderManager {
 		File file = getSettingsFile();
 
 		try {
-			DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder builder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document doc;
 			Element rootElement = null;
 
@@ -210,7 +209,8 @@ public class CHelpProviderManager {
 
 			FileWriter writer = new FileWriter(file);
 
-			Transformer transformer = TransformerFactory.newInstance().newTransformer();
+			Transformer transformer = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE()
+					.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$

programming_language: Java
filename: CHelpProvider.java
change_type: ModificationType.MODIFY
diff: @@ -23,9 +23,9 @@ import java.util.ArrayList;
 import java.util.List;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
 
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
+import org.eclipse.cdt.ui.CUIPlugin;
 import org.eclipse.cdt.ui.ICHelpBook;
 import org.eclipse.cdt.ui.ICHelpProvider;
 import org.eclipse.cdt.ui.ICHelpResourceDescriptor;
@@ -42,7 +42,6 @@ import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
 
 public class CHelpProvider implements ICHelpProvider {
 
@@ -175,7 +174,7 @@ public class CHelpProvider implements ICHelpProvider {
 			InputStream stream = new FileInputStream(fname);
 			BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
 			InputSource src = new InputSource(reader);
-			DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder builder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			doc = builder.parse(src);
 			Element e = doc.getDocumentElement();
 			if (NODE_HEAD.equals(e.getNodeName())) {
@@ -189,9 +188,8 @@ public class CHelpProvider implements ICHelpProvider {
 					}
 				}
 			}
-		} catch (ParserConfigurationException e) {
-		} catch (SAXException e) {
-		} catch (IOException e) {
+		} catch (Exception e) {
+			CUIPlugin.log("Failed to load helpbook in " + pluginId, e); //$NON-NLS-1$
 		}
 	}
 }

programming_language: Java
filename: ProfileStore.java
change_type: ModificationType.MODIFY
diff: @@ -32,17 +32,15 @@ import java.util.List;
 import java.util.Map;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.internal.ui.CUIException;
 import org.eclipse.cdt.internal.ui.CUIStatus;
 import org.eclipse.cdt.internal.ui.preferences.formatter.ProfileManager.CustomProfile;
@@ -235,8 +233,7 @@ public class ProfileStore {
 	protected static List<Profile> readProfilesFromStream(InputSource inputSource) throws CoreException {
 		final ProfileDefaultHandler handler = new ProfileDefaultHandler();
 		try {
-			final SAXParserFactory factory = SAXParserFactory.newInstance();
-			final SAXParser parser = factory.newSAXParser();
+			final SAXParser parser = XmlProcessorFactoryCdt.createSAXParserWithErrorOnDOCTYPE();
 			parser.parse(inputSource, handler);
 		} catch (SAXException e) {
 			throw createException(e, FormatterMessages.CodingStyleConfigurationBlock_error_reading_xml_message);
@@ -282,8 +279,7 @@ public class ProfileStore {
 	private static void writeProfilesToStream(Collection<Profile> profiles, OutputStream stream, String encoding,
 			IProfileVersioner profileVersioner) throws CoreException {
 		try {
-			final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-			final DocumentBuilder builder = factory.newDocumentBuilder();
+			final DocumentBuilder builder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			final Document document = builder.newDocument();
 
 			final Element rootElement = document.createElement(XML_NODE_ROOT);
@@ -299,7 +295,8 @@ public class ProfileStore {
 				}
 			}
 
-			Transformer transformer = TransformerFactory.newInstance().newTransformer();
+			Transformer transformer = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE()
+					.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.ENCODING, encoding);
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$

programming_language: Java
filename: ProjectSettingsExportStrategy.java
change_type: ModificationType.MODIFY
diff: @@ -21,7 +21,6 @@ import java.util.List;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.sax.SAXTransformerFactory;
 import javax.xml.transform.sax.TransformerHandler;
 import javax.xml.transform.stream.StreamResult;
@@ -29,6 +28,7 @@ import javax.xml.transform.stream.StreamResult;
 import org.eclipse.cdt.core.resources.ResourcesUtil;
 import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
 import org.eclipse.cdt.core.settings.model.ICFolderDescription;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.ui.CUIPlugin;
 import org.eclipse.core.filesystem.URIUtil;
 import org.eclipse.core.runtime.IPath;
@@ -93,7 +93,8 @@ public class ProjectSettingsExportStrategy implements IProjectSettingsWizardPage
 	 */
 	@Override
 	public boolean finish(IProjectSettingsWizardPage page) {
-		SAXTransformerFactory factory = (SAXTransformerFactory) TransformerFactory.newInstance();
+		SAXTransformerFactory factory = (SAXTransformerFactory) XmlProcessorFactoryCdt
+				.createTransformerFactoryWithErrorOnDOCTYPE();
 		TransformerHandler handler = null;
 		try {
 			handler = factory.newTransformerHandler();

programming_language: Java
filename: ProjectSettingsImportStrategy.java
change_type: ModificationType.MODIFY
diff: @@ -29,6 +29,7 @@ import org.eclipse.cdt.core.model.CoreModel;
 import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
 import org.eclipse.cdt.core.settings.model.ICFolderDescription;
 import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.ui.CUIPlugin;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.CoreException;
@@ -230,7 +231,7 @@ public class ProjectSettingsImportStrategy implements IProjectSettingsWizardPage
 	 * will do its own validation programatically.
 	 */
 	private static Document parse(InputStream in) throws SettingsImportExportException {
-		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+		DocumentBuilderFactory factory = XmlProcessorFactoryCdt.createDocumentBuilderFactoryWithErrorOnDOCTYPE();
 		factory.setValidating(false);
 		factory.setNamespaceAware(false);
 		factory.setIgnoringComments(true);

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.cdt.debug.core; singleton:=true
-Bundle-Version: 8.8.100.qualifier
+Bundle-Version: 8.8.200.qualifier
 Bundle-Activator: org.eclipse.cdt.debug.core.CDebugCorePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -38,7 +38,7 @@ Export-Package: org.eclipse.cdt.debug.core,
    org.eclipse.cdt.dsf.ui,
    org.eclipse.cdt.tests.dsf.gdb",
  org.eclipse.cdt.debug.internal.core.srcfinder;x-internal:=true
-Require-Bundle: org.eclipse.cdt.core;bundle-version="[8.0.0,9.0.0)",
+Require-Bundle: org.eclipse.cdt.core;bundle-version="[8.3.0,9.0.0)",
  org.eclipse.core.filesystem;bundle-version="1.2.0",
  org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",

programming_language: Java
filename: CDebugUtils.java
change_type: ModificationType.MODIFY
diff: @@ -46,6 +46,7 @@ import org.eclipse.cdt.debug.core.model.ICFunctionBreakpoint;
 import org.eclipse.cdt.debug.core.model.ICLineBreakpoint;
 import org.eclipse.cdt.debug.core.model.ICWatchpoint;
 import org.eclipse.cdt.debug.core.model.ICWatchpoint2;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IProject;
@@ -227,7 +228,7 @@ public class CDebugUtils {
 	 */
 	public static String serializeDocument(Document doc, boolean indent) throws IOException, TransformerException {
 		ByteArrayOutputStream s = new ByteArrayOutputStream();
-		TransformerFactory factory = TransformerFactory.newInstance();
+		TransformerFactory factory = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE();
 		Transformer transformer = factory.newTransformer();
 		transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 		transformer.setOutputProperty(OutputKeys.INDENT, indent ? "yes" : "no"); //$NON-NLS-1$ //$NON-NLS-2$

programming_language: Java
filename: BreakpointActionManager.java
change_type: ModificationType.MODIFY
diff: @@ -18,7 +18,6 @@ import java.io.StringReader;
 import java.util.ArrayList;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerFactory;
@@ -26,6 +25,7 @@ import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
 import org.eclipse.cdt.debug.core.CDebugCorePlugin;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
@@ -192,7 +192,7 @@ public class BreakpointActionManager {
 		Element root = null;
 		DocumentBuilder parser;
 		try {
-			parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			parser.setErrorHandler(new DefaultHandler());
 			root = parser.parse(new InputSource(new StringReader(actionData))).getDocumentElement();
 
@@ -246,10 +246,8 @@ public class BreakpointActionManager {
 	public void saveActionData() {
 		String actionData = ""; //$NON-NLS-1$
 
-		DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
-		DocumentBuilder docBuilder = null;
 		try {
-			docBuilder = dfactory.newDocumentBuilder();
+			DocumentBuilder docBuilder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document doc = docBuilder.newDocument();
 
 			Element rootElement = doc.createElement("breakpointActionData"); //$NON-NLS-1$
@@ -265,7 +263,7 @@ public class BreakpointActionManager {
 
 			ByteArrayOutputStream s = new ByteArrayOutputStream();
 
-			TransformerFactory factory = TransformerFactory.newInstance();
+			TransformerFactory factory = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE();
 			Transformer transformer = factory.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$

programming_language: Java
filename: CDirectorySourceLocation.java
change_type: ModificationType.MODIFY
diff: @@ -23,7 +23,6 @@ import java.util.LinkedList;
 import java.util.List;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.TransformerException;
 
@@ -32,6 +31,7 @@ import org.eclipse.cdt.debug.core.CDebugCorePlugin;
 import org.eclipse.cdt.debug.core.CDebugUtils;
 import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocation;
 import org.eclipse.cdt.debug.core.sourcelookup.IDirectorySourceLocation;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.internal.core.resources.ResourceLookup;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IStorage;
@@ -279,7 +279,7 @@ public class CDirectorySourceLocation implements IDirectorySourceLocation {
 		Document document = null;
 		Throwable ex = null;
 		try {
-			document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+			document = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE().newDocument();
 			Element node = document.createElement(ELEMENT_NAME);
 			document.appendChild(node);
 			node.setAttribute(ATTR_DIRECTORY, getDirectory().toOSString());
@@ -307,7 +307,7 @@ public class CDirectorySourceLocation implements IDirectorySourceLocation {
 		Exception ex = null;
 		try {
 			Element root = null;
-			DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			StringReader reader = new StringReader(memento);
 			InputSource source = new InputSource(reader);
 			root = parser.parse(source).getDocumentElement();

programming_language: Java
filename: CProjectSourceLocation.java
change_type: ModificationType.MODIFY
diff: @@ -21,7 +21,6 @@ import java.util.HashSet;
 import java.util.LinkedList;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.TransformerException;
 
@@ -29,6 +28,7 @@ import org.eclipse.cdt.debug.core.CDebugCorePlugin;
 import org.eclipse.cdt.debug.core.CDebugUtils;
 import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocation;
 import org.eclipse.cdt.debug.core.sourcelookup.IProjectSourceLocation;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.internal.core.resources.ResourceLookup;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
@@ -208,7 +208,7 @@ public class CProjectSourceLocation implements IProjectSourceLocation {
 		Document document = null;
 		Throwable ex = null;
 		try {
-			document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+			document = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE().newDocument();
 			Element node = document.createElement(ELEMENT_NAME);
 			document.appendChild(node);
 			node.setAttribute(ATTR_PROJECT, getProject().getName());
@@ -234,7 +234,7 @@ public class CProjectSourceLocation implements IProjectSourceLocation {
 		Exception ex = null;
 		try {
 			Element root = null;
-			DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			StringReader reader = new StringReader(memento);
 			InputSource source = new InputSource(reader);
 			root = parser.parse(source).getDocumentElement();

programming_language: Java
filename: CSourceLocator.java
change_type: ModificationType.MODIFY
diff: @@ -24,7 +24,6 @@ import java.util.LinkedList;
 import java.util.List;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.TransformerException;
 
@@ -35,6 +34,7 @@ import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocation;
 import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator;
 import org.eclipse.cdt.debug.core.sourcelookup.IProjectSourceLocation;
 import org.eclipse.cdt.debug.core.sourcelookup.SourceLookupFactory;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
@@ -239,7 +239,7 @@ public class CSourceLocator implements ICSourceLocator, IPersistableSourceLocato
 		Document document = null;
 		Throwable ex = null;
 		try {
-			document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+			document = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE().newDocument();
 			Element node = document.createElement(SOURCE_LOCATOR_NAME);
 			document.appendChild(node);
 			ICSourceLocation[] locations = getSourceLocations();
@@ -269,7 +269,7 @@ public class CSourceLocator implements ICSourceLocator, IPersistableSourceLocato
 		Exception ex = null;
 		try {
 			Element root = null;
-			DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			StringReader reader = new StringReader(memento);
 			InputSource source = new InputSource(reader);
 			root = parser.parse(source).getDocumentElement();

programming_language: Java
filename: SourceUtils.java
change_type: ModificationType.MODIFY
diff: @@ -25,7 +25,6 @@ import java.util.List;
 import java.util.Set;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.TransformerException;
 
@@ -41,6 +40,7 @@ import org.eclipse.cdt.debug.core.sourcelookup.IDirectorySourceLocation;
 import org.eclipse.cdt.debug.core.sourcelookup.IMappingSourceContainer;
 import org.eclipse.cdt.debug.core.sourcelookup.IProjectSourceLocation;
 import org.eclipse.cdt.debug.core.sourcelookup.MappingSourceContainer;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.internal.core.resources.ResourceLookup;
 import org.eclipse.core.filesystem.URIUtil;
 import org.eclipse.core.resources.IFile;
@@ -73,7 +73,7 @@ public class SourceUtils {
 		Document document = null;
 		Throwable ex = null;
 		try {
-			document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+			document = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE().newDocument();
 			Element element = document.createElement(NAME_COMMON_SOURCE_LOCATIONS);
 			document.appendChild(element);
 			saveSourceLocations(document, element, locations);
@@ -108,7 +108,7 @@ public class SourceUtils {
 		ICSourceLocation[] result = new ICSourceLocation[0];
 		if (!isEmpty(memento)) {
 			try {
-				DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+				DocumentBuilder parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 				StringReader reader = new StringReader(memento);
 				InputSource source = new InputSource(reader);
 				Element root = parser.parse(source).getDocumentElement();

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -51,7 +51,7 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.16.0,4.0.0)",
  org.eclipse.debug.core;bundle-version="[3.7.0,4.0.0)",
  org.eclipse.cdt.debug.core;bundle-version="[7.0.0,9.0.0)",
  org.eclipse.cdt.ui;bundle-version="[8.0.0,9.0.0)",
- org.eclipse.cdt.core;bundle-version="[8.0.0,9.0.0)",
+ org.eclipse.cdt.core;bundle-version="[8.3.0,9.0.0)",
  org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.ui.console;bundle-version="[3.1.100,4.0.0)",
  org.eclipse.ui.views;bundle-version="[3.2.0,4.0.0)",

programming_language: Java
filename: ExternalToolAction.java
change_type: ModificationType.MODIFY
diff: @@ -18,7 +18,6 @@ import java.io.StringReader;
 import java.text.MessageFormat;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerFactory;
@@ -28,6 +27,7 @@ import javax.xml.transform.stream.StreamResult;
 import org.eclipse.cdt.debug.core.CDIDebugModel;
 import org.eclipse.cdt.debug.core.breakpointactions.AbstractBreakpointAction;
 import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -132,10 +132,8 @@ public class ExternalToolAction extends AbstractBreakpointAction {
 	public String getMemento() {
 		String executeData = ""; //$NON-NLS-1$
 		if (externalToolName != null) {
-			DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
-			DocumentBuilder docBuilder = null;
 			try {
-				docBuilder = dfactory.newDocumentBuilder();
+				DocumentBuilder docBuilder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 				Document doc = docBuilder.newDocument();
 
 				Element rootElement = doc.createElement("launchConfigName"); //$NON-NLS-1$
@@ -145,7 +143,7 @@ public class ExternalToolAction extends AbstractBreakpointAction {
 
 				ByteArrayOutputStream s = new ByteArrayOutputStream();
 
-				TransformerFactory factory = TransformerFactory.newInstance();
+				TransformerFactory factory = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE();
 				Transformer transformer = factory.newTransformer();
 				transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 				transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
@@ -179,7 +177,7 @@ public class ExternalToolAction extends AbstractBreakpointAction {
 		Element root = null;
 		DocumentBuilder parser;
 		try {
-			parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			parser.setErrorHandler(new DefaultHandler());
 			root = parser.parse(new InputSource(new StringReader(data))).getDocumentElement();
 			String value = root.getAttribute("configName"); //$NON-NLS-1$

programming_language: Java
filename: LogAction.java
change_type: ModificationType.MODIFY
diff: @@ -18,7 +18,6 @@ import java.io.StringReader;
 import java.text.MessageFormat;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerFactory;
@@ -29,6 +28,7 @@ import org.eclipse.cdt.debug.core.CDIDebugModel;
 import org.eclipse.cdt.debug.core.breakpointactions.AbstractBreakpointAction;
 import org.eclipse.cdt.debug.core.breakpointactions.ILogActionEnabler;
 import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -117,10 +117,8 @@ public class LogAction extends AbstractBreakpointAction {
 	public String getMemento() {
 		String logData = ""; //$NON-NLS-1$
 
-		DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
-		DocumentBuilder docBuilder = null;
 		try {
-			docBuilder = dfactory.newDocumentBuilder();
+			DocumentBuilder docBuilder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document doc = docBuilder.newDocument();
 
 			Element rootElement = doc.createElement("logData"); //$NON-NLS-1$
@@ -131,7 +129,7 @@ public class LogAction extends AbstractBreakpointAction {
 
 			ByteArrayOutputStream s = new ByteArrayOutputStream();
 
-			TransformerFactory factory = TransformerFactory.newInstance();
+			TransformerFactory factory = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE();
 			Transformer transformer = factory.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
@@ -174,7 +172,7 @@ public class LogAction extends AbstractBreakpointAction {
 		Element root = null;
 		DocumentBuilder parser;
 		try {
-			parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			parser.setErrorHandler(new DefaultHandler());
 			root = parser.parse(new InputSource(new StringReader(data))).getDocumentElement();
 			String value = root.getAttribute("message"); //$NON-NLS-1$

programming_language: Java
filename: ResumeAction.java
change_type: ModificationType.MODIFY
diff: @@ -18,7 +18,6 @@ import java.io.StringReader;
 import java.text.MessageFormat;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerFactory;
@@ -31,6 +30,7 @@ import org.eclipse.cdt.debug.core.breakpointactions.IResumeActionEnabler;
 import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants;
 import org.eclipse.cdt.debug.internal.ui.IInternalCDebugUIConstants;
 import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -113,10 +113,8 @@ public class ResumeAction extends AbstractBreakpointAction {
 	public String getMemento() {
 		String resumeData = ""; //$NON-NLS-1$
 
-		DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
-		DocumentBuilder docBuilder = null;
 		try {
-			docBuilder = dfactory.newDocumentBuilder();
+			DocumentBuilder docBuilder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document doc = docBuilder.newDocument();
 
 			Element rootElement = doc.createElement("resumeData"); //$NON-NLS-1$
@@ -126,7 +124,7 @@ public class ResumeAction extends AbstractBreakpointAction {
 
 			ByteArrayOutputStream s = new ByteArrayOutputStream();
 
-			TransformerFactory factory = TransformerFactory.newInstance();
+			TransformerFactory factory = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE();
 			Transformer transformer = factory.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
@@ -161,7 +159,7 @@ public class ResumeAction extends AbstractBreakpointAction {
 		Element root = null;
 		DocumentBuilder parser;
 		try {
-			parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			parser.setErrorHandler(new DefaultHandler());
 			root = parser.parse(new InputSource(new StringReader(data))).getDocumentElement();
 			String value = root.getAttribute("pauseTime"); //$NON-NLS-1$

programming_language: Java
filename: ReverseDebugAction.java
change_type: ModificationType.MODIFY
diff: @@ -17,7 +17,6 @@ import java.io.ByteArrayOutputStream;
 import java.io.StringReader;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerFactory;
@@ -30,6 +29,7 @@ import org.eclipse.cdt.debug.core.breakpointactions.IReverseDebugEnabler;
 import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants;
 import org.eclipse.cdt.debug.internal.ui.IInternalCDebugUIConstants;
 import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -123,10 +123,8 @@ public class ReverseDebugAction extends AbstractBreakpointAction {
 	public String getMemento() {
 		String reverseDebugData = ""; //$NON-NLS-1$
 
-		DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
-		DocumentBuilder docBuilder = null;
 		try {
-			docBuilder = dfactory.newDocumentBuilder();
+			DocumentBuilder docBuilder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document doc = docBuilder.newDocument();
 
 			Element rootElement = doc.createElement("reverseDebugData"); //$NON-NLS-1$
@@ -136,7 +134,7 @@ public class ReverseDebugAction extends AbstractBreakpointAction {
 
 			ByteArrayOutputStream s = new ByteArrayOutputStream();
 
-			TransformerFactory factory = TransformerFactory.newInstance();
+			TransformerFactory factory = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE();
 			Transformer transformer = factory.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
@@ -159,7 +157,7 @@ public class ReverseDebugAction extends AbstractBreakpointAction {
 		Element root = null;
 		DocumentBuilder parser;
 		try {
-			parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			parser.setErrorHandler(new DefaultHandler());
 			root = parser.parse(new InputSource(new StringReader(data))).getDocumentElement();
 			String value = root.getAttribute("operation"); //$NON-NLS-1$

programming_language: Java
filename: SoundAction.java
change_type: ModificationType.MODIFY
diff: @@ -27,7 +27,6 @@ import javax.sound.sampled.LineUnavailableException;
 import javax.sound.sampled.SourceDataLine;
 import javax.sound.sampled.UnsupportedAudioFileException;
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerFactory;
@@ -37,6 +36,7 @@ import javax.xml.transform.stream.StreamResult;
 import org.eclipse.cdt.debug.core.CDIDebugModel;
 import org.eclipse.cdt.debug.core.breakpointactions.AbstractBreakpointAction;
 import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -137,10 +137,8 @@ public class SoundAction extends AbstractBreakpointAction {
 	public String getMemento() {
 		String soundData = ""; //$NON-NLS-1$
 		if (soundFile != null) {
-			DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
-			DocumentBuilder docBuilder = null;
 			try {
-				docBuilder = dfactory.newDocumentBuilder();
+				DocumentBuilder docBuilder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 				Document doc = docBuilder.newDocument();
 
 				Element rootElement = doc.createElement("soundData"); //$NON-NLS-1$
@@ -150,7 +148,7 @@ public class SoundAction extends AbstractBreakpointAction {
 
 				ByteArrayOutputStream s = new ByteArrayOutputStream();
 
-				TransformerFactory factory = TransformerFactory.newInstance();
+				TransformerFactory factory = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE();
 				Transformer transformer = factory.newTransformer();
 				transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 				transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
@@ -170,10 +168,15 @@ public class SoundAction extends AbstractBreakpointAction {
 
 	@Override
 	public void initializeFromMemento(String data) {
+		if (data == null || data.isBlank()) {
+			// An empty string will cause a sax parser error below
+			return;
+		}
+
 		Element root = null;
 		DocumentBuilder parser;
 		try {
-			parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			parser.setErrorHandler(new DefaultHandler());
 			root = parser.parse(new InputSource(new StringReader(data))).getDocumentElement();
 			String value = root.getAttribute("file"); //$NON-NLS-1$

programming_language: Java
filename: SoundActionPage.java
change_type: ModificationType.MODIFY
diff: @@ -20,7 +20,6 @@ import java.util.ArrayList;
 import java.util.Iterator;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerFactory;
@@ -29,6 +28,7 @@ import javax.xml.transform.stream.StreamResult;
 
 import org.eclipse.cdt.debug.core.breakpointactions.IBreakpointAction;
 import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.PlatformObject;
 import org.eclipse.swt.widgets.Composite;
@@ -161,7 +161,7 @@ public class SoundActionPage extends PlatformObject implements IBreakpointAction
 		Element root = null;
 		DocumentBuilder parser;
 		try {
-			parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			parser.setErrorHandler(new DefaultHandler());
 			root = parser.parse(new InputSource(new StringReader(recentSoundData))).getDocumentElement();
 
@@ -198,10 +198,8 @@ public class SoundActionPage extends PlatformObject implements IBreakpointAction
 	public void saveRecentSounds() {
 		String recentSoundData = ""; //$NON-NLS-1$
 
-		DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
-		DocumentBuilder docBuilder = null;
 		try {
-			docBuilder = dfactory.newDocumentBuilder();
+			DocumentBuilder docBuilder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document doc = docBuilder.newDocument();
 
 			Element rootElement = doc.createElement("recentSounds"); //$NON-NLS-1$
@@ -218,7 +216,7 @@ public class SoundActionPage extends PlatformObject implements IBreakpointAction
 
 			ByteArrayOutputStream s = new ByteArrayOutputStream();
 
-			TransformerFactory factory = TransformerFactory.newInstance();
+			TransformerFactory factory = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE();
 			Transformer transformer = factory.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$

programming_language: Java
filename: OldDefaultSourceLocator.java
change_type: ModificationType.MODIFY
diff: @@ -18,7 +18,6 @@ import java.io.StringReader;
 import java.text.MessageFormat;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.TransformerException;
 
@@ -27,6 +26,7 @@ import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
 import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator;
 import org.eclipse.cdt.debug.core.sourcelookup.SourceLookupFactory;
 import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResourceChangeListener;
 import org.eclipse.core.resources.ResourcesPlugin;
@@ -80,7 +80,7 @@ public class OldDefaultSourceLocator implements IPersistableSourceLocator, IAdap
 			Document document = null;
 			Throwable ex = null;
 			try {
-				document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+				document = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE().newDocument();
 				Element element = document.createElement(ELEMENT_NAME);
 				document.appendChild(element);
 				element.setAttribute(ATTR_PROJECT, getCSourceLocator().getProject().getName());
@@ -109,7 +109,7 @@ public class OldDefaultSourceLocator implements IPersistableSourceLocator, IAdap
 		Exception ex = null;
 		try {
 			Element root = null;
-			DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			DocumentBuilder parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			StringReader reader = new StringReader(memento);
 			InputSource source = new InputSource(reader);
 			root = parser.parse(source).getDocumentElement();

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui;singleton:=true
-Bundle-Version: 1.3.100.qualifier
+Bundle-Version: 1.3.200.qualifier
 Bundle-Activator: org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.MulticoreVisualizerUIPlugin
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.ui,
@@ -15,7 +15,7 @@ Require-Bundle: org.eclipse.ui,
  org.eclipse.cdt.visualizer.core,
  org.eclipse.cdt.visualizer.ui,
  org.eclipse.debug.ui,
- org.eclipse.cdt.core,
+ org.eclipse.cdt.core;bundle-version="8.3.0",
  org.eclipse.cdt.debug.ui
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-17

programming_language: CoffeeScript
filename: MementoUtils.java
change_type: ModificationType.MODIFY
diff: @@ -22,13 +22,13 @@ import java.util.List;
 import java.util.Map;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.w3c.dom.Attr;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -61,10 +61,8 @@ public class MementoUtils {
 	public static String encodeMapIntoMemento(Map<String, String> keyPairValues) {
 		String returnValue = null;
 
-		DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
-		DocumentBuilder docBuilder = null;
 		try {
-			docBuilder = dfactory.newDocumentBuilder();
+			DocumentBuilder docBuilder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document doc = docBuilder.newDocument();
 
 			Element rootElement = doc.createElement(ROOT_ELEMENT_TAGNAME);
@@ -80,7 +78,7 @@ public class MementoUtils {
 
 			ByteArrayOutputStream s = new ByteArrayOutputStream();
 
-			TransformerFactory factory = TransformerFactory.newInstance();
+			TransformerFactory factory = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE();
 			Transformer transformer = factory.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
@@ -103,7 +101,7 @@ public class MementoUtils {
 		Element root = null;
 		DocumentBuilder parser;
 		try {
-			parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			parser.setErrorHandler(new DefaultHandler());
 			root = parser.parse(new InputSource(new StringReader(memento))).getDocumentElement();
 			NodeList nodeList = root.getChildNodes();
@@ -142,10 +140,8 @@ public class MementoUtils {
 	public static String encodeListIntoMemento(List<String> labels) {
 		String returnValue = null;
 
-		DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
-		DocumentBuilder docBuilder = null;
 		try {
-			docBuilder = dfactory.newDocumentBuilder();
+			DocumentBuilder docBuilder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document doc = docBuilder.newDocument();
 
 			Element rootElement = doc.createElement(ROOT_ELEMENT_TAGNAME);
@@ -159,7 +155,7 @@ public class MementoUtils {
 
 			ByteArrayOutputStream s = new ByteArrayOutputStream();
 
-			TransformerFactory factory = TransformerFactory.newInstance();
+			TransformerFactory factory = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE();
 			Transformer transformer = factory.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
@@ -182,7 +178,7 @@ public class MementoUtils {
 		Element root = null;
 		DocumentBuilder parser;
 		try {
-			parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			parser.setErrorHandler(new DefaultHandler());
 			root = parser.parse(new InputSource(new StringReader(memento))).getDocumentElement();
 			NodeList nodeList = root.getChildNodes();

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -9,7 +9,7 @@ Bundle-Localization: plugin
 Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.cdt.dsf,
  org.eclipse.debug.core,
- org.eclipse.cdt.core,
+ org.eclipse.cdt.core;bundle-version="8.3.0",
  org.eclipse.cdt.debug.core,
  org.eclipse.core.variables,
  org.eclipse.cdt.launch;bundle-version="10.3.0",

programming_language: Java
filename: CollectAction.java
change_type: ModificationType.MODIFY
diff: @@ -18,7 +18,6 @@ import java.io.ByteArrayOutputStream;
 import java.io.StringReader;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerFactory;
@@ -26,6 +25,7 @@ import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
 import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.xml.sax.InputSource;
@@ -124,10 +124,8 @@ public class CollectAction extends AbstractTracepointAction {
 	public String getMemento() {
 		String collectData = ""; //$NON-NLS-1$
 
-		DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
-		DocumentBuilder docBuilder = null;
 		try {
-			docBuilder = dfactory.newDocumentBuilder();
+			DocumentBuilder docBuilder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document doc = docBuilder.newDocument();
 
 			Element rootElement = doc.createElement(COLLECT_ACTION_ELEMENT_NAME);
@@ -142,7 +140,7 @@ public class CollectAction extends AbstractTracepointAction {
 
 			ByteArrayOutputStream s = new ByteArrayOutputStream();
 
-			TransformerFactory factory = TransformerFactory.newInstance();
+			TransformerFactory factory = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE();
 			Transformer transformer = factory.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
@@ -189,7 +187,7 @@ public class CollectAction extends AbstractTracepointAction {
 		Element root = null;
 		DocumentBuilder parser;
 		try {
-			parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			parser.setErrorHandler(new DefaultHandler());
 			root = parser.parse(new InputSource(new StringReader(data))).getDocumentElement();
 

programming_language: Java
filename: EvaluateAction.java
change_type: ModificationType.MODIFY
diff: @@ -19,7 +19,6 @@ import java.io.ByteArrayOutputStream;
 import java.io.StringReader;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerFactory;
@@ -27,6 +26,7 @@ import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
 import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.xml.sax.InputSource;
@@ -62,10 +62,8 @@ public class EvaluateAction extends AbstractTracepointAction {
 	public String getMemento() {
 		String collectData = ""; //$NON-NLS-1$
 
-		DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
-		DocumentBuilder docBuilder = null;
 		try {
-			docBuilder = dfactory.newDocumentBuilder();
+			DocumentBuilder docBuilder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document doc = docBuilder.newDocument();
 
 			Element rootElement = doc.createElement("evalData"); //$NON-NLS-1$
@@ -75,7 +73,7 @@ public class EvaluateAction extends AbstractTracepointAction {
 
 			ByteArrayOutputStream s = new ByteArrayOutputStream();
 
-			TransformerFactory factory = TransformerFactory.newInstance();
+			TransformerFactory factory = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE();
 			Transformer transformer = factory.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
@@ -108,7 +106,7 @@ public class EvaluateAction extends AbstractTracepointAction {
 		Element root = null;
 		DocumentBuilder parser;
 		try {
-			parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			parser.setErrorHandler(new DefaultHandler());
 			root = parser.parse(new InputSource(new StringReader(data))).getDocumentElement();
 			fEvalString = root.getAttribute("evalString"); //$NON-NLS-1$

programming_language: Java
filename: TracepointActionManager.java
change_type: ModificationType.MODIFY
diff: @@ -19,7 +19,6 @@ import java.util.ArrayList;
 import java.util.Iterator;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerFactory;
@@ -27,6 +26,7 @@ import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
 import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -90,7 +90,7 @@ public class TracepointActionManager {
 		Element root = null;
 		DocumentBuilder parser;
 		try {
-			parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			parser.setErrorHandler(new DefaultHandler());
 			root = parser.parse(new InputSource(new StringReader(actionData))).getDocumentElement();
 
@@ -146,10 +146,8 @@ public class TracepointActionManager {
 	public void saveActionData() {
 		String actionData = ""; //$NON-NLS-1$
 
-		DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
-		DocumentBuilder docBuilder = null;
 		try {
-			docBuilder = dfactory.newDocumentBuilder();
+			DocumentBuilder docBuilder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document doc = docBuilder.newDocument();
 
 			Element rootElement = doc.createElement("tracepointActionData"); //$NON-NLS-1$
@@ -168,7 +166,7 @@ public class TracepointActionManager {
 
 			ByteArrayOutputStream s = new ByteArrayOutputStream();
 
-			TransformerFactory factory = TransformerFactory.newInstance();
+			TransformerFactory factory = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE();
 			Transformer transformer = factory.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$

programming_language: Java
filename: WhileSteppingAction.java
change_type: ModificationType.MODIFY
diff: @@ -19,7 +19,6 @@ import java.io.ByteArrayOutputStream;
 import java.io.StringReader;
 
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerFactory;
@@ -27,6 +26,7 @@ import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
 import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.xml.sax.InputSource;
@@ -98,10 +98,8 @@ public class WhileSteppingAction extends AbstractTracepointAction {
 	public String getMemento() {
 		String collectData = ""; //$NON-NLS-1$
 
-		DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
-		DocumentBuilder docBuilder = null;
 		try {
-			docBuilder = dfactory.newDocumentBuilder();
+			DocumentBuilder docBuilder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			Document doc = docBuilder.newDocument();
 
 			Element rootElement = doc.createElement("whileSteppingData"); //$NON-NLS-1$
@@ -112,7 +110,7 @@ public class WhileSteppingAction extends AbstractTracepointAction {
 
 			ByteArrayOutputStream s = new ByteArrayOutputStream();
 
-			TransformerFactory factory = TransformerFactory.newInstance();
+			TransformerFactory factory = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE();
 			Transformer transformer = factory.newTransformer();
 			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
 			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
@@ -145,7 +143,7 @@ public class WhileSteppingAction extends AbstractTracepointAction {
 		Element root = null;
 		DocumentBuilder parser;
 		try {
-			parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			parser = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
 			parser.setErrorHandler(new DefaultHandler());
 			root = parser.parse(new InputSource(new StringReader(data))).getDocumentElement();
 			setStepCount(Integer.parseInt(root.getAttribute("whileSteppingCount"))); //$NON-NLS-1$

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -2,13 +2,14 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.cdt.testsrunner.boost;singleton:=true
-Bundle-Version: 7.2.0.qualifier
+Bundle-Version: 7.2.100.qualifier
 Bundle-Activator: org.eclipse.cdt.testsrunner.internal.boost.BoostTestsRunnerPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Require-Bundle: org.eclipse.core.runtime;bundle-version="3.5.0",
- org.eclipse.cdt.testsrunner;bundle-version="3.5.0"
+ org.eclipse.cdt.testsrunner;bundle-version="3.5.0",
+ org.eclipse.cdt.core;bundle-version="8.3.0"
 Export-Package: org.eclipse.cdt.testsrunner.internal.boost;x-friends:="org.eclipse.cdt.testsrunner.tests"
 Automatic-Module-Name: org.eclipse.cdt.testsrunner.boost

programming_language: CoffeeScript
filename: BoostTestsRunnerProvider.java
change_type: ModificationType.MODIFY
diff: @@ -19,8 +19,8 @@ import java.text.MessageFormat;
 
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
 
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.testsrunner.launcher.ITestsRunnerProvider;
 import org.eclipse.cdt.testsrunner.model.ITestModelUpdater;
 import org.eclipse.cdt.testsrunner.model.TestingException;
@@ -94,8 +94,7 @@ public class BoostTestsRunnerProvider implements ITestsRunnerProvider {
 	@Override
 	public void run(ITestModelUpdater modelUpdater, InputStream inputStream) throws TestingException {
 		try {
-			SAXParserFactory spf = SAXParserFactory.newInstance();
-			SAXParser sp = spf.newSAXParser();
+			SAXParser sp = XmlProcessorFactoryCdt.createSAXParserWithErrorOnDOCTYPE();
 			sp.parse(inputStream, new BoostXmlLogHandler(modelUpdater));
 
 		} catch (IOException e) {

programming_language: Java
filename: MANIFEST.MF
change_type: ModificationType.MODIFY
diff: @@ -2,13 +2,14 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.cdt.testsrunner.qttest;singleton:=true
-Bundle-Version: 7.2.0.qualifier
+Bundle-Version: 7.2.100.qualifier
 Bundle-Activator: org.eclipse.cdt.testsrunner.internal.qttest.QtTestsRunnerPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Require-Bundle: org.eclipse.core.runtime;bundle-version="3.5.0",
- org.eclipse.cdt.testsrunner;bundle-version="3.5.0"
+ org.eclipse.cdt.testsrunner;bundle-version="3.5.0",
+ org.eclipse.cdt.core;bundle-version="8.3.0"
 Export-Package: org.eclipse.cdt.testsrunner.internal.qttest;x-friends:="org.eclipse.cdt.testsrunner.tests"
 Automatic-Module-Name: org.eclipse.cdt.testsrunner.qttest

programming_language: CoffeeScript
filename: QtTestsRunnerProvider.java
change_type: ModificationType.MODIFY
diff: @@ -19,8 +19,8 @@ import java.text.MessageFormat;
 
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
 
+import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
 import org.eclipse.cdt.testsrunner.launcher.ITestsRunnerProvider;
 import org.eclipse.cdt.testsrunner.model.ITestModelUpdater;
 import org.eclipse.cdt.testsrunner.model.TestingException;
@@ -111,8 +111,7 @@ public class QtTestsRunnerProvider implements ITestsRunnerProvider {
 	@Override
 	public void run(ITestModelUpdater modelUpdater, InputStream inputStream) throws TestingException {
 		try {
-			SAXParserFactory spf = SAXParserFactory.newInstance();
-			SAXParser sp = spf.newSAXParser();
+			SAXParser sp = XmlProcessorFactoryCdt.createSAXParserWithErrorOnDOCTYPE();
 			sp.parse(inputStream, new QtXmlLogHandler(modelUpdater));
 
 		} catch (IOException e) {

programming_language: Java