auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private List<SimpleFeature> getFeature(List<PeakDetection.GoodPeakInfo> goodPeakList) { List<SimpleFeature> featureList = new ArrayList<SimpleFeature>(); int lowerScanBound; int upperScanBound; for (int i = 0; i < goodPeakList.size(); i++) { lowerScanBound = goodPeakList.get(i).lowerScanBound; upperScanBound = goodPeakList.get(i).upperScanBound; double mz = goodPeakList.get(i).mz; float[] rtArray = objSliceSparseMatrix.getRetentionTimeArray(lowerScanBound, upperScanBound); float[] intensityArray = objSliceSparseMatrix.getIntensities(goodPeakList.get(i)); double[] mzArray = new double[upperScanBound - lowerScanBound + 1]; for (int j = 0; j < upperScanBound - lowerScanBound + 1; j++) { mzArray[j] = mz; } SimpleChromatogram chromatogram = new SimpleChromatogram(); chromatogram.setDataPoints(rtArray, mzArray, intensityArray, upperScanBound - lowerScanBound + 1); SimpleFeature feature = new SimpleFeature(); feature.setArea(CurveTool.normalize(intensityArray)); feature.setHeight(goodPeakList.get(i).maxHeight); feature.setRetentionTime( <START> (float) objSliceSparseMatrix.getRetentionTime(goodPeakList.get(i).maxHeightScanNumber)); <END> feature.setMz(mz); feature.setChromatogram(chromatogram); featureList.add(feature); } return featureList; }</code><technical_language>This is awful of coding - of all, is impossible understand is written in is. is if exception is thrown this line, if caused goodPeakList.get(i), objSliceSparseMatrix.getRetentionTime(), conversion float, etc. Please avoid making function calls in line of code. code simple understandable</technical_language>

Target:
private List<SimpleFeature> getFeature(List<PeakDetection.GoodPeakInfo> goodPeakList) { List<SimpleFeature> featureList = new ArrayList<SimpleFeature>(); int lowerScanBound; int upperScanBound; for (PeakDetection.GoodPeakInfo goodPeakInfo : goodPeakList) { lowerScanBound = goodPeakInfo.lowerScanBound; upperScanBound = goodPeakInfo.upperScanBound; double mz = goodPeakInfo.mz; float[] rtArray = objSliceSparseMatrix.getRetentionTimeArray(lowerScanBound, upperScanBound); float[] intensityArray = objSliceSparseMatrix.getIntensities(goodPeakInfo); double[] mzArray = new double[upperScanBound - lowerScanBound + 1]; for (int j = 0; j < upperScanBound - lowerScanBound + 1; j++) { mzArray[j] = mz; } SimpleChromatogram chromatogram = new SimpleChromatogram(); chromatogram.setDataPoints(rtArray, mzArray, intensityArray, upperScanBound - lowerScanBound + 1); SimpleFeature feature = new SimpleFeature(); feature.setArea(CurveTool.normalize(intensityArray)); feature.setHeight(goodPeakInfo.maxHeight); int maxHeightScanNumber = goodPeakInfo.maxHeightScanNumber; float retentionTime = (float) objSliceSparseMatrix.getRetentionTime(maxHeightScanNumber); feature.setRetentionTime(retentionTime); feature.setMz(mz); feature.setChromatogram(chromatogram); featureList.add(feature); } return featureList; }
Source:
<code>Map<String, InstanceMetrics> parse( TopologyMaster.MetricResponse response, String component, String metric) { Map<String, InstanceMetrics> metricsData = new HashMap<>(); if (response == null || !response.getStatus().getStatus().equals(StatusCode.OK)) { return metricsData; } if (response.getMetricCount() == 0) { <START> LOG.info(String.format("Did not get any metrics from tracker for %s:%s ", component, metric)); <END> return metricsData; } for (TaskMetric tm :response.getMetricList()) { String instanceId = tm.getInstanceId(); InstanceMetrics instanceMetrics = new InstanceMetrics(instanceId); for (IndividualMetric im: tm.getMetricList()) { String metricName = im.getName(); Map<Instant, Double> values = new HashMap<>(); for (IntervalValue iv: im.getIntervalValuesList()) { MetricInterval mi = iv.getInterval(); String value = iv.getValue(); values.put(Instant.ofEpochSecond(mi.getStart()), Double.parseDouble(value)); } if (!values.isEmpty()) { instanceMetrics.addMetric(metricName, values); } } metricsData.put(instanceId, instanceMetrics); } return metricsData; }</code><technical_language>s / tracker / metricsCache</technical_language>

Target:
Map<String, InstanceMetrics> parse( TopologyMaster.MetricResponse response, String component, String metric) { Map<String, InstanceMetrics> metricsData = new HashMap<>(); if (response == null || !response.getStatus().getStatus().equals(StatusCode.OK)) { return metricsData; } if (response.getMetricCount() == 0) { LOG.info(String.format( "Did not get any metrics from MetricsCache for %s:%s ", component, metric)); return metricsData; } for (TaskMetric tm :response.getMetricList()) { String instanceId = tm.getInstanceId(); InstanceMetrics instanceMetrics = new InstanceMetrics(instanceId); for (IndividualMetric im: tm.getMetricList()) { String metricName = im.getName(); Map<Instant, Double> values = new HashMap<>(); for (IntervalValue iv: im.getIntervalValuesList()) { MetricInterval mi = iv.getInterval(); String value = iv.getValue(); values.put(Instant.ofEpochSecond(mi.getStart()), Double.parseDouble(value)); } if (!values.isEmpty()) { instanceMetrics.addMetric(metricName, values); } } metricsData.put(instanceId, instanceMetrics); } return metricsData; }
Source:
<code>@Override public boolean canHandleRequest(@NonNull Request data) { Uri uri = data.uri; <START> if (uri == null) return false; <END> return (SCHEME_FILE.equals(uri.getScheme()) && !uri.getPathSegments().isEmpty() && ANDROID_ASSET.equals(uri.getPathSegments().get(0))); }</code><technical_language>Merge return computing a boolean java return uri != null && SCHEME_FILE.equals(uri.getScheme()) && other && thing;</technical_language>

Target:
@Override public boolean canHandleRequest(@NonNull Request data) { Uri uri = data.uri; return uri != null && SCHEME_FILE.equals(uri.getScheme()) && !uri.getPathSegments().isEmpty() && ANDROID_ASSET.equals(uri.getPathSegments().get(0)); }
Source:
<code>private Reader readBinaryMetaData(FileChannel metadataFileChannel) throws CTFReaderException { <START> Reader metadataTextInput; <END> StringBuffer metadataText = new StringBuffer(); MetadataPacketHeader packetHeader = readMetadataPacket( metadataFileChannel, metadataText); while (packetHeader != null) { packetHeader = readMetadataPacket(metadataFileChannel, metadataText); } metadataTextInput = new StringReader(metadataText.toString()); return metadataTextInput; }</code><technical_language>This assigned returned line bellow. removed inline return</technical_language>

Target:
private Reader readBinaryMetaData(FileChannel metadataFileChannel) throws CTFReaderException { StringBuffer metadataText = new StringBuffer(); MetadataPacketHeader packetHeader = readMetadataPacket( metadataFileChannel, metadataText); while (packetHeader != null) { packetHeader = readMetadataPacket(metadataFileChannel, metadataText); } return new StringReader(metadataText.toString()); }
Source:
<code>private ApiInfo apiInfo() { Contact contact = new Contact("CHPL Development Team. " + "Please submit any questions using the Health IT Feedback Form and " + "select the \"Certified Health IT Products List (CHPL)\" category.", "<LINK_1>", ""); return new ApiInfo("CHPL", "Certified Health IT Product Listing", "18.0.0", "http://terms/of/service.url", <START> contact, "License Text", "<LINK_0>"); <END> }</code><technical_language>we/can remove terms of service link while in here? link exists</technical_language>

Target:
private ApiInfo apiInfo() { Contact contact = new Contact("CHPL Development Team. " + "Please submit any questions using the Health IT Feedback Form and " + "select the \"Certified Health IT Products List (CHPL)\" category.", "<LINK_1>", ""); return new ApiInfo("CHPL", "Certified Health IT Product Listing", "18.0.0", "", contact, "License Text", "<LINK_0>"); }
Source:
<code>private String getOAuthScope() { StringBuilder builder = null; if (scopes != null) { <START> for (TencentQQScope value : scopes) { <END> if (builder == null) { builder = new StringBuilder(); } else { builder.append(","); } builder.append(value.toString()); } } return builder == null ? null : builder.toString(); }</code><technical_language>instantiate builder here</technical_language>

Target:
private String getOAuthScope() { StringBuilder builder = null; if (scopes != null) { for (QQScope value : scopes) { if (builder == null) { builder = new StringBuilder(); } else { builder.append(","); } builder.append(value.toString().toLowerCase()); } } else { builder = new StringBuilder(); builder.append(QQScope.GET_USER_INFO.toString().toLowerCase()); } return builder == null ? null : builder.toString(); }
Source:
<code>protected Set<String> buildDependencies(IActivityManager activityManager, String activityId) { Set<String> set = new HashSet<>(); for (String <START> string : <END> activityManager.getDefinedActivityIds()) { IActivity activity = activityManager.getActivity(string); for (IActivityRequirementBinding binding : activity.getActivityRequirementBindings()) { if (activityId.equals(binding.getRequiredActivityId())) { set.addAll(buildDependencies(activityManager, activity.getId())); } } } set.add(activityId); return set; }</code><technical_language>rename activityId</technical_language>

Target:
protected Set<String> buildDependencies(IActivityManager activityManager, String activityId) { Set<String> set = new HashSet<>(); for (String id : activityManager.getDefinedActivityIds()) { IActivity activity = activityManager.getActivity(id); for (IActivityRequirementBinding binding : activity.getActivityRequirementBindings()) { if (activityId.equals(binding.getRequiredActivityId())) { set.addAll(buildDependencies(activityManager, activity.getId())); } } } set.add(activityId); return set; }
Source:
<code>private void updateProperties() { <START> VM vm = (VM) getEntity(); <END> setClientIp(vm.getClientIp()); setConsoleUserName(vm.getConsoleCurentUserName()); setGuestUserName(vm.getGuestCurentUserName()); setGuestOsArch(vm.getGuestOsArch()); setGuestOsCodename(vm.getGuestOsCodename()); setGuestOsDistribution(vm.getGuestOsDistribution()); setGuestOsKernelVersion(vm.getGuestOsKernelVersion()); setGuestOsType(vm.getGuestOsType()); setGuestOsVersion(vm.getGuestOsVersion()); setTimezoneName(vm.getGuestOsTimezoneName()); setTimezoneOffset(vm.getGuestOsTimezoneOffset()); if(guestOsType == OsType.Linux) { String optional = ""; if(!StringUtils.isEmpty(guestOsCodename)) { optional = messages.guestOSVersionOptional(guestOsCodename); } guestOsNamedVersion = messages.guestOSVersionLinux(guestOsDistribution, guestOsVersion, optional); } else if(guestOsType == OsType.Windows && guestOs.startsWith("Win ")) { if(guestOs.startsWith("Win 20")) { guestOsNamedVersion = messages.guestOSVersionWindowsServer(guestOs.substring(4), guestOsVersion); } else { guestOsNamedVersion = messages.guestOSVersionWindows(guestOs.substring(4), guestOsVersion); } } String hours = NumberFormat.getFormat("00").format(timezoneOffset / 60.); String minutes = NumberFormat.getFormat("00").format(timezoneOffset % 60); if(timezoneOffset >= 0) { guestOsTimezone = messages.positiveTimezoneOffset(timezoneName, hours, minutes); } else { guestOsTimezone = messages.negativeTimezoneOffset(timezoneName, hours, minutes); } }</code><technical_language>this cast redundant EntityModel<VM> change</technical_language>

Target:
private void updateProperties() { VM vm = getEntity(); setClientIp(vm.getClientIp()); setConsoleUserName(vm.getConsoleCurentUserName()); setGuestUserName(vm.getGuestCurentUserName()); setGuestOsArch(vm.getGuestOsArch()); setGuestOsCodename(vm.getGuestOsCodename()); setGuestOsDistribution(vm.getGuestOsDistribution()); setGuestOsKernelVersion(vm.getGuestOsKernelVersion()); setGuestOsType(vm.getGuestOsType()); setGuestOsVersion(vm.getGuestOsVersion()); setGuestOsTimezoneName(vm.getGuestOsTimezoneName()); setGuestOsTimezoneOffset(vm.getGuestOsTimezoneOffset()); if (guestOsType == OsType.Linux) { String optional = ""; if (!StringUtils.isEmpty(guestOsCodename)) { optional = messages.guestOSVersionOptional(guestOsCodename); } guestOsNamedVersion = messages.guestOSVersionLinux(guestOsDistribution, guestOsVersion, optional); } else if (guestOsType == OsType.Windows && guestOs.startsWith("Win ")) { if (guestOs.startsWith("Win 20")) { guestOsNamedVersion = messages.guestOSVersionWindowsServer(guestOs.substring(4), guestOsVersion); } else { guestOsNamedVersion = messages.guestOSVersionWindows(guestOs.substring(4), guestOsVersion); } } String hours = NumberFormat.getFormat("00").format(guestOsTimezoneOffset / 60.); String minutes = NumberFormat.getFormat("00").format(guestOsTimezoneOffset % 60); if (guestOsTimezoneOffset >= 0) { guestOsTimezone = messages.positiveTimezoneOffset(guestOsTimezoneName, hours, minutes); } else { guestOsTimezone = messages.negativeTimezoneOffset(guestOsTimezoneName, hours, minutes); } }
Source:
<code>public Optional<Boolean> wasSuccessful() { <START> return success; <END> }</code><technical_language>Qualify field access</technical_language>

Target:
public Optional<Boolean> wasSuccessful() { return this.success; }
Source:
<code>public InputStream call() throws Exception { try { ReportListenerThreadHolder.setListener( listener ); final long start = System.currentTimeMillis(); AuditHelper.audit( userSession, userSession, url, getClass().getName(), getClass() .getName(), MessageTypes.INSTANCE_START, instanceId, "", 0, null ); if ( reportComponent.execute() ) { final long end = System.currentTimeMillis(); AuditHelper.audit( userSession, userSession, url, getClass().getName(), getClass() .getName(), MessageTypes.FAILED, instanceId, "", ( (float) ( end - start ) / 1000 ), null ); <START> <END> listener.setStatus( AsyncExecutionStatus.FINISHED ); return handler.getStagingContent(); } listener.setStatus( AsyncExecutionStatus.FAILED ); AuditHelper.audit( userSession, userSession, url, getClass().getName(), getClass() .getName(), MessageTypes.FAILED, instanceId, "", 0, null ); return new NullInputStream( 0 ); } finally { ReportListenerThreadHolder.clear(); } }</code><technical_language>This MessageTypes.SUCCESS</technical_language>

Target:
public InputStream call() throws Exception { try { ReportListenerThreadHolder.setListener( listener ); final long start = System.currentTimeMillis(); AuditHelper.audit( userSession, userSession, url, getClass().getName(), getClass() .getName(), MessageTypes.INSTANCE_START, instanceId, "", 0, null ); if ( reportComponent.execute() ) { final long end = System.currentTimeMillis(); AuditHelper.audit( userSession, userSession, url, getClass().getName(), getClass() .getName(), MessageTypes.INSTANCE_END, instanceId, "", ( (float) ( end - start ) / 1000 ), null ); listener.setStatus( AsyncExecutionStatus.FINISHED ); return handler.getStagingContent(); } listener.setStatus( AsyncExecutionStatus.FAILED ); AuditHelper.audit( userSession, userSession, url, getClass().getName(), getClass() .getName(), MessageTypes.FAILED, instanceId, "", 0, null ); return new NullInputStream( 0 ); } finally { ReportListenerThreadHolder.clear(); } }
Source:
<code>public void refreshStorageDevicesFromServers(List<VDS> upServers) { List<Callable<Pair<VDS, List<StorageDevice>>>> storageDevicesListCalls = new ArrayList<>(); for (final VDS server : upServers) { storageDevicesListCalls.add(new Callable<Pair<VDS, List<StorageDevice>>>() { @Override public Pair<VDS, List<StorageDevice>> call() throws Exception { List<StorageDevice> storageDevices = getStorageDevicesFromServer(server); return new Pair<VDS, List<StorageDevice>>(server, storageDevices); } }); } <START> List<Pair<VDS, List<StorageDevice>>> storageDevices = ThreadPoolUtil.invokeAll(storageDevicesListCalls); <END> for (Pair<VDS, List<StorageDevice>> pair : storageDevices) { updateStorageDevices(pair.getFirst(), pair.getSecond()); } }</code><technical_language>invokeAll empty list returns null. want handle</technical_language>

Target:
public void refreshStorageDevicesFromServers(List<VDS> upServers) { List<Callable<Pair<VDS, List<StorageDevice>>>> storageDevicesListCalls = new ArrayList<>(); for (final VDS server : upServers) { storageDevicesListCalls.add(new Callable<Pair<VDS, List<StorageDevice>>>() { @Override public Pair<VDS, List<StorageDevice>> call() throws Exception { List<StorageDevice> storageDevices = getStorageDevicesFromServer(server); return new Pair<VDS, List<StorageDevice>>(server, storageDevices); } }); } if (storageDevicesListCalls != null) { List<Pair<VDS, List<StorageDevice>>> storageDevices = ThreadPoolUtil.invokeAll(storageDevicesListCalls); for (Pair<VDS, List<StorageDevice>> pair : storageDevices) { if (pair.getSecond() != null) { updateStorageDevices(pair.getFirst(), pair.getSecond()); } } } }
Source:
<code>public Scheduler(AlertRepository alertRepo, CheckRepository checkRepo, EntityRepository entityRepository, QueueSelector queueSelector, SchedulerConfig schedulerConfig, MetricRegistry metrics) { this.alertRepo = alertRepo; this.checkRepo = checkRepo; this.entityRepo = entityRepository; this.queueSelector = queueSelector; this.schedulerConfig = schedulerConfig; this.schedulerMetrics = new SchedulerMetrics(metrics); taskSerializer = new JavaCommandSerializer(schedulerConfig.getTaskSerializer()); service = new ScheduledThreadPoolExecutor(schedulerConfig.getThreadCount(), new CustomizableThreadFactory("sc-pool-")); <START> service.setRemoveOnCancelPolicy(true); <END> shortIntervalService = new ScheduledThreadPoolExecutor(schedulerConfig.getThreadCount(), new CustomizableThreadFactory("sc-pool-fast-")); shortIntervalService.setRemoveOnCancelPolicy(true); service.scheduleAtFixedRate(new RedisMetricsUpdater(schedulerConfig, schedulerMetrics), 5, 3, TimeUnit.SECONDS); service.schedule(new AllTrialRunCleanupTask(schedulerConfig), 10, TimeUnit.SECONDS); }</code><technical_language>is this change doing</technical_language>

