Identifying Refactoring Opportunities for Replacing Type Code with Subclass and State
summary
The work presents an automated analysis for finding places in Java code where a numeric or enum-like ‘‘control-field’’ should be refactored into subclasses or into state objects. It defines control-fields formally, gives algorithms to detect and prune them, and uses a flow- and context-sensitive analysis to classify each candidate as either Replace Type Code with Subclass or Replace Type Code with State. The approach is implemented in a tool called Auto-SCST and was evaluated on eight open-source Java applications.
AI-written summary · about
related talks
50mGuide Refactorings With Behavioral Code Analysis
02h 42mClean Code: The Next Chapter
50mExpanding the scope of refactoring to fix Java security problems
54mResolving technical debts in software architecture
55mIdentifying Common Code Smells (In C++)
50mRefactoring Is Not Just Clickbait
47mSave or Reimplement?
39mCoding with dinosaurs
