auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testResourceTextSearch() throws InterruptedException { Observation obs1 = new Observation(); obs1.getCode().setText("Systolic Blood Pressure"); obs1.setStatus(Observation.ObservationStatus.FINAL); obs1.setValue(new Quantity(123)); obs1.getNoteFirstRep().setText("obs1"); IIdType id1 = myObservationDao.create(obs1, mySrd).getId().toUnqualifiedVersionless(); Observation obs2 = new Observation(); obs2.getCode().setText("Diastolic Blood Pressure"); obs2.setStatus(Observation.ObservationStatus.FINAL); obs2.setValue(new Quantity(81)); IIdType id2 = myObservationDao.create(obs2, mySrd).getId().toUnqualifiedVersionless(); <START> waitForElasticToCatchUp(); <END> SearchParameterMap map; map = new SearchParameterMap(); map.add(ca.uhn.fhir.rest.api.Constants.PARAM_CONTENT, new StringParam("systolic")); assertThat(toUnqualifiedVersionlessIdValues(myObservationDao.search(map)), containsInAnyOrder(toValues(id1))); map = new SearchParameterMap(); map.add(Constants.PARAM_CONTENT, new StringParam("blood")); assertThat(toUnqualifiedVersionlessIdValues(myObservationDao.search(map)), containsInAnyOrder(toValues(id1, id2))); }</code><technical_language>waitForElasticToCatchUp() method do anything. Is this statement needed</technical_language>

Target:
public void testResourceTextSearch() throws InterruptedException { Observation obs1 = new Observation(); obs1.getCode().setText("Systolic Blood Pressure"); obs1.setStatus(Observation.ObservationStatus.FINAL); obs1.setValue(new Quantity(123)); obs1.getNoteFirstRep().setText("obs1"); IIdType id1 = myObservationDao.create(obs1, mySrd).getId().toUnqualifiedVersionless(); Observation obs2 = new Observation(); obs2.getCode().setText("Diastolic Blood Pressure"); obs2.setStatus(Observation.ObservationStatus.FINAL); obs2.setValue(new Quantity(81)); IIdType id2 = myObservationDao.create(obs2, mySrd).getId().toUnqualifiedVersionless(); SearchParameterMap map; map = new SearchParameterMap(); map.add(ca.uhn.fhir.rest.api.Constants.PARAM_CONTENT, new StringParam("systolic")); assertThat(toUnqualifiedVersionlessIdValues(myObservationDao.search(map)), containsInAnyOrder(toValues(id1))); map = new SearchParameterMap(); map.add(Constants.PARAM_CONTENT, new StringParam("blood")); assertThat(toUnqualifiedVersionlessIdValues(myObservationDao.search(map)), containsInAnyOrder(toValues(id1, id2))); }
Source:
<code>protected void resetInvoiceColumn(ResultRow row, Column invoiceColumn) { <START> String link = parseHrefLinkFromAnchorTag(row.getActionUrls()); <END> AnchorHtmlData anchorHtmlData = new AnchorHtmlData(link, KFSConstants.SEARCH_METHOD, VIEW_INVOICES_LINK_VALUE); anchorHtmlData.setTarget(KFSConstants.NEW_WINDOW_URL_TARGET); invoiceColumn.setColumnAnchor(anchorHtmlData); invoiceColumn.setPropertyValue(VIEW_INVOICES_LINK_VALUE); }</code><technical_language>action URLs empty this point if CGB enhancement is turned and/or user right permissions. a check added parsed link is non-blank</technical_language>

Target:
protected void resetInvoiceColumn(ResultRow row, Column invoiceColumn) { String hrefLink = parseHrefLinkFromAnchorTag(row.getActionUrls()); if (StringUtils.isNotBlank(hrefLink)) { AnchorHtmlData anchorHtmlData = new AnchorHtmlData(hrefLink, KFSConstants.SEARCH_METHOD, VIEW_INVOICES_LINK_VALUE); anchorHtmlData.setTarget(KFSConstants.NEW_WINDOW_URL_TARGET); invoiceColumn.setColumnAnchor(anchorHtmlData); invoiceColumn.setPropertyValue(VIEW_INVOICES_LINK_VALUE); } }
Source:
<code>public static BillingInfo createRandomBillingInfo(final int seed) { final BillingInfo info = new BillingInfo(); info.setAccount(createRandomAccount(seed)); info.setFirstName(randomAlphaNumericString(5, seed)); info.setLastName(randomAlphaNumericString(6, seed)); info.setCompany(randomAlphaNumericString(10, seed)); info.setAddress1(randomAlphaNumericString(10, seed)); info.setAddress2(randomAlphaNumericString(10, seed)); info.setCity(randomAlphaNumericString(10, seed)); info.setState("CA"); info.setZip("94110"); info.setCountry("US"); info.setPhone(randomInteger(8, seed)); info.setVatNumber(randomNumericString(8, seed)); info.setYear(createTestCCYear()); info.setMonth(createTestCCMonth()); info.setNumber(createTestCCNumber()); info.setVerificationValue(createTestCCVerificationNumber()); <START> info.setGatewayToken(randomAlphaNumericString(10, seed)); <END> info.setGatewayCode(randomAlphaNumericString(10, seed)); return info; }</code><technical_language>try running integration tests? kill integration tests</technical_language>

Target:
public static BillingInfo createRandomBillingInfo(final int seed) { final BillingInfo info = new BillingInfo(); info.setAccount(createRandomAccount(seed)); info.setFirstName(randomAlphaNumericString(5, seed)); info.setLastName(randomAlphaNumericString(6, seed)); info.setCompany(randomAlphaNumericString(10, seed)); info.setAddress1(randomAlphaNumericString(10, seed)); info.setAddress2(randomAlphaNumericString(10, seed)); info.setCity(randomAlphaNumericString(10, seed)); info.setState("CA"); info.setZip("94110"); info.setCountry("US"); info.setPhone(randomInteger(8, seed)); info.setVatNumber(randomNumericString(8, seed)); info.setYear(createTestCCYear()); info.setMonth(createTestCCMonth()); info.setNumber(createTestCCNumber()); info.setVerificationValue(createTestCCVerificationNumber()); return info; }
Source:
<code>public List<OnmsNode> findNodeWithMetaData(final String context, final String key, final String value) { <START> return getHibernateTemplate().execute(session -> (List<OnmsNode>) session.createSQLQuery("SELECT n.nodeid FROM node n, node_metadata m WHERE m.id = n.nodeid AND context = '" + StringEscapeUtils.escapeSql(context) + "' AND key = '" + StringEscapeUtils.escapeSql(key) + "' AND value = '" + StringEscapeUtils.escapeSql(value) + "'") <END> .setResultTransformer(new ResultTransformer() { @Override public Object transformTuple(Object[] tuple, String[] aliases) { return get((Integer) tuple[0]); } @SuppressWarnings("rawtypes") @Override public List transformList(List collection) { return collection; } }).list()); }</code><technical_language>SQLQuery#setString instead of StringEscapeUtils</technical_language>

Target:
public List<OnmsNode> findNodeWithMetaData(final String context, final String key, final String value) { return getHibernateTemplate().execute(session -> (List<OnmsNode>) session.createSQLQuery("SELECT n.nodeid FROM node n, node_metadata m WHERE m.id = n.nodeid AND context = :context AND key = :key AND value = :value ORDER BY n.nodeid") .setString("context", context) .setString("key", key) .setString("value", value) .setResultTransformer(new ResultTransformer() { @Override public Object transformTuple(Object[] tuple, String[] aliases) { return get((Integer) tuple[0]); } @SuppressWarnings("rawtypes") @Override public List transformList(List collection) { return collection; } }).list()); }
Source:
<code>public String getOpenAPIDefinition(Identifier apiId) throws APIManagementException { String apiTenantDomain = getTenantDomain(apiId); String swaggerDoc = null; boolean tenantFlowStarted = false; try { Registry registryType; if (this.tenantDomain == null || isTenantDomainNotMatching(apiTenantDomain)) { <START> startTenantFlow(apiTenantDomain); <END> tenantFlowStarted = true; int tenantId = getTenantManager().getTenantId( apiTenantDomain); registryType = getRegistryService().getGovernanceUserRegistry( CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME, tenantId); } else { registryType = registry; } swaggerDoc = OASParserUtil.getAPIDefinition(apiId, registryType); } catch (org.wso2.carbon.user.api.UserStoreException e) { String msg = "Failed to get swagger documentation of API : " + apiId; log.error(msg, e); throw new APIManagementException(msg, e); } catch (RegistryException e) { String msg = "Failed to get swagger documentation of API : " + apiId; log.error(msg, e); throw new APIManagementException(msg, e); } finally { if (tenantFlowStarted) { endTenantFlow(); } } return swaggerDoc; }</code><technical_language>This work for cross tenants logged in users</technical_language>

Target:
public String getOpenAPIDefinition(Identifier apiId) throws APIManagementException { String apiTenantDomain = getTenantDomain(apiId); String swaggerDoc = null; boolean tenantFlowStarted = false; try { Registry registryType; if (this.tenantDomain == null || isTenantDomainNotMatching(apiTenantDomain)) { if (apiTenantDomain != null) { startTenantFlow(apiTenantDomain); tenantFlowStarted = true; } int tenantId = getTenantManager().getTenantId( apiTenantDomain); registryType = getRegistryService().getGovernanceUserRegistry( CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME, tenantId); } else { registryType = registry; } swaggerDoc = OASParserUtil.getAPIDefinition(apiId, registryType); } catch (org.wso2.carbon.user.api.UserStoreException e) { String msg = "Failed to get swagger documentation of API : " + apiId; log.error(msg, e); throw new APIManagementException(msg, e); } catch (RegistryException e) { String msg = "Failed to get swagger documentation of API : " + apiId; log.error(msg, e); throw new APIManagementException(msg, e); } finally { if (tenantFlowStarted) { endTenantFlow(); } } return swaggerDoc; }
Source:
<code>public void addBase(final SamLocusIterator.RecordAndOffset recordAndOffset, final SamLocusAndReferenceIterator.SAMLocusAndReference locusAndRef) { if (recordAndOffset.getAlignmentType() == AbstractRecordAndOffset.AlignmentType.Match) { if (!SequenceUtil.isNoCall(recordAndOffset.getReadBase())) { nBases++; } } else if (recordAndOffset.getAlignmentType() == AbstractRecordAndOffset.AlignmentType.Insertion) { <START> CigarElement cigarElement = ReadBaseStratification.getIndelElement(recordAndOffset); <END> if (cigarElement != null) { nBases += cigarElement.getLength(); } } }</code><technical_language>final</technical_language>

Target:
public void addBase(final SamLocusIterator.RecordAndOffset recordAndOffset, final SamLocusAndReferenceIterator.SAMLocusAndReference locusAndRef) { if (recordAndOffset.getAlignmentType() == AbstractRecordAndOffset.AlignmentType.Match) { if (!SequenceUtil.isNoCall(recordAndOffset.getReadBase())) { nBases++; } } else if (recordAndOffset.getAlignmentType() == AbstractRecordAndOffset.AlignmentType.Insertion) { final CigarElement cigarElement = ReadBaseStratification.getIndelElement(recordAndOffset); if (cigarElement != null) { nBases += cigarElement.getLength(); } } }
Source:
<code>private void showRelatedPosts(@NonNull ReaderRelatedPostList relatedPosts, final boolean isGlobal) { int id = isGlobal ? R.id.related_posts_view_global : R.id.related_posts_view_local; <START> ReaderRelatedPostsView relatedPostsView = isGlobal ? mLocalRelatedPostsView : mGlobalRelatedPostsView; <END> relatedPostsView.showRelatedPosts(relatedPosts, mPost.getBlogName(), isGlobal); relatedPostsView.setOnRelatedPostClickListener(new ReaderRelatedPostsView.OnRelatedPostClickListener() { @Override public void onRelatedPostClick(View v, long siteId, long postId) { showRelatedPostDetail(siteId, postId, isGlobal); } }); if (relatedPostsView.getVisibility() != View.VISIBLE) { AniUtils.fadeIn(relatedPostsView, AniUtils.Duration.MEDIUM); } trackRelatedPostsIfShowing(); }</code><technical_language>opposite? ReaderRelatedPostsView relatedPostsView = isGlobal ? mGlobalRelatedPostsView : mLocalRelatedPostsView;</technical_language>

Target:
private void showRelatedPosts(@NonNull ReaderRelatedPostList relatedPosts, final boolean isGlobal) { ReaderRelatedPostsView relatedPostsView = isGlobal ? mGlobalRelatedPostsView : mLocalRelatedPostsView; relatedPostsView.showRelatedPosts(relatedPosts, mPost.getBlogName(), isGlobal); relatedPostsView.setOnRelatedPostClickListener(new ReaderRelatedPostsView.OnRelatedPostClickListener() { @Override public void onRelatedPostClick(View v, long siteId, long postId) { showRelatedPostDetail(siteId, postId, isGlobal); } }); if (relatedPostsView.getVisibility() != View.VISIBLE) { AniUtils.fadeIn(relatedPostsView, AniUtils.Duration.MEDIUM); } trackRelatedPostsIfShowing(); }
Source:
<code>public int isApplicable(VElement vElement, ViewModelContext viewModelContext) { if (!VControl.class.isInstance(vElement)) { return NOT_APPLICABLE; } final VControl control = (VControl) vElement; final IObservableValue observableValue = Activator.getDefault().getEMFFormsDatabinding() .getObservableValue(control.getDomainModelReference(), viewModelContext.getDomainModel()); final EStructuralFeature feature = (EStructuralFeature) observableValue.getValueType(); final EObject eObject = (EObject) ((IObserving) observableValue).getObserved(); <START> if (VIndexDomainModelReference.class.isInstance(eObject) <END> && VIndexdmrPackage.eINSTANCE.getIndexDomainModelReference_TargetDMR() == feature) { return 6; } return NOT_APPLICABLE; }</code><technical_language>check is unnecessary</technical_language>

Target:
public int isApplicable(VElement vElement, ViewModelContext viewModelContext) { if (!VControl.class.isInstance(vElement)) { return NOT_APPLICABLE; } final VControl control = (VControl) vElement; final IValueProperty valueProperty = Activator.getDefault().getEMFFormsDatabinding() .getValueProperty(control.getDomainModelReference()); final EStructuralFeature feature = (EStructuralFeature) valueProperty.getValueType(); if (VIndexdmrPackage.eINSTANCE.getIndexDomainModelReference_TargetDMR() == feature) { return 6; } return NOT_APPLICABLE; }
Source:
<code><START> public void changePassword_shouldChangePasswordForGivenUserIfOldPasswordIsNullAndChangingUserHavePrivileges() <END> throws Exception { executeDataSet(XML_FILENAME_WITH_DATA_FOR_CHANGE_PASSWORD_ACTION); final UserService userService = Context.getUserService(); User user6001 = userService.getUser(6001); String oldPassword = null; String newPassword = "newPasswordString123"; userService.changePassword(user6001, oldPassword, newPassword); Context.authenticate(user6001.getUsername(), newPassword); }</code><technical_language>password null in place, this invented scenario</technical_language>

Target:
public void changePassword_shouldChangePasswordForGivenUserIfOldPasswordIsNullAndChangingUserHavePrivileges() throws Exception { executeDataSet(XML_FILENAME_WITH_DATA_FOR_CHANGE_PASSWORD_ACTION); final UserService userService = Context.getUserService(); User user6001 = userService.getUser(6001); String oldPassword = null; String newPassword = "newPasswordString123"; userService.changePassword(user6001, oldPassword, newPassword); User previouslyLogged = Context.getAuthenticatedUser(); Context.authenticate(user6001.getUsername(), newPassword); Context.logout(); Context.authenticate("admin", "test"); }
Source:
<code>public HCatClient getHCatClient() { HCatClient hcatClient = null; int retryCount = 0; while (retryCount < numOfRetries) { try { hcatClient = hcatUtil.getHCatClient(); } catch (InterruptedException e) { retryCount++; <START> e.printStackTrace(); <END> } if (hcatClient != null) { break; } } return hcatClient; }</code><technical_language>change log.error</technical_language>

Target:
protected HCatClient getHCatClient() throws InterruptedException { return hcatUtil.getHCatClient(); }
Source:
<code>public static Optional<InsightCard> processCaffeineAlarm(final Long accountId, final List<Integer> sleepTimeList) { if (sleepTimeList.isEmpty()) { LOGGER.debug("Got nothing in sleepTimeList"); return Optional.absent(); } else if (sleepTimeList.size() <= 2) { LOGGER.debug("Size of sleepTimeList is less than 2 for accountId {}", accountId); return Optional.absent(); } final DescriptiveStatistics stats = new DescriptiveStatistics(); for (final int sleepTime : sleepTimeList) { if (sleepTime < SIX_AM_MINUTES) { stats.addValue(sleepTime + InsightUtils.DAY_MINUTES); } else { stats.addValue(sleepTime); } } final Boolean passSafeGuards = checkSafeGuards(stats); if (!passSafeGuards) { <START> return Optional.absent(); <END> } final Double sleepAvgDouble = stats.getMean(); final int sleepAvg = (int) Math.round(sleepAvgDouble); final int recommendedCoffeeMinutesTime = getRecommendedCoffeeMinutesTime(sleepAvg); final String sleepTime = InsightUtils.timeConvert(sleepAvg); final String coffeeTime = InsightUtils.timeConvert(recommendedCoffeeMinutesTime); final Text text = CaffeineAlarmMsgEN.getCaffeineAlarmMessage(sleepTime, coffeeTime); return Optional.of(new InsightCard(accountId, text.title, text.message, InsightCard.Category.CAFFEINE, InsightCard.TimePeriod.MONTHLY, DateTime.now(DateTimeZone.UTC), InsightCard.InsightType.DEFAULT)); }</code><technical_language>add LOGGER.info note failure of safeguards</technical_language>

Target:
public static Optional<InsightCard> processCaffeineAlarm(final Long accountId, final List<Integer> sleepTimeList) { if (sleepTimeList.isEmpty()) { LOGGER.info("account_id={}-insight=caffeine_alarm-action=sleep_time_list_empty", accountId); return processCaffeineAlarmFallBack(accountId); } else if (sleepTimeList.size() <= 2) { LOGGER.info("account_id={}-insight=caffeine_alarm-action=sleep_time_list_too_small", accountId); return processCaffeineAlarmFallBack(accountId); } final DescriptiveStatistics stats = new DescriptiveStatistics(); for (final int sleepTime : sleepTimeList) { if (sleepTime < SIX_AM_MINUTES) { stats.addValue(sleepTime + InsightUtils.DAY_MINUTES); } else { stats.addValue(sleepTime); } } final Boolean passSafeGuards = checkSafeGuards(stats); if (!passSafeGuards) { LOGGER.info("insight=caffeine_alarm-account_id={}-action=fail_safe_guard"); return processCaffeineAlarmFallBack(accountId); } final Double sleepAvgDouble = stats.getMean(); final int sleepAvg = (int) Math.round(sleepAvgDouble); final int recommendedCoffeeMinutesTime = getRecommendedCoffeeMinutesTime(sleepAvg); final String sleepTime = InsightUtils.timeConvert(sleepAvg); final String coffeeTime = InsightUtils.timeConvert(recommendedCoffeeMinutesTime); final Text text = CaffeineAlarmMsgEN.getCaffeineAlarmMessage(sleepTime, coffeeTime); return Optional.of(new InsightCard(accountId, text.title, text.message, InsightCard.Category.CAFFEINE, InsightCard.TimePeriod.MONTHLY, DateTime.now(DateTimeZone.UTC), InsightCard.InsightType.DEFAULT)); }
Source:
<code>private TestSplit(int id, OptionalInt bucketNumber) { super( "path", 0, 100, 100, ImmutableList.of(new InternalHiveBlock(100, ImmutableList.of())), bucketNumber, bucketNumber, true, false, <START> NodeSelectionStrategy.NO_PREFERENCE, <END> false, new HiveSplitPartitionInfo( new Storage( StorageFormat.create("serde", "input", "output"), "location", Optional.empty(), false, ImmutableMap.of()), new Path("path").toUri(), ImmutableList.of(), "partition-name", id, ImmutableMap.of(), Optional.empty()), Optional.empty()); }</code><technical_language>static import</technical_language>

Target:
private TestSplit(int id, OptionalInt bucketNumber) { super( "path", 0, 100, 100, ImmutableList.of(new InternalHiveBlock(100, ImmutableList.of())), bucketNumber, bucketNumber, true, false, NO_PREFERENCE, false, new HiveSplitPartitionInfo( new Storage( StorageFormat.create("serde", "input", "output"), "location", Optional.empty(), false, ImmutableMap.of()), new Path("path").toUri(), ImmutableList.of(), "partition-name", id, ImmutableMap.of(), Optional.empty()), Optional.empty()); }
Source:
<code>public MultiSourceTrackingToken createTailToken() { Map<String, TrackingToken> tokenMap = new HashMap<>(); <START> eventStreams.forEach((k, v) -> tokenMap.put(k, v.createTailToken())); <END> return new MultiSourceTrackingToken(tokenMap); }</code><technical_language>This taste, I personally prefer single character variable names, in lambdas. personally prefer renamed streamableSourceName v streamableMessageSource, for example</technical_language>

Target:
public MultiSourceTrackingToken createTailToken() { Map<String, TrackingToken> tokenMap = new HashMap<>(); eventStreams.forEach(streamableMessageSource -> tokenMap.put(streamableMessageSource.sourceId(), streamableMessageSource.createTailToken())); return new MultiSourceTrackingToken(tokenMap); }
Source:
<code>public @Nonnull ILogData read(long address) { if (!runtime.getParameters().isCacheDisabled()) { try { ILogData data = readCache.getIfPresent(address); if (data == null) { <START> final ILogData loadedVal = fetch(address); <END> data = readCache.get(address, () -> loadedVal); return data; } } catch (ExecutionException | UncheckedExecutionException e) { Throwable cause = e.getCause(); if (cause instanceof RuntimeException) { throw (RuntimeException) cause; } else { throw new RuntimeException(cause); } } } return fetch(address); }</code><technical_language>This is effectively synchronization barrier? fetch(...) returns, guaranteed populated in cache, assuming writer is utilizing cache. I understanding this correctly</technical_language>

Target:
ILogData read(long address) { if (!runtime.getParameters().isCacheDisabled()) { ILogData data = readCache.getIfPresent(address); if (data == null) { final ILogData loadedVal = fetch(address); data = readCache.asMap().computeIfAbsent(address, (k) -> loadedVal); return data; } else { return data; } } else { return fetch(address); } }
Source:
<code>public List<ValidationResult> getWarnings() { <START> List<ValidationResult> warnings = new ArrayList<>(); <END> for (ValidationResult vr: validationResults.values()) { if (ValidationResult.Result.WARNING == vr.getStatus()) { warnings.add(vr); } } return warnings; }</code><technical_language>Java version is allowed in Daikon. If java 8 is allowed java streams feature this method shorter</technical_language>

Target:
public Map<String, ValidationResult> getWarnings() { return filterResultsByStatus(Result.WARNING); }
Source:
<code>public static Geopoint parse(@NonNull final String text) { try { final String[] parts = StringUtils.split(StringUtils.trim(text)); if (parts.length == 2) { final double lat = Double.parseDouble(StringUtils.strip(parts[0], " \t\u00a0")); final double lon = Double.parseDouble(StringUtils.strip(parts[1], " \t\u00a0")); return new Geopoint(lat, lon); } } catch (final NumberFormatException e) { } try { final UTMPoint utmPoint = new UTMPoint(text); return utmPoint.toLatLong(); <START> } catch (final Exception e) { <END> } final ResultWrapper latitudeWrapper = parseHelper(text, LatLon.LAT); final ResultWrapper longitudeWrapper = parseHelper(text.substring(latitudeWrapper.matcherPos + latitudeWrapper.matcherLength), LatLon.LON); if (longitudeWrapper.matcherPos - (latitudeWrapper.matcherPos + latitudeWrapper.matcherLength) >= 10) { throw new Geopoint.ParseException("Distance between latitude and longitude text is to large.", LatLon.LON); } final double lat = latitudeWrapper.result; if (!Geopoint.isValidLatitude(lat)) { throw new Geopoint.ParseException(text, LatLon.LAT); } final double lon = longitudeWrapper.result; if (!Geopoint.isValidLongitude(lon)) { throw new Geopoint.ParseException(text, LatLon.LON); } return new Geopoint(lat, lon); }</code><technical_language>tend call exceptions ignore in new code some tools get this a hint do expect do exception</technical_language>

Target:
public static Geopoint parse(@NonNull final String text) { try { final String[] parts = StringUtils.split(StringUtils.trim(text)); if (parts.length == 2) { final double lat = Double.parseDouble(StringUtils.strip(parts[0], " \t\u00a0")); final double lon = Double.parseDouble(StringUtils.strip(parts[1], " \t\u00a0")); return new Geopoint(lat, lon); } } catch (final NumberFormatException ignored) { } try { final UTMPoint utmPoint = new UTMPoint(text); return utmPoint.toLatLong(); } catch (final Exception ignored) { } final ResultWrapper latitudeWrapper = parseHelper(text, LatLon.LAT); final ResultWrapper longitudeWrapper = parseHelper(text.substring(latitudeWrapper.matcherPos + latitudeWrapper.matcherLength), LatLon.LON); if (longitudeWrapper.matcherPos - (latitudeWrapper.matcherPos + latitudeWrapper.matcherLength) >= 10) { throw new Geopoint.ParseException("Distance between latitude and longitude text is to large.", LatLon.LON); } final double lat = latitudeWrapper.result; if (!Geopoint.isValidLatitude(lat)) { throw new Geopoint.ParseException(text, LatLon.LAT); } final double lon = longitudeWrapper.result; if (!Geopoint.isValidLongitude(lon)) { throw new Geopoint.ParseException(text, LatLon.LON); } return new Geopoint(lat, lon); }
Source:
<code>public void visitAssignmentExpression(AssignmentExpressionTree tree) { if (!is(tree.expression(), "this")) { return; } ExpressionTree variable = tree.variable(); MemberSelectExpressionTree memberSelect; if (variable.is(Tree.Kind.MEMBER_SELECT)) { memberSelect = (MemberSelectExpressionTree) variable; if (memberSelect.expression().symbolType().symbol().equals(this.owner) && memberSelect.identifier().symbol().isStatic()) { return; } } <START> if (variable.is(Tree.Kind.IDENTIFIER) && isStaticField((IdentifierTree) variable)) { <END> return; } reportIssue(tree, REPORT); }</code><technical_language>I else if</technical_language>

Target:
public void visitAssignmentExpression(AssignmentExpressionTree tree) { if (!isThis(tree.expression())) { return; } ExpressionTree variable = tree.variable(); if (variable.is(Tree.Kind.MEMBER_SELECT)) { MemberSelectExpressionTree memberSelect = (MemberSelectExpressionTree) variable; if (memberSelect.expression().symbolType().symbol().equals(this.owner) && memberSelect.identifier().symbol().isStatic()) { return; } } else if (variable.is(Tree.Kind.IDENTIFIER) && (((IdentifierTree) variable).symbol().isStatic())) { return; } report(tree); }
Source:
<code>public void testConvertToLong() { final Set<AmrProfileStatusCodeFlag> amrStatusses = new HashSet<>(); amrStatusses.add(AmrProfileStatusCodeFlag.DATA_NOT_VALID); amrStatusses.add(AmrProfileStatusCodeFlag.POWER_DOWN); <START> assertEquals((short) 132, (short) this.helperService.toValue(amrStatusses)); <END> }</code><technical_language>I casts short do useful here</technical_language>

Target:
public void testConvertToLong() { final Set<AmrProfileStatusCodeFlag> amrStatusCodeFlags = new HashSet<>(); amrStatusCodeFlags.add(AmrProfileStatusCodeFlag.DATA_NOT_VALID); amrStatusCodeFlags.add(AmrProfileStatusCodeFlag.POWER_DOWN); assertEquals((short) 132, (short) this.helperService.toValue(amrStatusCodeFlags)); }
Source:
<code>public void startElement(TagNode node) { <START> if (node.getNodeName().equalsIgnoreCase(SLY_TAG)) { <END> node.getAttributes().stream() .filter(this::containsRedundantUnwrapAttr) .findFirst() .ifPresent(attribute -> createViolation(node.getStartLinePosition(), VIOLATION_MESSAGE)); } }</code><technical_language>flip equals() constant is left side</technical_language>

Target:
public void startElement(TagNode node) { if (SLY_TAG.equalsIgnoreCase(node.getNodeName())) { node.getAttributes().stream() .filter(this::containsRedundantUnwrapAttr) .findFirst() .ifPresent(attribute -> createViolation(node.getStartLinePosition(), VIOLATION_MESSAGE)); } }
Source:
<code>public void parseUnknownRules() { String rulesString = "{\n" + " \"schemas\": [\n" + " {\n" + " \"user\": \"(alice|bob)\",\n" + " \"schema\": \"(default|pv)\",\n" + " \"owner\": true\n" + " }" + " ]" + "}"; <START> try { <END> FileBasedSystemAccessControl.parse(rulesString.getBytes(US_ASCII)); fail("expected failure"); } catch (RuntimeException e) { assertContains(e.getMessage(), "Invalid JSON"); } }</code><technical_language>assertThatThrownBy: <LINK_0></technical_language>

Target:
public void parseUnknownRules() { assertThatThrownBy(() -> parse("src/test/resources/security-config-file-with-unknown-rules.json")) .hasMessageContaining("Invalid JSON"); }
Source:
<code>private void loadSettingsFile(File file) { if (file == null) { firmwareSettingsFile = null; } else { try { firmwareSettingsFile = FirmwareSettingUtils.readSettings(file); } catch (IOException e) { <START> JOptionPane.showMessageDialog(this.getComponent(), "Couldn't read settings file: " + e.getMessage(), "Error while reading settings file", JOptionPane.ERROR_MESSAGE); <END> firmwareSettingsFile = null; } } showSettingsInformation(); }</code><technical_language>a helper in GUIHelper.displayErrorDialog wrap dialogs. main purpose is wrap invokeLater, strictly necessary tied a swing event thread</technical_language>

Target:
private void loadSettingsFile(File file) { if (file == null) { firmwareSettingsFile = null; } else { try { firmwareSettingsFile = FirmwareSettingUtils.readSettings(file); } catch (IOException e) { GUIHelpers.displayErrorDialog("Couldn't read settings file: " + e.getMessage(), true); firmwareSettingsFile = null; } } showSettingsInformation(); }
Source:
<code><START> public IStatus runInternal(final IProgressMonitor monitor) { <END> try { if (!resource.isLoaded()) return Status.CANCEL_STATUS; if (resource instanceof AbstractSCTResource) { relinkModel(monitor, (AbstractSCTResource) resource); } if (monitor.isCanceled()) return Status.CANCEL_STATUS; TransactionalValidationRunner runner = new TransactionalValidationRunner(validator, resource, CheckMode.FAST_ONLY, new CancelIndicator() { public boolean isCanceled() { return monitor.isCanceled(); } }); TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(resource); if (editingDomain == null) return Status.CANCEL_STATUS; try { editingDomain.runExclusive(runner); } catch (Throwable ex) { return Status.CANCEL_STATUS; } final List<Issue> issues = runner.getResult(); if (issues == null) return Status.CANCEL_STATUS; validationIssueProcessor.processIssues(issues, monitor); } catch (Exception ex) { ex.printStackTrace(); return new Status(IStatus.ERROR, DiagramActivator.PLUGIN_ID, ex.getMessage()); } return Status.OK_STATUS; }</code><technical_language>avoid increasing visibility?</technical_language>

Target:
protected IStatus runInternal(final IProgressMonitor monitor) { try { if (!resource.isLoaded()) return Status.CANCEL_STATUS; if (resource instanceof AbstractSCTResource) { relinkModel(monitor, (AbstractSCTResource) resource); } if (monitor.isCanceled()) return Status.CANCEL_STATUS; TransactionalValidationRunner runner = new TransactionalValidationRunner(validator, resource, CheckMode.FAST_ONLY, new CancelIndicator() { public boolean isCanceled() { return monitor.isCanceled(); } }); TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(resource); if (editingDomain == null) return Status.CANCEL_STATUS; try { editingDomain.runExclusive(runner); } catch (Throwable ex) { return Status.CANCEL_STATUS; } final List<Issue> issues = runner.getResult(); if (issues == null) return Status.CANCEL_STATUS; validationIssueProcessor.processIssues(issues, monitor); } catch (Exception ex) { ex.printStackTrace(); return new Status(IStatus.ERROR, DiagramActivator.PLUGIN_ID, ex.getMessage()); } return Status.OK_STATUS; }
Source:
<code>private void createProfiles() throws ConfigurationException { for (ExtensionEntry authnExtension : ConfigurationLoader.getInstance().getExtensionsByService(AUTHN_SERVICE)) { registerProfile( new AuthenticationProfile( (Authenticator) authnExtension.getExtension(), <START> (Directory) ConfigurationLoader.getInstance().getExtensionByName( <END> authnExtension.getConfig().getString(AUTHN_AUTHZ_PLUGIN) ).getExtension() ) ); } }</code><technical_language>this indented if god of eclipse permits</technical_language>

Target:
private void createProfiles() throws ConfigurationException { for (ExtensionEntry authnExtension : ExtensionLoader.getInstance().getProvidedExtensions(AUTHN_SERVICE)) { registerProfile( new AuthenticationProfile( (Authenticator) authnExtension.getExtension(), (Directory) ExtensionLoader.getInstance().getExtensionByName( authnExtension.getConfig().getString(AUTHN_AUTHZ_PLUGIN) ).getExtension() ) ); } }
Source:
<code>static synchronized void release(BaseRealm realm) { String canonicalPath = realm.getPath(); RealmCache cache = cachesMap.get(canonicalPath); Integer refCount = null; RefAndCount refAndCount = null; if (cache != null) { refAndCount = cache.refAndCountMap.get(RealmCacheType.valueOf(realm.getClass())); refCount = refAndCount.localCount.get(); } if (refCount == null) { refCount = 0; } if (refCount <= 0) { RealmLog.w("Realm " + canonicalPath + " has been closed already."); return; } realm.tidyPerformedTransactions(); <START> if (!realm.asyncTransactions.isEmpty() || !realm.asyncTransactionCallbacks.isEmpty()) { <END> RealmLog.w("Realm " + canonicalPath + " will be closed with pending async transactions or callbacks."); } refCount -= 1; if (refCount == 0) { refAndCount.localCount.set(null); refAndCount.localRealm.set(null); refAndCount.globalCount--; if (refAndCount.globalCount < 0) { throw new IllegalStateException("Global reference counter of Realm" + canonicalPath + " got corrupted."); } if (realm instanceof Realm && refAndCount.globalCount == 0) { cache.typedColumnIndices = null; } int totalRefCount = 0; for (RealmCacheType type : RealmCacheType.values()) { totalRefCount += cache.refAndCountMap.get(type).globalCount; } if (totalRefCount == 0) { cachesMap.remove(canonicalPath); } realm.doClose(); } else { refAndCount.localCount.set(refCount); } }</code><technical_language>1. I if worth add a list asyncTransactions for printing some warnings 2. If does, this logic in BaseRealm.doClose() @realm/java</technical_language>

Target:
static synchronized void release(BaseRealm realm) { String canonicalPath = realm.getPath(); RealmCache cache = cachesMap.get(canonicalPath); Integer refCount = null; RefAndCount refAndCount = null; if (cache != null) { refAndCount = cache.refAndCountMap.get(RealmCacheType.valueOf(realm.getClass())); refCount = refAndCount.localCount.get(); } if (refCount == null) { refCount = 0; } if (refCount <= 0) { RealmLog.w("Realm " + canonicalPath + " has been closed already."); return; } refCount -= 1; if (refCount == 0) { refAndCount.localCount.set(null); refAndCount.localRealm.set(null); refAndCount.globalCount--; if (refAndCount.globalCount < 0) { throw new IllegalStateException("Global reference counter of Realm" + canonicalPath + " got corrupted."); } if (realm instanceof Realm && refAndCount.globalCount == 0) { cache.typedColumnIndices = null; } int totalRefCount = 0; for (RealmCacheType type : RealmCacheType.values()) { totalRefCount += cache.refAndCountMap.get(type).globalCount; } if (totalRefCount == 0) { cachesMap.remove(canonicalPath); } realm.doClose(); } else { refAndCount.localCount.set(refCount); } }
Source:
<code>private void handleSignInResponse(int resultCode, Intent data) { if (resultCode == RESULT_OK) { final String prevUid = data.getStringExtra(ExtraConstants.EXTRA_MERGE_FAILED); if (prevUid != null) { <START> FirebaseDatabase.getInstance() <END> .getReference() .child("chats") .addListenerForSingleValueEvent( new ValueEventListener() { @Override public void onDataChange(DataSnapshot snapshot) { if (snapshot.getValue() != null) { for (DataSnapshot chatSnapshot : snapshot.getChildren()) { Chat chat = chatSnapshot.getValue(Chat.class); if (chat.getUid().equals(prevUid)) { String currentUid = FirebaseAuth .getInstance() .getCurrentUser() .getUid(); chatSnapshot.getRef() .child("uid") .setValue(currentUid); chatSnapshot.getRef() .child("name") .setValue("User " + currentUid .substring(0, 6)); } } } } @Override public void onCancelled(DatabaseError error) { Log.e(TAG, "onCancelled: ", error.toException()); } }); } startActivity(SignedInActivity.createIntent(this)); finish(); return; } if (resultCode == RESULT_CANCELED) { showSnackbar(R.string.sign_in_cancelled); return; } showSnackbar(R.string.unknown_sign_in_response); }</code><technical_language>remove this? referencing DB chat sample in AuthUI sample</technical_language>

Target:
private void handleSignInResponse(int resultCode, Intent data) { IdpResponse response = IdpResponse.fromResultIntent(data); if (resultCode == RESULT_OK) { startSignedInActivity(response); setResult(RESULT_OK); finish(); } else { if (response == null) { showSnackbar(R.string.sign_in_cancelled); return; } if (response.getError().getErrorCode() == ErrorCodes.NO_NETWORK) { showSnackbar(R.string.no_internet_connection); return; } showSnackbar(R.string.unknown_error); Log.e(TAG, "Sign-in error: ", response.getError()); } }
Source:
<code>public void getGroups(String id, Handler<Either<String, JsonArray>> results) { String query = "" <START> + "MATCH (g:Group)<-[:IN]-(u:User { id: {id} }) WHERE exists(g.id) " <END> + "OPTIONAL MATCH (c:Class)<-[:DEPENDS]-(g) " + "OPTIONAL MATCH (s:Structure)<-[:DEPENDS]-(g) " + "WITH g, collect( distinct {name: c.name, id: c.id}) as classes, collect( distinct {name: s.name, id: s.id}) as structures, " + "HEAD(filter(x IN labels(g) WHERE x <> 'Visible' AND x <> 'Group')) as type " + "RETURN DISTINCT " + "g.id as id, " + "g.name as name, " + "g.filter as filter, " + "g.displayName as displayName, " + "g.users as internalCommunicationRule, " + "type, " + "CASE WHEN any(x in classes where x <> {name: null, id: null}) THEN classes END as classes, " + "CASE WHEN any(x in structures where x <> {name: null, id: null}) THEN structures END as structures, " + "CASE WHEN (g: ProfileGroup)-[:DEPENDS]-(:Structure) THEN 'StructureGroup' END as subType"; JsonObject params = new JsonObject().put("id", id); neo.execute(query, params, validResultHandler(results)); }</code><technical_language>t'as besoin du exists(g.id) ? y'a des groupes sans id</technical_language>

Target:
public void getGroups(String id, Handler<Either<String, JsonArray>> results) { String query = "" + "MATCH (g:Group)<-[:IN]-(u:User { id: {id} }) " + "OPTIONAL MATCH (c:Class)<-[:DEPENDS]-(g) " + "OPTIONAL MATCH (s:Structure)<-[:DEPENDS]-(g) " + "WITH g, collect( distinct {name: c.name, id: c.id}) as classes, collect( distinct {name: s.name, id: s.id}) as structures, " + "HEAD(filter(x IN labels(g) WHERE x <> 'Visible' AND x <> 'Group')) as type " + "RETURN DISTINCT " + "g.id as id, " + "g.name as name, " + "g.filter as filter, " + "g.displayName as displayName, " + "g.users as internalCommunicationRule, " + "type, " + "CASE WHEN any(x in classes where x <> {name: null, id: null}) THEN classes END as classes, " + "CASE WHEN any(x in structures where x <> {name: null, id: null}) THEN structures END as structures, " + "CASE WHEN (g: ProfileGroup)-[:DEPENDS]-(:Structure) THEN 'StructureGroup' END as subType"; JsonObject params = new JsonObject().put("id", id); neo.execute(query, params, validResultHandler(results)); }
Source:
<code>public boolean matches(@NonNull Pattern pattern) { if (pattern.matcher(getName()).find()) { return true; } if (pattern.matcher(Integer.toString(fThreadId)).find()) { return true; } if (pattern.matcher(Integer.toString(fParentThreadId)).find()) { return true; } if (pattern.matcher(Integer.toString(fThreadQuark)).find()) { return true; } <START> return pattern.matcher(Utils.formatTime(getStartTime(), TimeFormat.CALENDAR, Resolution.NANOSEC)).find(); <END> }</code><technical_language>add a matcher for trace name please, a sneaky column</technical_language>

Target:
public boolean matches(@NonNull Pattern pattern) { if (pattern.matcher(getName()).find()) { return true; } if (pattern.matcher(Integer.toString(fThreadId)).find()) { return true; } if (pattern.matcher(Integer.toString(fParentThreadId)).find()) { return true; } if (pattern.matcher(Integer.toString(fThreadQuark)).find()) { return true; } if (pattern.matcher(Utils.formatTime(getStartTime(), TimeFormat.CALENDAR, Resolution.NANOSEC)).find()) { return true; } return pattern.matcher(fTrace.getName()).find(); }
Source:
<code><START> public static ProviderConfigurationBuilder configurationBuilder() { <END> return ProviderConfigurationBuilder.create() .property(Attributes.PRIORITY_PROPERTY) .property(Attributes.ENABLED_PROPERTY) .property(Attributes.ACTIVE_PROPERTY); }</code><technical_language>I final modifier purpose. prevent hiding method subclass</technical_language>

Target:
public final static ProviderConfigurationBuilder configurationBuilder() { return ProviderConfigurationBuilder.create() .property(Attributes.PRIORITY_PROPERTY) .property(Attributes.ENABLED_PROPERTY) .property(Attributes.ACTIVE_PROPERTY); }
Source:
<code>private static URI dockerDaemonUri() { if (SystemInfo.isLinux()) { return UNIX_SOCKET_URI; } String host = System.getenv(BOOT2DOCKER_HOST_PROPERTY); if (host != null) { URI userURI; try { userURI = new URI(host); } catch (URISyntaxException e) { LOG.error(String.format("Unable to parse {0} property with value {1}", BOOT2DOCKER_HOST_PROPERTY, host), e); return DEFAULT_BOOT2DOCKER_URI; } String tls = System.getenv(BOOT2DOCKER_TLS_VERIFY_PROPERTY); String protocol = "1".equals(tls) ? "https" : "http"; try { return new URI(protocol, null, userURI.getHost(), userURI.getPort(), null, null, null); } catch (URISyntaxException e) { LOG.error(String.format("Unable to create URI {0} property with value {1} and TLS {2}", BOOT2DOCKER_HOST_PROPERTY, host, BOOT2DOCKER_TLS_VERIFY_PROPERTY), e); return DEFAULT_BOOT2DOCKER_URI; } } <START> <END> return DEFAULT_BOOT2DOCKER_URI; }</code><technical_language>Generally is okay, is necessary 5 empty lines here</technical_language>

Target:
private static URI dockerDaemonUri() { return dockerDaemonUri(SystemInfo.isLinux(), System.getenv()); }
Source:
<code>protected void exportSampleData() { if (preView == null) { return; } final EObject sampleData = preView.getSampleData(); if (sampleData == null) { return; } final FileDialog dialog = new FileDialog(parent.getShell(), SWT.SAVE); dialog.setFilterExtensions(new String[] { "*.xmi" }); final String result = dialog.open(); if (result == null) { return; } final ResourceSet rs = new ResourceSetImpl(); final Resource resource = rs.createResource(URI.createFileURI(result)); resource.getContents().add(sampleData); try { resource.save(null); } catch (final IOException ex) { <START> <END> } }</code><technical_language>I show error dialog</technical_language>

