• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java code refactoring

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I was searching for a java code with have 1000 lines for a refactoring project.
The main goal for this is that I need to identify smells and should be refactored.

Please can anyone provide me your suggestions on how can progress on this?
 
Ranch Hand
Posts: 334
2
Netbeans IDE Tomcat Server Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Refactoring is a pretty general term and can mean a lot of things.

My coding style used to be called Stepwise Refinement and that has morphed into sort of a constant refactoring style. Write something that works and present it to the users with no personal investment. If they don't like it, throw it away, if they do like it bullet proof it.

So assuming you have a program that works the way you want it, the most common reason to refactor would be to make it more maintainable.

My recommendation would be to start by making sure the Javadoc is complete and accurate. This should give you a good idea where the problems are.

I can recommend the book by Martin Fowler "Refactoring: Improving the Design of Existing Code" for some good ideas.

Joe
 
Author
Posts: 63
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

pavithra murthy wrote:Hi all,

I was searching for a java code with have 1000 lines for a refactoring project.
The main goal for this is that I need to identify smells and should be refactored.

Please can anyone provide me your suggestions on how can progress on this?



You can use any open source Java code-base along with Infusion (Infusion is the design smell detection tool which is free to use for small projects).

If design smells interest you, then take a look at this post; I hope, you will appreciate it.
 
Ranch Hand
Posts: 449
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can also use some static analysis tools like FindBugs, Sonar PMD etc which helps to identify code smells and fixes.
 
30 seconds to difuse a loaf of bread ... here, use this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic