Source:
<code>protected void configureGroup(ResourceGroup group, ResourceGroupSpec match) { if (match.getSoftMemoryLimit().isPresent()) { group.setSoftMemoryLimit(match.getSoftMemoryLimit().get()); } else { synchronized (generalPoolMemoryFraction) { double fraction = match.getSoftMemoryLimitFraction().get(); generalPoolMemoryFraction.put(group, fraction); group.setSoftMemoryLimit(new DataSize(generalPoolBytes * fraction, BYTE)); } } group.setMaxQueuedQueries(match.getMaxQueued()); group.setMaxRunningQueries(match.getMaxRunning()); <START> match.getQueuedTimeout().ifPresent(timeout -> group.setQueuedTimeLimit(timeout)); <END> match.getRunningTimeout().ifPresent(timeout -> group.setRunningTimeLimit(timeout)); if (match.getSchedulingPolicy().isPresent()) { group.setSchedulingPolicy(match.getSchedulingPolicy().get()); } if (match.getSchedulingWeight().isPresent()) { group.setSchedulingWeight(match.getSchedulingWeight().get()); } if (match.getJmxExport().isPresent() && match.getJmxExport().get() != group.getJmxExport()) { group.setJmxExport(match.getJmxExport().get()); } if (match.getSoftCpuLimit().isPresent() || match.getHardCpuLimit().isPresent()) { checkState(getCpuQuotaPeriodMillis().isPresent(), "Must specify hard CPU limit in addition to soft limit"); Duration limit; if (match.getHardCpuLimit().isPresent()) { limit = match.getHardCpuLimit().get(); } else { limit = match.getSoftCpuLimit().get(); } long rate = (long) Math.min(1000.0 * limit.toMillis() / (double) getCpuQuotaPeriodMillis().get().toMillis(), Long.MAX_VALUE); rate = Math.max(1, rate); group.setCpuQuotaGenerationMillisPerSecond(rate); } if (match.getSoftCpuLimit().isPresent()) { group.setSoftCpuLimit(match.getSoftCpuLimit().get()); } if (match.getHardCpuLimit().isPresent()) { group.setHardCpuLimit(match.getHardCpuLimit().get()); } }</code><technical_language>if(isPresent) style consistent surrounding code</technical_language>

Target:
protected void configureGroup(ResourceGroup group, ResourceGroupSpec match) { if (match.getSoftMemoryLimit().isPresent()) { group.setSoftMemoryLimit(match.getSoftMemoryLimit().get()); } else { synchronized (generalPoolMemoryFraction) { double fraction = match.getSoftMemoryLimitFraction().get(); generalPoolMemoryFraction.put(group, fraction); group.setSoftMemoryLimit(new DataSize(generalPoolBytes * fraction, BYTE)); } } group.setMaxQueuedQueries(match.getMaxQueued()); group.setMaxRunningQueries(match.getMaxRunning()); if (match.getQueuedTimeLimit().isPresent()) { group.setQueuedTimeLimit(match.getQueuedTimeLimit().get()); } if (match.getRunningTimeLimit().isPresent()) { group.setRunningTimeLimit(match.getRunningTimeLimit().get()); } if (match.getSchedulingPolicy().isPresent()) { group.setSchedulingPolicy(match.getSchedulingPolicy().get()); } if (match.getSchedulingWeight().isPresent()) { group.setSchedulingWeight(match.getSchedulingWeight().get()); } if (match.getJmxExport().isPresent() && match.getJmxExport().get() != group.getJmxExport()) { group.setJmxExport(match.getJmxExport().get()); } if (match.getSoftCpuLimit().isPresent() || match.getHardCpuLimit().isPresent()) { checkState(getCpuQuotaPeriod().isPresent(), "Must specify hard CPU limit in addition to soft limit"); Duration limit; if (match.getHardCpuLimit().isPresent()) { limit = match.getHardCpuLimit().get(); } else { limit = match.getSoftCpuLimit().get(); } long rate = (long) Math.min(1000.0 * limit.toMillis() / (double) getCpuQuotaPeriod().get().toMillis(), Long.MAX_VALUE); rate = Math.max(1, rate); group.setCpuQuotaGenerationMillisPerSecond(rate); } if (match.getSoftCpuLimit().isPresent()) { group.setSoftCpuLimit(match.getSoftCpuLimit().get()); } if (match.getHardCpuLimit().isPresent()) { group.setHardCpuLimit(match.getHardCpuLimit().get()); } }