Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made some variable names more consistent with the other parts. #1635

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

euske
Copy link

@euske euske commented Oct 21, 2019

Hello, we're developing an automated system that detects inconsistent variable names in a large software project. Our system checks if each variable name is consistent with other variables in the project in its usage pattern, and proposes correct candidates if inconsistency is detected. This is a part of academic research that we hope to publish soon, but as a part of the evaluation, we applied our systems to your projects and got a few interesting results. We carefully reviewed our system output and manually created a patch to correct a few variable names. We would be delighted if this patch is found to be useful. If you have a question or suggestion regarding this patch, we'd happily
answer. Thank you.

P.S. our patch is purely for readability purposes and does not change any functionality. A couple of issues that we've noticed were left untouched. For example, mixed use of variable names "msg" and "message" were fairly widespread, but we have only corrected a few notable instances to minimize our impact.

@@ -222,11 +222,11 @@ public int testCount() {
if (isTest()) {
return 1;
}
int result = 0;
int conut = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

count?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. That's a typo when I was manually copying the system output. Sorry.

The use of count was fairly common as seen in countTestCases() in junit/framework/TestSuite.java.

Copy link
Member

@kcooney kcooney Jan 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@euske I was going to fix this myself, but I can't because your pull request was made on your master branch. Please fix this and send us a new pull. This should work:

$ git branch -f master 7065f37
$ put push -f master
$ git checkout -b consisent-variable-names ce0d7c7
$ git push --set-upstream origin consisent-variable-names 

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also may want to change your master branch main. You can follow the "What Your Teammates Have to Do" instructions at https://www.git-tower.com/learn/git/faq/git-rename-master-to-main/

I suggest fixing your master branch (following my previous instructions) first

@marcphilipp marcphilipp changed the base branch from master to main June 21, 2020 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants