auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public ContainerRequest filter(ContainerRequest request) { if (getAuthConfig().isEnabled()) { final String resourceName; if (request.getPath().startsWith("druid/worker/v1") || request.getPath().startsWith("druid/indexer/v1")) { resourceName = "WORKER"; } else if (request.getPath().startsWith("druid/coordinator/v1/config")) { resourceName = "COORDINATOR"; } else { throw new WebApplicationException( Response.status(Response.Status.BAD_REQUEST).entity( String.format( "Do not know how to authorize this request path [%s] with ConfigResourceFilter", request.getPath() ) ).build() ); } final AuthorizationInfo authorizationInfo = (AuthorizationInfo) getReq().getAttribute(AuthConfig.DRUID_AUTH_TOKEN); Preconditions.checkNotNull( authorizationInfo, "Security is enabled but no authorization info found in the request" ); final Access authResult = authorizationInfo.isAuthorized( new Resource(resourceName, ResourceType.CONFIG), getAction(request) ); if (!authResult.isAllowed()) { throw new WebApplicationException( Response.status(Response.Status.FORBIDDEN) .entity(String.format("Access-Check-Result: %s", authResult.toString())) .build() ); } } return request; }

Target:
public ContainerRequest filter(ContainerRequest request) { if (getAuthConfig().isEnabled()) { final String resourceName = "CONFIG"; final AuthorizationInfo authorizationInfo = (AuthorizationInfo) getReq().getAttribute(AuthConfig.DRUID_AUTH_TOKEN); Preconditions.checkNotNull( authorizationInfo, "Security is enabled but no authorization info found in the request" ); final Access authResult = authorizationInfo.isAuthorized( new Resource(resourceName, ResourceType.CONFIG), getAction(request) ); if (!authResult.isAllowed()) { throw new WebApplicationException( Response.status(Response.Status.FORBIDDEN) .entity(String.format("Access-Check-Result: %s", authResult.toString())) .build() ); } } return request; }
Source:
public void init(StateTransferLock stateTransferLock, Configuration configuration, StateTransferManager stateTransferManager, GroupManager groupManager) { this.stateTransferLock = stateTransferLock; this.stateTransferManager = stateTransferManager; this.groupManager = groupManager; transactionDataTimeout = configuration.clustering().sync().replTimeout(); }

Target:
public void init(StateTransferLock stateTransferLock, Configuration configuration, StateTransferManager stateTransferManager, GroupManager groupManager) { this.stateTransferLock = stateTransferLock; this.stateTransferManager = stateTransferManager; this.groupManager = groupManager; transactionDataTimeout = configuration.clustering().remoteTimeout(); }
Source:
public void execute(IProgressMonitor m) throws CoreException { if (pullResult != null) throw new CoreException(new Status(IStatus.ERROR, Activator .getPluginId(), CoreText.OperationAlreadyExecuted)); IProgressMonitor monitor; if (m == null) monitor = new NullProgressMonitor(); else monitor = m; IWorkspaceRunnable action = new IWorkspaceRunnable() { public void run(IProgressMonitor mymonitor) throws CoreException { PullCommand pull = new Git(repository).pull(); try { pull.setProgressMonitor(new EclipseGitProgressTransformer( mymonitor)); pull.setTimeout(timeout); pullResult = pull.call(); } catch (GitAPIException e) { IStatus error = new Status(IStatus.ERROR, Activator .getPluginId(), e.getMessage(), e); throw new CoreException(error); } } }; ResourcesPlugin.getWorkspace().run(action, monitor); }

Target:
public void execute(IProgressMonitor m) throws CoreException { if (pullResult != null) throw new CoreException(new Status(IStatus.ERROR, Activator .getPluginId(), CoreText.OperationAlreadyExecuted)); IProgressMonitor monitor; if (m == null) monitor = new NullProgressMonitor(); else monitor = m; IWorkspaceRunnable action = new IWorkspaceRunnable() { public void run(IProgressMonitor mymonitor) throws CoreException { PullCommand pull = new Git(repository).pull(); try { pull.setProgressMonitor(new EclipseGitProgressTransformer( mymonitor)); pull.setTimeout(timeout); pullResult = pull.call(); } catch (GitAPIException e) { throw new CoreException(Activator.error(e.getMessage(), e)); } } }; ResourcesPlugin.getWorkspace().run(action, monitor); }
Source:
public boolean onMarkerClick(Marker marker) { AnnotationProxy annoProxy = getProxyByMarker(marker); if (annoProxy == null) { Log.e(TAG, "Marker can not be found, click event won't fired.", Log.DEBUG_MODE); return false; } else if (selectedAnnotation != null && selectedAnnotation.equals(annoProxy)) { selectedAnnotation.hideInfo(); selectedAnnotation = null; fireClickEvent(marker, annoProxy, MapModule.PROPERTY_PIN); return true; } fireClickEvent(marker, annoProxy, MapModule.PROPERTY_PIN); selectedAnnotation = annoProxy; if (annoProxy.getShowInfoWindow()) { return false; } else { return true; } }

Target:
public boolean onMarkerClick(Marker marker) { AnnotationProxy annoProxy = getProxyByMarker(marker); if (annoProxy == null) { Log.e(TAG, "Marker can not be found, click event won't fired.", Log.DEBUG_MODE); return false; } else if (selectedAnnotation != null && selectedAnnotation.equals(annoProxy)) { selectedAnnotation.hideInfo(); selectedAnnotation = null; fireClickEvent(marker, annoProxy, MapModule.PROPERTY_PIN); return true; } fireClickEvent(marker, annoProxy, MapModule.PROPERTY_PIN); selectedAnnotation = annoProxy; boolean showInfoWindow = TiConvert.toBoolean(annoProxy.getProperty(MapModule.PROPERTY_SHOW_INFO_WINDOW), true); if (showInfoWindow) { return false; } else { return true; } }
Source:
public void cancel() throws InterruptedException { super.cancel(); info("Cancel called. Killing the Hive launched MR jobs on the cluster"); String azExecId = jobProps.getString("azkaban.flow.execid"); final String logFilePath = String.format("%s/_job.%s.%s.log", getWorkingDirectory(), azExecId, getId()); info("log file path is: " + logFilePath); HadoopJobUtils.proxyUserKillAllSpawnedHadoopJobs(logFilePath, jobProps, tokenFile, getLog()); }

