auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void configureLogback( ServletContext servletContext, File logDirFallback ) throws IOException { log.debug("Reconfiguring Logback!"); File logDir = FileSystemManager.getWriteableDirectoryWithFailovers(servletContext.getInitParameter(LOG_DIR_INIT_PARAM), logDirFallback.getAbsolutePath()); if(logDir != null) { log.debug("Resetting logback context."); URL configFile = servletContext.getResource("/WEB-INF/context-logback.xml"); log.debug("Configuring logback with file, {}", configFile); LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); try { JoranConfigurator configurator = new JoranConfigurator(); configurator.setContext(context); context.stop(); context.reset(); context.putProperty("logDir", logDir.getCanonicalPath()); configurator.doConfigure(configFile); } catch (JoranException je) { <START> je.printStackTrace(); <END> } finally { context.start(); log.debug("Done resetting logback."); } StatusPrinter.printInCaseOfErrorsOrWarnings(context); } }</code><technical_language>I I asked inject this, StatusPrinter 503 care of this case. drop it. Sorry</technical_language>

Target:
public void configureLogback( ServletContext servletContext, File logDirFallback ) throws FileNotFoundException, MalformedURLException, IOException { log.debug("Reconfiguring Logback!"); File logDir = FileSystemManager.getWritableDirectoryWithFailovers(servletContext.getInitParameter(LOG_DIR_INIT_PARAM), logDirFallback.getAbsolutePath()); if(logDir != null) { log.debug("Resetting logback context."); URL configFile = servletContext.getResource("/WEB-INF/context-logback.xml"); log.debug("Configuring logback with file, {}", configFile); LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); try { JoranConfigurator configurator = new JoranConfigurator(); configurator.setContext(context); context.stop(); context.reset(); context.putProperty("logDir", logDir.getCanonicalPath()); configurator.doConfigure(configFile); } catch (JoranException je) { } finally { context.start(); log.debug("Done resetting logback."); } StatusPrinter.printInCaseOfErrorsOrWarnings(context); } }
Source:
<code>public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); loadData(); <START> String base64EncodedPublicKey = "cONSTRUCT_YOUR_KEY_AND_PLACE_IT_HERE"; <END> String samsungGroupId = "PLACE_HERE_SAMSUNG_GROUP_ID"; String tstoreAppId = "PLACE_HERE_TSTORE_APP_ID"; String YANDEX_PUBLIC_KEY = "PLACE_HERE_YANDEX_KEY"; if (base64EncodedPublicKey.contains("CONSTRUCT_YOUR")) { throw new RuntimeException("Please put your app's public key in MainActivity.java. See README."); } if (getPackageName().startsWith("com.example")) { throw new RuntimeException("Please change the sample's package name! See README."); } Log.d(TAG, "Creating IAB helper."); Map<String, String> storeKeys = new HashMap<String, String>(); storeKeys.put(OpenIabHelper.NAME_GOOGLE, base64EncodedPublicKey); storeKeys.put(OpenIabHelper.NAME_SAMSUNG, samsungGroupId); storeKeys.put(OpenIabHelper.NAME_TSTORE, tstoreAppId); storeKeys.put("YandexPublicKey", YANDEX_PUBLIC_KEY); mHelper = new OpenIabHelper(this, storeKeys); Log.d(TAG, "Starting setup."); mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() { public void onIabSetupFinished(IabResult result) { Log.d(TAG, "Setup finished."); if (!result.isSuccess()) { complain("Problem setting up in-app billing: " + result); return; } Log.d(TAG, "Setup successful. Querying inventory."); mHelper.queryInventoryAsync(mGotInventoryListener); } }); }</code><technical_language>This commited</technical_language>

Target:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); loadData(); String base64EncodedPublicKey = "CONSTRUCT_YOUR_KEY_AND_PLACE_IT_HERE"; String samsungGroupId = "PLACE_HERE_SAMSUNG_GROUP_ID"; String tstoreAppId = "PLACE_HERE_TSTORE_APP_ID"; String YANDEX_PUBLIC_KEY = "PLACE_HERE_YANDEX_KEY"; if (base64EncodedPublicKey.contains("CONSTRUCT_YOUR")) { throw new RuntimeException("Please put your app's public key in MainActivity.java. See README."); } if (getPackageName().startsWith("com.example")) { throw new RuntimeException("Please change the sample's package name! See README."); } Log.d(TAG, "Creating IAB helper."); Map<String, String> storeKeys = new HashMap<String, String>(); storeKeys.put(OpenIabHelper.NAME_GOOGLE, base64EncodedPublicKey); storeKeys.put(OpenIabHelper.NAME_SAMSUNG, samsungGroupId); storeKeys.put(OpenIabHelper.NAME_TSTORE, tstoreAppId); storeKeys.put("YandexPublicKey", YANDEX_PUBLIC_KEY); mHelper = new OpenIabHelper(this, storeKeys); Log.d(TAG, "Starting setup."); mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() { public void onIabSetupFinished(IabResult result) { Log.d(TAG, "Setup finished."); if (!result.isSuccess()) { complain("Problem setting up in-app billing: " + result); return; } Log.d(TAG, "Setup successful. Querying inventory."); mHelper.queryInventoryAsync(mGotInventoryListener); } }); }
Source:
<code>private void validateTypeCombination(OMElement sourceEle, OMElement targetEle) { int sourceType = -1; int targetType = -1; OMAttribute sourceTypeAttr = sourceEle.getAttribute(ATT_TYPE); if (sourceTypeAttr != null && sourceTypeAttr.getAttributeValue() != null) { sourceType = convertTypeToInit(sourceTypeAttr.getAttributeValue()); if (sourceType < 0) { logger.info("Un-expected source type"); } } OMAttribute targetTypeAttr = targetEle.getAttribute(ATT_TYPE); if (targetTypeAttr != null && targetTypeAttr.getAttributeValue() != null) { targetType = convertTypeToInit(targetTypeAttr.getAttributeValue()); <START> if (targetType < 0) { <END> logger.info("Un-expected target type"); } if (targetType == 1) { throw new SynapseException("Envelope not support for target attribute"); } } if ((sourceType == 1 && targetType == 0) || (sourceType == 1 && targetType == 2) || (sourceType == 2 && targetType == 2)) { throw new SynapseException("Wrong combination of source and target type"); } }</code><technical_language>is if do magic numbers in conditions improve readability. define a constant 0</technical_language>

