auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private KeyScanCursor<String> clusterScan(KeyScanCursor<String> cursor, ScanArgs scanArgs) { RedisAdvancedClusterCommands<String, String> commands = (RedisAdvancedClusterCommands<String, String>) connection; List<String> nodeIds; String currentNodeId; if ( cursor == null ) { Set<RedisClusterNode> masterNodes = commands.masters().asMap().keySet(); nodeIds = new ArrayList<>(); for ( RedisClusterNode masterNode : masterNodes ) { nodeIds.add( masterNode.getNodeId() ); } if ( nodeIds.isEmpty() ) { return scan( connection, cursor, scanArgs ); } currentNodeId = nodeIds.get( 0 ); } else { if ( !( cursor instanceof ClusterwideKeyScanCursor ) ) { <START> throw new IllegalArgumentException( <END> "A scan in Redis Cluster mode requires to reuse the resulting cursor from the previous scan invocation" ); } ClusterwideKeyScanCursor<String> clusterKeyScanCursor = (ClusterwideKeyScanCursor<String>) cursor; nodeIds = clusterKeyScanCursor.nodeIds; currentNodeId = getNodeIdForNextScanIteration( nodeIds, clusterKeyScanCursor ); } RedisClusterCommands<String, String> nodeConnection = commands.getConnection( currentNodeId ); KeyScanCursor<String> nodeKeyScanCursor = scan( nodeConnection, cursor, scanArgs ); return new ClusterwideKeyScanCursor( nodeIds, currentNodeId, nodeKeyScanCursor ); }</code><technical_language>happen? LOG facade for raising exception</technical_language>

Target:
private KeyScanCursor<String> clusterScan(KeyScanCursor<String> cursor, ScanArgs scanArgs) { RedisAdvancedClusterCommands<String, String> commands = (RedisAdvancedClusterCommands<String, String>) connection; List<String> nodeIds; String currentNodeId; if ( cursor == null ) { Set<RedisClusterNode> masterNodes = commands.masters().asMap().keySet(); nodeIds = new ArrayList<>(); for ( RedisClusterNode masterNode : masterNodes ) { if ( masterNode.getSlots().isEmpty() ) { continue; } nodeIds.add( masterNode.getNodeId() ); } if ( nodeIds.isEmpty() ) { return scan( connection, cursor, scanArgs ); } currentNodeId = nodeIds.get( 0 ); } else { ClusterwideKeyScanCursor<String> clusterKeyScanCursor = (ClusterwideKeyScanCursor<String>) cursor; nodeIds = clusterKeyScanCursor.nodeIds; currentNodeId = getNodeIdForNextScanIteration( nodeIds, clusterKeyScanCursor ); } RedisClusterCommands<String, String> nodeConnection = commands.getConnection( currentNodeId ); KeyScanCursor<String> nodeKeyScanCursor = scan( nodeConnection, cursor, scanArgs ); return new ClusterwideKeyScanCursor( nodeIds, currentNodeId, nodeKeyScanCursor ); }
Source:
<code>protected void internalUpdateItem(String slaveName, InputRegister[] registers, String itemName) { for (ModbusBindingProvider provider : providers) { if (!provider.providesBindingFor(itemName)) { continue; } ModbusBindingConfig config = provider.getConfig(itemName); if (!config.slaveName.equals(slaveName)) { continue; } ModbusSlave slave = modbusSlaves.get(slaveName); String slaveValueType = slave.getValueType(); double rawDataMultiplier = slave.getRawDataMultiplier(); State newState = extractStateFromRegisters(registers, config.readIndex, slaveValueType); State newStateBoolean = provider.getConfig(itemName) .translateBoolean2State(!newState.equals(DecimalType.ZERO)); if (!UnDefType.UNDEF.equals(newStateBoolean)) { newState = newStateBoolean; <START> } else if ((rawDataMultiplier != 1) && (config.getState() instanceof DecimalType)) { <END> double tmpValue = ((DecimalType) newState).doubleValue() * rawDataMultiplier; newState = new DecimalType(String.valueOf(tmpValue)); } if (slave.isUpdateUnchangedItems() || !newState.equals(config.getState())) { eventPublisher.postUpdate(itemName, newState); config.setState(newState); } } }</code><technical_language>Is chance config.getState() return null instance of UnDefType, causing this if block skipped, newState set? least, is chance of behavior item checked this PR? OK; wanting confirm</technical_language>

Target:
protected void internalUpdateItem(String slaveName, InputRegister[] registers, String itemName) { for (ModbusBindingProvider provider : providers) { if (!provider.providesBindingFor(itemName)) { continue; } ModbusBindingConfig config = provider.getConfig(itemName); if (!config.slaveName.equals(slaveName)) { continue; } ModbusSlave slave = modbusSlaves.get(slaveName); String slaveValueType = slave.getValueType(); double rawDataMultiplier = slave.getRawDataMultiplier(); State newState = extractStateFromRegisters(registers, config.readIndex, slaveValueType); State newStateBoolean = provider.getConfig(itemName) .translateBoolean2State(!newState.equals(DecimalType.ZERO)); if (!UnDefType.UNDEF.equals(newStateBoolean)) { newState = newStateBoolean; } else if ((rawDataMultiplier != 1) && (config.getItemClass().isAssignableFrom(NumberItem.class))) { double tmpValue = ((DecimalType) newState).doubleValue() * rawDataMultiplier; newState = new DecimalType(String.valueOf(tmpValue)); } if (slave.isUpdateUnchangedItems() || !newState.equals(config.getState())) { eventPublisher.postUpdate(itemName, newState); config.setState(newState); } } }
Source:
<code>public License getLicense(ObjectNode node, String location, ParseResult result) { if (node == null) return null; License license = new License(); String value = getString("name", node, true, location, result); <START> license.setName(value); <END> value = getString("url", node, false, location, result); license.setUrl(value); license.setExtensions(new LinkedHashMap<>()); Set<String> keys = getKeys(node); for(String key : keys) { if(key.startsWith("x-")) { license.getExtensions().put(key, Json.mapper().convertValue(node.get(key), Object.class)); } else if (!LICENSE_KEYS.contains(key)) { result.extra(location + ".license", key, node.get(key)); } } return license; }</code><technical_language>do a StringUtils.isNotBlank(...) check setting</technical_language>

