When using the -json flag, RefactoringMiner produces a JSON object containing a list of commits. Each commit includes the repository details, the SHA1, the URL, and a list of detected refactorings.
Each refactoring entry contains:
type: The name of the refactoring (e.g., "Pull Up Attribute").description: A human-readable description of the change.leftSideLocations: An array of locations where the element existed before the refactoring.rightSideLocations: An array of locations where the element exists after the refactoring.
Location objects include filePath, startLine, endLine, startColumn, endColumn, codeElementType, description, and the codeElement string.
{
"commits": [{
"repository": "https://github.com/example/repo.git",
"sha1": "36287f7c3b09eff78395267a3ac0d7da067863fd",
"url": "https://github.com/example/repo/commit/36287f7c3b09eff78395267a3ac0d7da067863fd",
"refactorings": [{
"type": "Pull Up Attribute",
"description": "Pull Up Attribute private age : int from class org.animals.Labrador to class org.animals.Dog",
"leftSideLocations": [{
"filePath": "src/org/animals/Labrador.java",
"startLine": 5,
"endLine": 5,
"startColumn": 14,
"endColumn": 21,
"codeElementType": "FIELD_DECLARATION",
"description": "original attribute declaration",
"codeElement": "age : int"
}],
"rightSideLocations": [{
"filePath": "src/org/animals/Dog.java",
"startLine": 5,
"endLine": 5,
"startColumn": 14,
"endColumn": 21,
"codeElementType": "FIELD_DECLARATION",
"description": "pulled up attribute declaration",
"codeElement": "age : int"
}]
}]
}]
}