auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private MetaLanguage buildMetaLanguage(Language language, String packageCode, PackageList packages, PackageStructureList packageStructures, Multimap<UUID, Translation> translationsMap, boolean draftsOnly, boolean allResults) { MetaLanguage metaLanguage = new MetaLanguage(language); if(Strings.isNullOrEmpty(packageCode)) { TranslationList translations = new TranslationList((List<Translation>) translationsMap.get(language.getId())); if(!allResults) { translations = new TranslationList(translations.pareResults()); } for (Translation translation : translations) { Package gtPackage = packages.getPackageById(translation.getPackageId()).get(); metaLanguage.addPackage( gtPackage.getCode(), new GodToolsVersion( packageStructures.getByPackageId(gtPackage.getId()).get(), translation), translation.isReleased()); } } else { Translation translation = null; Package gtPackage = packages.getPackageByCode(packageCode).get(); <START> for(Translation translationT : new TranslationList((List<Translation>) translationsMap.get(language.getId()))) <END> { if(translationT.getPackageId().equals(gtPackage.getId())) { if(draftsOnly) { if(!translationT.isReleased()) { translation = translationT; } } else { if(translationT.isReleased() && (translation == null || translationT.getVersionNumber().compareTo(translation.getVersionNumber()) > 0)) { translation = translationT; } } } } if(translation != null) { metaLanguage.addPackage( packageCode, new GodToolsVersion( packageStructures.getByPackageId(gtPackage.getId()).get(), translation), translation.isReleased()); } } return metaLanguage; }</code><technical_language>need create a TranslationList here. calling translationsMap.get() get a List iterated through</technical_language>

Target:
private MetaLanguage buildMetaLanguage(Language language, String packageCode, PackageList packages, PackageStructureList packageStructures, Multimap<UUID, Translation> translationsMap, boolean draftsOnly, boolean allResults) { MetaLanguage metaLanguage = new MetaLanguage(language); if(Strings.isNullOrEmpty(packageCode)) { TranslationList translations = new TranslationList((List<Translation>) translationsMap.get(language.getId())); if(!allResults) { translations = translations.pareResults(); } for (Translation translation : translations) { Package gtPackage = packages.getPackageById(translation.getPackageId()).get(); metaLanguage.addPackage( gtPackage.getCode(), new GodToolsVersion( packageStructures.getByPackageId(gtPackage.getId()).get(), translation), translation.isReleased()); } } else { Package gtPackage = packages.getPackageByCode(packageCode).get(); TranslationList translations = new TranslationList((List<Translation>) translationsMap.get(language.getId())) .pareResults(!draftsOnly) .pareResults(gtPackage.getId()); translations = draftsOnly ? translations : translations.pareResults(); Translation translation = !translations.isEmpty() ? translations.get(0) : null; if(translation != null) { metaLanguage.addPackage( packageCode, new GodToolsVersion( packageStructures.getByPackageId(gtPackage.getId()).get(), translation), translation.isReleased()); } } return metaLanguage; }
Source:
<code>private double getMcqOtherWeight(Map<String, String[]> requestParameters, boolean mcqOtherEnabled, boolean hasAssignedWeights) { <START> double mcqOtherWeight = this.mcqOtherWeight; <END> if (!hasAssignedWeights || !mcqOtherEnabled) { return mcqOtherWeight; } String weightOther = HttpRequestHelper.getValueFromParamMap( requestParameters, Const.ParamsNames.FEEDBACK_QUESTION_MCQ_OTHER_WEIGHT); try { mcqOtherWeight = Double.parseDouble(weightOther); } catch (NumberFormatException e) { log.warning("Failed to parse \"other\" weight of MCQ question: " + weightOther); } return mcqOtherWeight; }</code><technical_language>0 instead of this.mcqOtherWeight</technical_language>

Target:
private double getMcqOtherWeight(Map<String, String[]> requestParameters, boolean mcqOtherEnabled, boolean hasAssignedWeights) { double mcqOtherWeight = 0; if (!hasAssignedWeights || !mcqOtherEnabled) { return mcqOtherWeight; } String weightOther = HttpRequestHelper.getValueFromParamMap( requestParameters, Const.ParamsNames.FEEDBACK_QUESTION_MCQ_OTHER_WEIGHT); Assumption.assertNotNull("Null 'other' weight of MCQ question", weightOther); Assumption.assertNotEmpty("Empty 'other' weight of MCQ question", weightOther); try { mcqOtherWeight = Double.parseDouble(weightOther); } catch (NumberFormatException e) { log.warning("Failed to parse \"other\" weight of MCQ question: " + weightOther); } return mcqOtherWeight; }
Source:
<code>public void test_streaming_of_signature_and_type_signatures() throws Exception { var objectType = ObjectType.builder() .setInnerType("x", DataTypes.INTEGER) .build(); var signature = Signature.builder() .name("foo") .kind(FunctionInfo.Type.SCALAR) <START> .setVariableArity(true) <END> .argumentTypes( parseTypeSignature("E"), DataTypes.INTEGER.getTypeSignature(), objectType.getTypeSignature() ) .returnType(DataTypes.BIGINT_ARRAY.getTypeSignature()) .variableArityGroup( List.of( DataTypes.INTEGER.getTypeSignature(), objectType.getTypeSignature() ) ) .typeVariableConstraints(typeVariable("E")) .build(); BytesStreamOutput out = new BytesStreamOutput(); signature.writeTo(out); StreamInput in = out.bytes().streamInput(); var signature2 = new Signature(in); assertThat(signature2, equalTo(signature)); }</code><technical_language>this removed</technical_language>

Target:
public void test_streaming_of_signature_and_type_signatures() throws Exception { var objectType = ObjectType.builder() .setInnerType("x", DataTypes.INTEGER) .build(); var signature = Signature.builder() .name("foo") .kind(FunctionInfo.Type.SCALAR) .argumentTypes( parseTypeSignature("E"), DataTypes.INTEGER.getTypeSignature(), objectType.getTypeSignature() ) .returnType(DataTypes.BIGINT_ARRAY.getTypeSignature()) .variableArityGroup( List.of( DataTypes.INTEGER.getTypeSignature(), objectType.getTypeSignature() ) ) .typeVariableConstraints(typeVariable("E")) .build(); BytesStreamOutput out = new BytesStreamOutput(); signature.writeTo(out); StreamInput in = out.bytes().streamInput(); var signature2 = new Signature(in); assertThat(signature2, equalTo(signature)); }
Source:
<code>public void process() { <START> enableWireframeIf(renderingDebugConfig.isWireframe()); <END> sceneOpaque = frameBuffersManager.getFBO("sceneOpaque"); setRenderBufferMask(sceneOpaque, true, true, true); if (renderingConfig.isInscattering()) { sceneSkyBand0 = frameBuffersManager.getFBO("sceneSkyBand0"); FBO sceneSkyBand1 = frameBuffersManager.getFBO("sceneSkyBand1"); generateSkyBand(sceneSkyBand0); generateSkyBand(sceneSkyBand1); } sceneOpaque.bind(); playerCamera.lookThrough(); endRenderSkyActivity(); }</code><technical_language>Please enable disable wireframe in nodes originally enableWireframeIf/disableWireframeIf statements in WorldRendererImpl.render method. So, of nodes need enable/disable pair. This of a small performance hit eventually solve state management</technical_language>

