diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/PatchSetReviewer.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/PatchSetReviewer.java
index 414b6f1..c1dc2ce 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/PatchSetReviewer.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/PatchSetReviewer.java
@@ -10,7 +10,7 @@
 import com.googlesource.gerrit.plugins.chatgpt.client.OpenAiClient;
 import com.googlesource.gerrit.plugins.chatgpt.client.model.ChatGptSuggestionPoint;
 import com.googlesource.gerrit.plugins.chatgpt.client.FileDiffProcessed;
-import com.googlesource.gerrit.plugins.chatgpt.client.model.GerritCommentRange;
+import com.googlesource.gerrit.plugins.chatgpt.client.model.GerritCodeRange;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
 import lombok.Setter;
 import lombok.extern.slf4j.Slf4j;
@@ -95,8 +95,8 @@
         reviewBatches.add(batchMap);
     }
 
-    private Optional<GerritCommentRange> getGerritCommentRange(ChatGptSuggestionPoint suggestion) {
-        Optional<GerritCommentRange> gerritCommentRange = Optional.empty();
+    private Optional<GerritCodeRange> getGerritCommentCodeRange(ChatGptSuggestionPoint suggestion) {
+        Optional<GerritCodeRange> gerritCommentRange = Optional.empty();
         if (suggestion.getFilename() == null) {
             return gerritCommentRange;
         }
@@ -128,12 +128,12 @@
             }
             else {
                 batchMap.put("content", suggestion.getSuggestion());
-                Optional<GerritCommentRange> optGerritCommentRange = getGerritCommentRange(suggestion);
+                Optional<GerritCodeRange> optGerritCommentRange = getGerritCommentCodeRange(suggestion);
                 if (optGerritCommentRange.isPresent()) {
-                    GerritCommentRange gerritCommentRange = optGerritCommentRange.get();
+                    GerritCodeRange gerritCodeRange = optGerritCommentRange.get();
                     batchMap.put("filename", suggestion.getFilename());
-                    batchMap.put("line", gerritCommentRange.getStart_line());
-                    batchMap.put("range", gerritCommentRange);
+                    batchMap.put("line", gerritCodeRange.getStart_line());
+                    batchMap.put("range", gerritCodeRange);
                 }
                 reviewBatches.add(batchMap);
             }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/CodeFinder.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/CodeFinder.java
index 9c8d715..68555bc 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/CodeFinder.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/CodeFinder.java
@@ -1,35 +1,42 @@
 package com.googlesource.gerrit.plugins.chatgpt.client;
 
 import com.googlesource.gerrit.plugins.chatgpt.client.model.ChatGptSuggestionPoint;
-import com.googlesource.gerrit.plugins.chatgpt.client.model.GerritCommentRange;
-import com.googlesource.gerrit.plugins.chatgpt.client.model.InputFileDiff;
+import com.googlesource.gerrit.plugins.chatgpt.client.model.CodeFinderDiff;
+import com.googlesource.gerrit.plugins.chatgpt.client.model.DiffContent;
+import com.googlesource.gerrit.plugins.chatgpt.client.model.GerritCodeRange;
 import lombok.extern.slf4j.Slf4j;
 
 import java.lang.reflect.Field;
 import java.util.List;
+import java.util.TreeMap;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 @Slf4j
 public class CodeFinder {
-    private final List<InputFileDiff.Content> diff;
+    private final List<CodeFinderDiff> codeFinderDiffs;
     private int commentedLine;
-    private String[] commentedCode;
-    private int lastCommentedCodeLineNum ;
-    private GerritCommentRange currentCommentRange;
-    private GerritCommentRange closestCommentRange;
-    private int lineNum;
+    private Pattern commentedCodePattern;
+    private GerritCodeRange currentCodeRange;
+    private GerritCodeRange closestCodeRange;
 
-    public CodeFinder(List<InputFileDiff.Content> diff) {
-        this.diff = diff;
+    public CodeFinder(List<CodeFinderDiff> codeFinderDiffs) {
+        this.codeFinderDiffs = codeFinderDiffs;
     }
 
-    private double calcCodeDistance(GerritCommentRange range, int fromLine) {
+    private void updateCodePattern(ChatGptSuggestionPoint suggestion) {
+        String commentedCode = suggestion.getCodeSnippet().trim();
+        String commentedCodeRegex = Pattern.quote(commentedCode);
+        commentedCodePattern = Pattern.compile(commentedCodeRegex);
+    }
+
+    private double calcCodeDistance(GerritCodeRange range, int fromLine) {
         return Math.abs((range.end_line - range.start_line) / 2 - fromLine);
     }
 
-    @SuppressWarnings("unchecked")
-    private List<String> getDiffItem(Field diffField, InputFileDiff.Content diffItem) {
+    private String getDiffItem(Field diffField, DiffContent diffItem) {
         try {
-            return (List<String>) diffField.get(diffItem);
+            return (String) diffField.get(diffItem);
         }
         catch (IllegalAccessException e) {
             log.error("Error while processing file difference (diff type: {})", diffField.getName(), e);
@@ -37,63 +44,61 @@
         }
     }
 
-    private void findCodeLines(String diffType, List<String> diffLines) {
-        int codeLinePointer = 0;
-        for (String newContentLine : diffLines) {
-            String commentedCodeLine = commentedCode[codeLinePointer];
-            // Search for the commented code in the content
-            int codeCharacter = newContentLine.indexOf(commentedCodeLine);
-            if (codeCharacter != -1) {
-                // If the beginning of a commented code is found, currentCommentRange is initialized
-                if (codeLinePointer == 0) {
-                    currentCommentRange = GerritCommentRange.builder()
-                            .start_line(lineNum)
-                            .start_character(codeCharacter)
-                            .build();
-                }
-                // If the ending of a commented code is found, the currentCommentRange ending values are set
-                if (codeLinePointer >= lastCommentedCodeLineNum) {
-                    currentCommentRange.setEnd_line(lineNum);
-                    currentCommentRange.setEnd_character(codeCharacter + commentedCodeLine.length());
-                    // If multiple commented code portions are found and currentCommentRange is closer to the line
-                    // number suggested by ChatGPT than closestCommentRange, it becomes the new closestCommentRange
-                    if (closestCommentRange == null || calcCodeDistance(currentCommentRange, commentedLine) <
-                            calcCodeDistance(closestCommentRange, commentedLine)) {
-                        closestCommentRange = currentCommentRange.toBuilder().build();
-                    }
-                }
-                else {
-                    codeLinePointer++;
-                }
-            }
-            else {
-                codeLinePointer = 0;
-            }
-            if (diffType.contains("b")) {
-                lineNum++;
+    private int getLineNumber(TreeMap<Integer, Integer> charToLineMapItem, int position) {
+        Integer floorPosition = charToLineMapItem.floorKey(position);
+        if (floorPosition == null) {
+            throw new IllegalArgumentException("Position: " + position);
+        }
+        return charToLineMapItem.get(floorPosition);
+    }
+
+    private int getLineCharacter(String diffCode, int position) {
+        // Return the offset relative to the nearest preceding newline character if found, `position` otherwise
+        return position - diffCode.substring(0, position).lastIndexOf("\n") -1;
+    }
+
+    private void findCodeLines(String diffCode, TreeMap<Integer, Integer> charToLineMapItem)
+            throws IllegalArgumentException {
+        Matcher codeMatcher = commentedCodePattern.matcher(diffCode);
+        while (codeMatcher.find()) {
+            int startPosition = codeMatcher.start();
+            int endPosition = codeMatcher.end();
+            currentCodeRange = GerritCodeRange.builder()
+                    .start_line(getLineNumber(charToLineMapItem, startPosition))
+                    .end_line(getLineNumber(charToLineMapItem, endPosition))
+                    .start_character(getLineCharacter(diffCode, startPosition))
+                    .end_character(getLineCharacter(diffCode, endPosition))
+                    .build();
+            // If multiple commented code portions are found and currentCommentRange is closer to the line
+            // number suggested by ChatGPT than closestCommentRange, it becomes the new closestCommentRange
+            if (closestCodeRange == null || calcCodeDistance(currentCodeRange, commentedLine) <
+                    calcCodeDistance(closestCodeRange, commentedLine)) {
+                closestCodeRange = currentCodeRange.toBuilder().build();
             }
         }
     }
 
-    public GerritCommentRange findCode(ChatGptSuggestionPoint suggestion, int commentedLine) {
+    public GerritCodeRange findCommentedCode(ChatGptSuggestionPoint suggestion, int commentedLine) {
         this.commentedLine = commentedLine;
-        // Split the commented code into lines and remove the trailing spaces from each line
-        commentedCode = suggestion.getCodeSnippet().trim().split("\\s*\n\\s*");
-        lastCommentedCodeLineNum = commentedCode.length -1;
-        currentCommentRange = null;
-        closestCommentRange = null;
-        lineNum = 1;
-        for (InputFileDiff.Content diffItem : diff) {
-            for (Field diffField : InputFileDiff.Content.class.getDeclaredFields()) {
-                String diffType = diffField.getName();
-                List<String> diffLines = getDiffItem(diffField, diffItem);
-                if (diffLines != null) {
-                    findCodeLines(diffType, diffLines);
+        updateCodePattern(suggestion);
+        currentCodeRange = null;
+        closestCodeRange = null;
+        for (CodeFinderDiff codeFinderDiff : codeFinderDiffs) {
+            for (Field diffField : DiffContent.class.getDeclaredFields()) {
+                String diffCode = getDiffItem(diffField, codeFinderDiff.getContent());
+                if (diffCode != null) {
+                    TreeMap<Integer, Integer> charToLineMapItem = codeFinderDiff.getCharToLineMap();
+                    try {
+                        findCodeLines(diffCode, charToLineMapItem);
+                    }
+                    catch (IllegalArgumentException e) {
+                        log.warn("Could not retrieve line number from charToLineMap {}", charToLineMapItem, e);
+                    }
                 }
             }
         }
 
-        return closestCommentRange;
+        return closestCodeRange;
     }
 
 }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/FileDiffProcessed.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/FileDiffProcessed.java
index b4d5d1d..96ddf3b 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/FileDiffProcessed.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/FileDiffProcessed.java
@@ -1,8 +1,8 @@
 package com.googlesource.gerrit.plugins.chatgpt.client;
 
+import com.googlesource.gerrit.plugins.chatgpt.client.model.CodeFinderDiff;
+import com.googlesource.gerrit.plugins.chatgpt.client.model.DiffContent;
 import com.googlesource.gerrit.plugins.chatgpt.client.model.InputFileDiff;
-import com.googlesource.gerrit.plugins.chatgpt.client.model.InputFileDiff.Content;
-import com.googlesource.gerrit.plugins.chatgpt.client.model.OutputFileDiff;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
 import lombok.Getter;
 import lombok.extern.slf4j.Slf4j;
@@ -11,6 +11,7 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.TreeMap;
 
 @Slf4j
 public class FileDiffProcessed {
@@ -24,13 +25,17 @@
     };
 
     private final Configuration config;
+    private final boolean isCommitMessage;
     @Getter
-    private List<Content> diff;
+    private List<CodeFinderDiff> codeFinderDiffs;
     @Getter
     private List<String> newContent;
     @Getter
-    private List<OutputFileDiff.Content> outputDiffContent;
-    private final boolean isCommitMessage;
+    private List<DiffContent> outputDiffContent;
+    private int lineNum;
+    private DiffContent diffContentItem;
+    private DiffContent outputDiffContentItem;
+    private TreeMap<Integer, Integer> charToLineMapItem;
 
     public FileDiffProcessed(Configuration config, boolean isCommitMessage, InputFileDiff inputFileDiff) {
         this.config = config;
@@ -38,17 +43,21 @@
         newContent = new ArrayList<>() {{
             add("DUMMY LINE #0");
         }};
-        diff = inputFileDiff.getContent();
+        lineNum = 1;
         outputDiffContent = new ArrayList<>();
-        List<Content> inputDiffContent = inputFileDiff.getContent();
+        codeFinderDiffs = new ArrayList<>();
+        List<InputFileDiff.Content> inputDiffContent = inputFileDiff.getContent();
         // Iterate over the items of the diff content
-        for (Content inputContentItem : inputDiffContent) {
-            OutputFileDiff.Content outputContentItem = new OutputFileDiff.Content();
+        for (InputFileDiff.Content inputContentItem : inputDiffContent) {
+            diffContentItem = new DiffContent();
+            outputDiffContentItem = new DiffContent();
+            charToLineMapItem = new TreeMap<>();
             // Iterate over the fields `a`, `b` and `ab` of each diff content
-            for (Field inputDiffField : Content.class.getDeclaredFields()) {
-                processFileDiffItem(inputDiffField, inputContentItem, outputContentItem);
+            for (Field inputDiffField : InputFileDiff.Content.class.getDeclaredFields()) {
+                processFileDiffItem(inputDiffField, inputContentItem);
             }
-            outputDiffContent.add(outputContentItem);
+            outputDiffContent.add(outputDiffContentItem);
+            codeFinderDiffs.add(new CodeFinderDiff(diffContentItem, charToLineMapItem));
         }
     }
 
@@ -57,9 +66,37 @@
                 s.isEmpty() || Arrays.stream(COMMIT_MESSAGE_FILTER_OUT_PREFIXES).anyMatch(s::startsWith));
     }
 
-    private void processFileDiffItem(Field inputDiffField, Content contentItem,
-                                     OutputFileDiff.Content outputContentItem) {
-        String diffType = inputDiffField.getName();
+    private void updateCodeEntities(Field diffField, List<String> diffLines) throws IllegalAccessException {
+        String diffType = diffField.getName();
+        String content = String.join("\n", diffLines);
+        diffField.set(diffContentItem, content);
+        // If the lines modified in the PatchSet are not deleted, they are utilized to populate newContent and
+        // charToLineMapItem
+        if (diffType.contains("b")) {
+            int diffCharPointer = -1;
+            for (String diffLine : diffLines) {
+                // Increase of 1 to take into account of the newline character
+                diffCharPointer++;
+                charToLineMapItem.put(diffCharPointer, lineNum);
+                diffCharPointer += diffLine.length();
+                lineNum++;
+            }
+            // Add the last line to charToLineMapItem
+            charToLineMapItem.put(diffCharPointer +1, lineNum);
+            newContent.addAll(diffLines);
+        }
+        // If the lines modified in the PatchSet are deleted, they are mapped in charToLineMapItem to current lineNum
+        else {
+            charToLineMapItem.put(content.length(), lineNum);
+        }
+
+        if (config.getGptFullFileReview() || !diffType.equals("ab")) {
+            // Store the new field's value in the output diff content `outputContentItem`
+            diffField.set(outputDiffContentItem, content);
+        }
+    }
+
+    private void processFileDiffItem(Field inputDiffField, InputFileDiff.Content contentItem) {
         try {
             // Get the `a`, `b` or `ab` field's value from the input diff content
             @SuppressWarnings("unchecked")
@@ -70,18 +107,12 @@
             if (isCommitMessage) {
                 filterCommitMessageContent(diffLines);
             }
-            if (config.getGptFullFileReview() || !diffType.equals("ab")) {
-                // Get the corresponding `a`, `b` or `ab` field from the output diff class
-                Field outputDiffField = OutputFileDiff.Content.class.getDeclaredField(diffType);
-                // Store the new field's value in the output diff content `outputContentItem`
-                outputDiffField.set(outputContentItem, String.join("\n", diffLines));
-            }
-            // If the lines modified in the PatchSet are not deleted, they are utilized to populate newContent
-            if (diffType.contains("b")) {
-                newContent.addAll(diffLines);
-            }
+            // Get the corresponding `a`, `b` or `ab` field from the output diff class
+            Field diffField = DiffContent.class.getDeclaredField(inputDiffField.getName());
+            updateCodeEntities(diffField, diffLines);
+
         } catch (IllegalAccessException | NoSuchFieldException e) {
-            log.error("Error while processing file difference (diff type: {})", diffType, e);
+            log.error("Error while processing file difference (diff type: {})", inputDiffField.getName(), e);
         }
     }
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/InlineCode.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/InlineCode.java
index edc64d1..881f2c8 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/InlineCode.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/InlineCode.java
@@ -3,7 +3,7 @@
 import com.google.gson.JsonObject;
 import com.google.gson.Gson;
 import com.googlesource.gerrit.plugins.chatgpt.client.model.ChatGptSuggestionPoint;
-import com.googlesource.gerrit.plugins.chatgpt.client.model.GerritCommentRange;
+import com.googlesource.gerrit.plugins.chatgpt.client.model.GerritCodeRange;
 import lombok.extern.slf4j.Slf4j;
 
 import java.util.ArrayList;
@@ -15,10 +15,10 @@
     private final Gson gson = new Gson();
     private final CodeFinder codeFinder;
     private final List<String> newContent;
-    private GerritCommentRange range;
+    private GerritCodeRange range;
 
     public InlineCode(FileDiffProcessed fileDiffProcessed) {
-        codeFinder = new CodeFinder(fileDiffProcessed.getDiff());
+        codeFinder = new CodeFinder(fileDiffProcessed.getCodeFinderDiffs());
         newContent = fileDiffProcessed.getNewContent();
     }
 
@@ -36,7 +36,7 @@
     public String getInlineCode(JsonObject commentProperty) {
         if (commentProperty.has("range")) {
             List<String> codeByRange = new ArrayList<>();
-            range = gson.fromJson(commentProperty.get("range"), GerritCommentRange.class);
+            range = gson.fromJson(commentProperty.get("range"), GerritCodeRange.class);
             for (int line_num = range.start_line; line_num <= range.end_line; line_num++) {
                 codeByRange.add(getLineSlice(line_num));
             }
@@ -47,7 +47,7 @@
         }
     }
 
-    public Optional<GerritCommentRange> findCommentRange(ChatGptSuggestionPoint suggestion) {
+    public Optional<GerritCodeRange> findCommentRange(ChatGptSuggestionPoint suggestion) {
         int commentedLine;
         try {
             commentedLine = suggestion.getLineNumber();
@@ -57,7 +57,7 @@
             commentedLine = newContent.size() / 2;
         }
 
-        return Optional.ofNullable(codeFinder.findCode(suggestion, commentedLine));
+        return Optional.ofNullable(codeFinder.findCommentedCode(suggestion, commentedLine));
     }
 
 }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/model/CodeFinderDiff.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/model/CodeFinderDiff.java
new file mode 100644
index 0000000..2dae0f5
--- /dev/null
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/model/CodeFinderDiff.java
@@ -0,0 +1,13 @@
+package com.googlesource.gerrit.plugins.chatgpt.client.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+import java.util.TreeMap;
+
+@AllArgsConstructor
+@Data
+public class CodeFinderDiff {
+    private DiffContent content;
+    private TreeMap<Integer, Integer> charToLineMap;
+}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/model/DiffContent.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/model/DiffContent.java
new file mode 100644
index 0000000..65c3818
--- /dev/null
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/model/DiffContent.java
@@ -0,0 +1,10 @@
+package com.googlesource.gerrit.plugins.chatgpt.client.model;
+
+import lombok.Data;
+
+@Data
+public class DiffContent {
+    public String a;
+    public String b;
+    public String ab;
+}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/model/GerritCommentRange.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/model/GerritCodeRange.java
similarity index 88%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/model/GerritCommentRange.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/model/GerritCodeRange.java
index 06b2429..44a62b0 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/model/GerritCommentRange.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/model/GerritCodeRange.java
@@ -5,7 +5,7 @@
 
 @Data
 @Builder(toBuilder = true)
-public class GerritCommentRange {
+public class GerritCodeRange {
 
     public int start_line;
     public int end_line;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/model/OutputFileDiff.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/model/OutputFileDiff.java
index f2a4fbd..d58bdba 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/model/OutputFileDiff.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/model/OutputFileDiff.java
@@ -8,18 +8,10 @@
 @EqualsAndHashCode(callSuper = true)
 @Data
 public class OutputFileDiff extends FileDiff {
-    private List<Content> content;
+    private List<DiffContent> content;
 
     public OutputFileDiff(Meta meta_a, Meta meta_b) {
         this.meta_a = meta_a;
         this.meta_b = meta_b;
     }
-
-
-    @Data
-    public static class Content {
-        public String a;
-        public String b;
-        public String ab;
-    }
 }
diff --git a/src/test/resources/__files/chatGptResponseByPoints.json b/src/test/resources/__files/chatGptResponseByPoints.json
index bd28369..4a8a5ed 100644
--- a/src/test/resources/__files/chatGptResponseByPoints.json
+++ b/src/test/resources/__files/chatGptResponseByPoints.json
@@ -4,7 +4,7 @@
       "index": 0,
       "message": {
         "role": "assistant",
-        "content": "```json\n[\n    {\n      \"suggestion\": \"The commit message 'Test Commit Message' is too vague and does not provide information about the specific changes made. A more detailed message is necessary to understand what has been fixed.\"\n    },\n    {\n      \"suggestion\": \"Confirm that the method 'importclass' is meant to change its behavior when 'class_name' is None. The new lines suggest 'class_name' will be derived from the 'module_name' in such cases, which can have unintended effects if not explicitly intended.\",\n      \"filename\": \"test_file.py\",\n      \"lineNumber\": 19,\n      \"codeSnippet\": \"if not class_name:\n        module_name, class_name = module_name.rsplit('.', 1)\"\n    },\n    {\n      \"suggestion\": \"The added check to determine if 'class_name' is None seems to modify the 'module_name' by splitting it and taking the last element. There should be an assignment to 'class_name' since the class to be imported is meant to be the last part of 'module_name' after splitting.\",\n      \"filename\": \"test_file.py\",\n      \"lineNumber\": 20,\n      \"codeSnippet\": \"module_name, class_name = module_name.rsplit('.', 1)\"\n    },\n    {\n      \"suggestion\": \"In the line where 'module_name' is being split, there's no handling of the case where 'module_name' does not contain a period. This could potentially raise an exception.\",\n      \"filename\": \"test_file.py\",\n      \"lineNumber\": 20,\n      \"codeSnippet\": \"module_name, class_name = module_name.rsplit('.', 1)\"\n    },\n    {\n      \"suggestion\": \"There is a typo in the import statement. The correct function should be 'import_module' from the 'importlib' module, not 'importclass' which does not exist.\",\n      \"filename\": \"test_file.py\",\n      \"lineNumber\": 21,\n      \"codeSnippet\": \"loaded_module = importclass(module_name, fromlist=[class_name])\"\n    }\n  ]\n```"
+        "content": "```json\n[\n    {\n      \"suggestion\": \"The commit message 'Test Commit Message' is too vague and does not provide information about the specific changes made. A more detailed message is necessary to understand what has been fixed.\"\n    },\n    {\n      \"suggestion\": \"Confirm that the method 'importclass' is meant to change its behavior when 'class_name' is None. The new lines suggest 'class_name' will be derived from the 'module_name' in such cases, which can have unintended effects if not explicitly intended.\",\n      \"filename\": \"test_file.py\",\n      \"lineNumber\": 19,\n      \"codeSnippet\": \"if not class_name:\n        module_name, class_name = module_name.rsplit('.', 1)\"\n    },\n    {\n      \"suggestion\": \"The added check to determine if 'class_name' is None seems to modify the 'module_name' by splitting it and taking the last element. There should be an assignment to 'class_name' since the class to be imported is meant to be the last part of 'module_name' after splitting.\",\n      \"filename\": \"test_file.py\",\n      \"lineNumber\": 20,\n      \"codeSnippet\": \"module_name, class_name = module_name.rsplit('.', 1)\"\n    },\n    {\n      \"suggestion\": \"The code line 'from types import Any, Callable, ...' should use 'typing' for imports instead of 'types'.\",\n      \"filename\": \"test_file.py\",\n      \"lineNumber\": 1,\n      \"codeSnippet\": \"from types import\"\n    },\n    {\n      \"suggestion\": \"There is a typo in the import statement. The correct function should be 'import_module' from the 'importlib' module, not 'importclass' which does not exist.\",\n      \"filename\": \"test_file.py\",\n      \"lineNumber\": 21,\n      \"codeSnippet\": \"loaded_module = importclass(module_name, fromlist=[class_name])\"\n    }\n  ]\n```"
       }
     }
   ]
diff --git a/src/test/resources/__files/gerritPatchSetByPoints.json b/src/test/resources/__files/gerritPatchSetByPoints.json
index d89bdad..fb8384d 100644
--- a/src/test/resources/__files/gerritPatchSetByPoints.json
+++ b/src/test/resources/__files/gerritPatchSetByPoints.json
@@ -1 +1 @@
-{"comments":{"test_file.py":[{"line":19,"range":{"start_line":19,"end_line":20,"start_character":4,"end_character":60},"message":"Confirm that the method \u0027importclass\u0027 is meant to change its behavior when \u0027class_name\u0027 is None. The new lines suggest \u0027class_name\u0027 will be derived from the \u0027module_name\u0027 in such cases, which can have unintended effects if not explicitly intended."},{"line":20,"range":{"start_line":20,"end_line":20,"start_character":8,"end_character":60},"message":"The added check to determine if \u0027class_name\u0027 is None seems to modify the \u0027module_name\u0027 by splitting it and taking the last element. There should be an assignment to \u0027class_name\u0027 since the class to be imported is meant to be the last part of \u0027module_name\u0027 after splitting."},{"line":20,"range":{"start_line":20,"end_line":20,"start_character":8,"end_character":60},"message":"In the line where \u0027module_name\u0027 is being split, there\u0027s no handling of the case where \u0027module_name\u0027 does not contain a period. This could potentially raise an exception."},{"line":21,"range":{"start_line":21,"end_line":21,"start_character":4,"end_character":67},"message":"There is a typo in the import statement. The correct function should be \u0027import_module\u0027 from the \u0027importlib\u0027 module, not \u0027importclass\u0027 which does not exist."}]},"message":"The commit message \u0027Test Commit Message\u0027 is too vague and does not provide information about the specific changes made. A more detailed message is necessary to understand what has been fixed."}
\ No newline at end of file
+{"comments":{"test_file.py":[{"line":19,"range":{"start_line":19,"end_line":20,"start_character":4,"end_character":60},"message":"Confirm that the method \u0027importclass\u0027 is meant to change its behavior when \u0027class_name\u0027 is None. The new lines suggest \u0027class_name\u0027 will be derived from the \u0027module_name\u0027 in such cases, which can have unintended effects if not explicitly intended."},{"line":20,"range":{"start_line":20,"end_line":20,"start_character":8,"end_character":60},"message":"The added check to determine if \u0027class_name\u0027 is None seems to modify the \u0027module_name\u0027 by splitting it and taking the last element. There should be an assignment to \u0027class_name\u0027 since the class to be imported is meant to be the last part of \u0027module_name\u0027 after splitting."},{"line":1,"range":{"start_line":1,"end_line":1,"start_character":0,"end_character":17},"message":"The code line \u0027from types import Any, Callable, ...\u0027 should use \u0027typing\u0027 for imports instead of \u0027types\u0027."},{"line":21,"range":{"start_line":21,"end_line":21,"start_character":4,"end_character":67},"message":"There is a typo in the import statement. The correct function should be \u0027import_module\u0027 from the \u0027importlib\u0027 module, not \u0027importclass\u0027 which does not exist."}]},"message":"The commit message \u0027Test Commit Message\u0027 is too vague and does not provide information about the specific changes made. A more detailed message is necessary to understand what has been fixed."}
\ No newline at end of file
diff --git a/src/test/resources/__files/gerritPatchSetDiffTestFile.json b/src/test/resources/__files/gerritPatchSetDiffTestFile.json
index 59dcd99..d5e78fe 100644
--- a/src/test/resources/__files/gerritPatchSetDiffTestFile.json
+++ b/src/test/resources/__files/gerritPatchSetDiffTestFile.json
@@ -19,7 +19,7 @@
   "content": [
     {
       "ab": [
-        "from typing import Any, Callable, Type, Union",
+        "from types import Any, Callable, Type, Union",
         "",
         "__all__ = [\"importclass\", \"preprocess_classes\", \"TypeClassOrPath\"]",
         "",
diff --git a/src/test/resources/reducePatchSet/patchSetDiffOutput.json b/src/test/resources/reducePatchSet/patchSetDiffOutput.json
index c5785fb..bdd0c42 100644
--- a/src/test/resources/reducePatchSet/patchSetDiffOutput.json
+++ b/src/test/resources/reducePatchSet/patchSetDiffOutput.json
@@ -1 +1 @@
-[{"content":[{"b":"Test Commit Message"}],"meta_b":{"name":"/COMMIT_MSG","content_type":"text/x-gerrit-commit-message"}},{"content":[{"ab":"from typing import Any, Callable, Type, Union\n\n__all__ = [\"importclass\", \"preprocess_classes\", \"TypeClassOrPath\"]\n\nTypeClassOrPath = Union[Type, str]\n\n\ndef importclass(\n    module_name: str,\n    class_name: Union[str, None] = None\n) -> Type:\n    \"\"\"\n    Dynamically import a class from a specified module.\n\n    :param module_name: The name of the module to import.\n    :param class_name: The name of the class in the module to import. Defaults to None.\n    :return: The dynamically imported class.\n    \"\"\"\n    if not class_name:\n        module_name, class_name = module_name.rsplit('.', 1)\n    loaded_module = importclass(module_name, fromlist=[class_name])"},{"a":"        return getattr(loaded_module, class_name)","b":"            return getattr(loaded_module, class_name)"}],"meta_a":{"name":"test_file.py","content_type":"text/x-python"},"meta_b":{"name":"test_file.py","content_type":"text/x-python"}}]
+[{"content":[{"b":"Test Commit Message"}],"meta_b":{"name":"/COMMIT_MSG","content_type":"text/x-gerrit-commit-message"}},{"content":[{"ab":"from types import Any, Callable, Type, Union\n\n__all__ = [\"importclass\", \"preprocess_classes\", \"TypeClassOrPath\"]\n\nTypeClassOrPath = Union[Type, str]\n\n\ndef importclass(\n    module_name: str,\n    class_name: Union[str, None] = None\n) -> Type:\n    \"\"\"\n    Dynamically import a class from a specified module.\n\n    :param module_name: The name of the module to import.\n    :param class_name: The name of the class in the module to import. Defaults to None.\n    :return: The dynamically imported class.\n    \"\"\"\n    if not class_name:\n        module_name, class_name = module_name.rsplit('.', 1)\n    loaded_module = importclass(module_name, fromlist=[class_name])"},{"a":"        return getattr(loaded_module, class_name)","b":"            return getattr(loaded_module, class_name)"}],"meta_a":{"name":"test_file.py","content_type":"text/x-python"},"meta_b":{"name":"test_file.py","content_type":"text/x-python"}}]
