auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testDefaults() { ConfigAssertions.assertRecordedDefaults(ConfigAssertions.recordDefaults(SqlEnvironmentConfig.class) .setPath(" ")); }

Target:
public void testDefaults() { assertRecordedDefaults(recordDefaults(SqlEnvironmentConfig.class) .setPath(null)); }
Source:
protected File checkForIndex(HttpServletRequest request, HttpServletResponse response, File file, String path) throws IOException { if (null != file && file.isDirectory()) { File index = new File(file, INDEX); log.info("Index is \"" + index.getAbsolutePath() + "\"."); if (index.isFile()) { String redirect = null; if (path == null) { redirect = request.getServletPath() + "/" + INDEX; } else { redirect = request.getServletPath() + path + "/" + INDEX; } response.sendRedirect(redirect); file = new File(file, INDEX); } else { log.error("There is no index page for directory \"" + file.getAbsolutePath() + "\", will send a 404 error response."); file = null; } } else if (!ServletUtils.canReadFile(file)) { file = null; } return file; }

Target:
protected File checkForIndex(HttpServletRequest request, HttpServletResponse response, File file, String path) throws IOException { if (file != null && file.isDirectory()) { File index = new File(file, INDEX); log.info("Index is \"" + index.getAbsolutePath() + "\"."); if (index.isFile()) { String redirect = null; if (path == null) { redirect = request.getServletPath() + "/" + INDEX; } else { redirect = request.getServletPath() + path + "/" + INDEX; } response.sendRedirect(redirect); file = new File(file, INDEX); } else { log.error("There is no index page for directory \"" + file.getAbsolutePath() + "\", will send a 404 error response."); file = null; } } else if (!ServletUtils.canReadFile(file)) { file = null; } return file; }
Source:
public String toString() { return "ForceWriteRequest{" + "forceWriteWaiters=" + forceWriteWaiters + ", shouldClose=" + shouldClose + ", isMarker=" + isMarker + ", lastFlushedPosition=" + lastFlushedPosition + ", logId=" + logId + '}'; }

Target:
public String toString() { return MoreObjects.toStringHelper(ForceWriteRequest.class) .add("forceWriteWaiters", forceWriteWaiters) .add("shouldClose", shouldClose) .add("isMarker", isMarker) .add("lastFlushedPosition", lastFlushedPosition) .add("logId", logId) .toString(); }
Source:
public void run() { try { startupComplete(); while (isRunning()) { configureNewConnections(); processNewResponses(); selector.poll(300); List<NetworkReceive> completedReceives = selector.completedReceives(); for (NetworkReceive networkReceive : completedReceives) { SelectionKey key = selector.keyForId(networkReceive.getConnectionId()); SocketServerRequest req = new SocketServerRequest(id, key, new ByteBufferInputStream(networkReceive.getReceivedBytes().getPayload())); channel.sendRequest(req); } List<NetworkSend> completedSends = selector.completedSends(); for (NetworkSend networkSend : completedSends) { networkSend.onSendComplete(); metrics.sendInFlight.dec(); } } } catch (Exception e) { logger.error("Error while shutting down processor thread {}", e); } finally { logger.debug("Closing server socket and selector."); closeAll(); shutdownComplete(); } }

Target:
public void run() { try { startupComplete(); while (isRunning()) { configureNewConnections(); processNewResponses(); selector.poll(pollTimeoutMs); List<NetworkReceive> completedReceives = selector.completedReceives(); for (NetworkReceive networkReceive : completedReceives) { String connectionId = networkReceive.getConnectionId(); SocketServerRequest req = new SocketServerRequest(id, connectionId, new ByteBufferInputStream(networkReceive.getReceivedBytes().getPayload())); channel.sendRequest(req); } } } catch (Exception e) { logger.error("Error in processor thread {}", e); } finally { logger.debug("Closing server socket and selector."); closeAll(); shutdownComplete(); } }
Source:
public void test19CloseImportedProjectsZipFile() throws Exception { WizardProjectsImportPage wpip = createImportWizardWithZipLocation( "ImportExistingProjectsWizardTestRebuildProject"); try (AutoCloseable restore = setPageSetting(wpip, "WizardProjectsImportPage.STORE_CLOSE_CREATED_PROJECTS_ID", true)) { wpip.createProjects(); IProject testProject = ResourcesPlugin.getWorkspace().getRoot() .getProject("ImportExistingProjectsWizardTestRebuildProject"); assertFalse("Expected imported project to be closd due to setting dialog option checkbox", testProject.isAccessible()); } }

Target:
public void test19CloseImportedProjectsZipFile() throws Exception { ImportTestUtils.deleteWorkspaceProjects(); WizardProjectsImportPage wpip = getNewWizard(); try (AutoCloseable restore = setPageSetting(wpip, "WizardProjectsImportPage.STORE_CLOSE_CREATED_PROJECTS_ID", true)) { useDataLocationProject(wpip, "ImportExistingProjectsWizardTestRebuildProject"); assertTrue("Failed to import project", wpip.createProjects()); IProject testProject = ResourcesPlugin.getWorkspace().getRoot() .getProject("ImportExistingProjectsWizardTestRebuildProject"); assertTrue("Failed to import test project", testProject.exists()); assertFalse("Expected imported project to be closed due to setting dialog option checkbox", testProject.isOpen()); } }
Source:
public WebArchive createDeployment() { if (resourceLocal) { archive.addClasses( MemberRegistrationWithResourceLocal.class, ResourceLocalResources.class ); } else { archive.addClasses( MemberRegistrationWithJta.class, JtaResources.class ); } return archive; }

Target:
public WebArchive createDeployment() { if (resourceLocal) { archive.addClasses( MemberRegistrationWithResourceLocal.class ); } else { archive.addClasses( MemberRegistrationWithJta.class, JtaResources.class ); } return archive; }
Source:
public void testUnclassifiedReviewArtifactIsntFiltered() { ITask task = mock(ITask.class); when(task.getAttribute("ARTIFACT")).thenReturn(null); TaskReviewArtifactFilter filter = new TaskReviewArtifactFilter(); boolean wasntFiltered = filter.select(null, task); Assert.assertTrue(wasntFiltered); }