Target:
public License getLicense(ObjectNode node, String location, ParseResult result) { if (node == null) return null; License license = new License(); String value = getString("name", node, true, location, result); if(StringUtils.isNotBlank(value)) { license.setName(value); } value = getString("url", node, false, location, result); if(StringUtils.isNotBlank(value)) { license.setUrl(value); } Map <String,Object> extensions = getExtensions(node,location,result); if(extensions != null && extensions.size() > 0) { license.setExtensions(extensions); } return license; }
Source:
<code>public SubscribeSpec(String name) { refName = name; <START> isWildcard = name.endsWith("/*"); <END> }</code><technical_language>utility method</technical_language>

Target:
public SubscribeSpec(String name) { refName = name; isWildcard = RefSpec.isWildcard(name); }
Source:
<code>private static HiveConf createHiveConf(@Nullable String hiveConfDir, @Nullable String hadoopConfDir) { LOG.info("Setting hive conf dir as {}", hiveConfDir); try { HiveConf.setHiveSiteLocation( hiveConfDir == null ? null : Paths.get(hiveConfDir, "hive-site.xml").toUri().toURL()); } catch (MalformedURLException e) { throw new CatalogException( String.format("Failed to get hive-site.xml from %s", hiveConfDir), e); } Configuration hadoopConf = HadoopUtils.getHadoopConfiguration(new org.apache.flink.configuration.Configuration()); <START> for (String possibleHadoopConfPath : HadoopUtils.possibleHadoopConfPaths(new org.apache.flink.configuration.Configuration(), hadoopConfDir)) { <END> File mapredSite = new File(new File(possibleHadoopConfPath), "mapred-site.xml"); if (mapredSite.exists()) { hadoopConf.addResource(new Path(mapredSite.getAbsolutePath())); break; } } return new HiveConf(hadoopConf, HiveConf.class); }</code><technical_language>modify HadoopUtils. Instead, if hadoopConfDir is null, set ConfigConstants.PATH_HADOOP_CONFIG in Configuration instance</technical_language>

Target:
private static HiveConf createHiveConf(@Nullable String hiveConfDir, @Nullable String hadoopConfDir) { LOG.info("Setting hive conf dir as {}", hiveConfDir); try { HiveConf.setHiveSiteLocation( hiveConfDir == null ? null : Paths.get(hiveConfDir, "hive-site.xml").toUri().toURL()); } catch (MalformedURLException e) { throw new CatalogException( String.format("Failed to get hive-site.xml from %s", hiveConfDir), e); } Configuration hadoopConf = null; if (isNullOrWhitespaceOnly(hadoopConfDir)) { for (String possibleHadoopConfPath : HadoopUtils.possibleHadoopConfPaths(new org.apache.flink.configuration.Configuration())) { hadoopConf = getHadoopConfiguration(possibleHadoopConfPath); if (hadoopConf != null) { break; } } } else { hadoopConf = getHadoopConfiguration(hadoopConfDir); } return new HiveConf(hadoopConf == null ? new Configuration() : hadoopConf, HiveConf.class); }
Source:
<code><START> public Short getPublishedOwnerLevel() { <END> return publishedOwnerLevel; }</code><technical_language>I event data owner level information</technical_language>

Target:
Short getPublishedOwnerLevel() { return publishedOwnerLevel; }
Source:
<code>private Set<IProject> collectProjects(List<?> elements) { Set<IProject> projects = Sets.newLinkedHashSet(); AdapterFunction<IProject> adapterFunction = AdapterFunction.forType(IProject.class); for (Object element : elements) { IProject project = adapterFunction.apply(element); if (project != null && !GradleProjectNature.isPresentOn(project) && project.getLocation() != null) { <START> IPath location = project.getLocation(); <END> if (location != null) { buildConfigs.add(CorePlugin.configurationManager().createBuildConfiguration(location.toFile(), false, GradleDistribution.fromBuild(), null, false, false)); } } } return projects; }</code><technical_language>Something's wrong this diff, this compile. Also, location null check above</technical_language>

Target:
private Set<IProject> collectProjects(List<?> elements) { Set<IProject> projects = Sets.newLinkedHashSet(); AdapterFunction<IProject> adapterFunction = AdapterFunction.forType(IProject.class); for (Object element : elements) { IProject project = adapterFunction.apply(element); if (project != null && !GradleProjectNature.isPresentOn(project) && project.getLocation() != null) { projects.add(project); } } return projects; }
Source:
<code>public TcpConnectionSupport getConnection() throws Exception { this.checkActive(); if (this.isSingleUse()) { return obtainConnection(); } else { synchronized(this) { TcpConnectionSupport connection = obtainConnection(); return connection; } <START> } <END> }</code><technical_language>So, this method a bit odd: invokes obtainConnection() independently of this.isSingleUse(). I guess synchronized(this) sense in case of !this.isSingleUse(), move synchronized(this) concreate implementation of AbstractClientConnectionFactory#obtainConnection() ? other side ReadWriteLock theConnection. opinion push polishing</technical_language>

Target:
public TcpConnectionSupport getConnection() throws Exception { this.checkActive(); return this.obtainConnection(); }
Source:
<code>private long indexSize(Cache<?, ?> cache) { SearchManager searchManager = Search.getSearchManager(cache); searchManager.refresh(Object.class); return searchManager.search(Object.class) .where(f -> f.matchAll()) <START> .fetchTotalHitCount(); <END> }</code><technical_language>Ickle queries tests</technical_language>

Target:
private long indexSize(Cache<?, ?> cache) { QueryFactory queryFactory = Search.getQueryFactory(cache); Query<?> query = queryFactory.create("FROM " + Person.class.getName()); return query.execute().hitCount().orElse(-1); }
Source:
<code>public void close() { flushBuffer(); if (executor != null) { executor.shutdown(); try { boolean e = executor.awaitTermination(closeTimeout, TimeUnit.SECONDS); if (e == false) { LOGGER.debug("Executor service shut down after time out"); <START> } <END> } catch (InterruptedException e) { } executor = null; } }</code><technical_language>if e is false, means executor shutdown. If want some inspiration a <LINK_0></technical_language>

Target:
public void close() { flushBuffer(); if (executor != null) { executor.shutdown(); try { if (!executor.awaitTermination(closeTimeout, TimeUnit.SECONDS)) { executor.shutdownNow(); if (!executor.awaitTermination(closeTimeout, TimeUnit.SECONDS)) LOGGER.warn("Executor did not terminate"); } } catch (InterruptedException ie) { executor.shutdownNow(); Thread.currentThread().interrupt(); } } }
Source:
<code>protected static SqlParts selectStatementForAndClause(List<Object> clause, String indexName) { if (clause == null || clause.isEmpty()) { return null; } if (indexName == null || indexName.isEmpty()) { return null; } SqlParts where = whereSqlForAndClause(clause, indexName); if (where == null) { return null; } String tableName = IndexManager.tableNameForIndex(indexName); <START> String sql = String.format("SELECT _id FROM \"%s\" WHERE %s", <END> tableName, where.sqlWithPlaceHolders); return SqlParts.partsForSql(sql, where.placeHolderValues); }</code><technical_language>This a specific Locale</technical_language>

Target:
protected static SqlParts selectStatementForAndClause(List<Object> clause, String indexName) { if (clause == null || clause.isEmpty()) { return null; } if (indexName == null || indexName.isEmpty()) { return null; } SqlParts where = whereSqlForAndClause(clause, indexName); if (where == null) { return null; } String tableName = IndexManager.tableNameForIndex(indexName); String sql = String.format(Locale.ENGLISH, "SELECT _id FROM \"%s\" WHERE %s", tableName, where.sqlWithPlaceHolders); return SqlParts.partsForSql(sql, where.placeHolderValues); }
Source:
<code>public void close() { for (List<Interpreter> session : sessions.values()) { for (Interpreter interpreter : session) { try { interpreter.close(); } catch (InterpreterException e) { <START> LOGGER.warn("Fail to close interpreter: " + interpreter.getClassName()); <END> } } } sessions.clear(); }</code><technical_language>exception stack useful? LOGGER.warn( .... , e);</technical_language>

Target:
public void close() { for (List<Interpreter> session : sessions.values()) { for (Interpreter interpreter : session) { try { interpreter.close(); } catch (InterpreterException e) { LOGGER.warn("Fail to close interpreter: " + interpreter.getClassName(), e); } } } sessions.clear(); }
Source:
<code>public void getSystemProperties() throws Exception { Map<String, String> entries = resolve(managementCenterService.getSystemProperties(members[0])); assertTrue(entries.containsKey("user.dir")); assertNotNull(entries.get("user.dir")); <START> assertFalse(entries.get("user.dir").isEmpty()); <END> }</code><technical_language>nit: I write assertions in a single statement: assertThat(entries.get("user.dir"), not(isEmptyOrNullString())); (static imports org.hamcrest.Matchers)</technical_language>

Target:
public void getSystemProperties() throws Exception { Map<String, String> entries = resolve(managementCenterService.getSystemProperties(members[0])); assertThat(entries.get("user.dir"), not(isEmptyOrNullString())); }
Source:
<code>private List<Long> listStalledVMInTransitionStateOnUpHost(final long hostId, final Date cutTime) { final String sql = "SELECT i.* FROM vm_instance as i, host as h WHERE h.status = 'UP' " + "AND h.id = ? AND i.power_state_update_time < ? AND i.host_id = h.id " + "AND (i.state ='Starting' OR i.state='Stopping' OR i.state='Migrating') " + "AND i.id NOT IN (SELECT w.vm_instance_id FROM vm_work_job AS w JOIN async_job AS j ON w.id = j.id WHERE j.job_status = ?)" + "AND i.removed IS NULL"; final List<Long> l = new ArrayList<Long>(); <START> try (TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB)) { try (PreparedStatement pstmt = txn.prepareAutoCloseStatement(sql)) { <END> pstmt.setLong(1, hostId); pstmt.setString(2, DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), cutTime)); pstmt.setInt(3, JobInfo.Status.IN_PROGRESS.ordinal()); final ResultSet rs = pstmt.executeQuery(); while (rs.next()) { l.add(rs.getLong(1)); } } catch (final SQLException e) { } catch (final Throwable e) { } } return l; }</code><technical_language>afaict combined in try clause</technical_language>

Target:
private List<Long> listStalledVMInTransitionStateOnUpHost(final long hostId, final Date cutTime) { final String sql = "SELECT i.* FROM vm_instance as i, host as h WHERE h.status = 'UP' " + "AND h.id = ? AND i.power_state_update_time < ? AND i.host_id = h.id " + "AND (i.state ='Starting' OR i.state='Stopping' OR i.state='Migrating') " + "AND i.id NOT IN (SELECT w.vm_instance_id FROM vm_work_job AS w JOIN async_job AS j ON w.id = j.id WHERE j.job_status = ?)" + "AND i.removed IS NULL"; final List<Long> l = new ArrayList<Long>(); TransactionLegacy txn = null; try { txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB); PreparedStatement pstmt = null; try { pstmt = txn.prepareAutoCloseStatement(sql); pstmt.setLong(1, hostId); pstmt.setString(2, DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), cutTime)); pstmt.setInt(3, JobInfo.Status.IN_PROGRESS.ordinal()); final ResultSet rs = pstmt.executeQuery(); while (rs.next()) { l.add(rs.getLong(1)); } } catch (final SQLException e) { } catch (final Throwable e) { } } finally { if (txn != null) { txn.close(); } } return l; }
Source:
<code>private void UpdateOptionsNonLocalFS() { if (hosts == null || allHosts == null) { return; } try { UICommand addHostAction = new UICommand("AddHost", this); if (hosts.size() > 1) { hosts.remove(0); } if (hosts.isEmpty()) { addHostAction.setTitle(ClusterConfigureHostsAction); getCompulsoryActions().add(addHostAction); } else { addHostAction.setTitle(ClusterAddAnotherHostAction); getOptionalActions().add(addHostAction); } if (getEntity().getStoragePoolId() == null) { addHostAction.getExecuteProhibitionReasons().add(ConstantsManager.getInstance() .getConstants() .theClusterIsntAttachedToADcClusterGuide()); addHostAction.setIsExecutionAllowed(false); return; } ArrayList<VDS> availableHosts = new ArrayList<VDS>(); for (VDS vds : allHosts) { if (!getEntity().getId().equals(vds.getVdsGroupId()) && (vds.getStatus() == VDSStatus.Maintenance || vds.getStatus() == VDSStatus.PendingApproval) && vds.getSupportedClusterVersionsSet().contains(getEntity().getcompatibility_version())) { availableHosts.add(vds); } } UICommand selectHostAction = new UICommand("SelectHost", this); if (availableHosts.size() > 0) { if (hosts.isEmpty()) { selectHostAction.setTitle(SelectHostsAction); getCompulsoryActions().add(selectHostAction); } else { selectHostAction.setTitle(SelectHostsAction); getOptionalActions().add(selectHostAction); } } <START> } finally { <END> StopProgress(); } }</code><technical_language>exception avoiding</technical_language>

Target:
private void UpdateOptionsNonLocalFS() { if (hosts == null || allHosts == null) { return; } if (getEntity() == null) { StopProgress(); return; } UICommand addHostAction = new UICommand("AddHost", this); if (hosts.size() > 1) { hosts.remove(0); } if (hosts.isEmpty()) { addHostAction.setTitle(ClusterConfigureHostsAction); getCompulsoryActions().add(addHostAction); } else { addHostAction.setTitle(ClusterAddAnotherHostAction); getOptionalActions().add(addHostAction); } if (getEntity().getStoragePoolId() == null) { addHostAction.getExecuteProhibitionReasons().add(ConstantsManager.getInstance() .getConstants() .theClusterIsntAttachedToADcClusterGuide()); addHostAction.setIsExecutionAllowed(false); return; } ArrayList<VDS> availableHosts = new ArrayList<VDS>(); for (VDS vds : allHosts) { if (!getEntity().getId().equals(vds.getVdsGroupId()) && (vds.getStatus() == VDSStatus.Maintenance || vds.getStatus() == VDSStatus.PendingApproval) && vds.getSupportedClusterVersionsSet().contains(getEntity().getcompatibility_version())) { availableHosts.add(vds); } } UICommand selectHostAction = new UICommand("SelectHost", this); if (availableHosts.size() > 0) { if (hosts.isEmpty()) { selectHostAction.setTitle(SelectHostsAction); getCompulsoryActions().add(selectHostAction); } else { selectHostAction.setTitle(SelectHostsAction); getOptionalActions().add(selectHostAction); } } StopProgress(); }
Source:
<code>public IStringExpression toStringExpression(@NonNull final String joinOnColumnNameFQ) { return sql.resolvePartial(Evaluatees .mapBuilder() <START> .put(SQL_PARAM_FilterSql, joinOnColumnNameFQ) <END> .put(SQL_PARAM_KeyId, joinOnColumnNameFQ) .put(SQL_PARAM_ShowInactive, SQL_PARAM_VALUE_ShowInactive_Yes) .build()); }</code><technical_language>pls revert this file. discussed</technical_language>

Target:
public IStringExpression toStringExpression(@NonNull final String joinOnColumnNameFQ) { return sql.resolvePartial(Evaluatees .mapBuilder() .put(SQL_PARAM_KeyId, joinOnColumnNameFQ) .put(SQL_PARAM_ShowInactive, SQL_PARAM_VALUE_ShowInactive_Yes) .build()); }
Source:
<code>public void testCompleteData() { intervals = new ArrayList<>(); intervals.add(INTERVAL_JAN_1_4); rows = new ArrayList<Row>(); rows.add(JAN_1_M_10); rows.add(JAN_2_M_10); rows.add(JAN_3_M_10); rows.add(JAN_4_M_10); <START> List<Row> expected_day1 = Collections.singletonList(JAN_1_M_10); <END> List<Row> expected_day2 = Collections.singletonList(JAN_2_M_10); List<Row> expected_day3 = Collections.singletonList(JAN_3_M_10); List<Row> expected_day4 = Collections.singletonList(JAN_4_M_10); Sequence<Row> seq = Sequences.simple(rows); RowBucketIterable rbi = new RowBucketIterable(seq, intervals, ONE_DAY); Iterator<RowBucket> iter = rbi.iterator(); RowBucket actual = iter.next(); assertEquals(JAN_1, actual.getDateTime()); assertEquals(expected_day1, actual.getRows()); actual = iter.next(); assertEquals(JAN_2, actual.getDateTime()); assertEquals(expected_day2, actual.getRows()); actual = iter.next(); assertEquals(JAN_3, actual.getDateTime()); assertEquals(expected_day3, actual.getRows()); actual = iter.next(); assertEquals(JAN_4, actual.getDateTime()); assertEquals(expected_day4, actual.getRows()); }</code><technical_language>This is a Java convention. Please camel case instead</technical_language>

Target:
public void testCompleteData() { intervals = new ArrayList<>(); intervals.add(INTERVAL_JAN_1_4); rows = new ArrayList<>(); rows.add(JAN_1_M_10); rows.add(JAN_2_M_10); rows.add(JAN_3_M_10); rows.add(JAN_4_M_10); List<Row> expectedDay1 = Collections.singletonList(JAN_1_M_10); List<Row> expectedDay2 = Collections.singletonList(JAN_2_M_10); List<Row> expectedDay3 = Collections.singletonList(JAN_3_M_10); List<Row> expectedDay4 = Collections.singletonList(JAN_4_M_10); Sequence<Row> seq = Sequences.simple(rows); RowBucketIterable rbi = new RowBucketIterable(seq, intervals, ONE_DAY); Iterator<RowBucket> iter = rbi.iterator(); RowBucket actual = iter.next(); assertEquals(JAN_1, actual.getDateTime()); assertEquals(expectedDay1, actual.getRows()); actual = iter.next(); assertEquals(JAN_2, actual.getDateTime()); assertEquals(expectedDay2, actual.getRows()); actual = iter.next(); assertEquals(JAN_3, actual.getDateTime()); assertEquals(expectedDay3, actual.getRows()); actual = iter.next(); assertEquals(JAN_4, actual.getDateTime()); assertEquals(expectedDay4, actual.getRows()); }
Source:
<code>public void preFinishValidateOnFinish() { TaskRepository repository = createTaskRepository(); TestRepositorySettingsPage page = new TestRepositorySettingsPage(repository, true, Status.OK_STATUS); <START> assertTrue(page.ranValidator()); <END> assertTrue(page.preFinish(repository)); page = new TestRepositorySettingsPage(repository, true, Status.CANCEL_STATUS); assertTrue(page.ranValidator()); assertFalse(page.preFinish(repository)); }</code><technical_language>validation run construction</technical_language>

