auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void connectionCreated(final ActiveMQComponent component, final Connection connection, final ProtocolManager protocol) { if (server == null) { throw new IllegalStateException("Unable to create connection, server hasn't finished starting up"); } ConnectionEntry entry = protocol.createConnectionEntry((Acceptor) component, connection); try { server.callBrokerPlugins(server.hasBrokerPlugins() ? plugin -> plugin.afterCreateConnection(entry.connection) : null); } catch (Exception e) { <START> throw new IllegalStateException("Error executing afterCreateConnection plugin method: " + e.getMessage(), e); <END> } if (logger.isTraceEnabled()) { logger.trace("Connection created " + connection); } connections.put(connection.getID(), entry); connectionCountLatch.countUp(); totalConnectionCount.incrementAndGet(); }</code><technical_language>log this case... I expect failures broker plugin logged</technical_language>

Target:
public void connectionCreated(final ActiveMQComponent component, final Connection connection, final ProtocolManager protocol) { if (server == null) { throw new IllegalStateException("Unable to create connection, server hasn't finished starting up"); } ConnectionEntry entry = protocol.createConnectionEntry((Acceptor) component, connection); try { server.callBrokerPlugins(server.hasBrokerPlugins() ? plugin -> plugin.afterCreateConnection(entry.connection) : null); } catch (Throwable t) { logger.warn("Error executing afterCreateConnection plugin method: {}", t.getMessage(), t); } if (logger.isTraceEnabled()) { logger.trace("Connection created " + connection); } connections.put(connection.getID(), entry); connectionCountLatch.countUp(); totalConnectionCount.incrementAndGet(); }
Source:
<code>public OutputStream prepareForRecords( OutputStream out, final SAMFormat format, final SAMFileHeader header) throws IOException { switch (format) { case BAM: <START> prepareBAMStream(out, format, header); <END> break; case CRAM: prepareCRAMStream(out, format, header); break; default: throw new IllegalArgumentException("Unsupported SAM file format, must be one of BAM or CRAM"); } out.flush(); return out; }</code><technical_language>This cover SAM too. checks for BAM in prepareBAMStream, method doc for prepareForRecords suggests for SAM "This includes writing SAM header and, in case of BAM, writing some metadata compressing written."</technical_language>

Target:
public OutputStream prepareForRecords( OutputStream out, final SAMFormat format, final SAMFileHeader header) throws IOException { switch (format) { case SAM: out = prepareSAMOrBAMStream(out, format, header); break; case BAM: out = prepareSAMOrBAMStream(out, format, header); break; case CRAM: out = prepareCRAMStream(out, format, header); break; default: throw new IllegalArgumentException ("Unsupported SAM file format, must be one of SAM, BAM or CRAM"); } out.flush(); return out; }
Source:
<code>protected IFile findFileInWorkspace(IPath path) { URI uri; if (!path.isAbsolute()) { URI workingDirectoryURI = getWorkingDirectoryURI(); uri = EFSExtensionManager.getDefault().append(workingDirectoryURI, path.toString()); } else { uri = toURI(path); <START> if (uri == null) END> return null; } return findFileInWorkspace(uri); }</code><technical_language>Please bring braces back</technical_language>

Target:
protected IFile findFileInWorkspace(IPath path) { URI uri; if (!path.isAbsolute()) { URI workingDirectoryURI = getWorkingDirectoryURI(); uri = EFSExtensionManager.getDefault().append(workingDirectoryURI, path.toString()); } else { uri = toURI(path); if (uri == null) { return null; } } return findFileInWorkspace(uri); }
Source:
<code>public AccessPoint getAccessPoint(String ssid) throws XBeeException { <START> logger.debug("{}AS for '{}' access point.", toString(), ssid); <END> List<AccessPoint> accessPointsList = discoverAccessPoints(); for (AccessPoint accessPoint:accessPointsList) { if (accessPoint.getSSID().equals(ssid)) return accessPoint; } return null; }</code><technical_language>throw a NullPointerException if ssid == null</technical_language>

Target:
public AccessPoint getAccessPoint(String ssid) throws XBeeException { if (ssid == null) throw new NullPointerException("SSID cannot be null."); logger.debug("{}AS for '{}' access point.", toString(), ssid); List<AccessPoint> accessPointsList = discoverAccessPoints(); for (AccessPoint accessPoint:accessPointsList) { if (accessPoint.getSSID().equals(ssid)) return accessPoint; } return null; }
Source:
<code>public URI build() { try { StringBuilder queryBuilder = new StringBuilder(encodeQuery(query.toString())); for (int i = 0; i < qParams.size(); i++) { String amp = (i != qParams.size() - 1) ? "&" : ""; String param; String queryParam = qParams.get(i); <START> int firstEqualsIndex = queryParam.indexOf('='); <END> if (firstEqualsIndex != -1 && firstEqualsIndex < queryParam.length() - 1) { String encodedKey = encodeQueryParameter(queryParam.substring(0, firstEqualsIndex)); String encodedValue = encodeQueryParameter(queryParam.substring(firstEqualsIndex + 1)); param = String.format("%s=%s", encodedKey, encodedValue); } else { param = qParams.get(i); } queryBuilder.append(param + amp); } String q = (queryBuilder.length() == 0) ? "" : "?" + queryBuilder.toString(); String uriString = String.format("%s://%s:%s%s%s", scheme, host, port, path, q); return new URI(uriString); } catch (URISyntaxException e) { throw new IllegalArgumentException(e); } }</code><technical_language>if this is work properly. assumes want = encoding want of rest encoded. investigate removing public URIBuilder query(String query) flavour force API users give keys values separately. If this this flavour for internal and/or a health warning potential users</technical_language>

Target:
public URI build() { try { StringBuilder queryBuilder; if (query.length() > 0) { queryBuilder = new StringBuilder(encodeQuery(query.toString())); } else { queryBuilder = new StringBuilder(); } for (int i = 0; i < qParams.size(); i++) { String amp = (i != qParams.size() - 1) ? "&" : ""; queryBuilder.append(qParams.get(i).toURLEncodedString() + amp); } String q = (queryBuilder.length() == 0) ? "" : "?" + queryBuilder.toString(); String uriString = String.format("%s://%s:%s%s%s", scheme, host, port, path, q); return new URI(uriString); } catch (URISyntaxException e) { throw new IllegalArgumentException(e); } }
Source:
<code>public void broadcastNote(Note note) { broadcast(note.getId(), new Message(OP.NOTE).put("note", note)); <START> broadcastToWatchers(note.getId(), "", new Message(OP.NOTE).put("note", note)); <END> }</code><technical_language>This called of broadcast() a live above</technical_language>

Target:
public void broadcastNote(Note note) { broadcast(note.getId(), new Message(OP.NOTE).put("note", note)); }
Source:
<code>private Set<String> expandRegionalChannelUris(String channelUri) { Set<String> expandedUris = null; if (BBC1_TXLOG_CHANNEL_URIS.contains(channelUri)) { expandedUris = BBC1_TXLOG_CHANNEL_URIS; } if (BBC2_TXLOG_CHANNEL_URIS.contains(channelUri)) { expandedUris = BBC2_TXLOG_CHANNEL_URIS; } <START> return expandedUris == null ? null : Sets.difference(expandedUris, ImmutableSet.of(channelUri)); <END> }</code><technical_language>do difference return in if, save 2 checks</technical_language>

Target:
private Set<String> expandRegionalChannelUris(String channelUri) { if (BBC1_TXLOG_CHANNEL_URIS.contains(channelUri)) { return Sets.difference(BBC1_TXLOG_CHANNEL_URIS, ImmutableSet.of(channelUri)); } else if (BBC2_TXLOG_CHANNEL_URIS.contains(channelUri)) { return Sets.difference(BBC2_TXLOG_CHANNEL_URIS, ImmutableSet.of(channelUri)); } return null; }
Source:
<code>BackupResult doBackupSession( final MemcachedBackupSession session, final byte[] data, final byte[] attributesData ) { if ( _log.isDebugEnabled() ) { _log.debug( "Trying to store session in memcached: " + session.getId() ); } try { storeSessionInMemcached( session, data ); return new BackupResult( BackupResultStatus.SUCCESS, data, attributesData ); } catch (final IOException e) { handleException(session, e); return new BackupResult(BackupResultStatus.FAILURE, data, null); } <START> } <END></code><technical_language>This wrapped exceptions thrown future task - context Exception Throwable caught a proper replacement</technical_language>

Target:
BackupResult doBackupSession( final MemcachedBackupSession session, final byte[] data, final byte[] attributesData ) throws InterruptedException { if ( _log.isDebugEnabled() ) { _log.debug( "Trying to store session in memcached: " + session.getId() ); } try { storeSessionInMemcached( session, data ); return new BackupResult( BackupResultStatus.SUCCESS, data, attributesData ); } catch (final ExecutionException e) { handleException(session, e); return new BackupResult(BackupResultStatus.FAILURE, data, null); } catch (final TimeoutException e) { handleException(session, e); return new BackupResult(BackupResultStatus.FAILURE, data, null); } }
Source:
<code>private NettyServer getNettyServer(Properties properties) throws InstantiationException, IOException { if (properties == null) { properties = new Properties(); } VerifiableProperties verifiableProperties = new VerifiableProperties(properties); final NettyConfig nettyConfig = new NettyConfig(verifiableProperties); final NettyMetrics nettyMetrics = new NettyMetrics(new MetricRegistry()); final RestRequestHandler requestHandler = new MockRestRequestResponseHandler(); final PublicAccessLogger publicAccessLogger = new PublicAccessLogger(new String[]{}, new String[]{}); final RestServerState restServerState = new RestServerState("/healthCheck"); return new NettyServer(nettyConfig, nettyMetrics, new ChannelInitializer<SocketChannel>() { @Override protected void initChannel(SocketChannel ch) { ch.pipeline() <START> .addLast("ConnectionStatsHandler", new ConnectionStatsHandler(nettyMetrics)) <END> .addLast("codec", new HttpServerCodec()) .addLast("healthCheckHandler", new HealthCheckHandler(restServerState, nettyMetrics)) .addLast("publicAccessLogHandler", new PublicAccessLogHandler(publicAccessLogger, nettyMetrics)) .addLast("idleStateHandler", new IdleStateHandler(0, 0, nettyConfig.nettyServerIdleTimeSeconds)) .addLast("chunker", new ChunkedWriteHandler()) .addLast("processor", new NettyMessageProcessor(nettyMetrics, nettyConfig, requestHandler)); } }); }</code><technical_language>ConnectionStatsHandler.getInstance(nettyMetrics)</technical_language>

Target:
private NettyServer getNettyServer(Properties properties) throws InstantiationException, IOException { if (properties == null) { properties = new Properties(); } VerifiableProperties verifiableProperties = new VerifiableProperties(properties); final NettyConfig nettyConfig = new NettyConfig(verifiableProperties); final NettyMetrics nettyMetrics = new NettyMetrics(new MetricRegistry()); final RestRequestHandler requestHandler = new MockRestRequestResponseHandler(); final PublicAccessLogger publicAccessLogger = new PublicAccessLogger(new String[]{}, new String[]{}); final RestServerState restServerState = new RestServerState("/healthCheck"); return new NettyServer(nettyConfig, nettyMetrics, new ChannelInitializer<SocketChannel>() { @Override protected void initChannel(SocketChannel ch) { ch.pipeline() .addLast("ConnectionStatsHandler", ConnectionStatsHandler.getInstance(nettyMetrics)) .addLast("codec", new HttpServerCodec()) .addLast("healthCheckHandler", new HealthCheckHandler(restServerState, nettyMetrics)) .addLast("publicAccessLogHandler", new PublicAccessLogHandler(publicAccessLogger, nettyMetrics)) .addLast("idleStateHandler", new IdleStateHandler(0, 0, nettyConfig.nettyServerIdleTimeSeconds)) .addLast("chunker", new ChunkedWriteHandler()) .addLast("processor", new NettyMessageProcessor(nettyMetrics, nettyConfig, requestHandler)); } }); }
Source:
<code>protected void doStop() { try { this.active = false; this.lifecycleCondition.await(Math.min(this.stopTimeout, this.receiveTimeout), TimeUnit.MICROSECONDS); <START> this.listening = false; <END> } catch (InterruptedException e) { logger.debug("Thread interrupted while stopping the endpoint"); Thread.currentThread().interrupt(); } }</code><technical_language>Needs in finally - get interrupted</technical_language>

Target:
protected void doStop() { try { this.active = false; this.lifecycleCondition.await(Math.min(this.stopTimeout, this.receiveTimeout), TimeUnit.MICROSECONDS); } catch (InterruptedException e) { logger.debug("Thread interrupted while stopping the endpoint"); Thread.currentThread().interrupt(); } finally { this.listening = false; } }
Source:
<code><START> protected EventSourcedAggregate<T> doLoadWithLock(String aggregateIdentifier, Long expectedVersion) { <END> DomainEventStream eventStream = DomainEventStream.filter(eventStore.readEvents(aggregateIdentifier), e -> e.getType().equals(aggregateModel().type())); SnapshotTrigger trigger = snapshotTriggerDefinition.prepareTrigger(aggregateFactory.getAggregateType()); if (!eventStream.hasNext()) { throw new AggregateNotFoundException(aggregateIdentifier, "The aggregate was not found in the event store"); } EventSourcedAggregate<T> aggregate = EventSourcedAggregate .initialize(aggregateFactory.createAggregateRoot(aggregateIdentifier, eventStream.peek()), aggregateModel(), eventStore, trigger); aggregate.initializeState(eventStream); if (aggregate.isDeleted()) { throw new AggregateDeletedException(aggregateIdentifier); } return aggregate; }</code><technical_language>mind introducing a test calls chance EventSourcingRepository#doLoadWithLock(String, Long) function ensures filtering is performed</technical_language>

Target:
protected EventSourcedAggregate<T> doLoadWithLock(String aggregateIdentifier, Long expectedVersion) { DomainEventStream eventStream = readEvents(aggregateIdentifier); SnapshotTrigger trigger = snapshotTriggerDefinition.prepareTrigger(aggregateFactory.getAggregateType()); if (!eventStream.hasNext()) { throw new AggregateNotFoundException(aggregateIdentifier, "The aggregate was not found in the event store"); } EventSourcedAggregate<T> aggregate = EventSourcedAggregate .initialize(aggregateFactory.createAggregateRoot(aggregateIdentifier, eventStream.peek()), aggregateModel(), eventStore, repositoryProvider, trigger); aggregate.initializeState(eventStream); if (aggregate.isDeleted()) { throw new AggregateDeletedException(aggregateIdentifier); } return aggregate; }
Source:
<code>protected void queuePersistedMessages( final ServerSession serverSession, List<Map<String, Object>> messages, final String topic) { for (Map<String, Object> notification : messages) { final Map<String, Object> propMap = new HashMap<>(); propMap.putAll(notification); executorService.submit( new Runnable() { @Override public void run() { int maxAttempts = 10; int attempts = 0; while (!serverSession.isConnected() && attempts < maxAttempts) { try { TimeUnit.SECONDS.sleep(1); } catch (InterruptedException e) { <START> Thread.currentThread().interrupt(); <END> } attempts++; LOGGER.trace( "Attempt of to send notifications back to client.", attempts, maxAttempts); } LOGGER.trace("Sending notifications back to client."); serverSession.deliver(controllerServerSession, topic, propMap); } }); } }</code><technical_language>issue before, interruption propagated loop a finally clause</technical_language>

Target:
protected void queuePersistedMessages( final ServerSession serverSession, List<Map<String, Object>> messages, final String topic) { for (Map<String, Object> notification : messages) { final Map<String, Object> propMap = new HashMap<>(); propMap.putAll(notification); executorService.submit( new Runnable() { @Override public void run() { int maxAttempts = 10; int attempts = 0; while (!serverSession.isConnected() && attempts < maxAttempts) { try { TimeUnit.SECONDS.sleep(1); } catch (InterruptedException e) { } attempts++; LOGGER.trace( "Attempt of to send notifications back to client.", attempts, maxAttempts); } LOGGER.trace("Sending notifications back to client."); serverSession.deliver(controllerServerSession, topic, propMap); } }); } }
Source:
<code>public Map<K, ValueHolder<V>> bulkComputeIfAbsent(Iterable<? extends K> keys, final Function<Iterable<? extends K>, Iterable<? extends Map.Entry<? extends K, ? extends V>>> mappingFunction) throws CacheAccessException { Set<K> presentKeys = new HashSet<K>(); Set<K> missingKeys = new HashSet<K>(); for (K key : keys) { if (map.containsKey(key)) { presentKeys.add(key); } else { missingKeys.add(key); } } Map<K, ValueHolder<V>> result = new HashMap<K, ValueHolder<V>>(); for (final K key : missingKeys) { final OnHeapValueHolder<V> newValue = map.compute(key, new BiFunction<K, OnHeapValueHolder<V>, OnHeapValueHolder<V>>() { @Override public OnHeapValueHolder<V> apply(final K k, final OnHeapValueHolder<V> oldValue) { final Iterable<K> keySet = Collections.singletonMap(k, oldValue == null ? null : oldValue.value()) .keySet(); final Iterable<? extends Map.Entry<? extends K, ? extends V>> entries = mappingFunction.apply(keySet); final java.util.Iterator<? extends Map.Entry<? extends K, ? extends V>> iterator = entries.iterator(); final Map.Entry<? extends K, ? extends V> next = iterator.next(); if (!next.getKey().equals(k) || iterator.hasNext()) { <START> throw new IllegalArgumentException("This test is wrong!"); <END> } return nullSafeNewValueHolder(next.getKey(), next.getValue(), timeSource.getTimeMillis()); } }); result.put(key, newValue); } for (K key : presentKeys) { result.put(key, map.get(key)); } return result; }</code><technical_language>is this here</technical_language>

