• DocumentCode
    3694250
  • Title

    Towards purity-guided refactoring in Java

  • Author

    Jiachen Yang;Keisuke Hotta;Yoshiki Higo;Shinji Kusumoto

  • Author_Institution
    Graduate School of Information Science and Technology, Osaka University, 1-5 Yamadaoka, Suita, 565-0871, Japan
  • fYear
    2015
  • Firstpage
    521
  • Lastpage
    525
  • Abstract
    Refactoring source code requires preserving a certain level of semantic behaviors, which are difficult to be checked by IDEs. Therefore, IDEs generally check syntactic pre-conditions instead before applying refactoring, which are often too restrictive than checking semantic behaviors. On the other hand, there are pure functions in the source code that do not have observable side-effects, of which semantic behaviors are more easily to be checked. In this research, we propose purity-guided refactoring, which applies high-level refactoring such as memoization on pure functions that can be detected statically. By combining our purity analyzing tool purano with refactoring, we can ensure the preservation of semantic behaviors on these detected pure functions, which is impossible through previous refactoring operations provided by IDEs. As a case study of our approach, we applied memorization refactoring on several open-source software in Java. We observed improvements of the performance and preservation of semantics by profiling their bundled test cases.
  • Keywords
    "Semantics","Java","Syntactics","Software","Libraries","Optimization","Maintenance engineering"
  • Publisher
    ieee
  • Conference_Titel
    Software Maintenance and Evolution (ICSME), 2015 IEEE International Conference on
  • Type

    conf

  • DOI
    10.1109/ICSM.2015.7332506
  • Filename
    7332506