Примеры ошибок, обнаруженных с помощью диагностики V6033
V6033. An item with the same key has already been added.
SonarJava
V6033 [CWE-462] An item with the same key 'JavaPunctuator.PLUSEQU' has already been added. Check lines: 104, 100. KindMaps.java 104
private final Map<JavaPunctuator, Tree.Kind> assignmentOperators =
Maps.newEnumMap(JavaPunctuator.class);
public KindMaps() {
....
assignmentOperators.put(JavaPunctuator.PLUSEQU, Tree.Kind.PLUS_ASSIGNMENT);
....
assignmentOperators.put(JavaPunctuator.PLUSEQU, Tree.Kind.PLUS_ASSIGNMENT);
....
}
Bouncy Castle
V6033 [CWE-462] An item with the same key 'PKCSObjectIdentifiers.pbeWithSHAAnd3_KeyTripleDES_CBC' has already been added. Check lines: 50, 49. PKCS12PBEUtils.java 50
class PKCS12PBEUtils
{
....
private static Set desAlgs = new HashSet();
static
{
....
desAlgs.add(PKCSObjectIdentifiers.pbeWithSHAAnd3_KeyTripleDES_CBC);
desAlgs.add(PKCSObjectIdentifiers.pbeWithSHAAnd3_KeyTripleDES_CBC);
}
....
}
Bouncy Castle
V6033 [CWE-462] An item with the same key 'RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_256' has already been added. Check lines: 43, 41. DefaultAlgorithmNameFinder.java 43
public class DefaultAlgorithmNameFinder
implements AlgorithmNameFinder
{
private final static Map algorithms = new HashMap();
static
{
....
algorithms.put(....id_tc26_signwithdigest_gost_3410_12_256, // <=
"GOST3411WITHGOST3410-2012-256");
algorithms.put(....id_tc26_signwithdigest_gost_3410_12_512,
"GOST3411WITHGOST3410-2012-512");
algorithms.put(....id_tc26_signwithdigest_gost_3410_12_256, // <=
"GOST3411WITHECGOST3410-2012-256");
algorithms.put(....id_tc26_signwithdigest_gost_3410_12_512,
"GOST3411WITHECGOST3410-2012-512");
....
}
}
Similar errors can be found in some other places:
- V6033 [CWE-462] An item with the same key 'RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_256' has already been added. Check lines: 45, 41. DefaultAlgorithmNameFinder.java 45
- V6033 [CWE-462] An item with the same key 'RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_256' has already been added. Check lines: 47, 41. DefaultAlgorithmNameFinder.java 47
- V6033 [CWE-462] An item with the same key 'badCertId.value' has already been added. Check lines: 63, 56. CMCFailInfo.java 63
- And 10 additional diagnostic messages.
Apache Hadoop
V6033 An item with the same key 'KDC_BIND_ADDRESS' has already been added. MiniKdc.java(163), MiniKdc.java(162)
public class MiniKdc {
....
private static final Set<String> PROPERTIES = new HashSet<String>();
....
static {
PROPERTIES.add(ORG_NAME);
PROPERTIES.add(ORG_DOMAIN);
PROPERTIES.add(KDC_BIND_ADDRESS);
PROPERTIES.add(KDC_BIND_ADDRESS);
PROPERTIES.add(KDC_PORT);
PROPERTIES.add(INSTANCE);
PROPERTIES.add(TRANSPORT);
PROPERTIES.add(MAX_TICKET_LIFETIME);
PROPERTIES.add(MAX_RENEWABLE_LIFETIME);
....
}
....
}
Ghidra
V6033 An item with the same key '@' has already been added. FilterOptions.java(45)
final static Map<Character, String> DELIMITER_NAME_MAP = new HashMap<>(20);
// Any non-alphanumeric char can be used as a delimiter.
static {
DELIMITER_NAME_MAP.put(' ', "Space");
DELIMITER_NAME_MAP.put('~', "Tilde");
DELIMITER_NAME_MAP.put('`', "Back quote");
DELIMITER_NAME_MAP.put('@', "Exclamation point");
DELIMITER_NAME_MAP.put('@', "At sign");
DELIMITER_NAME_MAP.put('#', "Pound sign");
DELIMITER_NAME_MAP.put('$', "Dollar sign");
DELIMITER_NAME_MAP.put('%', "Percent sign");
....
}
WildFly
V6033 An item with the same key 'org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants.NIO_REMOTING_THREADS_PROPNAME' has already been added. LegacyConnectionFactoryService.java(145), LegacyConnectionFactoryService.java(139)
private static final Map<String, String>
PARAM_KEY_MAPPING = new HashMap<>();
....
static {
PARAM_KEY_MAPPING.put(
org.apache.activemq.artemis.core.remoting.impl.netty
.TransportConstants.NIO_REMOTING_THREADS_PROPNAME,
TransportConstants.NIO_REMOTING_THREADS_PROPNAME);
....
PARAM_KEY_MAPPING.put(
org.apache.activemq.artemis.core.remoting.impl.netty
.TransportConstants.NIO_REMOTING_THREADS_PROPNAME,
TransportConstants.NIO_REMOTING_THREADS_PROPNAME);
....
}
Bouncy Castle
V6033 An item with the same key 'PKCSObjectIdentifiers.pbeWithSHAAnd3_KeyTripleDES_CBC' has already been added. PKCS12PBEUtils.java(50), PKCS12PBEUtils.java(49)
class PKCS12PBEUtils {
static {
....
keySizes.put(PKCSObjectIdentifiers.pbeWithSHAAnd3_KeyTripleDES_CBC,
Integers.valueOf(192));
keySizes.put(PKCSObjectIdentifiers.pbeWithSHAAnd2_KeyTripleDES_CBC,
Integers.valueOf(128));
....
desAlgs.add(PKCSObjectIdentifiers.pbeWithSHAAnd3_KeyTripleDES_CBC);
desAlgs.add(PKCSObjectIdentifiers.pbeWithSHAAnd3_KeyTripleDES_CBC);
}
}
GeoGebra
V6033 An item with the same key '2' has already been changed. AlgoPolyhedronNetPrism.java(376), AlgoPolyhedronNetPrism.java(377)
private void updateSide(int index, int newBottomPointsLength) {
....
GeoSegmentND[] s = new GeoSegmentND[4];
GeoSegmentND segmentBottom = outputSegmentsBottom.getElement(index);
s[0] = segmentBottom;
s[1] = segmentSide1;
s[2] = segmentSide2;
s[2] = segmentSide3;
polygon.setSegments(s);
polygon.calcArea();
}
GeoGebra
V6033 An item with the same key '"∼"' has already been added. MathMLParser.java(229), MathMLParser.java(355)
static synchronized HashMap<String, String> getGeogebraMap() {
....
geogebraMap.put("−", "-");
geogebraMap.put("⊥", "# ");
geogebraMap.put("∼", "~ "); // <=
geogebraMap.put("′", "# ");
geogebraMap.put("≤", Unicode.LESS_EQUAL + "");
geogebraMap.put("≥", Unicode.GREATER_EQUAL + "");
geogebraMap.put("∞", Unicode.INFINITY + "");
....
geogebraMap.put("∏", "# ");
geogebraMap.put("∏", "# ");
geogebraMap.put("〉", "# ");
geogebraMap.put("⟩", "# ");
geogebraMap.put("→", "# ");
geogebraMap.put("⇒", "# ");
geogebraMap.put("⟩", "# ");
geogebraMap.put("→", "# ");
geogebraMap.put("⇒", "# ");
geogebraMap.put("→", "# ");
geogebraMap.put("⋅", "* ");
geogebraMap.put("∼", "# "); // <=
geogebraMap.put("∝", "# ");
geogebraMap.put("∝", "# ");
geogebraMap.put("∝", "# ");
geogebraMap.put("⊂", "# ");
....
return geogebraMap;
}