Target:
public Map<K, ValueHolder<V>> bulkComputeIfAbsent(Iterable<? extends K> keys, final Function<Iterable<? extends K>, Iterable<? extends Map.Entry<? extends K, ? extends V>>> mappingFunction) throws CacheAccessException { Map<K, ValueHolder<V>> result = new HashMap<K, ValueHolder<V>>(); Set<K> missingKeys = new HashSet<K>(); for (K key : keys) { checkKey(key); ValueHolder<V> value = get(key); if (value != null) { result.put(key, value); } else { missingKeys.add(key); } } for (final K key : missingKeys) { final OnHeapValueHolder<V> newValue = map.compute(key, new BiFunction<K, OnHeapValueHolder<V>, OnHeapValueHolder<V>>() { @Override public OnHeapValueHolder<V> apply(final K k, final OnHeapValueHolder<V> oldValue) { final Iterable<K> keySet = Collections.singleton(k); final Iterable<? extends Map.Entry<? extends K, ? extends V>> entries = mappingFunction.apply(keySet); final java.util.Iterator<? extends Map.Entry<? extends K, ? extends V>> iterator = entries.iterator(); final Map.Entry<? extends K, ? extends V> next = iterator.next(); return nullSafeNewValueHolder(next.getKey(), next.getValue(), timeSource.getTimeMillis()); } }); result.put(key, newValue); } return result; }
Source:
<code>public String getManufacturer() { String localRef = this.manufacturer; if (localRef == null) { synchronized (this) { localRef = this.manufacturer; if (localRef == null) { <START> if (!queryManufacturerFromSysfs() && !queryManufacturerFromProcCpu()) { <END> this.manufacturer = Constants.UNKNOWN; } localRef = this.manufacturer; } } } return localRef; }</code><technical_language>manufacturer field is declared in super class AbstractComputerSystem is written in subclasses. This violates encapsulation for good reason. I suggesting following: - Declare AbstractComputerSystem.manufacturer private. - Remove getManufacturer method subclasses of AbstractComputerSystem move AbstractComputerSystem. - Introduce abstract protected String AbstractComputerSystem.manufacturer() method logic of of manufacturer. - manufacturer() method in AbstractComputerSystem in order calculate of manufacturer. - Implement manufacturer() method in subclasses of AbstractComputerSystem. E.g. for LinuxComputerSystem implementation java protected final String manufacturer() { String result; if ((result = queryManufacturerFromSysfs()) == null && (result = queryManufacturerFromProcCpu()) == null) { return Constants.UNKNOWN; } return result; } This of require change queryManufacturerFromSysfs() queryManufacturerFromProcCpu() methods return manufacturer instead of writing manufacturer field. a change code error-prone more readable, a single place field manufacturer is written, instead of multiple places is now</technical_language>

Target:
public String getManufacturer() { return manufacturer.get(); }
Source:
<code><START> public boolean filterRowKey(Cell cell) { <END> if(cell == null) { return true; } Txn.State state = Txn.State.decode(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength()); return state != Txn.State.ACTIVE; }</code><technical_language>filterRowKey filter based rowkey, specific values. This is called row. guessing current implementation work SPLICE_TXN, inspect latest written cell (COMMITTED ROLLEDBACK), ACTIVE state filter out, filter out row</technical_language>

Target:
public boolean filterRowKey(Cell cell) { return false; }
Source:
<code>public void run(MintConfiguration configuration, Environment environment) throws Exception { DBIFactory dbiFactory = new DBIFactory(); DBI jdbi = dbiFactory.build(environment, configuration.getDatabase(), "postgres"); RegistersConfiguration registersConfiguration = new RegistersConfiguration(Optional.ofNullable(System.getProperty("registersYaml"))); FieldsConfiguration fieldsConfiguration = new FieldsConfiguration(Optional.ofNullable(System.getProperty("fieldsYaml"))); EntryValidator entryValidator = new EntryValidator(registersConfiguration, fieldsConfiguration); LoadHandler loadHandler = new LoadHandler(configuration.getRegister(), jdbi.onDemand(EntriesUpdateDAO.class), entryValidator); final Client client = new JerseyClientBuilder(environment) .using(configuration.getJerseyClientConfiguration()) .build(getName()); <START> if(client == null && StringUtils.isNotBlank(configuration.getCTServer())) { <END> throw new RuntimeException("Failed to create Jersey client"); } CTHandler ctHandler = new CTHandler(configuration.getRegister(), configuration.getCTServer(), client, entryValidator); List<Handler> handlers = new ArrayList<Handler>(); handlers.add(loadHandler); handlers.add(ctHandler); JerseyEnvironment jersey = environment.jersey(); jersey.register(new MintService(handlers)); jersey.register(EntryValidationExceptionMapper.class); jersey.register(JsonParseExceptionMapper.class); jersey.register(ThrowableExceptionMapper.class); configuration.getAuthenticator().build() .ifPresent(authenticator -> jersey.register(new AuthDynamicFeature( new BasicCredentialAuthFilter.Builder<User>() .setAuthenticator(authenticator) .buildAuthFilter() )) ); }</code><technical_language>In case client object null</technical_language>

Target:
public void run(MintConfiguration configuration, Environment environment) throws Exception { DBIFactory dbiFactory = new DBIFactory(); DBI jdbi = dbiFactory.build(environment, configuration.getDatabase(), "postgres"); RegistersConfiguration registersConfiguration = new RegistersConfiguration(Optional.ofNullable(System.getProperty("registersYaml"))); FieldsConfiguration fieldsConfiguration = new FieldsConfiguration(Optional.ofNullable(System.getProperty("fieldsYaml"))); EntryValidator entryValidator = new EntryValidator(registersConfiguration, fieldsConfiguration); ObjectReconstructor objectReconstructor = new ObjectReconstructor(); Loader handler; if (StringUtils.isNotEmpty(configuration.getCTServer())) { handler = new CTHandler(configuration, environment, getName()); } else { handler = new LoadHandler(jdbi.onDemand(EntriesUpdateDAO.class)); } JerseyEnvironment jersey = environment.jersey(); jersey.register(new MintService(configuration.getRegister(), objectReconstructor, entryValidator, handler)); jersey.register(CTExceptionMapper.class); jersey.register(EntryValidationExceptionMapper.class); jersey.register(JsonParseExceptionMapper.class); jersey.register(ThrowableExceptionMapper.class); configuration.getAuthenticator().build() .ifPresent(authenticator -> jersey.register(new AuthDynamicFeature( new BasicCredentialAuthFilter.Builder<User>() .setAuthenticator(authenticator) .buildAuthFilter() )) ); }
Source:
<code>public void manage(Entity e) { if (isManaged(e)) { log.warn(""+this+" redundant call to start management of entity (and descendants of) "+e+"; skipping", new Exception("source of duplicate management of "+e)); return; } AccessController.Response access = managementContext.getAccessController().canManageEntity(e); if (!access.isAllowed()) { throw new IllegalStateException("Access controller forbids management of "+e+": "+access.getMsg()); } final ManagementTransitionInfo info = new ManagementTransitionInfo(managementContext, ManagementTransitionMode.NORMAL); final List<EntityInternal> allEntities = Lists.newArrayList(); recursively(e, new Predicate<EntityInternal>() { public boolean apply(EntityInternal it) { if (it.getManagementSupport().isDeployed()) { return false; } else { <START> allEntities.add(it); <END> preManageNonRecursive(it); it.getManagementSupport().onManagementStarting(info); return manageNonRecursive(it); } } }); for (EntityInternal it : allEntities) { if (!it.getManagementSupport().isFullyManaged()) { it.getManagementSupport().onManagementStarted(info); managementContext.getRebindManager().getChangeListener().onManaged(it); } }; }</code><technical_language>a mix of tabs spaces</technical_language>

Target:
public void manage(Entity e) { if (isManaged(e)) { log.warn(""+this+" redundant call to start management of entity (and descendants of) "+e+"; skipping", new Exception("source of duplicate management of "+e)); return; } AccessController.Response access = managementContext.getAccessController().canManageEntity(e); if (!access.isAllowed()) { throw new IllegalStateException("Access controller forbids management of "+e+": "+access.getMsg()); } final ManagementTransitionInfo info = new ManagementTransitionInfo(managementContext, ManagementTransitionMode.NORMAL); final List<EntityInternal> allEntities = Lists.newArrayList(); recursively(e, new Predicate<EntityInternal>() { public boolean apply(EntityInternal it) { if (it.getManagementSupport().isDeployed()) { return false; } else { allEntities.add(it); preManageNonRecursive(it); it.getManagementSupport().onManagementStarting(info); return manageNonRecursive(it); } } }); for (EntityInternal it : allEntities) { if (!it.getManagementSupport().isFullyManaged()) { it.getManagementSupport().onManagementStarted(info); managementContext.getRebindManager().getChangeListener().onManaged(it); } } }
Source:
<code>public void testJoinAssignment() throws Exception { EasyMock.expect(member.memberId()).andStubReturn("member"); EasyMock.expect(member.currentProtocolVersion()).andStubReturn(CONNECT_PROTOCOL_V0); EasyMock.expect(worker.getPlugins()).andReturn(plugins); expectRebalance(1, Arrays.asList(CONN1), Arrays.asList(TASK1)); expectPostRebalanceCatchup(SNAPSHOT); Capture<Callback<TargetState>> onStart = newCapture(); worker.startConnector(EasyMock.eq(CONN1), EasyMock.<Map<String, String>>anyObject(), EasyMock.<CloseableConnectorContext>anyObject(), EasyMock.eq(herder), EasyMock.eq(TargetState.STARTED), capture(onStart)); PowerMock.expectLastCall().andAnswer(new IAnswer<Boolean>() { @Override public Boolean answer() throws Throwable { onStart.getValue().onCompletion(null, TargetState.STARTED); return true; } }); member.wakeup(); EasyMock.expect(worker.isRunning(CONN1)).andReturn(true); PowerMock.expectLastCall(); <START> EasyMock.expect(worker.connectorTaskConfigs(CONN1, conn1SinkConfig)).andReturn(TASK_CONFIGS); <END> worker.startTask(EasyMock.eq(TASK1), EasyMock.<ClusterConfigState>anyObject(), EasyMock.<Map<String, String>>anyObject(), EasyMock.<Map<String, String>>anyObject(), EasyMock.eq(herder), EasyMock.eq(TargetState.STARTED)); PowerMock.expectLastCall().andReturn(true); member.poll(EasyMock.anyInt()); PowerMock.expectLastCall(); PowerMock.replayAll(); herder.tick(); time.sleep(1000L); assertStatistics(3, 1, 100, 1000L); PowerMock.verifyAll(); }</code><technical_language>this refer member.wakeup. follow method</technical_language>

Target:
public void testJoinAssignment() throws Exception { EasyMock.expect(member.memberId()).andStubReturn("member"); EasyMock.expect(member.currentProtocolVersion()).andStubReturn(CONNECT_PROTOCOL_V0); EasyMock.expect(worker.getPlugins()).andReturn(plugins); expectRebalance(1, Arrays.asList(CONN1), Arrays.asList(TASK1)); expectPostRebalanceCatchup(SNAPSHOT); Capture<Callback<TargetState>> onStart = newCapture(); worker.startConnector(EasyMock.eq(CONN1), EasyMock.<Map<String, String>>anyObject(), EasyMock.<CloseableConnectorContext>anyObject(), EasyMock.eq(herder), EasyMock.eq(TargetState.STARTED), capture(onStart)); PowerMock.expectLastCall().andAnswer(new IAnswer<Boolean>() { @Override public Boolean answer() throws Throwable { onStart.getValue().onCompletion(null, TargetState.STARTED); return true; } }); member.wakeup(); PowerMock.expectLastCall(); EasyMock.expect(worker.isRunning(CONN1)).andReturn(true); PowerMock.expectLastCall(); EasyMock.expect(worker.connectorTaskConfigs(CONN1, conn1SinkConfig)).andReturn(TASK_CONFIGS); worker.startTask(EasyMock.eq(TASK1), EasyMock.<ClusterConfigState>anyObject(), EasyMock.<Map<String, String>>anyObject(), EasyMock.<Map<String, String>>anyObject(), EasyMock.eq(herder), EasyMock.eq(TargetState.STARTED)); PowerMock.expectLastCall().andReturn(true); member.poll(EasyMock.anyInt()); PowerMock.expectLastCall(); PowerMock.replayAll(); herder.tick(); time.sleep(1000L); assertStatistics(3, 1, 100, 1000L); PowerMock.verifyAll(); }
Source:
<code>private Token forceHole() { Token writeToken = rt.getSequencerView().next(streamId).getToken(); <START> LogData hole = LogData.getHole(writeToken); <END> rt.getAddressSpaceView().write(writeToken, hole, CacheOption.WRITE_AROUND); return writeToken; }</code><technical_language>LogData::useToken instead of LogData.getHole</technical_language>