Target:
public Scheduler(AlertRepository alertRepo, CheckRepository checkRepo, EntityRepository entityRepository, QueueSelector queueSelector, SchedulerConfig schedulerConfig, MetricRegistry metrics) { this.alertRepo = alertRepo; this.checkRepo = checkRepo; this.entityRepo = entityRepository; this.queueSelector = queueSelector; this.schedulerConfig = schedulerConfig; this.schedulerMetrics = new SchedulerMetrics(metrics); taskSerializer = new CommandSerializer(schedulerConfig.getTaskSerializer()); service = new ScheduledThreadPoolExecutor(schedulerConfig.getThreadCount(), new CustomizableThreadFactory("sc-pool-")); service.setRemoveOnCancelPolicy(true); shortIntervalService = new ScheduledThreadPoolExecutor(schedulerConfig.getThreadCount(), new CustomizableThreadFactory("sc-pool-fast-")); shortIntervalService.setRemoveOnCancelPolicy(true); service.scheduleAtFixedRate(new RedisMetricsUpdater(schedulerConfig, schedulerMetrics), 5, 3, TimeUnit.SECONDS); service.schedule(new AllTrialRunCleanupTask(schedulerConfig), 10, TimeUnit.SECONDS); }
Source:
<code>public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == R.id.history_load) { Intent intent = new Intent(); intent.putExtra(KEY_REVISION, mRevision); getActivity().setResult(Activity.RESULT_OK, intent); getActivity().finish(); } else if (item.getItemId() == R.id.history_toggle_view) { mVisualTitle.setText(isInVisualPreview() ? null : mRevision.getPostTitle()); mVisualContent.fromHtml( isInVisualPreview() ? "" : StringUtils.notNullStr(mRevision.getPostContent()), false); <START> mPreviousButton.setEnabled(isInVisualPreview()); <END> mNextButton.setEnabled(isInVisualPreview()); crossfadePreviewViews(); } return super.onOptionsItemSelected(item); }</code><technical_language>suggestion mPreviousButton.setEnabled(isInVisualPreview() && mPosition != 0); need add this condition previous button _always_ enabled toggling visual view HTML view</technical_language>

Target:
public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == R.id.history_load) { Intent intent = new Intent(); intent.putExtra(KEY_REVISION, mRevision); requireActivity().setResult(Activity.RESULT_OK, intent); requireActivity().finish(); } else if (item.getItemId() == R.id.history_toggle_view) { if (isInVisualPreview()) { AniUtils.fadeIn(mNextButton, Duration.SHORT); AniUtils.fadeIn(mPreviousButton, Duration.SHORT); } else { String title = TextUtils.isEmpty(mRevision.getPostTitle()) ? getString(R.string.history_no_title) : mRevision.getPostTitle(); mVisualTitle.setText(title); mVisualContent.fromHtml(StringUtils.notNullStr(mRevision.getPostContent()), false); AniUtils.fadeOut(mNextButton, Duration.SHORT, View.INVISIBLE); AniUtils.fadeOut(mPreviousButton, Duration.SHORT, View.INVISIBLE); } crossfadePreviewViews(); } return super.onOptionsItemSelected(item); }
Source:
<code><START> private static Class toClass(String type) { <END> try { return Class.forName(type); } catch (ClassNotFoundException ex) { throw new ArgumentConversionException( "Failed to convert String \"" + type + "\" to type " + Class.class.getName(), ex); } }</code><technical_language>Class<?></technical_language>

Target:
private static Class<?> toClass(String type) { return ReflectionUtils .loadClass(type) .orElseThrow(() -> new ArgumentConversionException( "Failed to convert String \"" + type + "\" to type " + Class.class.getName())); }
Source:
<code>private int getMaxChildrenSeverityInCache(IContainer container) { if (!container.isAccessible()) { return -1; } Set<IResource> children = new HashSet<>(); try { children.addAll(Arrays.asList(container.members())); } catch (CoreException ex) { WorkbenchNavigatorPlugin.log("Cannot access members", WorkbenchNavigatorPlugin.createErrorStatus(ex.getMessage(), ex)); } children.addAll(Arrays.asList(NestedProjectManager.getInstance().getDirectChildrenProjects(container))); int[] severity = new int[] { -1 }; <START> children.forEach(child <END> -> { if (cache.containsKey(child) && cache.get(child).intValue() > severity[0]) { severity[0] = cache.get(child).intValue(); } }); return severity[0]; }</code><technical_language>I do forEach here, in a usual loop immediately return if ERROR</technical_language>

Target:
private int getMaxChildrenSeverityInCache(IContainer container) { if (!container.isAccessible()) { return -1; } Set<IResource> children = new HashSet<>(); try { children.addAll(Arrays.asList(container.members())); } catch (CoreException ex) { WorkbenchNavigatorPlugin.log("Cannot access members", WorkbenchNavigatorPlugin.createErrorStatus(ex.getMessage(), ex)); } children.addAll(Arrays.asList(NestedProjectManager.getInstance().getDirectChildrenProjects(container))); int severity = -1; for (IResource child : children) { Integer cachedSeverity = cache.get(child); if (cachedSeverity != null && cachedSeverity.intValue() > severity) { severity = cachedSeverity.intValue(); } } ; return severity; }
Source:
<code>public static String getDirName(Props props) { String dirSuffix = props.get("azkaban.flow.nested.path"); if ((dirSuffix == null) || (dirSuffix.length() == 0)) { dirSuffix = props.get("azkaban.job.id"); if ((dirSuffix == null) || (dirSuffix.length() == 0)) { throw new RuntimeException("azkaban.flow.nested.path and azkaban.job.id were not set"); } } <START> return "_resources_" + dirSuffix.replace(':', '_'); <END> }</code><technical_language>replace "azkaban.flow.nested.path" in line 160 CommonJobProperties.NESTED_FLOW_PATH</technical_language>

