auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public List<ContainerRendered> getContainers(final Template template) throws DotSecurityException, DotDataException { final User systemUser = this.userAPI.getSystemUser(); final List<Container> templateContainers = this.templateAPI.getContainersInTemplate(template, systemUser, false); <START> final List<ContainerRendered> containers = new LinkedList<>(); <END> for (final Container container : templateContainers) { final List<ContainerStructure> containerStructures = this.containerAPI.getContainerStructures(container); containers.add(new ContainerRendered(container, containerStructures)); } return containers; }</code><technical_language>ArrayList, more efficent</technical_language>

Target:
public List<ContainerRendered> getContainers(final Template template) throws DotSecurityException, DotDataException { final User systemUser = this.userAPI.getSystemUser(); final List<Container> templateContainers = this.templateAPI.getContainersInTemplate(template, systemUser, false); final List<ContainerRendered> containers = new ArrayList<>(); for (final Container container : templateContainers) { final List<ContainerStructure> containerStructures = this.containerAPI.getContainerStructures(container); containers.add(new ContainerRendered(container, containerStructures)); } return containers; }
Source:
<code>public boolean configure(StaplerRequest req, JSONObject json) throws FormException { for (AdministrativeMonitor am : AdministrativeMonitor.all()) { try { <START> boolean disable = json.containsKey("administrativeMonitor") && !json.getJSONArray("administrativeMonitor").contains(am.id); <END> am.disable(disable); } catch (IOException e) { LOGGER.log(Level.WARNING, "Failed to process form submission for " + am.id, e); } } return true; }</code><technical_language>is a completr fix. If a single Administrative monitor (JSONObject is a JSONArray), error (there a bug for IIRC)</technical_language>

Target:
public boolean configure(StaplerRequest req, JSONObject json) throws FormException { JSONArray monitors = json.optJSONArray("administrativeMonitor"); for (AdministrativeMonitor am : AdministrativeMonitor.all()) { try { boolean disable; if(monitors != null) { disable = !monitors.contains(am.id); }else { disable = !am.id.equals(json.optString("administrativeMonitor")); } am.disable(disable); } catch (IOException e) { LOGGER.log(Level.WARNING, "Failed to process form submission for " + am.id, e); } } return true; }
Source:
<code>public void should_measure_size_of_simple_statement() { String queryString = "SELECT release_version FROM system.local WHERE key = ?"; SimpleStatement statement = new SimpleStatement(queryString); int expectedSize = 9 + (4 + queryString.getBytes(Charsets.UTF_8).length) + 2 + 4; assertThat(v5SizeOf(statement)).isEqualTo(expectedSize); SimpleStatement statementWithAnonymousValue = new SimpleStatement(statement.getQueryString(), "local"); assertThat(v5SizeOf(statementWithAnonymousValue)) .isEqualTo(expectedSize + 2 + (4 + "local".getBytes(Charsets.UTF_8).length) ); SimpleStatement statementWithNamedValue = new SimpleStatement(statement.getQueryString(), ImmutableMap.<String, Object>of("key", "local")); assertThat(v5SizeOf(statementWithNamedValue)) .isEqualTo(expectedSize + 2 + (2 + "key".getBytes(Charsets.UTF_8).length) + (4 + "local".getBytes(Charsets.UTF_8).length) ); statement.setFetchSize(10); expectedSize += 4; <START> assertThat(v5SizeOf(statement)).isEqualTo(expectedSize); <END> statement.setPagingStateUnsafe(MOCK_PAGING_STATE); expectedSize += 4 + MOCK_PAGING_STATE.length; assertThat(v5SizeOf(statement)).isEqualTo(expectedSize); statement.setSerialConsistencyLevel(ConsistencyLevel.LOCAL_SERIAL); expectedSize += 2; assertThat(v5SizeOf(statement)).isEqualTo(expectedSize); statement.setDefaultTimestamp(10000); expectedSize += 8; assertThat(v5SizeOf(statement)).isEqualTo(expectedSize); statement.setOutgoingPayload(MOCK_PAYLOAD); expectedSize += 2 + (2 + "key1".getBytes(Charsets.UTF_8).length) + (4 + MOCK_PAYLOAD_VALUE1.remaining()) + (2 + "key2".getBytes(Charsets.UTF_8).length) + (4 + MOCK_PAYLOAD_VALUE2.remaining()); assertThat(v5SizeOf(statement)).isEqualTo(expectedSize); }</code><technical_language>adapt if decide overestimate for session-wide defaults</technical_language>

Target:
public void should_measure_size_of_simple_statement() { String queryString = "SELECT release_version FROM system.local WHERE key = ?"; SimpleStatement statement = new SimpleStatement(queryString); int expectedSize = 9 + (4 + queryString.getBytes(Charsets.UTF_8).length) + 2 + 2 + 4 + 8 + 4; assertThat(v5SizeOf(statement)).isEqualTo(expectedSize); SimpleStatement statementWithAnonymousValue = new SimpleStatement(statement.getQueryString(), "local"); assertThat(v5SizeOf(statementWithAnonymousValue)) .isEqualTo(expectedSize + 2 + (4 + "local".getBytes(Charsets.UTF_8).length) ); SimpleStatement statementWithNamedValue = new SimpleStatement(statement.getQueryString(), ImmutableMap.<String, Object>of("key", "local")); assertThat(v5SizeOf(statementWithNamedValue)) .isEqualTo(expectedSize + 2 + (2 + "key".getBytes(Charsets.UTF_8).length) + (4 + "local".getBytes(Charsets.UTF_8).length) ); statement.setPagingStateUnsafe(MOCK_PAGING_STATE); expectedSize += 4 + MOCK_PAGING_STATE.length; assertThat(v5SizeOf(statement)).isEqualTo(expectedSize); statement.setOutgoingPayload(MOCK_PAYLOAD); expectedSize += 2 + (2 + "key1".getBytes(Charsets.UTF_8).length) + (4 + MOCK_PAYLOAD_VALUE1.remaining()) + (2 + "key2".getBytes(Charsets.UTF_8).length) + (4 + MOCK_PAYLOAD_VALUE2.remaining()); assertThat(v5SizeOf(statement)).isEqualTo(expectedSize); }
Source:
<code>public ChangeInfo get() throws RestApiException { <START> EnumSet<ListChangesOption> opts = EnumSet.allOf(ListChangesOption.class); opts.remove(ListChangesOption.CHECK); return get(opts); <END> }</code><technical_language>Just: return get(EnumSet.complementOf(EnumSet.of(ListChangesOption.CHECK)));</technical_language>

Target:
public ChangeInfo get() throws RestApiException { return get(EnumSet.complementOf(EnumSet.of(ListChangesOption.CHECK))); }
Source:
<code>static void checkForStalealertdefs () { Configuration conf = injector.getInstance(Configuration.class); LOG.info("Checking to ensure there is no stale alert definitions"); ensureConnection(); <START> String STALE_ALERT_DEFINITIONS = "select definition_name, service_name from alert_definition where service_name not in (select service_name from clusterservices) and service_name not in ('AMBARI')"; <END> ResultSet rs = null; Statement statement; try { statement = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); rs = statement.executeQuery(STALE_ALERT_DEFINITIONS); if (rs != null) { Map<String, String> alertInfo = new HashMap<>(); while (rs.next()) { alertInfo.put(rs.getString("definition_name"),rs.getString("service_name")); } if (!alertInfo.isEmpty()){ String alertInfoStr = ""; for (Map.Entry<String, String> entry : alertInfo.entrySet()) { alertInfoStr = entry.getKey() + "(" + entry.getValue() + ")" ; } warning("You have Alerts that are not mapped with any services : {}", alertInfoStr); } } } catch (SQLException e) { warning("Exception occurred during checking for stale alert definitions: ", e); } finally { if (rs != null) { try { rs.close(); } catch (SQLException e) { LOG.error("Exception occurred during checking for stale alert definitions: ", e); } } } }</code><technical_language>Minor: split multiple lines</technical_language>

Target:
static Map<String, String> checkForStalealertdefs () { Configuration conf = injector.getInstance(Configuration.class); Map<String, String> alertInfo = new HashMap<>(); LOG.info("Checking to ensure there is no stale alert definitions"); ensureConnection(); String STALE_ALERT_DEFINITIONS = "select definition_name, service_name from alert_definition where service_name not in " + "(select service_name from clusterservices) and service_name not in ('AMBARI')"; ResultSet rs = null; Statement statement; try { statement = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); rs = statement.executeQuery(STALE_ALERT_DEFINITIONS); if (rs != null) { while (rs.next()) { alertInfo.put(rs.getString("definition_name"),rs.getString("service_name")); } if (!alertInfo.isEmpty()){ String alertInfoStr = ""; for (Map.Entry<String, String> entry : alertInfo.entrySet()) { alertInfoStr = entry.getKey() + "(" + entry.getValue() + ")" ; } warning("You have Alerts that are not mapped with any services : {}.Run --auto-fix-database to fix " + "this automatically. Please backup Ambari Server database before running --auto-fix-database.", alertInfoStr); } } } catch (SQLException e) { warning("Exception occurred during checking for stale alert definitions: ", e); } finally { if (rs != null) { try { rs.close(); } catch (SQLException e) { LOG.error("Exception occurred during checking for stale alert definitions: ", e); } } } return alertInfo; }
Source:
<code><START> void validateAndClose() { <END> try { verifyEquivalencyWithStatic(staticClusterMap.hardwareLayout, staticClusterMap.partitionLayout); } finally { for (HelixAdmin admin : adminForDc.values()) { admin.close(); } } }</code><technical_language>doc</technical_language>

Target:
private void validateAndClose() { try { verifyEquivalencyWithStaticClusterMap(staticClusterMap.hardwareLayout, staticClusterMap.partitionLayout); } finally { for (HelixAdmin admin : adminForDc.values()) { admin.close(); } } }
Source:
<code>public Object[][] parsingBadRepository() { return new Object[][] { {"<LINK_0>che .git", "che .git"}, {"<LINK_0>.git", ".git"}, {"<LINK_0>myB@dR&pository.git", "myB@dR&pository.git"}, {"<LINK_0>.", "."}, {"<LINK_0>івапівап.git", "івапівап.git"}, {"<LINK_0> ", " "}, {"<LINK_0>.", "."}, <START> {"<LINK_0>repositorygit", "repositorygit"}, <END> {"<LINK_0> .git", " .git"} }; }</code><technical_language>This is a perfectly valid repository name. is in parsingBadRepository</technical_language>

Target:
public Object[][] parsingBadRepository() { return new Object[][] { {"<LINK_0>che .git", "che .git"}, {"<LINK_0>.git", ".git"}, {"<LINK_0>myB@dR&pository.git", "myB@dR&pository.git"}, {"<LINK_0>.", "."}, {"<LINK_0>івапівап.git", "івапівап.git"}, {"<LINK_0> ", " "}, {"<LINK_0>.", "."}, {"<LINK_0> .git", " .git"} }; }
Source:
<code>public boolean isToBeImported() { if ( isToBeImported == null ) { String trimmedName = trimSimpleClassName( name ); if ( notToBeImportedTypes.containsKey( trimmedName ) ) { return false; } String trimmedQualifiedName = trimSimpleClassName( qualifiedName ); String importedType = toBeImportedTypes.get( trimmedName ); <START> isToBeImported = false; <END> if ( importedType != null ) { if ( importedType.equals( trimmedQualifiedName ) ) { isToBeImported = true; } } else { toBeImportedTypes.put( trimmedName, trimmedQualifiedName ); isToBeImported = true; } } return isToBeImported; }</code><technical_language>initialize this return false line 164 well</technical_language>

Target:
public boolean isToBeImported() { if ( isToBeImported == null ) { String trimmedName = trimSimpleClassName( name ); if ( notToBeImportedTypes.containsKey( trimmedName ) ) { isToBeImported = false; return isToBeImported; } String trimmedQualifiedName = trimSimpleClassName( qualifiedName ); String importedType = toBeImportedTypes.get( trimmedName ); isToBeImported = false; if ( importedType != null ) { if ( importedType.equals( trimmedQualifiedName ) ) { isToBeImported = true; } } else { toBeImportedTypes.put( trimmedName, trimmedQualifiedName ); isToBeImported = true; } } return isToBeImported; }
Source:
<code>protected int getMaxResults() { <START> HashMap<String,String> matrixConstraints = QueryHelper.getMatrixConstraints(getUriInfo(), MAX); <END> String maxString = matrixConstraints.get(MAX); int max = Integer.valueOf(maxString); return max; }</code><technical_language>put: getUriInfo()!=null && QueryHelper.hasMatrixParam(getUriInfo(), MAX) condition here</technical_language>

Target:
protected int getMaxResults() { if (getUriInfo()!=null && QueryHelper.hasMatrixParam(getUriInfo(), MAX)) { HashMap<String,String> matrixConstraints = QueryHelper.getMatrixConstraints(getUriInfo(), MAX); String maxString = matrixConstraints.get(MAX); try { return Integer.valueOf(maxString); } catch (NumberFormatException e) { LOG.error("Max number of results is not a valid number: '" + maxString + "'. Resorting to default behavior - no limit on number of query results."); return Integer.MAX_VALUE; } } else { return Integer.MAX_VALUE; } }
Source:
<code>public static String formatShortMessage(long userId, Event event, Position position) { <START> String templatePath = Context.getConfig().getString("message.short.templatesPath", "short"); <END> return formatMessage(null, userId, event, position, templatePath); }</code><technical_language>related this pull request, I assume "full" "short" sub-paths here. Base path configurable</technical_language>

Target:
public static String formatShortMessage(long userId, Event event, Position position) { return formatMessage(null, userId, event, position, "short"); }
Source:
<code>public static int readIntBE(byte[] buffer, int offset) { int value = 0; for (int i = 0; i < 4; ++i) { value <<= 8; <START> value |= 0xFF & buffer[offset++]; <END> } return value; }</code><technical_language>offset + i faster offset++ (no assignment) :)</technical_language>

Target:
public static int readIntBE(byte[] buffer, int offset) { int value = 0; for (int i = 0; i < 4; ++i) { value <<= 8; value |= 0xFF & buffer[offset + i]; } return value; }
Source:
<code>public static void openClassLoader() throws IOException { ClassLoader myClassLoader = RetentionPolicyTest.class.getClassLoader(); <START> assert myClassLoader <END> != null; File jarFile = new File(temporaryFolder.getRoot(), "annotations-test.jar"); try (InputStream in = myClassLoader.getResourceAsStream("annotations-test.jar"); OutputStream out = new FileOutputStream(jarFile)) { Streams.copy(in, out); } classLoader = new PathClassLoader(jarFile.getAbsolutePath(), myClassLoader); }</code><technical_language>assert keyword here? Is functional? Suggest remove switch assertNotNull()</technical_language>

Target:
public static void openClassLoader() throws IOException { ClassLoader myClassLoader = RetentionPolicyTest.class.getClassLoader(); assertNotNull(myClassLoader); File jarFile = new File(temporaryFolder.getRoot(), "annotations-test.jar"); try (InputStream in = myClassLoader.getResourceAsStream("annotations-test.jar"); OutputStream out = new FileOutputStream(jarFile)) { Streams.copy(in, out); } classLoader = new PathClassLoader(jarFile.getAbsolutePath(), myClassLoader); }
Source:
<code>public LinkPreviewFunnel(WikipediaApp app, PageTitle title) { super(app, SCHEMA_NAME, REV_ID); previewSessionToken = UUID.randomUUID().toString(); appInstallID = app.getAppInstallID(); this.title = title; <START> version = ((app.getAppInstallIDInt() % linkPreviewToggleWeight) > 2) ? 0 : (app.getAppInstallIDInt() % linkPreviewToggleWeight); <END> }</code><technical_language>appInstallID here, too</technical_language>

Target:
public LinkPreviewFunnel(WikipediaApp app, PageTitle title) { super(app, SCHEMA_NAME, REV_ID); previewSessionToken = UUID.randomUUID().toString(); appInstallID = app.getAppInstallID(); this.title = title; version = LinkPreviewVersion.getVersion(app); }
Source:
<code>public Device findActiveDevice(final String deviceIdentification) throws FunctionalException { Device device; try { device = this.deviceDomainService.searchActiveDevice(deviceIdentification); } catch (final UnregisteredDeviceException e) { throw new FunctionalException(FunctionalExceptionType.UNREGISTERED_DEVICE, COMPONENT_TYPE, e); } catch (final InactiveDeviceException e) { <START> throw new FunctionalException(FunctionalExceptionType.INACTIVE_DEVICE, ComponentType.DOMAIN_CORE, e); <END> } catch (final UnknownEntityException e) { throw new FunctionalException(FunctionalExceptionType.UNKNOWN_DEVICE, COMPONENT_TYPE, e); } return device; }</code><technical_language>Component type for inactive device exception COMPONENT_TYPE (set OSGP_CORE in this file) here</technical_language>

Target:
public Device findActiveDevice(final String deviceIdentification) throws FunctionalException { Device device; try { device = this.deviceDomainService.searchActiveDevice(deviceIdentification); } catch (final UnregisteredDeviceException e) { throw new FunctionalException(FunctionalExceptionType.UNREGISTERED_DEVICE, COMPONENT_TYPE, e); } catch (final InactiveDeviceException e) { throw new FunctionalException(FunctionalExceptionType.INACTIVE_DEVICE, COMPONENT_TYPE, e); } catch (final UnknownEntityException e) { throw new FunctionalException(FunctionalExceptionType.UNKNOWN_DEVICE, COMPONENT_TYPE, e); } return device; }
Source:
<code>private void initNetworkList(Guid dataCenterId) { startProgress(); IdQueryParameters queryParams = new IdQueryParameters(dataCenterId); Frontend.getInstance().runQuery(QueryType.GetAllNetworks, queryParams, new AsyncQuery<QueryReturnValue>(returnValue -> { <START> if (getNetwork().getItems() == null || getNetwork().getSelectedItem() == null) { <END> Collection<Network> networks = returnValue.getReturnValue(); getNetwork().setItems(networks); updateNetworks(networks); stopProgress(); } })); }</code><technical_language>This line in-depended returnValue. this line in this method initNetworkList()</technical_language>

Target:
private void initNetworkList(Guid dataCenterId) { if (getNetwork().getItems() == null || getNetwork().getSelectedItem() == null) { startProgress(); IdQueryParameters queryParams = new IdQueryParameters(dataCenterId); Frontend.getInstance().runQuery(QueryType.GetAllNetworks, queryParams, new AsyncQuery<QueryReturnValue>(returnValue -> { Collection<Network> networks = returnValue.getReturnValue(); getNetwork().setItems(networks); updateNetworks(networks); stopProgress(); })); } }
Source:
<code>public String toString() { <START> return MoreObjects.toStringHelper("") <END> .add("HostName", mHostName) .add("SocketAddress", mSocketAddress) .toString(); }</code><technical_language>I confused this is supposed "" this</technical_language>

Target:
public String toString() { return MoreObjects.toStringHelper(this) .add("HostName", mHostName) .add("SocketAddress", mSocketAddress) .toString(); }
Source:
<code>public boolean handleEvent(ValidationEvent event) { if (event == null) { throw new IllegalArgumentException(); <START> } <END> String severity = null; boolean retVal = false; switch (event.getSeverity()) { case ValidationEvent.WARNING: severity = format(WARNING); retVal = true; break; case ValidationEvent.ERROR: severity = format(ERROR); retVal = false; break; case ValidationEvent.FATAL_ERROR: severity = format(FATAL_ERROR); retVal = false; break; default: assert false : format(UNRECOGNIZED_SEVERITY, event.getSeverity()); } String message = format(SEVERITY_MESSAGE, severity, event.getMessage(), getLoc(event)); LOGGER.debug(message); return retVal; }</code><technical_language>worth adding a message</technical_language>

Target:
public boolean handleEvent(ValidationEvent event) { if (event == null) { LOGGER.debug("XmlValidationEventHandler handleEvent was called with a null ValidationEvent."); throw new IllegalArgumentException(); } String severity = null; boolean retVal = false; switch (event.getSeverity()) { case ValidationEvent.WARNING: severity = format(WARNING); retVal = true; break; case ValidationEvent.ERROR: severity = format(ERROR); retVal = false; break; case ValidationEvent.FATAL_ERROR: severity = format(FATAL_ERROR); retVal = false; break; default: assert false : format(UNRECOGNIZED_SEVERITY, event.getSeverity()); } String message = format(SEVERITY_MESSAGE, severity, event.getMessage(), getLoc(event)); LOGGER.debug(message); return retVal; }
Source:
<code>public void setMilestoneById(Integer milestone) { <START> this.milestone = (milestone == null) ? Optional.empty() : Optional.of(milestone); <END> this.milestoneLastModifiedAt = Optional.of(LocalDateTime.now()); }</code><technical_language>Again, this assume is a valid input</technical_language>

Target:
public void setMilestoneById(Integer milestone) { this.milestone = Optional.of(milestone); this.milestoneLastModifiedAt = Optional.of(LocalDateTime.now()); }
Source:
<code><START> protected boolean shouldAddVlanToNic(VdsNetworkInterface vlan) { <END> return true; }</code><technical_language>code valid well- protected boolean shouldAddVlanToNic(VdsNetworkInterface vlan) { return vlan.getId()==null; }</technical_language>

Target:
private boolean shouldAddVlanToNic(VdsNetworkInterface vlan) { return vlan.getId()==null; }
Source:
<code>protected void performRemove(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { PathAddress nativeAddress = context.getCurrentAddress().getParent().append(PathElement.pathElement(MANAGEMENT_INTERFACE, HTTP_INTERFACE)); <START> ManagementRemotingServices.isManagementResourceRemoveable(context, nativeAddress); <END> super.performRemove(context, operation, model); }</code><technical_language>This done in added step. do cross-resource validation in added step, allows composites function correctly (e.g. a composite step removing http another adding native.) validation-in-an-added-step approach defers validation check steps run</technical_language>

Target:
protected void performRemove(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { final PathAddress httpAddress = context.getCurrentAddress().getParent().append(PathElement.pathElement(MANAGEMENT_INTERFACE, HTTP_INTERFACE)); context.addStep((OperationContext opContext, ModelNode op) -> { ManagementRemotingServices.isManagementResourceRemoveable(opContext, httpAddress); }, OperationContext.Stage.MODEL, false); super.performRemove(context, operation, model); }
Source:
<code>public void showLoanChargesCreatedSuccessfully(Charges charges) { <START> Toast.makeText(getActivity(), R.string.charge_created, Toast <END> .LENGTH_LONG) .show(); }</code><technical_language>string resources "charge_created_successfully"</technical_language>

Target:
public void showLoanChargesCreatedSuccessfully(Charges charges) { Toast.makeText(getActivity(), R.string.charge_created_success, Toast .LENGTH_LONG) .show(); }
Source:
<code>public void test_transitivity() throws Exception { <START> JavaCheckVerifier.verify("src/test/files/se/TransitivityCPP.java", new ConditionAlwaysTrueOrFalseCheck()); <END> }</code><technical_language>while inspiration CPP plugin is great want copy names..</technical_language>

Target:
public void test_transitivity() throws Exception { JavaCheckVerifier.verify("src/test/files/se/Transitivity.java", new ConditionAlwaysTrueOrFalseCheck()); }
Source:
<code>public void initialise() { sceneFinalFbo = displayResolutionDependentFBOs.get(FINAL_BUFFER); renderingConfig = config.getRendering(); requiresCondition(() -> (renderingConfig.isVrSupport() && vrProvider.isInitialized())); <START> leftEyeFbo = requiresFBO(new FBOConfig(LEFT_EYE_FBO, FULL_SCALE, <END> FBO.Type.DEFAULT).useDepthBuffer(), displayResolutionDependentFBOs); rightEyeFbo = requiresFBO(new FBOConfig(RIGHT_EYE_FBO, FULL_SCALE, FBO.Type.DEFAULT).useDepthBuffer(), displayResolutionDependentFBOs); if (vrProvider != null) { vrProvider.texType[0].handle = leftEyeFbo.colorBufferTextureId; vrProvider.texType[0].eColorSpace = JOpenVRLibrary.EColorSpace.EColorSpace_ColorSpace_Gamma; vrProvider.texType[0].eType = JOpenVRLibrary.EGraphicsAPIConvention.EGraphicsAPIConvention_API_OpenGL; vrProvider.texType[0].write(); vrProvider.texType[1].handle = rightEyeFbo.colorBufferTextureId; vrProvider.texType[1].eColorSpace = JOpenVRLibrary.EColorSpace.EColorSpace_ColorSpace_Gamma; vrProvider.texType[1].eType = JOpenVRLibrary.EGraphicsAPIConvention.EGraphicsAPIConvention_API_OpenGL; vrProvider.texType[1].write(); } addDesiredStateChange(new EnableMaterial("engine:prog.defaultTextured")); displayResolutionDependentFBOs.subscribe(this); }</code><technical_language>In future want do renaming of variables/methods/classes in a separate commit easily skipped reviewers focus trivial aspects of a PR</technical_language>

Target:
public void initialise() { renderingConfig = config.getRendering(); requiresCondition(() -> (renderingConfig.isVrSupport() && vrProvider.isInitialized())); requiresFBO(new FBOConfig(LEFT_EYE_FBO, FULL_SCALE, FBO.Type.DEFAULT).useDepthBuffer(), displayResolutionDependentFBOs); requiresFBO(new FBOConfig(RIGHT_EYE_FBO, FULL_SCALE, FBO.Type.DEFAULT).useDepthBuffer(), displayResolutionDependentFBOs); if (vrProvider != null) { vrProvider.texType[0].handle = leftEyeFbo.colorBufferTextureId; vrProvider.texType[0].eColorSpace = JOpenVRLibrary.EColorSpace.EColorSpace_ColorSpace_Gamma; vrProvider.texType[0].eType = JOpenVRLibrary.EGraphicsAPIConvention.EGraphicsAPIConvention_API_OpenGL; vrProvider.texType[0].write(); vrProvider.texType[1].handle = rightEyeFbo.colorBufferTextureId; vrProvider.texType[1].eColorSpace = JOpenVRLibrary.EColorSpace.EColorSpace_ColorSpace_Gamma; vrProvider.texType[1].eType = JOpenVRLibrary.EGraphicsAPIConvention.EGraphicsAPIConvention_API_OpenGL; vrProvider.texType[1].write(); } update(); displayResolutionDependentFBOs.subscribe(this); addDesiredStateChange(new EnableMaterial("engine:prog.defaultTextured")); }
Source:
<code>public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof SimpleApnsPushNotification)) { return false; } final SimpleApnsPushNotification other = (SimpleApnsPushNotification) obj; if (this.invalidationTime == null) { if (other.invalidationTime != null) { return false; } } else if (!this.invalidationTime.equals(other.invalidationTime)) { return false; } if (this.payload == null) { if (other.payload != null) { return false; } } else if (!this.payload.equals(other.payload)) { return false; } if (this.priority != other.priority) { return false; } if (this.token == null) { if (other.token != null) { return false; } } else if (!this.token.equals(other.token)) { return false; } if (this.topic == null) { if (other.topic != null) { return false; } } else if (!this.topic.equals(other.topic)) { return false; } if (this.collapseId == null) { if (other.collapseId != null) { return false; } } else if (!this.collapseId.equals(other.collapseId)) { return false; <START> } <END> return true; }</code><technical_language>I guess java.util.Objects.equals(a,b) already</technical_language>

