package cgeo.geocaching.models;

import cgeo.geocaching.connector.trackable.TrackableBrand;
import cgeo.geocaching.enumerations.LogTypeTrackable;

import org.apache.commons.lang3.StringUtils;

public final class TrackableLog {
    public TrackableLog(final String geocode, final String trackCode, final String name, final int id, final int ctl, final TrackableBrand brand) {
        this.geocode = geocode;
        this.trackCode = trackCode;
        this.name = name;
        this.id = id;
        this.ctl = ctl;
        this.brand = brand;
    }

    public final int ctl;
    public final int id;
    public final String geocode;
    public final String trackCode;
    public final String name;
    public final TrackableBrand brand;
    public LogTypeTrackable action = LogTypeTrackable.DO_NOTHING; // base.logTrackablesAction - no action

    public void setAction(final LogTypeTrackable logTypeTrackable) {
        action = logTypeTrackable;
    }

    @Override
    public int hashCode() {
        return StringUtils.defaultString(trackCode).hashCode();
    }

    @Override
    public boolean equals(final Object obj) {
        if (!(obj instanceof TrackableLog)) {
            return false;
        }
        final TrackableLog tb = (TrackableLog) obj;
        return StringUtils.defaultString(tb.trackCode).equals(trackCode);
    }
}

@@ -220,16 +220,311 @@
 leLog %7B%0A
+    public final int ctl;%0A    public final int id;%0A    public final String geocode;%0A    public final String trackCode;%0A    public final String name;%0A    public final TrackableBrand brand;%0A    public LogTypeTrackable action = LogTypeTrackable.DO_NOTHING; // base.logTrackablesAction - no action%0A%0A
     publ
@@ -842,303 +842,8 @@
  %7D%0A%0A
-    public final int ctl;%0A    public final int id;%0A    public final String geocode;%0A    public final String trackCode;%0A    public final String name;%0A    public final TrackableBrand brand;%0A    public LogTypeTrackable action = LogTypeTrackable.DO_NOTHING; // base.logTrackablesAction - no action%0A%0A
     

Fix codacy: Fields should be declared at the top of the class