Target:
public void preFinishValidateOnFinish() { TaskRepository repository = createTaskRepository(); TestRepositorySettingsPage page = createPage(repository, true, Status.OK_STATUS); assertTrue(page.preFinish(repository)); assertTrue(page.ranValidator()); page = createPage(repository, true, Status.CANCEL_STATUS); assertFalse(page.preFinish(repository)); assertTrue(page.ranValidator()); }
Source:
<code>public AuthenticationResult getTokenForCode(String code) throws IOException, AuthenticationException { <START> String requestMessage; <END> if (mWebRequestHandler == null) { throw new IllegalArgumentException("webRequestHandler"); } try { requestMessage = buildTokenRequestMessage(code); } catch (UnsupportedEncodingException encoding) { Logger.e(TAG, encoding.getMessage(), "", ADALError.ENCODING_IS_NOT_SUPPORTED, encoding); return null; } HashMap<String, String> headers = getRequestHeaders(); return postMessage(requestMessage, headers); }</code><technical_language>final</technical_language>

Target:
public AuthenticationResult getTokenForCode(String code) throws IOException, AuthenticationException { final String requestMessage; if (mWebRequestHandler == null) { throw new IllegalArgumentException("webRequestHandler"); } try { requestMessage = buildTokenRequestMessage(code); } catch (UnsupportedEncodingException encoding) { Logger.e(TAG, encoding.getMessage(), "", ADALError.ENCODING_IS_NOT_SUPPORTED, encoding); return null; } final Map<String, String> headers = getRequestHeaders(); return postMessage(requestMessage, headers); }
Source:
<code>void removePostInfoFromForegroundNotification(@NonNull PostModel post, @Nullable List<MediaModel> media) { <START> sNotificationData.totalPostItems--; <END> if (post.isPage()) { sNotificationData.totalPageItemsIncludedInPostCount--; } if (media != null) { removeMediaInfoFromForegroundNotification(media); } startOrUpdateForegroundNotification(post); }</code><technical_language>call removePostInfoFromForegroundNotificationData here? code... line is missing startOrUpdateForegroundNotification(post);. Also, related this PR, do remove method void prepareForegroundNotificationForRetry(@NonNull PostModel post, @Nullable List<MediaModel> media) { removePostInfoFromForegroundNotificationData(post, media); } if is necessary rename removePostInfoFromForegroundNotificationData ? a method nothing, call another method signature</technical_language>

Target:
void removePostInfoFromForegroundNotification(@NonNull PostModel post, @Nullable List<MediaModel> media) { removePostInfoFromForegroundNotificationData(post, media); startOrUpdateForegroundNotification(post); }
Source:
<code>static FacetOption ofTermStats(final TermStats termStats, final List<String> selectedValues) { <START> return FacetOption.of(termStats.getTerm(), termStats.getProductCount(), selectedValues.contains(termStats.getTerm())); <END> }</code><technical_language>is, product a NPE</technical_language>

Target:
static FacetOption ofTermStats(final TermStats termStats, final List<String> selectedValues) { return FacetOption.of(termStats.getTerm(), firstNonNull(termStats.getProductCount(), 0L), selectedValues.contains(termStats.getTerm())); }
Source:
<code>public synchronized void close() { if (released) { if (logger.isDebugEnabled()){ logger.debug("Session " + targetSession + " already released."); } } else { if (logger.isDebugEnabled()){ logger.debug("Releasing Session " + targetSession + " back to the pool."); } if (this.epoch < CachingSessionFactory.this.sharedSessionEpoch) { if (logger.isDebugEnabled()){ logger.debug("Closing session " + targetSession + " after reset."); } <START> this.targetSession.close(); <END> } pool.releaseItem(targetSession); released = true; } }</code><technical_language>epoch reset logic pushed pool generic solution.</technical_language>

Target:
public synchronized void close() { if (released) { if (logger.isDebugEnabled()){ logger.debug("Session " + targetSession + " already released."); } } else { if (logger.isDebugEnabled()){ logger.debug("Releasing Session " + targetSession + " back to the pool."); } if (this.sharedSessionEpoch != CachingSessionFactory.this.sharedSessionEpoch) { if (logger.isDebugEnabled()){ logger.debug("Closing session " + targetSession + " after reset."); } this.targetSession.close(); } pool.releaseItem(targetSession); released = true; } }
Source:
<code>static void startGetLocation() { OneSignal.Log(OneSignal.LOG_LEVEL.DEBUG, "LocationController startGetLocation with lastLocation: " + lastLocation); if (locationHandlerThread == null) locationHandlerThread = new LocationHandlerThread(); try { <START> if (isGooglePlayServicesAvailable(classContext)) { <END> initGoogleLocation(); } else if (isHMSAvailable(classContext)) { initHuaweiLocation(); } else { fireFailedComplete(); } } catch (Throwable t) { OneSignal.Log(OneSignal.LOG_LEVEL.WARN, "Location permission exists but there was an error initializing: ", t); fireFailedComplete(); } }</code><technical_language>want change this logic getDeviceType PR #1026 is merged in</technical_language>

Target:
static void startGetLocation() { OneSignal.Log(OneSignal.LOG_LEVEL.DEBUG, "LocationController startGetLocation with lastLocation: " + lastLocation); if (locationHandlerThread == null) locationHandlerThread = new LocationHandlerThread(); try { if (isGooglePlayServicesAvailable()) { initGoogleLocation(); } else if (isHMSAvailable()) { initHuaweiLocation(); } else { fireFailedComplete(); } } catch (Throwable t) { OneSignal.Log(OneSignal.LOG_LEVEL.WARN, "Location permission exists but there was an error initializing: ", t); fireFailedComplete(); } }
Source:
<code><START> public static String mysqlPasswordHash(String string) throws UnsupportedEncodingException{ <END> try { MessageDigest digest = MessageDigest.getInstance(HashAlgorithms.SHA1); digest.update(string.getBytes(StandardCharsets.UTF_8)); byte[] encodedPassword = digest.digest(); digest.update(encodedPassword); encodedPassword = digest.digest(); String hash = new BigInteger(1, encodedPassword).toString(16).toUpperCase(); while(hash.length() < 40){ hash = "0" + hash; } return "*" + hash; } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); } }</code><technical_language>@CathrineTeng, is throws UnsupportedEncodingException needed</technical_language>

Target:
public static String mysqlPasswordHash(String string) { try { MessageDigest digest = MessageDigest.getInstance(HashAlgorithms.SHA1); digest.update(string.getBytes(StandardCharsets.UTF_8)); byte[] encodedPassword = digest.digest(); digest.update(encodedPassword); encodedPassword = digest.digest(); String hash = new BigInteger(1, encodedPassword).toString(16).toUpperCase(); while(hash.length() < 40){ hash = "0" + hash; } return "*" + hash; } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); } }
Source:
<code>public CommandBuilder<T> withListeners(List<? extends ExecutionListener<?, T>> listeners) { <START> this.listeners = listeners; <END> return this; }</code><technical_language>withListeners called multiple times? want accumulate listeners instead of replacing previous ones</technical_language>

Target:
public CommandBuilder<T> withListeners(List<? extends ExecutionListener<?, T>> listeners) { if (this.listeners == null) { this.listeners = new LinkedList<ExecutionListener<?, T>>(listeners); } else { this.listeners.addAll((Collection) listeners); } return this; }
Source:
<code>public void getReleaseAsset() throws Exception { final ReleaseAssets assets = new RtReleaseAssets( new FakeRequest().withStatus(HttpURLConnection.HTTP_OK) .withBody("{\"id\":1}"), release() ); MatcherAssert.assertThat( <START> assets.get(1).number(), <END> Matchers.is(1) ); }</code><technical_language>Please, Tv.ONE instead of hardcoding one. (Yegor likes this)</technical_language>

Target:
public void getReleaseAsset() throws Exception { final ReleaseAssets assets = new RtReleaseAssets( new FakeRequest().withStatus(HttpURLConnection.HTTP_OK) .withBody("{\"id\":3}"), release() ); MatcherAssert.assertThat( assets.get(Tv.THREE).number(), Matchers.is(Tv.THREE) ); }
Source:
<code>public Iterator<ProcessingError> errors() { <START> return errors == null ? Collections.emptyIterator() : errors.iterator(); <END> }</code><technical_language>this suggestion return errors == null ? Collections<ProcessingError>.emptyIterator() : errors.iterator();</technical_language>

Target:
public Iterator<ProcessingError> errors() { return errors == null ? Collections.<ProcessingError>emptyIterator() : errors.iterator(); }
Source:
<code>public static INDArray squeeze(INDArray input, int dimension) { if (dimension < 0){ dimension += input.rank(); } long[] shape = input.shape(); if (shape[dimension] != 1){ <START> throw new ND4JIllegalStateException("Can squeeze only dimensions of size 1."); <END> } long[] newShape = new long[shape.length - 1]; for(int i=0; i < dimension; i++){ newShape[i] = shape[i]; } for(int i = dimension + 1; i < shape.length; i++){ newShape[i - 1] = shape[i]; } return input.reshape(newShape); }</code><technical_language>Couple of here: (a) Preconditions.checkArgument/checkState - verbose (b) throwing exceptions, I good practice include useful information. dimension? shape of array? that, I need a debugger get information, adds a lot of time required fix it..</technical_language>

Target:
public static INDArray squeeze(INDArray input, int dimension) { if (dimension < 0){ dimension += input.rank(); } long[] shape = input.shape(); Preconditions.checkState(shape[dimension] == 1, String.format("Squeeze: Only dimension of size 1 can be squeezed. " + "Attempted to squeeze dimension %d of array with shape %s (size %d).", dimension, ArrayUtils.toString(shape), shape[dimension])); long[] newShape = ArrayUtil.removeIndex(shape, dimension); return input.reshape(newShape); }
Source:
<code>public void process(KeyFilter filter, final CacheLoaderTask task, Executor executor, final boolean fetchValue, final boolean fetchMetadata) { filter = PersistenceUtil.notNull(filter); Set<Object> keysToLoad = new HashSet<Object>(entries.size()); synchronized (entries) { for (Object k : entries.keySet()) { if (filter.shouldLoadKey(k)) keysToLoad.add(k); } } ExecutorAllCompletionService eacs = new ExecutorAllCompletionService(executor); final TaskContextImpl taskContext = new TaskContextImpl(); int taskCount = 0; for (final Object key : keysToLoad) { if (taskContext.isStopped()) break; eacs.submit(new Callable<Void>() { @Override public Void call() throws Exception { try { final MarshalledEntry marshalledEntry = _load(key, fetchValue, fetchMetadata); if (marshalledEntry != null) { task.processEntry(marshalledEntry, taskContext); } return null; } catch (Exception e) { log.errorExecutingParallelStoreTask(e); throw e; } } }); } eacs.waitUntilAllCompleted(); if (eacs.isExceptionThrown()) { <START> throw new CacheLoaderException("Execution exception!"); <END> } }</code><technical_language>above: "couldn't save occurred exception put a exception?"</technical_language>

Target:
public void process(KeyFilter filter, final CacheLoaderTask task, Executor executor, final boolean fetchValue, final boolean fetchMetadata) { filter = PersistenceUtil.notNull(filter); Set<Object> keysToLoad = new HashSet<Object>(entries.size()); synchronized (entries) { for (Object k : entries.keySet()) { if (filter.shouldLoadKey(k)) keysToLoad.add(k); } } ExecutorAllCompletionService eacs = new ExecutorAllCompletionService(executor); final TaskContextImpl taskContext = new TaskContextImpl(); int taskCount = 0; for (final Object key : keysToLoad) { if (taskContext.isStopped()) break; eacs.submit(new Callable<Void>() { @Override public Void call() throws Exception { try { final MarshalledEntry marshalledEntry = _load(key, fetchValue, fetchMetadata); if (marshalledEntry != null) { task.processEntry(marshalledEntry, taskContext); } return null; } catch (Exception e) { log.errorExecutingParallelStoreTask(e); throw e; } } }); } eacs.waitUntilAllCompleted(); if (eacs.isExceptionThrown()) { throw new CacheLoaderException("Execution exception!", eacs.getFirstException()); } }
Source:
<code>protected void executeCommand() { createPdf = new CreatePdf(); String userId = getParameters().getUserId(); GlusterVolumeProfileInfo profileInfo = getParameters().getProfileInfo(); String filePath = ""; <START> filePath = "/home/" + getGlusterVolumeDao().getById(profileInfo.getVolumeId()).getName(); <END> try { Document document = new Document(); PdfWriter.getInstance(document, new FileOutputStream(filePath)); document.open(); createPdf.addMetaData(document, createMetaData(getGlusterVolumeDao().getById(profileInfo.getVolumeId()).getName(), userId)); addContent(document, profileInfo); document.close(); } catch (Exception e) { setSucceeded(false); setActionReturnValue(e.toString()); } }</code><technical_language>create file in home directory? Shouldnt create /home/ovirt-engine else</technical_language>

Target:
protected void executeCommand() { try { createVolumeProfileDoc(); setSucceeded(true); } catch (DocumentException | IOException e) { e.printStackTrace(); } }
Source:
<code>public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context) { return findAnnotation(context.getElement(), EnabledForJreRange.class) .map(enabledForJreRange -> { JRE min = enabledForJreRange.min(); JRE max = enabledForJreRange.max(); Preconditions.condition(max.compareTo(min) >= 0, "@EnabledForJreRange.min must be lower or the same version as @EnabledForJreRange.max"); if (isCurrentVersionWithinRange(min, max)) { return ENABLED_ON_CURRENT_JRE; } <START> else { <END> return DISABLED_ON_CURRENT_JRE; } }).orElse(ENABLED_BY_DEFAULT); }</code><technical_language>Remove else { ... } frame</technical_language>

Target:
public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context) { return findAnnotation(context.getElement(), EnabledForJreRange.class) .map(enabledForJreRange -> { JRE min = enabledForJreRange.min(); JRE max = enabledForJreRange.max(); Preconditions.condition(max.compareTo(min) >= 0, "@EnabledForJreRange.min must be lower or the same version as @EnabledForJreRange.max"); if (isCurrentVersionWithinRange(min, max)) { return ENABLED_ON_CURRENT_JRE; } return DISABLED_ON_CURRENT_JRE; }).orElse(ENABLED_BY_DEFAULT); }
Source:
<code>void testBlocking() throws Exception { final PageAccessSynchronizer sync = new PageAccessSynchronizer(Duration.ofSeconds(5)); final Duration hold = Duration.ofSeconds(1); final Instant t1locks[] = new Instant[1]; final Instant t2locks[] = new Instant[1]; class T1 extends Thread { @Override public void run() { sync.lockPage(1); t1locks[0] = Instant.now(); try { Thread.sleep(hold.toMillis()); } catch (InterruptedException e) { throw new RuntimeException(e); } sync.unlockAllPages(); } } class T2 extends Thread { @Override public void run() { sync.lockPage(1); t2locks[0] = Instant.now(); sync.unlockAllPages(); } } T1 t1 = new T1(); t1.setName("t1"); T2 t2 = new T2(); t2.setName("t2"); t1.start(); <START> Thread.sleep(100); <END> t2.start(); t1.join(); t2.join(); assertTrue(!t2locks[0].isBefore(t1locks[0].plus(hold))); }</code><technical_language>nit: a more direct translation be: TimeUnit.MILLISECONDS.sleep(100)</technical_language>

Target:
void testBlocking() throws Exception { final PageAccessSynchronizer sync = new PageAccessSynchronizer(Duration.ofSeconds(5)); final Duration hold = Duration.ofSeconds(1); final Instant t1locks[] = new Instant[1]; final Instant t2locks[] = new Instant[1]; class T1 extends Thread { @Override public void run() { sync.lockPage(1); t1locks[0] = Instant.now(); try { Thread.sleep(hold.toMillis()); } catch (InterruptedException e) { throw new RuntimeException(e); } sync.unlockAllPages(); } } class T2 extends Thread { @Override public void run() { sync.lockPage(1); t2locks[0] = Instant.now(); sync.unlockAllPages(); } } T1 t1 = new T1(); t1.setName("t1"); T2 t2 = new T2(); t2.setName("t2"); t1.start(); TimeUnit.MILLISECONDS.sleep(100); t2.start(); t1.join(); t2.join(); assertTrue(!t2locks[0].isBefore(t1locks[0].plus(hold))); }
Source:
<code>public void testColdReplayNoBackpressure() { <START> ObservableCache<Integer> source = (ObservableCache<Integer>)new ObservableCache<Integer>(Observable.range(0, 1000), 16); <END> assertFalse("Source is connected!", source.isConnected()); TestObserver<Integer> to = new TestObserver<Integer>(); source.subscribe(to); assertTrue("Source is not connected!", source.isConnected()); assertFalse("Subscribers retained!", source.hasObservers()); to.assertNoErrors(); to.assertTerminated(); List<Integer> onNextEvents = to.values(); assertEquals(1000, onNextEvents.size()); for (int i = 0; i < 1000; i++) { assertEquals((Integer)i, onNextEvents.get(i)); } }</code><technical_language>Is cast needed now</technical_language>

Target:
public void testColdReplayNoBackpressure() { ObservableCache<Integer> source = new ObservableCache<Integer>(Observable.range(0, 1000), 16); assertFalse("Source is connected!", source.isConnected()); TestObserver<Integer> to = new TestObserver<Integer>(); source.subscribe(to); assertTrue("Source is not connected!", source.isConnected()); assertFalse("Subscribers retained!", source.hasObservers()); to.assertNoErrors(); to.assertTerminated(); List<Integer> onNextEvents = to.values(); assertEquals(1000, onNextEvents.size()); for (int i = 0; i < 1000; i++) { assertEquals((Integer)i, onNextEvents.get(i)); } }
Source:
<code>protected ObserveResponse doObserve(ServerIdentity identity, ObserveRequest request) { <START> return ObserveResponse.internalServerError("not implemented"); <END> }</code><technical_language>default implementation more : java ReadResponse readResponse = this.read(identity, new ReadRequest(request.getPath().toString())); return new ObserveResponse(readResponse.getCode(), readResponse.getContent(), null, null, readResponse.getErrorMessage());</technical_language>

Target:
protected ObserveResponse doObserve(ServerIdentity identity, ObserveRequest request) { ReadResponse readResponse = this.read(identity, new ReadRequest(request.getPath().toString())); return new ObserveResponse(readResponse.getCode(), readResponse.getContent(), null, null, readResponse.getErrorMessage()); }
Source:
<code>public void handleDefaultDeviceResponse(final String deviceIdentification, final String organisationIdentification, final String correlationUid, final String messageType, final ResponseMessageResultType deviceResult, final OsgpException exception) { LOGGER.info("handleDefaultDeviceResponse for MessageType: {}", messageType); ResponseMessageResultType result = deviceResult; OsgpException osgpException = exception; if (deviceResult == ResponseMessageResultType.NOT_OK && exception == null) { LOGGER.error("Incorrect response received, exception should not be null when result is not ok"); osgpException = new TechnicalException(ComponentType.DOMAIN_CORE, "An unknown error occurred"); } if (deviceResult == ResponseMessageResultType.OK && exception != null) { LOGGER.error("Incorrect response received, result should be set to not ok when exception is not null"); result = ResponseMessageResultType.NOT_OK; } <START> this.webServiceResponseMessageSender.send(ResponseMessage.newResponseMessageBuilder() <END> .withCorrelationUid(correlationUid).withOrganisationIdentification(organisationIdentification) .withDeviceIdentification(deviceIdentification).withResult(result).withOsgpException(osgpException) .build()); }</code><technical_language>Extract building of ResponseMessage variable (in eclipse, select text, right-click > refactor > extract local variable / select code + shift+alt+L). This code a bit more readable, especially passing in other besides ResponseMessage</technical_language>

Target:
public void handleDefaultDeviceResponse(final String deviceIdentification, final String organisationIdentification, final String correlationUid, final String messageType, final ResponseMessageResultType deviceResult, final OsgpException exception) { LOGGER.info("handleDefaultDeviceResponse for MessageType: {}", messageType); ResponseMessageResultType result = deviceResult; OsgpException osgpException = exception; if (deviceResult == ResponseMessageResultType.NOT_OK && exception == null) { LOGGER.error("Incorrect response received, exception should not be null when result is not ok"); osgpException = new TechnicalException(ComponentType.DOMAIN_CORE, "An unknown error occurred"); } if (deviceResult == ResponseMessageResultType.OK && exception != null) { LOGGER.error("Incorrect response received, result should be set to not ok when exception is not null"); result = ResponseMessageResultType.NOT_OK; } ResponseMessage responseMessage = ResponseMessage.newResponseMessageBuilder() .withCorrelationUid(correlationUid).withOrganisationIdentification(organisationIdentification) .withDeviceIdentification(deviceIdentification).withResult(result).withOsgpException(osgpException) .build(); this.webServiceResponseMessageSender.send(responseMessage); }
Source:
<code>static Set<ImmutableDruidDataSource> getDataSources(InventoryView serverInventoryView) { <START> return serverInventoryView.getInventory().stream() <END> .flatMap(server -> server.getDataSources().stream()) .map(DruidDataSource::toImmutableDruidDataSource) .collect( () -> new TreeSet<>(Comparator.comparing(ImmutableDruidDataSource::getName)), TreeSet::add, TreeSet::addAll ); }</code><technical_language>Suggest putting .getInventory() .stream() lines</technical_language>

Target:
static SortedSet<ImmutableDruidDataSource> getDataSources(InventoryView serverInventoryView) { return serverInventoryView.getInventory() .stream() .flatMap(server -> server.getDataSources().stream()) .map(DruidDataSource::toImmutableDruidDataSource) .collect( () -> new TreeSet<>(comparingByName()), TreeSet::add, TreeSet::addAll ); }
Source:
<code>private void doScheduleSnapshot(Class<?> aggregateType, String aggregateIdentifier) { <START> if (CurrentUnitOfWork.isStarted()) { <END> Set<AggregateTypeId> scheduledSnapshotMap = CurrentUnitOfWork.get() .root() .getOrComputeResource(SCHEDULED_SNAPSHOT_SET, key -> new HashSet<>()); if (!scheduledSnapshotMap.add(new AggregateTypeId(aggregateType, aggregateIdentifier))) { return; } } executor.execute(new SilentTask(() -> transactionManager .executeInTransaction(createSnapshotterTask(aggregateType, aggregateIdentifier)))); }</code><technical_language>This blocks multiple invocations unit of work, prevent UoW trigger creation of a snapshot...</technical_language>

Target:
private void doScheduleSnapshot(Class<?> aggregateType, String aggregateIdentifier) { AggregateTypeId typeAndId = new AggregateTypeId(aggregateType, aggregateIdentifier); if (CurrentUnitOfWork.isStarted()) { Set<AggregateTypeId> scheduledSnapshotMap = CurrentUnitOfWork.get() .root() .getOrComputeResource(SCHEDULED_SNAPSHOT_SET, key -> new HashSet<>()); if (!scheduledSnapshotMap.add(typeAndId)) { return; } } if (snapshotsInProgress.add(typeAndId)) { try { executor.execute( silently(() -> transactionManager.executeInTransaction(createSnapshotterTask(aggregateType, aggregateIdentifier))) .andFinally(() -> snapshotsInProgress.remove(typeAndId))); } catch (Exception e) { snapshotsInProgress.remove(typeAndId); throw e; } } }
Source:
<code>public WorkerResource( Worker worker, WorkerCuratorCoordinator curatorCoordinator, TaskRunner taskRunner ) throws Exception { this.enabledWorker = worker; this.disabledWorker = new Worker( worker.getHost(), worker.getIp(), worker.getCapacity(), DISABLED_VERSION, enabledWorker.getLastCompletedTaskTime() ) { @Override @JsonProperty public String getHost() { <START> return enabledWorker.getHost(); <END> } @Override @JsonProperty public String getIp() { return enabledWorker.getIp(); } @Override @JsonProperty public int getCapacity() { return enabledWorker.getCapacity(); } @Override @JsonProperty public String getVersion() { return DISABLED_VERSION; } @Override @JsonProperty public DateTime getLastCompletedTaskTime() { return enabledWorker.getLastCompletedTaskTime(); } }; this.curatorCoordinator = curatorCoordinator; this.taskRunner = taskRunner; }</code><technical_language>this happen? properties work for lastCompletedTaskTime</technical_language>

Target:
public WorkerResource( Worker worker, WorkerCuratorCoordinator curatorCoordinator, TaskRunner taskRunner ) throws Exception { this.enabledWorker = worker; this.curatorCoordinator = curatorCoordinator; this.taskRunner = taskRunner; }