Target:
public static String getDirName(Props props) { String dirSuffix = props.get(CommonJobProperties.NESTED_FLOW_PATH); if ((dirSuffix == null) || (dirSuffix.length() == 0)) { dirSuffix = props.get(CommonJobProperties.JOB_ID); if ((dirSuffix == null) || (dirSuffix.length() == 0)) { throw new RuntimeException("azkaban.flow.nested.path and azkaban.job.id were not set"); } } return "_resources_" + dirSuffix.replace(':', '_'); }
Source:
<code>public void visit(VarDeclNode node) { if (!scopeStack.putVarDeclNode(node)) { VarDeclNode previousDecl; try { previousDecl = scopeStack.getVarDeclNode(node.getName()); } catch (VariableNotDeclaredException e) { throw new RuntimeException(e); } <START> visitError(node, String.format("Variable %s is already declared at [%s].", node.getName(), previousDecl.getLocation().toString())); <END> } super.visit(node); }</code><technical_language>prefer String.valueOf(previousDecl.getLocation()) getLocation return null</technical_language>

Target:
public void visit(VarDeclNode node) { if (!scopeStack.putVarDeclNode(node)) { VarDeclNode previousDecl; try { previousDecl = scopeStack.getVarDeclNode(node.getName()); } catch (VariableNotDeclaredException e) { throw new RuntimeException(e); } visitError(node, String.format("Variable %s is already declared at [%s].", node.getName(), String.valueOf(previousDecl.getLocation()))); } super.visit(node); }
Source:
<code>protected final Injector getInjector() { try { <START> if (injector == null) { <END> injector = createInjector(); } } catch (Exception e) { LOG.error("Failed to created injector", e); throw new ProvisionException("Failed to create injector", e); } return injector; }</code><technical_language>throw exception if injector != null</technical_language>

Target:
protected final Injector getInjector() { if (injector != null) { throw new IllegalStateException("Injector already created."); } try { injector = createInjector(); } catch (Exception e) { LOG.error("Failed to created injector", e); throw new ProvisionException("Failed to create injector", e); } return injector; }
Source:
<code>protected void createButtonsForButtonBar(Composite parent) { Button selectAllButton = createButton(parent, IDialogConstants.SELECT_ALL_ID, Messages.TraceControl_ImportDialog_SelectAll, true); selectAllButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (fFolderChildren != null) { <START> for (int i = 0; i < fFolderChildren.length; i++) { <END> fFolderViewer.setSubtreeChecked(fFolderChildren[i], true); } } updateOKButtonEnablement(); } }); Button deselectAllButton = createButton(parent, IDialogConstants.DESELECT_ALL_ID, Messages.TraceControl_ImportDialog_DeselectAll, true); deselectAllButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (fFolderChildren != null) { for (int i = 0; i < fFolderChildren.length; i++) { fFolderViewer.setSubtreeChecked(fFolderChildren[i], false); } } updateOKButtonEnablement(); } }); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true); createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); }</code><technical_language>a "foreach" here? for (Object child : fFolderChildren) I do in a places in this file</technical_language>

Target:
protected void createButtonsForButtonBar(Composite parent) { Button selectAllButton = createButton(parent, IDialogConstants.SELECT_ALL_ID, Messages.TraceControl_ImportDialog_SelectAll, true); selectAllButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { setFolderChildrenChecked(true); } }); Button deselectAllButton = createButton(parent, IDialogConstants.DESELECT_ALL_ID, Messages.TraceControl_ImportDialog_DeselectAll, true); deselectAllButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { setFolderChildrenChecked(false); } }); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true); createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); }
Source:
<code>public void process(WatchedEvent event) { long notificationTime = System.currentTimeMillis(); if (LOG.isDebugEnabled()) { LOG.debug("Received event: " + event); } _zookeeperEventThread = Thread.currentThread(); boolean stateChanged = event.getPath() == null; boolean znodeChanged = event.getPath() != null; boolean dataChanged = event.getType() == Event.EventType.NodeDataChanged || event.getType() == Event.EventType.NodeDeleted || event.getType() == Event.EventType.NodeCreated || event.getType() == Event.EventType.NodeChildrenChanged; <START> getEventLock().lock(); <END> try { if (getShutdownTrigger()) { if (LOG.isDebugEnabled()) { LOG.debug("ignoring event '{" + event.getType() + " | " + event.getPath() + "}' since shutdown triggered"); } return; } if (stateChanged) { processStateChanged(event); } if (dataChanged) { processDataOrChildChange(event, notificationTime); } } finally { if (stateChanged) { getEventLock().getStateChangedCondition().signalAll(); if (event.getState() == KeeperState.Expired) { getEventLock().getZNodeEventCondition().signalAll(); getEventLock().getDataChangedCondition().signalAll(); } } if (znodeChanged) { getEventLock().getZNodeEventCondition().signalAll(); } if (dataChanged) { getEventLock().getDataChangedCondition().signalAll(); } getEventLock().unlock(); recordStateChange(stateChanged, dataChanged); if (LOG.isDebugEnabled()) { LOG.debug("Leaving process event"); } } }</code><technical_language>Do a new place debug log delete event? I in this PR. Please confirm. If have, here</technical_language>