Target:
private Token forceHole() { Token writeToken = rt.getSequencerView().next(streamId).getToken(); LogData logData = new LogData(DataType.HOLE); logData.useToken(writeToken); rt.getAddressSpaceView().write(writeToken, logData, CacheOption.WRITE_AROUND); return writeToken; }
Source:
<code><START> public static Collection<EvaluatorParameters> applyPlan(final Collection<EvaluatorParameters> activeEvaluators, <END> final Plan plan) { final Map<String, EvaluatorParameters> evaluatorMap = new HashMap<>(); for (final EvaluatorParameters evaluator : activeEvaluators) { assertNull(String.format("Evaluator id %s should be unique", evaluator.getId()), evaluatorMap.put(evaluator.getId(), makeCopy(evaluator))); } for (final String idToAdd : plan.getEvaluatorsToAdd()) { assertNull(String.format("Evaluator id %s should be unique", idToAdd), evaluatorMap.put(idToAdd, getNewEvaluatorParameters(idToAdd))); } for (final TransferStep transferStep : plan.getTransferSteps()) { final EvaluatorParameters src = evaluatorMap.get(transferStep.getSrcId()); final EvaluatorParameters dest = evaluatorMap.get(transferStep.getDstId()); assertNotNull(String.format("Src evaluator %s to transfer data does not exist", transferStep.getSrcId()), src); assertNotNull(String.format("Dest evaluator %s to transfer data does not exist", transferStep.getDstId()), dest); removeData(src, transferStep.getDataInfo()); addData(dest, transferStep.getDataInfo()); } for (final String idToDelete : plan.getEvaluatorsToDelete()) { final EvaluatorParameters evaluator = evaluatorMap.remove(idToDelete); assertNotNull(String.format("No evaluator whose id is %s", idToDelete), evaluator); assertTrue(String.format("Evaluator %s to delete has data", idToDelete), isEmpty(evaluator.getDataInfos())); } return evaluatorMap.values(); }</code><technical_language>I understand checkPlan() is public, is this public too</technical_language>

Target:
private static Collection<EvaluatorParameters> applyPlan(final Collection<EvaluatorParameters> activeEvaluators, final Plan plan) { final Map<String, EvaluatorParameters> evaluatorMap = new HashMap<>(); for (final EvaluatorParameters evaluator : activeEvaluators) { assertNull(String.format("Evaluator id %s should be unique", evaluator.getId()), evaluatorMap.put(evaluator.getId(), makeCopy(evaluator))); } for (final String idToAdd : plan.getEvaluatorsToAdd()) { assertNull(String.format("Evaluator id %s should be unique", idToAdd), evaluatorMap.put(idToAdd, getNewEvaluatorParameters(idToAdd))); } for (final TransferStep transferStep : plan.getTransferSteps()) { final EvaluatorParameters src = evaluatorMap.get(transferStep.getSrcId()); final EvaluatorParameters dest = evaluatorMap.get(transferStep.getDstId()); assertNotNull(String.format("Src evaluator %s to transfer data does not exist", transferStep.getSrcId()), src); assertNotNull(String.format("Dest evaluator %s to transfer data does not exist", transferStep.getDstId()), dest); removeData(src, transferStep.getDataInfo()); addData(dest, transferStep.getDataInfo()); } for (final String idToDelete : plan.getEvaluatorsToDelete()) { final EvaluatorParameters evaluator = evaluatorMap.remove(idToDelete); assertNotNull(String.format("No evaluator whose id is %s", idToDelete), evaluator); assertTrue(String.format("Evaluator %s to delete has data", idToDelete), isEmpty(evaluator.getDataInfos())); } return evaluatorMap.values(); }
Source:
<code>public void setRecipientMappings(Map<String, String> recipientMappings) { Assert.notEmpty(recipientMappings, "recipientMappings must not be empty"); this.recipients.clear(); for(Iterator<Entry<String, String>> it = recipientMappings.entrySet().iterator(); it.hasNext();) { Entry<String, String> next = it.next(); if(StringUtils.hasText(next.getValue())) { this.addRecipient(next.getKey(), next.getValue()); } else { this.addRecipient(next.getKey()); } <START> <END> } }</code><technical_language>debug message for replacement is useful too. AbstractMappingMessageRouter</technical_language>

Target:
public void setRecipientMappings(Map<String, String> recipientMappings) { Assert.notEmpty(recipientMappings, "recipientMappings must not be empty"); ConcurrentLinkedQueue<Recipient> originalRecipients = this.recipients; this.recipients.clear(); for(Iterator<Entry<String, String>> it = recipientMappings.entrySet().iterator(); it.hasNext();) { Entry<String, String> next = it.next(); if(StringUtils.hasText(next.getValue())) { this.addRecipient(next.getKey(), next.getValue()); } else { this.addRecipient(next.getKey()); } } if (logger.isDebugEnabled()) { logger.debug("Channel Recipients:" + originalRecipients + " replaced with:" + this.recipients); } }
Source:
<code>public void wizardShouldFinishSuccessfully() { <START> By installDoneButtonSelector = by.button(".btn-primary.install-done"); <END> waitFor(installDoneButtonSelector); control(installDoneButtonSelector).click(); waitFor(driver, hasContent("Welcome to Jenkins!"), 30); }</code><technical_language>this by.css well</technical_language>

Target:
public void wizardShouldFinishSuccessfully() { By installDoneButtonSelector = by.css(".btn-primary.install-done"); waitFor(installDoneButtonSelector); control(installDoneButtonSelector).click(); waitFor(driver, hasContent("Welcome to Jenkins!"), 30); }
Source:
<code>protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException { validateTrade(sign, 1, 2, player, ess); if(ess.getSettings().isSellSignUpdatedToWorth()) { <START> try { updateFromWorth(sign, ess); } catch (SignException e) { } <END> } validateTrade(sign, 3, ess); return true; }</code><technical_language>No, fine</technical_language>

Target:
protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException { validateTrade(sign, 1, 2, player, ess); if (sign.getLine(3).isEmpty()) { updateFromWorth(sign, player, ess); } else { validateTrade(sign, 3, ess); } return true; }
Source:
<code>public void afterFromProto(Message proto) { super.afterFromProto(proto); switch (action) { <START> case ACCEPT: flowAction = Rule.Accept; break; case DROP: flowAction = Rule.Drop; break; case REDIRECT: flowAction = Rule.Redirect; break; <END> default: throw new IllegalArgumentException("Invalid action"); } }</code><technical_language>accept redirect now. I Drop is needed. Accept is needed for case want pop/push a vlan redirecting</technical_language>