Target:
public void process() { PerformanceMonitor.startActivity("rendering/skybands"); enableWireframeIf(renderingDebugConfig.isWireframe()); sceneOpaque = frameBuffersManager.getFBO("sceneOpaque"); setRenderBufferMask(sceneOpaque, true, true, true); if (renderingConfig.isInscattering()) { sceneSkyBand0 = frameBuffersManager.getFBO("sceneSkyBand0"); FBO sceneSkyBand1 = frameBuffersManager.getFBO("sceneSkyBand1"); generateSkyBand(sceneSkyBand0); generateSkyBand(sceneSkyBand1); } sceneOpaque.bind(); playerCamera.lookThrough(); disableWireframeIf(renderingDebugConfig.isWireframe()); PerformanceMonitor.endActivity(); }
Source:
<code>protected boolean isSubtypeWithElements( AnnotationMirror subAnno, QualifierKind subKind, AnnotationMirror superAnno, QualifierKind superKind) { <START> if (!subKind.isInSameHierarchyAs(NULLABLE) <END> || !superKind.isInSameHierarchyAs(NULLABLE)) { return this.isSubtypeInitialization(subAnno, subKind, superAnno, superKind); } throw new BugInCF("Unexpected annotations %s %s.", subAnno, superAnno); }</code><technical_language>isInSameHierarchy calls return value? is OK if return values</technical_language>

Target:
protected boolean isSubtypeWithElements( AnnotationMirror subAnno, QualifierKind subKind, AnnotationMirror superAnno, QualifierKind superKind) { if (!subKind.isInSameHierarchyAs(NULLABLE) || !superKind.isInSameHierarchyAs(NULLABLE)) { return this.isSubtypeInitialization(subAnno, subKind, superAnno, superKind); } throw new BugInCF( "Unexpected annotations isSubtypeWithElements(%s, %s)", subAnno, superAnno); }
Source:
<code>public void testCsvQueryResponseTransformer() throws CatalogTransformerException, IOException { Map<String, Serializable> argumentsMap = new HashMap<>(); String[] hiddenFieldsArray = {"attribute3", "attribute5"}; argumentsMap.put("hiddenFields", buildSet(hiddenFieldsArray)); <START> String[] columnOrderArray = {"attribute4", "attribute2", "attribute1"}; <END> argumentsMap.put("columnOrder", buildList(columnOrderArray)); String[][] aliases = {{"attribute1", "column1"}, {"attribute2", "column2"}}; argumentsMap.put("aliases", buildMap(aliases)); assertThat(ATTRIBUTE_DESCRIPTOR_LIST.size(), is(ATTRIBUTE_DATA.length)); BinaryContent bc = transformer.transform(sourceResponse, argumentsMap); Scanner scanner = new Scanner(bc.getInputStream()); scanner.useDelimiter("\\n|\\r|,"); String[] expectedHeaders = {"attribute4", "column2", "column1"}; validate(scanner, expectedHeaders); String[] expectedValues = {"", "\"value", "4\"", "101", "value1"}; for (int i = 0; i < METACARD_COUNT; i++) { validate(scanner, expectedValues); } assertThat(scanner.hasNext(), is(true)); assertThat(scanner.next(), is("")); assertThat(scanner.hasNext(), is(false)); }</code><technical_language>this test verify new behavior? attributes exported removing object/binary attributes hidden fields, leaving this {"attribute4", "attribute2"} changing expectedHeaders {"attribute4", "column2"} verify visible attributes exported</technical_language>

Target:
public void testCsvQueryResponseTransformer() throws CatalogTransformerException, IOException { Map<String, Serializable> argumentsMap = new HashMap<>(); String[] hiddenFieldsArray = {"attribute3", "attribute5"}; argumentsMap.put("hiddenFields", buildSet(hiddenFieldsArray)); String[] columnOrderArray = {"attribute4", "attribute2"}; argumentsMap.put("columnOrder", buildList(columnOrderArray)); String[][] aliases = {{"attribute1", "column1"}, {"attribute2", "column2"}}; argumentsMap.put("aliases", buildMap(aliases)); assertThat(ATTRIBUTE_DESCRIPTOR_LIST.size(), is(ATTRIBUTE_DATA.length)); BinaryContent bc = transformer.transform(sourceResponse, argumentsMap); Scanner scanner = new Scanner(bc.getInputStream()); scanner.useDelimiter("\\n|\\r|,"); String[] expectedHeaders = {"attribute4", "column2"}; validate(scanner, expectedHeaders); String[] expectedValues = {"", "\"value", "4\"", "101"}; for (int i = 0; i < METACARD_COUNT; i++) { validate(scanner, expectedValues); } assertThat(scanner.hasNext(), is(true)); assertThat(scanner.next(), is("")); assertThat(scanner.hasNext(), is(false)); }
Source:
<code>public void update(VdsDynamic vds) { DnsResolverConfiguration reportedDnsResolverConfiguration = vds.getReportedDnsResolverConfiguration(); <START> if (reportedDnsResolverConfiguration != null) { <END> if (reportedDnsResolverConfiguration.getId() == null) { dnsResolverConfigurationDao.save(reportedDnsResolverConfiguration); } else { dnsResolverConfigurationDao.update(reportedDnsResolverConfiguration); } } getCallsHandler().executeModification("UpdateVdsDynamic", createFullParametersMapper(vds)); }</code><technical_language>If is 'null', remove 'ReportedDnsResolverConfiguration'</technical_language>