Target:
public void process(WatchedEvent event) { long notificationTime = System.currentTimeMillis(); if (LOG.isDebugEnabled()) { LOG.debug("Received event: " + event); } _zookeeperEventThread = Thread.currentThread(); boolean stateChanged = event.getPath() == null; boolean znodeChanged = event.getPath() != null; boolean dataChanged = event.getType() == Event.EventType.NodeDataChanged || event.getType() == Event.EventType.NodeDeleted || event.getType() == Event.EventType.NodeCreated || event.getType() == Event.EventType.NodeChildrenChanged; if (event.getType() == EventType.NodeDeleted) { LOG.debug("Path is deleted", event.getPath()); } getEventLock().lock(); try { if (getShutdownTrigger()) { if (LOG.isDebugEnabled()) { LOG.debug("ignoring event '{" + event.getType() + " | " + event.getPath() + "}' since shutdown triggered"); } return; } if (stateChanged) { processStateChanged(event); } if (dataChanged) { processDataOrChildChange(event, notificationTime); } } finally { if (stateChanged) { getEventLock().getStateChangedCondition().signalAll(); if (event.getState() == KeeperState.Expired) { getEventLock().getZNodeEventCondition().signalAll(); getEventLock().getDataChangedCondition().signalAll(); } } if (znodeChanged) { getEventLock().getZNodeEventCondition().signalAll(); } if (dataChanged) { getEventLock().getDataChangedCondition().signalAll(); } getEventLock().unlock(); recordStateChange(stateChanged, dataChanged); if (LOG.isDebugEnabled()) { LOG.debug("Leaving process event"); } } }
Source:
<code>public void testRequestMessageWithBodyBufferBase64Encoded() throws Exception { <START> Payload requestPayload = TestUtils.createSimpleRequestPayloadWithBodyBuffer(new byte[24]); <END> Requester<Payload> requester = msbContext.getObjectFactory().createRequester(NAMESPACE, requestOptions); requester.publish(requestPayload); String adapterJsonMessage = MockAdapter.pollJsonMessageForTopic(NAMESPACE); JsonNode jsonObject = msbContext.getPayloadMapper().readTree(adapterJsonMessage); TestUtils.assertJsonContains(jsonObject.get("payload"), "bodyBuffer", "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); }</code><technical_language>I create simple test 1 2 bytes more expressive</technical_language>

Target:
public void testRequestMessageWithBodyBufferBase64Encoded() throws Exception { byte[] bytesToSend = new byte[] { 1, 2 }; Payload requestPayload = TestUtils.createSimpleRequestPayloadWithBodyBuffer(bytesToSend); Requester<Payload> requester = msbContext.getObjectFactory().createRequester(NAMESPACE, requestOptions); requester.publish(requestPayload); String adapterJsonMessage = MockAdapter.pollJsonMessageForTopic(NAMESPACE); JsonNode jsonObject = msbContext.getPayloadMapper().readTree(adapterJsonMessage); String base64Encoded = Base64.getEncoder().encodeToString(bytesToSend); TestUtils.assertJsonContains(jsonObject.get("payload"), "bodyBuffer", base64Encoded); }
Source:
<code>public void close() { if (allowReleaseEventLoopGroup) { eventLoopGroup.shutdownGracefully(config.getShutdownQuietPeriod(), config.getShutdownTimeout(), TimeUnit.MILLISECONDS) .addListener(future -> doClose()); } else doClose(); try { <START> closeLatch.await(); <END> } catch (InterruptedException e) { } }</code><technical_language>timeout for this await</technical_language>

Target:
public CompletableFuture<Void> close() { CompletableFuture<Void> closeFuture = CompletableFuture.completedFuture(null); if (allowReleaseEventLoopGroup) { closeFuture = toCompletableFuture( eventLoopGroup.shutdownGracefully(config.getShutdownQuietPeriod(), config.getShutdownTimeout(), TimeUnit.MILLISECONDS)); } return closeFuture.thenCompose(v -> toCompletableFuture(openChannels.close())).whenComplete((v,t) -> channelPool.destroy()); }
Source:
<code><START> private void finaliseBuildingSectionPanelWithoutStats(InstructorFeedbackResultsSectionPanel sectionPanel, <END> String sectionWithoutResponses) { LinkedHashMap<String, Map<FeedbackQuestionAttributes, List<FeedbackResponseAttributes>>> emptyResponseMap = new LinkedHashMap<String, Map<FeedbackQuestionAttributes, List<FeedbackResponseAttributes>>>(); Set<String> emptyTeamList = new LinkedHashSet<String>(); finalizeBuildingSectionPanel(sectionPanel, sectionWithoutResponses, emptyResponseMap, emptyTeamList); }</code><technical_language>finalize</technical_language>

Target:
private void finaliseBuildingSectionPanelWithoutStats(InstructorFeedbackResultsSectionPanel sectionPanel, String sectionWithoutResponses) { LinkedHashMap<String, Map<FeedbackQuestionAttributes, List<FeedbackResponseAttributes>>> emptyResponseMap = new LinkedHashMap<String, Map<FeedbackQuestionAttributes, List<FeedbackResponseAttributes>>>(); LinkedHashSet<String> emptyTeamList = new LinkedHashSet<String>(); finalizeBuildingSectionPanel(sectionPanel, sectionWithoutResponses, emptyResponseMap, emptyTeamList); }
Source:
<code>public EEFCheckboxLifecycleManager(EEFCheckboxDescription description, IVariableManager variableManager, IInterpreter interpreter, TransactionalEditingDomain editingDomain) { <START> super(description, variableManager, <END> interpreter, editingDomain); this.description = description; }</code><technical_language>done</technical_language>

Target:
public EEFCheckboxLifecycleManager(EEFCheckboxDescription description, IVariableManager variableManager, IInterpreter interpreter, TransactionalEditingDomain editingDomain) { super(variableManager, interpreter, editingDomain); this.description = description; }
Source:
<code>public List<Document> getProxies(Document doc) { State state = transaction.getStateForRead(doc.getUUID()); Object[] proxyIds = (Object[]) state.get(KEY_PROXY_IDS); if (proxyIds != null) { <START> List<String> ids = Arrays.stream(proxyIds).map(Object::toString).collect(Collectors.toList()); <END> return getDocuments(ids); } return Collections.emptyList(); }</code><technical_language>map(String::valueOf) sur NPE this</technical_language>

Target:
public List<Document> getProxies(Document doc) { State state = transaction.getStateForRead(doc.getUUID()); Object[] proxyIds = (Object[]) state.get(KEY_PROXY_IDS); if (proxyIds != null) { List<String> ids = Arrays.stream(proxyIds).map(String::valueOf).collect(Collectors.toList()); return getDocuments(ids); } return Collections.emptyList(); }
Source:
<code>public <T> void registerTranslator(Class<T> objectClass, DataTranslator<T> translator) { checkState(allowRegistrations, "Registrations are no longer allowed"); checkNotNull(objectClass, "Target object class cannot be null!"); checkNotNull(translator, "DataTranslator for : " + objectClass + " cannot be null!"); checkArgument(translator.getToken().isAssignableFrom(objectClass), "DataTranslator is not compatible with the target object class: " + objectClass); if (!this.dataSerializerMap.containsKey(checkNotNull(objectClass, "Target class cannot be null!"))) { this.dataSerializerMap.put(objectClass, translator); DataTranslatorRegistryModule.getInstance().registerAdditionalCatalog(translator); } else { throw new IllegalStateException("Already registered the DataTranslator for " + objectClass.getCanonicalName()); } <START> TypeSerializers.getDefaultSerializers().registerType(translator.getToken(), DataTranslatorTypeSerializer.from(translator)); <END> }</code><technical_language>need check translator is registering registered type (such for UUID is default registered Configurate)</technical_language>

Target:
public <T> void registerTranslator(Class<T> objectClass, DataTranslator<T> translator) { checkState(allowRegistrations, "Registrations are no longer allowed"); checkNotNull(objectClass, "Target object class cannot be null!"); checkNotNull(translator, "DataTranslator for : " + objectClass + " cannot be null!"); checkArgument(translator.getToken().isAssignableFrom(objectClass), "DataTranslator is not compatible with the target object class: " + objectClass); if (!this.dataSerializerMap.containsKey(checkNotNull(objectClass, "Target class cannot be null!"))) { this.dataSerializerMap.put(objectClass, translator); DataTranslatorRegistryModule.getInstance().registerAdditionalCatalog(translator); } else { throw new IllegalStateException("Already registered the DataTranslator for " + objectClass.getCanonicalName()); } if (TypeSerializers.getDefaultSerializers().get(translator.getToken()) == null) { TypeSerializers.getDefaultSerializers().registerType(translator.getToken(), DataTranslatorTypeSerializer.from(translator)); } }
Source:
<code>public int getAddressSize() throws DebugException { final GdbMemoryBlockRetrieval retrieval = (GdbMemoryBlockRetrieval)getMemoryBlockRetrieval(); Query<Integer> query = new Query<Integer>() { @Override protected void execute(final DataRequestMonitor<Integer> drm) { IMemoryDMContext context = null; if (fMemorySpaceID != null) { IMemorySpaces memorySpacesService = (IMemorySpaces) retrieval.getMemorySpaceServiceTracker().getService(); if (memorySpacesService != null) { context = new MemorySpaceDMContext(memorySpacesService.getSession().getId(), fMemorySpaceID, getContext()); } else { drm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, Messages.Err_MemoryServiceNotAvailable, null)); drm.done(); return; } } else { context = getContext(); } IGDBMemory memoryService = (IGDBMemory)retrieval.getServiceTracker().getService(); if (memoryService != null) { memoryService.getAddressSize( context, new ImmediateDataRequestMonitor<Integer>(drm) { @Override @ConfinedToDsfExecutor("fExecutor") protected void handleSuccess() { drm.setData(getData()); drm.done(); } }); } else { drm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, Messages.Err_MemoryServiceNotAvailable, null)); drm.done(); } } }; <START> retrieval.getExecutor().execute(query); <END> try { return query.get().intValue(); } catch (InterruptedException e) { throw new DebugException(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, DebugException.INTERNAL_ERROR, Messages.Err_GetMemoryAddressSizeFailed, e)); } catch (ExecutionException e) { throw new DebugException(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, DebugException.INTERNAL_ERROR, Messages.Err_GetMemoryAddressSizeFailed, e)); } }</code><technical_language>No, I try multi-process, cross-debug eclipse. I "print sizeof(void*)" gdb command-line in scenarios. if is prefer I try myself</technical_language>

Target:
public int getAddressSize() throws DebugException { GdbMemoryBlockRetrieval retrieval = (GdbMemoryBlockRetrieval)getMemoryBlockRetrieval(); IMemoryDMContext context = null; if (fMemorySpaceID != null) { IMemorySpaces memorySpacesService = (IMemorySpaces) retrieval.getMemorySpaceServiceTracker().getService(); if (memorySpacesService != null) { context = new MemorySpaceDMContext(memorySpacesService.getSession().getId(), fMemorySpaceID, getContext()); } } else { context = getContext(); } IGDBMemory memoryService = (IGDBMemory)retrieval.getServiceTracker().getService(); if (memoryService != null) { return memoryService.getAddressSize(context); } throw new DebugException(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, Messages.Err_MemoryServiceNotAvailable, null)); }
Source:
<code>private void checkLeases() { LOG.debug("Checking leases."); SortedSet<FileLease> sortedLeases = hlmAdapter.getSortedLeases(); if(sortedLeases.size() == 0) return; final FileLease oldest = sortedLeases.first(); if (!oldest.expiredHardLimit(hardLimit)) { return; } LOG.info(oldest + " has expired hard limit."); final List<String> removing = new ArrayList<String>(); Collection<FileLease> leases = hlmAdapter.getLeases(oldest.getHolder()); if(leases == null) return; for(FileLease lease : leases) { String p = lease.getPath(); try { boolean completed = namesystem.internalReleaseLease(oldest, p); if (LOG.isDebugEnabled()) { if (completed) { <START> LOG.debug("Lease recovery for " + p + " is complete. File closed."); <END> } else { LOG.debug("Started block recovery " + p + " lease " + oldest); } } if(!completed) return; } catch (IOException e) { LOG.error("Cannot release the path " + p + " in the lease " + oldest, e); removing.add(p); } } for(String p : removing) { hlmAdapter.removeLease(oldest, p); } }</code><technical_language>80 character violation</technical_language>

Target:
private void checkLeases() { LOG.debug("Checking leases."); SortedSet<FileLease> sortedLeases = hlmAdapter.getSortedLeases(); if(sortedLeases.size() == 0) return; final FileLease oldest = sortedLeases.first(); if (!oldest.expiredHardLimit(hardLimit)) { return; } LOG.info(oldest + " has expired hard limit."); final List<String> removing = new ArrayList<String>(); Collection<FileLease> leases = hlmAdapter.getLeases(oldest.getHolder()); if(leases == null) return; for(FileLease lease : leases) { String p = lease.getPath(); try { boolean completed = namesystem.internalReleaseLease(oldest, p); if (LOG.isDebugEnabled()) { if (completed) { LOG.debug("Lease recovery for " + p + " is complete." + " File closed."); } else { LOG.debug("Started block recovery " + p + " lease " + oldest); } } if(!completed) return; } catch (IOException e) { LOG.error("Cannot release the path " + p + " in the lease " + oldest, e); removing.add(p); } } for(String p : removing) { hlmAdapter.removeLease(oldest, p); } }
Source:
<code>private void deleteAccountAndReturnIfNecessary() { <START> if (mAccount != null && mAccount.isOptionSet(Account.OPTION_REGISTER)) { <END> xmppConnectionService.deleteAccount(mAccount); } if (xmppConnectionService.getAccounts().size() == 0) { Intent intent = new Intent(EditAccountActivity.this, WelcomeActivity.class); WelcomeActivity.addInviteUri(intent, getIntent()); startActivity(intent); } }</code><technical_language>I a condition is mInitMode && mAccount != null && !mAccount.isOptionSet(Account.OPTION_SUCCESSFULL_LOGIN) if works for you</technical_language>