Target:
public void testUnclassifiedReviewArtifactIsntFiltered() { ITask task = mock(ITask.class); TaskReviewArtifactFilter filter = new TaskReviewArtifactFilter(); boolean wasFiltered = !filter.select(null, task); assertFalse(wasFiltered); }
Source:
private static Optional<EqualsOperands> getEqualMethodInvocationOperands(ExpressionTree expressionTree) { if(!expressionTree.is(Tree.Kind.METHOD_INVOCATION)) { return Optional.empty(); } MethodInvocationTree mit = (MethodInvocationTree) expressionTree; Symbol symbol = mit.symbol(); ExpressionTree methodSelect = mit.methodSelect(); if (mit.arguments().size() == 1) { ExpressionTree arg = mit.arguments().get(0); if ("equals".equals(symbol.name()) && arg.symbolType().is("java.lang.String") && methodSelect.is(Tree.Kind.MEMBER_SELECT)) { ExpressionTree expression = ((MemberSelectExpressionTree) methodSelect).expression(); if (arg.is(Tree.Kind.STRING_LITERAL) && expression.is(Tree.Kind.IDENTIFIER)) { return Optional.of(new EqualsOperands((LiteralTree) arg, (IdentifierTree) expression)); } else if (arg.is(Tree.Kind.IDENTIFIER) && expression.is(Tree.Kind.STRING_LITERAL)) { return Optional.of(new EqualsOperands((LiteralTree) expression, (IdentifierTree) arg)); } } } return Optional.empty(); }

Target:
private static Optional<EqualsOperands> getEqualMethodInvocationOperands(ExpressionTree expressionTree) { ExpressionTree arg = null; ExpressionTree expression = null; if (expressionTree.is(Tree.Kind.METHOD_INVOCATION)) { MethodInvocationTree mit = (MethodInvocationTree) expressionTree; Symbol symbol = mit.symbol(); ExpressionTree methodSelect = mit.methodSelect(); if (mit.arguments().size() == 1) { arg = mit.arguments().get(0); if ("equals".equals(symbol.name()) && arg.symbolType().is("java.lang.String") && methodSelect.is(Tree.Kind.MEMBER_SELECT)) { expression = ((MemberSelectExpressionTree) methodSelect).expression(); } } } else if (expressionTree.is(Tree.Kind.EQUAL_TO)) { BinaryExpressionTree equalTo = (BinaryExpressionTree) expressionTree; arg = equalTo.leftOperand(); expression = equalTo.rightOperand(); } if (arg != null && expression != null) { if (arg.is(Tree.Kind.STRING_LITERAL) && expression.is(Tree.Kind.IDENTIFIER)) { return Optional.of(new EqualsOperands((LiteralTree) arg, (IdentifierTree) expression)); } else if (arg.is(Tree.Kind.IDENTIFIER) && expression.is(Tree.Kind.STRING_LITERAL)) { return Optional.of(new EqualsOperands((LiteralTree) expression, (IdentifierTree) arg)); } } return Optional.empty(); }
Source:
public DiagnosticReport getFHIRDiagnosticReport(Encounter omrsiagnosticReport) { log.info("Laboratory Handler : GetFHIRDiagnosticReport"); DiagnosticReport diagnosticReport = new DiagnosticReport(); EncounterService omrsEncounterService = Context.getEncounterService(); diagnosticReport.setId(new IdDt("DiagnosticReport", omrsiagnosticReport.getUuid())); diagnosticReport.setIssued(new DateTimeDt(omrsiagnosticReport.getEncounterDatetime())); org.openmrs.Patient omrsPatient = omrsiagnosticReport.getPatient(); diagnosticReport.getSubject().setResource(FHIRPatientUtil.generatePatient(omrsPatient)); String encounterRoleUuid = "73bbb069-9781-4afc-a9d1-54b6b2270e03"; EncounterRole omrsEncounterRole = omrsEncounterService.getEncounterRoleByUuid(encounterRoleUuid); Set<Provider> omrsProviderList = omrsiagnosticReport.getProvidersByRole(omrsEncounterRole); if (!omrsProviderList.isEmpty()) { Practitioner practitioner = FHIRPractitionerUtil.generatePractitioner(omrsProviderList.iterator().next()); diagnosticReport.getPerformer().setResource(practitioner); } String serviceCategory = omrsiagnosticReport.getEncounterType().getName(); List<CodingDt> serviceCategoryList = new ArrayList<CodingDt>(); serviceCategoryList.add(new CodingDt("<LINK_0>", serviceCategory)); diagnosticReport.getServiceCategory().setCoding(serviceCategoryList); return diagnosticReport; }

Target:
private DiagnosticReport getFHIRDiagnosticReport(Encounter omrsiagnosticReport) { log.info("Laboratory Handler : GetFHIRDiagnosticReport"); DiagnosticReport diagnosticReport = new DiagnosticReport(); EncounterService omrsEncounterService = Context.getEncounterService(); diagnosticReport.setId(new IdDt("DiagnosticReport", omrsiagnosticReport.getUuid())); diagnosticReport.setIssued(new DateTimeDt(omrsiagnosticReport.getEncounterDatetime())); org.openmrs.Patient omrsPatient = omrsiagnosticReport.getPatient(); diagnosticReport.getSubject().setResource(FHIRPatientUtil.generatePatient(omrsPatient)); String encounterRoleUuid = "73bbb069-9781-4afc-a9d1-54b6b2270e03"; EncounterRole omrsEncounterRole = omrsEncounterService.getEncounterRoleByUuid(encounterRoleUuid); Set<Provider> omrsProviderList = omrsiagnosticReport.getProvidersByRole(omrsEncounterRole); if (!omrsProviderList.isEmpty()) { Practitioner practitioner = FHIRPractitionerUtil.generatePractitioner(omrsProviderList.iterator().next()); diagnosticReport.getPerformer().setResource(practitioner); } String serviceCategory = omrsiagnosticReport.getEncounterType().getName(); List<CodingDt> serviceCategoryList = new ArrayList<CodingDt>(); serviceCategoryList.add(new CodingDt("<LINK_0>", serviceCategory)); diagnosticReport.getServiceCategory().setCoding(serviceCategoryList); return diagnosticReport; }
Source:
public String getMapTitle(int mapIndex) { String mapTitle = mapTitleList.get(mapIndex).getText(); return mapTitle; }

Target:
public String getMapTitle(int mapIndex) { return mapTitleList.get(mapIndex).getText(); }
Source:
public void beforeClass(final @Optional String testType) throws IOException { config = new IntegrationTestConfigContext(); final String testName = this.getClass().getSimpleName(); mantaClient = new MantaClient(config); if (testType.equals("buckets")) { testPathPrefix = IntegrationTestHelper.setupTestPath(config, mantaClient, testName, testType); } else { testPathPrefix = IntegrationTestConfigContext.generateBasePathWithoutSeparator(config, testName); } IntegrationTestHelper.createTestBucketOrDirectory(mantaClient, testPathPrefix, testType); }

Target:
public void beforeClass(final @Optional String testType) throws IOException { config = new IntegrationTestConfigContext(); final String testName = this.getClass().getSimpleName(); mantaClient = new MantaClient(config); if ("buckets".equals(testType)) { testPathPrefix = IntegrationTestHelper.setupTestPath(config, mantaClient, testName, testType); } else { testPathPrefix = IntegrationTestConfigContext.generateBasePathWithoutSeparator(config, testName); } IntegrationTestHelper.createTestBucketOrDirectory(mantaClient, testPathPrefix, testType); }
Source:
private void populateCPUList(ClusterModel clusterModel, List<ServerCpu> cpus, boolean canChangeArchitecture) { ServerCpu oldSelectedCpu = clusterModel.getCPU().getSelectedItem(); clusterModel.getCPU().setItems(cpus); initSupportedArchitectures(clusterModel); clusterModel.getCPU().setSelectedItem(oldSelectedCpu != null ? Linq.firstOrDefault(cpus, new Linq.ServerCpuPredicate(oldSelectedCpu.getCpuName())) : null); if (clusterModel.getCPU().getSelectedItem() == null || !isCPUinitialized) { initCPU(); } if (clusterModel.getIsEdit()) { if (!canChangeArchitecture) { getArchitecture().setItems(new ArrayList<ArchitectureType>(Arrays.asList(clusterModel.getEntity() .getArchitecture()))); } ArchitectureType oldSelectedArch = clusterModel.getArchitecture().getSelectedItem(); if (oldSelectedArch != null) { getArchitecture().setSelectedItem(oldSelectedArch); } else { getArchitecture().setSelectedItem(getEntity().getArchitecture()); } } else { getArchitecture().setSelectedItem(ArchitectureType.undefined); } getArchitecture().setIsAvailable(ApplicationModeHelper.isModeSupported(ApplicationMode.VirtOnly)); }

Target:
private void populateCPUList(ClusterModel clusterModel, List<ServerCpu> cpus, boolean canChangeArchitecture) { ServerCpu oldSelectedCpu = clusterModel.getCPU().getSelectedItem(); clusterModel.getCPU().setItems(cpus); initSupportedArchitectures(clusterModel); clusterModel.getCPU().setSelectedItem(oldSelectedCpu != null ? Linq.firstOrDefault(cpus, new Linq.ServerCpuPredicate(oldSelectedCpu.getCpuName())) : null); if (clusterModel.getCPU().getSelectedItem() == null || !isCPUinitialized) { initCPU(); } if (clusterModel.getIsEdit()) { if (!canChangeArchitecture) { getArchitecture().setItems(new ArrayList<ArchitectureType>(Arrays.asList(clusterModel.getEntity() .getArchitecture()))); } ArchitectureType oldSelectedArch = clusterModel.getArchitecture().getSelectedItem(); if (oldSelectedArch != null) { getArchitecture().setSelectedItem(oldSelectedArch); } else { getArchitecture().setSelectedItem(getEntity().getArchitecture()); } } else { getArchitecture().setSelectedItem(ArchitectureType.undefined); } }
Source:
public Iterable<TmfAnalysisRequirement> getAnalysisRequirements() { LttngUstTrace trace = getTrace(); ILttngUstEventLayout layout; if (trace == null) { layout = DefaultLttngUstEventLayout.getInstance(); } else { layout = trace.getEventLayout(); } if (fAnalysisRequirements == null) { @NonNull Set<@NonNull String> requiredEvents = ImmutableSet.of( layout.eventLibcMalloc(), layout.eventLibcFree(), layout.eventLibcCalloc(), layout.eventLibcRealloc(), layout.eventLibcMemalign(), layout.eventLibcPosixMemalign() ); TmfAnalysisRequirement eventsReq = new TmfAnalysisRequirement( nullToEmptyString(SessionConfigStrings.CONFIG_ELEMENT_EVENT), requiredEvents, ValuePriorityLevel.MANDATORY); eventsReq.addInformation(nullToEmptyString(Messages.UstMemoryAnalysisModule_EventsLoadingInformation)); eventsReq.addInformation(nullToEmptyString(Messages.UstMemoryAnalysisModule_EventsLoadingExampleInformation)); TmfAnalysisRequirement domainReq = new TmfAnalysisRequirement(nullToEmptyString(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN)); domainReq.addValue(nullToEmptyString(SessionConfigStrings.CONFIG_DOMAIN_TYPE_UST), ValuePriorityLevel.MANDATORY); fAnalysisRequirements = ImmutableSet.of(domainReq, eventsReq); } return checkNotNull(fAnalysisRequirements); }

Target:
public Iterable<TmfAnalysisRequirement> getAnalysisRequirements() { LttngUstTrace trace = getTrace(); ILttngUstEventLayout layout; if (trace == null) { layout = ILttngUstEventLayout.DEFAULT_LAYOUT; } else { layout = trace.getEventLayout(); } Set<TmfAnalysisRequirement> requirements = fAnalysisRequirements; if (requirements == null) { @NonNull Set<@NonNull String> requiredEvents = ImmutableSet.of( layout.eventLibcMalloc(), layout.eventLibcFree(), layout.eventLibcCalloc(), layout.eventLibcRealloc(), layout.eventLibcMemalign(), layout.eventLibcPosixMemalign() ); TmfAnalysisRequirement eventsReq = new TmfAnalysisRequirement( nullToEmptyString(SessionConfigStrings.CONFIG_ELEMENT_EVENT), requiredEvents, ValuePriorityLevel.MANDATORY); eventsReq.addInformation(nullToEmptyString(Messages.UstMemoryAnalysisModule_EventsLoadingInformation)); eventsReq.addInformation(nullToEmptyString(Messages.UstMemoryAnalysisModule_EventsLoadingExampleInformation)); TmfAnalysisRequirement domainReq = new TmfAnalysisRequirement(nullToEmptyString(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN)); domainReq.addValue(nullToEmptyString(SessionConfigStrings.CONFIG_DOMAIN_TYPE_UST), ValuePriorityLevel.MANDATORY); requirements = checkNotNull(ImmutableSet.of(domainReq, eventsReq)); fAnalysisRequirements = requirements; } return requirements; }
Source:
public Response uploadImage( @PathParam("api") String api, @FormDataParam("file") InputStream uploadedInputStream, @FormDataParam("file") FormDataContentDisposition fileDetail, @FormDataParam("file") final FormDataBodyPart body ) { String imageId = null; if (!body.getMediaType().getType().equals("image")) { throw new UploadUnAuthorized("File format unauthorized " + body.getMediaType().getType()+"/"+body.getMediaType().getSubtype()); } else if (fileDetail.getSize() > this.mediaService.getImageMaxSize()) { throw new UploadUnAuthorized("Max size achieved " + fileDetail.getSize()); } else { imageId = mediaService.saveApiImage(api, new MediaEntity( uploadedInputStream, body.getMediaType().getType(), body.getMediaType().getSubtype(), fileDetail.getFileName(), fileDetail.getSize() )); } return Response.status(200).entity(imageId).build(); }

Target:
public Response uploadImage( @PathParam("api") String api, @FormDataParam("file") InputStream uploadedInputStream, @FormDataParam("file") FormDataContentDisposition fileDetail, @FormDataParam("file") final FormDataBodyPart body ) { String mediaId = null; if (!body.getMediaType().getType().equals("image")) { throw new UploadUnAuthorized("File format unauthorized " + body.getMediaType().getType()+"/"+body.getMediaType().getSubtype()); } else if (fileDetail.getSize() > this.mediaService.getMediaMaxSize()) { throw new UploadUnAuthorized("Max size achieved " + fileDetail.getSize()); } else { mediaId = mediaService.saveApiMedia(api, new MediaEntity( uploadedInputStream, body.getMediaType().getType(), body.getMediaType().getSubtype(), fileDetail.getFileName(), fileDetail.getSize() )); } return Response.status(200).entity(mediaId).build(); }
Source:
public short getLifeVersion() { return buffer.getShort(Version_Field_Size_In_Bytes); }

Target:
public short getLifeVersion() { return buffer.getShort(Life_Version_Field_Offset_In_Bytes); }
Source:
public void testNothing() throws CacheAccessException { final ServiceLocator serviceLocator = new ServiceLocator(); final CacheConfiguration<String, String> config = newCacheConfigurationBuilder().buildConfig(String.class, String.class); final Store.Provider service = serviceLocator.findService(Store.Provider.class); Collection<ServiceConfiguration<?>> serviceConfigs = config.getServiceConfigurations(); ServiceConfiguration<?>[] serviceConfigArray = serviceConfigs.toArray(new ServiceConfiguration[serviceConfigs.size()]); final Store<String, String> store = service.createStore(new StoreConfigurationImpl<String, String>(config), serviceConfigArray); @SuppressWarnings("unchecked") final Cache<String, String> cache = new HeapCache<String, String>(mock(CacheConfiguration.class), store, LoggerFactory.getLogger(Ehcache.class+"CachingTierConfigurationBuilderTest")); assertThat(cache, not(hasKey("key"))); cache.put("key", "value"); assertThat(cache, hasKey("key")); }

Target:
public void testNothing() throws CacheAccessException { final ServiceLocator serviceLocator = new ServiceLocator(); final CacheConfiguration<String, String> config = newCacheConfigurationBuilder().buildConfig(String.class, String.class); final Store.Provider service = serviceLocator.findService(Store.Provider.class); Collection<ServiceConfiguration<?>> serviceConfigs = config.getServiceConfigurations(); ServiceConfiguration<?>[] serviceConfigArray = serviceConfigs.toArray(new ServiceConfiguration[serviceConfigs.size()]); final Store<String, String> store = service.createStore(new StoreConfigurationImpl<String, String>(config), serviceConfigArray); @SuppressWarnings("unchecked") final Cache<String, String> cache = new HeapCache<String, String>(mock(CacheConfiguration.class), store, LoggerFactory.getLogger(Ehcache.class + "-" + "CachingTierConfigurationBuilderTest")); assertThat(cache, not(hasKey("key"))); cache.put("key", "value"); assertThat(cache, hasKey("key")); }
Source:
public static boolean process(final Point[] contour, List<Point> result) { int n = contour.length; if (n < 3) { return false; } int[] V = new int[n]; if (0.0f < area(contour)) { for (int v = 0; v < n; v++) { V[v] = v; } } else { for (int v = 0; v < n; v++) { V[v] = (n - 1) - v; } } int nv = n; int count = 2 * nv; for (int m = 0, v = nv - 1; nv > 2; ) { if (0 >= (count--)) { return false; } int u = v; if (nv <= u) { u = 0; } v = u + 1; if (nv <= v) { v = 0; } int w = v + 1; if (nv <= w) { w = 0; } if (snip(contour, u, v, w, nv, V)) { int a, b, c, s, t; a = V[u]; b = V[v]; c = V[w]; result.add(contour[a]); result.add(contour[b]); result.add(contour[c]); m++; for (s = v, t = v + 1; t < nv; s++, t++) { V[s] = V[t]; } nv--; count = 2 * nv; } } return true; }

Target:
public static boolean process(final Point[] contour, List<Point> result) { int n = contour.length; if (n < 3) { return false; } int[] V = new int[n]; if (0.0f < area(contour)) { for (int v = 0; v < n; v++) { V[v] = v; } } else { for (int v = 0; v < n; v++) { V[v] = (n - 1) - v; } } int nv = n; int count = 2 * nv; for (int m = 0, v = nv - 1; nv > 2; ) { if (0 >= (count--)) { return false; } int u = v; if (nv <= u) { u = 0; } v = u + 1; if (nv <= v) { v = 0; } int w = v + 1; if (nv <= w) { w = 0; } if (snip(contour, u, v, w, nv, V)) { final int a = V[u]; final int b = V[v]; final int c = V[w]; result.add(contour[a]); result.add(contour[b]); result.add(contour[c]); m++; for (int s = v, int t = v + 1; t < nv; s++, t++) { V[s] = V[t]; } nv--; count = 2 * nv; } } return true; }
Source:
private void updateSrcFileListForDupCopy(FileSystem dstFs, Path toPath, List<ReplChangeManager.FileInfo> srcFiles, long writeId, int stmtId) throws IOException { ListIterator<ReplChangeManager.FileInfo> iter = srcFiles.listIterator(); Path basePath = new Path(toPath, AcidUtils.baseOrDeltaSubdir(true, writeId, writeId, stmtId)); while (iter.hasNext()) { Path filePath = new Path(basePath, iter.next().getSourcePath().getName()); try { if (dstFs.getFileStatus(filePath) != null) { LOG.debug("File " + filePath + " is already present in base directory. So removing it from the list."); iter.remove(); } } catch (java.io.FileNotFoundException e) { continue; } } }

Target:
private void updateSrcFileListForDupCopy(FileSystem dstFs, Path toPath, List<ReplChangeManager.FileInfo> srcFiles, long writeId, int stmtId) throws IOException { FileStatus[] statuses; try { statuses = dstFs.listStatus(toPath, path -> { String fn = path.getName(); try { return dstFs.getFileStatus(path).isDirectory() && fn.startsWith(AcidUtils.BASE_PREFIX); } catch (IOException e) { LOG.error("File listing failed for " + toPath, e); throw new RuntimeException(e.getMessage()); } }); } catch (FileNotFoundException e) { LOG.debug("Path does not exist, will be created before copy", toPath); return; } if (statuses.length > 1) { LOG.info("Number of base directory in path is more than one. Duplicate check should not be done.", statuses, toPath); return; } ListIterator<ReplChangeManager.FileInfo> iter = srcFiles.listIterator(); Path basePath = new Path(toPath, AcidUtils.baseOrDeltaSubdir(true, writeId, writeId, stmtId)); while (iter.hasNext()) { Path filePath = new Path(basePath, iter.next().getSourcePath().getName()); if (dstFs.exists(filePath)) { LOG.debug("File " + filePath + " is already present in base directory. So removing it from the list."); iter.remove(); } } }
Source:
private void raiseViolationOnInvalidReference(Table table) { Map<TagNode, List<String>> referenceableHeaders = findReferenceableHeadersPerColumnNode(table); for (int row = 0; row < table.rows().size(); ++row) { for (int col = 0; col < table.rows().get(row).size(); ++col) { Table.Column column = table.rows().get(row).get(col); if (column != null) { TagNode node = column.node(); if (hasHeaders(node)) { List<String> actual = getHeaders(column.node()); List<String> expected = referenceableHeaders.getOrDefault(node, new ArrayList<>()); for (String header : actual) { if (!expected.contains(header)) { if (isExistingHeader(table, header)) { createViolation(node.getStartLinePosition(), format("id \"%s\" in \"headers\" reference the header of another column/row.", header)); } else { createViolation(node.getStartLinePosition(), format("id \"%s\" in \"headers\" does not reference any <th> header.", header)); } break; } } } } } } }

Target:
private void raiseViolationOnInvalidReference(Table table) { Map<TagNode, List<String>> referenceableHeaders = table.findReferenceableHeadersPerCellNode(); table.forEachCell((cell, row, column) -> { if (cell != NIL) { TagNode node = cell.node(); List<String> actual = cell.headers(); List<String> expected = referenceableHeaders.getOrDefault(node, Collections.emptyList()); for (String header : actual) { if (!expected.contains(header)) { if (isExistingHeader(table, header)) { createViolation(node.getStartLinePosition(), format("id \"%s\" in \"headers\" reference the header of another column/row.", header)); } else { createViolation(node.getStartLinePosition(), format("id \"%s\" in \"headers\" does not reference any <th> header.", header)); } break; } } } }); }
Source:
public LicensedVideoSwapHistoryPageObject navigateToHistoryPage() { lvsHistoryBtn.click(); PageObjectLogging.log("navigateToHistoryPage", "verify that the lvs history button navigates to right page", true); return new LicensedVideoSwapHistoryPageObject(driver); }

Target:
public LicensedVideoSwapHistoryPageObject navigateToHistoryPage() { lvsHistoryBtn.click(); PageObjectLogging.log("navigateToHistoryPage", "lvs history button navigates to right page", true); return new LicensedVideoSwapHistoryPageObject(driver); }
Source:
public List<CashPoint> findCashPoints(final Location location, final String name, final boolean includeRetired, PagingInfo pagingInfo) throws APIException { if (location == null) { throw new NullPointerException("The department must be defined"); } if (StringUtils.isEmpty(name)) { throw new IllegalArgumentException("The Cashpoint code must be defined."); } if (name.length() > 255) { throw new IllegalArgumentException("The Cashpoint code must be less than 256 characters."); } return executeCriteria(CashPoint.class, pagingInfo, new Action1<Criteria>() { @Override public void apply(Criteria criteria) { criteria.add(Restrictions.eq(HibernateCriteriaConstants.LOCATION, location)) .add(Restrictions.ilike(HibernateCriteriaConstants.NAME, name, MatchMode.START)); if (!includeRetired) { criteria.add(Restrictions.eq(HibernateCriteriaConstants.RETIRED, false)); } } }); }

Target:
public List<CashPoint> findCashPoints(final Location location, final String name, final boolean includeRetired, PagingInfo pagingInfo) throws APIException { if (location == null) { throw new IllegalArgumentException("The location must be defined"); } if (StringUtils.isEmpty(name)) { throw new IllegalArgumentException("The Cashpoint name must be defined."); } if (name.length() > 255) { throw new IllegalArgumentException("The Cashpoint name must be less than 256 characters."); } return executeCriteria(CashPoint.class, pagingInfo, new Action1<Criteria>() { @Override public void apply(Criteria criteria) { criteria.add(Restrictions.eq(HibernateCriteriaConstants.LOCATION, location)) .add(Restrictions.ilike(HibernateCriteriaConstants.NAME, name, MatchMode.START)); if (!includeRetired) { criteria.add(Restrictions.eq(HibernateCriteriaConstants.RETIRED, false)); } } }); }
Source:
public void setEnvironment(String environment) { checkName(EnvironmentConstants.ENVIRONMENT, environment); if (environment != null) { if (!(EnvironmentConstants.DEVELOPMENT_ENVIRONMENT.equals(environment) || EnvironmentConstants.TEST_ENVIRONMENT.equals(environment) || EnvironmentConstants.PRODUCTION_ENVIRONMENT.equals(environment))) { throw new IllegalStateException(String.format("Unsupported environment: %s, only support %s/%s/%s, default is %s.", environment ,EnvironmentConstants.DEVELOPMENT_ENVIRONMENT ,EnvironmentConstants.TEST_ENVIRONMENT ,EnvironmentConstants.PRODUCTION_ENVIRONMENT ,EnvironmentConstants.PRODUCTION_ENVIRONMENT)); } } this.environment = environment; }

Target:
public void setEnvironment(String environment) { checkName(Constants.ENVIRONMENT, environment); if (environment != null) { if (!(Constants.DEVELOPMENT_ENVIRONMENT.equals(environment) || Constants.TEST_ENVIRONMENT.equals(environment) || Constants.PRODUCTION_ENVIRONMENT.equals(environment))) { throw new IllegalStateException(String.format("Unsupported environment: %s, only support %s/%s/%s, default is %s.", environment, Constants.DEVELOPMENT_ENVIRONMENT, Constants.TEST_ENVIRONMENT, Constants.PRODUCTION_ENVIRONMENT, Constants.PRODUCTION_ENVIRONMENT)); } } this.environment = environment; }
Source:
@Test public void antiJoinCorrelate() { tester(false, new JdbcTest.HrSchema()) .query("?") .withRel( builder -> builder .scan("s", "depts").as("d") .scan("s", "emps").as("e") .antiJoin( builder.equals( builder.field(2, "d", "deptno"), builder.field(2, "e", "deptno"))) .project( builder.field("deptno"), builder.field("name")) .sort(builder.field("deptno")) .build() ) .returnsUnordered( "deptno=30; name=Marketing", "deptno=40; name=HR"); }

Target:
@Test public void antiJoinCorrelate() { tester(false, new JdbcTest.HrSchema()) .query("?") .withRel( builder -> builder .scan("s", "depts").as("d") .scan("s", "emps").as("e") .antiJoin( builder.equals( builder.field(2, "d", "deptno"), builder.field(2, "e", "deptno"))) .project( builder.field("deptno"), builder.field("name")) .build()) .returnsUnordered( "deptno=30; name=Marketing", "deptno=40; name=HR"); }
Source:
public List<Entitlement> entitleByProducts(AutobindData data) throws EntitlementRefusedException { Consumer consumer = data.getConsumer(); String[] productIds = data.getProductIds(); Collection<String> fromPools = data.getPossiblePools(); Date entitleDate = data.getOnDate(); Owner owner = consumer.getOwner(); List<Entitlement> entitlements = new LinkedList<Entitlement>(); List<PoolQuantity> bestPools = getBestPools(consumer, productIds, entitleDate, owner, null, fromPools); if (bestPools == null) { List<String> fullList = new ArrayList<String>(); fullList.addAll(Arrays.asList(productIds)); for (ConsumerInstalledProduct cip : consumer.getInstalledProducts()) { fullList.add(cip.getId()); } log.warn("No entitlements available for products: " + fullList); return null; } for (PoolQuantity entry : bestPools) { entitlements.add(addOrUpdateEntitlement(consumer, entry.getPool(), null, entry.getQuantity(), false, CallerType.BIND)); } return entitlements; }

Target:
public List<Entitlement> entitleByProducts(AutobindData data) throws EntitlementRefusedException { Consumer consumer = data.getConsumer(); String[] productIds = data.getProductIds(); Collection<String> fromPools = data.getPossiblePools(); Date entitleDate = data.getOnDate(); Owner owner = consumer.getOwner(); List<Entitlement> entitlements = new LinkedList<Entitlement>(); List<PoolQuantity> bestPools = getBestPools(consumer, productIds, entitleDate, owner, null, fromPools); if (bestPools == null) { List<String> fullList = new ArrayList<String>(); fullList.addAll(Arrays.asList(productIds)); for (ConsumerInstalledProduct cip : consumer.getInstalledProducts()) { fullList.add(cip.getId()); } log.info("No entitlements available for products: " + fullList); return null; } for (PoolQuantity entry : bestPools) { entitlements.add(addOrUpdateEntitlement(consumer, entry.getPool(), null, entry.getQuantity(), false, CallerType.BIND)); } return entitlements; }
Source:
@Override public void enqueue(final Callback<T> callback) { synchronized (this) { if (executed) throw new IllegalStateException("Already executed"); executed = true; } task = backgroundExecutor.submit(new Runnable() { @Override public void run() { if (behavior.calculateIsFailure()) { try { Thread.sleep(behavior.calculateDelay(MILLISECONDS)); } catch (InterruptedException e) { callbackExecutor.execute(new Runnable() { @Override public void run() { callback.onFailure(new InterruptedIOException("canceled")); } }); return; } callbackExecutor.execute(new Runnable() { @Override public void run() { callback.onFailure(behavior.failureException()); } }); } else { delegate.enqueue(new Callback<T>() { @Override public void onResponse(final Response<T> response) { long sleepMs = behavior.calculateDelay(MILLISECONDS); if (sleepMs > 0) { try { Thread.sleep(sleepMs); } catch (InterruptedException e) { callbackExecutor.execute(new Runnable() { @Override public void run() { callback.onFailure(new InterruptedIOException("canceled")); } }); return; } } callbackExecutor.execute(new Runnable() { @Override public void run() { callback.onResponse(response); } }); } @Override public void onFailure(final Throwable t) { long sleepMs = behavior.calculateDelay(MILLISECONDS); if (sleepMs > 0) { try { Thread.sleep(sleepMs); } catch (InterruptedException e) { callbackExecutor.execute(new Runnable() { @Override public void run() { callback.onFailure(new InterruptedIOException("canceled")); } }); return; } } callbackExecutor.execute(new Runnable() { @Override public void run() { callback.onFailure(t); } }); } }); } } }); }