Target:
public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof SimpleApnsPushNotification)) { return false; } final SimpleApnsPushNotification other = (SimpleApnsPushNotification) obj; if (this.invalidationTime == null) { if (other.invalidationTime != null) { return false; } } else if (!this.invalidationTime.equals(other.invalidationTime)) { return false; } if (this.payload == null) { if (other.payload != null) { return false; } } else if (!this.payload.equals(other.payload)) { return false; } if (this.priority != other.priority) { return false; } if (this.token == null) { if (other.token != null) { return false; } } else if (!this.token.equals(other.token)) { return false; } if (this.topic == null) { if (other.topic != null) { return false; } } else if (!this.topic.equals(other.topic)) { return false; } if (Objects.equals(this.collapseId, null)) { if (!Objects.equals(other.collapseId , null)) { return false; } } else if (!this.collapseId.equals(other.collapseId)) { return false; } return true; }
Source:
<code>public ConversionService getObject() { ConversionService service = super.getObject(); if (service instanceof GenericConversionService) { ((GenericConversionService) service).removeConvertible(Object.class, Object.class); if (isMongodbIntegrationPresent) { try { Class<?> stringToBasicQueryConverterCls = Class.forName(MONGO_BASIC_QUERY_CONVERTER_CLASS_NAME); <START> ((GenericConversionService) service).addConverter((GenericConverter) stringToBasicQueryConverterCls.newInstance()); <END> } catch (Exception ignore) { } } } return service; }</code><technical_language>No, a solution for us. This is some kind of package tangle for case, evaluate expression Object check type String BasicQuery. This customization for BasicQuery use-case in common ConversionService provide some extra noise. is simpler create BasicQuery manually String SpEL result</technical_language>

