[Demonstration 1]

[Buggy Method]
public AWSClients getAwsClient(final String awsAccessKey, final String awsSecretKey, final String proxyHost, final int proxyPort, final String region, final String pluginVersion) {
    final Region awsRegion = Region.getRegion(Regions.fromName(region));
    final AWSClients aws;
    if (StringUtils.isEmpty(awsAccessKey) && StringUtils.isEmpty(awsSecretKey)) {
        aws = AWSClients.fromDefaultCredentialChain(awsRegion, proxyHost, proxyPort, pluginVersion);
    } else {
        aws = AWSClients.fromBasicCredentials(awsRegion, awsAccessKey, awsSecretKey, proxyHost, proxyPort, pluginVersion);
    }
    return aws;
}

[Buggy Hunk]
final Region awsRegion = Region.getRegion(Regions.fromName(region));

[Patch]
final Region awsRegion = RegionUtils.getRegion(region);

[Demonstration 2]

[Buggy Method]
public Image getFileContent() {
    return new Image(path, true);
}

[Buggy Hunk]
return new Image(path, true);

[Patch]
return new Image("file:\\" + path, true);

[Demonstration 3]

[Buggy Method]
public Region getRegion(int x, int y, boolean useRegionDimensions) {
    int regionX, regionY;
    if (useRegionDimensions) {
        regionX = x;
        regionY = y;
    } else {
        regionX = x / Region.REGION_SIZE;
        regionY = y / Region.REGION_SIZE;
    }
    if (x < 0 || y < 0 || x >= regionsWidth || y >= regionsHeight)
        return null;
    return regions[regionX + regionY * regionsWidth];
}

[Buggy Hunk]
if (x < 0 || y < 0 || x >= regionsWidth || y >= regionsHeight) return null;

[Patch]
if (regionX < 0 || regionY < 0 || regionX >= regionsWidth || regionY >= regionsHeight) return null;