Target:
public void cancel() throws InterruptedException { super.cancel(); info("Cancel called. Killing the Hive launched MR jobs on the cluster"); String azExecId = jobProps.getString(CommonJobProperties.EXEC_ID); final String logFilePath = String.format("%s/_job.%s.%s.log", getWorkingDirectory(), azExecId, getId()); info("log file path is: " + logFilePath); HadoopJobUtils.proxyUserKillAllSpawnedHadoopJobs(logFilePath, jobProps, tokenFile, getLog()); }
Source:
private Request logAndReplaceRequest(Request request) throws IOException { log.log(String.format("---> HTTP %s %s", request.getMethod(), request.getUrl())); for (Header header : request.getHeaders()) { log.log(header.getName() + ": " + header.getValue()); } TypedOutput body = request.getBody(); if (body != null) { if (!request.getHeaders().isEmpty()) { log.log(""); } ByteArrayOutputStream baos = new ByteArrayOutputStream(); body.writeTo(baos); byte[] bodyBytes = baos.toByteArray(); String bodyMime = body.mimeType(); String bodyString = new String(bodyBytes, Utils.parseCharset(bodyMime)); for (int i = 0; i < bodyString.length(); i += LOG_CHUNK_SIZE) { int end = Math.min(bodyString.length(), i + LOG_CHUNK_SIZE); log.log(bodyString.substring(i, end)); } body = new TypedByteArray(bodyMime, bodyBytes); } log.log("---> END HTTP"); return new Request(request.getMethod(), request.getUrl(), request.getHeaders(), body); }

Target:
private Request logAndReplaceRequest(Request request) throws IOException { log.log(String.format("---> HTTP %s %s", request.getMethod(), request.getUrl())); for (Header header : request.getHeaders()) { log.log(header.getName() + ": " + header.getValue()); } TypedOutput body = request.getBody(); int bodySize = 0; if (body != null) { if (!request.getHeaders().isEmpty()) { log.log(""); } ByteArrayOutputStream baos = new ByteArrayOutputStream(); body.writeTo(baos); byte[] bodyBytes = baos.toByteArray(); bodySize = bodyBytes.length; String bodyMime = body.mimeType(); String bodyString = new String(bodyBytes, Utils.parseCharset(bodyMime)); for (int i = 0; i < bodyString.length(); i += LOG_CHUNK_SIZE) { int end = Math.min(bodyString.length(), i + LOG_CHUNK_SIZE); log.log(bodyString.substring(i, end)); } body = new TypedByteArray(bodyMime, bodyBytes); } log.log(String.format("---> END HTTP (%s-byte body)", bodySize)); return new Request(request.getMethod(), request.getUrl(), request.getHeaders(), body); }
Source:
public synchronized void sendUpdates(Map<String, Object> state, Set<String> changed) { if (state.get("ScoreBoard.CurrentPeriodNumber") != "0") { if ((inJam && !bool(state.get("ScoreBoard.InJam"))) || (bool(state.get("ScoreBoard.OfficialScore")) && !bool(state.get("ScoreBoard.StatsLocked")) && containsRelevantUpdate(changed))) { writeFile(state); } } inJam = bool(state.get("ScoreBoard.InJam")); }

Target:
public synchronized void sendUpdates(Map<String, Object> state, Set<String> changed) { if (state.get("ScoreBoard.CurrentPeriodNumber") != "0") { if ((inJam && !bool(state.get("ScoreBoard.InJam"))) || (bool(state.get("ScoreBoard.OfficialScore")) && containsRelevantUpdate(changed))) { writeFile(state); } } inJam = bool(state.get("ScoreBoard.InJam")); }
Source:
public Object getEntity(EntityView view, Map<String, Object> params) { String siteId = view.getPathSegment(2); if (siteId == null || "".equals(siteId)) { throw new IllegalArgumentException("No siteId in provided reference"); } Site site; try { site = siteService.getSite(siteId); } catch (IdUnusedException e) { throw new IllegalArgumentException("Cannot find site by siteId: " + siteId, e); } String fileLocation = site.getInfoUrl(); String description = site.getDescription(); EntityOverview eo = new EntityOverview(); if (fileLocation == null) { if (description != null) { eo.setData(site.getDescription()); } else { eo.setData(site.getTitle()); } } else { ContentResource resource = null; String resourceLocation = fileLocation.replaceAll("/access/content", ""); try { resource = contentService.getResource(resourceLocation); if ("text/html".equals(resource.getContentType())) { eo.setData(new String(resource.getContent())); } } catch (PermissionException pe) { log.warn("Permission exception: " + pe); } catch (IdUnusedException ie) { log.warn("ID unused exception: " + ie); } catch (TypeException te) { log.warn("Type exception: " + te); } catch (ServerOverloadException se) { log.warn("Server overload exception: " + se); } } return eo; }

Target:
public Object getEntity(EntityView view, Map<String, Object> params) throws PermissionException { String siteId = view.getPathSegment(2); if (siteId == null || "".equals(siteId)) { throw new IllegalArgumentException("No siteId in provided reference"); } Site site; try { site = siteService.getSiteVisit(siteId); } catch (IdUnusedException e) { throw new IllegalArgumentException("Cannot find site by siteId: " + siteId, e); } catch (PermissionException pe) { throw new SecurityException(pe); } String fileLocation = site.getInfoUrl(); String description = site.getDescription(); EntityOverview eo = new EntityOverview(); if (fileLocation == null) { if (description != null) { eo.setData(site.getDescription()); } else { eo.setData(site.getTitle()); } } else { ContentResource resource = null; String resourceLocation = fileLocation.replaceAll("/access/content", ""); try { resource = contentService.getResource(resourceLocation); if ("text/html".equals(resource.getContentType())) { eo.setData(new String(resource.getContent())); } } catch (PermissionException pe) { log.warn("Permission exception: " + pe); } catch (IdUnusedException ie) { log.warn("ID unused exception: " + ie); } catch (TypeException te) { log.warn("Type exception: " + te); } catch (ServerOverloadException se) { log.warn("Server overload exception: " + se); } } return eo; }
Source:
public static List<List<TurboIssueEvent>> groupLabelUpdateEvents( List<TurboIssueEvent> labelUpdateEvents) { assert labelUpdateEvents != null : "Error: Received null list of events"; List<TurboIssueEvent> events = new ArrayList<>(labelUpdateEvents); List<List<TurboIssueEvent>> result = new ArrayList<>(); List<TurboIssueEvent> currentSubList = new ArrayList<>(); Collections.sort(events, (e1, e2) -> { return e1.getDate().compareTo(e2.getDate()); }); Collections.sort(events, (e1, e2) -> { return e1.getActor().getLogin().compareTo(e2.getActor().getLogin()); }); for (TurboIssueEvent e : events) { if (currentSubList.isEmpty() || e.isInSameLabelUpdateEventGroup(currentSubList.get(0))) { currentSubList.add(e); } else { result.add(currentSubList); currentSubList = new ArrayList<>(); currentSubList.add(e); } } if (!currentSubList.isEmpty()) { result.add(currentSubList); } Collections.sort(result, (l1, l2) -> { return l1.get(0).getDate().compareTo(l2.get(0).getDate()); }); return result; }

Target:
public static List<List<TurboIssueEvent>> groupLabelUpdateEvents( List<TurboIssueEvent> labelUpdateEvents) { assert labelUpdateEvents != null : "Error: Received null list of events"; List<TurboIssueEvent> events = new ArrayList<>(labelUpdateEvents); List<List<TurboIssueEvent>> result = new ArrayList<>(); List<TurboIssueEvent> currentSubList = new ArrayList<>(); Collections.sort(events, (e1, e2) -> e1.getDate().compareTo(e2.getDate())); Collections.sort(events, (e1, e2) -> e1.getActor().getLogin().compareTo(e2.getActor().getLogin())); for (TurboIssueEvent e : events) { if (currentSubList.isEmpty() || e.isInSameLabelUpdateEventGroup(currentSubList.get(0))) { currentSubList.add(e); } else { result.add(currentSubList); currentSubList = new ArrayList<>(); currentSubList.add(e); } } if (!currentSubList.isEmpty()) { result.add(currentSubList); } Collections.sort(result, (l1, l2) -> l1.get(0).getDate().compareTo(l2.get(0).getDate())); return result; }
Source:
public void process(final K key, final V value) { if (key == null) { LOG.warn( "Skipping record due to null key. topic=[{}] partition=[{}] offset=[{}]", context().topic(), context().partition(), context().offset() ); droppedRecordsSensor.record(); return; } if (queryableName != null) { final MeteredTimestampedKeyValueStore<K, V>.RawAndDeserializedValue<V> tuple = store.getWithBinary(key); final ValueAndTimestamp<V> oldValueAndTimestamp = tuple.value; final V oldValue; if (oldValueAndTimestamp != null) { oldValue = oldValueAndTimestamp.value(); if (context().timestamp() < oldValueAndTimestamp.timestamp()) { LOG.warn("Detected out-of-order KTable update for at offset {}, partition {}.", store.name(), context().offset(), context().partition()); } } else { oldValue = null; } final boolean isDifferentValue = store.putIfDifferentValues(key, ValueAndTimestamp.make(value, context().timestamp()), tuple.serializedValue); if (isDifferentValue) { tupleForwarder.maybeForward(key, value, oldValue); } else { skippedIdempotentUpdatesSensor.record(); } } else { context().forward(key, new Change<>(value, null)); } }

Target:
public void process(final K key, final V value) { if (key == null) { LOG.warn( "Skipping record due to null key. topic=[{}] partition=[{}] offset=[{}]", context().topic(), context().partition(), context().offset() ); droppedRecordsSensor.record(); return; } if (queryableName != null) { final RawAndDeserializedValue<V> tuple = store.getWithBinary(key); final ValueAndTimestamp<V> oldValueAndTimestamp = tuple.value; final V oldValue; if (oldValueAndTimestamp != null) { oldValue = oldValueAndTimestamp.value(); if (context().timestamp() < oldValueAndTimestamp.timestamp()) { LOG.warn("Detected out-of-order KTable update for at offset {}, partition {}.", store.name(), context().offset(), context().partition()); } } else { oldValue = null; } final ValueAndTimestamp<V> newValueAndTimestamp = ValueAndTimestamp.make(value, context().timestamp()); final boolean isDifferentValue = store.putIfDifferentValues(key, newValueAndTimestamp, tuple.serializedValue); if (isDifferentValue) { tupleForwarder.maybeForward(key, value, oldValue); } else { skippedIdempotentUpdatesSensor.record(); } } else { context().forward(key, new Change<>(value, null)); } }
Source:
protected BoundType(AnnotatedTypeMirror type) { if (type.getKind() == TypeKind.WILDCARD) { AnnotatedWildcardType wildcardType = (AnnotatedWildcardType) type; this.lower = wildcardType.getSuperBound(); this.upper = wildcardType.getExtendsBound(); } else if (TypesUtils.isCaptured(type.getUnderlyingType())) { AnnotatedTypeVariable typeVariable = (AnnotatedTypeVariable) type; this.lower = typeVariable.getLowerBound(); this.upper = typeVariable.getUpperBound(); } else { throw new BugInCF("Unexpected: %s", type); } this.hasSuperBound = lower.getKind() != TypeKind.NULL; }

Target:
protected BoundType(AnnotatedTypeMirror type) { if (type.getKind() == TypeKind.WILDCARD) { AnnotatedWildcardType wildcardType = (AnnotatedWildcardType) type; this.lower = wildcardType.getSuperBound(); this.upper = wildcardType.getExtendsBound(); } else if (TypesUtils.isCaptured(type.getUnderlyingType())) { AnnotatedTypeVariable typeVariable = (AnnotatedTypeVariable) type; this.lower = typeVariable.getLowerBound(); this.upper = typeVariable.getUpperBound(); } else { throw new BugInCF("Unexpected: %s", type); } this.hasExplicitLowerBound = lower.getKind() != TypeKind.NULL; }
Source:
public double withReadLock() { return rwLock.withReadLock(() -> { return Math.random(); }); }

Target:
public double withReadLock() { return rwLock.withReadLock(() -> { return random(); }); }
Source:
public void testNormal() { byte[] lastStringArray = "client".getBytes(); byte[] lastArray = new byte[lastStringArray.length + 32]; arraycopy(lastStringArray, 0, lastArray, 0, lastStringArray.length); List<byte[]> buffers = ImmutableList.of( "hello ".getBytes(), "this ".getBytes(), "is ".getBytes(), "http ".getBytes(), lastArray); byte[] expectedAll = "hello this is http client".getBytes(); byte[] expectedPartial = "hello this".getBytes(); try (GatheringByteArrayInputStream in = new GatheringByteArrayInputStream(buffers, expectedAll.length)) { byte[] buffer = new byte[expectedAll.length + 32]; assertEquals(in.read(buffer, 0, expectedPartial.length), expectedPartial.length); assertByteArrayEquals(buffer, 0, expectedPartial, 0, expectedPartial.length); assertEquals(in.read(buffer, expectedPartial.length, buffer.length - expectedPartial.length), expectedAll.length - expectedPartial.length); assertByteArrayEquals(buffer, 0, expectedAll, 0, expectedAll.length); assertEquals(-1, in.read(buffer, 0, expectedAll.length)); } }

Target:
public void testNormal() { byte[] lastStringArray = "client".getBytes(); byte[] lastArray = Arrays.copyOf(lastStringArray, lastStringArray.length + 32); arraycopy(lastStringArray, 0, lastArray, 0, lastStringArray.length); List<byte[]> buffers = ImmutableList.of( "hello ".getBytes(), "this ".getBytes(), "is ".getBytes(), "http ".getBytes(), lastArray); byte[] expectedAll = "hello this is http client".getBytes(); byte[] expectedPartial = "hello this".getBytes(); try (GatheringByteArrayInputStream in = new GatheringByteArrayInputStream(buffers, expectedAll.length)) { byte[] buffer = new byte[expectedAll.length + 32]; assertEquals(in.read(buffer, 0, expectedPartial.length), expectedPartial.length); assertByteArrayEquals(buffer, 0, expectedPartial, 0, expectedPartial.length); assertEquals(in.read(buffer, expectedPartial.length, buffer.length - expectedPartial.length), expectedAll.length - expectedPartial.length); assertByteArrayEquals(buffer, 0, expectedAll, 0, expectedAll.length); assertEquals(-1, in.read(buffer, 0, expectedAll.length)); } }
Source:
public Seq<? extends E> getErrors() { return errors; }

Target:
public Seq<E> getErrors() { return errors; }
Source:
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; QueryInterval that = (QueryInterval) o; if (referenceIndex != that.referenceIndex) return false; if (start != that.start) return false; return end == that.end; }

Target:
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; QueryInterval that = (QueryInterval) o; return this.compareTo(that) == 0; }
Source:
private int getCmasSeverity() { switch (messageIdentifier) { case SmsCbConstants.MESSAGE_ID_CMAS_ALERT_EXTREME_IMMEDIATE_OBSERVED: case SmsCbConstants.MESSAGE_ID_CMAS_ALERT_EXTREME_IMMEDIATE_LIKELY: return SmsCbCmasInfo.CMAS_SEVERITY_EXTREME; case SmsCbConstants.MESSAGE_ID_CMAS_ALERT_EXTREME_EXPECTED_OBSERVED: case SmsCbConstants.MESSAGE_ID_CMAS_ALERT_EXTREME_EXPECTED_LIKELY: case SmsCbConstants.MESSAGE_ID_CMAS_ALERT_SEVERE_IMMEDIATE_OBSERVED: case SmsCbConstants.MESSAGE_ID_CMAS_ALERT_SEVERE_IMMEDIATE_LIKELY: case SmsCbConstants.MESSAGE_ID_CMAS_ALERT_SEVERE_EXPECTED_OBSERVED: case SmsCbConstants.MESSAGE_ID_CMAS_ALERT_SEVERE_EXPECTED_LIKELY: return SmsCbCmasInfo.CMAS_SEVERITY_SEVERE; default: return SmsCbCmasInfo.CMAS_SEVERITY_UNKNOWN; } }

Target:
private int getCmasSeverity() { switch (messageIdentifier) { case SmsCbConstants.MESSAGE_ID_CMAS_ALERT_EXTREME_IMMEDIATE_OBSERVED: case SmsCbConstants.MESSAGE_ID_CMAS_ALERT_EXTREME_IMMEDIATE_LIKELY: case SmsCbConstants.MESSAGE_ID_CMAS_ALERT_EXTREME_EXPECTED_OBSERVED: case SmsCbConstants.MESSAGE_ID_CMAS_ALERT_EXTREME_EXPECTED_LIKELY: return SmsCbCmasInfo.CMAS_SEVERITY_EXTREME; case SmsCbConstants.MESSAGE_ID_CMAS_ALERT_SEVERE_IMMEDIATE_OBSERVED: case SmsCbConstants.MESSAGE_ID_CMAS_ALERT_SEVERE_IMMEDIATE_LIKELY: case SmsCbConstants.MESSAGE_ID_CMAS_ALERT_SEVERE_EXPECTED_OBSERVED: case SmsCbConstants.MESSAGE_ID_CMAS_ALERT_SEVERE_EXPECTED_LIKELY: return SmsCbCmasInfo.CMAS_SEVERITY_SEVERE; default: return SmsCbCmasInfo.CMAS_SEVERITY_UNKNOWN; } }
Source:
public void logoClickOnEnglishCommunityOpensFandom() { new HomePage().getGlobalNavigation().clickFandomLogo(); System.out.println(driver.getCurrentUrl()); System.out.println(fandomUrlBuilder.getFandomUrl(new Configuration().getEnvType())); Assertion.assertEquals( urlChecker.getProtocolRelativeURL(driver.getCurrentUrl()), urlChecker.getProtocolRelativeURL(fandomUrlBuilder.getFandomUrl(new Configuration().getEnvType())) ); }

Target:
public void logoClickOnEnglishCommunityOpensFandom() { new HomePage().getGlobalNavigation().clickFandomLogo(); Assertion.assertEquals( urlChecker.getProtocolRelativeURL(driver.getCurrentUrl()), urlChecker.getProtocolRelativeURL(fandomUrlBuilder.getFandomUrl(new Configuration().getEnvType())) ); }
Source:
String getLocalSiteName() { return SystemInfo.getSiteName(); }

Target:
String getLocalSiteName() { return SystemInfo.getSiteName().toLowerCase(Locale.getDefault()); }
Source:
public void constructAccount() throws Exception { GenericAccount account = (GenericAccount) dao.constructAccount(STUDY, EMAIL, PHONE, DUMMY_PASSWORD); assertEquals(TestConstants.TEST_STUDY, account.getStudyIdentifier()); assertEquals(EMAIL, account.getEmail()); assertEquals(HEALTH_CODE, account.getHealthCode()); assertEquals(HEALTH_ID, account.getHealthId()); assertEquals(PasswordAlgorithm.DEFAULT_PASSWORD_ALGORITHM, account.getPasswordAlgorithm()); assertTrue(PasswordAlgorithm.DEFAULT_PASSWORD_ALGORITHM.checkHash(account.getPasswordHash(), DUMMY_PASSWORD)); }

Target:
public void constructAccount() throws Exception { GenericAccount account = (GenericAccount) dao.constructAccount(STUDY, EMAIL, PHONE, DUMMY_PASSWORD); assertEquals(TestConstants.TEST_STUDY, account.getStudyIdentifier()); assertEquals(EMAIL, account.getEmail()); assertEquals(PHONE.getNationalFormat(), account.getPhone().getNationalFormat()); assertEquals(Boolean.FALSE, account.getEmailVerified()); assertEquals(Boolean.FALSE, account.getPhoneVerified()); assertEquals(HEALTH_CODE, account.getHealthCode()); assertEquals(HEALTH_ID, account.getHealthId()); assertEquals(PasswordAlgorithm.DEFAULT_PASSWORD_ALGORITHM, account.getPasswordAlgorithm()); assertTrue(PasswordAlgorithm.DEFAULT_PASSWORD_ALGORITHM.checkHash(account.getPasswordHash(), DUMMY_PASSWORD)); }
Source:
public static List<? extends CommandBase> findChildCommands(Guid commandId) { final List<CommandBase> failedCommands = new ArrayList<>(); final List<Guid> childCommandIds = getChildCommandIds(commandId); for (Guid childCommandId : childCommandIds) { final CommandBase<?> childCommand = retrieveCommand(childCommandId); failedCommands.add(childCommand); } return failedCommands; }

Target:
public static List<? extends CommandBase> findChildCommands(Guid commandId) { final List<CommandBase> childCommands = new ArrayList<>(); final List<Guid> childCommandIds = getChildCommandIds(commandId); for (Guid childCommandId : childCommandIds) { final CommandBase<?> childCommand = retrieveCommand(childCommandId); childCommands.add(childCommand); } return childCommands; }
Source:
private ListOffsetResult fetchOffsetsByTimes(Map<TopicPartition, Long> timestampsToSearch, Timer timer, boolean requireTimestamps) { ListOffsetResult result = new ListOffsetResult(); if (timestampsToSearch.isEmpty()) return result; Map<TopicPartition, Long> remainingToSearch = new HashMap<>(timestampsToSearch); do { RequestFuture<ListOffsetResult> future = sendListOffsetsRequests(remainingToSearch, requireTimestamps); client.poll(future, timer); if (!future.isDone()) { break; } else if (future.succeeded()) { ListOffsetResult value = future.value(); result.fetchedOffsets.putAll(value.fetchedOffsets); remainingToSearch.keySet().retainAll(value.partitionsToRetry); } else if (!future.isRetriable()) { throw future.exception(); } if (remainingToSearch.isEmpty()) { return result; } else { metadata.requestUpdate(); } if (metadata.updateRequested()) client.awaitMetadataUpdate(timer); else timer.sleep(retryBackoffMs); } while (timer.notExpired()); throw new TimeoutException("Failed to get offsets by times in " + timer.elapsedMs() + "ms"); }

Target:
private ListOffsetResult fetchOffsetsByTimes(Map<TopicPartition, Long> timestampsToSearch, Timer timer, boolean requireTimestamps) { ListOffsetResult result = new ListOffsetResult(); if (timestampsToSearch.isEmpty()) return result; Map<TopicPartition, Long> remainingToSearch = new HashMap<>(timestampsToSearch); do { RequestFuture<ListOffsetResult> future = sendListOffsetsRequests(remainingToSearch, requireTimestamps); client.poll(future, timer); if (!future.isDone()) { break; } else if (future.succeeded()) { ListOffsetResult value = future.value(); result.fetchedOffsets.putAll(value.fetchedOffsets); remainingToSearch.keySet().retainAll(value.partitionsToRetry); } else if (!future.isRetriable()) { throw future.exception(); } if (remainingToSearch.isEmpty()) { return result; } else { client.awaitMetadataUpdate(timer); } } while (timer.notExpired()); throw new TimeoutException("Failed to get offsets by times in " + timer.elapsedMs() + "ms"); }
Source:
public void testProperties() { assertNotNull(CoreUtils.getUserAgentPropertiesFromProperties("azure-core.properties").getVersion()); assertNotNull(CoreUtils.getUserAgentPropertiesFromProperties("azure-core.properties").getName()); assertTrue(CoreUtils.getUserAgentPropertiesFromProperties("azure-core.properties").getVersion() .matches("\\d.\\d.\\d([-a-zA-Z0-9.])*")); }

Target:
public void testProperties() { UserAgentProperties properties = CoreUtils.getUserAgentProperties("azure-core.properties"); assertFalse(properties.getName().matches("UnknownName")); assertTrue(CoreUtils.getUserAgentProperties("azure-core.properties").getVersion() .matches("\\d.\\d.\\d([-a-zA-Z0-9.])*")); }
Source:
private void restrictMaxWidthForDialog(@NonNull Dialog dialog) { Resources resources = dialog.getContext().getResources(); int dp = (int) resources.getDimension(R.dimen.bottom_sheet_dialog_width); if (dp > 0) { FrameLayout bottomSheetLayout = dialog.findViewById(com.google.android.material.R.id.design_bottom_sheet); CoordinatorLayout.LayoutParams coordinatorLayoutParams = (CoordinatorLayout.LayoutParams) bottomSheetLayout.getLayoutParams(); coordinatorLayoutParams.width = dp; bottomSheetLayout.setLayoutParams(coordinatorLayoutParams); CoordinatorLayout coordinatorLayout = (CoordinatorLayout) bottomSheetLayout.getParent(); FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) coordinatorLayout.getLayoutParams(); layoutParams.gravity = Gravity.CENTER_HORIZONTAL; coordinatorLayout.setLayoutParams(layoutParams); } }

Target:
private void restrictMaxWidthForDialog(@NonNull Dialog dialog) { Resources resources = dialog.getContext().getResources(); int dp = (int) resources.getDimension(R.dimen.bottom_sheet_dialog_width); if (dp > 0) { FrameLayout bottomSheetLayout = dialog.findViewById(com.google.android.material.R.id.design_bottom_sheet); if (bottomSheetLayout != null) { ViewParent bottomSheetParent = bottomSheetLayout.getParent(); if (bottomSheetParent instanceof CoordinatorLayout) { CoordinatorLayout.LayoutParams coordinatorLayoutParams = (CoordinatorLayout.LayoutParams) bottomSheetLayout.getLayoutParams(); coordinatorLayoutParams.width = dp; bottomSheetLayout.setLayoutParams(coordinatorLayoutParams); CoordinatorLayout coordinatorLayout = (CoordinatorLayout) bottomSheetParent; FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) coordinatorLayout.getLayoutParams(); layoutParams.gravity = Gravity.CENTER_HORIZONTAL; coordinatorLayout.setLayoutParams(layoutParams); } } } }
Source:
public void setEntity(EntityLocal entity) { super.setEntity(entity); checkArgument(getConfig(SOURCE_SENSOR) instanceof AttributeSensor, "expected SOURCE_SENSOR to be AttributeSensor, found " + getConfig(SOURCE_SENSOR)); PortForwardManager.AssociationListener listener = new PortForwardManager.AssociationListener() { public void onEvent(PortForwardManager.AssociationMetadata metadata) { Maybe<MachineLocation> machine = Machines.findUniqueMachineLocation(ImmutableList.of(metadata.getLocation())); String sensorVal = producer.getAttribute((AttributeSensor)sourceSensor).toString(); URI uri = URI.create(sensorVal); int port = uri.getPort(); if (sensorVal != null && machine.isPresent() && port != -1) { if (metadata.getLocation().equals(machine.get()) && metadata.getPrivatePort() == port) { log.debug("emitting event on due to port association {}", new Object[] {sourceSensor, producer, metadata}); UriTransformingEnricher.this.onEvent(new BasicSensorEvent<Object>(sourceSensor, producer, producer.getAttribute((AttributeSensor)sourceSensor))); } } } }; getConfig(SUBNET_TIER).getPortForwardManager().addAssociationListener(listener, Predicates.alwaysTrue()); }

Target:
public void setEntity(EntityLocal entity) { super.setEntity(entity); checkArgument(getConfig(SOURCE_SENSOR) instanceof AttributeSensor, "expected SOURCE_SENSOR to be AttributeSensor, found %s", getConfig(SOURCE_SENSOR)); PortForwardManager.AssociationListener listener = new PortForwardManager.AssociationListener() { public void onEvent(PortForwardManager.AssociationMetadata metadata) { Maybe<MachineLocation> machine = Machines.findUniqueMachineLocation(ImmutableList.of(metadata.getLocation())); String sensorVal = producer.getAttribute((AttributeSensor)sourceSensor).toString(); if (sensorVal != null) { URI uri = URI.create(sensorVal); int port = uri.getPort(); if (machine.isPresent() && port != -1) { if (metadata.getLocation().equals(machine.get()) && metadata.getPrivatePort() == port) { log.debug("Simulating sensor-event on new port-association {}, to trigger URI transformation by {}", new Object[] {metadata, UriTransformingEnricher.this}); UriTransformingEnricher.this.onEvent(new BasicSensorEvent<Object>(sourceSensor, producer, sensorVal); } } } } }; getConfig(SUBNET_TIER).getPortForwardManager().addAssociationListener(listener, Predicates.alwaysTrue()); }
Source:
private Thread startDirectoryWatcher(Path mapsDirectory) { Thread thread = new Thread(() -> noCatch(() -> { WatchService watcher = mapsDirectory.getFileSystem().newWatchService(); customMapsDirectory.register(watcher, ENTRY_DELETE); try (watcher) { while (!Thread.interrupted()) { WatchKey key = watcher.take(); key.pollEvents().stream() .filter(event -> event.kind() == ENTRY_DELETE) .forEach(event -> removeMap(mapsDirectory.resolve((Path) event.context()))); key.reset(); } } catch (InterruptedException e) { logger.debug("Watcher terminated ({})", e.getMessage()); } })); thread.setDaemon(true); thread.start(); return thread; }

Target:
private Thread startDirectoryWatcher(Path mapsDirectory) { Thread thread = new Thread(() -> noCatch(() -> { try (WatchService watcher = mapsDirectory.getFileSystem().newWatchService()) { customMapsDirectory.register(watcher, ENTRY_DELETE); while (!Thread.interrupted()) { WatchKey key = watcher.take(); key.pollEvents().stream() .filter(event -> event.kind() == ENTRY_DELETE) .forEach(event -> removeMap(mapsDirectory.resolve((Path) event.context()))); key.reset(); } } catch (InterruptedException e) { logger.debug("Watcher terminated ({})", e.getMessage()); } })); thread.setDaemon(true); thread.start(); return thread; }
Source:
protected boolean set(EntityLivingBase entity, Float value) { entity.fallDistance = value; return true; }

Target:
protected boolean set(EntityLivingBase entity, Float value) { entity.fallDistance = Preconditions.checkNotNull(value); return true; }
Source:
protected void execute() { if (shouldDiscover()) { discover(); } for (EdimaxBindingProvider provider : providers) { for (String itemName : provider.getItemNames()) { EdimaxBindingConfiguration config = ((EdimaxGenericBindingProvider) provider) .getConfig(itemName); String macAddress = config.getMacAddress(); String deviceIP = getDeviceIP(macAddress); if (deviceIP == null) { logger.error("Device with MAC: " + macAddress + " not found/discovered."); continue; } EdimaxBindingConfiguration.Type type = config.getType(); if (type == null) { type = Type.STATE; } State newState = null; try { switch (type) { case CURRENT: BigDecimal current = createSender(config).getCurrent( deviceIP); newState = new DecimalType(current); break; case POWER: BigDecimal power = createSender(config).getPower( deviceIP); newState = new DecimalType(power); break; case STATE: Boolean state = createSender(config).getState(deviceIP); if (state) { newState = OnOffType.ON; } else { newState = OnOffType.OFF; } break; } } catch (IOException e) { logger.error( "Error in communication with device. Device's MAC: " + macAddress + ". Cannot get update from device.", e); } if (newState != null) { eventPublisher.postUpdate(itemName, newState); } } } }

Target:
protected void execute() { if (shouldDiscover()) { discover(); } for (EdimaxBindingProvider provider : providers) { for (String itemName : provider.getItemNames()) { EdimaxBindingConfiguration config = ((EdimaxGenericBindingProvider) provider).getConfig(itemName); String macAddress = config.getMacAddress(); String deviceIP = getDeviceIP(macAddress); if (deviceIP == null) { logger.error("Device with MAC: not found/discovered.", macAddress); continue; } EdimaxBindingConfiguration.Type type = config.getType(); if (type == null) { type = Type.STATE; } State newState = null; try { switch (type) { case CURRENT: BigDecimal current = createSender(config).getCurrent(deviceIP); newState = new DecimalType(current); break; case POWER: BigDecimal power = createSender(config).getPower(deviceIP); newState = new DecimalType(power); break; case STATE: Boolean state = createSender(config).getState(deviceIP); if (state) { newState = OnOffType.ON; } else { newState = OnOffType.OFF; } break; } } catch (IOException e) { logger.error("Error in communication with device. Device's MAC: {}. Cannot get update from device.", macAddress, e); } if (newState != null) { eventPublisher.postUpdate(itemName, newState); } } } }
Source:
public CrashGenCleaner( PagedFile pagedFile, TreeNode<?,?> treeNode, long lowTreeNodeId, long highTreeNodeId, long stableGeneration, long unstableGeneration, Monitor monitor ) { this.pagedFile = pagedFile; this.treeNode = treeNode; this.lowTreeNodeId = lowTreeNodeId; this.highTreeNodeId = highTreeNodeId; this.stableGeneration = stableGeneration; this.unstableGeneration = unstableGeneration; this.monitor = monitor; this.maxKeyCount = treeNode.internalMaxKeyCount(); }

Target:
CrashGenCleaner( PagedFile pagedFile, TreeNode<?,?> treeNode, long lowTreeNodeId, long highTreeNodeId, long stableGeneration, long unstableGeneration, Monitor monitor ) { this.pagedFile = pagedFile; this.treeNode = treeNode; this.lowTreeNodeId = lowTreeNodeId; this.highTreeNodeId = highTreeNodeId; this.availableProcessors = Runtime.getRuntime().availableProcessors(); this.batchSize = min( 1000, max( 10, (highTreeNodeId - lowTreeNodeId) / (100 * availableProcessors) ) ); this.stableGeneration = stableGeneration; this.unstableGeneration = unstableGeneration; this.monitor = monitor; this.internalMaxKeyCount = treeNode.internalMaxKeyCount(); }
Source:
public List<MLModelField> getModelInputFields(MLModelInfo modelInfo) throws IOException, SAXException, JAXBException { final List<MLModelField> fieldNames = doGetInputFieldsFromPMMLStream(modelInfo.getPmml()); return fieldNames; }

Target:
public List<MLModelField> getModelInputFields(MLModelInfo modelInfo) throws IOException, SAXException, JAXBException { return doGetInputFieldsFromPMMLStream(modelInfo.getPmml()); }
Source:
public ElasticsearchTextFieldPredicateBuilderFactory( ToDocumentFieldValueConverter<?, ? extends String> converter, ToDocumentFieldValueConverter<String, ? extends String> rawConverter, ElasticsearchFieldCodec<String> codec, PropertyMapping mapping) { super( converter, rawConverter, codec ); this.type = mapping.getType(); this.analyzerOrNormalizer = mapping.getAnalyzerOrNormalizer(); }

Target:
public ElasticsearchTextFieldPredicateBuilderFactory( ToDocumentFieldValueConverter<?, ? extends String> converter, ToDocumentFieldValueConverter<String, ? extends String> rawConverter, ElasticsearchFieldCodec<String> codec, PropertyMapping mapping) { super( converter, rawConverter, codec ); this.type = mapping.getType(); this.analyzer = mapping.getAnalyzer(); this.normalizer = mapping.getNormalizer(); }
Source:
public DatasetDescriptor create(String namespace, String name, DatasetDescriptor descriptor) { Compatibility.checkDatasetName(namespace, name); Compatibility.checkDescriptor(descriptor); URI location = descriptor.getLocation(); if (location != null && location.getPath().startsWith( HiveAbstractDatasetRepository.REPLACE_PATH)) { location = null; } String resolved = resolveNamespace(namespace, name, location); if (resolved != null) { if (resolved.equals(namespace)) { throw new DatasetExistsException( "Metadata already exists for dataset: " + namespace + "." + name); } else { DatasetDescriptor loaded = load(resolved, name); LOG.warn("Creating table managed table {}.{}: replaces default.{}", new Object[]{namespace, name, name}); Compatibility.checkUpdate(loaded, descriptor); location = loaded.getLocation(); } } LOG.info("Creating a managed Hive table named: " + name); boolean isExternal = (location != null); DatasetDescriptor toCreate = descriptor; if (isExternal) { toCreate = new DatasetDescriptor.Builder(descriptor) .location(location) .build(); } Table table = HiveUtils.tableForDescriptor( namespace, name, toCreate, isExternal); getMetaStoreUtil().createTable(table); Table newTable = getMetaStoreUtil().getTable(namespace, name); return new DatasetDescriptor.Builder(descriptor) .location(newTable.getSd().getLocation()) .build(); } @Override protected URI expectedLocation(String namespace, String name) { return null; } }

Target:
public DatasetDescriptor create(String namespace, String name, DatasetDescriptor descriptor) { Compatibility.checkDatasetName(namespace, name); Compatibility.checkDescriptor(descriptor); URI location = descriptor.getLocation(); String resolved = resolveNamespace(namespace, name, location); if (resolved != null) { if (resolved.equals(namespace)) { throw new DatasetExistsException( "Metadata already exists for dataset: " + namespace + "." + name); } else { DatasetDescriptor loaded = load(resolved, name); LOG.warn("Creating table managed table {}.{}: replaces default.{}", new Object[]{namespace, name, name}); Compatibility.checkUpdate(loaded, descriptor); location = loaded.getLocation(); } } LOG.info("Creating a managed Hive table named: " + name); boolean isExternal = (location != null); DatasetDescriptor toCreate = descriptor; if (isExternal) { toCreate = new DatasetDescriptor.Builder(descriptor) .location(location) .build(); } Table table = HiveUtils.tableForDescriptor( namespace, name, toCreate, isExternal); getMetaStoreUtil().createTable(table); Table newTable = getMetaStoreUtil().getTable(namespace, name); DatasetDescriptor newDescriptor = new DatasetDescriptor.Builder(descriptor) .location(newTable.getSd().getLocation()) .build(); if (isExternal) { FileSystemUtil.ensureLocationExists(newDescriptor, conf); } return newDescriptor; } @Override protected URI expectedLocation(String namespace, String name) { return null; } }
Source:
public void transform(StructuredRecord in, Emitter<StructuredRecord> emitter) throws Exception { String body = in.get(config.field); try { org.apache.commons.csv.CSVParser parser = org.apache.commons.csv.CSVParser.parse(body, csvFormat); List<CSVRecord> records = parser.getRecords(); for (CSVRecord record : records) { emitter.emit(createStructuredRecord(record, in)); } } catch (IOException e) { throw new RuntimeException("There was a issue parsing the record. " + e.getLocalizedMessage()); } }

Target:
public void transform(StructuredRecord in, Emitter<StructuredRecord> emitter) throws Exception { String body = in.get(config.field); try { org.apache.commons.csv.CSVParser parser = org.apache.commons.csv.CSVParser.parse(body, csvFormat); List<CSVRecord> records = parser.getRecords(); for (CSVRecord record : records) { emitter.emit(createStructuredRecord(record, in)); } } catch (IOException e) { throw Throwables.propagate(e); } }
Source:
String getCreatedTime(final AssetInfo asset) { return ts.format(LibraryConstants.Created) + " " + SocialDateFormatter.format(asset.getCreatedTime()); }

Target:
private String getCreatedTime(final AssetInfo asset) { return ts.format(LibraryConstants.Created) + " " + SocialDateFormatter.format(asset.getCreatedTime()); }
Source:
public List<ApiClusterTemplateConfig> getServiceConfigs(CmTemplateProcessor templateProcessor, TemplatePreparationObject templatePreparationObject) { List<ApiClusterTemplateConfig> rangerConfigs = new ArrayList<>(); ConfigUtils.getStorageLocationForServiceProperty(templatePreparationObject, RANGER_HDFS_AUDIT_URL) .map(location -> rangerConfigs.add(config(RANGER_HDFS_AUDIT_URL, location.getValue()))) .orElseGet(() -> rangerConfigs.add(config(RANGER_HDFS_AUDIT_URL, getDefaultRangerAuditUrl(templateProcessor, templatePreparationObject)))); String cmVersion = templatePreparationObject.getProductDetailsView().getCm().getVersion(); if (CMRepositoryVersionUtil.isVersionNewerOrEqualThanLimited(cmVersion, CLOUDERAMANAGER_VERSION_7_2_1)) { ConfigUtils.getStorageLocationForServiceProperty(templatePreparationObject, RANGER_DATA_URL) .ifPresent(location -> rangerConfigs.add(config(RANGER_DATA_URL, location.getValue()))); ConfigUtils.getStorageLocationForServiceProperty(templatePreparationObject, RANGER_LOG_URL) .ifPresent(location -> rangerConfigs.add(config(RANGER_LOG_URL, location.getValue()))); } return rangerConfigs; }

Target:
public List<ApiClusterTemplateConfig> getServiceConfigs(CmTemplateProcessor templateProcessor, TemplatePreparationObject templatePreparationObject) { List<ApiClusterTemplateConfig> rangerConfigs = new ArrayList<>(); ConfigUtils.getStorageLocationForServiceProperty(templatePreparationObject, RANGER_HDFS_AUDIT_URL) .map(location -> rangerConfigs.add(config(RANGER_HDFS_AUDIT_URL, location.getValue()))) .orElseGet(() -> rangerConfigs.add(config(RANGER_HDFS_AUDIT_URL, getDefaultRangerAuditUrl(templateProcessor, templatePreparationObject)))); String cmVersion = templatePreparationObject.getProductDetailsView().getCm().getVersion(); if (CMRepositoryVersionUtil.isVersionNewerOrEqualThanLimited(cmVersion, CLOUDERAMANAGER_VERSION_7_2_1) && CloudPlatform.AZURE == templatePreparationObject.getCloudPlatform() && templatePreparationObject.getGeneralClusterConfigs().isEnableRangerRaz()) { String rangerAuditPath = rangerConfigs.get(0).getValue(); String baseDataPath = rangerAuditPath.split("ranger/audit")[0]; rangerConfigs.add(config(RANGER_DATA_URL, baseDataPath)); } return rangerConfigs; }
Source:
private void onChunkOperationComplete(GetChunk chunk) { if (chunk.getChunkException() != null) { setOperationException(chunk.getChunkException()); } if (chunk == firstChunk) { if (operationCallbackInvoked.compareAndSet(false, true)) { long timeElapsed = time.milliseconds() - submissionTimeMs; routerMetrics.getBlobOperationLatencyMs.update(timeElapsed); Exception e = getOperationException(); blobDataChannel = e == null ? new BlobDataReadableStreamChannel() : null; operationResult = e == null ? new GetBlobResult(blobInfo, blobDataChannel) : null; if (e != null) { routerMetrics.onGetBlobError(e, options); } operationCompleteCallback.completeOperation(operationFuture, operationCallback, operationResult, e); } } chunk.postCompletionCleanup(); if (blobDataChannel != null) { blobDataChannel.maybeWriteToChannel(); } }

Target:
private void onChunkOperationComplete(GetChunk chunk) { if (chunk.getChunkException() != null) { setOperationException(chunk.getChunkException()); } if (chunk == firstChunk) { if (operationCallbackInvoked.compareAndSet(false, true)) { long timeElapsed = time.milliseconds() - submissionTimeMs; routerMetrics.getBlobOperationLatencyMs.update(timeElapsed); Exception e = getOperationException(); if (e == null) { blobDataChannel = new BlobDataReadableStreamChannel(); operationResult = new GetBlobResult(blobInfo, blobDataChannel); } else { blobDataChannel = null; operationResult = null; routerMetrics.onGetBlobError(e, options); } operationCompleteCallback.completeOperation(operationFuture, operationCallback, operationResult, e); } } chunk.postCompletionCleanup(); if (blobDataChannel != null) { blobDataChannel.maybeWriteToChannel(); } }
Source:
protected Properties getDefaultApiKeyFileProperties() { Properties props = new Properties(); try { Reader reader = createFileReader(DEFAULT_API_KEY_PROPERTIES_FILE_LOCATION); props = toProperties(reader); } catch (IOException ignored) { log.debug( "Unable to find or load default api key properties file [{}]. This can be safely ignored as this is a fallback location - other more specific locations will be checked.", DEFAULT_API_KEY_PROPERTIES_FILE_LOCATION, ignored ); } return props; }

Target:
protected Properties getDefaultApiKeyFileProperties() { Properties props = new Properties(); try { Reader reader = createFileReader(DEFAULT_API_KEY_PROPERTIES_FILE_LOCATION); props = toProperties(reader); } catch (IOException ignored) { log.debug( "Unable to find or load default api key properties file [{}]. " + "This can be safely ignored as this is a fallback location - " + "other more specific locations will be checked.", DEFAULT_API_KEY_PROPERTIES_FILE_LOCATION, ignored ); } return props; }