auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void executeCommand(Command command, ExecutionHandlerContext context) { List<byte[]> commandElems = command.getProcessedCommand(); if (commandElems.size() < 3) { command.setResponse(Coder.getErrorResponse(context.getByteBufAllocator(), ArityDef.SADD)); return; } ByteArrayWrapper key = command.getKey(); Region<ByteArrayWrapper, Set<ByteArrayWrapper>> region = getRegion(context); ByteArrayWrapper keyPlaceHolder = null; region.compute( key, <START> (ByteArrayWrapper localKey, Set<ByteArrayWrapper> oldRegionData) -> { <END> Long entriesAdded = 0L; Set<ByteArrayWrapper> regionCopy = oldRegionData; if (regionCopy == null) { regionCopy = new HashSet<>(); } for (int i = 2; i < commandElems.size(); i++) { if (regionCopy.add(new ByteArrayWrapper(commandElems.get(i)))) { entriesAdded++; } } return regionCopy; } ); context.getKeyRegistrar().register(command.getKey(), RedisDataType.REDIS_SET); }</code><technical_language>FYI, compute Region a region specific implementation. is implemented default impl ConcurrentMap. basically a region.get, executes lambda, a region.put. retry I this concurrent modification issue modifying "oldRegionData"</technical_language>

Target:
public void executeCommand(Command command, ExecutionHandlerContext context) { List<byte[]> commandElems = command.getProcessedCommand(); AtomicLong entriesAdded = new AtomicLong(0L); if (commandElems.size() < 3) { command.setResponse(Coder.getErrorResponse(context.getByteBufAllocator(), ArityDef.SADD)); return; } ByteArrayWrapper key = command.getKey(); Region<ByteArrayWrapper, Set<ByteArrayWrapper>> region = getRegion(context); context.getKeyRegistrar().register(command.getKey(), RedisDataType.REDIS_SET); region.compute( key, (ByteArrayWrapper localKey, Set<ByteArrayWrapper> oldSetValue) -> { entriesAdded.set(0L); Set<ByteArrayWrapper> setCopy; if (oldSetValue == null) { setCopy = new HashSet<>(); } else { setCopy = new HashSet<>(oldSetValue); } for (int i = 2; i < commandElems.size(); i++) { if (setCopy.add(new ByteArrayWrapper(commandElems.get(i)))) { entriesAdded.incrementAndGet(); } } return setCopy; }); command .setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), entriesAdded.get())); }
Source:
<code>private boolean isNfsSupportEnabled(Config config) { Boolean <START> result = <END> isNfsSupportEnabled; if (result == null) { isNfsSupportEnabled = result = Boolean.valueOf( config.getBoolean(ConfigConstants.CONFIG_CORE_SECTION, null, ConfigConstants.ENABLE_NFS_SUPPORT, false)); } return result.booleanValue(); }</code><technical_language>this extra variable? if (isNfsSupportEnabled == null) { isNfsSupportEnabled = Boolean.valueOf( config.getBoolean(ConfigConstants.CONFIG_CORE_SECTION, null, ConfigConstants.ENABLE_NFS_SUPPORT, false)); } return isNfsSupportEnabled.booleanValue();</technical_language>

