Bot
Bot copied to clipboard
Find the most repeated code fragments code and AST snapshot of a repository
Once the bot found repeated code it should create a pull request to fix it. The bot should ask in the pull request how to name the function/method and where to place it. Each time the default branch is updated, bot should pull the default branch resolve the conflicts or reapply the changes.
This principle can make libraries out of the most frequently used code. And another principle can ensure all library methods are used, so the code is not duplicated anymore.