-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature ataraxie/codeshovel#64: Extend CodeShovel to capture JavaDoc #65
Feature ataraxie/codeshovel#64: Extend CodeShovel to capture JavaDoc #65
Conversation
- Add a json key `functionJavaDoc` which contains the java doc string TODO: implement "getInitialJavaDoc" for python and typescript - For python implement here: PythonFunction.java - For typescript implement here: TypeScriptFunction.java Discussion link: ataraxie#64
I realized |
- Add a new change type Ydocchange which extends Ysignaturechange - Rename everywhere reference of *javaDoc* -> Doc to keep things consistent with python and typescript implementation TODO list: - Implement `getInitialDoc` in `com/felixgrund/codeshovel/parser/impl/PythonFunction.java` - Implement `getInitialDoc` in `com/felixgrund/codeshovel/parser/impl/TypeScriptFunction.java` - Handle `Ydocchange` in `src/main/java/com/felixgrund/codeshovel/parser/impl/TypeScriptParser.java` - Handle `Ydocchange` in `src/main/java/com/felixgrund/codeshovel/parser/impl/PythonParser.java` - Get the diff for doc changes
Feature #64
An example of output for reference: "f7cda475cd784369a345bcee687bb2de630c8d6a": {
"type": "Ydocchange",
"commitMessage": "joc change\n",
"commitDate": "23/02/21 1:39 PM",
"commitName": "f7cda475cd784369a345bcee687bb2de630c8d6a",
"commitAuthor": "Syed Ishtiaque Ahmad",
"commitDateOld": "23/02/21 12:21 PM",
"commitNameOld": "76efe8b277f2be70003630ef53b4b44ebc123ec2",
"commitAuthorOld": "Syed Ishtiaque Ahmad",
"daysBetweenCommits": 0.05,
"commitsBetweenForRepo": 1,
"commitsBetweenForFile": 1,
"actualSource": "@SuppressWarnings(\"Hello changed the annotation\")\npublic void testSumagain() throws ArithmeticException, ArrayIndexOutOfBoundsExceptionthrows {\n Calculator calculator \u003d new Calculator();\n int result \u003d calculator.sum(2, 2);\n int iby4 \u003d calculator.incrementBy4(result);\n Assert.assertTrue(result \u003d\u003d 4);\n Assert.assertEquals(8, iby4);\n}",
"path": "src/test/java/com/github/stokito/unitTestExample/calculator/CalculatorTest.java",
"functionStartLine": 14,
"functionName": "testSumagain",
"functionAnnotation": "@SuppressWarnings(\"Hello changed the annotation\")",
"functionDoc": "\n@params empty params\n@throws ArithmeticException\n@throws ArrayIndexOutOfBoundsExceptionthrows\n",
"diff": "",
"extendedDetails": {
"oldValue": "\n@throws ArithmeticException\n@throws ArrayIndexOutOfBoundsExceptionthrows\n",
"newValue": "\n@params empty params\n@throws ArithmeticException\n@throws ArrayIndexOutOfBoundsExceptionthrows\n"
}
} |
I'm realizing that this may be a bigger change than the annotation change. We would probably want to use javadoc in the similarity algorithm. |
Is this because you want to track Example of a proper
|
Sorry should have replied here 😅 I think the description of the method may be useful in discerning if two methods match or are "the same method". |
b8b1a6e
to
09ce0d3
Compare
@ishtiaque05 great work with this PR. It's really interesting to go through the oracles to see how pervasive doc changes are (and how they do (and do not) line up with other kinds of changes. |
Hi, could we merge this with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
functionJavaDoc
which contains the java doc stringTODO: implement "getInitialJavaDoc" for python and typescript
Discussion link: Track method documentation changes #64