AstroImageJ / astroimagej

http://astroimagej.com
GNU General Public License v3.0
13 stars 10 forks source link

RenameSuggestion #58

Closed AnonymousAccount4SE closed 1 year ago

AnonymousAccount4SE commented 1 year ago

Renaming Suggestion of Method Names to Make Them More Descriptive


Description

We have developed a tool (NameSpotter) for identifying non-descriptive method names, and using this tool we find a non-descriptive method name in your repository:

/* Non-descriptive Method Name in Nom_Fits/src/main/java/nom/tam/fits/HeaderCommentsMap.java */
    private static String simplyfyKey(String key) {
        int firstDbPoint = key.indexOf(':');
        if (firstDbPoint > 0) {
            int secondDoublePoint = key.indexOf(':', firstDbPoint + 1);
            if (secondDoublePoint > 0) {
                return key.substring(0, secondDoublePoint);
            }
        }
        return key;
    }

We considered "simplyfyKey" as non-descriptive because it contains a typo (i.e., simplyfy should be simplify). We have corrected it and submitted a pull request.

Do you agree with the judgment?

keastrid commented 1 year ago

Internal naming is not a concern, particularly with a package we don't wish to diverge from upstream.