Target:
public ConversionService getObject() { ConversionService service = super.getObject(); if (service instanceof GenericConversionService) { ((GenericConversionService) service).removeConvertible(Object.class, Object.class); } return service; }
Source:
<code>private boolean isCountFunction(FunctionCallTree tree) { <START> return FUNCTION_PREDICATE.test(TreeValues.of(tree, context().symbolTable())) && tree.arguments().size() == 1; <END> }</code><technical_language>cases [count](<LINK_0> 2 arguments? I guess want exclude cases</technical_language>

Target:
private boolean isCountFunction(FunctionCallTree tree) { return FUNCTION_PREDICATE.test(TreeValues.of(tree, context().symbolTable())) && !tree.arguments().isEmpty(); }
Source:
<code>public void applyTemplate(String template) { <START> mTemplate = template; <END> }</code><technical_language>This method generating a editor_session_template_apply event</technical_language>

Target:
public void applyTemplate(String template) { mTemplate = template; final Map<String, Object> properties = getCommonProperties(); properties.put(KEY_TEMPLATE, template); AnalyticsTracker.track(Stat.EDITOR_SESSION_TEMPLATE_APPLY, properties); }
Source:
<code>public void testFailureGeneratingMementoStillPersistsOtherEntities() throws Exception { MyEntity origE = origApp.createAndManageChild(EntitySpec.create(MyEntity.class)); MyEntity origFailingE = origApp.createAndManageChild(EntitySpec.create(MyEntity.class) .impl(MyEntityFailingImpl.class) .configure(MyEntityFailingImpl.FAIL_ON_GENERATE_MEMENTO, true)); newApp = rebind(false); MyEntity newE = (MyEntity) Iterables.find(newApp.getChildren(), EntityPredicates.idEqualTo(origE.getId())); <START> MyEntity newFailingE = (MyEntity) Iterables.find(newApp.getChildren(), EntityPredicates.idEqualTo(origFailingE.getId()), null); <END> assertNotNull(newE); assertNull(newFailingE); }</code><technical_language>A tryFind(...) get Optional assertFalse(failing.isPresent()) neater, need default null in find(...)</technical_language>

Target:
public void testFailureGeneratingMementoStillPersistsOtherEntities() throws Exception { MyEntity origE = origApp.createAndManageChild(EntitySpec.create(MyEntity.class)); MyEntity origFailingE = origApp.createAndManageChild(EntitySpec.create(MyEntity.class) .impl(MyEntityFailingImpl.class) .configure(MyEntityFailingImpl.FAIL_ON_GENERATE_MEMENTO, true)); newApp = rebind(false); MyEntity newE = (MyEntity) Iterables.find(newApp.getChildren(), EntityPredicates.idEqualTo(origE.getId())); Optional<Entity> newFailingE = Iterables.tryFind(newApp.getChildren(), EntityPredicates.idEqualTo(origFailingE.getId())); assertNotNull(newE); assertFalse(newFailingE.isPresent(), "newFailedE="+newFailingE); }
Source:
<code>private void onCreateSnapshot() { GlusterVolumeSnapshotModel snapshotModel = (GlusterVolumeSnapshotModel) getWindow(); if (!snapshotModel.validate()) { return; } final GlusterVolumeSnapshotEntity snapshot = new GlusterVolumeSnapshotEntity(); GlusterVolumeEntity volumeEntity = (GlusterVolumeEntity) getEntity(); snapshot.setClusterId(volumeEntity.getClusterId()); snapshot.setSnapshotName(snapshotModel.getSnapshotName().getEntity()); snapshot.setVolumeId(volumeEntity.getId()); snapshot.setDescription(snapshotModel.getDescription().getEntity()); boolean force = snapshotModel.getForceCreate().getEntity(); CreateGlusterVolumeSnapshotParameters parameter = <START> new CreateGlusterVolumeSnapshotParameters(snapshot, force, true); <END> Frontend.getInstance().runAction(VdcActionType.CreateGlusterVolumeSnapshot, parameter, new IFrontendActionAsyncCallback() { @Override public void executed(FrontendActionAsyncResult result) { GlusterVolumeSnapshotListModel localModel = (GlusterVolumeSnapshotListModel) result.getState(); localModel.postOnCreateSnapshot(result.getReturnValue(), snapshot); } }, this); }</code><technical_language>need place a progress spinner dialog stop user clicking OK multiple times. snapshotModel.startProgress();</technical_language>

Target:
private void onCreateSnapshot() { GlusterVolumeSnapshotModel snapshotModel = (GlusterVolumeSnapshotModel) getWindow(); if (!snapshotModel.validate()) { return; } final GlusterVolumeSnapshotEntity snapshot = new GlusterVolumeSnapshotEntity(); GlusterVolumeEntity volumeEntity = (GlusterVolumeEntity) getEntity(); snapshot.setClusterId(volumeEntity.getClusterId()); snapshot.setSnapshotName(snapshotModel.getSnapshotName().getEntity()); snapshot.setVolumeId(volumeEntity.getId()); snapshot.setDescription(snapshotModel.getDescription().getEntity()); boolean force = snapshotModel.getForceCreate().getEntity(); CreateGlusterVolumeSnapshotParameters parameter = new CreateGlusterVolumeSnapshotParameters(snapshot, force); snapshotModel.startProgress(null); Frontend.getInstance().runAction(VdcActionType.CreateGlusterVolumeSnapshot, parameter, new IFrontendActionAsyncCallback() { @Override public void executed(FrontendActionAsyncResult result) { GlusterVolumeSnapshotListModel localModel = (GlusterVolumeSnapshotListModel) result.getState(); localModel.stopProgress(); localModel.postOnCreateSnapshot(result.getReturnValue(), snapshot); } }, this); }
Source:
<code>private Pattern getIsoPattern(OVirtNodeInfo info) { <START> String expectedPattern = "^(" + info.prefix.replace(info.delimiter, "|") + ")" + ".*.iso"; <END> if (isoPattern == null || !expectedPattern.equals(isoPattern.toString())) { isoPattern = Pattern.compile(expectedPattern); } return isoPattern; }</code><technical_language>I thought agreed put regular expression database, customized this in future. do need delimiter here</technical_language>

Target:
private Pattern getIsoPattern(OVirtNodeInfo info) { log.infoFormat("getIsoPatter - pattern [{0}]", info.pattern); String expectedPattern = info.pattern; if (isoPattern == null || !expectedPattern.equals(isoPattern.toString())) { isoPattern = Pattern.compile(expectedPattern); } return isoPattern; }
Source:
<code><START> public void onDropItemEvent(DropItemEvent event, EntityRef itemEntity, ItemComponent itemComponent, <END> BlockItemComponent blockItemComponent) { String blockFamilyURI = blockItemComponent.blockFamily.getURI().toString(); if (blockFamilyURI.equals(LASUtils.BLACK_FLAG_URI) || blockFamilyURI.equals(LASUtils.RED_FLAG_URI)) { delayManager.addDelayedAction(itemEntity, LASUtils.DROPPED_FLAG, LASUtils.FLAG_TELEPORT_DELAY); } }</code><technical_language>special component for flag used? add FlagComponent a method argument here</technical_language>

Target:
public void onDropItemEvent(DropItemEvent event, EntityRef itemEntity, ItemComponent itemComponent, BlockItemComponent blockItemComponent) { String blockFamilyURI = blockItemComponent.blockFamily.getURI().toString(); if (blockFamilyURI.equals(LASUtils.BLACK_FLAG_URI) || blockFamilyURI.equals(LASUtils.RED_FLAG_URI)) { itemEntity.removeComponent(LifespanComponent.class); delayManager.addDelayedAction(itemEntity, LASUtils.DROPPED_FLAG, LASUtils.FLAG_TELEPORT_DELAY); } }
Source:
<code>public void testGetTokenForRun() throws IOException { j.jenkins.setSecurityRealm(j.createDummySecurityRealm()); MockAuthorizationStrategy auth = new MockAuthorizationStrategy() .grant(Jenkins.READ).everywhere().to("alice") .grant(Computer.BUILD).everywhere().to("alice") .grant(Item.CONFIGURE).everywhere().to("alice"); j.jenkins.setAuthorizationStrategy(auth); String globalCredentialsId = "global-creds"; IdCredentials credentials = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, globalCredentialsId, "test-global-creds", "user", "password"); CredentialsProvider.lookupStores(j.jenkins).iterator().next().addCredentials(Domain.global(), credentials); <START> FreeStyleProject item = j.createFreeStyleProject("testGetToken"); <END> SecurityContextHolder.getContext().setAuthentication(User.get("alice").impersonate()); DockerRegistryToken token = new DockerRegistryEndpoint("<LINK_0>", globalCredentialsId).getToken(new FreeStyleBuild(item)); Assert.assertNotNull(token); Assert.assertEquals("user", token.getEmail()); Assert.assertEquals(Base64.encodeBase64String("user:password".getBytes(Charsets.UTF_8)), token.getToken()); }</code><technical_language>BTW @Rule JenkinsRule starts a new instance for test case, is need pass a job name argument</technical_language>

