class DirectoryEntryDTO implements JSONable {
        @JsonProperty
        String path;
        @JsonProperty
        Long numLines;
        @JsonProperty
        Long loc;
        @JsonProperty
        Date date;
        @JsonProperty
        String description;
        @JsonProperty
        String pathDescription;
        @JsonProperty
        boolean isDirectory;
        @JsonProperty
        Long size;

        // Needed for deserialization when testing.
        DirectoryEntryDTO() {
        }

        DirectoryEntryDTO(DirectoryEntry entry) throws ForbiddenSymlinkException, IOException {
            path = Util.fixPathIfWindows(RuntimeEnvironment.getInstance().getPathRelativeToSourceRoot(entry.getFile()));
            NullableNumLinesLOC extra = entry.getExtra();
            if (extra != null) {
                loc = entry.getExtra().getLOC();
                numLines = entry.getExtra().getNumLines();
            }
            date = entry.getDate();
            description = entry.getDescription();
            pathDescription = entry.getPathDescription();
            isDirectory = entry.getFile().isDirectory();
            if (isDirectory) {
                size = null;
            } else {
                size = entry.getFile().length();
            }
        }

        @Override
        public boolean equals(Object obj) {<FILL_FUNCTION_BODY>}

        @Override
        public int hashCode() {
            return Objects.hash(path, date, numLines, loc, description, pathDescription, isDirectory);
        }

        @Override
        public String toString() {
            return "{" + "path=" + path + ",date=" + date + ",numLines=" + numLines + ",loc=" + loc +
                    ",description=" + description + ",pathDescription=" + pathDescription +
                    ",isDirectory=" + isDirectory + "}";
        }
    }

            return Optional.ofNullable(obj)
                    .filter(other -> getClass() == other.getClass())
                    .map(DirectoryEntryDTO.class::cast)
                    .filter(other -> Objects.equals(this.path, other.path))
                    .filter(other -> Objects.equals(this.date, other.date))
                    .filter(other -> Objects.equals(this.numLines, other.numLines))
                    .filter(other -> Objects.equals(this.loc, other.loc))
                    .filter(other -> Objects.equals(this.description, other.description))
                    .filter(other -> Objects.equals(this.pathDescription, other.pathDescription))
                    .filter(other -> this.isDirectory == other.isDirectory)
                    .isPresent();
        
<no_super_class>