auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected void cleanup(Context context) throws IOException, InterruptedException{ <START> String strNumOfRegions = PhoenixConfigurationUtil.getNumOfRegions(context.getConfiguration()); <END> if (strNumOfRegions != null) { String fullTableName = PhoenixConfigurationUtil.getIndexToolDataTableName(context.getConfiguration()); final Properties overrideProps = new Properties(); try { final Connection connection = ConnectionUtil.getOutputConnection(context.getConfiguration(), overrideProps); int newNumRegions = regionCountForTesting != null ? regionCountForTesting : IndexUtil.getNumOfRegions(connection, fullTableName); int prevNumRegions = Integer.parseInt(strNumOfRegions); if (newNumRegions != prevNumRegions) { throw new IOException(String.format(SPLIT_MERGE_ERROR_STR_FMT, prevNumRegions, newNumRegions)); } } catch (SQLException e) { LOGGER.error("Failed get the number of regions"); throw new RuntimeException(e.getMessage()); } } try { IndexToolUtil.updateIndexState(context.getConfiguration(), PIndexState.ACTIVE); updateTasksTable(context); } catch (SQLException e) { LOGGER.error(" Failed to update the status to Active"); throw new RuntimeException(e.getMessage()); } }</code><technical_language>this number of mappers? reducer get instead compare it</technical_language>

Target:
protected void cleanup(Context context) throws IOException, InterruptedException{ if (PhoenixConfigurationUtil.getFailOnRegionNumChange(context.getConfiguration())) { String strNumOfRegions = PhoenixConfigurationUtil.getNumOfRegions(context.getConfiguration()); if (strNumOfRegions != null) { String fullTableName = PhoenixConfigurationUtil.getIndexToolDataTableName(context.getConfiguration()); final Properties overrideProps = new Properties(); try { final Connection connection = ConnectionUtil .getOutputConnection(context.getConfiguration(), overrideProps); if (splitRegionForTesting) { try (Admin admin = connection.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()) { TableName tbl = TableName.valueOf(fullTableName); admin.split(tbl); admin.disableTable(tbl); admin.enableTable(tbl); } } int newNumRegions = IndexUtil.getRegions(connection, fullTableName).size(); int prevNumRegions = Integer.parseInt(strNumOfRegions); if (newNumRegions != prevNumRegions) { detectChangedRegions(connection, context, fullTableName); } } catch (SQLException e) { LOGGER.error("Failed get the number of regions"); throw new RuntimeException(e.getMessage()); } } } try { IndexToolUtil.updateIndexState(context.getConfiguration(), PIndexState.ACTIVE); updateTasksTable(context); } catch (SQLException e) { LOGGER.error(" Failed to update the status to Active"); throw new RuntimeException(e.getMessage()); } }
Source:
<code>public void onInventorySlotChanged(InventorySlotChangedEvent event, EntityRef entity) { EntityRef playerEntity = entity; EntityRef item = event.getNewItem(); if (playerEntity.hasComponent(LASTeamComponent.class) && item.hasComponent(BlockItemComponent.class)) { <START> if (item.getComponent(BlockItemComponent.class).blockFamily.getURI().toString().equals(LASUtils.RED_FLAG_URI) <END> && playerEntity.getComponent(LASTeamComponent.class).team.equals(LASUtils.RED_TEAM)) { worldProvider.setBlock(new Vector3i(LASUtils.CENTER_RED_BASE_POSITION.x, LASUtils.CENTER_RED_BASE_POSITION.y + 1, LASUtils.CENTER_RED_BASE_POSITION.z), blockManager.getBlock(LASUtils.RED_FLAG_URI)); inventoryManager.removeItem(playerEntity, EntityRef.NULL, item, true, 1); return; } if (item.getComponent(BlockItemComponent.class).blockFamily.getURI().toString().equals(LASUtils.BLACK_FLAG_URI) && playerEntity.getComponent(LASTeamComponent.class).team.equals(LASUtils.BLACK_TEAM)) { worldProvider.setBlock(new Vector3i(LASUtils.CENTER_BLACK_BASE_POSITION.x, LASUtils.CENTER_BLACK_BASE_POSITION.y + 1, LASUtils.CENTER_BLACK_BASE_POSITION.z), blockManager.getBlock(LASUtils.BLACK_FLAG_URI)); inventoryManager.removeItem(playerEntity, EntityRef.NULL, item, true, 1); return; } } }</code><technical_language>stop URI matches for checks. create a RedFlagComponent. Define flag prefabs this component default. need do is check if item this component now</technical_language>

Target:
public void onInventorySlotChanged(InventorySlotChangedEvent event, EntityRef entity) { EntityRef playerEntity = entity; moveFlagToBaseIfPickedBySameTeamPlayer(event, playerEntity); }
Source:
<code>public Map<String, Map<String, Message>> getStaleMessageCache() { <START> for (String instanceName : _staleMessageCache.keySet()) { <END> for (String messageId : _staleMessageCache.get(instanceName).keySet()) { if (!_messageCache.getOrDefault(instanceName, Collections.emptyMap()) .containsKey(messageId)) { _staleMessageCache.get(instanceName).remove(messageId); if (_staleMessageCache.get(instanceName).size() == 0) { _staleMessageCache.remove(instanceName); } } } } return _staleMessageCache; }</code><technical_language>I do this _messageCache is refreshed in refresh() method. 1. changing values in a get method is a good style. want able call get time, if a side effect callers need review detail of method time if want it. 2. This is for cleaning prevent memory leakage only, clean refresh is done beginning of pipeline is enough, I think</technical_language>

Target:
public Map<String, Map<String, Message>> getStaleMessageCache() { return _staleMessageCache; }
Source:
<code>public CaseNameRewriter() { <START> this.upperCase = true; <END> }</code><technical_language>one-argument constructor called instead: this(true)</technical_language>

Target:
public CaseNameRewriter() { this(true); }
Source:
<code>public Flux<Frame> resend(int remotePosition) { updateRemotePosition(remotePosition); if (remotePosition == currentPosition) { return Flux.empty(); } List<Frame> resend = new ArrayList<>(); Iterator<Map.Entry<Integer, Frame>> positions = frames.entrySet().iterator(); while (positions.hasNext()) { Map.Entry<Integer, Frame> cachePosition = positions.next(); if (remotePosition < cachePosition.getKey()) { resend.add(cachePosition.getValue().retain()); } } <START> return Flux.fromIterable(resend); <END> }</code><technical_language>If observes this leak frames, a problem of</technical_language>

Target:
public Flux<Frame> resend(int remotePosition) { updateRemotePosition(remotePosition); if (remotePosition == currentPosition) { return Flux.empty(); } List<Frame> resend = new ArrayList<>(); Iterator<Map.Entry<Integer, Frame>> positions = frames.entrySet().iterator(); while (positions.hasNext()) { Map.Entry<Integer, Frame> cachePosition = positions.next(); if (remotePosition < cachePosition.getKey()) { resend.add(cachePosition.getValue()); } } return Flux.fromIterable(resend); }
Source:
<code><START> public AbstractVisitor(String name, Context context) { <END> this.context = context; this.currentDefinition = null; this.currentModule = null; this.kompileOptions = context == null ? null : context.kompileOptions; this.globalOptions = context == null ? null : context.globalOptions; this.name = name; }</code><technical_language>please constructor inheritance for</technical_language>

Target:
public AbstractVisitor(String name, Context context) { this(name, context, null, null); }
Source:
<code>public static SCM parseSCM(StaplerRequest req, AbstractProject target) throws FormException, ServletException { SCM scm = SCM.all().newInstanceFromRadioList(req.getSubmittedForm().getJSONObject("scm")); if (scm == null) { scm = new NullSCM(); } <START> scm.getDescriptor().generation.incrementAndGet(); <END> return scm; }</code><technical_language>need get</technical_language>

Target:
public static SCM parseSCM(StaplerRequest req, AbstractProject target) throws FormException, ServletException { SCM scm = SCM.all().newInstanceFromRadioList(req.getSubmittedForm().getJSONObject("scm")); if (scm == null) { scm = new NullSCM(); } scm.getDescriptor().incrementGeneration(); return scm; }
Source:
<code>public void whenMoreThanOneCursorPerPartitionThenException() throws Exception { subscriptionBase.setInitialCursors(ImmutableList.of( new SubscriptionCursorWithoutToken(ET1, P0, ""), new SubscriptionCursorWithoutToken(ET2, P0, ""), new SubscriptionCursorWithoutToken(ET3, P0, "a"), new SubscriptionCursorWithoutToken(ET3, P0, "b") )); try { subscriptionValidationService.validateSubscription(subscriptionBase, client); fail("WrongInitialCursorsException expected"); } catch (final WrongInitialCursorsException e) { assertThat(e.getMessage(), <START> equalTo("there should be not more than 1 cursor for each partition in initial_cursors")); <END> } }</code><technical_language>small suggestion -> no</technical_language>

Target:
public void whenMoreThanOneCursorPerPartitionThenException() throws Exception { subscriptionBase.setInitialCursors(ImmutableList.of( new SubscriptionCursorWithoutToken(ET1, P0, ""), new SubscriptionCursorWithoutToken(ET2, P0, ""), new SubscriptionCursorWithoutToken(ET3, P0, "a"), new SubscriptionCursorWithoutToken(ET3, P0, "b") )); try { subscriptionValidationService.validateSubscription(subscriptionBase, client); fail("WrongInitialCursorsException expected"); } catch (final WrongInitialCursorsException e) { assertThat(e.getMessage(), equalTo("there should be no more than 1 cursor for each partition in initial_cursors")); } }
Source:
<code>protected <T> void notifyTransactionObservers(List<ObserverMethod<? super T>> observers, T event, EventMetadata metadata, final ObserverExceptionHandler handler) { if (observers.isEmpty()) { return; } if (transactionServices == null || !transactionServices.isTransactionActive()) { notifySyncObservers(observers, event, metadata, handler); } else { List<DeferredEventNotification<?>> notifications = new ArrayList<DeferredEventNotification<?>>(); for (ObserverMethod<? super T> observer : observers) { deferNotification(event, metadata, observer, notifications); } try { transactionServices.registerSynchronization(new TransactionNotificationSynchronization(notifications)); } catch (Exception e) { if (e.getCause() instanceof RollbackException || e.getCause() instanceof IllegalStateException) { <START> List<ObserverMethod<? super T>> filteredObservers = observers.stream() <END> .filter(observerMethod -> !observerMethod.getTransactionPhase().equals(TransactionPhase.AFTER_SUCCESS)).collect( Collectors.toList()); notifySyncObservers(filteredObservers, event, metadata, handler); } else { throw e; } } } }</code><technical_language>sort observers in <LINK_0></technical_language>

Target:
protected <T> void notifyTransactionObservers(List<ObserverMethod<? super T>> observers, T event, EventMetadata metadata, final ObserverExceptionHandler handler) { if (observers.isEmpty()) { return; } if (transactionServices == null || !transactionServices.isTransactionActive()) { notifySyncObservers(observers, event, metadata, handler); } else { List<DeferredEventNotification<?>> notifications = new ArrayList<DeferredEventNotification<?>>(); for (ObserverMethod<? super T> observer : observers) { deferNotification(event, metadata, observer, notifications); } try { transactionServices.registerSynchronization(new TransactionNotificationSynchronization(notifications)); } catch (Exception e) { if (e.getCause() instanceof RollbackException || e.getCause() instanceof IllegalStateException) { List<ObserverMethod<? super T>> filteredObservers = observers.stream() .filter(observerMethod -> !observerMethod.getTransactionPhase().equals(TransactionPhase.AFTER_SUCCESS)) .sorted((o1, o2) -> { return o2.getTransactionPhase().toString().compareTo(o1.getTransactionPhase().toString()); }) .collect(Collectors.toList()); notifySyncObservers(filteredObservers, event, metadata, handler); } else { throw e; } } } }
Source:
<code>private void deleteTempPacksIdx() { Path packDir = Paths.get(repo.getObjectsDirectory().getAbsolutePath(), "pack"); long threshold = <START> Instant.now().toEpochMilli() - 24 * 60 * 60 * 1000; <END> try { Files.newDirectoryStream(packDir, "gc_*_tmp") .forEach(t -> { try { long lastModified = Files.getLastModifiedTime(t) .toMillis(); if (lastModified < threshold) { Files.deleteIfExists(t); } } catch (IOException e) { LOG.error(e.getMessage(), e); } }); } catch (IOException e) { LOG.error(e.getMessage(), e); } }</code><technical_language>delegate conversions Instant: Instant threshold = Instant.now().minus(1, ChronoUnit.DAYS);</technical_language>

Target:
private void deleteTempPacksIdx() { Path packDir = Paths.get(repo.getObjectsDirectory().getAbsolutePath(), "pack"); Instant threshold = Instant.now().minus(1, ChronoUnit.DAYS); try { Files.newDirectoryStream(packDir, "gc_*_tmp") .forEach(t -> { try { Instant lastModified = Files.getLastModifiedTime(t) .toInstant(); if (lastModified.isBefore(threshold)) { Files.deleteIfExists(t); } } catch (IOException e) { LOG.error(e.getMessage(), e); } }); } catch (IOException e) { LOG.error(e.getMessage(), e); } }
Source:
<code>protected boolean doPoll(String sha1) { if (observer != null) { observer.setListener(listener); observer.checkAndNotify(); observer.removeListener(); return true; } else { <START> return isMatched(null, null, null); <END> } }</code><technical_language>return false;</technical_language>

Target:
protected boolean doPoll(String sha1) { if (observer != null) { observer.setListener(listener); observer.checkAndNotify(); observer.removeListener(); return true; } else { return false; } }
Source:
<code>public <START> Optional<UUID> <END> addGroup(String groupName) { if (!groupExists(groupName)) { String trimmedName = groupName.trim(); UUID groupUUIDuuid = UUID.randomUUID(); RepositoryGroup group = new RepositoryGroup(groupUUIDuuid, trimmedName); groupMap.put(groupUUIDuuid, group); savePreferences(); return Optional.of(groupUUIDuuid); } return Optional.empty(); }</code><technical_language>advantage of Optional returning null groupUUIDuuid</technical_language>

Target:
public UUID addGroup(String groupName) { if (!groupExists(groupName)) { String trimmedName = groupName.trim(); UUID groupId = UUID.randomUUID(); RepositoryGroup group = new RepositoryGroup(groupId, trimmedName); groupMap.put(groupId, group); savePreferences(); return groupId; } else { throw new IllegalStateException( UIText.RepositoriesView_RepoGroup_GroupExists); } }
Source:
<code>public QueryPlan optimize(QueryPlan dataPlan, PhoenixStatement statement, List<? extends PDatum> targetColumns, ParallelIteratorFactory parallelIteratorFactory) throws SQLException { <START> List<QueryPlan> plans = getApplicablePlans(dataPlan, statement, targetColumns, parallelIteratorFactory, false); <END> if (plans.size() == 1) { return plans.get(0); } Cost minCost = null; QueryPlan bestPlan = null; for (QueryPlan plan : plans) { Cost cost = plan.getCost(); if (minCost == null || cost.compareTo(minCost) < 0) { minCost = cost; bestPlan = plan; } } return bestPlan; }</code><technical_language>need a new master boolean config option (like phoenix.optimize.costBased in QueryServices) controls cost based optimization users disable if want existing behavior same</technical_language>

Target:
public QueryPlan optimize(QueryPlan dataPlan, PhoenixStatement statement, List<? extends PDatum> targetColumns, ParallelIteratorFactory parallelIteratorFactory) throws SQLException { List<QueryPlan> plans = getApplicablePlans(dataPlan, statement, targetColumns, parallelIteratorFactory, true); return plans.get(0); }
Source:
<code>public void assertDoesNotEndWith(AssertionInfo info, CharSequence actual, CharSequence suffix) { <START> if (suffix == null) throw new NullPointerException("The given suffix should not be null"); <END> assertNotNull(info, actual); if (comparisonStrategy.stringEndsWith(actual.toString(), suffix.toString())) throw failures.failure(info, shouldNotEndWith(actual, suffix, comparisonStrategy)); }</code><technical_language>thing, extract method check suffix</technical_language>

Target:
public void assertDoesNotEndWith(AssertionInfo info, CharSequence actual, CharSequence suffix) { failIfSuffixIsNull(suffix); assertNotNull(info, actual); if (comparisonStrategy.stringEndsWith(actual.toString(), suffix.toString())) throw failures.failure(info, shouldNotEndWith(actual, suffix, comparisonStrategy)); }
Source:
<code>public void recordActivityCreation(final ActivityType entity, final long activityId, final short symbolId, final SourceSection sourceSection, final Activity current) { int requiredSpace = entity.getCreationSize(); ensureSufficientSpace(requiredSpace, current); final int start = position; assert entity.getCreationMarker() != 0; put(entity.getCreationMarker()); putLong(activityId); putShort(symbolId); <START> if (VmSettings.TRUFFLE_DEBUGGER_ENABLED || VmSettings.KOMPOS_TRACING) { <END> writeSourceSection(sourceSection); } assert position == start + requiredSpace; }</code><technical_language>relation ship KOMPOS_TRACING TRUFFLE_DEBUGGER_ENABLED? I strictly related, they? KOMPOS_TRACING for replay, debugging enabled. In context of code, this is KOMPOS_TRACING, no? (I assume KOMPOS_TRACING needs enable reach it. related changes/questions below</technical_language>

Target:
public void recordActivityCreation(final ActivityType entity, final long activityId, final short symbolId, final SourceSection sourceSection, final Activity current) { int requiredSpace = entity.getCreationSize(); ensureSufficientSpace(requiredSpace, current); final int start = position; assert entity.getCreationMarker() != 0; put(entity.getCreationMarker()); putLong(activityId); putShort(symbolId); if (VmSettings.KOMPOS_TRACING) { writeSourceSection(sourceSection); } assert position == start + requiredSpace; }
Source:
<code>public Component resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { if (!tag.getId().startsWith(LABEL_ATTR)) { return null; } final String path = tag.getAttribute(getWicketNamespace(markupStream) + WICKET_FOR).trim(); Component component = findRelatedComponent(container, path); if (component == null) { <START> throw new ComponentNotFoundException("Could not find form component with id '" + path + <END> "' while trying to resolve wicket:for attribute"); } if (component instanceof ILabelProviderLocator) { component = ((ILabelProviderLocator) component).getAutoLabelComponent(); } if (!(component instanceof ILabelProvider)) { throw new WicketRuntimeException("Component pointed to by wicket:for attribute '" + path + "' does not implement " + ILabelProvider.class.getName()); } if (!component.getOutputMarkupId()) { component.setOutputMarkupId(true); if (component.hasBeenRendered()) { logger.warn( "Component: is referenced via a wicket:for attribute but does not have its outputMarkupId property set to true", component.toString(false)); } } if (component instanceof FormComponent) { component.setMetaData(MARKER_KEY, new AutoLabelMarker((FormComponent<?>)component)); } return new AutoLabel(tag.getId(), component); }</code><technical_language>component id -> component path</technical_language>

Target:
public Component resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { if (!tag.getId().startsWith(LABEL_ATTR)) { return null; } final String path = tag.getAttribute(getWicketNamespace(markupStream) + WICKET_FOR).trim(); Component component = findRelatedComponent(container, path); if (component == null) { throw new ComponentNotFoundException("Could not find form component with path '" + path + "' while trying to resolve wicket:for attribute"); } if (component instanceof ILabelProviderLocator) { component = ((ILabelProviderLocator) component).getAutoLabelComponent(); } if (!(component instanceof ILabelProvider)) { throw new WicketRuntimeException("Component pointed to by wicket:for attribute '" + path + "' does not implement " + ILabelProvider.class.getName()); } if (!component.getOutputMarkupId()) { component.setOutputMarkupId(true); if (component.hasBeenRendered()) { logger.warn( "Component: is referenced via a wicket:for attribute but does not have its outputMarkupId property set to true", component.toString(false)); } } if (component instanceof FormComponent) { component.setMetaData(MARKER_KEY, new AutoLabelMarker((FormComponent<?>)component)); } return new AutoLabel(tag.getId(), component); }
Source:
<code>public static void addNewTablet(ServerContext context, KeyExtent extent, String path, TServerInstance location, Map<FileRef,DataFileValue> datafileSizes, Map<Long,? extends Collection<FileRef>> bulkLoadedFiles, String time, long lastFlushID, long lastCompactID, ZooLock zooLock) { TabletMutator mutator = context.getAmple().mutateTablet(extent); mutator.putPrevEndRow(extent.getPrevEndRow()); mutator.putZooLock(zooLock); mutator.putDir(path); mutator.putTime(time); if (lastFlushID > 0) mutator.putFlushId(lastFlushID); if (lastCompactID > 0) mutator.putCompactionId(lastCompactID); if (location != null) { mutator.putLocation(location, LocationType.CURRENT); mutator.deleteLocation(location, LocationType.FUTURE); } <START> for (Entry<FileRef,DataFileValue> entry : datafileSizes.entrySet()) { <END> mutator.putFile(entry.getKey(), entry.getValue()); } for (Entry<Long,? extends Collection<FileRef>> entry : bulkLoadedFiles.entrySet()) { for (FileRef ref : entry.getValue()) { mutator.putBulkFile(ref, entry.getKey().longValue()); } } mutator.mutate(); }</code><technical_language>possibly replace this loop java datafileSizes.forEach(mutator::putFile);</technical_language>

Target:
public static void addNewTablet(ServerContext context, KeyExtent extent, String path, TServerInstance location, Map<FileRef,DataFileValue> datafileSizes, Map<Long,? extends Collection<FileRef>> bulkLoadedFiles, String time, long lastFlushID, long lastCompactID, ZooLock zooLock) { TabletMutator mutator = context.getAmple().mutateTablet(extent); mutator.putPrevEndRow(extent.getPrevEndRow()); mutator.putZooLock(zooLock); mutator.putDir(path); mutator.putTime(time); if (lastFlushID > 0) mutator.putFlushId(lastFlushID); if (lastCompactID > 0) mutator.putCompactionId(lastCompactID); if (location != null) { mutator.putLocation(location, LocationType.CURRENT); mutator.deleteLocation(location, LocationType.FUTURE); } datafileSizes.forEach(mutator::putFile); for (Entry<Long,? extends Collection<FileRef>> entry : bulkLoadedFiles.entrySet()) { for (FileRef ref : entry.getValue()) { mutator.putBulkFile(ref, entry.getKey().longValue()); } } mutator.mutate(); }
Source:
<code>public void addingAStudentAddsThemToTheSortedRoster() { School school = new School(); school.add("Aimee", 2); <START> String[] expected = {"Aimee"}; <END> assertArrayEquals(expected, school.roster().toArray(new String[0])); }</code><technical_language>I easier create a list compare that</technical_language>

Target:
public void addingAStudentAddsThemToTheSortedRoster() { school = new School(); school.add("Aimee", 2); List<String> expected = Arrays.asList("Aimee"); assertThat(school.roster(), is(expected)); }
Source:
<code>public void shouldCallActivityNotifier() throws IOException, ServletException { filter.doFilter(request, response, chain); <START> verify(workspaceActivityNotifier).onActivity(); <END> }</code><technical_language>Please, verify call of chain</technical_language>

Target:
public void shouldCallActivityNotifier() throws IOException, ServletException { filter.doFilter(request, response, chain); verify(workspaceActivityNotifier).onActivity(); verify(chain).doFilter(request, response); }
Source:
<code>public void fileIsOpenWhenUsingAFileOutputStream() throws IOException { File file = FileUtils.newFile(TEST_FILE); <START> assertThat(FileUtils.isFileOpen(file), is(false)); <END> FileOutputStream outputStream = new FileOutputStream(file); assertThat(FileUtils.isFileOpen(file), is(true)); outputStream.close(); assertThat(FileUtils.isFileOpen(file), is(false)); }</code><technical_language>static importa</technical_language>

Target:
public void fileIsOpenWhenUsingAFileOutputStream() throws IOException { File file = newFile(TEST_FILE); assertThat(isFileOpen(file), is(false)); FileOutputStream outputStream = new FileOutputStream(file); assertThat(isFileOpen(file), is(true)); outputStream.close(); assertThat(isFileOpen(file), is(false)); }
Source:
<code>Set<Artifact> resolveProjectArtifacts(MavenProject project, Configuration config) throws MojoExecutionException { final LinkedHashSet<Artifact> allArtifacts = new LinkedHashSet<>(resolveArtifacts(project.getArtifacts(), config.dependencyFilter, null, config.verifyPomFiles, false)); if (config.verifyPlugins) { allArtifacts.addAll(resolveArtifacts(project.getPluginArtifacts(), config.pluginFilter, config.dependencyFilter, config.verifyPomFiles, config.verifyPluginDependencies)); <START> allArtifacts.addAll(resolveArtifacts(project.getReportArtifacts(), config.pluginFilter, <END> config.dependencyFilter, config.verifyPomFiles, config.verifyPluginDependencies)); allArtifacts.addAll(resolveArtifacts(project.getBuildPlugins().stream() .flatMap(p -> p.getDependencies().stream()) .map(repositorySystem::createDependencyArtifact) .collect(Collectors.toList()), config.dependencyFilter, config.dependencyFilter, config.verifyPomFiles, config.verifyPluginDependencies)); } if (config.verifyAtypical) { allArtifacts.addAll(resolveArtifacts(searchCompilerAnnotationProcessors(project), config.dependencyFilter, config.dependencyFilter, config.verifyPomFiles, config.verifyPluginDependencies)); } log.debug("Discovered project artifacts: " + allArtifacts); return allArtifacts; }</code><technical_language>pleass add @SuppressWarnings( {"deprecation", "java:S1874"} ) method declaration</technical_language>

Target:
Set<Artifact> resolveProjectArtifacts(MavenProject project, Configuration config) throws MojoExecutionException { final LinkedHashSet<Artifact> allArtifacts = new LinkedHashSet<>(resolveArtifacts(project.getArtifacts(), config.dependencyFilter, null, config.verifyPomFiles, false)); if (config.verifyPlugins) { for (final Plugin plugin : project.getBuildPlugins()) { final LinkedHashSet<Artifact> artifacts = new LinkedHashSet<>(); artifacts.add(repositorySystem.createPluginArtifact(plugin)); artifacts.addAll(plugin.getDependencies().stream() .map(repositorySystem::createDependencyArtifact) .collect(Collectors.toSet())); final Set<Artifact> resolved = resolveArtifacts(artifacts, config.pluginFilter, config.dependencyFilter, config.verifyPomFiles, config.verifyPluginDependencies); if (log.isDebugEnabled()) { log.debug("Build plugin dependencies for " + plugin.getGroupId() + ":" + plugin.getArtifactId() + ":" + plugin.getVersion() + " " + resolved); } allArtifacts.addAll(resolved); } for (final Artifact plugin : project.getReportArtifacts()) { final Set<Artifact> resolved = resolveArtifacts(singleton(plugin), config.pluginFilter, config.dependencyFilter, config.verifyPomFiles, config.verifyPluginDependencies); if (log.isDebugEnabled()) { log.debug("Report plugin dependencies for " + plugin.getGroupId() + ":" + plugin.getArtifactId() + ":" + plugin.getVersion() + " " + resolved); } allArtifacts.addAll(resolved); } } if (config.verifyAtypical) { allArtifacts.addAll(resolveArtifacts(searchCompilerAnnotationProcessors(project), config.dependencyFilter, config.dependencyFilter, config.verifyPomFiles, config.verifyPluginDependencies)); } return allArtifacts; }
Source:
<code>public void afterSendCompletion(Message<?> message, MessageChannel channel, boolean sent, Exception ex) { Span spanFromHeader = getSpanFromHeader(message); <START> getTracer().continueSpan(spanFromHeader); <END> Span continuedSpan = getTracer().getCurrentSpan(); if (containsServerReceived(continuedSpan)) { continuedSpan.logEvent(Span.SERVER_SEND); } else if (spanFromHeader != null) { continuedSpan.logEvent(Span.CLIENT_RECV); } addErrorTag(ex); getTracer().close(continuedSpan); }</code><technical_language>wow I missed serializing span in message headers</technical_language>

Target:
public void afterSendCompletion(Message<?> message, MessageChannel channel, boolean sent, Exception ex) { Span currentSpan = getTracer().getCurrentSpan(); if (containsServerReceived(currentSpan)) { currentSpan.logEvent(Span.SERVER_SEND); } else if (currentSpan != null) { currentSpan.logEvent(Span.CLIENT_RECV); } addErrorTag(ex); getTracer().close(currentSpan); }
Source:
<code>public void test() throws Exception { container.start(SERVER_CONFIG, true); try { ManagementClient client = container.getClient(); ModelNode rr = Util.createEmptyOperation(READ_RESOURCE_OPERATION, PathAddress.EMPTY_ADDRESS); rr.get(INCLUDE_RUNTIME).set(true); rr.get(RECURSIVE).set(true); ModelNode result = client.executeForResult(rr); Assert.assertTrue(result.hasDefined(SUBSYSTEM, "messaging-activemq")); Assert.assertTrue(result.hasDefined(SUBSYSTEM, "jgroups")); <START> client.executeForResult(rr); <END> } finally { container.stop(); } }</code><technical_language>This test longer tests normal admin-only. started normal reloaded admin only, starts admin-only, reload executes read op again</technical_language>

Target:
public void test() throws Exception { container.start(SERVER_CONFIG, false); try { ManagementClient client = container.getClient(); ModelNode rr = Util.createEmptyOperation(READ_RESOURCE_OPERATION, PathAddress.EMPTY_ADDRESS); rr.get(INCLUDE_RUNTIME).set(true); rr.get(RECURSIVE).set(true); ModelNode result = client.executeForResult(rr); Assert.assertTrue(result.hasDefined(SUBSYSTEM, "messaging-activemq")); Assert.assertTrue(result.hasDefined(SUBSYSTEM, "jgroups")); container.reload(); client.executeForResult(rr); } finally { container.stop(); } }
Source:
<code><START> private boolean insertDefaultAccountsTablesContent(Connection conn) { <END> Statement stmt = null; try { stmt = conn.createStatement(); for (Account.Type type : Account.Type.PREDEFINED_ACCOUNT_TYPES) { int correlationTypeId = getCorrelationTypeIdForAccountType(conn, type); if (correlationTypeId > 0) { String sqlString = String.format("INSERT INTO account_types (type_name, display_name, correlation_type_id) VALUES ('%s', '%s', %d)" + getOnConflictDoNothingClause(selectedPlatform), type.getTypeName(), type.getDisplayName(), correlationTypeId); stmt.execute(sqlString); } } } catch (SQLException ex) { LOGGER.log(Level.SEVERE, String.format("Failed to populate default data in Accounts tables."), ex); return false; } finally { if (stmt != null) { try { stmt.close(); } catch (SQLException ex2) { LOGGER.log(Level.SEVERE, "Error closing statement.", ex2); } } } return true; }</code><technical_language>I suppressed messages logged trace, I wrong</technical_language>

Target:
private boolean insertDefaultAccountsTablesContent(Connection conn) { try (Statement stmt = conn.createStatement()) { for (Account.Type type : Account.Type.PREDEFINED_ACCOUNT_TYPES) { int correlationTypeId = getCorrelationTypeIdForAccountType(conn, type); if (correlationTypeId > 0) { String sqlString = String.format("INSERT INTO account_types (type_name, display_name, correlation_type_id) VALUES ('%s', '%s', %d)" + getOnConflictDoNothingClause(selectedPlatform), type.getTypeName(), type.getDisplayName(), correlationTypeId); stmt.execute(sqlString); } } } catch (SQLException ex) { LOGGER.log(Level.SEVERE, String.format("Failed to populate default data in Accounts tables."), ex); return false; } return true; }
Source:
<code>public static TmfProjectElement getFilledProject() throws CoreException { <START> <END> IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME); if (!project.exists()) { project.create(null); } project.open(null); IFolder folder = project.getFolder(TmfTraceFolder.TRACE_FOLDER_NAME); if (!folder.exists()) { folder.create(true, true, null); } File file = new File(PATH); String path = file.getAbsolutePath(); final IPath pathString = Path.fromOSString(path); IResource linkedTrace = TmfImportHelper.createLink(folder, pathString, pathString.lastSegment()); if (!(linkedTrace != null && linkedTrace.exists())) { return null; } linkedTrace.setPersistentProperty(TmfCommonConstants.TRACETYPE, "org.eclipse.linuxtools.tmf.ui.type.ctf"); final TmfProjectElement projectElement = TmfProjectRegistry.getProject(project, true); TmfTraceElement traceElement = projectElement.getTracesFolder().getTraces().get(0); traceElement.refreshTraceType(); return projectElement; }</code><technical_language>TmfProjectRegistry.createProject() create a tracing project</technical_language>

Target:
public static TmfProjectElement getFilledProject() throws CoreException { IProject project = TmfProjectRegistry.createProject(PROJECT_NAME, null, null); IFolder traceFolder = project.getFolder(TmfTraceFolder.TRACE_FOLDER_NAME); File file = new File(PATH); String path = file.getAbsolutePath(); final IPath pathString = Path.fromOSString(path); IResource linkedTrace = TmfImportHelper.createLink(traceFolder, pathString, pathString.lastSegment()); if (!(linkedTrace != null && linkedTrace.exists())) { return null; } linkedTrace.setPersistentProperty(TmfCommonConstants.TRACETYPE, "org.eclipse.linuxtools.tmf.ui.type.ctf"); final TmfProjectElement projectElement = TmfProjectRegistry.getProject(project, true); TmfTraceElement traceElement = projectElement.getTracesFolder().getTraces().get(0); traceElement.refreshTraceType(); return projectElement; }
Source:
<code>private Set<TaskError> validateAction(Task task, Channel channel, TaskActionInformation action) { LOGGER.debug("Validating task action: from task: with ID: {}", action.getName(), task.getName(), task.getId()); Set<TaskError> errors = new HashSet<>(); if (channel == null) { errors.add(new TaskError("task.validation.error.actionChannelNotRegistered")); return errors; } if (channel.getModuleName().equalsIgnoreCase(action.getModuleName())) { errors.addAll(taskValidator.validateAction(action, channel)); TriggerEvent trigger = triggerEventService.getTrigger(task.getTrigger()); Map<Long, TaskDataProvider> providers = getProviders(task); <START> ActionEvent actionEvent = ChannelUtils.getAction(channel, action); <END> if (actionEvent != null) { errors.addAll(taskValidator.validateActionFields(action, actionEvent, trigger, providers)); } } logResultOfValidation("task action", task.getName(), errors); return errors; }</code><technical_language>Is a reason for moving this kind of methods utils? Simple methods contains getAction fit domain classes in opinion. If move logic static helpers, object oriented</technical_language>

Target:
private Set<TaskError> validateAction(Task task, Channel channel, TaskActionInformation action) { LOGGER.debug("Validating task action: from task: with ID: {}", action.getName(), task.getName(), task.getId()); Set<TaskError> errors = new HashSet<>(); if (channel == null) { errors.add(new TaskError("task.validation.error.actionChannelNotRegistered")); return errors; } if (channel.getModuleName().equalsIgnoreCase(action.getModuleName())) { errors.addAll(taskValidator.validateAction(action, channel)); TriggerEvent trigger = triggerEventService.getTrigger(task.getTrigger()); Map<Long, TaskDataProvider> providers = getProviders(task); ActionEvent actionEvent = channel.getAction(action); if (actionEvent != null) { errors.addAll(taskValidator.validateActionFields(action, actionEvent, trigger, providers)); } } logResultOfValidation("task action", task.getName(), errors); return errors; }
Source:
<code>private void populateCurrentLags(Set<SystemStreamPartition> ssps) { Map<MetricName, ? extends Metric> consumerMetrics = kafkaConsumer.metrics(); if (perPartitionMetrics.isEmpty()) { populateMetricNames(ssps); } for (SystemStreamPartition ssp : ssps) { MetricName mn = perPartitionMetrics.get(ssp); Metric currentLagM = consumerMetrics.get(mn); long currentLag = (currentLagM != null) ? (long) currentLagM.value() : -1L; latestLags.put(ssp, currentLag); sink.setIsAtHighWatermark(ssp, currentLag == 0); } }</code><technical_language>Delete unused code</technical_language>

Target:
private void populateCurrentLags(Set<SystemStreamPartition> ssps) { Map<MetricName, ? extends Metric> consumerMetrics = kafkaConsumer.metrics(); if (perPartitionMetrics.isEmpty()) { HashMap<String, String> tags = new HashMap<>(); tags.put("client-id", clientId); for (SystemStreamPartition ssp : ssps) { TopicPartition tp = KafkaSystemConsumer.toTopicPartition(ssp); perPartitionMetrics.put(ssp, new MetricName(tp + ".records-lag", "consumer-fetch-manager-metrics", "", tags)); } } for (SystemStreamPartition ssp : ssps) { MetricName mn = perPartitionMetrics.get(ssp); Metric currentLagMetric = consumerMetrics.get(mn); long currentLag = (currentLagMetric != null) ? (long) currentLagMetric.value() : -1L; latestLags.put(ssp, currentLag); sink.setIsAtHighWatermark(ssp, currentLag == 0); } }
Source:
<code>public void testLoadFile() throws Exception { InputStream inputStream = loadResource(); <START> final String PREFIX = "defaults_temp"; <END> final String SUFFIX = "yaml"; File file = File.createTempFile(PREFIX, SUFFIX); file.deleteOnExit(); OutputStream outputStream = new FileOutputStream(file); IOUtils.copy(inputStream, outputStream); outputStream.close(); Map<String, Object> props = ConfigReader.loadFile(file.getAbsolutePath()); testProperty(props); }</code><technical_language>ALL_CAPS is for class-level psf Strings. moved class level passed createTempFile making a one-time string variable</technical_language>

Target:
public void testLoadFile() throws Exception { InputStream inputStream = loadResource(); File file = File.createTempFile("defaults_temp", "yaml"); file.deleteOnExit(); OutputStream outputStream = new FileOutputStream(file); IOUtils.copy(inputStream, outputStream); outputStream.close(); Map<String, Object> props = ConfigReader.loadFile(file.getAbsolutePath()); testProperty(props); }
Source:
<code>private void initializeUser() { mUser.loadUserImage(getActivity(), mPhoto); mName.setText(mUser.getName()); mVolunteer.setText(User.VOLUNTEER_SPINNER[mUser.getVolunteerType()]); int hoursRequired = mUser.getUserSemester() == null ? 0 : mUser.getUserSemester().getHoursRequired(); mTotalSemester.setText(String.valueOf(hoursRequired)); String totalHours = mUser.getUserSemester() == null ? String.valueOf(0) : mUser.getUserSemester().getTimeString(); mTotalHours.setText(totalHours); mTotalWeek.setText(String.valueOf(mUser.getVolunteerType() + 1)); String schoolString = mUser.getSchool() == null ? "N/A" : mUser.getSchool().getName(); mSchool.setText(schoolString); int role = mUser.getRole(); if (mUser.getDirectorId() != 0) { role = 3; } <START> mUserType.setVisibility(View.VISIBLE); <END> mUserType.setTypeface(null, Typeface.BOLD); GradientDrawable shape = (GradientDrawable) mUserType.getBackground(); mUserType.setText(ROLES[role]); switch(role) { case 0: mUserType.setVisibility(View.GONE); break; case 1: shape.setColor(getResources().getColor(R.color.orange_admin)); break; case 2: shape.setColor(getResources().getColor(R.color.blue_president)); break; case 3: shape.setColor(getResources().getColor(R.color.turquoise_director)); break; } mToolbarInterface.setTitle("User"); }</code><technical_language>this default visible</technical_language>

Target:
private void initializeUser() { mUser.loadUserImage(getActivity(), mPhoto); mName.setText(mUser.getName()); mVolunteer.setText(User.VOLUNTEER_SPINNER[mUser.getVolunteerType()]); int hoursRequired = mUser.getUserSemester() == null ? 0 : mUser.getUserSemester().getHoursRequired(); mTotalSemester.setText(String.valueOf(hoursRequired)); String totalHours = mUser.getUserSemester() == null ? String.valueOf(0) : mUser.getUserSemester().getTimeString(); mTotalHours.setText(totalHours); mTotalWeek.setText(String.valueOf(mUser.getVolunteerType() + 1)); String schoolString = mUser.getSchool() == null ? "N/A" : mUser.getSchool().getName(); mSchool.setText(schoolString); UserUtils.setType(getActivity(), mUser, mUserType, null, mUser.ROLES_LABEL); mToolbarInterface.setTitle("User"); }
Source:
<code>public ModuleAction save(ModuleAction delegate) { <START> throw new IllegalArgumentException("ModuleAction cannot be saved"); <END> }</code><technical_language>this ResourceDoesNotSupportOperationException</technical_language>

Target:
public ModuleAction save(ModuleAction delegate) { throw new UnsupportedOperationException("ModuleAction cannot be saved"); }
Source:
<code>public static void main(String[] args) throws Exception { Logging.initialize(); DistributedQueryRunner queryRunner = createQueryRunner(ImmutableMap.of("http-server.http.port", "8080")); Thread.sleep(10); Logger log = Logger.get(GeoQueryRunner.class); <START> log.info("======== SERVER STARTED ========"); <END> log.info("\n====\n%s\n====", queryRunner.getCoordinator().getBaseUrl()); }</code><technical_language>do need this sleep</technical_language>

Target:
public static void main(String[] args) throws Exception { Logging.initialize(); DistributedQueryRunner queryRunner = createQueryRunner(ImmutableMap.of("http-server.http.port", "8080")); Logger log = Logger.get(GeoQueryRunner.class); log.info("======== SERVER STARTED ========"); log.info("\n====\n%s\n====", queryRunner.getCoordinator().getBaseUrl()); }
Source:
<code>public @ResponseBody BoxDto removeMultipleItems(@PathVariable long boxId, @RequestBody List<String> positions) throws IOException { Box box = getBox(boxId); for (String position : positions) { <START> box.getBoxPositions().remove(position); <END> } boxService.save(box); return getBoxDtoWithBoxables(boxId); }</code><technical_language>add a check is item in position removing it? (I selected a column a blank positions clicked "discard selected" returned Internal Server Error: item in box position I closed dialog page refresh looked happened, I manually refreshed page turned out selected items discarded)</technical_language>

Target:
public @ResponseBody BoxDto removeMultipleItems(@PathVariable long boxId, @RequestBody List<String> positions) throws IOException { Box box = getBox(boxId); for (String position : positions) { if (box.getBoxPositions().containsKey(position)) { box.getBoxPositions().remove(position); } } boxService.save(box); return getBoxDtoWithBoxables(boxId); }
Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.list_activity); ButterKnife.bind(this); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); String listName = getIntent().getStringExtra(MainActivity.LIST_NAME_KEY); setTitle(listName); <START> boolean startFormEditPage = getIntent().getBooleanExtra(LIST_TYPE,false); <END> preferencesManager = new PreferencesManager(this); ListTabsAdapter listTabsAdapter = new ListTabsAdapter( getSupportFragmentManager(), listName, listTabTitles); nameListPager.setAdapter(listTabsAdapter); if (startFormEditPage){ nameListPager.setCurrentItem(EDIT_NAME_LIST_FRAGMENT); } nameListTabs.setupWithViewPager(nameListPager); shakeDetector = new ShakeDetector(this); if (preferencesManager.shouldShowShake()) { new MaterialDialog.Builder(this) .title(R.string.shake_it) .content(R.string.shake_now_supported) .positiveText(android.R.string.yes) .cancelable(false) .show(); } }</code><technical_language>suggestion boolean startFromEditPage = getIntent().getBooleanExtra(START_ON_EDIT_PAGE, false);</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.list_activity); ButterKnife.bind(this); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); String listName = getIntent().getStringExtra(MainActivity.LIST_NAME_KEY); setTitle(listName); preferencesManager = new PreferencesManager(this); ListTabsAdapter listTabsAdapter = new ListTabsAdapter( getSupportFragmentManager(), listName, listTabTitles); nameListPager.setAdapter(listTabsAdapter); if (getIntent().getBooleanExtra(START_ON_EDIT_PAGE, false)) { nameListPager.setCurrentItem(EDIT_NAME_LIST_PAGE_POSITION); } nameListTabs.setupWithViewPager(nameListPager); shakeDetector = new ShakeDetector(this); if (preferencesManager.shouldShowShake()) { new MaterialDialog.Builder(this) .title(R.string.shake_it) .content(R.string.shake_now_supported) .positiveText(android.R.string.yes) .cancelable(false) .show(); } }
Source:
<code>private void createTableReplLogTask() throws SemanticException { ReplStateLogWork replLogWork = new ReplStateLogWork(replLogger, tableDesc.getTableName(), tableDesc.tableType()); Task<ReplStateLogWork> replLogTask = TaskFactory.get(replLogWork, context.hiveConf); if (tracker.tasks().isEmpty()) { <START> tracker.addTask(replLogTask); <END> } else { ReplLoadTask.dependency(tracker.tasks(), replLogTask); } }</code><technical_language>tracker is account this new task added</technical_language>

Target:
private void createTableReplLogTask() throws SemanticException { ReplStateLogWork replLogWork = new ReplStateLogWork(replLogger, tableDesc.getTableName(), tableDesc.tableType()); Task<ReplStateLogWork> replLogTask = TaskFactory.get(replLogWork, context.hiveConf); if (tracker.tasks().isEmpty()) { tracker.addTask(replLogTask); } else { ReplLoadTask.dependency(tracker.tasks(), replLogTask); List<Task<? extends Serializable>> visited = new ArrayList<>(); tracker.updateTaskCount(replLogTask, visited); } }
Source:
<code>public void onConnectionStateChange(String newConnectionState, String reason) { if (newConnectionState.equals(NOT_AUTHENTICATED) || newConnectionState.equals(CONNECTION_LOST)) { switch (reason) { case WRONG_APP_TOKEN: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "User defined Applicationtoken is wrong."); break; case WRONG_USER_OR_PASSWORD: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "The set username or password is wrong."); break; case NO_USER_PASSWORD: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "no username or password is set to genarate appicationtoken. Please set user name and password or applicationtoken."); break; case CONNECTON_TIMEOUT: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, "Connection lost because connection timeout to Server."); break; case HOST_NOT_FOUND: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, "Server not found! Please check this points:\n" + " - DigitalSTROM-Server turned on?\n" <START> + " - hostadress correct?\n" + " - ethernet cable connection established?"); <END> break; case UNKNOWN_HOST: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, "Unkown host name, pleas check the set host name!"); break; case INVALID_URL: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "Invalide URL is set."); break; default: } } }</code><technical_language>typo "host address"</technical_language>

Target:
public void onConnectionStateChange(String newConnectionState, String reason) { if (newConnectionState.equals(NOT_AUTHENTICATED) || newConnectionState.equals(CONNECTION_LOST)) { switch (reason) { case WRONG_APP_TOKEN: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "User defined Application-Token is wrong."); break; case WRONG_USER_OR_PASSWORD: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "The set username or password is wrong."); break; case NO_USER_PASSWORD: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "No username or password is set to generate Application-Token. Please set user name and password or Application-Token."); break; case CONNECTON_TIMEOUT: if (connectionTimeoutCounter++ > 0) { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, "Connection lost because connection timeout to Server."); } return; case HOST_NOT_FOUND: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, "Server not found! Please check these points:\n" + " - Is digitalSTROM-Server turned on?\n" + " - Is the host address correct?\n" + " - Is the ethernet cable connection established?"); break; case UNKNOWN_HOST: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, "Unkown host name, please check the set host name!"); break; case INVALID_URL: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "Invalid URL is set."); break; default: } connectionTimeoutCounter = 0; devStatMan.stop(); } }