Target:
public void testGetTokenForRun() throws IOException { j.jenkins.setSecurityRealm(j.createDummySecurityRealm()); MockAuthorizationStrategy auth = new MockAuthorizationStrategy() .grant(Jenkins.READ).everywhere().to("alice") .grant(Computer.BUILD).everywhere().to("alice") .grant(Item.CONFIGURE).everywhere().to("alice"); j.jenkins.setAuthorizationStrategy(auth); String globalCredentialsId = "global-creds"; IdCredentials credentials = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, globalCredentialsId, "test-global-creds", "user", "password"); CredentialsProvider.lookupStores(j.jenkins).iterator().next().addCredentials(Domain.global(), credentials); FreeStyleProject item = j.createFreeStyleProject(); try (ACLContext as = ACL.as(User.getById("alice", false))) { DockerRegistryToken token = new DockerRegistryEndpoint("<LINK_0>", globalCredentialsId).getToken(new FreeStyleBuild(item)); Assert.assertNotNull(token); Assert.assertEquals("user", token.getEmail()); Assert.assertEquals(Base64.getEncoder().encodeToString("user:password".getBytes(Charsets.UTF_8)), token.getToken()); } }
Source:
<code>protected CompletableFuture<Void> startServices() { return messagingService.start() .thenComposeAsync(v -> broadcastService.start(), threadContext) .thenComposeAsync(v -> membershipService.start(), threadContext) <START> .thenComposeAsync(v -> locationProvider.join(membershipService.getLocalMember().address()), threadContext) <END> .thenComposeAsync(v -> communicationService.start(), threadContext) .thenComposeAsync(v -> eventService.start(), threadContext) .thenApply(v -> null); }</code><technical_language>If I understand correctly, in case of composed calls fail, in a corrupted state some services started some others stopped. try operations atomic</technical_language>

Target:
protected CompletableFuture<Void> startServices() { return messagingService.start() .thenComposeAsync(v -> broadcastService.start(), threadContext) .thenComposeAsync(v -> membershipService.start(), threadContext) .thenComposeAsync(v -> communicationService.start(), threadContext) .thenComposeAsync(v -> eventService.start(), threadContext) .thenApply(v -> null); }
Source:
<code>private boolean serverExists(GlusterServerInfo glusterServer) { VDSGroup vdsGroup = getVdsGroupDao().get(getParameters().getClusterId()); <START> if (vdsGroup.getcompatibility_version().compareTo(Version.v3_3) >= 0) { <END> return getDbUtils().serverExists(glusterServer.getUuid()); } else { return getDbUtils().serverExists(getParameters().getClusterId(), glusterServer.getHostnameOrIp()); } }</code><technical_language>GlusterFeatureSupported.glusterHostUuidSupported instead of comparing version</technical_language>

Target:
private boolean serverExists(GlusterServerInfo glusterServer) { if (GlusterFeatureSupported.glusterHostUuidSupported(Version.v3_3)) { return getDbUtils().serverExists(glusterServer.getUuid()); } else { return getDbUtils().serverExists(getParameters().getClusterId(), glusterServer.getHostnameOrIp()); } }
Source:
<code>public void prepareRun(BatchAggregatorContext context) throws Exception { super.prepareRun(context); List<String> inputFields = new ArrayList<>(); List<String> outputFields = new ArrayList<>(); Schema inputSchema = context.getInputSchema(); if (SchemaValidator.validateSchemaIsNotNull(inputSchema, "input")) { inputFields = inputSchema.getFields().stream().map(Schema.Field::getName).collect(Collectors.toList()); } Schema outputSchema = context.getOutputSchema(); if (SchemaValidator.validateSchemaIsNotNull(outputSchema, "output")) { <START> outputFields = outputSchema.getFields().stream().map(Schema.Field::getName).collect(Collectors.toList()); <END> } String groupByFields = Joiner.on(",").join(conf.getGroupByFields()); String aggregates = Joiner.on(",").join(conf.getAggregates()); FieldOperation dataPrepOperation = new FieldTransformOperation("JavaScript", "Grouped by: " + groupByFields + " Aggregates: " + aggregates, inputFields, outputFields); context.record(Collections.singletonList(dataPrepOperation)); }</code><technical_language>group treated javascript python. transform operation aggregate configured in plugin. For example, if generate a new field 'avgPrice' calculating 'avg(price)', a single transform operation input is 'price', output is 'avgPrice', operation name is 'GroupBy:avg'</technical_language>

