realDragon11 / Trawel-Text

An open world text adventure rpg. (Source-Available, ask before redistributing.)
Other
5 stars 3 forks source link

RenameSuggestion #41

Closed AnonymousAccount4SE closed 1 year ago

AnonymousAccount4SE commented 1 year ago

Contents of branch

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 several non-descriptive method names in your repository:

/* Non-descriptive Method Name in Dragon's Trawel/src/rtrawel/unit/MonsterFactory.java */
            public int getResilence() {
                return 2;
            }

We consider "getResilence" as non-descriptive because it contains a typo, i.e., "Resilence" should be "Resilience".

/* Non-descriptive Method Name in Dragon's Trawel/src/trawel/towns/Town.java */
    public void enqueneRemove(Feature f) {
        eventsModified = true;
        timeScope.addEvent(new StructuralFeatureEvent(f,false));
    }

We consider "enqueneRemove" as non-descriptive because it also contains a typo, i.e., "enquene" should be "enqueue".

We have corrected them (including all the occurrences in other files) and submitted a pull request.

Do you agree with the judgment?

Authors AnonymousAccount4SE

realDragon11 commented 1 year ago

I'm fairly confident a real person didn't look at this, and internal spelling issues mean that I should be using different words anyway, so fixing them isn't really an improvement, just kicking the can down the road autocomplete means it's not even worth fixing these, and that I could do this but have more confidence in the security in around 4 clicks using eclipse (in fact I do that fairly often for entire renames)

if anything the correct spelling is harder for me to type, but that's another issue