Target:
private void validateTypeCombination(OMElement sourceEle, OMElement targetEle) { int sourceType = -1; int targetType = -1; OMAttribute sourceTypeAttr = sourceEle.getAttribute(ATT_TYPE); if (sourceTypeAttr != null && sourceTypeAttr.getAttributeValue() != null) { sourceType = convertTypeToInt(sourceTypeAttr.getAttributeValue()); if (sourceType < 0) { logger.info("Un-expected source type"); } } OMAttribute targetTypeAttr = targetEle.getAttribute(ATT_TYPE); if (targetTypeAttr != null && targetTypeAttr.getAttributeValue() != null) { targetType = convertTypeToInt(targetTypeAttr.getAttributeValue()); if (targetType < 0) { logger.info("Un-expected target type"); } if (targetType == 1) { throw new SynapseException("Envelope not support for target attribute"); } if (targetType == 4) { throw new SynapseException("Inline not support for target attribute"); } } if ((sourceType == 1 && targetType == 0) || (sourceType == 1 && targetType == 2) || (sourceType == 2 && targetType == 2)) { throw new SynapseException("Wrong combination of source and target type"); } }
Source:
<code>protected EvaluationSampleSummaryRecord createRecord(final DataLine dataLine) { final String sample = dataLine.get(EvaluationSampleSummaryWriter.SAMPLE_NAME_COLUMN_NAME); final EvaluationSampleSummaryRecord result = new EvaluationSampleSummaryRecord(sample); <START> for (final EvaluationClass clazz : EvaluationClass.values()) { <END> result.set(clazz, dataLine.getInt(clazz.acronym)); } return result; }</code><technical_language>clazz -> class</technical_language>

Target:
protected EvaluationSampleSummaryRecord createRecord(final DataLine dataLine) { final String sample = dataLine.get(EvaluationSampleSummaryWriter.SAMPLE_NAME_COLUMN_NAME); final EvaluationSampleSummaryRecord result = new EvaluationSampleSummaryRecord(sample); for (final EvaluationClass evaluationClass : EvaluationClass.values()) { result.set(evaluationClass, dataLine.getInt(evaluationClass.acronym)); } return result; }
Source:
<code>public boolean include(RevWalk walker, RevCommit cmit) throws StopWalkException, MissingObjectException, IncorrectObjectTypeException, IOException { boolean first = cmit.has(firstParent); boolean later = cmit.has(laterParent); <START> boolean include = first || (!first && !later); <END> for (int i = 0; i < cmit.getParentCount(); i++) { RevCommit p = cmit.getParent(i); if (i == 0 && include) { p.add(firstParent); } else { p.add(laterParent); } } return include; }</code><technical_language>if a commit is a start commit parent of another start commit</technical_language>

Target:
public boolean include(RevWalk walker, RevCommit cmit) throws StopWalkException, MissingObjectException, IncorrectObjectTypeException, IOException { boolean include = cmit.has(start) || cmit.has(firstParent); for (int i = 0; i < cmit.getParentCount(); i++) { RevCommit p = cmit.getParent(i); if (i == 0 && include) { p.add(firstParent); } } return include; }
Source:
<code>public void checkAttributeValue(PerunSessionImpl perunSession, String key, Attribute attribute) throws InternalErrorException, WrongAttributeValueException, WrongReferenceAttributeValueException, WrongAttributeAssignmentException { if(attribute.getValue() == null) return; if(!(attribute.getValue() instanceof String)) { throw new WrongAttributeValueException(attribute, key, "value must be of type String"); } String value = attribute.valueAsString(); if(!value.contains("{link}")){ throw new WrongAttributeValueException(attribute, key, "value doesn't contain contain tag {link}"); } if(!value.contains("{displayName}")){ throw new WrongAttributeValueException(attribute, key, "value doesn't contain contain tag {displayName}"); } if(!value.contains("{namespace}")){ throw new WrongAttributeValueException(attribute, key, "value doesn't contain contain tag {namespace}"); } <START> if(!value.contains("{validity}")){ <END> throw new WrongAttributeValueException(attribute, key, "value doesn't contain contain tag {validity}"); } }</code><technical_language>required parameter is {link}. Others optional</technical_language>

Target:
public void checkAttributeValue(PerunSessionImpl perunSession, String key, Attribute attribute) throws InternalErrorException, WrongAttributeValueException, WrongReferenceAttributeValueException, WrongAttributeAssignmentException { if (attribute.getValue() == null) return; if (!(attribute.getValue() instanceof String)) { throw new WrongAttributeValueException(attribute, key, "value must be of type String"); } String value = attribute.valueAsString(); if (!value.contains("{link}")) { throw new WrongAttributeValueException(attribute, key, "value doesn't contain contain tag {link}"); } }
Source:
<code>private <START> void createVmCheckpoint() <END> { VmBackup vmBackup = getParameters().getVmBackup(); final VmCheckpoint vmCheckpoint = new VmCheckpoint(); vmCheckpoint.setId(vmBackup.getToCheckpointId()); vmCheckpoint.setParentId(vmBackup.getFromCheckpointId()); vmCheckpoint.setVmId(vmBackup.getVmId()); vmCheckpoint.setCreationDate(new Date()); final List<VmCheckpoint> checkpoints = vmCheckpointDao.getAllForVm(getVmId()); if (!checkpoints.isEmpty()) { vmCheckpoint.setParentId(checkpoints.get(checkpoints.size() - 1).getId()); } TransactionSupport.executeInNewTransaction(() -> { vmCheckpointDao.save(vmCheckpoint); getParameters().getVmBackup().getDisks().forEach( disk -> vmCheckpointDao.addDiskToCheckpoint(vmCheckpoint.getId(), disk.getId())); return null; }); persistCommandIfNeeded(); }</code><technical_language>want return guid of checkpoint before</technical_language>

Target:
private void createVmCheckpoint() { VmBackup vmBackup = getParameters().getVmBackup(); final VmCheckpoint vmCheckpoint = new VmCheckpoint(); vmCheckpoint.setId(vmBackup.getToCheckpointId()); vmCheckpoint.setParentId(vmBackup.getFromCheckpointId()); vmCheckpoint.setVmId(vmBackup.getVmId()); vmCheckpoint.setCreationDate(new Date()); final List<VmCheckpoint> checkpoints = vmCheckpointDao.getAllForVm(getVmId()); if (!checkpoints.isEmpty()) { vmCheckpoint.setParentId(checkpoints.get(checkpoints.size() - 1).getId()); } TransactionSupport.executeInNewTransaction(() -> { vmCheckpointDao.save(vmCheckpoint); vmBackup.getDisks().forEach( disk -> vmCheckpointDao.addDiskToCheckpoint(vmCheckpoint.getId(), disk.getId())); return null; }); persistCommandIfNeeded(); }
Source:
<code>public void deleteMetadata(String metadataName) { Metadata aux= null; for (int i=0; i < metadatas.size(); i++) { <START> if (metadatas.get(i).getKey().equals(metadataName)) { <END> aux = metadatas.get(i); } } metadatas.remove(aux); }</code><technical_language>optimise execution if this method, due accesing metadatas.get(i), assign a local variable access previously execution of if sentence</technical_language>

Target:
public void deleteMetadata(String metadataName) throws EntityNotFoundException { metadatas.remove(getMetadata(metadataName)); }
Source:
<code>public void testCreate() { final EClassSelectionStrategy strategy = provider.create(); assertNotNull(strategy); final Collection<EClass> collectEClasses = strategy.collectEClasses(null, null, null); final Collection<EClass> allFromRegistry = collectAllFromRegistry(); assertEquals(allFromRegistry.size(), collectEClasses.size()); for (final EClass eClass : allFromRegistry) { <START> assertTrue(collectEClasses.contains(eClass)); <END> } }</code><technical_language>Surely some of EClasses in registry abstract provided EMFUtil and, thus, selection strategy</technical_language>

Target:
public void testCreate() { final EClassSelectionStrategy strategy = provider.create(); assertNotNull(strategy); final Collection<EClass> collectEClasses = strategy.collectEClasses(null, DataTemplatePackage.eINSTANCE.getTemplate_Instance(), null); final Collection<EClass> allFromRegistry = collectAllFromRegistry(); assertEquals(allFromRegistry.size(), collectEClasses.size()); for (final EClass eClass : allFromRegistry) { assertTrue(collectEClasses.contains(eClass)); } }
Source:
<code>protected final Fix getSuggestedFix(AnnotationTree annotationTree) { List<String> values = new ArrayList<>(); for (ExpressionTree argumentTree : annotationTree.getArguments()) { AssignmentTree assignmentTree = (AssignmentTree) argumentTree; if (assignmentTree.getVariable().toString().equals("value")) { ExpressionTree expressionTree = assignmentTree.getExpression(); switch (expressionTree.getKind()) { case STRING_LITERAL: values.add(((String) ((JCTree.JCLiteral) expressionTree).value)); break; case NEW_ARRAY: NewArrayTree newArrayTree = (NewArrayTree) expressionTree; for (ExpressionTree elementTree : newArrayTree.getInitializers()) { values.add((String) ((JCTree.JCLiteral) elementTree).value); } break; default: throw new AssertionError("Unknown kind: " + expressionTree.getKind()); } processSuppressWarningsValues(values); } else { throw new AssertionError("SuppressWarnings has an element other than value="); } } if (values.isEmpty()) { return SuggestedFix.delete(annotationTree); } else if (values.size() == 1) { return SuggestedFix.replace(annotationTree, "@SuppressWarnings(\"" + values.get(0) + "\")"); } else { StringBuilder sb = new StringBuilder("@SuppressWarnings({\"" + values.get(0) + "\""); for (int i = 1; i < values.size(); i++) { sb.append(", "); <START> sb.append('"').append(values.get(i)).append('"'); <END> } sb.append("})"); return SuggestedFix.replace(annotationTree, sb.toString()); } }</code><technical_language>this entire string be: java "@SuppressWarnings({\"" + Joiner.on("\", \"").join(values) + "})" more readable, depending style</technical_language>

Target:
protected final Fix getSuggestedFix(AnnotationTree annotationTree) { List<String> values = new ArrayList<>(); for (ExpressionTree argumentTree : annotationTree.getArguments()) { AssignmentTree assignmentTree = (AssignmentTree) argumentTree; if (assignmentTree.getVariable().toString().equals("value")) { ExpressionTree expressionTree = assignmentTree.getExpression(); switch (expressionTree.getKind()) { case STRING_LITERAL: values.add(((String) ((JCTree.JCLiteral) expressionTree).value)); break; case NEW_ARRAY: NewArrayTree newArrayTree = (NewArrayTree) expressionTree; for (ExpressionTree elementTree : newArrayTree.getInitializers()) { values.add((String) ((JCTree.JCLiteral) elementTree).value); } break; default: throw new AssertionError("Unknown kind: " + expressionTree.getKind()); } processSuppressWarningsValues(values); } else { throw new AssertionError("SuppressWarnings has an element other than value="); } } if (values.isEmpty()) { return SuggestedFix.delete(annotationTree); } else if (values.size() == 1) { return SuggestedFix.replace(annotationTree, "@SuppressWarnings(\"" + values.get(0) + "\")"); } else { return SuggestedFix.replace( annotationTree, "@SuppressWarnings({\"" + Joiner.on("\", \"").join(values) + "\"})"); } }
Source:
<code>public ClusterDrawable(List<SequenceNode> clustered) { this.clustered = clustered; c = new Circle(CLUSTER_SIZE, Color.BLUE); c.setOnMouseClicked(e -> System.out.println(clustered)); <START> Text t = new Text(Integer.toString(clustered.size())); <END> t.setStyle("-fx-font-size: 2pt"); getChildren().add(c); getChildren().add(t); }</code><technical_language>note L17 variable name</technical_language>

