You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by santiago-a-vidal <gi...@git.apache.org> on 2018/02/05 16:33:45 UTC

[GitHub] jena pull request #353: Refactoring complex methods of classes FBRuleInfGrap...

GitHub user santiago-a-vidal opened a pull request:

    https://github.com/apache/jena/pull/353

    Refactoring complex methods of classes FBRuleInfGraph and LPRuleStore

    Related to no particular issue. This is a behavior-preserving refactoring.
    
    Summary of this pull request:
    
    •	We are evaluating a research prototype called Bandago that assists in the refactoring of complex methods. Bandago is an Eclipse plugin that automatically identifies and refactors a type of code smell called Brain Method. A Brain Method centralizes the intelligence of a class and manifests itself as a long and complex method that is difficult to understand and maintain We have applied Bandago to 2 complex methods of your project, and we would like to receive feedback.
    •	Bandago is very conservative and you should not observe many source code changes (only in the affected class).
    •	The source code (after the refactoring) should behave equivalently to the original one.
    •	As a sanity check, we have run tests before and after Bandago performed the refactoring(s) on the project. All tests passed.
    •	The goal of the refactorings applied is to improve the legibility of the refactored method.
    •	In this case, Bandago refactored the method FBRuleInfGraph.prepare extracting fragments of its code into the new methods initializeDeductions, initializeTGCCache, and callPreprocessingHook. Also, the method LPRuleStore.compileAll() was refactored extracting fragments of its code into the new methods addWildCardRules and buildTwoLevelIndices.
    
    Thanks in advance for your help in this evaluation!


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/santiago-a-vidal/jena BandagoRefactorings

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/jena/pull/353.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #353
    
----
commit 5eacd1bf704122dd086dd9e939186de3d134c23f
Author: Santiago Vidal <sa...@...>
Date:   2018-02-05T16:26:50Z

    Brain methods of classes FBRuleInfGraph and LPRuleStore automatically
    refactored with Bandago

----


---

[GitHub] jena pull request #353: Refactoring complex methods of classes FBRuleInfGrap...

Posted by santiago-a-vidal <gi...@git.apache.org>.
Github user santiago-a-vidal closed the pull request at:

    https://github.com/apache/jena/pull/353


---

[GitHub] jena issue #353: Refactoring complex methods of classes FBRuleInfGraph and L...

Posted by santiago-a-vidal <gi...@git.apache.org>.
Github user santiago-a-vidal commented on the issue:

    https://github.com/apache/jena/pull/353
  
    Hi, thanks a lot for the feedback. I agree with you. The refactoring of complex methods in a class with no change since its initial implementation (and not expected to be modified in the future) may have low  priority when compared to a complex method in a class that received modifications in the last 10 most significant revisions. 
    
    Thanks again.
    
    Cheers,


---

[GitHub] jena issue #353: Refactoring complex methods of classes FBRuleInfGraph and L...

Posted by ajs6f <gi...@git.apache.org>.
Github user ajs6f commented on the issue:

    https://github.com/apache/jena/pull/353
  
    I simply don't know enough about our inferencing gear to comment on this… @der, can you say anything?


---

[GitHub] jena issue #353: Refactoring complex methods of classes FBRuleInfGraph and L...

Posted by afs <gi...@git.apache.org>.
Github user afs commented on the issue:

    https://github.com/apache/jena/pull/353
  
    Thank you to @santiago-a-vidal for this work! It is really interesting to have Bandago prototype applied the code base.   Given the age of Jena, and evolution of contributors skills, I'm sure that many places would be written somewhat differently by today's standards, my own contributions especially.
    
    The code here has not changed in 4 years (and that was a patch) so there is a balance to be discussed between changing it and leaving proven code as-is.



---