Target:
private boolean isNfsSupportEnabled(Config config) { if (config == null) { return false; } Boolean result = nfsSupportEnabled; if (result == null) { nfsSupportEnabled = result = Boolean.valueOf( config.getBoolean(ConfigConstants.CONFIG_CORE_SECTION, null, ConfigConstants.ENABLE_NFS_SUPPORT, false)); } return result.booleanValue(); }
Source:
<code>public void log(){ LicenseManager license = LicenseManager.getInstance(); Company company = PublicCompanyFactory.getDefaultCompany(); TimeZone companyTimeZone = company.getTimeZone(); TimeZone.setDefault(companyTimeZone); Logger.info(this, "InitServlet: Setting Default Timezone: " + companyTimeZone.getDisplayName()); String _dbType = DbConnectionFactory.getDBType(); <START> String _dailect = ""; <END> try { _dailect = HibernateUtil.getDialect(); } catch (DotHibernateException e3) { Logger.error(InitServlet.class, e3.getMessage(), e3); } String expires = (license.isPerpetual()) ? "never" : UtilMethods.dateToLongPrettyHTMLDate(license.getValidUntil()); String _companyId = PublicCompanyFactory.getDefaultCompanyId(); Logger.info(this, ""); Logger.info(this, " Initializing dotCMS"); Logger.info(this, " Using database: " + _dbType); Logger.info(this, " Using dialect : " + _dailect); Logger.info(this, " Company Name : " + _companyId); Logger.info(this, ""); Logger.info(this, " License : " + license.getLevelName(license.getLevel())); Logger.info(this, " Licensed to : " + license.getClientName()); Logger.info(this, " Server id : " + license.getDisplayServerId()); Logger.info(this, " License id : " + license.getDisplaySerial()); Logger.info(this, " Valid until : " + expires); if(Config.getBooleanProperty("DIST_INDEXATION_ENABLED", false)){ Logger.info(this, " Clustering : Enabled"); } else{ Logger.info(this, " Clustering : Disabled"); } Logger.info(this, ""); }</code><technical_language>![MINOR](<LINK_1> 'Severity: MINOR') Rename this local variable match regular expression '^[a-z][a-zA-Z0-9]*$'. [![rule](<LINK_0>](<LINK_2></technical_language>

Target:
public void log(){ LicenseManager license = LicenseManager.getInstance(); Company company = PublicCompanyFactory.getDefaultCompany(); TimeZone companyTimeZone = company.getTimeZone(); TimeZone.setDefault(companyTimeZone); Logger.info(this, "InitServlet: Setting Default Timezone: " + companyTimeZone.getDisplayName()); String dbType = DbConnectionFactory.getDBType(); String dailect = ""; try { dailect = HibernateUtil.getDialect(); } catch (DotHibernateException e3) { Logger.error(InitServlet.class, e3.getMessage(), e3); } String expires = (license.isPerpetual()) ? "never" : UtilMethods.dateToLongPrettyHTMLDate(license.getValidUntil()); String companyId = PublicCompanyFactory.getDefaultCompanyId(); Logger.info(this, ""); Logger.info(this, " Initializing dotCMS"); Logger.info(this, " Using database: " + dbType); Logger.info(this, " Using dialect : " + dailect); Logger.info(this, " Company Name : " + companyId); Logger.info(this, ""); Logger.info(this, " License : " + license.getLevelName(license.getLevel())); Logger.info(this, " Licensed to : " + license.getClientName()); Logger.info(this, " Server id : " + license.getDisplayServerId()); Logger.info(this, " License id : " + license.getDisplaySerial()); Logger.info(this, " Valid until : " + expires); if(Config.getBooleanProperty("DIST_INDEXATION_ENABLED", false)){ Logger.info(this, " Clustering : Enabled"); } else{ Logger.info(this, " Clustering : Disabled"); } Logger.info(this, ""); }
Source:
<code>private static boolean isClassInNamespaceContext(ClassDeclarationTree classDec) { Tree parent = classDec.getParent(); if (parent != null && parent.is(Kind.SCRIPT)) { ScriptTree scriptTree = (ScriptTree) parent; for (Tree statement : scriptTree.statements()) { if (statement.is(Kind.NAMESPACE_STATEMENT)) { return true; } } } return false; <START> } <END></code><technical_language>This implementation raises a FP on: if (true) { class D { public function D() { // OK } } } Another approach like: Symbol symbol = context().symbolTable().getSymbol(classDec.name()); QualifiedName qualifiedName = symbol.qualifiedName(); return qualifiedName != null && !qualifiedName.toString().equals(symbol.name());</technical_language>

Target:
private boolean isClassInNamespaceContext(ClassDeclarationTree classDec) { Symbol symbol = context().symbolTable().getSymbol(classDec.name()); QualifiedName qualifiedName = symbol.qualifiedName(); return qualifiedName != null && !qualifiedName.toString().equals(symbol.name()); }
Source:
<code>public void extractJudges() { <START> Judge judge = new Judge("Jan Kowalski"); <END> when(sourceJudgeExtractorHelper.extractJudges(sJudgment, correctionList)).thenReturn(Lists.newArrayList(judge)); List<Judge> judges = judgmentExtractor.extractJudges(sJudgment, correctionList); assertEquals(1, judges.size()); assertEquals(judge.getName(), judges.get(0).getName()); }</code><technical_language>create immutable list of judges here... <code>Immutable.copyOf(Lists.newArrayList(judge))</code></technical_language>

Target:
public void extractJudges() { Judge judge = new Judge("Jan Kowalski"); List<Judge> judges = ImmutableList.of(judge); when(sourceJudgeExtractorHelper.extractJudges(sJudgment, correctionList)).thenReturn(judges); List<Judge> returnedJudges = judgmentExtractor.extractJudges(sJudgment, correctionList); assertTrue(returnedJudges == judges); }
Source:
<code>private String getResourcePath(String resource) throws Exception { <START> return URLDecoder.decode(this.getClass().getClassLoader().getResource(resource).getPath(), UTF_8.name()); <END> }</code><technical_language>I is toURI().getPath(), magic decoding. [URI.getPath](<LINK_0></technical_language>

Target:
private String getResourcePath(String resource) throws Exception { return this.getClass().getClassLoader().getResource(resource).toURI().getPath(); }
Source:
<code>public Callable<AdaptiveExercise> getAdaptiveExercise() throws OAuthSystemException, OAuthProblemException, NotLoggedInException { return wrapWithNotLoggedInException(new Callable<AdaptiveExercise>() { @Override public AdaptiveExercise call() throws Exception { try { Callable<String> download = new HttpTasks() .getForText(getSkillifierUrl("next.json?username=" + oauth.getToken())); String json = download.call(); return adaptiveExerciseParser.parseFromJson(json); } catch (Exception ex) { <START> LOG.log(Level.WARNING, "Downloading and parsing adaptive exercise URL failed."); <END> return null; } } }); }</code><technical_language>Log full exception (that is, stack trace) some specific reason to</technical_language>

Target:
public Callable<AdaptiveExercise> getAdaptiveExercise() throws OAuthSystemException, OAuthProblemException, NotLoggedInException { return wrapWithNotLoggedInException(new Callable<AdaptiveExercise>() { @Override public AdaptiveExercise call() throws Exception { try { Callable<String> download = new HttpTasks() .getForText(getSkillifierUrl("next.json?username=" + oauth.getToken())); String json = download.call(); return adaptiveExerciseParser.parseFromJson(json); } catch (Exception ex) { LOG.log(Level.WARNING, "Downloading and parsing adaptive exercise URL failed with exception: " + ex.getMessage(), ex); return null; } } }); }
Source:
<code>public synchronized void waitForWorkToFinish() { m_doneProducing = true; while (m_workProduced != m_workConsumed.longValue()) { try { wait(); } catch (InterruptedException unexpected) { } <START> assert m_workProduced == m_workConsumed.longValue(); <END> } }</code><technical_language>assert</technical_language>

Target:
public boolean waitForWorkToFinish() { final int attemptIntervalMs = 100; final int maxAttempts = (int) (TimeUnit.SECONDS.toMillis(KAFKA_IMPORTER_MAX_SHUTDOWN_WAIT_TIME_SECONDS) / attemptIntervalMs); int attemptCount = 0; while (m_workProduced != m_workConsumed.longValue() && attemptCount < maxAttempts) { try { Thread.sleep(attemptIntervalMs); } catch (InterruptedException unexpected) { } attemptCount++; } return m_workProduced == m_workConsumed.longValue(); }
Source:
<code>public ListenableFuture<ImmutableSet<Digest>> findMissingDigests(Iterable<Digest> digests) { if (Iterables.isEmpty(digests)) { return Futures.immediateFuture(ImmutableSet.of()); } FindMissingBlobsRequest.Builder requestBuilder = FindMissingBlobsRequest.newBuilder().setInstanceName(options.remoteInstanceName); List<ListenableFuture<FindMissingBlobsResponse>> getMissingDigestCalls = new ArrayList<>(); for (Digest digest : digests) { requestBuilder.addBlobDigests(digest); if (requestBuilder.getBlobDigestsCount() == maxMissingBlobsDigestsPerMessage) { getMissingDigestCalls.add(getMissingDigests(requestBuilder.build())); requestBuilder.clearBlobDigests(); } } if (requestBuilder.getBlobDigestsCount() > 0) { getMissingDigestCalls.add(getMissingDigests(requestBuilder.build())); } ListenableFuture<ImmutableSet<Digest>> success = Futures.whenAllSucceed(getMissingDigestCalls) .call( () -> { ImmutableSet.Builder<Digest> result = ImmutableSet.builder(); for (ListenableFuture<FindMissingBlobsResponse> callFuture : getMissingDigestCalls) { result.addAll(callFuture.get().getMissingBlobDigestsList()); } return result.build(); }, MoreExecutors.directExecutor()); return Futures.catchingAsync( success, <START> Exception.class, <END> (e) -> Futures.immediateFailedFuture( new IOException( String.format( "findMissingBlobs(%d) for %s", requestBuilder.getBlobDigestsCount(), TracingMetadataUtils.fromCurrentContext().getActionId()), e)), MoreExecutors.directExecutor()); }</code><technical_language>this more narrow, e.g., RuntimeException (other checked exceptions fine)</technical_language>

Target:
public ListenableFuture<ImmutableSet<Digest>> findMissingDigests(Iterable<Digest> digests) { if (Iterables.isEmpty(digests)) { return Futures.immediateFuture(ImmutableSet.of()); } FindMissingBlobsRequest.Builder requestBuilder = FindMissingBlobsRequest.newBuilder().setInstanceName(options.remoteInstanceName); List<ListenableFuture<FindMissingBlobsResponse>> getMissingDigestCalls = new ArrayList<>(); for (Digest digest : digests) { requestBuilder.addBlobDigests(digest); if (requestBuilder.getBlobDigestsCount() == maxMissingBlobsDigestsPerMessage) { getMissingDigestCalls.add(getMissingDigests(requestBuilder.build())); requestBuilder.clearBlobDigests(); } } if (requestBuilder.getBlobDigestsCount() > 0) { getMissingDigestCalls.add(getMissingDigests(requestBuilder.build())); } ListenableFuture<ImmutableSet<Digest>> success = Futures.whenAllSucceed(getMissingDigestCalls) .call( () -> { ImmutableSet.Builder<Digest> result = ImmutableSet.builder(); for (ListenableFuture<FindMissingBlobsResponse> callFuture : getMissingDigestCalls) { result.addAll(callFuture.get().getMissingBlobDigestsList()); } return result.build(); }, MoreExecutors.directExecutor()); return Futures.catchingAsync( success, RuntimeException.class, (e) -> Futures.immediateFailedFuture( new IOException( String.format( "findMissingBlobs(%d) for %s", requestBuilder.getBlobDigestsCount(), TracingMetadataUtils.fromCurrentContext().getActionId()), e)), MoreExecutors.directExecutor()); }
Source:
<code>public void run(ActionContext context) throws Exception { <START> Class<? extends Driver> driverClass = context.loadPluginClass(JDBC_PLUGIN_ID); <END> DBManager dbManager = new DBManager(config); try { dbManager.ensureJDBCDriverIsAvailable(driverClass); try (Connection connection = getConnection()) { if (!config.enableAutoCommit) { connection.setAutoCommit(false); } ScriptRunner runner = new ScriptRunner(connection, config.enableAutoCommit, true); runner.runScript(new BufferedReader(new FileReader(config.scriptPath))); if (!config.enableAutoCommit) { connection.commit(); } } } catch (Exception e) { LOG.error("Error running script {}.", config.scriptPath, e); } finally { dbManager.destroy(); } }</code><technical_language>copy-paste QueryAction. Refactor code. of this in a common class use</technical_language>

Target:
public void run(ActionContext context) throws Exception { Class<? extends Driver> driverClass = context.loadPluginClass(JDBC_PLUGIN_ID); DBRun executeQuery = new DBRun(config, driverClass); executeQuery.run(); }
Source:
<code>public String deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { TreeNode treeNode = jp.readValueAsTree(); JsonNode oid = ((JsonNode) treeNode).get(MONGO_QUERY_OID); if (oid != null) return oid.asText(); else if(treeNode.isValueNode() && treeNode instanceof TextNode) { return ((JsonNode) treeNode).textValue(); } else <START> return treeNode.toString(); <END> }</code><technical_language>Instead of calling toString() treeNode calling asText() instead. ok 'else if' condition is longer needed</technical_language>

Target:
public String deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { TreeNode treeNode = jp.readValueAsTree(); JsonNode oid = ((JsonNode) treeNode).get(MONGO_QUERY_OID); if (oid != null) return oid.asText(); else return ((JsonNode) treeNode).asText(); }
Source:
<code>public void collect(com.twitter.zipkin.gen.Span span) { if (queue.offer(span) == false) { <START> LOGGER.log(Level.WARNING, "Queue rejected span!"); <END> } }</code><technical_language>is this consistent w/scribe? handling (ex. warning level)? curious this fill logs, could</technical_language>

Target:
public void collect(com.twitter.zipkin.gen.Span span) { if (!queue.offer(span)) { LOGGER.log(Level.WARNING, "Queue rejected span!"); } }
Source:
<code>public void verifyPhoto() { <START> waitForElementByElement(imageArticle); <END> }</code><technical_language>add pageObject logging</technical_language>

Target:
public void verifyPhoto() { waitForElementByElement(imageArticle); PageObjectLogging.log("verifyPhoto", "photo is visible", true); }
Source:
<code>public String toString() { <START> return JsonUtils.toJson(this); <END> }</code><technical_language>this in logging, if do need this "pretty"</technical_language>

Target:
public String toString() { return "DatastreamPositionResponse{" + "_datastreamToPhysicalSources=" + _datastreamToPhysicalSources + '}'; }
Source:
<code>public async_tasks mapRow(ResultSet rs, int rowNum) throws SQLException { async_tasks entity = new async_tasks(); entity.setaction_type(VdcActionType.forValue(rs.getInt("action_type"))); entity.setresult(AsyncTaskResultEnum.forValue(rs.getInt("result"))); entity.setstatus(AsyncTaskStatusEnum.forValue(rs.getInt("status"))); entity.settask_id(Guid.createGuidFromString(rs.getString("task_id"))); entity.setaction_parameters(deserializeParameters(rs.getString("action_parameters"),rs.getString("action_params_class"))); entity.setStepId(NGuid.createGuidFromString(rs.getString("step_id"))); entity.setCommandId(Guid.createGuidFromString(rs.getString("command_id"))); entity.setStartTime(DbFacadeUtils.fromDate(rs.getTimestamp("started_at"))); <START> entity.setTaskType(AsyncTaskType.forValue(rs.getInt("task_type"))); <END> return entity; }</code><technical_language>storage pool id ???</technical_language>

Target:
public async_tasks mapRow(ResultSet rs, int rowNum) throws SQLException { async_tasks entity = new async_tasks(); entity.setaction_type(VdcActionType.forValue(rs.getInt("action_type"))); entity.setresult(AsyncTaskResultEnum.forValue(rs.getInt("result"))); entity.setstatus(AsyncTaskStatusEnum.forValue(rs.getInt("status"))); entity.settask_id(Guid.createGuidFromString(rs.getString("task_id"))); entity.setaction_parameters(deserializeParameters(rs.getString("action_parameters"),rs.getString("action_params_class"))); entity.setStepId(NGuid.createGuidFromString(rs.getString("step_id"))); entity.setCommandId(Guid.createGuidFromString(rs.getString("command_id"))); entity.setStartTime(DbFacadeUtils.fromDate(rs.getTimestamp("started_at"))); entity.setTaskType(AsyncTaskType.forValue(rs.getInt("task_type"))); entity.setStoragePoolId(Guid.createGuidFromString(rs.getString("storage_pool_id"))); return entity; }
Source:
<code>public SecurityGroup removeIpPermission(IpPermission ipPermission, SecurityGroup group) { String zone = group.getLocation().getId(); String id = group.getId(); <START> Optional<? extends SecurityGroupApi> sgApi = client.getSecurityGroupExtensionForZone(zone); <END> if (!sgApi.isPresent()) { return null; } org.jclouds.openstack.nova.v2_0.domain.SecurityGroup securityGroup = sgApi.get().get(id); if (ipPermission.getCidrBlocks().size() > 0) { for (String cidr : ipPermission.getCidrBlocks()) { for (SecurityGroupRule rule : filter(securityGroup.getRules(), and(ruleCidr(cidr), ruleProtocol(ipPermission.getIpProtocol()), ruleStartPort(ipPermission.getFromPort()), ruleEndPort(ipPermission.getToPort())))) { sgApi.get().deleteRule(rule.getId()); } } } if (ipPermission.getGroupIds().size() > 0) { for (String groupId : ipPermission.getGroupIds()) { for (SecurityGroupRule rule : filter(securityGroup.getRules(), and(ruleGroup(groupId), ruleProtocol(ipPermission.getIpProtocol()), ruleStartPort(ipPermission.getFromPort()), ruleEndPort(ipPermission.getToPort())))) { sgApi.get().deleteRule(rule.getId()); } } } return getSecurityGroupById(ZoneAndId.fromZoneAndId(zone, id).slashEncode()); }</code><technical_language>null check for zone</technical_language>

Target:
public SecurityGroup removeIpPermission(IpPermission ipPermission, SecurityGroup group) { String zone = group.getLocation().getId(); String id = group.getId(); Optional<? extends SecurityGroupApi> sgApi = api.getSecurityGroupExtensionForZone(zone); if (!sgApi.isPresent()) { return null; } org.jclouds.openstack.nova.v2_0.domain.SecurityGroup securityGroup = sgApi.get().get(id); if (ipPermission.getCidrBlocks().size() > 0) { for (String cidr : ipPermission.getCidrBlocks()) { for (SecurityGroupRule rule : filter(securityGroup.getRules(), and(ruleCidr(cidr), ruleProtocol(ipPermission.getIpProtocol()), ruleStartPort(ipPermission.getFromPort()), ruleEndPort(ipPermission.getToPort())))) { sgApi.get().deleteRule(rule.getId()); } } } if (ipPermission.getGroupIds().size() > 0) { for (String groupId : ipPermission.getGroupIds()) { for (SecurityGroupRule rule : filter(securityGroup.getRules(), and(ruleGroup(groupId), ruleProtocol(ipPermission.getIpProtocol()), ruleStartPort(ipPermission.getFromPort()), ruleEndPort(ipPermission.getToPort())))) { sgApi.get().deleteRule(rule.getId()); } } } return getSecurityGroupById(ZoneAndId.fromZoneAndId(zone, id).slashEncode()); }
Source:
<code>private void checkQueueSize() { int queueSize = workQueue.size(); if (queueSize >= WORK_QUEUE_SIZE_WARNING_THRESHOLD) { logger.warn("The Gerrit-trigger incoming events queue contains items!" + " Something might be stuck, or your system can't process the commands fast enough." <START> + " Try to increase the number of receiving worker threads on the Gerrit configuration page." <END> + " Current thread-pool size: {}", queueSize, workers.size()); } }</code><technical_language>Strange talking configuration pages here. Other consumers necessarily a trigger a configuration page</technical_language>

Target:
private void checkQueueSize() { int queueSize = workQueue.size(); if (WORK_QUEUE_SIZE_WARNING_THRESHOLD > 0 && queueSize >= WORK_QUEUE_SIZE_WARNING_THRESHOLD) { logger.warn("The Gerrit incoming events queue contains items!" + " Something might be stuck, or your system can't process the commands fast enough." + " Try to increase the number of receiving worker threads." + " Current thread-pool size: {}", queueSize, workers.size()); } }
Source:
<code>public void visitVariableIdentifier(VariableIdentifierTree tree) { if (isMemberAccess(tree)) { return; } <START> String lowerCaseName = tree.text().toLowerCase(Locale.ROOT); <END> if (!PREDEFINED_VARIABLES.contains(lowerCaseName)) { if (isReadAccess(tree)) { if (!firstVariableReadAccess.containsKey(lowerCaseName)) { firstVariableReadAccess.put(lowerCaseName, tree); } } else { initializedVariables.add(lowerCaseName); } } }</code><technical_language>I transform name of variable. Variable names case-sensitive</technical_language>

Target:
public void visitVariableIdentifier(VariableIdentifierTree tree) { if (isClassMemberAccess(tree) || uninitializedVariableDeclaration(tree)) { return; } String name = tree.text(); if (!PREDEFINED_VARIABLES.contains(name)) { if (isReadAccess(tree)) { if (!firstVariableReadAccess.containsKey(name)) { firstVariableReadAccess.put(name, tree); } } else { initializedVariables.add(name); } } }
Source:
<code>private UserList getUserListFromService(){ <START> UserList activeUsers = new UserList(); <END> UserListService userService = getUserListService(); if(userService != null){ return userService.getUserList(); } else { Log.i(TAG, "UserListService null, returning empty userlist"); } return activeUsers; }</code><technical_language>this variable for real reason. return a new UserList in bottom return</technical_language>

Target:
private UserList getUserListFromService(){ UserList activeUsers; UserListService userService = getUserListService(); if(userService != null){ activeUsers = userService.getUserList(); } else { activeUsers = new UserList(); Log.i(TAG, "UserListService null, returning empty userlist"); } return activeUsers; }
Source:
<code>public Map<String, Object> toSoyData(Paginator paginator, @Nullable String revision, DateFormatter df) throws IOException { Map<String, Object> data = Maps.newHashMapWithExpectedSize(3); List<Map<String, Object>> entries = Lists.newArrayListWithCapacity(paginator.getLimit()); for (RevCommit c : paginator) { <START> if (verbose) { <END> entries.add(new CommitSoyData().setRevWalk(paginator.getWalk()).toSoyData(req, c, VERBOSE_FIELDS, df)); } else { entries.add(new CommitSoyData().toSoyData(req, c, FIELDS, df)); } } data.put("entries", entries); ObjectId next = paginator.getNextStart(); if (next != null) { data.put("nextUrl", copyAndCanonicalize(view, revision) .replaceParam(LogServlet.START_PARAM, next.name()) .toUrl()); } ObjectId prev = paginator.getPreviousStart(); if (prev != null) { GitilesView.Builder prevView = copyAndCanonicalize(view, revision); if (!prevView.getRevision().getId().equals(prev)) { prevView.replaceParam(LogServlet.START_PARAM, prev.name()); } data.put("previousUrl", prevView.toUrl()); } return data; }</code><technical_language>setRevWalk is free, do: Set<Field> fs = verbose ? VERBOSE_FIELDS : FIELDS; entries.add(new CommitSoyData() .setRevWalk(paginator.getWalk()) .toSoyData(req, c, fs, df));</technical_language>

Target:
public Map<String, Object> toSoyData(Paginator paginator, @Nullable String revision, DateFormatter df) throws IOException { Map<String, Object> data = Maps.newHashMapWithExpectedSize(3); List<Map<String, Object>> entries = Lists.newArrayListWithCapacity(paginator.getLimit()); for (RevCommit c : paginator) { Set<Field> fs = verbose ? VERBOSE_FIELDS : FIELDS; entries.add(new CommitSoyData().setRevWalk(paginator.getWalk()).toSoyData(req, c, fs, df)); } data.put("entries", entries); ObjectId next = paginator.getNextStart(); if (next != null) { data.put("nextUrl", copyAndCanonicalize(view, revision) .replaceParam(LogServlet.START_PARAM, next.name()) .toUrl()); } ObjectId prev = paginator.getPreviousStart(); if (prev != null) { GitilesView.Builder prevView = copyAndCanonicalize(view, revision); if (!prevView.getRevision().getId().equals(prev)) { prevView.replaceParam(LogServlet.START_PARAM, prev.name()); } data.put("previousUrl", prevView.toUrl()); } return data; }
Source:
<code>private void recycle() { long now = System.currentTimeMillis(); long activeConnectionTTL = options.getActiveConnectionTTL() * 1000 - (now - initialTimestamp); long keepAliveTTL = now + keepAliveTimeout * 1000; <START> long expiration = keepAliveTimeout == 0 || (options.isActiveConnectionTTL() && activeConnectionTTL <= 0) <END> ? 0L : options.isActiveConnectionTTL() ? Math.min(keepAliveTTL, now + activeConnectionTTL) : keepAliveTTL ; listener.onRecycle(expiration); }</code><technical_language>compute this option is active</technical_language>

Target:
private void recycle() { expirationTimestamp = keepAliveTimeout == 0 ? 0L : System.currentTimeMillis() + keepAliveTimeout * 1000; listener.onRecycle(); }
Source:
<code>protected void modifyDisk(long hostId, Instance instance, boolean add) { CacheManager cm = CacheManager.getCacheManagerInstance(this.objectManager); InstanceInfo instanceInfo = cm.getInstanceInfoForHost(hostId, instance.getId()); for (Entry<String, InstanceDiskReserveInfo> entry : instanceInfo.getAllReservedDisksInfo()) { String diskDevicePath = entry.getKey(); InstanceDiskReserveInfo reserveInfo = entry.getValue(); Long reserveSize = reserveInfo.getReservedSize(); DiskInfo diskInfo = cm.getDiskInfoForHost(hostId, diskDevicePath); Long allocated = diskInfo.getAllocatedSize(); <START> if (add && (diskInfo.getCapacity() - allocated >= reserveSize)) { <END> diskInfo.addAllocatedSize(reserveSize); log.info("allocated disk space on disk with total = {}, = as used", diskInfo.getDiskDevicePath(), diskInfo.getCapacity(), allocated, "+", reserveSize, allocated + reserveSize); reserveInfo.setAllocated(true); } else if (!add && reserveInfo.isAllocated() && allocated >= reserveSize) { diskInfo.freeAllocatedSize(reserveSize); log.info("freed disk space on disk with total = {}, = as used", diskInfo.getDiskDevicePath(), diskInfo.getCapacity(), allocated, "-", reserveSize, allocated - reserveSize); instanceInfo.releaseDisk(reserveInfo); } } }</code><technical_language>happen add && capacity - allocated > reserved? disk is get used, I ignore it. I raise error</technical_language>

Target:
protected void modifyDisk(long hostId, Instance instance, boolean add) { CacheManager cm = CacheManager.getCacheManagerInstance(this.objectManager); HostInfo hostInfo = cm.getHostInfo(hostId, false); if (hostInfo == null) { return; } InstanceInfo instanceInfo = hostInfo.getInstanceInfo(instance.getId()); if (instanceInfo == null) { return; } if (add) { Map<Pair<String, Long>, DiskInfo> volumeToDiskMapping = AllocatorUtils.allocateDiskForVolumes(hostId, instance, this.objectManager); if (volumeToDiskMapping == null) { return; } for (Entry<Pair<String, Long>, DiskInfo> mapping : volumeToDiskMapping.entrySet()) { Pair<String, Long> vol = mapping.getKey(); DiskInfo disk = mapping.getValue(); Long allocated = disk.getAllocatedSize(); disk.addAllocatedSize(vol.getRight()); log.info("allocated disk space on disk with total = {}, = as used", disk.getDiskDevicePath(), disk.getCapacity(), allocated, "+", vol.getRight(), allocated + vol.getRight()); instanceInfo.addReservedSize(disk.getDiskDevicePath(), vol.getRight()); } } else { for (Entry<String, Long> diskAllocated : instanceInfo.getAllocatedDisks()) { String diskDevicePath = diskAllocated.getKey(); Long reserveSize = diskAllocated.getValue(); DiskInfo diskInfo = hostInfo.getDiskInfo(diskDevicePath); diskInfo.freeAllocatedSize(reserveSize); log.info("freed disk space on disk with total = {}, = as used", diskInfo.getDiskDevicePath(), diskInfo.getCapacity(), diskInfo.getAllocatedSize(), "-", reserveSize, diskInfo.getAllocatedSize() - reserveSize); instanceInfo.releaseDisk(diskDevicePath); } } }
Source:
<code>public boolean isIdentityProvider() { try { <START> PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_ACTIVITIES); <END> for (ActivityInfo activityInfo : packageInfo.activities) { if (activityInfo.name.equals(IDPAccountPickerActivity.class.getName())) { return true; } } } catch (NameNotFoundException e) { SalesforceSDKLogger.e(TAG, "Exception occurred while examining application info", e); } return false; }</code><technical_language>this require special perms? work a RELEASE build well</technical_language>

Target:
private boolean isIdentityProvider() { try { PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_ACTIVITIES); for (ActivityInfo activityInfo : packageInfo.activities) { if (activityInfo.name.equals(IDPAccountPickerActivity.class.getName())) { return true; } } } catch (NameNotFoundException e) { SalesforceSDKLogger.e(TAG, "Exception occurred while examining application info", e); } return false; }
Source:
<code>public DarkClusterStrategy getOrCreate(@Nonnull String darkClusterName, @Nonnull DarkClusterConfig darkClusterConfig) { if (!_darkStrategyMap.containsKey(darkClusterName)) { _darkStrategyMap.putIfAbsent(darkClusterName, new AtomicReference<>(createStrategy(darkClusterName, darkClusterConfig))); } <START> return _darkStrategyMap.getOrDefault(darkClusterName, new AtomicReference<DarkClusterStrategy>(new NoOpDarkClusterStrategy())).get(); <END> }</code><technical_language>This a functional API instead time call this method creating a new AtomicReference NoOpDarkClusterStrategy</technical_language>

Target:
public DarkClusterStrategy getOrCreate(@Nonnull String darkClusterName, @Nonnull DarkClusterConfig darkClusterConfig) { if (!_darkStrategyMap.containsKey(darkClusterName)) { _darkStrategyMap.putIfAbsent(darkClusterName, createStrategy(darkClusterName, darkClusterConfig)); } return _darkStrategyMap.getOrDefault(darkClusterName, NO_OP_DARK_CLUSTER_STRATEGY); }
Source:
<code>private SSHClient create(@NonNull String url) { <START> String host = url.substring(url.lastIndexOf('@')+1, url.lastIndexOf(':')); <END> int port = Integer.parseInt(url.substring(url.lastIndexOf(':')+1)); String authString = url.substring(SSH_URI_PREFIX.length(), url.lastIndexOf('@')); String[] userInfo = authString.split(":"); String username = userInfo[0]; String password = userInfo.length > 1 ? userInfo[1] : null; if(port < 0) port = SSH_DEFAULT_PORT; UtilsHandler utilsHandler = AppConfig.getInstance().getUtilsHandler(); String pem = utilsHandler.getSshAuthPrivateKey(url); AtomicReference<KeyPair> keyPair = new AtomicReference<>(null); if(pem != null && !pem.isEmpty()) { try { CountDownLatch latch = new CountDownLatch(1); new PemToKeyPairTask(pem, result -> { if (result.result != null) { keyPair.set(result.result); latch.countDown(); } }).execute(); latch.await(); } catch(InterruptedException e) { throw new RuntimeException(e); } } String hostKey = utilsHandler.getSshHostKey(url); if(hostKey == null) return null; return create(host, port, hostKey, username, password, keyPair.get()); }</code><technical_language>assuming "URI" (a String) passed is in correct format, checks. If a "malformed URI" (by this method's definition of URI) here, error difficult track down, add a RegEx check (and crash String explicited in exception message)? check manually if String required parts</technical_language>

Target:
private SSHClient create(@NonNull String url) { ConnectionInfo connInfo = new ConnectionInfo(url); UtilsHandler utilsHandler = AppConfig.getInstance().getUtilsHandler(); String pem = utilsHandler.getSshAuthPrivateKey(url); AtomicReference<KeyPair> keyPair = new AtomicReference<>(null); if(pem != null && !pem.isEmpty()) { try { CountDownLatch latch = new CountDownLatch(1); new PemToKeyPairTask(pem, result -> { if (result.result != null) { keyPair.set(result.result); latch.countDown(); } }).execute(); latch.await(); } catch(InterruptedException e) { throw new RuntimeException(e); } } String hostKey = utilsHandler.getSshHostKey(url); if(hostKey == null) return null; return create(connInfo.host, connInfo.port, hostKey, connInfo.username, connInfo.password, keyPair.get()); }
Source:
<code>public void addProxy(ProxiesParamProxy proxy) { if (this.getAdditionalProxy(proxy.getAddress(), proxy.getPort()) != null) { throw new IllegalArgumentException("Proxy already exists"); } if (!this.canListenOn(proxy.getAddress(), proxy.getPort())) { <START> throw new IllegalArgumentException("Cannot listen on address:port"); <END> } ProxyServer proxyServer = startProxyServer(proxy.getAddress(), proxy.getPort()); proxyServers.put(proxy.getAddress() + proxy.getPort(), proxyServer); this.getParam().addProxy(proxy); }</code><technical_language>worth including attempted address:port</technical_language>

Target:
public void addProxy(ProxiesParamProxy proxy) { if (this.getAdditionalProxy(proxy.getAddress(), proxy.getPort()) != null) { throw new IllegalArgumentException("Proxy already exists " + proxy.getAddress() + ":" + proxy.getPort()); } if (!this.canListenOn(proxy.getAddress(), proxy.getPort())) { throw new IllegalArgumentException("Cannot listen on " + proxy.getAddress() + ":" + proxy.getPort()); } ProxyServer proxyServer = startProxyServer(proxy.getAddress(), proxy.getPort()); proxyServers.put(proxy.getAddress() + proxy.getPort(), proxyServer); this.getParam().addProxy(proxy); }
Source:
<code>public void testUpdate() throws OrmException, FileNotFoundException { db.create(); final File site = new File(UUID.randomUUID().toString()); final SitePaths paths = new SitePaths(site); SchemaUpdater u = Guice.createInjector(new AbstractModule() { @Override protected void configure() { bind(new TypeLiteral<SchemaFactory<ReviewDb>>() {}).toInstance(db); bind(SitePaths.class).toInstance(paths); install(new SchemaVersion.Module()); } }).getInstance(SchemaUpdater.class); u.update(new UpdateUI() { @Override public void message(String msg) { } @Override public boolean yesno(boolean def, String msg) { <START> return true; <END> } @Override public void pruneSchema(StatementExecutor e, List<String> pruneList) throws OrmException { for (String sql : pruneList) { e.execute(sql); } } }); db.assertSchemaVersion(); final SystemConfig sc = db.getSystemConfig(); assertEquals(paths.site_path.getAbsolutePath(), sc.sitePath); }</code><technical_language>Return def, true</technical_language>

Target:
public void testUpdate() throws OrmException, FileNotFoundException { db.create(); final File site = new File(UUID.randomUUID().toString()); final SitePaths paths = new SitePaths(site); SchemaUpdater u = Guice.createInjector(new AbstractModule() { @Override protected void configure() { bind(new TypeLiteral<SchemaFactory<ReviewDb>>() {}).toInstance(db); bind(SitePaths.class).toInstance(paths); install(new SchemaVersion.Module()); } }).getInstance(SchemaUpdater.class); u.update(new UpdateUI() { @Override public void message(String msg) { } @Override public boolean yesno(boolean def, String msg) { return def; } @Override public void pruneSchema(StatementExecutor e, List<String> pruneList) throws OrmException { for (String sql : pruneList) { e.execute(sql); } } }); db.assertSchemaVersion(); final SystemConfig sc = db.getSystemConfig(); assertEquals(paths.site_path.getAbsolutePath(), sc.sitePath); }
Source:
<code>public void treeForEmptyNavigationTest() { LayoutTemplate lt1 = new LayoutTemplate("lt1"); LayoutTemplate lt2 = new LayoutTemplate("lt2"); LayoutTemplate lt3 = new LayoutTemplate("lt3"); <START> List<LayoutTemplate> templates = new ArrayList<>(); templates.add(lt1); templates.add(lt2); templates.add(lt3); <END> NavTree runtimeTree = runtimeNavigationBuilder.build(Optional.empty(), templates); NavGroup orphanItemsGroup = (NavGroup) runtimeTree.getItemById(RuntimeNavigationBuilder.ORPHAN_GROUP_ID); assertNotNull(orphanItemsGroup); assertEquals(3, orphanItemsGroup.getChildren().size()); assertTrue(containsLayoutTemplate(orphanItemsGroup, lt1)); assertTrue(containsLayoutTemplate(orphanItemsGroup, lt2)); assertTrue(containsLayoutTemplate(orphanItemsGroup, lt3)); }</code><technical_language>suggestion List<LayoutTemplate> templates = Arrays.asList(lt1, lt2, lt3); a suggestion shorter :)</technical_language>

Target:
public void treeForEmptyNavigationTest() { LayoutTemplate lt1 = new LayoutTemplate("lt1"); LayoutTemplate lt2 = new LayoutTemplate("lt2"); LayoutTemplate lt3 = new LayoutTemplate("lt3"); List<LayoutTemplate> templates = Arrays.asList(lt1, lt2, lt3); NavTree runtimeTree = runtimeNavigationBuilder.build(Optional.empty(), templates); NavGroup orphanItemsGroup = (NavGroup) runtimeTree.getItemById(RuntimeNavigationBuilder.ORPHAN_GROUP_ID); assertNotNull(orphanItemsGroup); assertEquals(3, orphanItemsGroup.getChildren().size()); assertTrue(containsLayoutTemplate(orphanItemsGroup, lt1)); assertTrue(containsLayoutTemplate(orphanItemsGroup, lt2)); assertTrue(containsLayoutTemplate(orphanItemsGroup, lt3)); }
Source:
<code>public void testMismatchBisulfiteCounts(final String readString, final String cigar, final String reference, final boolean positiveStrand, final int expectedMismatches) { final byte baseQuality = 30; final SAMRecord rec = new SAMRecord(null); rec.setReadName("test"); rec.setReadString(readString); rec.setReadNegativeStrandFlag(!positiveStrand); final byte[] byteArray = new byte[readString.length()]; <START> for(int i = 0; i < readString.length();i++){ <END> byteArray[i]=baseQuality; } rec.setBaseQualities(byteArray); rec.setCigarString(cigar); final byte[] refBases = StringUtil.stringToBytes(reference); final int nExact = SequenceUtil.countMismatches(rec, refBases, -1, true, false); Assert.assertEquals(nExact, expectedMismatches); final int sumMismatchesQualityExact = SequenceUtil.sumQualitiesOfMismatches(rec, refBases, -1, true); Assert.assertEquals(sumMismatchesQualityExact, expectedMismatches * baseQuality); }</code><technical_language>Arrays.fill()</technical_language>

Target:
public void testMismatchBisulfiteCounts(final String readString, final String cigar, final String reference, final boolean positiveStrand, final int expectedMismatches) { final byte baseQuality = 30; final SAMRecord rec = new SAMRecord(null); rec.setReadName("test"); rec.setReadString(readString); rec.setReadNegativeStrandFlag(!positiveStrand); final byte[] byteArray = new byte[readString.length()]; Arrays.fill(byteArray,baseQuality); rec.setBaseQualities(byteArray); rec.setCigarString(cigar); final byte[] refBases = StringUtil.stringToBytes(reference); final int nExact = SequenceUtil.countMismatches(rec, refBases, -1, true, false); Assert.assertEquals(nExact, expectedMismatches); final int sumMismatchesQualityExact = SequenceUtil.sumQualitiesOfMismatches(rec, refBases, -1, true); Assert.assertEquals(sumMismatchesQualityExact, expectedMismatches * baseQuality); }
Source:
<code>protected void meetSP(final StatementPattern node) throws Exception { final URI pred = (URI) node.getPredicateVar().getValue(); final Var obj = node.getObjectVar(); final StatementPattern clone = node.clone(); <START> if(pred.equals(RDF.TYPE) && obj.isConstant()) { <END> for (final URI property : inferenceEngine.getHasSelfImplyingType((URI) obj.getValue())) { final InferUnion union = new InferUnion(clone, new StatementPattern(clone.getSubjectVar(), new Var("p", property), clone.getSubjectVar())); node.replaceWith(union); } } else if (node.getPredicateVar().isConstant() && (!node.getSubjectVar().isConstant() || !node.getObjectVar().isConstant())) { for (final Resource type : inferenceEngine.getHasSelfImplyingProperty(pred)) { final Extension extension; if(obj.isConstant()) { extension = new Extension(new StatementPattern(obj, TYPE_VAR, obj), new ExtensionElem(obj, "o")); } else { extension = new Extension(new StatementPattern(node.getSubjectVar(), TYPE_VAR, new Var("o", type)), new ExtensionElem(node.getSubjectVar(), obj.getName())); } final InferUnion union = new InferUnion(extension, clone); node.replaceWith(union); } } }</code><technical_language>pred null if predicate is a variable. need skip (make RDF.TYPE.equals(pred), explicitly check for null, require node.getPredicateVar().isConstant())</technical_language>

Target:
protected void meetSP(final StatementPattern node) throws Exception { final URI pred = (URI) node.getPredicateVar().getValue(); final Var obj = node.getObjectVar(); final StatementPattern clone = node.clone(); if (RDF.TYPE.equals(pred) && obj.isConstant()) { if (obj.getValue() instanceof URI) { for (final URI property : inferenceEngine.getHasSelfImplyingType((URI) obj.getValue())) { final InferUnion union = new InferUnion(clone, new StatementPattern(clone.getSubjectVar(), new Var(property.stringValue(), property), clone.getSubjectVar())); node.replaceWith(union); } } } else if (node.getPredicateVar().isConstant() && (!node.getSubjectVar().isConstant() || !node.getObjectVar().isConstant())) { for (final Resource type : inferenceEngine.getHasSelfImplyingProperty(pred)) { final Extension extension; if(obj.isConstant()) { extension = new Extension( new StatementPattern(obj, TYPE_VAR, new Var(type.stringValue(), type)), new ExtensionElem(obj, node.getSubjectVar().getName())); } else { extension = new Extension( new StatementPattern(node.getSubjectVar(), TYPE_VAR, new Var(type.stringValue(), type)), new ExtensionElem(node.getSubjectVar(), obj.getName())); } final InferUnion union = new InferUnion(extension, clone); node.replaceWith(union); } } }
Source:
<code>private void populateDupCandidates(List<PairedReadSequence> seqs) { readsByHashInGroup.clear(); for (PairedReadSequence prs : seqs) { int[][] readHashValues = {prs.hashes1, prs.hashes2}; for (int[] readHashValue : readHashValues) { for (int key : readHashValue) { <START> List<PairedReadSequence> dupCandidates <END> = readsByHashInGroup.computeIfAbsent(key, k -> new ArrayList<>()); dupCandidates.add(prs); } } } }</code><technical_language>final</technical_language>

Target:
private void populateDupCandidates(List<PairedReadSequence> seqs) { readsByHashInGroup.clear(); for (PairedReadSequence prs : seqs) { int[][] readHashValues = {prs.hashes1, prs.hashes2}; for (int[] readHashValue : readHashValues) { for (int key : readHashValue) { final List<PairedReadSequence> dupCandidates = readsByHashInGroup.computeIfAbsent(key, k -> new ArrayList<>()); dupCandidates.add(prs); } } } }
Source:
<code>protected String extractErrorMessageForbidden(AccessToken accessToken) { <START> return "Insufficient scope: " + accessToken.getScopes(); <END> }</code><technical_language>Insufficient scope(s) - possibly more scope</technical_language>

Target:
protected String extractErrorMessageForbidden(AccessToken accessToken) { return "Insufficient scopes: " + accessToken.getScopes(); }
Source:
<code>public void stop() { if (workDefAdmin != null) { workDefAdmin.clearCaches(); } workDefAdmin = null; if (configCacheProvider != null) { configCacheProvider.invalidate(); configCacheProvider = null; } if (workDefCacheProvider != null) { workDefCacheProvider.invalidate(); workDefCacheProvider = null; } artifactStore = null; actionableItemFactory = null; teamDefFactory = null; <START> versionFactory = null; <END> }</code><technical_language>versionService set null here</technical_language>

Target:
public void stop() { if (workDefAdmin != null) { workDefAdmin.clearCaches(); } workDefAdmin = null; if (configCacheProvider != null) { configCacheProvider.invalidate(); configCacheProvider = null; } if (workDefCacheProvider != null) { workDefCacheProvider.invalidate(); workDefCacheProvider = null; } versionService = null; artifactStore = null; actionableItemFactory = null; teamDefFactory = null; versionFactory = null; }
Source:
<code>public void setData(@Nullable ISegmentStoreProvider provider) { fSegmentProvider = provider; if (provider == null) { updateModel(null); return; } createProviderColumns(); ISegmentStore<ISegment> segStore = provider.getSegmentStore(); Map<@NonNull Integer, @NonNull Predicate<@NonNull Map<@NonNull String, @NonNull String>>> predicates = computeRegexPredicate(); Predicate<ISegment> predicate = (segment) -> { if (!predicates.isEmpty()) { Map<@NonNull String, @NonNull String> input = getFilterInput(segment, provider); boolean activateProperty = false; for (Map.Entry<Integer, Predicate<Map<String, String>>> mapEntry : predicates.entrySet()) { Integer property = Objects.requireNonNull(mapEntry.getKey()); Predicate<Map<String, String>> value = Objects.requireNonNull(mapEntry.getValue()); if (property == IFilterProperty.DIMMED) { boolean status = value.test(input); activateProperty |= status; } } return activateProperty; } return true; }; if (segStore != null) { <START> if (!predicates.isEmpty()) { updateModel(segStore); } else { Collection<ISegment> filtered = Collections2.filter(segStore, seg -> predicate.test(seg)); ISegmentStore<ISegment> filteredStore = new ArrayListStore<>(filtered.toArray(new ISegment[filtered.size()])); updateModel(filteredStore); return; } <END> } updateModel(null); SegmentStoreProviderProgressListener listener = fListener; if (listener != null) { provider.addListener(listener); } if (provider instanceof IAnalysisModule) { ((IAnalysisModule) provider).schedule(); } }</code><technical_language>This block changed in patchset 13. work. condition predicates.isEmpty() ! return I think</technical_language>

Target:
public void setData(@Nullable ISegmentStoreProvider provider) { fSegmentProvider = provider; if (provider == null) { updateModel(null); return; } createProviderColumns(); ISegmentStore<ISegment> segStore = provider.getSegmentStore(); Map<@NonNull Integer, @NonNull Predicate<@NonNull Map<@NonNull String, @NonNull String>>> predicates = computeRegexPredicate(); Predicate<ISegment> predicate = (segment) -> { if (!predicates.isEmpty()) { Map<@NonNull String, @NonNull String> input = getFilterInput(segment, provider); boolean activateProperty = false; for (Map.Entry<Integer, Predicate<Map<String, String>>> mapEntry : predicates.entrySet()) { Integer property = Objects.requireNonNull(mapEntry.getKey()); Predicate<Map<String, String>> value = Objects.requireNonNull(mapEntry.getValue()); if (property == IFilterProperty.DIMMED) { boolean status = value.test(input); activateProperty |= status; } } return activateProperty; } return true; }; if (segStore != null) { if (predicates.isEmpty()) { updateModel(segStore); return; } Collection<ISegment> filtered = Collections2.filter(segStore, seg -> predicate.test(seg)); ISegmentStore<ISegment> filteredStore = new ArrayListStore<>(filtered.toArray(new ISegment[filtered.size()])); updateModel(filteredStore); return; } updateModel(null); SegmentStoreProviderProgressListener listener = fListener; if (listener != null) { provider.addListener(listener); } if (provider instanceof IAnalysisModule) { ((IAnalysisModule) provider).schedule(); } }