Target:
public ClusterDrawable(List<SequenceNode> clustered) { this.clustered = clustered; shape = new Circle(CLUSTER_SIZE, Color.BLUE); shape.setOnMouseClicked(e -> System.out.println(clustered)); Text label = new Text(Integer.toString(clustered.size())); label.setStyle("-fx-font-size: 2pt"); getChildren().add(shape); getChildren().add(label); }
Source:
<code>public static InitialMessage parse( Long protocolVersion, DataInputStream din ) throws InitialMessageException, IOException { Long sid; if (protocolVersion != PROTOCOL_VERSION) { throw new InitialMessageException("Got unrecognized protocol version %s", protocolVersion); } sid = din.readLong(); int remaining = din.readInt(); if (remaining <= 0 || remaining > maxBuffer) { throw new InitialMessageException("Unreasonable buffer length: %s", remaining); } byte[] b = new byte[remaining]; <START> int numRead = din.read(b); <END> if (numRead != remaining) { throw new InitialMessageException( "Read only %s bytes out of %s sent by server %s", numRead, remaining, sid); } String addr = new String(b); String[] hostPort; try { hostPort = ConfigUtils.getHostAndPort(addr); } catch (ConfigException e) { throw new InitialMessageException("Badly formed address: %s", addr); } if (hostPort.length != 2) { throw new InitialMessageException("Badly formed address: %s", addr); } int port; try { port = Integer.parseInt(hostPort[1]); } catch (NumberFormatException e) { throw new InitialMessageException("Bad port number: %s", hostPort[1]); } catch (ArrayIndexOutOfBoundsException e) { throw new InitialMessageException("No port number in: %s", addr); } return new InitialMessage(sid, new InetSocketAddress(hostPort[0], port)); }</code><technical_language>avoid change names of variable for now? This change is purely style change maintains private patches harder. change done separately a more fine grained approach</technical_language>

Target:
public static InitialMessage parse(Long protocolVersion, DataInputStream din) throws InitialMessageException, IOException { Long sid; if (protocolVersion != PROTOCOL_VERSION) { throw new InitialMessageException("Got unrecognized protocol version %s", protocolVersion); } sid = din.readLong(); int remaining = din.readInt(); if (remaining <= 0 || remaining > maxBuffer) { throw new InitialMessageException("Unreasonable buffer length: %s", remaining); } byte[] b = new byte[remaining]; int num_read = din.read(b); if (num_read != remaining) { throw new InitialMessageException("Read only %s bytes out of %s sent by server %s", num_read, remaining, sid); } String addr = new String(b); String[] host_port; try { host_port = ConfigUtils.getHostAndPort(addr); } catch (ConfigException e) { throw new InitialMessageException("Badly formed address: %s", addr); } if (host_port.length != 2) { throw new InitialMessageException("Badly formed address: %s", addr); } int port; try { port = Integer.parseInt(host_port[1]); } catch (NumberFormatException e) { throw new InitialMessageException("Bad port number: %s", host_port[1]); } catch (ArrayIndexOutOfBoundsException e) { throw new InitialMessageException("No port number in: %s", addr); } return new InitialMessage(sid, new InetSocketAddress(host_port[0], port)); }
Source:
<code>public void test_overnightIndexRateForward_badDatesNotSorted() { LocalDateDoubleTimeSeries ts = LocalDateDoubleTimeSeries.EMPTY_SERIES; MulticurveProviderInterface mock = Mockito.mock(MulticurveProviderInterface.class); ImmutablePricingEnvironment test = ImmutablePricingEnvironment.builder() .valuationDate(VAL_DATE) .multicurve(mock) .timeSeries(ImmutableMap.of(USD_FED_FUND, ts)) .dayCount(ACT_ACT_ISDA) .build(); <START> assertThrows( <END> () -> test.overnightIndexRatePeriod(USD_FED_FUND, NEXT_DATE, VAL_DATE), IllegalArgumentException.class); }</code><technical_language>assertThrowsIllegalArg avoids parameter allows fit line. in next method</technical_language>

Target:
public void test_overnightIndexRateForward_badDatesNotSorted() { LocalDateDoubleTimeSeries ts = LocalDateDoubleTimeSeries.EMPTY_SERIES; MulticurveProviderInterface mock = Mockito.mock(MulticurveProviderInterface.class); ImmutablePricingEnvironment test = ImmutablePricingEnvironment.builder() .valuationDate(VAL_DATE) .multicurve(mock) .timeSeries(ImmutableMap.of(USD_FED_FUND, ts)) .dayCount(ACT_ACT_ISDA) .build(); assertThrowsIllegalArg(() -> test.overnightIndexRatePeriod(USD_FED_FUND, NEXT_DATE, VAL_DATE)); }
Source:
<code>public void testProps() throws Exception { Context context = new Context(); context.put("kafka.producer.some-parameter", "1"); context.put("kafka.consumer.another-parameter", "1"); <START> context.put("offsets.topic.replication.factor", "1"); <END> context.put(BOOTSTRAP_SERVERS_CONFIG, testUtil.getKafkaServerUrl()); context.put(TOPIC_CONFIG, topic); final KafkaChannel channel = new KafkaChannel(); Configurables.configure(channel, context); Properties consumerProps = channel.getConsumerProps(); Properties producerProps = channel.getProducerProps(); Assert.assertEquals(producerProps.getProperty("some-parameter"), "1"); Assert.assertEquals(consumerProps.getProperty("another-parameter"), "1"); }</code><technical_language>this change bring? need this get test working</technical_language>

Target:
public void testProps() throws Exception { Context context = new Context(); context.put("kafka.producer.some-parameter", "1"); context.put("kafka.consumer.another-parameter", "1"); context.put(BOOTSTRAP_SERVERS_CONFIG, testUtil.getKafkaServerUrl()); context.put(TOPIC_CONFIG, topic); final KafkaChannel channel = new KafkaChannel(); Configurables.configure(channel, context); Properties consumerProps = channel.getConsumerProps(); Properties producerProps = channel.getProducerProps(); Assert.assertEquals(producerProps.getProperty("some-parameter"), "1"); Assert.assertEquals(consumerProps.getProperty("another-parameter"), "1"); }
Source:
<code>private Job(final JobId id, final Builder.Parameters p) { this.id = checkNotNull(id, "id"); this.image = checkNotNull(p.image, "image"); this.command = ImmutableList.copyOf(checkNotNull(p.command, "command")); this.env = ImmutableMap.copyOf(checkNotNull(p.env, "env")); this.ports = ImmutableMap.copyOf(checkNotNull(p.ports, "ports")); this.registration = ImmutableMap.copyOf(checkNotNull(p.registration, "registration")); this.volumes = ImmutableMap.copyOf(checkNotNull(p.volumes, "volumes")); <START> this.registrationDomain = checkNotNull(p.registrationDomain); <END> }</code><technical_language>checkNotNull(p.registrationDomain, "registrationDomain")</technical_language>

Target:
private Job(final JobId id, final Builder.Parameters p) { this.id = checkNotNull(id, "id"); this.image = checkNotNull(p.image, "image"); this.command = ImmutableList.copyOf(checkNotNull(p.command, "command")); this.env = ImmutableMap.copyOf(checkNotNull(p.env, "env")); this.ports = ImmutableMap.copyOf(checkNotNull(p.ports, "ports")); this.registration = ImmutableMap.copyOf(checkNotNull(p.registration, "registration")); this.volumes = ImmutableMap.copyOf(checkNotNull(p.volumes, "volumes")); this.expires = p.expires; this.registrationDomain = Optional.fromNullable(p.registrationDomain) .or(EMPTY_REGISTRATION_DOMAIN); }
Source:
<code>public void login_use_fallback_server() { LdapContainer ldapContainer = ldap.get(); GlobalSecurityConfig securityConfig = new GlobalSecurityConfig(jenkins); securityConfig.configure(); LdapSecurityRealm realm = securityConfig.useRealm(LdapSecurityRealm.class); int freePort = this.findAvailablePort(); LdapDetails ldapDetails = new LdapDetails("", 0, ldapContainer.getManagerDn(), ldapContainer.getManagerPassword(), ldapContainer.getRootDn()); <START> ldapDetails.setHostWithPort(ldapContainer.getHost()+":" + freePort + " " + ldapContainer.getHost() + ":" + ldapContainer.getPort()); <END> realm.configure(ldapDetails); securityConfig.save(); Login login = jenkins.login(); login.doLogin("jenkins", "root"); assertThat(jenkins, hasLoggedInUser("jenkins")); }</code><technical_language>change is incorrect - attempting connect a server exist - gaurantee freePort isactually a freeport ldapContainer (hence localhost)</technical_language>

Target:
public void login_use_fallback_server() { LdapContainer ldapContainer = ldap.get(); GlobalSecurityConfig securityConfig = new GlobalSecurityConfig(jenkins); securityConfig.configure(); LdapSecurityRealm realm = securityConfig.useRealm(LdapSecurityRealm.class); int freePort = this.findAvailablePort(); LdapDetails ldapDetails = new LdapDetails("", 0, ldapContainer.getManagerDn(), ldapContainer.getManagerPassword(), ldapContainer.getRootDn()); ldapDetails.setHostWithPort("localhost:" + freePort + ' ' + ldapContainer.getHost() + ':' + ldapContainer.getPort()); realm.configure(ldapDetails); securityConfig.save(); Login login = jenkins.login(); login.doLogin("jenkins", "root"); assertThat(jenkins, hasLoggedInUser("jenkins")); }
Source:
<code>public void setUp() throws Exception { <START> Project project = new Project(InstrumentationRegistry.getTargetContext(), "testProject"); <END> filePath = project.getDefaultScene().getDirectory() + "/" + IMAGE_DIRECTORY_NAME + "/collision_donut.png"; Sprite sprite = new SingleSprite("testSprite"); project.getDefaultScene().addSprite(sprite); ProjectManager.getInstance().setProject(project); ProjectManager.getInstance().setCurrentSprite(sprite); XstreamSerializer.getInstance().saveProject(project); File imageFile = ResourceImporter.createImageFileFromResourcesInDirectory( InstrumentationRegistry.getContext().getResources(), org.catrobat.catroid.test.R.raw.collision_donut, new File(project.getDefaultScene().getDirectory(), IMAGE_DIRECTORY_NAME), "collision_donut.png", 1); lookData = new LookData("test", imageFile); sprite.getLookList().add(lookData); }</code><technical_language>minor, if end push this again, please change project name more meaningful. get hung / deleted collide other tests names "testProject" started getClass().getSimpleName() automatically named testclass, please that</technical_language>

Target:
public void setUp() throws Exception { Project project = new Project(InstrumentationRegistry.getTargetContext(), getClass().getSimpleName()); filePath = project.getDefaultScene().getDirectory() + "/" + IMAGE_DIRECTORY_NAME + "/collision_donut.png"; Sprite sprite = new SingleSprite("testSprite"); project.getDefaultScene().addSprite(sprite); ProjectManager.getInstance().setCurrentProject(project); ProjectManager.getInstance().setCurrentSprite(sprite); XstreamSerializer.getInstance().saveProject(project); File imageFile = ResourceImporter.createImageFileFromResourcesInDirectory( InstrumentationRegistry.getContext().getResources(), org.catrobat.catroid.test.R.raw.collision_donut, new File(project.getDefaultScene().getDirectory(), IMAGE_DIRECTORY_NAME), "collision_donut.png", 1); lookData = new LookData("test", imageFile); sprite.getLookList().add(lookData); }
Source:
<code>public String serialize() { <START> graphType.isTypeCompatible(graph); <END> switch (graphType) { case ELK: ResourceSet resourceSet = new ResourceSetImpl(); Resource resource = resourceSet.createResource(URI.createFileURI("dummy.elkg")); if (resource instanceof ElkGraphResource) { resource.getContents().add((ElkNode) graph); try { StringWriter stringWriter = new StringWriter(); ((ElkGraphResource) resource).save(stringWriter, Collections.emptyMap()); return stringWriter.toString(); } catch (Exception e) { } } return "Unexpected problem serializing ELK Graph."; default: return graph.toString(); } }</code><technical_language>effect here. I I expected method throw exception. I changed implementation throw exception constructing a new LoggedGraph instance</technical_language>

