From 61c88b3a219a34be0668094f6eb475e126ca10e1 Mon Sep 17 00:00:00 2001 From: tsantalis Date: Tue, 26 Nov 2024 22:27:12 -0500 Subject: [PATCH] More updated files --- src/main/java/org/codetracker/BlockTrackerImpl.java | 6 ++++-- .../java/org/codetracker/BlockTrackerWithLocalFiles.java | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/codetracker/BlockTrackerImpl.java b/src/main/java/org/codetracker/BlockTrackerImpl.java index f6690f08c18..d005fcdfb39 100644 --- a/src/main/java/org/codetracker/BlockTrackerImpl.java +++ b/src/main/java/org/codetracker/BlockTrackerImpl.java @@ -80,6 +80,7 @@ public History track() throws Exception { continue; } String rightMethodClassName = rightMethod.getUmlOperation().getClassName(); + String rightMethodSourceFolder = rightMethod.getUmlOperation().getLocationInfo().getSourceFolder(); Block rightBlock = rightMethod.findBlock(currentBlock::equalIdentifierIgnoringVersion); if (rightBlock == null) { continue; @@ -294,7 +295,7 @@ else if (leftOperation instanceof UMLInitializer && rightOperation instanceof UM } - UMLAbstractClassDiff umlClassDiff = getUMLClassDiff(umlModelDiffAll, rightMethodClassName); + UMLAbstractClassDiff umlClassDiff = getUMLClassDiff(umlModelDiffAll, rightMethodSourceFolder, rightMethodClassName); if (umlClassDiff != null) { found = changeHistory.checkClassDiffForBlockChange(currentVersion, parentVersion, equalMethod, equalBlock, umlClassDiff); @@ -374,6 +375,7 @@ public History.HistoryInfo blame() throws Exception { continue; } String rightMethodClassName = rightMethod.getUmlOperation().getClassName(); + String rightMethodSourceFolder = rightMethod.getUmlOperation().getLocationInfo().getSourceFolder(); Block rightBlock = rightMethod.findBlock(currentBlock::equalIdentifierIgnoringVersion); if (rightBlock == null) { continue; @@ -588,7 +590,7 @@ else if (leftOperation instanceof UMLInitializer && rightOperation instanceof UM } - UMLAbstractClassDiff umlClassDiff = getUMLClassDiff(umlModelDiffAll, rightMethodClassName); + UMLAbstractClassDiff umlClassDiff = getUMLClassDiff(umlModelDiffAll, rightMethodSourceFolder, rightMethodClassName); if (umlClassDiff != null) { found = changeHistory.checkClassDiffForBlockChange(currentVersion, parentVersion, equalMethod, equalBlock, umlClassDiff); diff --git a/src/main/java/org/codetracker/BlockTrackerWithLocalFiles.java b/src/main/java/org/codetracker/BlockTrackerWithLocalFiles.java index 9ee3f33a45f..3ae207832e3 100644 --- a/src/main/java/org/codetracker/BlockTrackerWithLocalFiles.java +++ b/src/main/java/org/codetracker/BlockTrackerWithLocalFiles.java @@ -110,6 +110,7 @@ public History track() throws Exception { continue; } String rightMethodClassName = rightMethod.getUmlOperation().getClassName(); + String rightMethodSourceFolder = rightMethod.getUmlOperation().getLocationInfo().getSourceFolder(); Block rightBlock = rightMethod.findBlock(currentBlock::equalIdentifierIgnoringVersion); if (rightBlock == null) { continue; @@ -323,7 +324,7 @@ else if (leftOperation instanceof UMLInitializer && rightOperation instanceof UM } - UMLAbstractClassDiff umlClassDiff = getUMLClassDiff(umlModelDiffAll, rightMethodClassName); + UMLAbstractClassDiff umlClassDiff = getUMLClassDiff(umlModelDiffAll, rightMethodSourceFolder, rightMethodClassName); if (umlClassDiff != null) { found = changeHistory.checkClassDiffForBlockChange(currentVersion, parentVersion, equalMethod, equalBlock, umlClassDiff);