Source:
<code>public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { <START> if (null != property) { <END> switch (property) { case "parentCount": { RevCommit commit = AdapterUtils.adapt(receiver, RevCommit.class); if (commit == null) { return false; } if (expectedValue instanceof Integer) { return commit.getParentCount() <= ((Integer) expectedValue) .intValue(); } else { return computeResult(expectedValue, commit.getParentCount() > 0); } } case "isBare": { Repository repository = AdapterUtils.adapt(receiver, Repository.class); if (repository != null) { return computeResult(expectedValue, repository.isBare()); } break; } case "isSafe": { Repository repository = AdapterUtils.adapt(receiver, Repository.class); if (repository != null) { return computeResult(expectedValue, repository .getRepositoryState().equals(RepositoryState.SAFE)); } break; } case "canCommit": { Repository repository = AdapterUtils.adapt(receiver, Repository.class); if (repository != null) { return computeResult(expectedValue, repository.getRepositoryState().canCommit()); } break; } case "hasMultipleRefs": { IRepositoryCommit commit = AdapterUtils.adapt(receiver, IRepositoryCommit.class); if (commit != null) { return computeResult(expectedValue, hasMultipleRefs(commit, toRefNames(args))); } break; } case "hasRef": { IRepositoryCommit commit = AdapterUtils.adapt(receiver, IRepositoryCommit.class); if (commit != null) { return computeResult(expectedValue, hasRef(commit, toRefNames(args))); } break; } case "isStash": { RepositoryCommit commit = AdapterUtils.adapt(receiver, RepositoryCommit.class); return computeResult(expectedValue, commit != null && commit.isStash()); } default: break; } } return false; }</code><technical_language>Unnecessary Yoda condition</technical_language>

Target:
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { if (property != null) { switch (property) { case "parentCount": { RevCommit commit = AdapterUtils.adapt(receiver, RevCommit.class); if (commit == null) { return false; } if (expectedValue instanceof Integer) { return commit.getParentCount() <= ((Integer) expectedValue) .intValue(); } else { return computeResult(expectedValue, commit.getParentCount() > 0); } } case "isBare": { Repository repository = AdapterUtils.adapt(receiver, Repository.class); if (repository != null) { return computeResult(expectedValue, repository.isBare()); } break; } case "isSafe": { Repository repository = AdapterUtils.adapt(receiver, Repository.class); if (repository != null) { return computeResult(expectedValue, repository .getRepositoryState().equals(RepositoryState.SAFE)); } break; } case "canCommit": { Repository repository = AdapterUtils.adapt(receiver, Repository.class); if (repository != null) { return computeResult(expectedValue, repository.getRepositoryState().canCommit()); } break; } case "hasMultipleRefs": { IRepositoryCommit commit = AdapterUtils.adapt(receiver, IRepositoryCommit.class); if (commit != null) { return computeResult(expectedValue, hasMultipleRefs(commit, toRefNames(args))); } break; } case "hasRef": { IRepositoryCommit commit = AdapterUtils.adapt(receiver, IRepositoryCommit.class); if (commit != null) { return computeResult(expectedValue, hasRef(commit, toRefNames(args))); } break; } case "isStash": { RepositoryCommit commit = AdapterUtils.adapt(receiver, RepositoryCommit.class); return computeResult(expectedValue, commit != null && commit.isStash()); } default: break; } } return false; }