Target:
public String serialize() { switch (graphType) { case ELK: ResourceSet resourceSet = new ResourceSetImpl(); Resource resource = resourceSet.createResource(URI.createFileURI("dummy.elkg")); if (resource instanceof ElkGraphResource) { resource.getContents().add((ElkNode) graph); try { StringWriter stringWriter = new StringWriter(); ((ElkGraphResource) resource).save(stringWriter, Collections.emptyMap()); return stringWriter.toString(); } catch (Exception e) { } } return "Unexpected problem serializing ELK Graph."; default: return graph.toString(); } }
Source:
<code>private void setupPipeline(SocketChannel channel, RouteMatcher router) { final ChannelPipeline pipeline = channel.pipeline(); pipeline.addLast("encoder", new HttpResponseEncoder()); pipeline.addLast("decoder", new HttpRequestDecoder() { @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable thr) throws Exception { try { if (ctx.channel().isWritable()) { log.debug("request decoder error " + thr.getCause().toString() + " on channel " + ctx.channel().toString()); ctx.channel().write( new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.BAD_REQUEST)) .addListener(ChannelFutureListener.CLOSE); } else { log.debug("channel " + ctx.channel().toString() + " is no longer writeable, not sending 400 response back to client"); } } catch (Exception ex) { log.debug("Can't write to channel " + ctx.channel().toString(), ex); } } }); pipeline.addLast("chunkaggregator", new HttpObjectAggregator(Constants.MAX_CONTENT_LENGTH)); <START> pipeline.addLast("handler", new QueryStringDecoderAndRouter(router)); <END> }</code><technical_language>a future story, want pull common code servers a parent class? a fair amount of duplication</technical_language>

Target:
private void setupPipeline(SocketChannel channel, RouteMatcher router) { final ChannelPipeline pipeline = channel.pipeline(); pipeline.addLast("encoder", new HttpResponseEncoder()); pipeline.addLast("decoder", new HttpRequestDecoder() { @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable thr) throws Exception { try { if (ctx.channel().isWritable()) { log.debug("request decoder error " + thr.getCause().toString() + " on channel " + ctx.channel().toString()); ctx.channel().write( new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.BAD_REQUEST)) .addListener(ChannelFutureListener.CLOSE); } else { log.debug("channel " + ctx.channel().toString() + " is no longer writeable, not sending 400 response back to client"); } } catch (Exception ex) { log.debug("Can't write to channel " + ctx.channel().toString(), ex); } } }); pipeline.addLast("chunkaggregator", new HttpObjectAggregator(httpMaxContentLength)); pipeline.addLast("handler", new QueryStringDecoderAndRouter(router)); }
Source:
<code>public void onMediaUploaded(MediaStore.OnMediaUploaded event) { if (isFinishing()) return; if (event.media == null) { AppLog.w(AppLog.T.MEDIA, "Media event not recognized: " + event.media); return; } if (event.isError()) { onUploadError(event.media, event.error); } else if (event.canceled) { onUploadCanceled(event.media); } else if (event.completed) { onUploadSuccess(event.media); } else { <START> AppLog.w(AppLog.T.MEDIA, "EDITPOSTACTIVITY: " + event.media.getId() + " - " + event.progress); <END> onUploadProgress(event.media, event.progress); } }</code><technical_language>This a warning-level log. Also, is this log necessary? generate a bit of logging upload, this logs tick: 05-05 08:27:02.034 31057-12701/org.wordpress.android.beta D/WordPress-API: Dispatching action: MediaAction-UPLOADED_MEDIA 05-05 08:27:02.082 31057-31057/org.wordpress.android.beta W/WordPress-MEDIA: EDITPOSTACTIVITY: 65 - 0.9653928 05-05 08:27:02.093 31057-31057/org.wordpress.android.beta D/WordPress-MEDIA: 65 - progressing 0.9653928 If helpful while working async track reduce - logs helpshift reports, I a size limit prevent earlier useful logs preserved</technical_language>

Target:
public void onMediaUploaded(MediaStore.OnMediaUploaded event) { if (isFinishing()) return; if (event.media == null) { AppLog.w(AppLog.T.MEDIA, "Media event not recognized: " + event.media); return; } if (event.isError()) { onUploadError(event.media, event.error); } else if (event.canceled) { onUploadCanceled(event.media); } else if (event.completed) { onUploadSuccess(event.media); } else { onUploadProgress(event.media, event.progress); } }
Source:
<code>private boolean filterInvalid(Position position) { if (filterInvalid) { <START> return !position.getValid() || position.getLatitude() > 90 <END> || position.getLongitude() > 180 || position.getLatitude() < -90 || position.getLongitude() < -180; } return false; }</code><technical_language>Indentation is completely wrong 3 lines</technical_language>

Target:
private boolean filterInvalid(Position position) { return filterInvalid && (!position.getValid() || position.getLatitude() > 90 || position.getLongitude() > 180 || position.getLatitude() < -90 || position.getLongitude() < -180); }
Source:
<code>synchronized public void addPartition(String partitionIdStr) { if (partitionIdMap.containsKey(partitionIdStr)) { assignedPartitionIds.add(partitionIdMap.get(partitionIdStr)); logger.info("Added partition to current VCR: ", partitionIdStr); } else { <START> logger.trace("Partition not in clusterMap on add.", partitionIdStr); <END> metrics.partitionIdNotInClusterMapOnAdd.inc(); } }</code><technical_language>Is this error condition timing? happen</technical_language>

Target:
public void addPartition(String partitionIdStr) { PartitionId partitionId = partitionIdMap.get(partitionIdStr); if (partitionId != null) { if (assignedPartitionIds.add(partitionId)) { for (VirtualReplicatorClusterListener listener : listeners) { listener.onPartitionAdded(partitionId); } logger.info("Partition is added to current VCR: {}", partitionIdStr, vcrInstanceName); } else { logger.info("Partition exists on current VCR: {}", partitionIdStr, vcrInstanceName); } } else { logger.error("Partition not in clusterMap on add.", partitionIdStr); metrics.partitionIdNotInClusterMapOnAdd.inc(); } }
Source:
<code>public void testFlush() { <START> final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); <END> final SettableApiFuture<Void> future2 = SettableApiFuture.create(); when(callable.futureCall(rowMutation)).thenReturn(future).thenReturn(future2); ApiFuture<Void> result1 = bulkMutationClient.add(rowMutation); ApiFuture<Void> result2 = bulkMutationClient.add(rowMutation); Assert.assertFalse(result1.isDone()); Assert.assertFalse(result2.isDone()); scheduler.schedule(new Runnable() { @Override public void run() { future.set(null); future2.set(null); } }, 50, TimeUnit.MILLISECONDS); bulkMutationClient.flush(); Assert.assertTrue(result1.isDone()); Assert.assertTrue(result2.isDone()); verify(callable, times(2)).futureCall(rowMutation); }</code><technical_language>do need this scheduler? this done in line? If do need it, please close in a finally block</technical_language>