Target:
private void deleteAccountAndReturnIfNecessary() { if (mInitMode && mAccount != null && !mAccount.isOptionSet(Account.OPTION_LOGGED_IN_SUCCESSFULLY)) { xmppConnectionService.deleteAccount(mAccount); } if (xmppConnectionService.getAccounts().size() == 0) { Intent intent = new Intent(EditAccountActivity.this, WelcomeActivity.class); WelcomeActivity.addInviteUri(intent, getIntent()); startActivity(intent); } }
Source:
<code>public MysqlSqlDialect(Context context) { <START> super(context.withDataTypeSystem(MYSQL_TYPE_SYSTEM)); <END> majorVersion = context.databaseMajorVersion(); }</code><technical_language>need override data type system here</technical_language>

Target:
public MysqlSqlDialect(Context context) { super(context); majorVersion = context.databaseMajorVersion(); }
Source:
<code>public ImageStrip[] get(final Annotation... qualifiers) { final List<ImageStrip> result = new LinkedList<>(); for (Annotation qualifier : qualifiers) { final ManagedInstance<ImageStrip> i = stripInstances.select(qualifier); if (!i.isUnsatisfied() && !i.isAmbiguous()) { result.add(i.get()); } } <START> return result.stream().toArray(ImageStrip[]::new); <END> }</code><technical_language>This return result.toArray(new ImageStrip[0]);</technical_language>

Target:
public ImageStrip[] get(final Annotation... qualifiers) { final List<ImageStrip> result = new LinkedList<>(); for (Annotation qualifier : qualifiers) { final ManagedInstance<ImageStrip> i = stripInstances.select(qualifier); if (!i.isUnsatisfied() && !i.isAmbiguous()) { result.add(i.get()); } } return result.toArray(new ImageStrip[result.size()]); }
Source:
<code>private static int checkForeignIdLimit(int id, AdvancedExternalizer<?> ext) { if (id < 0) throw log.foreignExternalizerUsingNegativeId(ext, id); <START> return id; <END> }</code><technical_language>transformations happening id, checkForeignIdLimit void</technical_language>

Target:
private static void checkForeignIdLimit(int id, AdvancedExternalizer<?> ext) { if (id < 0) throw log.foreignExternalizerUsingNegativeId(ext, id); }
Source:
<code>public ConfigurationSetting setSetting(String key, String value) { <START> return setSetting(new ConfigurationSetting().key(key).value(value), Context.NONE).getValue(); <END> }</code><technical_language>key() value() method renamed? in async client too. return setSetting(new ConfigurationSetting().setKey(key).setValue(value), Context.NONE).getValue();</technical_language>

Target:
public ConfigurationSetting setSetting(String key, String value) { return setSettingWithResponse(new ConfigurationSetting().setKey(key).setValue(value), Context.NONE).getValue(); }
Source:
<code>public void testReallocationWorkspace(){ WorkspaceConfiguration initialConfig = WorkspaceConfiguration.builder() .initialSize(10 * 1024L * 1024L) .policyAllocation(AllocationPolicy.STRICT) .policyLearning(LearningPolicy.NONE) .build(); MemoryWorkspace workspace = Nd4j.getWorkspaceManager().getAndActivateWorkspace(initialConfig, "SOME_ID"); DataBuffer buffer = new DoubleBuffer(new double[]{1, 2, 3, 4}, workspace); <START> assert(buffer.isAttached()); <END> assertEquals(4, buffer.capacity()); buffer.reallocate(6); assertEquals(6, buffer.capacity()); workspace.close(); }</code><technical_language>direct assertions junits assertTrue instead</technical_language>

Target:
public void testReallocationWorkspace(){ WorkspaceConfiguration initialConfig = WorkspaceConfiguration.builder() .initialSize(10 * 1024L * 1024L) .policyAllocation(AllocationPolicy.STRICT) .policyLearning(LearningPolicy.NONE) .build(); MemoryWorkspace workspace = Nd4j.getWorkspaceManager().getAndActivateWorkspace(initialConfig, "SOME_ID"); DataBuffer buffer = Nd4j.createBuffer(new double[]{1, 2, 3, 4}); assertTrue(buffer.isAttached()); assertEquals(4, buffer.capacity()); buffer.reallocate(6); assertEquals(6, buffer.capacity()); workspace.close(); }
Source:
<code>private SearchScratchSearchProjectsListFragment getSearchFragment() { return (SearchScratchSearchProjectsListFragment) getFragmentManager() .findFragmentById( <START> R.id.fragment_scratch_search_projects_list); <END> }</code><technical_language>please put "R.id.fragment_scratch_search_projects_list);" previous line</technical_language>

Target:
private ScratchProgramsListFragment getSearchFragment() { return (ScratchProgramsListFragment) getFragmentManager() .findFragmentById(R.id.fragment_search_scratch_programs); }
Source:
<code>private static String simpleRelDigest(RelNode rel) { StringBuilder digest = new StringBuilder(rel.getRelTypeName()); digest.append('#'); if (rel instanceof RelSubset) { <START> RelSubset subset = (RelSubset) rel; <END> digest.append(subset.getSetId()); for (RelTrait trait : subset.getTraitSet()) { digest.append('.').append(trait); } } else if (rel instanceof HepRelVertex) { digest.append(((HepRelVertex) rel).getCurrentRel().getId()); } else { digest.append(rel.getId()); } return digest.toString(); }</code><technical_language>rel node handle create digest a non-extendable/overridable method behaviors based type of rel do it? This anti design pattern</technical_language>

Target:
private static String simpleRelDigest(RelNode rel) { return rel.getRelTypeName() + '#' + rel.getId(); }