Skip to content

Return tag in javadocs converts to something else #421

@shahrzadav

Description

@shahrzadav

Describe the bug
The code generator at the end of the generation of a method converts all the words that equal to "return" to the killStatement + "return". This causes the return tag in javadocs to also change, and that is a bug. Here is the line where it happens.

return method.toString().replace("return ", killStatements.toString() + "\n return ");

To Reproduce
Steps to reproduce the behavior:

  1. Go to this repository and clone it 'https://github.com/shahrzadav/CogniCrypt/tree/iss296-AddCommentCodeGen'
  2. Run the project
  3. Click on Code Generator in inner eclipse
  4. Generate code for password hasher (second task)
  5. Scroll down to java docs for createPWHash method
  6. See "@pBEKeySpec.clearPassword();" inside javadocs

Expected behavior
The return tags in javadoc should not change.

Screenshots
Return-javadocs-bug

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows 10
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions