From 93b8d9dbf9d4275df4638e0785a33ed6fcfc10e4 Mon Sep 17 00:00:00 2001 From: tsantalis Date: Fri, 3 Jan 2025 19:15:27 -0500 Subject: [PATCH] Pass anonymousClassDiffs within lambdas to parentMapper lucene/test-framework/src/java/org/apache/lucene/codecs/uniformsplit/UniformSplitRot13PostingsFormat.java https://github.com/apache/lucene-solr/commit/f43fe7642e9f1eb48b7438e2b132d9efc641edb6 protected BlockEncoder getBlockEncoder() { return (blockBytes, length) -> { byte[] encodedBytes = Rot13CypherTestUtil.encode(blockBytes, Math.toIntExact(length)); return new BlockEncoder.WritableBytes() { @Override public long size() { return encodedBytes.length; } @Override public void writeTo(DataOutput dataOutput) throws IOException { encoderCalled = true; dataOutput.writeBytes(encodedBytes, 0, encodedBytes.length); } }; }; } --- .../gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java b/src/main/java/gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java index cb49a0e80..b897b197a 100644 --- a/src/main/java/gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java +++ b/src/main/java/gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java @@ -1450,7 +1450,11 @@ else if(streamAPIStatements1.size() > 0 && streamAPIStatements2.size() == 0) { } } boolean isomorphic = isomorphicCompositeStructure(innerNodes1, innerNodes2); + int anonymousMappers = this.anonymousClassDiffs.size(); processLeaves(leaves1, leaves2, new LinkedHashMap(), isomorphic); + if(this.anonymousClassDiffs.size() > anonymousMappers && parentMapper != null) { + parentMapper.anonymousClassDiffs.addAll(this.anonymousClassDiffs); + } processInnerNodes(innerNodes1, innerNodes2, leaves1, leaves2, new LinkedHashMap(), containsCallToExtractedMethod(leaves2));