Target:
public void prepareRun(BatchAggregatorContext context) throws Exception { super.prepareRun(context); LinkedList<FieldOperation> fllOperations = new LinkedList<>(); if (SchemaValidator.canRecordLineage(context.getOutputSchema(), "output")) { Schema inputSchema = context.getInputSchema(); for (GroupByConfig.FunctionInfo functionInfo : conf.getAggregates()) { Schema.Field outputSchemaField = getOutputSchemaField(functionInfo, inputSchema); String operationName = String.format("Group %s", functionInfo.getField()); String description = String.format("Aggregate function applied: '%s'.", functionInfo.getFunction()); FieldOperation operation = new FieldTransformOperation(operationName, description, Collections.singletonList(functionInfo.getField()), outputSchemaField.getName()); fllOperations.add(operation); } } context.record(fllOperations); }
Source:
<code>private void setUpEventHandler() { this.setOnMouseClicked(e-> { ui.triggerEvent(new PanelClickedEvent(this.panelIndex)); requestFocus(); }); ui.registerEvent((RepoOpeningEventHandler) e -> { <START> logger.info("Received RepoOpeningEvent"); <END> HashSet<String> allReposInFilterExpr = Qualifier.getMetaQualifierContent(getCurrentFilterExpression(), QualifierType.REPO); if (e.isPrimaryRepo && allReposInFilterExpr.isEmpty()) { addPanelLoadingIndication(); } else if (allReposInFilterExpr.contains(e.repoId)) { addPanelLoadingIndication(); } }); ui.registerEvent((RepoOpenedEventHandler) e -> { logger.info("Received RepoOpenedEvent"); HashSet<String> allReposInFilterExpr = Qualifier.getMetaQualifierContent(getCurrentFilterExpression(), QualifierType.REPO); if (e.isPrimaryRepo && allReposInFilterExpr.isEmpty()) { removePanelLoadingIndication(); } else if (allReposInFilterExpr.contains(e.repoId)) { removePanelLoadingIndication(); } }); }</code><technical_language>this is useful, logging for events triggered. more high-level, 'panel loading', 'panel loaded'</technical_language>

Target:
private void setUpEventHandler() { this.setOnMouseClicked(e-> { ui.triggerEvent(new PanelClickedEvent(this.panelIndex)); requestFocus(); }); ui.registerEvent((RepoOpeningEventHandler) this::indicatePanelLoading); ui.registerEvent((RepoOpenedEventHandler) this::unindicatePanelLoading); }
Source:
<code>public void testLocalStreamGroupedCorrectlyForYarn() { HashSet<SystemStreamPartition> allSSPs = new HashSet<>(); HashMap<String, String> configMap = new HashMap<>(); <START> configMap.put("yarn.container.count", "2"); <END> Config config = new MapConfig(configMap); SystemStreamPartitionGrouper grouper = grouperFactory.getSystemStreamPartitionGrouper(config); Collections.addAll(allSSPs, aa0, aa1, aa2, ab0); Map<TaskName, Set<SystemStreamPartition>> result = grouper.group(allSSPs); Map<TaskName, Set<SystemStreamPartition>> expectedResult = new HashMap<>(); HashSet<SystemStreamPartition> partitions = new HashSet<>(); partitions.add(aa0); partitions.add(aa1); partitions.add(aa2); partitions.add(ab0); expectedResult.put(new TaskName("Task-0"), partitions); expectedResult.put(new TaskName("Task-1"), partitions); assertEquals(expectedResult, result); }</code><technical_language>Please "job.container.count" instead. yarn.container.count is deprecated</technical_language>

Target:
public void testLocalStreamGroupedCorrectlyForYarn() { HashSet<SystemStreamPartition> allSSPs = new HashSet<>(); HashMap<String, String> configMap = new HashMap<>(); configMap.put("job.container.count", "2"); Config config = new MapConfig(configMap); SystemStreamPartitionGrouper grouper = grouperFactory.getSystemStreamPartitionGrouper(config); Collections.addAll(allSSPs, aa0, aa1, aa2, ab0); Map<TaskName, Set<SystemStreamPartition>> result = grouper.group(allSSPs); Map<TaskName, Set<SystemStreamPartition>> expectedResult = new HashMap<>(); HashSet<SystemStreamPartition> partitions = new HashSet<>(); partitions.add(aa0); partitions.add(aa1); partitions.add(aa2); partitions.add(ab0); expectedResult.put(new TaskName("Task-0"), partitions); expectedResult.put(new TaskName("Task-1"), partitions); assertEquals(expectedResult, result); }
Source:
<code>private void doCheck(JCloudsComputer c) { if (c.isPendingDelete()) return; if (c.isConnecting()) return; if (!c.isIdle() || c.getOfflineCause() instanceof OfflineCause.UserCause) return; final JCloudsSlave node = c.getNode(); if (node == null) return; final int retentionTime = node.getSlaveOptions().getRetentionTime(); if (retentionTime <= 0) return; long idleSince = c.getIdleStartMilliseconds(); final long connectionTime = c.getConnectionTime(); if(connectionTime == 0 ) { return; } if(connectionTime > idleSince) { <START> idleSince = connectionTime; <END> } final long idleMilliseconds = System.currentTimeMillis() - idleSince; if (idleMilliseconds > TimeUnit.MINUTES.toMillis(retentionTime)) { if (JCloudsPreCreationThread.isNeededReadyComputer(node.getComputer())) { LOGGER.info("Keeping " + c .getName() + " to meet minimum requirements"); return; } LOGGER.info("Scheduling " + c .getName() + " for termination after " + retentionTime+ " minutes as it was idle since " + new Date(idleSince)); if (LOGGER.isLoggable(Level.FINE)) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); Jenkins.XSTREAM2.toXMLUTF8(node, out); LOGGER.fine(out.toString("UTF-8")); } catch (IOException e) { LOGGER.log(Level.WARNING, "Failed to dump node config", e); } } c.setPendingDelete(true); } }</code><technical_language>I computation encapusted in JCloudsComputer class</technical_language>

Target:
private void doCheck(JCloudsComputer c) { if (c.isPendingDelete()) return; if (c.isConnecting()) return; if (!c.isIdle() || c.getOfflineCause() instanceof OfflineCause.UserCause) return; final JCloudsSlave node = c.getNode(); if (node == null) return; final int retentionTime = node.getSlaveOptions().getRetentionTime(); if (retentionTime <= 0) return; if(c.getConnectedTime() == 0) return; final long idleSince = c.getIdleSince(); final long idleMilliseconds = System.currentTimeMillis() - idleSince; if (idleMilliseconds > TimeUnit.MINUTES.toMillis(retentionTime)) { if (JCloudsPreCreationThread.isNeededReadyComputer(node.getComputer())) { LOGGER.info("Keeping " + c .getName() + " to meet minimum requirements"); return; } LOGGER.info("Scheduling " + c .getName() + " for termination after " + retentionTime+ " minutes as it was idle since " + new Date(idleSince)); if (LOGGER.isLoggable(Level.FINE)) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); Jenkins.XSTREAM2.toXMLUTF8(node, out); LOGGER.fine(out.toString("UTF-8")); } catch (IOException e) { LOGGER.log(Level.WARNING, "Failed to dump node config", e); } } c.setPendingDelete(true); } }