Target:
public void update(VdsDynamic vds) { DnsResolverConfiguration reportedDnsResolverConfiguration = vds.getReportedDnsResolverConfiguration(); if (reportedDnsResolverConfiguration == null) { dnsResolverConfigurationDao.removeByVdsDynamicId(vds.getId()); } else { if (reportedDnsResolverConfiguration.getId() == null) { dnsResolverConfigurationDao.save(reportedDnsResolverConfiguration); } else { dnsResolverConfigurationDao.update(reportedDnsResolverConfiguration); } } getCallsHandler().executeModification("UpdateVdsDynamic", createFullParametersMapper(vds)); }
Source:
<code>public Map<TaskName, Integer> readPartitionMapping() { LOG.debug("Reading changelog partition information"); final Map<TaskName, Integer> changelogMapping = new HashMap<>(); metadataStore.all().forEach((taskName, partitionIdAsBytes) -> { String partitionId = valueSerde.fromBytes(partitionIdAsBytes); LOG.debug("TaskName: is mapped to {}", taskName, partitionId); <START> if (partitionId != null) { <END> changelogMapping.put(new TaskName(taskName), Integer.valueOf(partitionId)); } }); return changelogMapping; }</code><technical_language>safer replace null check StringUtils.isNotBlank(partitionId)</technical_language>

Target:
public Map<TaskName, Integer> readPartitionMapping() { LOG.debug("Reading changelog partition information"); final Map<TaskName, Integer> changelogMapping = new HashMap<>(); metadataStore.all().forEach((taskName, partitionIdAsBytes) -> { String partitionId = valueSerde.fromBytes(partitionIdAsBytes); LOG.debug("TaskName: is mapped to {}", taskName, partitionId); if (StringUtils.isNotBlank(partitionId)) { changelogMapping.put(new TaskName(taskName), Integer.valueOf(partitionId)); } }); return changelogMapping; }
Source:
<code>public static boolean checkClusterVersionSupported(Version clusterCompatibilityVersion, VDS vds) { boolean isVersionSupported = !StringUtils.isEmpty(vds.getSupportedClusterLevels()); if (isVersionSupported) { try { isVersionSupported = vds.getSupportedClusterVersionsSet().contains(clusterCompatibilityVersion); } catch (RuntimeException e) { <START> log.error(e.getMessage()); <END> isVersionSupported = false; } } return isVersionSupported; }</code><technical_language>"{}", e.getMessage() stack</technical_language>

Target:
public static boolean checkClusterVersionSupported(Version clusterCompatibilityVersion, VDS vds) { boolean isVersionSupported = !StringUtils.isEmpty(vds.getSupportedClusterLevels()); if (isVersionSupported) { try { isVersionSupported = vds.getSupportedClusterVersionsSet().contains(clusterCompatibilityVersion); } catch (RuntimeException e) { log.error("{}", e.getMessage()); log.debug("Exception", e); isVersionSupported = false; } } return isVersionSupported; }
Source:
<code>public String encodePartition(SinkRecord sinkRecord) { long timestamp; if (timeFieldName.equals("")) { timestamp = System.currentTimeMillis(); } else { <START> Struct struct = (Struct) sinkRecord.value(); <END> timestamp = (long) struct.get(timeFieldName); } DateTime bucket = new DateTime(getPartition(partitionDurationMs, timestamp, formatter.getZone())); return bucket.toString(formatter); }</code><technical_language>want validate type casting throw ConnectException if a Struct. deal for checking field exists if type is correct</technical_language>

Target:
public String encodePartition(SinkRecord sinkRecord) { long timestamp; if (timeFieldName.equals("")) { timestamp = System.currentTimeMillis(); } else { try { Struct struct = (Struct) sinkRecord.value(); timestamp = (long) struct.get(timeFieldName); } catch (ClassCastException | DataException e) { throw new ConnectException("Failed to get time field:", e); } } DateTime bucket = new DateTime(getPartition(partitionDurationMs, timestamp, formatter.getZone())); return bucket.toString(formatter); }
Source:
<code>public void testTranslateClusteredResourcePoolConfiguration() { ClusteredResourceConfigurationParser configTranslator = new ClusteredResourceConfigurationParser(); ClusteredResourcePoolImpl clusteredResourcePool = new ClusteredResourcePoolImpl(); Node retElement = configTranslator.unparseResourcePool(clusteredResourcePool); assertThat(retElement, is(notNullValue())); assertThat(retElement.getNodeName(), is("ehcache:resources")); <START> assertThat(retElement.getAttributes(), is(notNullValue())); <END> assertThat(retElement.getAttributes().getLength(), is(1)); assertThat(retElement.getAttributes().item(0).getNodeName(), is("xmlns:ehcache")); assertThat(retElement.getAttributes().item(0).getNodeValue(), is("<LINK_0>")); Node clusterElement = retElement.getFirstChild(); assertThat(clusterElement, is(notNullValue())); assertThat(clusterElement.getAttributes(), is(notNullValue())); assertThat(clusterElement.getAttributes().getLength(), is(1)); assertThat(clusterElement.getAttributes().item(0).getNodeName(), is("xmlns:tc")); assertThat(clusterElement.getAttributes().item(0).getNodeValue(), is("<LINK_0>/clustered")); assertThat(clusterElement.getNodeName(), is("tc:clustered")); assertThat(clusterElement.getFirstChild(), is(nullValue())); }</code><technical_language>Please extract result of getAttributes a variable</technical_language>

Target:
public void testTranslateClusteredResourcePoolConfiguration() { ClusteredResourceConfigurationParser configTranslator = new ClusteredResourceConfigurationParser(); ClusteredResourcePoolImpl clusteredResourcePool = new ClusteredResourcePoolImpl(); Node retElement = configTranslator.unparseResourcePool(clusteredResourcePool); assertThat(retElement, is(notNullValue())); assertThat(retElement.getNodeName(), is("ehcache:resources")); checkAttributeItems(retElement); Node clusterElement = retElement.getFirstChild(); assertThat(clusterElement, is(notNullValue())); assertThat(clusterElement.getNodeName(), is("tc:clustered")); checkAttributeItems(clusterElement); assertThat(clusterElement.getFirstChild(), is(nullValue())); }
Source:
<code>BitSet<T> fromBitMaskNoCopy(long[] elements) { final int len = elements.length; if (len == 0) { return createEmpty(); } <START> if (len == 1) { <END> return new BitSet1<>(fromInt, toInt, elements[0]); } if (len == 2) { return new BitSet2<>(fromInt, toInt, elements[0], elements[1]); } return new BitSetN<>(fromInt, toInt, elements); }</code><technical_language>minor: please else if mutually exclusive branches</technical_language>

Target:
BitSet<T> fromBitMaskNoCopy(long[] elements) { final int len = elements.length; if (len == 0) { return createEmpty(); } else if (len == 1) { return new BitSet1<>(fromInt, toInt, elements[0]); } else if (len == 2) { return new BitSet2<>(fromInt, toInt, elements[0], elements[1]); } else { return new BitSetN<>(fromInt, toInt, elements); } }
Source:
<code>private boolean knownToBeCommittedAfterSweepTs(long startTs, long sweepTs) { Optional<Long> commitTsIfCached = commitTsCache.loadIfCached(startTs); <START> return commitTsIfCached.isPresent() && commitTsIfCached.get() >= sweepTs; <END> }</code><technical_language>nit: this is equivalent commitTsIfCached.map(x -> x >= sweepTs).orElse(false) I (and fluent if want there!)</technical_language>

Target:
private boolean knownToBeCommittedAfterSweepTs(long startTs, long sweepTs) { return commitTsCache.loadIfCached(startTs).map(commitTs -> commitTs >= sweepTs).orElse(false); }
Source:
<code>public Option[] individualModules() { return options( <START> frameworkProperty("org.ehcache.core.osgi").value("true"), <END> gradleBundle("org.ehcache.modules:api"), gradleBundle("org.ehcache.modules:core"), gradleBundle("org.ehcache.modules:impl"), gradleBundle("org.ehcache.modules:xml"), gradleBundle("org.ehcache:clustered-dist"), wrappedGradleBundle("org.terracotta:statistics"), wrappedGradleBundle("org.ehcache:sizeof"), wrappedGradleBundle("org.terracotta:offheap-store"), baseConfiguration() ); }</code><technical_language>OSGI_LOADING constant here</technical_language>

Target:
public Option[] individualModules() { return options( gradleBundle("org.ehcache.modules:api"), gradleBundle("org.ehcache.modules:core"), gradleBundle("org.ehcache.modules:impl"), gradleBundle("org.ehcache.modules:xml"), gradleBundle("org.ehcache:clustered-dist"), wrappedGradleBundle("org.terracotta:statistics"), wrappedGradleBundle("org.ehcache:sizeof"), wrappedGradleBundle("org.terracotta:offheap-store"), baseConfiguration() ); }
Source:
<code><START> public void onEventTime(InternalTimer<K, VoidNamespace> timer) throws Exception { <END> long timestamp = timer.getTimestamp(); List<RowData> inputs = inputState.get(timestamp); Iterable<Long> keyIter = inputState.keys(); for (Long dataTs : keyIter) { insertToSortedList(dataTs); } int index = sortedTimestamps.indexOf(timestamp); for (int i = 0; i < inputs.size(); i++) { forwardedInputQueue.add(inputs.get(i)); triggerWindowProcess(inputs, i, index); } windowData.clear(); sortedTimestamps.clear(); }</code><technical_language>moving this method StreamArrowPythonRowTimeBoundedRowsOperator for event time</technical_language>

Target:
public void onEventTime(InternalTimer<K, VoidNamespace> timer) throws Exception { long timestamp = timer.getTimestamp(); List<RowData> inputs = inputState.get(timestamp); Iterable<Long> keyIter = inputState.keys(); long currentWatermark = timerService.currentWatermark(); for (Long dataTs : keyIter) { if (dataTs <= currentWatermark) { insertToSortedList(dataTs); } } int index = sortedTimestamps.indexOf(timestamp); for (int i = 0; i < inputs.size(); i++) { forwardedInputQueue.add(inputs.get(i)); triggerWindowProcess(inputs, i, index); } windowData.clear(); sortedTimestamps.clear(); }
Source:
<code><START> public Unmarshaller getUnmarshaller() throws JAXBException { <END> if (unmarshaller == null) { unmarshaller = JAXBContext.newInstance(ServiceDefinitionPair.class).createUnmarshaller(); } return unmarshaller; }</code><technical_language>this public? synchronized</technical_language>

Target:
private synchronized Unmarshaller getUnmarshaller() throws JAXBException { if (unmarshaller == null) { unmarshaller = JAXBContext.newInstance(ServiceDefinitionPair.class).createUnmarshaller(); } return unmarshaller; }
Source:
<code>protected Assertion getDecryptedAssertion(EncryptedAssertion encryptedAssertion) throws SSOAgentException { try { KeyInfoCredentialResolver keyResolver = new StaticKeyInfoCredentialResolver( new X509CredentialImpl(ssoAgentConfig.getSAML2().getSSOAgentX509Credential())); EncryptedKey key = encryptedAssertion.getEncryptedData(). getKeyInfo().getEncryptedKeys().get(0); Decrypter decrypter = new Decrypter(null, keyResolver, null); SecretKey dkey = (SecretKey) decrypter.decryptKey(key, encryptedAssertion.getEncryptedData(). getEncryptionMethod().getAlgorithm()); Credential shared = SecurityHelper.getSimpleCredential(dkey); decrypter = new Decrypter(new StaticKeyInfoCredentialResolver(shared), null, null); decrypter.setRootInNewDocument(true); return decrypter.decrypt(encryptedAssertion); } catch (Exception e){ if(log.isDebugEnabled()){ log.debug("Decrypted assertion error : ",e); <START> throw new SSOAgentException(e); <END> } } return null; }</code><technical_language>add some message throwing exceptions</technical_language>

Target:
protected Assertion getDecryptedAssertion(EncryptedAssertion encryptedAssertion) throws SSOAgentException { try { KeyInfoCredentialResolver keyResolver = new StaticKeyInfoCredentialResolver( new X509CredentialImpl(ssoAgentConfig.getSAML2().getSSOAgentX509Credential())); EncryptedKey key = encryptedAssertion.getEncryptedData(). getKeyInfo().getEncryptedKeys().get(0); Decrypter decrypter = new Decrypter(null, keyResolver, null); SecretKey dkey = (SecretKey) decrypter.decryptKey(key, encryptedAssertion.getEncryptedData(). getEncryptionMethod().getAlgorithm()); Credential shared = SecurityHelper.getSimpleCredential(dkey); decrypter = new Decrypter(new StaticKeyInfoCredentialResolver(shared), null, null); decrypter.setRootInNewDocument(true); return decrypter.decrypt(encryptedAssertion); } catch (Exception e) { throw new SSOAgentException("Decrypted assertion error", e); } }
Source:
<code>private String doTokenAuth(HttpServletRequest request, HttpServletResponse response) throws HttpAuthenticationException { <START> String delegationTokenHeader = "X-Hadoop-Delegation-Token"; <END> String tokenStr = request.getHeader(delegationTokenHeader); try { return hiveAuthFactory.verifyDelegationToken(tokenStr); } catch (HiveSQLException e) { throw new HttpAuthenticationException(e); } }</code><technical_language>DelegationTokenAuthenticator.DELEGATION_TOKEN_HEADER in constructor above</technical_language>

Target:
private String doTokenAuth(HttpServletRequest request, HttpServletResponse response) throws HttpAuthenticationException { String tokenStr = request.getHeader(HIVE_DELEGATION_TOKEN_HEADER); try { return hiveAuthFactory.verifyDelegationToken(tokenStr); } catch (HiveSQLException e) { throw new HttpAuthenticationException(e); } }
Source:
<code>public void testQueryByDeployTimeAfter() { <START> String deployTime = withTimezone("2020-03-27T00:00:00"); <END> Date date = DateTimeUtil.parseDate(deployTime); given().queryParam("deployedAfter", deployTime) .then().expect().statusCode(Status.OK.getStatusCode()) .when().get(PROCESS_DEFINITION_QUERY_URL); verify(mockedQuery).deployedAfter(date); verify(mockedQuery).list(); }</code><technical_language>a test if test a time is 00:00:00. This catch more bugs in opinion</technical_language>

Target:
public void testQueryByDeployTimeAfter() { String deployTime = withTimezone("2020-03-27T01:23:45"); Date date = DateTimeUtil.parseDate(deployTime); given().queryParam("deployedAfter", deployTime) .then().expect().statusCode(Status.OK.getStatusCode()) .when().get(PROCESS_DEFINITION_QUERY_URL); verify(mockedQuery).deployedAfter(date); verify(mockedQuery).list(); }
Source:
<code>protected void onSuccessAuthentication() { ProjectDescriptor descriptor = appContext.getCurrentProject().getProjectDescription(); <START> final String nameSpace = getAttributeValue(descriptor, OPENSHIFT_NAMESPACE_VARIABLE_NAME); <END> if (!nameSpace.isEmpty()) { Promise<List<BuildConfig>> buildConfigs = service.getBuildConfigs(nameSpace); buildConfigs.then(showConfirmDialog(descriptor, nameSpace)) .catchError(handleError(nameSpace)); } else { notificationManager.showInfo(locale.projectAttributeNameSpaceIsEmpty()); } }</code><technical_language>Write please namespace instead of nameSpace</technical_language>

Target:
protected void onSuccessAuthentication() { ProjectDescriptor descriptor = appContext.getCurrentProject().getProjectDescription(); final String namespace = getAttributeValue(descriptor, OPENSHIFT_NAMESPACE_VARIABLE_NAME); if (!Strings.isNullOrEmpty(namespace)) { Promise<List<BuildConfig>> buildConfigs = service.getBuildConfigs(namespace); buildConfigs.then(showConfirmDialog(descriptor, namespace)) .catchError(handleError(namespace)); } else { notificationManager.showError(locale.projectAttributeNameSpaceIsEmpty()); } }
Source:
<code>public static <T> void assertResult(final FEELFnResult<T> result, final T expectedResult) { if (expectedResult == null) { assertResultNull(result); } else { assertResultNotError(result); final T resultValue = result.cata(left -> null, right -> right); Assert.assertThat(resultValue, Matchers.notNullValue()); <START> ; <END> } }</code><technical_language>is this removed</technical_language>

Target:
public static <T> void assertResult(final FEELFnResult<T> result, final T expectedResult) { if (expectedResult == null) { assertResultNull(result); } else { assertResultNotError(result); final T resultValue = result.cata(left -> null, right -> right); Assert.assertThat(resultValue, Matchers.notNullValue()); Assert.assertThat(resultValue, Matchers.equalTo(expectedResult)); } }
Source:
<code>public void setUp() throws Exception { super.setUp(); when(canvasPanel.getLocationConstraints()).thenReturn(PANEL_BOUNDS); when(candidate.getContent()).thenReturn(new ViewImpl<>(mock(Object.class), ELEMENT_BOUNDS)); <START> ; <END> }</code><technical_language>Useless semicolon</technical_language>

Target:
public void setUp() throws Exception { super.setUp(); when(canvasPanel.getLocationConstraints()).thenReturn(PANEL_BOUNDS); when(candidate.getContent()).thenReturn(new ViewImpl<>(mock(Object.class), ELEMENT_BOUNDS)); }
Source:
<code>protected Configuration createConfiguration(Object data, Class clazz) { Configuration cfg = super.createConfiguration(data, ModuleStatusImpl.class); cfg.setClassForTemplateLoading(getClass(),"templates"); cfg.setObjectWrapper( new BeansWrapper() { @Override public TemplateModel wrap(Object obj) throws TemplateModelException { if( obj instanceof List){ List<?> list = (List<?>) obj; SimpleHash hash = new SimpleHash(); hash.put( "values", new CollectionModel( list, new BeansWrapper(){ public TemplateModel wrap(Object object) throws TemplateModelException { if( object instanceof ModuleStatus){ ModuleStatus status = (ModuleStatus) object; SimpleHash hash = new SimpleHash(); hash.put("module", status.getModule() ); hash.put("name", status.getName() ); if (status.getComponent() != null) { <START> hash.put("component", status.getComponent().get()); <END> } if (status.getVersion() != null) { hash.put("version", status.getVersion().get()); } if (status.getMessage() != null) { hash.put("message", status.getMessage().get()); } return hash; } return super.wrap(object); }; }) ); return hash; } return super.wrap(obj); } }); return cfg; }</code><technical_language>switched Optional, this needs changed</technical_language>

Target:
protected Configuration createConfiguration(Object data, Class clazz) { Configuration cfg = super.createConfiguration(data, ModuleStatusImpl.class); cfg.setClassForTemplateLoading(getClass(),"templates"); cfg.setObjectWrapper( new BeansWrapper() { @Override public TemplateModel wrap(Object obj) throws TemplateModelException { if( obj instanceof List){ List<?> list = (List<?>) obj; SimpleHash hash = new SimpleHash(); hash.put( "values", new CollectionModel( list, new BeansWrapper(){ public TemplateModel wrap(Object object) throws TemplateModelException { if( object instanceof ModuleStatus){ ModuleStatus status = (ModuleStatus) object; SimpleHash hash = new SimpleHash(); hash.put("module", status.getModule() ); hash.put("name", status.getName() ); status.getComponent().ifPresent(component->{hash.put("component",component);}); status.getVersion().ifPresent(version->{hash.put("version", version);}); status.getMessage().ifPresent(message->{hash.put("message",message);}); return hash; } return super.wrap(object); }; }) ); return hash; } return super.wrap(obj); } }); return cfg; }
Source:
<code>private void prepareTestCase() throws MCSException, MalformedURLException, CloudException { URI uri = sourceDatasetHelper.prepareDatasetWithRecordsInside(SOURCE_PROVIDER_ID, SOURCE_DATASET_NAME, SOURCE_REPRESENTATION_NAME, SOURCE_REVISION_NAME, Tags.PUBLISHED.getTag(), RECORDS_NUMBERS); <START> LOGGER.info("The source dataSet has been created! It is url is {}", SOURCE_DATASET_NAME, uri); <END> destinationDatasetHelper.prepareEmptyDataset(DESTINATION_PROVIDER_ID, DESTINATION_DATASET_NAME); LOGGER.info("The destination dataSet has been created! It is url is ", DESTINATION_DATASET_NAME, uri); List<Representation> representations = sourceDatasetHelper.getRepresentationsInsideDataSetByName(SOURCE_PROVIDER_ID, SOURCE_DATASET_NAME, SOURCE_REPRESENTATION_NAME); for (Representation representation : representations) { destinationDatasetHelper.assignRepresentationVersionToDataSet(DESTINATION_PROVIDER_ID, DESTINATION_DATASET_NAME, representation.getCloudId(), representation.getRepresentationName(), representation.getVersion()); sourceDatasetHelper.grantPermissionToVersion(representation.getCloudId(), representation.getRepresentationName(), representation.getVersion(), appProperties.getProperty("destinationUserName"), Permission.READ); revisionServiceClient.addRevision(representation.getCloudId(), representation.getRepresentationName(), representation.getVersion(), DESTINATION_REVISION_NAME, DESTINATION_PROVIDER_ID, Tags.PUBLISHED.getTag()); } }</code><technical_language>a cosmetic remark: "It is url is" "Its url is"</technical_language>

Target:
private void prepareTestCase() throws MCSException, MalformedURLException, CloudException { URI uri = sourceDatasetHelper.prepareDatasetWithRecordsInside(SOURCE_PROVIDER_ID, SOURCE_DATASET_NAME, SOURCE_REPRESENTATION_NAME, SOURCE_REVISION_NAME, Tags.PUBLISHED.getTag(), RECORDS_NUMBERS); LOGGER.info("The source dataSet has been created! Its url is {}", SOURCE_DATASET_NAME, uri); destinationDatasetHelper.prepareEmptyDataset(DESTINATION_PROVIDER_ID, DESTINATION_DATASET_NAME); LOGGER.info("The destination dataSet has been created! Its url is ", DESTINATION_DATASET_NAME, uri); List<Representation> representations = sourceDatasetHelper.getRepresentationsInsideDataSetByName(SOURCE_PROVIDER_ID, SOURCE_DATASET_NAME, SOURCE_REPRESENTATION_NAME); for (Representation representation : representations) { destinationDatasetHelper.assignRepresentationVersionToDataSet(DESTINATION_PROVIDER_ID, DESTINATION_DATASET_NAME, representation.getCloudId(), representation.getRepresentationName(), representation.getVersion()); sourceDatasetHelper.grantPermissionToVersion(representation.getCloudId(), representation.getRepresentationName(), representation.getVersion(), appProperties.getProperty("destinationUserName"), Permission.READ); revisionServiceClient.addRevision(representation.getCloudId(), representation.getRepresentationName(), representation.getVersion(), DESTINATION_REVISION_NAME, DESTINATION_PROVIDER_ID, Tags.PUBLISHED.getTag()); } }
Source:
<code>public void testDistributedDistanceQuery() { <START> assertUpdate(format("CREATE TABLE distance_partitioning AS SELECT spatial_partitioning(ST_Point(x, y), 100) as v " + <END> "FROM (VALUES (0, 0, '0_0'), (1, 0, '1_0'), (3, 0, '3_0'), (10, 0, '10_0')) as a (x, y, name)"), 1); Session session = Session.builder(getSession()) .setSystemProperty(SPATIAL_PARTITIONING_TABLE_NAME, "distance_partitioning") .build(); testDistanceQuery(session); }</code><technical_language>do compute partitioning probe table instead of build table</technical_language>

Target:
public void testDistributedDistanceQuery() { assertUpdate(format("CREATE TABLE distance_partitioning AS SELECT spatial_partitioning(ST_Point(x, y)) as v " + "FROM (VALUES (0, 0, '0_0'), (1, 0, '1_0'), (3, 0, '3_0'), (10, 0, '10_0')) as a (x, y, name)"), 1); Session session = Session.builder(getSession()) .setSystemProperty(SPATIAL_PARTITIONING_TABLE_NAME, "distance_partitioning") .build(); testDistanceQuery(session); }
Source:
<code>public static OpenstackVolumeAuthenticationKeyUsageType fromValue(String v) { try { return valueOf(v.toUpperCase()); } catch (IllegalArgumentException e) { <START> return null; <END> } }</code><technical_language>Consider sending error message log describing this problem, this: log.error("The \"{}\" a valid Open Stack volume authentication key ussage", v); log.error("Exception", e);</technical_language>

Target:
public static OpenstackVolumeAuthenticationKeyUsageType fromValue(String v) { try { return valueOf(v.toUpperCase()); } catch (IllegalArgumentException e) { log.error("The value isn't a valid Open Stack volume authentication key usage", v); log.error("Exception", e); return null; } }
Source:
<code><START> public Mono<VoidResponse> stageBlockFromURL(String base64BlockID, URL sourceURL, BlobRange sourceRange) { <END> return this.stageBlockFromURLWithResponse(base64BlockID, sourceURL, sourceRange, null, null, null); }</code><technical_language>I this change reverted. non-max overload return a Response, stay Mono<Void></technical_language>

