Skip to content

Commit

Permalink
simon feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
az108 committed Dec 2, 2024
1 parent 2a5709c commit 4acb80e
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -686,9 +686,7 @@ private List<FeedbackDetailDTO> aggregateUsingLevenshtein(List<FeedbackDetailDTO
for (FeedbackDetailDTO base : feedbackDetails) {
boolean isMerged = false;

for (int i = 0; i < processedDetails.size(); i++) {
FeedbackDetailDTO processed = processedDetails.get(i);

for (FeedbackDetailDTO processed : processedDetails) {
// Ensure feedbacks have the same testCaseName and taskName
if (base.testCaseName().equals(processed.testCaseName()) && base.taskName().equals(processed.taskName())) {
double similarity = NameSimilarity.levenshteinSimilarity(base.detailText().getFirst(), processed.detailText().getFirst());
Expand All @@ -701,10 +699,10 @@ private List<FeedbackDetailDTO> aggregateUsingLevenshtein(List<FeedbackDetailDTO
long mergedCount = processed.count() + base.count();

// Replace the processed entry with the updated one
processedDetails.remove(processed);
FeedbackDetailDTO updatedProcessed = new FeedbackDetailDTO(mergedCount, 0, mergedTexts, processed.testCaseName(), processed.taskName(),
processed.errorCategory());

processedDetails.set(i, updatedProcessed);
processedDetails.add(updatedProcessed); // Add the updated entry
isMerged = true;
break; // No need to check further
}
Expand Down

0 comments on commit 4acb80e

Please sign in to comment.