Target:
public void afterFromProto(Message proto) { super.afterFromProto(proto); switch (action) { case ACCEPT: flowAction = Rule.Accept; break; case REDIRECT: flowAction = Rule.Redirect; break; default: throw new IllegalArgumentException("Invalid action"); } }
Source:
<code><START> private int getSystemPropertyLength(String property) { <END> return System.getProperty(property).length(); }</code><technical_language>![MINOR](<LINK_3> "getSystemPropertyLength" a "static" method. [![rule](<LINK_4>](<LINK_1> ![MAJOR](<LINK_0> Private method 'getSystemPropertyLength' is used. [![rule](<LINK_4>](<LINK_2></technical_language>

Target:
private int getSystemPropertyLength(String property) { String value = System.getProperty(property); if (value == null) { throw new NullPointerException(); } return value.length(); }
Source:
<code>public MediaEntryViewHolder(View itemView) { super(itemView); ButterKnife.bind(this, itemView); <START> if (title_scrollview != null && title != null && itemView instanceof TouchInterceptFrameLayout) { <END> } itemView.setOnClickListener(this); itemView.setOnLongClickListener(this); }</code><technical_language>Remove this if needed</technical_language>

Target:
public MediaEntryViewHolder(View itemView) { super(itemView); ButterKnife.bind(this, itemView); itemView.setOnClickListener(this); itemView.setOnLongClickListener(this); }
Source:
<code>private boolean setupNotification() { final Resources res = getResourcesForSubId(mContext, mActiveDataSubId); final SparseArray<Integer> downstreamIcons = getIcons(R.array.tethering_notification_icons, res); final int iconId = downstreamIcons.get(mDownstreamTypesMask, NO_ICON_ID); if (iconId == NO_ICON_ID) return NO_NOTIFY; final String title = res.getString(R.string.tethering_notification_title); final String message = res.getString(R.string.tethering_notification_message); final PendingIntent pi = PendingIntent.getActivity( mContext.createContextAsUser(UserHandle.CURRENT, 0 ), 0 , new Intent(Settings.ACTION_TETHER_SETTINGS), <START> 0 , null ); showNotification(iconId, title, message, ENABLE_NOTIFICATION_ID, pi, new Action[0]); return NOTIFY_DONE; }</code><technical_language>need add FLAG_ACTIVITY_NEW_TASK in <LINK_0>,%20int,%20android.content.Intent,%20int) (also in l.208)</technical_language>

Target:
private boolean setupNotification() { final Resources res = getResourcesForSubId(mContext, mActiveDataSubId); final SparseArray<Integer> downstreamIcons = getIcons(R.array.tethering_notification_icons, res); final int iconId = downstreamIcons.get(mDownstreamTypesMask, NO_ICON_ID); if (iconId == NO_ICON_ID) return NO_NOTIFY; final String title = res.getString(R.string.tethering_notification_title); final String message = res.getString(R.string.tethering_notification_message); if (isEmpty(title) || isEmpty(message)) return NO_NOTIFY; final PendingIntent pi = PendingIntent.getActivity( mContext.createContextAsUser(UserHandle.CURRENT, 0 ), 0 , new Intent(Settings.ACTION_TETHER_SETTINGS), Intent.FLAG_ACTIVITY_NEW_TASK, null ); showNotification(iconId, title, message, ENABLE_NOTIFICATION_ID, pi, new Action[0]); return NOTIFY_DONE; }
Source:
<code>public void topicTurnoverTest() throws StartupException, ConnectorException, InterruptedException, ProducerException { <START> String topic = "forklift-string-topic"; <END> Forklift forklift = serviceManager.newManagedForkliftInstance(); ForkliftProducerI producer = forklift.getConnector().getQueueProducer("forklift-string-topic"); sentMessageIds.add(producer.send("message1")); final Consumer c1 = new Consumer(StringConsumer.class, forklift); c1.setOutOfMessages((listener) -> { listener.shutdown(); }); c1.listen(); Thread.sleep(3000); sentMessageIds.add(producer.send("message2")); final Consumer c2 = new Consumer(StringConsumer.class, forklift); c2.setOutOfMessages((listener) -> { listener.shutdown(); }); c2.listen(); messageAsserts(); }</code><technical_language>declare this "constant"</technical_language>

Target:
public void topicTurnoverTest() throws StartupException, ConnectorException, InterruptedException, ProducerException { Forklift forklift = serviceManager.newManagedForkliftInstance(); ForkliftProducerI producer = forklift.getConnector().getQueueProducer("forklift-string-topic"); sentMessageIds.add(producer.send("message1")); final Consumer c1 = new Consumer(StringConsumer.class, forklift); c1.setOutOfMessages((listener) -> { listener.shutdown(); }); c1.listen(); Thread.sleep(3000); sentMessageIds.add(producer.send("message2")); final Consumer c2 = new Consumer(StringConsumer.class, forklift); c2.setOutOfMessages((listener) -> { listener.shutdown(); }); c2.listen(); messageAsserts(); }
Source:
<code>public synchronized String encrypt(String plainTextValue) { try { byte[] encryptedBytes = aead.encrypt(plainTextValue.getBytes(), ASSOCIATED_DATA); return Base64.getEncoder().encodeToString(encryptedBytes); <START> } catch (GeneralSecurityException | NullPointerException e) { <END> LOGGER.debug("Key and encryption service failed to set up. Failed to encrypt.", e); return plainTextValue; } }</code><technical_language>avoid catching NPEs below</technical_language>

Target:
public synchronized String encrypt(String plainTextValue) { try { return crypter.encrypt(plainTextValue); } catch (CrypterException e) { LOGGER.debug("Failed to encrypt string.", e); return plainTextValue; } }
Source:
<code>public void setUpBase() { MockitoAnnotations.initMocks(this); injectorRule.bind(TransactionManager.class, transactionManager); <START> ThreadPoolUtil.setExecutorService(Executors.newFixedThreadPool(5)); <END> }</code><technical_language>1</technical_language>

Target:
public void setUpBase() { MockitoAnnotations.initMocks(this); injectorRule.bind(TransactionManager.class, transactionManager); ThreadPoolUtil.setExecutorService(Executors.newFixedThreadPool(1)); }
Source:
<code>public AboutItem(String text, List<HyperlinkRange> linkRanges, List<String> links) { this.text = text; <START> this.linkRanges = linkRanges; <END> this.hrefs = links; }</code><technical_language>is safer linkRanges.addAll, class content externally modified</technical_language>

Target:
public AboutItem(String text, List<HyperlinkRange> linkRanges, List<String> links) { this.text = text; this.linkRanges.addAll(linkRanges); this.hrefs = links; }
Source:
<code>private <Y> Type<Y> getMetaModelType(ValueContext typeContext) { switch ( typeContext.getValueClassification() ) { case BASIC: { return new BasicTypeImpl<Y>( typeContext.getBindableType(), Type.PersistenceType.BASIC ); } case ENTITY: { final org.hibernate.type.EntityType type = (EntityType) typeContext.getValue().getType(); return (Type<Y>) context.locateEntityType( type.getAssociatedEntityName() ); } case EMBEDDABLE: { final Component component = (Component) typeContext.getValue(); final EmbeddableTypeImpl<Y> embeddableType = new EmbeddableTypeImpl<Y>( <START> component.getComponentClass(), <END> typeContext.getAttributeMetadata().getOwnerType(), (ComponentType) typeContext.getValue().getType() ); context.registerEmbeddedableType( embeddableType ); final Iterator<Property> subProperties = component.getPropertyIterator(); while ( subProperties.hasNext() ) { final Property property = subProperties.next(); final AttributeImplementor<Y, Object> attribute = buildAttribute( embeddableType, property ); if ( attribute != null ) { embeddableType.getBuilder().addAttribute( attribute ); } } embeddableType.lock(); return embeddableType; } default: { throw new AssertionFailure( "Unknown type : " + typeContext.getValueClassification() ); } } }</code><technical_language>dynamic map components of componentClassName is null component.getComponentClass() throws Exception. I code changed Class javaType; if ( component.getComponentClassName() == null ) { javaType = typeContext.getBindableType(); } else { javaType = component.getComponentClass(); } final EmbeddableTypeImpl<Y> embeddableType = new EmbeddableTypeImpl<Y>( javaType, typeContext.getAttributeMetadata().getOwnerType(), (ComponentType) typeContext.getValue().getType() );</technical_language>

Target:
private <Y> Type<Y> getMetaModelType(ValueContext typeContext) { switch ( typeContext.getValueClassification() ) { case BASIC: { return new BasicTypeImpl<Y>( typeContext.getBindableType(), Type.PersistenceType.BASIC ); } case ENTITY: { final org.hibernate.type.EntityType type = (EntityType) typeContext.getValue().getType(); return (Type<Y>) context.locateEntityType( type.getAssociatedEntityName() ); } case EMBEDDABLE: { final Component component = (Component) typeContext.getValue(); Class javaType; if ( component.getComponentClassName() == null ) { javaType = typeContext.getBindableType(); } else { javaType = component.getComponentClass(); } final EmbeddableTypeImpl<Y> embeddableType = new EmbeddableTypeImpl<Y>( javaType, typeContext.getAttributeMetadata().getOwnerType(), (ComponentType) typeContext.getValue().getType() ); context.registerEmbeddedableType( embeddableType ); final Iterator<Property> subProperties = component.getPropertyIterator(); while ( subProperties.hasNext() ) { final Property property = subProperties.next(); final AttributeImplementor<Y, Object> attribute = buildAttribute( embeddableType, property ); if ( attribute != null ) { embeddableType.getBuilder().addAttribute( attribute ); } } embeddableType.lock(); return embeddableType; } default: { throw new AssertionFailure( "Unknown type : " + typeContext.getValueClassification() ); } } }
Source:
<code>private boolean isClusterLevelChange() { Version newVersion = getParameters().getClusterLevelChangeToVersion(); return newVersion != null && getVm().isRunningOrPaused() && <START> (getVm().getCustomCompatibilityVersion() == null || !newVersion.equals(getVm().getCompatibilityVersion())); <END> }</code><technical_language>part (getVm().getCustomCompatibilityVersion() == null && !newVersion.equals(getVm().getCompatibilityVersion()))</technical_language>

Target:
private boolean isClusterLevelChange() { Version newVersion = getParameters().getClusterLevelChangeToVersion(); return newVersion != null && getVm().isRunningOrPaused() && (getVm().getCustomCompatibilityVersion() == null || !newVersion.equals(getVm().getCustomCompatibilityVersion())); }
Source:
<code>public static int count(OgmEntityPersister persister, TransactionalRemoteCacheImpl cache, ProtoStreamMappingAdapter mapper, Session currentSession) { if ( cache.getTransactionManager() == null ) { return cache.size(); } final Set<Object> committedKeys = new HashSet<>(); cache.keySet().forEach( committedKey -> { Boolean stillPresentInLocalTransaction = mapper.withinCacheEncodingContext( c -> c.containsKey( committedKey ) ); if ( stillPresentInLocalTransaction ) { committedKeys.add( committedKey ); } } ); <START> Integer counter = new Integer( committedKeys.size() ); <END> OgmSessionImpl ogmSession = (OgmSessionImpl) currentSession; PersistenceContext persistenceContext = ogmSession.getPersistenceContext(); for ( Object key : persistenceContext.getEntitiesByKey().keySet() ) { EntityKey entityKey = (EntityKey) key; if ( !( persister.getEntityName().equals( entityKey.getEntityName() ) ) ) { continue; } ProtostreamId entryKey = convertEntityKey( entityKey, ogmSession, mapper ); if ( !committedKeys.contains( entryKey ) ) { counter++; } } return counter; }</code><technical_language>Do need a new Integer? If case Integer.valueOf is</technical_language>

Target:
public static int count(OgmEntityPersister persister, TransactionalRemoteCacheImpl cache, ProtoStreamMappingAdapter mapper, Session currentSession) { if ( cache.getTransactionManager() == null ) { return cache.size(); } final Set<Object> committedKeys = new HashSet<>(); cache.keySet().forEach( committedKey -> { Boolean stillPresentInLocalTransaction = mapper.withinCacheEncodingContext( c -> c.containsKey( committedKey ) ); if ( stillPresentInLocalTransaction ) { committedKeys.add( committedKey ); } } ); int counter = committedKeys.size(); OgmSessionImpl ogmSession = (OgmSessionImpl) currentSession; PersistenceContext persistenceContext = ogmSession.getPersistenceContext(); for ( Object key : persistenceContext.getEntitiesByKey().keySet() ) { EntityKey entityKey = (EntityKey) key; if ( !( persister.getEntityName().equals( entityKey.getEntityName() ) ) ) { continue; } ProtostreamId entryKey = convertEntityKey( entityKey, ogmSession, mapper ); if ( !committedKeys.contains( entryKey ) ) { counter++; } } return counter; }