Ignore:
Timestamp:
2016-03-17T01:50:12+01:00 (8 years ago)
Author:
Don-vip
Message:

sonar - Local variable and method parameter names should comply with a naming convention

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Diff.java

    r9231 r10001  
    177177        for (int c = 1;; ++c) {
    178178            int d;          /* Active diagonal. */
    179             boolean big_snake = false;
     179            boolean bigSnake = false;
    180180
    181181            /* Extend the top-down search by an edit step in each diagonal. */
     
    204204                }
    205205                if (x - oldx > SNAKE_LIMIT) {
    206                     big_snake = true;
     206                    bigSnake = true;
    207207                }
    208208                fd[fdiagoff + d] = x;
     
    238238                }
    239239                if (oldx - x > SNAKE_LIMIT) {
    240                     big_snake = true;
     240                    bigSnake = true;
    241241                }
    242242                bd[bdiagoff + d] = x;
     
    255255       of changes, the algorithm is linear in the file size.  */
    256256
    257             if (c > 200 && big_snake && heuristic) {
     257            if (c > 200 && bigSnake && heuristic) {
    258258                int best = 0;
    259259                int bestpos = -1;
     
    618618         */
    619619        int[] equivCount() {
    620             int[] equiv_count = new int[equivMax];
     620            int[] equivCount = new int[equivMax];
    621621            for (int i = 0; i < bufferedLines; ++i) {
    622                 ++equiv_count[equivs[i]];
    623             }
    624             return equiv_count;
     622                ++equivCount[equivs[i]];
     623            }
     624            return equivCount;
    625625        }
    626626
     
    853853        void shift_boundaries(FileData f) {
    854854            final boolean[] changed = changedFlag;
    855             final boolean[] other_changed = f.changedFlag;
     855            final boolean[] otherChanged = f.changedFlag;
    856856            int i = 0;
    857857            int j = 0;
    858             int i_end = bufferedLines;
     858            int iEnd = bufferedLines;
    859859            int preceding = -1;
    860             int other_preceding = -1;
     860            int otherPreceding = -1;
    861861
    862862            for (;;) {
    863                 int start, end, other_start;
     863                int start, end, otherStart;
    864864
    865865                /* Scan forwards to find beginning of another run of changes.
    866866                   Also keep track of the corresponding point in the other file.  */
    867867
    868                 while (i < i_end && !changed[1+i]) {
    869                     while (other_changed[1+j++]) {
     868                while (i < iEnd && !changed[1+i]) {
     869                    while (otherChanged[1+j++]) {
    870870                        /* Non-corresponding lines in the other file
    871871                           will count as the preceding batch of changes.  */
    872                         other_preceding = j;
     872                        otherPreceding = j;
    873873                    }
    874874                    i++;
    875875                }
    876876
    877                 if (i == i_end) {
     877                if (i == iEnd) {
    878878                    break;
    879879                }
    880880
    881881                start = i;
    882                 other_start = j;
     882                otherStart = j;
    883883
    884884                for (;;) {
    885885                    /* Now find the end of this run of changes.  */
    886886
    887                     while (i < i_end && changed[1+i]) {
     887                    while (i < iEnd && changed[1+i]) {
    888888                        i++;
    889889                    }
     
    899899                       Only because the previous run was shifted here.  */
    900900
    901                     if (end != i_end && equivs[start] == equivs[end] && !other_changed[1+j]
    902                          && !((preceding >= 0 && start == preceding) || (other_preceding >= 0 && other_start == other_preceding))) {
     901                    if (end != iEnd && equivs[start] == equivs[end] && !otherChanged[1+j]
     902                         && !((preceding >= 0 && start == preceding) || (otherPreceding >= 0 && otherStart == otherPreceding))) {
    903903                        changed[1+end++] = true;
    904904                        changed[1+start++] = false;
     
    914914
    915915                preceding = i;
    916                 other_preceding = j;
     916                otherPreceding = j;
    917917            }
    918918        }
Note: See TracChangeset for help on using the changeset viewer.