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 c9330e5e7..8811d4c76 100644 --- a/src/main/java/gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java +++ b/src/main/java/gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java @@ -3572,6 +3572,15 @@ public void computeRefactoringsWithinBody() throws RefactoringMinerTimedOutExcep } } } + if(nonMappedLeavesT2.isEmpty()) { + AbstractCodeMapping firstMapping = set.iterator().next(); + List leafExpressions = firstMapping.getFragment2().findExpression(expectedException.getString()); + if(leafExpressions.size() == 1) { + LeafMapping leafMapping = new LeafMapping(expectedException, leafExpressions.get(0), operation1, operation2); + ref.addSubExpressionMapping(leafMapping); + break; + } + } } } }