Target:
@Override public void enqueue(final Callback<T> callback) { synchronized (this) { if (executed) throw new IllegalStateException("Already executed"); executed = true; } task = backgroundExecutor.submit(new Runnable() { private boolean delaySleep() { long sleepMs = behavior.calculateDelay(MILLISECONDS); if (sleepMs > 0) { try { Thread.sleep(sleepMs); } catch (InterruptedException e) { callFailure(new InterruptedIOException("canceled")); return false; } } return true; } private void callResponse(final Response<T> response) { callbackExecutor.execute(new Runnable() { @Override public void run() { callback.onResponse(response); } }); } private void callFailure(final Throwable throwable) { callbackExecutor.execute(new Runnable() { @Override public void run() { callback.onFailure(throwable); } }); } @Override public void run() { if (canceled) { callFailure(new InterruptedIOException("canceled")); } else if (behavior.calculateIsFailure()) { if (delaySleep()) { callFailure(behavior.failureException()); } } else { delegate.enqueue(new Callback<T>() { @Override public void onResponse(final Response<T> response) { if (delaySleep()) { callResponse(response); } } @Override public void onFailure(final Throwable t) { if (delaySleep()) { callFailure(t); } } }); } } }); }
Source:
public String getPath() { URI uri = fileRevision.getURI(); if (uri != null) { return uri.getPath(); } return getName(); }

Target:
public String getPath() { URI uri = fileRevision.getURI(); if (uri != null) return uri.getPath(); return getName(); }
Source:
private void checkDuplicates(CommandHandlingClass candidate) throws DuplicateCommandHandlerError { Set<CommandClass> candidateCommands = candidate.getCommands(); ImmutableMap.Builder<Set<CommandClass>, CommandHandlingClass> map = ImmutableMap.builder(); for (ModelClass<?> modelClass : classes.values()) { if (modelClass instanceof CommandHandlingClass) { CommandHandlingClass commandHandler = (CommandHandlingClass) modelClass; Set<CommandClass> commandClasses = commandHandler.getCommands(); Sets.SetView<CommandClass> intersection = Sets.intersection(commandClasses, candidateCommands); if (intersection.size() > 0) { map.put(intersection, commandHandler); } } } ImmutableMap<Set<CommandClass>, CommandHandlingClass> currentHandlers = map.build(); if (!currentHandlers.isEmpty()) { throw new DuplicateCommandHandlerError(candidate, currentHandlers); } }

Target:
private void checkDuplicates(CommandHandlingClass candidate) throws DuplicateCommandHandlerError { Set<CommandClass> candidateCommands = candidate.getCommands(); ImmutableMap.Builder<Set<CommandClass>, CommandHandlingClass> map = ImmutableMap.builder(); for (ModelClass<?> modelClass : classes.values()) { if (modelClass instanceof CommandHandlingClass) { CommandHandlingClass commandHandler = (CommandHandlingClass) modelClass; Set<CommandClass> commandClasses = commandHandler.getCommands(); Set<CommandClass> intersection = intersection(commandClasses, candidateCommands); if (intersection.size() > 0) { map.put(intersection, commandHandler); } } } ImmutableMap<Set<CommandClass>, CommandHandlingClass> currentHandlers = map.build(); if (!currentHandlers.isEmpty()) { throw new DuplicateCommandHandlerError(candidate, currentHandlers); } }
Source:
public Map<String, String> getAllVariables() { return internalGetAllVariables(-1, Collections.emptySet()); }

Target:
public Map<String, String> getAllVariables() { return internalGetAllVariables(0, Collections.emptySet()); }
Source:
public SslHandler newSSLHandler(SocketChannel channel) { return newSSLHandler(channel, null); }

Target:
public SslHandler newSSLHandler(SocketChannel channel) { SSLEngine engine = newSSLEngine(channel); return new SslHandler(engine); }
Source:
public boolean validUrl(final String url) { if(!(url.toLowerCase().startsWith("http://") || url.toLowerCase().startsWith("https://"))){ Logger.error(this, "URL does not starts with http or https"); return false; } try { final CircuitBreakerUrl urlGetter = CircuitBreakerUrl.builder().setMethod(Method.GET).setUrl(url).build(); urlGetter.doString(); } catch (Exception e) { return false; } return true; }

Target:
public boolean validUrl(final String url) { if(!(url.toLowerCase().startsWith("http://") || url.toLowerCase().startsWith("https://"))){ Logger.error(this, "URL does not starts with http or https"); return false; } try { final CircuitBreakerUrl urlGetter = CircuitBreakerUrl.builder().setMethod(Method.GET).setUrl(url).build(); urlGetter.doString(); } catch (IOException | BadRequestException e) { return false; } return true; }
Source:
private boolean isInCurrentOverWindow(RowData data, long time, boolean includeEqual) { long dataTime = data.getTimestamp(inputTimeFieldIndex, 3).getMillisecond(); long diff = time - dataTime; return diff > 0 && order || diff == 0 && includeEqual; }

Target:
private boolean isInCurrentOverWindow(RowData data, long time, boolean includeEqual) { long dataTime = data.getTimestamp(inputTimeFieldIndex, 3).getMillisecond(); long diff = time - dataTime; return (diff > 0 && asc) || (diff == 0 && includeEqual); }
Source:
public void assertXmlApiMatchesExpected() { try { FreeStyleProject project = createJobWithWorkspaceFile("checkstyleregextest.xml"); enableWarningsWithCheckstyle(project); String buildNumber = String.valueOf(project.getNextBuildNumber()); scheduleBuild(project); XmlPage page = j.createWebClient().goToXml(project.getUrl() + buildNumber + "/checkstyleResult/api/xml"); Document test = page.getXmlDocument(); test = removeRunSpecificXmlNodes(test); Document control = loadControlDocumentFromFile("checkstyleregextest_output.xml"); Diff diff = XMLUnit.compareXML(control, test); assertThat(diff.identical()); } catch (IOException | SAXException e) { e.printStackTrace(); } }

Target:
public void assertXmlApiMatchesExpected() { FreeStyleProject project = createJobWithWorkspaceFile("checkstyleregextest.xml"); enableWarningsWithCheckstyle(project); String buildNumber = String.valueOf(buildProjectAndReturnBuildNo(project)); XmlPage page = getXmlPage(project, buildNumber, "/checkstyleResult/api/xml"); Document test = page.getXmlDocument(); test = removeRunSpecificXmlNodes(test); Document control = loadControlDocumentFromFile("checkstyleregextest_output.xml"); XMLUnit.setIgnoreWhitespace(true); Diff diff = XMLUnit.compareXML(control, test); assertThat(diff.identical()).isTrue(); }
Source:
public static void openModelElement(final Object modelElement, ECPProject ecpProject) { openModelElement(modelElement, ecpProject, null); }