Target:
public Mono<Void> stageBlockFromURL(String base64BlockID, URL sourceURL, BlobRange sourceRange) { return this.stageBlockFromURLWithResponse(base64BlockID, sourceURL, sourceRange, null, null, null) .flatMap(FluxUtil::toMono); }
Source:
<code>public static MapParser create(File file) throws IOException { String name = file.getName(); Matcher stuff = SESSION_PATTERN.matcher(name); <START> if(!stuff.matches()) { <END> return null; } long sessionId = Long.parseUnsignedLong(stuff.group(1), 16); LineIterator iter = FileUtils.lineIterator(file); NavigableMap<Long, MapEntry> entries = new TreeMap<>(); while (iter.hasNext()) { String line = iter.next(); Matcher matcher = MAPFILE_PATTERN.matcher(line); matcher.matches(); long addrLow = Long.parseUnsignedLong(matcher.group(1), 16); long addrHigh = Long.parseUnsignedLong(matcher.group(2), 16); Perms perms = Perms.create(matcher.group(3)); long offset = Long.parseLong(matcher.group(4), 16); char deviceHigh = (char) Integer.parseInt(matcher.group(5), 16); char deviceLow = (char) Integer.parseInt(matcher.group(6), 16); long iNode = Long.parseLong(matcher.group(7), 16); String pathName = matcher.group(8); entries.put(addrLow, new MapEntry(addrLow, addrHigh, perms, offset, deviceLow, deviceHigh, iNode, pathName)); } return new MapParser(sessionId, entries); }</code><technical_language>white space if if change variable name 'stuff' 'thing' 'cossin' great! :p</technical_language>

Target:
public static MapParser create(File file) throws IOException { String name = file.getName(); Matcher sessionName = SESSION_PATTERN.matcher(name); if (!sessionName.matches()) { return null; } long sessionId = Long.parseUnsignedLong(sessionName.group(1), 16); LineIterator iter = FileUtils.lineIterator(file); NavigableMap<Long, MapEntry> entries = new TreeMap<>(); while (iter.hasNext()) { String line = iter.next(); Matcher matcher = MAPFILE_PATTERN.matcher(line); matcher.matches(); long addrLow = Long.parseUnsignedLong(matcher.group(1), 16); long addrHigh = Long.parseUnsignedLong(matcher.group(2), 16); Perms perms = Perms.create(matcher.group(3)); long offset = Long.parseLong(matcher.group(4), 16); char deviceHigh = (char) Integer.parseInt(matcher.group(5), 16); char deviceLow = (char) Integer.parseInt(matcher.group(6), 16); long iNode = Long.parseLong(matcher.group(7), 16); String pathName = matcher.group(8); entries.put(addrLow, new MapEntry(addrLow, addrHigh, perms, offset, deviceLow, deviceHigh, iNode, pathName)); } return new MapParser(sessionId, entries); }
Source:
<code>public Void call() throws Exception { <START> Objects.requireNonNull(acls, "New acls to be added not specified."); <END> OzoneAddress address = new OzoneAddress(uri); address.ensureBucketAddress(); OzoneClient client = address.createClient(createOzoneConfiguration()); String volumeName = address.getVolumeName(); String bucketName = address.getBucketName(); if (isVerbose()) { System.out.printf("Volume Name : %s%n", volumeName); System.out.printf("Bucket Name : %s%n", bucketName); } OzoneObj obj = OzoneObjInfo.Builder.newBuilder() .setBucketName(bucketName) .setVolumeName(volumeName) .setResType(OzoneObj.ResourceType.BUCKET) .setStoreType(storeType == null ? OZONE : OzoneObj.StoreType.valueOf(storeType)) .build(); boolean result = client.getObjectStore().setAcl(obj, OzoneAcl.parseAcls(acls)); System.out.printf("%s%n", JsonUtils.toJsonStringWithDefaultPrettyPrinter( JsonUtils.toJsonString("Acl set successfully: " + result))); return null; }</code><technical_language>Acls set specified</technical_language>

Target:
public Void call() throws Exception { Objects.requireNonNull(acls, "Acls to be set not specified."); OzoneAddress address = new OzoneAddress(uri); address.ensureBucketAddress(); OzoneClient client = address.createClient(createOzoneConfiguration()); String volumeName = address.getVolumeName(); String bucketName = address.getBucketName(); if (isVerbose()) { System.out.printf("Volume Name : %s%n", volumeName); System.out.printf("Bucket Name : %s%n", bucketName); } OzoneObj obj = OzoneObjInfo.Builder.newBuilder() .setBucketName(bucketName) .setVolumeName(volumeName) .setResType(OzoneObj.ResourceType.BUCKET) .setStoreType(storeType == null ? OZONE : OzoneObj.StoreType.valueOf(storeType)) .build(); boolean result = client.getObjectStore().setAcl(obj, OzoneAcl.parseAcls(acls)); System.out.printf("%s%n", JsonUtils.toJsonStringWithDefaultPrettyPrinter( JsonUtils.toJsonString("Acl set successfully: " + result))); client.close(); return null; }
Source:
<code>public static WebArchive deployment() { WebArchive war = ShrinkWrap.create(WebArchive.class, DEPLOYMENT); war.add(new UrlAsset(JspWithUnusedDoubleTestCase.class.getResource("jsp-with-unused-double.jsp")), "jsp-with-unused-double.jsp"); <START> war.as(ZipExporter.class).exportTo(new File("/tmp", war.getName()), true); <END> return war; }</code><technical_language>why? for debugging purposes? sure, in testsuite default messes CI servers</technical_language>

Target:
public static WebArchive deployment() { WebArchive war = ShrinkWrap.create(WebArchive.class, DEPLOYMENT); war.add(new UrlAsset(JspWithUnusedDoubleTestCase.class.getResource("jsp-with-unused-double.jsp")), "jsp-with-unused-double.jsp"); return war; }
Source:
<code>public CoordinatorConfig(Properties config) { _config = config; _properties = new VerifiableProperties(config); _cluster = _properties.getString(CONFIG_CLUSTER); _zkAddress = _properties.getString(CONFIG_ZK_ADDRESS); _zkSessionTimeout = _properties.getInt(CONFIG_ZK_SESSION_TIMEOUT, ZkClient.DEFAULT_SESSION_TIMEOUT); _zkConnectionTimeout = _properties.getInt(CONFIG_ZK_CONNECTION_TIMEOUT, ZkClient.DEFAULT_CONNECTION_TIMEOUT); _retryIntervalMs = _properties.getInt(CONFIG_RETRY_INTERVAL, 1000 ); _heartbeatPeriodMs = _properties.getLong(CONFIG_HEARTBEAT_PERIOD_MS, Duration.ofMinutes(1).toMillis()); _defaultTransportProviderName = _properties.getString(CONFIG_DEFAULT_TRANSPORT_PROVIDER, ""); <START> _assignmentChangeThreadPoolThreadCount = _properties.getInt(CONFIG_DEFAULT_ASSIGNMENT_THREAD_COUNT, 1); <END> }</code><technical_language>If making count more 1 is issue, do skip reading config? want ignore config deprecate config</technical_language>