Target:
protected void exportSampleData() { if (preView == null) { return; } final EObject sampleData = preView.getSampleData(); if (sampleData == null) { return; } final FileDialog dialog = new FileDialog(parent.getShell(), SWT.SAVE); dialog.setFilterExtensions(new String[] { "*.xmi" }); final String result = dialog.open(); if (result == null) { return; } final ResourceSet rs = new ResourceSetImpl(); final Resource resource = rs.createResource(URI.createFileURI(result)); resource.getContents().add(sampleData); try { resource.save(null); } catch (final IOException e) { final StringWriter sw = new StringWriter(); e.printStackTrace(new PrintWriter(sw)); final String stackTrace = sw.toString(); final List<Status> childStatuses = new ArrayList<Status>(); for (final String line : stackTrace.split(System.getProperty("line.separator"))) { childStatuses.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, line)); } final MultiStatus status = new MultiStatus(Activator.PLUGIN_ID, IStatus.ERROR, childStatuses.toArray(new Status[] {}), e.getLocalizedMessage(), null); ErrorDialog.openError(parent.getShell(), Messages.PreviewView_SaveErrorDialogTitle, Messages.PreviewView_SaveErrorDescription, status); } }
Source:
<code>protected void configure(HttpSecurity http) throws Exception { http .addFilterAfter(new CsrfHeaderFilter(), CsrfFilter.class) .csrf().csrfTokenRepository(csrfTokenRepository()) .and() .exceptionHandling().authenticationEntryPoint(new Http403ForbiddenEntryPoint()) .and() .userDetailsService(userDetailsService()) .formLogin() .permitAll() .failureHandler(authenticationFailureHandler) .and() .logout() .permitAll() .logoutSuccessUrl("/#/login") .and() .authorizeRequests() .antMatchers("/api/admin/**").access("hasRole('palga')") .antMatchers( "/", "/index.html", "/*.css", "/*.js", "/*.json", "/css/**", "/content/**", "/robots.txt", "/*.ico", "/api/public/**", "/api/password/request-new", "/api/password/reset" ).permitAll() .antMatchers(HttpMethod.POST, "/api/register/users").permitAll() .antMatchers(HttpMethod.POST, "/api/register/users/**").permitAll() .antMatchers(HttpMethod.GET, "/api/register/users/activate/**").permitAll() .antMatchers(HttpMethod.GET, "/api/status").permitAll() .antMatchers(HttpMethod.GET, "/api/ping").permitAll() <START> .antMatchers("/api/**", "/error").authenticated() <END> .and() .headers() .addHeaderWriter(new StaticHeadersWriter("Content-Security-Policy-Report-Only", "default-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:")) ; }</code><technical_language>set permitAll for '/error' endpoint? configured permitAll in other projects</technical_language>

Target:
protected void configure(HttpSecurity http) throws Exception { http .addFilterAfter(new CsrfHeaderFilter(), CsrfFilter.class) .csrf().csrfTokenRepository(csrfTokenRepository()) .and() .exceptionHandling().authenticationEntryPoint(new Http403ForbiddenEntryPoint()) .and() .userDetailsService(userDetailsService()) .formLogin() .permitAll() .failureHandler(authenticationFailureHandler) .and() .logout() .permitAll() .logoutSuccessUrl("/#/login") .and() .authorizeRequests() .antMatchers("/api/admin/**").access("hasRole('palga')") .antMatchers( "/", "/index.html", "/*.css", "/*.js", "/*.json", "/css/**", "/content/**", "/robots.txt", "/*.ico", "/api/public/**", "/api/password/request-new", "/api/password/reset", "/error" ).permitAll() .antMatchers(HttpMethod.POST, "/api/register/users").permitAll() .antMatchers(HttpMethod.POST, "/api/register/users/**").permitAll() .antMatchers(HttpMethod.GET, "/api/register/users/activate/**").permitAll() .antMatchers(HttpMethod.GET, "/api/status").permitAll() .antMatchers(HttpMethod.GET, "/api/ping").permitAll() .antMatchers("/api/**").authenticated() .and() .headers() .addHeaderWriter(new StaticHeadersWriter("Content-Security-Policy-Report-Only", "default-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:")) ; }
Source:
<code>protected void setExtra(Query call) { this.extra = call.getMap(); <START> this.query = call.get("query", "fossasia"); <END> this.setParam(); }</code><technical_language>default fossasia here</technical_language>

Target:
protected void setExtra(Query call) { this.extra = call.getMap(); this.query = call.get("query", ""); this.setParam(); }
Source:
<code>public void update() { FBO sceneOpaque = dynamicFBM.getFBO(DefaultDynamicFBOs.ReadOnlyGBuffer.getResourceUrn()); <START> sceneOpaque.attachDepthBufferTo(dynamicFBM.getFBO(REFRACTIVE_REFLECTIVE_URN)); <END> }</code><technical_language>Hmmm... I feel this ok short term long term problematic. I.e. if this node replaced a module a more advanced version of _NOT_ re-attaching depth buffer refr/refl FBO? handle this NON-rendering node, job is in DAG if reflective/refractive FBO is needed making current ReadOnlyGBuffer refl/refr FBO share depth buffer, reacting FBOs regenerated. Alternatively, FBO.attachDepthBufferTo() method track is attached reattach is attached. This nodes method safely. prefer option though. Feels neater. write a TODO this? in WorldRendererImpl, reflection node</technical_language>

Target:
public void update() { READ_ONLY_GBUFFER.attachDepthBufferTo(displayResolutionDependentFBOs.get(REFRACTIVE_REFLECTIVE)); }
Source:
<code><START> public Label getLabel(SkyKey key) { <END> if (key instanceof ActionLookupKey) { return Preconditions.checkNotNull(((ActionLookupKey) key.argument()).getLabel(), key); } else if (SkyFunctions.isSkyFunction(SkyFunctions.TRANSITIVE_TARGET).apply(key)) { return ((TransitiveTargetKey) key).getLabel(); } else { throw new UnsupportedOperationException(key.toString()); } }</code><technical_language>a while I looked this code. Why's this a set of key types prettyPrint</technical_language>

Target:
public Label getLabel(SkyKey key) { if (key instanceof ActionLookupKey) { return Preconditions.checkNotNull(((ActionLookupKey) key.argument()).getLabel(), key); } else if (key instanceof TransitiveTargetKey) { return ((TransitiveTargetKey) key).getLabel(); } else { throw new UnsupportedOperationException(key.toString()); } }