Target:
public void testFlush() throws Exception { final SettableApiFuture<Void> future2 = SettableApiFuture.create(); when(callable.futureCall(rowMutation)).thenReturn(future).thenReturn(future2); ApiFuture<Void> result1 = bulkMutationClient.add(rowMutation); ApiFuture<Void> result2 = bulkMutationClient.add(rowMutation); ScheduledExecutorService executor = Executors.newScheduledThreadPool(1); try { executor.schedule(new Runnable() { @Override public void run() { future.set(null); future2.set(null); } }, 50, TimeUnit.MILLISECONDS); bulkMutationClient.flush(); assertTrue(result1.isDone()); assertTrue(result2.isDone()); } finally { executor.shutdown(); executor.awaitTermination(100, TimeUnit.MILLISECONDS); } verify(callable, times(2)).futureCall(rowMutation); }
Source:
<code><START> public MeterResponseData dequeue(final String correlationUid, final Class<?> expectedClassType) <END> throws FunctionalException { try { final MeterResponseData meterResponseData = this.meterResponseDataRepository .findSingleResultByCorrelationUid(correlationUid); if (meterResponseData == null) { throw new FunctionalException(FunctionalExceptionType.UNKNOWN_CORRELATION_UID, ComponentType.WS_SMART_METERING); } if (!expectedClassType.isInstance(meterResponseData.getMessageData())) { LOGGER.warn("Incorrect type of response data: for correlation UID: {}", meterResponseData.getClass() .getName(), meterResponseData.getCorrelationUid()); return null; } this.remove(meterResponseData); return meterResponseData; } catch (final FunctionalException e) { if (e.getExceptionType() == FunctionalExceptionType.UNKNOWN_CORRELATION_UID) { LOGGER.warn("No response data for correlation UID {}", correlationUid); } throw e; } }</code><technical_language>"dequeue" is choice of method name here. suggests queues, actions a repository, I "load" "find" describe happens</technical_language>

Target:
public MeterResponseData dequeue(final String correlationUid, final Class<?> expectedClassType) throws FunctionalException { final MeterResponseData meterResponseData = this.meterResponseDataRepository .findSingleResultByCorrelationUid(correlationUid); if (meterResponseData == null) { LOGGER.warn("No response data for correlation UID {}", correlationUid); throw new FunctionalException(FunctionalExceptionType.UNKNOWN_CORRELATION_UID, ComponentType.WS_SMART_METERING); } if (!expectedClassType.isInstance(meterResponseData.getMessageData())) { final String warningResultClassType = meterResponseData.getMessageData() == null ? "NULL" : meterResponseData.getMessageData().getClass().getName(); LOGGER.warn("Incorrect type of response data: for correlation UID: {}", warningResultClassType, meterResponseData.getCorrelationUid()); throw new FunctionalException(FunctionalExceptionType.VALIDATION_ERROR, ComponentType.WS_SMART_METERING); } this.remove(meterResponseData); return meterResponseData; }
Source:
<code>void subscribeNext() { if (requested > 0) { Object o = queue.poll(); if (nl.isCompleted(o)) { child.onCompleted(); } else if (o != null) { Observable<? extends T> obs = nl.getValue(o); currentSubscriber = new ConcatInnerSubscriber<T>(this, child); <START> currentSubscriber.requestMore(requested); <END> current.set(currentSubscriber); obs.unsafeSubscribe(currentSubscriber); } } else { Object o = queue.peek(); if (nl.isCompleted(o)) { child.onCompleted(); } } }</code><technical_language>This (the constructor version is behaviorally equivalent) is a small window requesting requested setting current. Swapping requestMore set a concurrent get request r0 + 2n: r0 + n requested is updated n reference is non-null. need ProducerArbiter, however, If wait a hours, post a PR useful producers put rx.internal.producers making 'official' takes days of back-and-forth</technical_language>

Target:
void subscribeNext() { if (requested > 0) { Object o = queue.poll(); if (nl.isCompleted(o)) { child.onCompleted(); } else if (o != null) { Observable<? extends T> obs = nl.getValue(o); currentSubscriber = new ConcatInnerSubscriber<T>(this, child, arbiter); current.set(currentSubscriber); obs.unsafeSubscribe(currentSubscriber); } } else { Object o = queue.peek(); if (nl.isCompleted(o)) { child.onCompleted(); } } }
Source:
<code>public Deploy toServerGroups(String... serverGroups) { if (this.serverGroups == null && serverGroups != null) { this.serverGroups = new ArrayList<String>(); } if (serverGroups != null) { this.serverGroups.addAll(Arrays.asList(serverGroups)); } <START> return build(); <END> }</code><technical_language>I talked Radim mentioned is if this ok. I agree this problem in future if eventually add more options builder. @Ladicek wdyt</technical_language>

Target:
public Builder toServerGroups(String... serverGroups) { if (this.serverGroups == null && serverGroups != null) { this.serverGroups = new ArrayList<String>(); } if (serverGroups != null) { this.serverGroups.addAll(Arrays.asList(serverGroups)); } return this; }
Source:
<code><START> public Instance putAll(final Map<String, String> values) { <END> for (final Map.Entry<String, String> entry : values.entrySet()) { put(entry.getKey(), entry.getValue()); } return this; }</code><technical_language>ThreadContext.putAll() here</technical_language>

Target:
public Instance putAll(final Map<String, String> values) { final Map<String, String> currentValues = ThreadContext.getContext(); ThreadContext.putAll(values); for (final String key : values.keySet()) { if (!originalValues.containsKey(key)) { originalValues.put(key, currentValues.get(key)); } } return this; }
Source:
<code>public Mono<ServiceMessage> requestOne( ServiceMessage request, Type responseType, Address address) { return Mono.defer( () -> { requireNonNull(address, "requestOne address parameter is required and must not be null"); <START> requireNonNull( <END> transport, "transport is required did you forget to provide transport?"); return transport .create(address) .requestResponse(request, responseType) .map(this::throwIfError); }); }</code><technical_language>revert this error msg</technical_language>

