[Demonstration 1]

[Buggy Method]
@Override
public boolean isTrustedDomain(CIFSContext tf, String domain) throws SmbAuthException {
    synchronized (this.domainsLock) {
        Map<String, Map<String, CacheEntry<DfsReferralDataInternal>>> domains = getTrustedDomains(tf);
        if (domains == null)
            return false;
        domain = domain.toLowerCase();
        return domains.get(domain) != null;
    }
}

[Buggy Hunk]
domain = domain.toLowerCase();

[Patch]
domain = domain.toLowerCase(Locale.ROOT);

[Demonstration 2]

[Buggy Method]
@Override
public CompanyDto convert(CompanyDomain domain) {
    CompanyDto dto = new CompanyDto();
    dto.setId(domain.getId());
    dto.setName(domain.getName());
    dto.setAddressLine1(domain.getAddressLine1());
    dto.setAddressLine2(domain.getAddressLine2());
    dto.setCity(domain.getCity());
    dto.setState(domain.getState());
    dto.setCountry(domain.getCountry());
    dto.setZipcode(dto.getZipcode());
    dto.setCreatedBy(domain.getCreatedBy());
    if (domain.getCreatedTimestamp() == null) {
        dto.setCreateDateTime(null);
    } else {
        Calendar createDateTime = Calendar.getInstance();
        createDateTime.setTimeInMillis(domain.getCreatedTimestamp().getTime());
        dto.setCreateDateTime(createDateTime);
    }
    dto.setLastUpdatedBy(domain.getLastUpdatedBy());
    if (domain.getLastUpdatedTimestamp() == null) {
        dto.setLastUpdatedDateTime(null);
    } else {
        Calendar lastUpdateDateTime = Calendar.getInstance();
        lastUpdateDateTime.setTimeInMillis(domain.getLastUpdatedTimestamp().getTime());
        dto.setLastUpdatedDateTime(lastUpdateDateTime);
    }
    return dto;
}

[Buggy Hunk]
dto.setZipcode(dto.getZipcode());

[Patch]
dto.setZipcode(domain.getZipcode());

[Demonstration 3]

[Buggy Method]
public boolean isQualityBad() {
    return quality != null || quality == Quality.BAD;
}

[Buggy Hunk]
return quality != null || quality == Quality.BAD;

[Patch]
return quality != null && quality == Quality.BAD;