Fifty years of programming language research, and we end up with C++?
  • Richard A. O'Keefe
Home FAQs Slice Extraction threshold preferences
Slice Extraction threshold preferences PDF Print E-mail

In order to reduce the number of reported Slice Extraction refactoring suggestions, you can adjust various threshold values through Eclipse preferences.

1. Open Eclipse preferences (Eclipse menu -> Window -> Preferences)

2. From the menu of Preferences dialog navigate to JDeodorant as shown below:

Slice Extraction threshold preferences

Minimum number of slice statements: Each slice suggested to be extracted as a new method should contain an equal or larger number of statements compared to the defined threshold value (positive integer).

Maximum number of slice statements: Each slice suggested to be extracted as a new method should contain an equal or smaller number of statements compared to the total number of method statements (i.e. method size) minus the defined threshold value (positive integer).

Maximum number of duplicated statements: Each slice suggested to be extracted as a new method should contain an equal or smaller number of statements that will be duplicated to both the original and the extracted method compared to the defined threshold value (positive integer).

Maximum ratio of duplicated to extracted statements: Each slice suggested to be extracted as a new method should correspond to a ratio of duplicated to extracted statements which is equal or lower than the defined threshold value (double within range [0, 1]).

Minimum number of statements in method: The methods being examined for refactoring opportunities should contain an equal or larger number of statements compared to the defined threshold value (positive integer).

Maximum depth of method call graph analysis: This value expresses the maximum traversal depth of the call graphs corresponding to invoked methods from libraries (positive integer).

Enable Alias Analysis: Enables or disables the application of Alias Analysis within the body of the examined methods (boolean).

Project CompilationUnit cache size: This value expresses the maximum number of CompilationUnits (belonging to the Project under examination) that will be held in memory.

Library CompilationUnit cache size: This value expresses the maximum number of CompilationUnits (belonging to libraries required by the examined Project) that will be held in memory.

The cache mechanism operates like a queue (i.e. if the queue is full and the requested CompilationUnit is not already present in the queue, then the oldest CompilationUnit is removed from the head of the queue and the new CompilationUnit is placed in the tail of the queue). Increasing the queue size may improve the speed of program analysis, but will also significantly increase the amount of reserved memory.

After pressing the Apply button, the new threshold values are stored permanently. Restore Defaults button restores the originally defined threshold values. The original values assigned to thresholds do not affect the number of reported Slice Extraction refactoring suggestions.

 
RocketTheme Joomla Templates