Target:
public CoordinatorConfig(Properties config) { _config = config; _properties = new VerifiableProperties(config); _cluster = _properties.getString(CONFIG_CLUSTER); _zkAddress = _properties.getString(CONFIG_ZK_ADDRESS); _zkSessionTimeout = _properties.getInt(CONFIG_ZK_SESSION_TIMEOUT, ZkClient.DEFAULT_SESSION_TIMEOUT); _zkConnectionTimeout = _properties.getInt(CONFIG_ZK_CONNECTION_TIMEOUT, ZkClient.DEFAULT_CONNECTION_TIMEOUT); _retryIntervalMs = _properties.getInt(CONFIG_RETRY_INTERVAL, 1000 ); _heartbeatPeriodMs = _properties.getLong(CONFIG_HEARTBEAT_PERIOD_MS, Duration.ofMinutes(1).toMillis()); _defaultTransportProviderName = _properties.getString(CONFIG_DEFAULT_TRANSPORT_PROVIDER, ""); }
Source:
<code>public long getTargetTxnId(String replPolicy, long sourceTxnId) throws MetaException { try { Connection dbConn = null; Statement stmt = null; try { lockInternal(); dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED); stmt = dbConn.createStatement(); List<Long> targetTxnIds = getTargetTxnIdList(replPolicy, Collections.singletonList(sourceTxnId), stmt); if (targetTxnIds.isEmpty()) { LOG.info("Txn not present for repl policy {}", sourceTxnId, replPolicy); return -1; } assert (targetTxnIds.size() == 1); return targetTxnIds.get(0); } catch (SQLException e) { LOG.debug("Going to rollback"); rollbackDBConn(dbConn); checkRetryable(dbConn, e, "getTargetTxnId(" + replPolicy + sourceTxnId + ")"); <START> throw new MetaException("Unable to update transaction database " <END> + StringUtils.stringifyException(e)); } finally { close(null, stmt, dbConn); unlockInternal(); } } catch (RetryException e) { return getTargetTxnId(replPolicy, sourceTxnId); } }</code><technical_language>updates performed. error log is incorrect</technical_language>

Target:
public long getTargetTxnId(String replPolicy, long sourceTxnId) throws MetaException { try { Connection dbConn = null; Statement stmt = null; try { lockInternal(); dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED); stmt = dbConn.createStatement(); List<Long> targetTxnIds = getTargetTxnIdList(replPolicy, Collections.singletonList(sourceTxnId), stmt); if (targetTxnIds.isEmpty()) { LOG.info("Txn not present for repl policy {}", sourceTxnId, replPolicy); return -1; } assert (targetTxnIds.size() == 1); return targetTxnIds.get(0); } catch (SQLException e) { LOG.debug("Going to rollback"); rollbackDBConn(dbConn); checkRetryable(dbConn, e, "getTargetTxnId(" + replPolicy + sourceTxnId + ")"); throw new MetaException("Unable to get target transaction id " + StringUtils.stringifyException(e)); } finally { close(null, stmt, dbConn); unlockInternal(); } } catch (RetryException e) { return getTargetTxnId(replPolicy, sourceTxnId); } }
Source:
<code>public boolean prepare() throws Exception { if (!prepared) { prepared = true; super.prepare(); ProjectLauncher launcher = getProjectLauncher(); if (port > 0) { launcher.getRunProperties() .put(TESTER_PORT, "" + port); if (host != null) launcher.getRunProperties() .put(TESTER_HOST, "" + host); } launcher.getRunProperties() .put(TESTER_UNRESOLVED, getProject().getProperty(Constants.TESTUNRESOLVED, "true")); launcher.getRunProperties() .put(TESTER_DIR, getReportDir().getAbsolutePath()); launcher.getRunProperties() .put(TESTER_CONTINUOUS, "" + getContinuous()); if (getProject().isRunTrace()) launcher.getRunProperties() .put(TESTER_TRACE, "true"); Collection<String> testnames = getTests(); if (testnames.size() > 0) { launcher.getRunProperties() <START> .put(TESTER_NAMES, Processor.join(testnames.stream() <END> .map(ProjectTesterImpl::maybeQuote) .collect(Collectors.toList()))); } launcher.addDefault(Constants.DEFAULT_TESTER_BSN); launcher.prepare(); } return true; }</code><technical_language>busy stream/map list a list join a string. straight java .put(TESTER_NAMES, testnames.stream() .map(ProjectTesterImpl::maybeQuote) .collect(Collectors.joining(",")));</technical_language>

Target:
public boolean prepare() throws Exception { if (!prepared) { prepared = true; super.prepare(); ProjectLauncher launcher = getProjectLauncher(); if (port > 0) { launcher.getRunProperties() .put(TESTER_PORT, "" + port); if (host != null) launcher.getRunProperties() .put(TESTER_HOST, "" + host); } launcher.getRunProperties() .put(TESTER_UNRESOLVED, getProject().getProperty(Constants.TESTUNRESOLVED, "true")); launcher.getRunProperties() .put(TESTER_DIR, getReportDir().getAbsolutePath()); launcher.getRunProperties() .put(TESTER_CONTINUOUS, "" + getContinuous()); if (getProject().isRunTrace()) launcher.getRunProperties() .put(TESTER_TRACE, "true"); Collection<String> testnames = getTests(); if (testnames.size() > 0) { launcher.getRunProperties() .put(TESTER_NAMES, testnames.stream() .map(ProjectTesterImpl::maybeQuote) .collect(Collectors.joining(","))); } launcher.addDefault(Constants.DEFAULT_TESTER_BSN); launcher.prepare(); } return true; }
Source:
<code>private static Object tryToGetTargetId(Message commandMessage) { try { final Object id = ID_FUNCTION.getId(commandMessage, CommandContext.getDefaultInstance()); return id; <START> } catch (MissingEntityIdException | ClassCastException ignored) { <END> return null; } }</code><technical_language>Please test for this branch</technical_language>

Target:
static Object tryToGetTargetId(Message commandMessage) { try { final Object id = ID_FUNCTION.getId(commandMessage, CommandContext.getDefaultInstance()); return id; } catch (MissingEntityIdException | ClassCastException ignored) { return null; } }
Source:
<code>public Properties getProviderSpecificProperties() { return <START> null; <END> }</code><technical_language>returning empty list default nicer IMHO, need for null check invoker side</technical_language>

Target:
public Properties getProviderSpecificProperties() { return new Properties(); }