Target:
public Mono<ServiceMessage> requestOne( ServiceMessage request, Type responseType, Address address) { return Mono.defer( () -> { requireNonNull(address, "requestOne address parameter is required and must not be null"); requireNonNull(transport, "transport is required and must not be null"); return transport .create(address) .requestResponse(request, responseType) .map(this::throwIfError); }); }
Source:
<code>private PluginInfo savePluginInfo(PluginInfo pluginInfo) { validate(pluginInfo); PluginInfo oldPluginInfo; try { oldPluginInfo = findById(pluginInfo.getId()); } catch (NotFoundException e) { oldPluginInfo = null; } PluginInfoDelta delta = new PluginInfoDelta(pluginInfo, oldPluginInfo); delta.addedReleases.forEach( release -> postEvent(PluginEventType.PUBLISHED, pluginInfo, release)); String newVersion = Optional.ofNullable(delta.newPreferredRelease) .map(PluginInfo.Release::getVersion) .orElse(null); String oldVersion = Optional.ofNullable(delta.oldPreferredRelease) .map(PluginInfo.Release::getVersion) .orElse(null); if ((newVersion == null && oldVersion != null || (newVersion != null && !newVersion.equals(oldVersion)))) { postEvent(PluginEventType.PREFERRED_VERSION_UPDATED, pluginInfo, delta.newPreferredRelease); } if (oldPluginInfo == null) { repository.create(pluginInfo.getId(), pluginInfo); } else { repository.update(pluginInfo.getId(), pluginInfo); } <START> return pluginInfo; <END> }</code><technical_language>I events posted plugin is created updated. a consistency error handling perspective</technical_language>

Target:
private PluginInfo savePluginInfo(PluginInfo pluginInfo) { validate(pluginInfo); PluginInfo oldPluginInfo; try { oldPluginInfo = findById(pluginInfo.getId()); } catch (NotFoundException e) { oldPluginInfo = null; } if (oldPluginInfo == null) { repository.create(pluginInfo.getId(), pluginInfo); } else { repository.update(pluginInfo.getId(), pluginInfo); } PluginInfoDelta delta = new PluginInfoDelta(pluginInfo, oldPluginInfo); delta.addedReleases.forEach( release -> postEvent(PluginEventType.PUBLISHED, pluginInfo, release)); String newVersion = Optional.ofNullable(delta.newPreferredRelease) .map(PluginInfo.Release::getVersion) .orElse(null); String oldVersion = Optional.ofNullable(delta.oldPreferredRelease) .map(PluginInfo.Release::getVersion) .orElse(null); if ((newVersion == null && oldVersion != null || (newVersion != null && !newVersion.equals(oldVersion)))) { postEvent(PluginEventType.PREFERRED_VERSION_UPDATED, pluginInfo, delta.newPreferredRelease); } return pluginInfo; }
Source:
<code>public void transform(StructuredRecord structuredRecord, Emitter<KeyValue<Text, Text>> emitter) throws Exception { Type schemaType = new TypeToken<Schema>() { }.getType(); <START> if (flag) { <END> batchConfig.verifySolrConfiguration(); flag = false; } batchConfig.validateKeyField(structuredRecord.getSchema()); batchConfig.validateInputFieldsDataType(structuredRecord.getSchema()); if (structuredRecord.get(batchConfig.getKeyField()) == null) { return; } emitter.emit(new KeyValue<Text, Text>(new Text(GSON.toJson(structuredRecord.getSchema(), schemaType)), new Text(StructuredRecordStringConverter.toJsonString(structuredRecord)))); }</code><technical_language>override initialize method perform verification once, prior processing (it achieve)</technical_language>

Target:
public void transform(StructuredRecord structuredRecord, Emitter<KeyValue<Text, Text>> emitter) throws Exception { batchConfig.validateKeyField(structuredRecord.getSchema()); batchConfig.validateInputFieldsDataType(structuredRecord.getSchema()); if (structuredRecord.get(batchConfig.getKeyField()) == null) { return; } emitter.emit(new KeyValue<Text, Text>(new Text(GSON.toJson(structuredRecord.getSchema(), SCHEMA_TYPE)), new Text(StructuredRecordStringConverter.toJsonString(structuredRecord)))); }
Source:
<code>protected void initDebug() { Boolean debugParam = getInitParameter("debug", Boolean.class); <START> setDebug((debugParam == null) ? false : debugParam); <END> }</code><technical_language>This Optional.ofNullable(debugParam).orElse(false) more functional friendly more readable</technical_language>

Target:
protected void initDebug() { setDebug(Optional.ofNullable(getInitParameter("debug", Boolean.class)).orElse(false)); }
Source:
<code>public CompletionStage<Void> deleteBatchFromAllNonTxStores(Iterable<Object> keys, Predicate<? super StoreConfiguration> predicate, long flags) { Flowable<NonBlockingStore.SegmentedPublisher<Object>> flowable = Flowable.fromIterable(keys) .groupBy(keyPartitioner::getSegment) .map(SegmentPublisherWrapper::new); return Completable.using( this::acquireReadLock, ignore -> { checkStoreAvailability(); if (trace) { log.trace("Deleting batch of entries from stores"); } return Flowable.fromIterable(stores.entrySet()) .filter(entry -> !entry.getValue().characteristics.contains(Characteristic.READ_ONLY) <START> && predicate.test(entry.getValue().config)) <END> .flatMapCompletable(entry -> Completable.fromCompletionStage( entry.getKey().bulkDelete(segmentCount, flowable))); }, this::releaseReadLock ).toCompletionStage(null); }</code><technical_language>shouldWrite</technical_language>

Target:
public CompletionStage<Void> deleteBatchFromAllNonTxStores(Iterable<Object> keys, Predicate<? super StoreConfiguration> predicate, long flags) { Flowable<NonBlockingStore.SegmentedPublisher<Object>> flowable = Flowable.fromIterable(keys) .groupBy(keyPartitioner::getSegment) .map(SegmentPublisherWrapper::new); return Completable.using( this::acquireReadLock, ignore -> { checkStoreAvailability(); if (trace) { log.trace("Deleting batch of entries from stores"); } return Flowable.fromIterable(stores) .filter(storeStatus -> shouldWrite(storeStatus, predicate)) .flatMapCompletable(storeStatus -> Completable.fromCompletionStage( storeStatus.store.bulkDelete(segmentCount, flowable))); }, this::releaseReadLock ).toCompletionStage(null); }