diff --git a/src/main/java/gr/uom/java/xmi/UMLModelASTReader.java b/src/main/java/gr/uom/java/xmi/UMLModelASTReader.java index e211f985c..bb447a266 100644 --- a/src/main/java/gr/uom/java/xmi/UMLModelASTReader.java +++ b/src/main/java/gr/uom/java/xmi/UMLModelASTReader.java @@ -240,17 +240,8 @@ private List extractInternalComments(CompilationUnit cu, String sour else if(comment.isBlockComment()) { locationInfo = generateLocationInfo(cu, sourceFile, comment, CodeElementType.BLOCK_COMMENT); } - else if(comment.isDocComment()) { - if(comment.getStartPosition() + comment.getLength() + 1 <= javaFileContent.length()) { - String textFollowing = javaFileContent.substring(comment.getStartPosition() + comment.getLength() + 1, javaFileContent.length()); - String[] lines = textFollowing.split("\\r?\\n|\\r"); - if(lines.length > 0) { - String firstLine = lines[0]; - if(!firstLine.contains("public") && !firstLine.contains("private") && !firstLine.contains("protected") && !firstLine.contains("@") && !firstLine.contains("static")) { - locationInfo = generateLocationInfo(cu, sourceFile, comment, CodeElementType.BLOCK_COMMENT); - } - } - } + else if(comment.isDocComment() && comment.getParent() == null) { + locationInfo = generateLocationInfo(cu, sourceFile, comment, CodeElementType.BLOCK_COMMENT); } if(locationInfo != null) { int start = comment.getStartPosition();