Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Applied Refactoring:
Rename Method/Variable
Extract Method
Move Method/Field
Pull-up Method
Extract Class
Rename Method
File1: MultiGaus.java
File2: EmbeddedCanvas.java
Location1: https://github.com/gavalian/groot/blob/master/src/main/java/org/jlab/groot/demo/MultiGaus.java
Location2: https://github.com/gavalian/groot/blob/master/src/main/java/org/jlab/groot/graphics/EmbeddedCanvas.java
Description: Renaming the object ‘f’ to ‘frame1’, which depicts the clear sense of the name. In addition, renaming the variable ‘w’ and ‘h’ to ‘width’ and ‘height’ respectively, which clearly sounds what, it stores as the value, where to use it in further program.
File: H1F.java
Location: https://github.com/gavalian/groot/blob/master/src/main/java/org/jlab/groot/data/H1F.java
Description: Extracting the code and creating the ‘getH1F’ method to run it filling the color as value.
To: Params.java
From: https://github.com/gavalian/groot/blob/master/src/main/java/org/jlab/groot/math/Func1D.java
From: https://github.com/gavalian/groot/blob/master/src/main/java/org/jlab/groot/math/Func2D.java
Description: Creating an interface “Params” as per the acronym of ‘Parameter’. Moving the “getNDF”, “setNDF”, “setParameters” methods from “Func1D” and “Func2D” classes.
From: H2F.java
To: Axis.java
From: https://github.com/gavalian/groot/blob/master/src/main/java/org/jlab/groot/data/H2F.java
To: https://github.com/gavalian/groot/blob/master/src/main/java/org/jlab/groot/math/Axis.java
Description: Moving three methods “isValidBins”, “getBinContent” and “scliceY” from “H2F” class to “Axis” class. The reason behind for moving is that it calls the Axis class method more than the axis class itself.
From: SetEndandOrigin.java
To: DataLine.java
To: https://github.com/gavalian/groot/blob/master/src/main/java/org/jlab/groot/data/DataLine.java
Description: Creating class “SetEndandOrigin” to run “setOrigin” and “setEnd” methods, which is moved from “DataLine” class. However, the extracted class is further extended to “DataLine” class.