boolean (@NotNull HgChange change, Set<HgChange> changes) { if (change.getStatus().equals(HgFileStatusEnum.DELETED)) { for (HgChange otherChange : changes) { if (otherChange.getStatus().equals(HgFileStatusEnum.COPY) && otherChange.beforeFile().equals(change.afterFile())) { return true; } } } return false; }