algomaster99 / diffmin-examples

0 stars 0 forks source link

Syntactical minimisation of semantically equivalent code elements #16

Open algomaster99 opened 2 years ago

algomaster99 commented 2 years ago

https://github.com/patrick-conley/android-music-player/pull/32/files#diff-b8858ed82a1fad3c3b82fb81428e9e7ffe0656dce661ef23966a39cb0cb6c77cL50-R55

switch-case block is smartly converted to an if-block.

algomaster99 commented 2 years ago

If something is commented, the node itself should not be shown in the file because it is equivalent to that. https://github.com/empty-works/ftp-client-in-java/pull/3/files#diff-77e8a1b9111368b04cc8f991c7e44bd896ef8794dc8abb7047cede2fff271032L43-R44

algomaster99 commented 2 years ago

read(0, len) is same as readAllBytes(). See https://github.com/sjamesr/jfreesane/pull/89/files#diff-a7eda77c454092a316a6e066766a42e8ec89580c9f5abb7f57c95511a6e1b7b1L777-R776.

algomaster99 commented 2 years ago

For-loop minimisation: https://github.com/sjamesr/jfreesane/pull/89/files#diff-26c84ebd56d26f18c3999d70ed9098d9146c49d5be37f18d34ff5ef67412079eL40-R40

algomaster99 commented 2 years ago

!Objects.nonNull is changed to == null https://github.com/avniproject/avni-server/pull/80/files#diff-694a1b58ff8c63b073b617695e9420cf68d838fb21835062d6ef764e3914fd2eL37-R48