Target:
public static void openModelElement(final Object modelElement, ECPProject ecpProject) { openModelElement(modelElement, ecpProject, new LinkedHashMap<Object, Object>()); }
Source:
public static void main(String[] args) throws Exception { QAargs qaArgs = new QAargs(); CmdLineParser parser = new CmdLineParser(qaArgs, ParserProperties.defaults().withUsageWidth(90)); try { parser.parseArgument(args); } catch (CmdLineException e) { System.err.println(e.getMessage()); parser.printUsage(System.err); System.err.println("Example: RetrieveSentences" + parser.printExample(OptionHandlerFilter.REQUIRED)); return; } if (qaArgs.topics.isEmpty() && qaArgs.query.isEmpty()){ System.err.println("Pass either a query or a topic. Both can't be empty."); return; } RetrieveSentences rs = new RetrieveSentences(); rs.retrieveDocuments(qaArgs); rs.computeIDF(qaArgs); Map<String, Double> sentences = rs.computeIDF(qaArgs); Map.Entry<String, Double> maxEntry = null; for (Map.Entry<String, Double> entry : sentences.entrySet()) { if (maxEntry == null || entry.getValue().compareTo(maxEntry.getValue()) > 0) { maxEntry = entry; } } System.out.println("Answer: " + maxEntry.getKey()); }

Target:
public static void main(String[] args) throws Exception { Args qaArgs = new Args(); CmdLineParser parser = new CmdLineParser(qaArgs, ParserProperties.defaults().withUsageWidth(90)); try { parser.parseArgument(args); } catch (CmdLineException e) { System.err.println(e.getMessage()); parser.printUsage(System.err); System.err.println("Example: RetrieveSentences" + parser.printExample(OptionHandlerFilter.REQUIRED)); return; } if (qaArgs.topics.isEmpty() && qaArgs.query.isEmpty()){ System.err.println("Pass either a query or a topic. Both can't be empty."); return; } RetrieveSentences rs = new RetrieveSentences(qaArgs); rs.retrieveDocuments(qaArgs); rs.getRankedPassages(qaArgs); }
Source:
private List<Change> getRefsForContentAssist() throws InvocationTargetException, InterruptedException { if (changeRefs == null) { final String uriText = uriCombo.getText(); getContainer().run(true, true, new IRunnableWithProgress() { @Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { ListRemoteOperation listOp; try { listOp = new ListRemoteOperation( repository, new URIish(uriText), Activator .getDefault() .getPreferenceStore() .getInt(UIPreferences.REMOTE_CONNECTION_TIMEOUT)); } catch (URISyntaxException e) { throw new InvocationTargetException(e); } listOp.run(monitor); changeRefs = new ArrayList<>(); for (Ref ref : listOp.getRemoteRefs()) { Change change = Change.fromRef(ref.getName()); if (change != null) changeRefs.add(change); } Collections.sort(changeRefs, Collections.reverseOrder()); } }); } return changeRefs; }

Target:
private List<Change> getRefsForContentAssist() throws InvocationTargetException, InterruptedException { if (changeRefs == null) { final String uriText = uriCombo.getText(); getContainer().run(true, true, new IRunnableWithProgress() { @Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { ListRemoteOperation listOp; try { listOp = new ListRemoteOperation( repository, new URIish(uriText), Activator .getDefault() .getPreferenceStore() .getInt(UIPreferences.REMOTE_CONNECTION_TIMEOUT)); } catch (URISyntaxException e) { throw new InvocationTargetException(e); } listOp.run(monitor); changeRefs = new ArrayList<>(); for (Ref ref : listOp.getRemoteRefs()) { Change change = Change.fromRef(ref.getName()); if (change != null) changeRefs.add(change); } Collections.sort(changeRefs, new Comparator<Change>() { @Override public int compare(Change o1, Change o2) { int changeDiff = o2.changeNumber .compareTo(o1.changeNumber); if (changeDiff == 0) changeDiff = o2 .getPatchSetNumber() .compareTo( o1.getPatchSetNumber()); return changeDiff; } }); } }); } return changeRefs; }
Source:
public Object execute() { final List<NamedMetricSet> metricSets = NamedMetricSet.getNamedMetricSetsInContext(bundleContext); if (metricSets.size() < 1) { System.out.println("(No metric sets are currently available.)"); return null; } for (NamedMetricSet namedMetricSet : metricSets) { System.out.printf("Metric set: %s\n", namedMetricSet.getName()); if (namedMetricSet.hasDescription()) { System.out.printf("\t%s\n", namedMetricSet.getDescription()); } } System.out.println(); return null; }

Target:
public Object execute() { final List<NamedMetricSet> metricSets = NamedMetricSet.getNamedMetricSetsInContext(bundleContext); if (metricSets.size() < 1) { System.out.println("(No metric sets are currently available.)"); return null; } System.out.println("Name\tDescription"); for (NamedMetricSet namedMetricSet : metricSets) { System.out.printf("%s\t%s\n", namedMetricSet.getName(), namedMetricSet.hasDescription() ? namedMetricSet.getDescription() : "(No description)"); } System.out.println(); return null; }
Source:
protected Map<String, String> getExternalAddressesAndPorts(ContainerInfo containerInfo, String internalHost) { RenderingEvaluation renderingEvaluation = getOnlineRenderingEvaluation(containerInfo, internalHost); Map<String, List<PortBinding>> ports = containerInfo.getNetworkSettings().getPorts(); if (isNullOrEmpty(cheDockerCustomExternalTemplate)) { return getExposedPortsToAddressPorts(renderingEvaluation.getExternalAddress(), ports, false); } else { return ports.keySet().stream() .collect(Collectors.toMap(portKey -> portKey, portKey -> renderingEvaluation.render(cheDockerCustomExternalTemplate, portKey))); } }

Target:
protected Map<String, String> getExternalAddressesAndPorts(ContainerInfo containerInfo, String internalHost) { RenderingEvaluation renderingEvaluation = getOnlineRenderingEvaluation(containerInfo, internalHost); Map<String, List<PortBinding>> ports = containerInfo.getNetworkSettings().getPorts(); if (isNullOrEmpty(cheDockerCustomExternalTemplate)) { return getExposedPortsToAddressPorts(renderingEvaluation.getExternalAddress(), ports, false); } return ports.keySet().stream() .collect(Collectors.toMap(portKey -> portKey, portKey -> renderingEvaluation.render(cheDockerCustomExternalTemplate, portKey))); }