auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void run() { for (TimeGraphEntry entry : fZoomEntryList) { if (getMonitor().isCanceled()) { return; } if (entry == null) { break; } zoom(entry, getMonitor()); } List<ILinkEvent> events = getLinkList(getZoomStartTime(), getZoomEndTime(), getResolution(), getMonitor()); if (events != null) { fTimeGraphWrapper.getTimeGraphViewer().setLinks(events); redraw(); } <START> List<IMarkerEvent> markers = getViewMarkerList(getZoomStartTime(), getZoomEndTime(), getResolution(), getMonitor()); <END> List<IMarkerEvent> traceMarkers = getTraceMarkerList(getZoomStartTime(), getZoomEndTime(), getResolution(), getMonitor()); markers.addAll(traceMarkers); fTimeGraphWrapper.getTimeGraphViewer().getTimeGraphControl().setMarkers(markers); redraw(); }</code><technical_language>List<IMarkerEvent> markers = new ArrayList<>(); markers.addAll(getView...); markers.addAll(getTrace...);</technical_language>

Target:
public void run() { for (TimeGraphEntry entry : fZoomEntryList) { if (getMonitor().isCanceled()) { return; } if (entry == null) { break; } zoom(entry, getMonitor()); } List<ILinkEvent> events = getLinkList(getZoomStartTime(), getZoomEndTime(), getResolution(), getMonitor()); if (events != null) { fTimeGraphWrapper.getTimeGraphViewer().setLinks(events); redraw(); } List<IMarkerEvent> markers = new ArrayList<>(getViewMarkerList(getZoomStartTime(), getZoomEndTime(), getResolution(), getMonitor())); markers.addAll(getTraceMarkerList(getZoomStartTime(), getZoomEndTime(), getResolution(), getMonitor())); fTimeGraphWrapper.getTimeGraphViewer().getTimeGraphControl().setMarkers(markers); redraw(); }
Source:
<code>private static String removeQueryPrefix(final String luceneQuery){ <START> final String cleanedUpQuery; <END> if(luceneQuery.startsWith("query_")){ cleanedUpQuery = luceneQuery.replace( "query_", StringPool.BLANK); } else { cleanedUpQuery = luceneQuery; } return cleanedUpQuery; }</code><technical_language>return (luceneQuery.startsWith("query_"))?luceneQuery.replace( "query_", StringPool.BLANK): luceneQuery; is a style,</technical_language>

Target:
private static String removeQueryPrefix(final String luceneQuery) { return (luceneQuery.startsWith("query_") ? luceneQuery.replace("query_", StringPool.BLANK) : luceneQuery ); }
Source:
<code>public static String getDateString(Context context, Date date) { String month = DateUtils.getMonthString(date.getMonth() + Calendar.JANUARY, DateUtils.LENGTH_MEDIUM); String value; if ("ko".equals(Locale.getDefault().getLanguage()) || Locale.US.equals(Locale.getDefault()) || "BZ".equals(Locale.getDefault().getCountry()) || Locale.CANADA.equals(Locale.getDefault()) || "KE".equals(Locale.getDefault().getCountry()) || "MN".equals(Locale.getDefault().getCountry()) || "zh".equals(Locale.getDefault().getLanguage()) <START> || "ja".equals(Locale.getDefault().getLanguage())) <END> value = "'#' d yyyy"; else value = "d '#' yyyy"; String standardDate = new SimpleDateFormat(value).format(date).replace("#", month); if (standardDate.length() < 5) return standardDate; if ("zh".equals(Locale.getDefault().getLanguage()) || "ja".equals(Locale.getDefault().getLanguage())) return new StringBuilder(standardDate).insert(standardDate.length()-5, "\u65E5").toString(); else if ("ko".equals(Locale.getDefault().getLanguage())) return new StringBuilder(standardDate).insert(standardDate.length()-5, "\uC77C").toString(); else return standardDate; }</code><technical_language>this is a bit hard read. a pattern be: Locale locale = Locale.getDefault(); if(arrayBinaryContains(locale.getLanguage(), "ja", "ko", "zh") || arrayBinaryContains(locale.getCountry(), "BZ", "CA", "KE", "MN", "US")) ... do stuff define method private boolean arrayBinaryContains(String search, String... sortedValues) { return Arrays.binarySearch(sortedValues, search) >= 0; }</technical_language>

Target:
public static String getDateString(Context context, Date date) { String month = DateUtils.getMonthString(date.getMonth() + Calendar.JANUARY, DateUtils.LENGTH_MEDIUM); String value; String standardDate; Locale locale = Locale.getDefault(); if (arrayBinaryContains(locale.getLanguage(), "ja", "ko", "zh") || arrayBinaryContains(locale.getCountry(), "BZ", "CA", "KE", "MN" ,"US")) value = "'#' d'$' yyyy"; else value = "d'$' '#' yyyy"; if (arrayBinaryContains(locale.getLanguage(), "ja", "zh")){ standardDate = new SimpleDateFormat(value).format(date).replace("#", month).replace("$", "\u65E5"); }else if ("ko".equals(Locale.getDefault().getLanguage())){ standardDate = new SimpleDateFormat(value).format(date).replace("#", month).replace("$", "\uC77C"); }else{ standardDate = new SimpleDateFormat(value).format(date).replace("#", month).replace("$", ""); } return standardDate;}
Source:
<code>@Theory public void testWidth(@TestedOn(ints = {WIDTH_DP_XL, WIDTH_DP_L}) int widthDp, @NonNull FontScale fontScale) { setUp(widthDp, LayoutDirection.LOCALE, fontScale, Theme.LIGHT); subject = new DescriptionEditSuccessView(ctx()); <START> snap(subject); <END> }</code><technical_language>calling snap I forgot add screenshots this patch</technical_language>

Target:
@Theory public void testWidth(@TestedOn(ints = {WIDTH_DP_XL, WIDTH_DP_L}) int widthDp, @NonNull FontScale fontScale) { setUp(widthDp, LayoutDirection.LOCALE, fontScale, Theme.LIGHT); snap(subject); }
Source:
<code><START> public Response cloneVm(Action action) { <END> org.ovirt.engine.core.common.businessentities.VM vm = getEntity( org.ovirt.engine.core.common.businessentities.VM.class, VdcQueryType.GetVmByVmId, new IdQueryParameters(guid), "VM: id=" + guid); String newName = ""; if (action.isSetVm() && action.getVm().isSetName()) { newName = action.getVm().getName(); } CloneVmParameters cloneVmParameters = new CloneVmParameters(vm, newName); cloneVmParameters.setMakeCreatorExplicitOwner(isFiltered()); Response response = doAction(VdcActionType.CloneVm, cloneVmParameters, action); return response; }</code><technical_language>If vm.name parameter is mandatory add following: validateParameters(action, "vm.name"); I understand code ins't mandatory, fix rsdl_metatata.yaml file instead</technical_language>

Target:
public Response cloneVm(Action action) { validateParameters(action, "vm.name"); org.ovirt.engine.core.common.businessentities.VM vm = getEntity( org.ovirt.engine.core.common.businessentities.VM.class, VdcQueryType.GetVmByVmId, new IdQueryParameters(guid), "VM: id=" + guid); CloneVmParameters cloneVmParameters = new CloneVmParameters(vm, action.getVm().getName()); cloneVmParameters.setMakeCreatorExplicitOwner(isFiltered()); Response response = doAction(VdcActionType.CloneVm, cloneVmParameters, action); return response; }
Source:
<code>public void setHostname(String hostname, ResponseCodeValidator validator) { hostPinger = HostPinger.withCustomEndpointAndValidation(this, hostname, validator); <START> currentNetworkStatusRetriever = new CurrentNetworkStatusRetriever(MerlinsBeard.from(this.getApplicationContext()), hostPinger); <END> }</code><technical_language>need this, right? Besides, this smells a bit of unexpected side effect (but I point). extract a setter for retriever</technical_language>

Target:
public void setHostname(String hostname, ResponseCodeValidator validator) { hostPinger = buildHostPinger(hostname, validator); }
Source:
<code>private static Object evaluate( TokenKind op, Object x, Object y, Environment env, Location location, boolean isAugmented) throws EvalException, InterruptedException { try { switch (op) { case AND: return EvalUtils.toBoolean(x) ? y : x; case OR: return EvalUtils.toBoolean(x) ? x : y; case PLUS: return plus(x, y, env, location, isAugmented); case PIPE: return pipe(x, y, env, location); case AMPERSAND: return (Integer) x & (Integer) y; case CARET: return (Integer) x ^ (Integer) y; <START> case GREATER_GREATER: <END> return (Integer) x >> (Integer) y; case LESS_LESS: return (Integer) x << (Integer) y; case MINUS: return minus(x, y, location); case STAR: return mult(x, y, env, location); case SLASH: throw new EvalException( location, "The `/` operator is not allowed. Please use the ` + "division."); case SLASH_SLASH: return divide(x, y, location); case PERCENT: return percent(x, y, location); case EQUALS_EQUALS: return x.equals(y); case NOT_EQUALS: return !x.equals(y); case LESS: return compare(x, y, location) < 0; case LESS_EQUALS: return compare(x, y, location) <= 0; case GREATER: return compare(x, y, location) > 0; case GREATER_EQUALS: return compare(x, y, location) >= 0; case IN: return in(x, y, env, location); case NOT_IN: return !in(x, y, env, location); default: throw new AssertionError("Unsupported binary operator: " + op); } } catch (ArithmeticException e) { throw new EvalException(location, e.getMessage()); } }</code><technical_language>spec requires this operation fail if y is negative</technical_language>

Target:
private static Object evaluate( TokenKind op, Object x, Object y, Environment env, Location location, boolean isAugmented) throws EvalException, InterruptedException { try { switch (op) { case AND: return EvalUtils.toBoolean(x) ? y : x; case OR: return EvalUtils.toBoolean(x) ? x : y; case PLUS: return plus(x, y, env, location, isAugmented); case PIPE: return pipe(x, y, env, location); case AMPERSAND: return and(x, y, location); case CARET: return xor(x, y, location); case GREATER_GREATER: return rightShift(x, y, location); case LESS_LESS: return leftShift(x, y, location); case MINUS: return minus(x, y, location); case STAR: return mult(x, y, env, location); case SLASH: throw new EvalException( location, "The `/` operator is not allowed. Please use the ` + "division."); case SLASH_SLASH: return divide(x, y, location); case PERCENT: return percent(x, y, location); case EQUALS_EQUALS: return x.equals(y); case NOT_EQUALS: return !x.equals(y); case LESS: return compare(x, y, location) < 0; case LESS_EQUALS: return compare(x, y, location) <= 0; case GREATER: return compare(x, y, location) > 0; case GREATER_EQUALS: return compare(x, y, location) >= 0; case IN: return in(x, y, env, location); case NOT_IN: return !in(x, y, env, location); default: throw new AssertionError("Unsupported binary operator: " + op); } } catch (ArithmeticException e) { throw new EvalException(location, e.getMessage()); } }
Source:
<code>public StartIdentifiedAtlasDbTransactionResponse startIdentifiedAtlasDbTransaction( StartIdentifiedAtlasDbTransactionRequest request) { <START> long startTime = System.nanoTime(); <END> LeasableStartIdentifiedAtlasDbTransactionResponse leasableResponse = delegate.leasableStartIdentifiedAtlasDbTransaction(request); StartIdentifiedAtlasDbTransactionResponse response = leasableResponse.getStartTransactionResponse(); Optional<Duration> leasePeriod = leasableResponse.getLeasePeriod(); updateLockLeases(response.immutableTimestamp().getLock(), startTime, leasePeriod); return response; }</code><technical_language>please use/factor out NanoTime class I in server side part? NanoTime comparisons tricky centralize place</technical_language>

Target:
public StartIdentifiedAtlasDbTransactionResponse startIdentifiedAtlasDbTransaction( StartIdentifiedAtlasDbTransactionRequest request) { LeasableStartIdentifiedAtlasDbTransactionResponse leasableResponse = delegate.startAtlasDbTransactionV3(request); StartIdentifiedAtlasDbTransactionResponse response = leasableResponse.getStartTransactionResponse(); Lease lease = leasableResponse.getLease(); LeasedLockToken leasedLockToken = LeasedLockToken.of(response.immutableTimestamp().getLock(), lease); long immutableTs = response.immutableTimestamp().getImmutableTimestamp(); return ImmutableStartIdentifiedAtlasDbTransactionResponse.of( ImmutableLockImmutableTimestampResponse.of(immutableTs, leasedLockToken), response.startTimestampAndPartition()); }
Source:
<code>public void disableGoToSleep() { if (configuration.isPreventsSleep() && System.currentTimeMillis() - lastDontSleepCall > 40000) { <START> LOGGER.trace("Disable the PC sleeping mode"); <END> Kernel32.INSTANCE.SetThreadExecutionState(Kernel32.ES_SYSTEM_REQUIRED | Kernel32.ES_CONTINUOUS); lastDontSleepCall = System.currentTimeMillis(); } }</code><technical_language>call "Enable Windows sleep mode prevention" instead "Disable Windows sleep mode prevention" below. This is more correct, UMS enable disable sleep mode is done user in OS configuration. UMS do is prevent sleep mode while some thread is running</technical_language>

Target:
public void disableGoToSleep() { if (configuration.isPreventsSleep() && System.currentTimeMillis() - lastDontSleepCall > 40000) { LOGGER.trace("Enable Windows sleep mode prevention"); Kernel32.INSTANCE.SetThreadExecutionState(Kernel32.ES_CONTINUOUS|Kernel32.ES_AWAYMODE_REQUIRED); lastDontSleepCall = System.currentTimeMillis(); } }
Source:
<code>public Styler getStyler() { if (!fCanExecute) { <START> return new Styler() { <END> @Override public void applyStyles(TextStyle textStyle) { textStyle.strikeout = true; } }; } return null; }</code><technical_language>styler defined statically</technical_language>

Target:
public Styler getStyler() { if (!fCanExecute) { return ANALYSIS_CANT_EXECUTE_STYLER; } return null; }
Source:
<code>public void dispose() { super.dispose(); <START> IDebugContextManager contextManager = DebugContextManager.getDefault(); <END> IDebugContextService contextService = contextManager .getContextService(getSite().getWorkbenchWindow()); contextService.removeDebugContextListener(fDebugContextListener); setDebugContext((IDMVMContext)null); }</code><technical_language>Replace IDebugContextManager contextManager = DebugUITools.getDebugContextManager();</technical_language>

Target:
public void dispose() { super.dispose(); IDebugContextManager contextManager = DebugUITools.getDebugContextManager(); IDebugContextService contextService = contextManager .getContextService(getSite().getWorkbenchWindow()); contextService.removeDebugContextListener(fDebugContextListener); setDebugContext((IDMContext)null); DsfSession.removeSessionEndedListener(this); }
Source:
<code>public MessageMonitor<? extends Message<?>> registerComponentWithDefaultTags(Class<?> componentType, String componentName) { if (EventProcessor.class.isAssignableFrom(componentType)) { return registerEventProcessor(EVENT_PROCESSOR_METRICS_NAME, message -> Tags.of(TagsUtil.PAYLOAD_TYPE_TAG, message.getPayloadType().getSimpleName(), TagsUtil.PROCESSOR_NAME_TAG, componentName)); } if (CommandBus.class.isAssignableFrom(componentType)) { return registerCommandBus(componentName, <START> message -> Tags <END> .of(TagsUtil.PAYLOAD_TYPE_TAG, message.getPayloadType().getSimpleName())); } if (EventBus.class.isAssignableFrom(componentType)) { return registerEventBus(componentName, message -> Tags .of(TagsUtil.PAYLOAD_TYPE_TAG, message.getPayloadType().getSimpleName())); } if (QueryBus.class.isAssignableFrom(componentType)) { return registerQueryBus(componentName, message -> Tags .of(TagsUtil.PAYLOAD_TYPE_TAG, message.getPayloadType().getSimpleName())); } logger.warn("Cannot provide MessageMonitor for component of type [{}]. Returning No-Op instance.", componentName, componentType.getSimpleName()); return NoOpMessageMonitor.instance(); }</code><technical_language>Nit: reasonable add TagsUtil?: java public static final Function<Message<?>, Tag> PAYLOAD_TYPE_TAGGER = message > Tags.of(PAYLOAD_TYPE_TAG, message.getPayloadType().getSimpleName()); some of functions TagsUtil class easier for users pick choose defaults have. If want set monitor _with_ defaults have, provide this line too. Minor improvement of course, big a deal</technical_language>

Target:
public MessageMonitor<? extends Message<?>> registerComponentWithDefaultTags(Class<?> componentType, String componentName) { if (EventProcessor.class.isAssignableFrom(componentType)) { return registerEventProcessor(EVENT_PROCESSOR_METRICS_NAME, message -> Tags.of(TagsUtil.PAYLOAD_TYPE_TAG, message.getPayloadType().getSimpleName(), TagsUtil.PROCESSOR_NAME_TAG, componentName)); } if (CommandBus.class.isAssignableFrom(componentType)) { return registerCommandBus(componentName, TagsUtil.PAYLOAD_TYPE_TAGGER_FUNCTION); } if (EventBus.class.isAssignableFrom(componentType)) { return registerEventBus(componentName, TagsUtil.PAYLOAD_TYPE_TAGGER_FUNCTION); } if (QueryBus.class.isAssignableFrom(componentType)) { return registerQueryBus(componentName, TagsUtil.PAYLOAD_TYPE_TAGGER_FUNCTION); } logger.warn("Cannot provide MessageMonitor for component of type [{}]. Returning No-Op instance.", componentName, componentType.getSimpleName()); return NoOpMessageMonitor.instance(); }
Source:
<code>private static Map<String, String> getPropertiesFromFile(String filePath, int index) throws ShellArgumentException { <START> Map<String, String> properties = new HashMap<String, String>(); <END> File f = new File(filePath); try { BufferedReader br = new BufferedReader(new FileReader(f)); String line; int indexLine = 0; try { while ((line = br.readLine()) != null) { if (line.contains("=")) { String[] keyValue = line.split("="); if (keyValue.length == 2) { properties.put(keyValue[0], keyValue[1]); } else { System.out.println(Messages.i18n.format( "InvalidArgMsg.propertiesFile.error.reading.line", indexLine)); } } indexLine++; } br.close(); } catch (IOException ioe) { throw new ShellArgumentException(index, Messages.i18n.format("InvalidArgMsg.propertiesFile.error.reading") + ": " + ioe.getMessage()); } } catch (FileNotFoundException fnfe) { throw new ShellArgumentException(index, Messages.i18n.format("InvalidArgMsg.propertiesFile.not.exist")); } return properties; }</code><technical_language>This method a java.util.Properties object read properties a file</technical_language>

Target:
private static Map<String, String> getPropertiesFromFile(String filePath, int index) throws ShellArgumentException { Map<String, String> properties = new HashMap<String, String>(); File f = new File(filePath); Properties props = new Properties(); try { props.load(new FileInputStream(f)); } catch (FileNotFoundException e) { throw new ShellArgumentException(index, Messages.i18n.format("InvalidArgMsg.propertiesFile.not.exist")); } catch (IOException e) { throw new ShellArgumentException(index, Messages.i18n.format("InvalidArgMsg.propertiesFile.error.reading") + ": " + e.getMessage()); } for (final String name : props.stringPropertyNames()){ properties.put(name, props.getProperty(name)); } return properties; }
Source:
<code>private RateAccrualPeriod( LocalDate startDate, LocalDate endDate, LocalDate unadjustedStartDate, LocalDate unadjustedEndDate, double yearFraction, RateObservation rateObservation, double gearing, double spread, NegativeRateMethod negativeRateMethod) { <START> ArgChecker.notNull(startDate, "startDate"); <END> ArgChecker.notNull(endDate, "endDate"); ArgChecker.notNegative(yearFraction, "yearFraction"); ArgChecker.notNull(rateObservation, "rateObservation"); ArgChecker.notNull(negativeRateMethod, "negativeRateMethod"); this.startDate = startDate; this.endDate = endDate; this.unadjustedStartDate = Objects.firstNonNull(unadjustedStartDate, startDate); this.unadjustedEndDate = Objects.firstNonNull(unadjustedEndDate, endDate); this.yearFraction = yearFraction; this.rateObservation = rateObservation; this.gearing = gearing; this.spread = spread; this.negativeRateMethod = negativeRateMethod; ArgChecker.inOrderNotEqual(startDate, endDate, "startDate", "endDate"); ArgChecker.inOrderNotEqual( this.unadjustedStartDate, this.unadjustedEndDate, "unadjustedStartDate", "unadjustedEndDate"); }</code><technical_language>Inline non-null arg checkers</technical_language>

Target:
private RateAccrualPeriod( LocalDate startDate, LocalDate endDate, LocalDate unadjustedStartDate, LocalDate unadjustedEndDate, double yearFraction, RateObservation rateObservation, double gearing, double spread, NegativeRateMethod negativeRateMethod) { this.startDate = ArgChecker.notNull(startDate, "startDate"); this.endDate = ArgChecker.notNull(endDate, "endDate"); this.unadjustedStartDate = Objects.firstNonNull(unadjustedStartDate, startDate); this.unadjustedEndDate = Objects.firstNonNull(unadjustedEndDate, endDate); this.yearFraction = ArgChecker.notNegative(yearFraction, "yearFraction"); this.rateObservation = ArgChecker.notNull(rateObservation, "rateObservation"); this.gearing = gearing; this.spread = spread; this.negativeRateMethod = ArgChecker.notNull(negativeRateMethod, "negativeRateMethod"); ArgChecker.inOrderNotEqual(startDate, endDate, "startDate", "endDate"); ArgChecker.inOrderNotEqual( this.unadjustedStartDate, this.unadjustedEndDate, "unadjustedStartDate", "unadjustedEndDate"); }
Source:
<code>public void setOverrides(CompatibilityChangeConfig overrides, String packageName) { mCompatConfig.addOverrides(overrides, packageName, <START> mOverrideValidator); <END> killPackage(packageName); }</code><technical_language>this a member of CompatConfig instead of passing in time</technical_language>

Target:
public void setOverrides(CompatibilityChangeConfig overrides, String packageName) throws RemoteException, SecurityException { mCompatConfig.addOverrides(overrides, packageName, mOverrideValidator); killPackage(packageName); }
Source:
<code>public void set_project_homepage() { OrganizationDto organization = db.organizations().insert(); <START> ComponentDto project = new ComponentDbTester(db).insertComponent(ComponentTesting.newPrivateProjectDto(organization)); <END> UserDto user = db.users().insertUser(); session.logIn(user); ws.newRequest() .setMethod("POST") .setParam(PARAM_TYPE, PROJECT.toString()) .setParam(PARAM_VALUE, project.getKey()) .execute(); UserDto actual = db.getDbClient().userDao().selectByLogin(db.getSession(), user.getLogin()); assertThat(actual).isNotNull(); assertThat(actual.getHomepageType()).isEqualTo(PROJECT.toString()); assertThat(actual.getHomepageValue()).isEqualTo(project.uuid()); }</code><technical_language>db.components().insertComponent</technical_language>

Target:
public void set_project_homepage() { OrganizationDto organization = db.organizations().insert(); ComponentDto project = new ComponentDbTester(db).insertComponent(newPrivateProjectDto(organization)); UserDto user = db.users().insertUser(); userSession.logIn(user); ws.newRequest() .setMethod("POST") .setParam(PARAM_TYPE, PROJECT.toString()) .setParam(PARAM_PARAMETER, project.getKey()) .execute(); UserDto actual = db.getDbClient().userDao().selectByLogin(db.getSession(), user.getLogin()); assertThat(actual).isNotNull(); assertThat(actual.getHomepageType()).isEqualTo(PROJECT.toString()); assertThat(actual.getHomepageValue()).isEqualTo(project.uuid()); }
Source:
<code>Span buildSpan(Message<?> message) { if (!hasHeader(message, Trace.TRACE_ID_NAME) || !hasHeader(message, Trace.SPAN_ID_NAME)) { return null; } long spanId = hasHeader(message, Trace.SPAN_ID_NAME) ? <START> getHeader(message, Trace.SPAN_ID_NAME, Long.class) : new Random().nextLong(); <END> long traceId = getHeader(message, Trace.TRACE_ID_NAME, Long.class); MilliSpan.MilliSpanBuilder span = MilliSpan.builder().traceId(traceId).spanId(spanId); Long parentId = getHeader(message, Trace.PARENT_ID_NAME, Long.class); if (message.getHeaders().containsKey(Trace.NOT_SAMPLED_NAME)) { span.exportable(false); } String processId = getHeader(message, Trace.PROCESS_ID_NAME); String spanName = getHeader(message, Trace.SPAN_NAME_NAME); if (spanName != null) { span.name(spanName); } if (processId != null) { span.processId(processId); } if (parentId != null) { span.parent(parentId); } span.remote(true); return span.build(); }</code><technical_language>for random effective, around. random instance for callsites generate ids</technical_language>

Target:
Span buildSpan(Message<?> message) { if (!hasHeader(message, Trace.TRACE_ID_NAME) || !hasHeader(message, Trace.SPAN_ID_NAME)) { return null; } long spanId = hasHeader(message, Trace.SPAN_ID_NAME) ? getHeader(message, Trace.SPAN_ID_NAME, Long.class) : random.nextLong(); long traceId = getHeader(message, Trace.TRACE_ID_NAME, Long.class); MilliSpan.MilliSpanBuilder span = MilliSpan.builder().traceId(traceId).spanId(spanId); Long parentId = getHeader(message, Trace.PARENT_ID_NAME, Long.class); if (message.getHeaders().containsKey(Trace.NOT_SAMPLED_NAME)) { span.exportable(false); } String processId = getHeader(message, Trace.PROCESS_ID_NAME); String spanName = getHeader(message, Trace.SPAN_NAME_NAME); if (spanName != null) { span.name(spanName); } if (processId != null) { span.processId(processId); } if (parentId != null) { span.parent(parentId); } span.remote(true); return span.build(); }
Source:
<code>public void process() { <START> PerformanceMonitor.startActivity("rendering/ambientocclusionpasses"); <END> if (renderingConfig.isSsao()) { sceneOpaque = frameBuffersManager.getFBO("sceneOpaque"); ssaoBlurredFBO = frameBuffersManager.getFBO("ssaoBlurred"); ssaoFBO = frameBuffersManager.getFBO("ssao"); generateSSAO(); generateBlurredSSAO(); } PerformanceMonitor.endActivity(); }</code><technical_language>PerformanceMonitor statements IF block, if is disabled get monitored</technical_language>

Target:
public void process() { if (renderingConfig.isSsao()) { PerformanceMonitor.startActivity("rendering/ambientocclusionpasses"); sceneOpaque = frameBuffersManager.getFBO("sceneOpaque"); ssaoBlurredFBO = frameBuffersManager.getFBO("ssaoBlurred"); ssaoFBO = frameBuffersManager.getFBO("ssao"); generateSSAO(); generateBlurredSSAO(); PerformanceMonitor.endActivity(); } }
Source:
<code>protected boolean filterInitiator(String variableName, String variableValue, String initiator) { <START> if (variableName.equals("initiator") && variableValue.equals(initiator)) { <END> return true; } return false; }</code><technical_language>a short version _return variableName.equals("initiator") && variableValue.equals(initiator) == false_</technical_language>

Target:
protected boolean filterInitiator(String variableName, String variableValue, String initiator) { return variableName.equals("initiator") && variableValue.equals(initiator); }
Source:
<code>private boolean isConstraintFromObjectDomain(@Nullable Constraint constraint) { <START> return constraint != null && constraint.getClass().isAssignableFrom(ObjectConstraint.class); <END> }</code><technical_language>simply constraint instanceof ObjectConstraint ? if null, return false</technical_language>

Target:
private boolean isConstraintFromObjectDomain(@Nullable Constraint constraint) { return constraint instanceof ObjectConstraint; }
Source:
<code>public void beginRequest(HttpClientRequestImpl req) { synchronized (conn) { if (request != null) { throw new IllegalStateException("Already writing a request"); } if (conn.requestInProgress != this) { throw new IllegalStateException("Connection is already writing another request"); } request = req; if (conn.metrics != null) { Object reqMetric = conn.metrics.requestBegin(conn.endpointMetric, conn.metric(), conn.localAddress(), conn.remoteAddress(), request); request.metric(reqMetric); } VertxTracer tracer = context.tracer(); if (tracer != null) { List<Map.Entry<String, String>> tags = new ArrayList<>(); tags.add(new AbstractMap.SimpleEntry<>("http.url", req.absoluteURI())); tags.add(new AbstractMap.SimpleEntry<>("http.method", req.method().name())); BiConsumer<String, String> headers = (key, val) -> req.headers().add(key, val); <START> trace = tracer.sendRequest(request.stream.getContext(), request, request.method.name(), headers, tags); <END> } } }</code><technical_language>this is presumptive data parsed. allow impl decide partially parsing here</technical_language>

Target:
public void beginRequest(HttpClientRequestImpl req) { synchronized (conn) { if (request != null) { throw new IllegalStateException("Already writing a request"); } if (conn.requestInProgress != this) { throw new IllegalStateException("Connection is already writing another request"); } request = req; if (conn.metrics != null) { Object reqMetric = conn.metrics.requestBegin(conn.endpointMetric, conn.metric(), conn.localAddress(), conn.remoteAddress(), request); request.metric(reqMetric); } VertxTracer tracer = context.tracer(); if (tracer != null) { List<Map.Entry<String, String>> tags = new ArrayList<>(); tags.add(new AbstractMap.SimpleEntry<>("http.url", req.absoluteURI())); tags.add(new AbstractMap.SimpleEntry<>("http.method", req.method().name())); BiConsumer<String, String> headers = (key, val) -> req.headers().add(key, val); trace = tracer.sendRequest(request.stream.getContext(), request, request.method.name(), headers, HttpUtils.CLIENT_REQUEST_TAG_EXTRACTOR); } } }
Source:
<code><START> public void close(Handler<AsyncResult<Void>> completionHandler) { <END> super.close(ar1 -> { if (server != null) { server.close(ar -> { if (ar.failed()) { log.error("Failed to close server", ar.cause()); } for (ConnectionHolder holder: connections.values()) { holder.close(); } completionHandler.handle(ar); }); } else { completionHandler.handle(ar1); } }); }</code><technical_language><LINK_0></technical_language>

Target:
public void close(Handler<AsyncResult<Void>> completionHandler) { super.close(ar1 -> { if (server != null) { server.close(ar -> { if (ar.failed()) { log.error("Failed to close server", ar.cause()); } for (ConnectionHolder holder: connections.values()) { holder.close(); } if (completionHandler != null) { completionHandler.handle(ar); } }); } else { if (completionHandler != null) { completionHandler.handle(ar1); } } }); }
Source:
<code>DirectlyDerivedClassesMarker(@Nonnull List<JDefinedClass> directlyDerivedClasses) { this.directlyDerivedClasses = <START> Collections.unmodifiableList( <END> new ArrayList<>(directlyDerivedClasses)); }</code><technical_language>UnmodifiableCollections.getUnmodifiableList() instead</technical_language>

Target:
DirectlyDerivedClassesMarker(@Nonnull List<JDefinedClass> directlyDerivedClasses) { this.directlyDerivedClasses = Jack.getUnmodifiableCollections().getUnmodifiableList( new ArrayList<>(directlyDerivedClasses)); }
Source:
<code>public Quat4f getOrientation() { <START> return new Quat4f(from(viewingAxis), viewingAngle); <END> }</code><technical_language>more clear JomlUtil.from instead of importing static method</technical_language>

Target:
public Quat4f getOrientation() { return new Quat4f(JomlUtil.from(viewingAxis), viewingAngle); }
Source:
<code><START> public Builder charSet( String charset ) { <END> bundle.setCharset( charset ); return this; }</code><technical_language>Builder method called charset, for consistency</technical_language>

Target:
public Builder charSet( String charset ) { bundle.setCharSet( charset ); return this; }
Source:
<code>private String addLinkToDescription(final PostsCreator postsCreator, final String description) throws MalformedURLException { final String url = "<LINK_0>"; <START> String text = description + " <LINK_0>"; <END> postsCreator.addDescriptionWith(new URL(url)); return text; }</code><technical_language>String text = description + url;</technical_language>

Target:
private String addLinkToDescription(final PostsCreator postsCreator, final String description) throws MalformedURLException { String text = description + " " + WIKIA_URL; postsCreator.addDescriptionWith(new URL(WIKIA_URL)); return text; }
Source:
<code>public Set<TopicPartition> getTopicPartitions() { <START> return Collections.unmodifiableSet(_topicPartitions); <END> }</code><technical_language>ConcurrentHashMap guarantees concurrent access individual map level (not map level). this potentially result in inconsistent results onPartitionsAssigned/onPartitionsRevoked called time getTopicPartitions is called. Alternative is accesses "synchronized", map accessed in hot path rebalance (and potentially address this caller level) OK leave is. aware of</technical_language>

Target:
public Map<String, Set<Integer>> getTopicPartitions() { return Collections.unmodifiableMap(_topicPartitions); }
Source:
<code>private static Map<MethodDescriptor<?, ?>, Predicate<?>> createMethodRetryMap() { Predicate<MutateRowRequest> retryMutationsWithTimestamps = new Predicate<MutateRowRequest>() { @Override public boolean apply(@Nullable MutateRowRequest mutateRowRequest) { return mutateRowRequest != null <START> && !hasMissingTimeStamp(mutateRowRequest.getMutationsList()); <END> } }; Predicate<CheckAndMutateRowRequest> retryCheckAndMutateWithTimestamps = new Predicate<CheckAndMutateRowRequest>() { @Override public boolean apply(@Nullable CheckAndMutateRowRequest checkAndMutateRowRequest) { return checkAndMutateRowRequest != null && !hasMissingTimeStamp(checkAndMutateRowRequest.getTrueMutationsList()) && !hasMissingTimeStamp(checkAndMutateRowRequest.getFalseMutationsList()); } }; return ImmutableMap.<MethodDescriptor<?, ?>, Predicate<?>>builder() .put(BigtableServiceGrpc.METHOD_MUTATE_ROW, retryMutationsWithTimestamps) .put(BigtableServiceGrpc.METHOD_CHECK_AND_MUTATE_ROW, retryCheckAndMutateWithTimestamps) .build(); }</code><technical_language>allCellsHaveTimestamp</technical_language>

Target:
private static Map<MethodDescriptor<?, ?>, Predicate<?>> createMethodRetryMap() { Predicate<MutateRowRequest> retryMutationsWithTimestamps = new Predicate<MutateRowRequest>() { @Override public boolean apply(@Nullable MutateRowRequest mutateRowRequest) { return mutateRowRequest != null && allCellsHaveTimestamps(mutateRowRequest.getMutationsList()); } }; Predicate<CheckAndMutateRowRequest> retryCheckAndMutateWithTimestamps = new Predicate<CheckAndMutateRowRequest>() { @Override public boolean apply(@Nullable CheckAndMutateRowRequest checkAndMutateRowRequest) { return checkAndMutateRowRequest != null && allCellsHaveTimestamps(checkAndMutateRowRequest.getTrueMutationsList()) && allCellsHaveTimestamps(checkAndMutateRowRequest.getFalseMutationsList()); } }; return ImmutableMap.<MethodDescriptor<?, ?>, Predicate<?>>builder() .put(BigtableServiceGrpc.METHOD_MUTATE_ROW, retryMutationsWithTimestamps) .put(BigtableServiceGrpc.METHOD_CHECK_AND_MUTATE_ROW, retryCheckAndMutateWithTimestamps) .build(); }
Source:
<code>private boolean getDirectTestFlag(String fileName, String property) { boolean directTestFlag = false; String directTestingFlag = getDirectTestingParam(fileName, property); <START> if (directTestingFlag.equals("true")) { <END> directTestFlag = true; } return directTestFlag; }</code><technical_language>Need check if directTestingFlag is null</technical_language>

Target:
private boolean getDirectTestFlag(String fileName, String property) { boolean directTestFlag = false; String directTestingFlag = getDirectTestingParam(fileName, property); if (directTestingFlag != null && !directTestingFlag.isEmpty() && directTestingFlag.equals("true")) { directTestFlag = true; } return directTestFlag; }
Source:
<code>public static ZipFileApplicationDetails getAppDetails(File applicationFile) throws ApplicationServiceException { ZipFile appZip = null; try { appZip = new ZipFile(applicationFile); logger.debug("Extracting version and application name from zipfile {}.", applicationFile.getAbsolutePath()); ZipEntry featureFileEntry = getFeatureFile(appZip); ZipFileApplicationDetails details = getAppDetailsFromFeature(appZip, featureFileEntry); return details; } catch (ZipException e) { throw new ApplicationServiceException( "Could not get application details of the provided zipfile.", e); } catch (IOException e) { throw new ApplicationServiceException( "Could not get application details of the provided zipfile.", e); } catch (ParserConfigurationException e) { throw new ApplicationServiceException( "Could not get application details of the provided zipfile.", e); } catch (SAXException e) { throw new ApplicationServiceException( "Could not get application details of the provided zipfile.", e); } finally { try { <START> IOUtils.close(appZip); <END> } catch (IOException e) { logger.warn("Unable to close zip stream.", e); } } }</code><technical_language>closeQuietly()</technical_language>

Target:
public static ZipFileApplicationDetails getAppDetails(File applicationFile) throws ApplicationServiceException { ZipFile appZip = null; try { appZip = new ZipFile(applicationFile); logger.debug("Extracting version and application name from zipfile {}.", applicationFile.getAbsolutePath()); ZipEntry featureFileEntry = getFeatureFile(appZip); ZipFileApplicationDetails details = getAppDetailsFromFeature(appZip, featureFileEntry); return details; } catch (ZipException e) { throw new ApplicationServiceException( "Could not get application details of the provided zipfile.", e); } catch (IOException e) { throw new ApplicationServiceException( "Could not get application details of the provided zipfile.", e); } catch (ParserConfigurationException e) { throw new ApplicationServiceException( "Could not get application details of the provided zipfile.", e); } catch (SAXException e) { throw new ApplicationServiceException( "Could not get application details of the provided zipfile.", e); } finally { IOUtils.closeQuietly(appZip); } }
Source:
<code>public String toString() { return "ActorMapping{" + "actors=" + actors + '}'; <START> } <END></code><technical_language>ToStringBuilder</technical_language>

Target:
public String toString() { return new ToStringBuilder(this) .append("actors", actors) .toString(); }
Source:
<code>public long getRetainedSizeInBytes() { long retainedSizeInBytes = 0; if (booleanStatistics != null) { retainedSizeInBytes += booleanStatistics.getRetainedSizeInBytes(); } if (integerStatistics != null) { retainedSizeInBytes += integerStatistics.getRetainedSizeInBytes(); } if (doubleStatistics != null) { retainedSizeInBytes += doubleStatistics.getRetainedSizeInBytes(); } if (stringStatistics != null) { retainedSizeInBytes += stringStatistics.getRetainedSizeInBytes(); } if (dateStatistics != null) { retainedSizeInBytes += dateStatistics.getRetainedSizeInBytes(); } if (decimalStatistics != null) { retainedSizeInBytes += decimalStatistics.getRetainedSizeInBytes(); } if (binaryStatistics != null) { retainedSizeInBytes += binaryStatistics.getRetainedSizeInBytes(); } if (bloomFilter != null) { retainedSizeInBytes += bloomFilter.getRetainedSizeInBytes(); } <START> return retainedSizeInBytes + INSTANCE_SIZE; <END> }</code><technical_language>initialize retainedSizeInBytes INSTANCE_SIZE above</technical_language>

Target:
public long getRetainedSizeInBytes() { long retainedSizeInBytes = INSTANCE_SIZE; if (booleanStatistics != null) { retainedSizeInBytes += booleanStatistics.getRetainedSizeInBytes(); } if (integerStatistics != null) { retainedSizeInBytes += integerStatistics.getRetainedSizeInBytes(); } if (doubleStatistics != null) { retainedSizeInBytes += doubleStatistics.getRetainedSizeInBytes(); } if (stringStatistics != null) { retainedSizeInBytes += stringStatistics.getRetainedSizeInBytes(); } if (dateStatistics != null) { retainedSizeInBytes += dateStatistics.getRetainedSizeInBytes(); } if (decimalStatistics != null) { retainedSizeInBytes += decimalStatistics.getRetainedSizeInBytes(); } if (binaryStatistics != null) { retainedSizeInBytes += binaryStatistics.getRetainedSizeInBytes(); } if (bloomFilter != null) { retainedSizeInBytes += bloomFilter.getRetainedSizeInBytes(); } return retainedSizeInBytes; }
Source:
<code>public GithubUrl parse(String url) { Matcher matcher = GITHUB_PATTERN.matcher(url); if (!matcher.matches()) { throw new IllegalArgumentException( String.format( "The given github url %s is not a valid URL github url. It should start with <LINK_0><user>/<repo>", url)); } String repoUser = matcher.group("repoUser"); String repoName = matcher.group("repoName"); <START> if (repoName.matches("[\\w-][\\w.-]*?.git$")) { <END> repoName = repoName.substring(0, repoName.length() - 4); } String branchName = matcher.group("branchName"); String pullRequestId = matcher.group("pullRequestId"); if (pullRequestId != null) { String prData = this.urlFetcher.fetchSafely(url); Matcher prMatcher = PR_DATA_PATTERN.matcher(prData); if (prMatcher.matches()) { String prState = prMatcher.group("prState"); if (!"open".equalsIgnoreCase(prState)) { throw new IllegalArgumentException( String.format( "The given Pull Request url %s is not Opened, (found %s), thus it can't be opened as branch may have been removed.", url, prState)); } repoUser = prMatcher.group("prRepoUser"); repoName = prMatcher.group("prRepoName"); branchName = prMatcher.group("prBranch"); } else { throw new IllegalArgumentException( String.format( "The given Pull Request github url %s is not a valid Pull Request URL github url. Unable to extract the data", url)); } } return new GithubUrl() .withUsername(repoUser) .withRepository(repoName) .withBranch(branchName) .withSubfolder(matcher.group("subFolder")) .withDevfileFilename("devfile.yaml") .withFactoryFilename(".factory.json"); }</code><technical_language>Is ok this matches ab..git</technical_language>

Target:
public GithubUrl parse(String url) { Matcher matcher = GITHUB_PATTERN.matcher(url); if (!matcher.matches()) { throw new IllegalArgumentException( String.format( "The given github url %s is not a valid URL github url. It should start with <LINK_0><user>/<repo>", url)); } String repoUser = matcher.group("repoUser"); String repoName = matcher.group("repoName"); if (repoName.matches("^[\\w-][\\w.-]*?\\.git$")) { repoName = repoName.substring(0, repoName.length() - 4); } String branchName = matcher.group("branchName"); String pullRequestId = matcher.group("pullRequestId"); if (pullRequestId != null) { String prData = this.urlFetcher.fetchSafely(url); Matcher prMatcher = PR_DATA_PATTERN.matcher(prData); if (prMatcher.matches()) { String prState = prMatcher.group("prState"); if (!"open".equalsIgnoreCase(prState)) { throw new IllegalArgumentException( String.format( "The given Pull Request url %s is not Opened, (found %s), thus it can't be opened as branch may have been removed.", url, prState)); } repoUser = prMatcher.group("prRepoUser"); repoName = prMatcher.group("prRepoName"); branchName = prMatcher.group("prBranch"); } else { throw new IllegalArgumentException( String.format( "The given Pull Request github url %s is not a valid Pull Request URL github url. Unable to extract the data", url)); } } return new GithubUrl() .withUsername(repoUser) .withRepository(repoName) .withBranch(branchName) .withSubfolder(matcher.group("subFolder")) .withDevfileFilename("devfile.yaml") .withFactoryFilename(".factory.json"); }
Source:
<code>private void addSearchView(Menu menu) { MenuItem searchAction = menu.add(0, Menu.NONE, Menu.NONE, getString(R.string.search_hint)); MenuItemCompat.setShowAsAction(searchAction , MenuItemCompat.SHOW_AS_ACTION_ALWAYS); SearchView searchView = new SearchView(getActivity()); searchView.setFocusable(true); searchView.requestFocusFromTouch(); <START> SearchViewCompat.setOnQueryTextListener(searchView, searchQueryListener); <END> SearchViewCompat.setOnCloseListener(searchView, searchCloseListener); SearchViewCompat.setIconified(searchView, false); SearchViewCompat.setInputType(searchView, EditorInfo.TYPE_CLASS_TEXT); SearchViewCompat.setImeOptions(searchView, EditorInfo.IME_ACTION_GO); SearchViewCompat.setSubmitButtonEnabled(searchView, true); SearchViewCompat.setQueryHint(searchView, getString(R.string.search_hint)); if (TextUtils.getTrimmedLength(lastSearchedText) > 0) { SearchViewCompat.setQuery(searchView, lastSearchedText, false); } MenuItemCompat.setActionView(searchAction, searchView); }</code><technical_language>This crashes device (4.4). SearchViewCompat. ("android.support.v7.widget.SearchView cast android.widget.SearchView")</technical_language>

Target:
private void addSearchView(Menu menu) { MenuItem searchAction = menu.add(0, Menu.NONE, Menu.NONE, getString(R.string.search_hint)); MenuItemCompat.setShowAsAction(searchAction , MenuItemCompat.SHOW_AS_ACTION_ALWAYS); SearchView searchView = new SearchView(getActivity()); searchView.setFocusable(true); searchView.requestFocusFromTouch(); searchView.setOnQueryTextListener(searchQueryListener); searchView.setOnCloseListener(searchCloseListener); searchView.setIconified(false); searchView.setInputType(EditorInfo.TYPE_CLASS_TEXT); searchView.setImeOptions(EditorInfo.IME_ACTION_GO); searchView.setSubmitButtonEnabled(true); searchView.setQueryHint(getString(R.string.search_hint)); if (isValidQuery(lastSearchedText)) { searchView.setQuery(lastSearchedText, false); } MenuItemCompat.setActionView(searchAction, searchView); }
Source:
<code>public void afterCommit( TransactionData data, Object state ) { try { <START> List<BinaryLatch> completions = new ArrayList<>(); <END> for ( WritableFulltext nodeIndex : fulltextProvider.writableNodeIndices() ) { Map<Long,Map<String,Object>> nodeMap = ((Map<Long,Map<String,Object>>[]) state)[0]; completions.add( applier.removePropertyData( data.removedNodeProperties(), nodeMap, nodeIndex ) ); completions.add( applier.updatePropertyData( nodeMap, nodeIndex ) ); } for ( WritableFulltext relationshipIndex : fulltextProvider.writableRelationshipIndices() ) { Map<Long,Map<String,Object>> relationshipMap = ((Map<Long,Map<String,Object>>[]) state)[1]; completions.add( applier.removePropertyData( data.removedRelationshipProperties(), relationshipMap, relationshipIndex ) ); completions.add( applier.updatePropertyData( relationshipMap, relationshipIndex ) ); } for ( BinaryLatch completion : completions ) { completion.await(); } } catch ( IOException e ) { log.error( "Unable to update fulltext index", e ); } }</code><technical_language>do gaining generating lots independent small updates? batch index</technical_language>

Target:
public void afterCommit( TransactionData data, Object state ) { try { List<AsyncFulltextIndexOperation> completions = new ArrayList<>(); Map<Long,Map<String,Object>> nodeMap = ((Map<Long,Map<String,Object>>[]) state)[0]; Map<Long,Map<String,Object>> relationshipMap = ((Map<Long,Map<String,Object>>[]) state)[1]; for ( WritableFulltext nodeIndex : fulltextProvider.writableNodeIndices() ) { completions.add( applier.removePropertyData( data.removedNodeProperties(), nodeMap, nodeIndex ) ); completions.add( applier.updatePropertyData( nodeMap, nodeIndex ) ); } for ( WritableFulltext relationshipIndex : fulltextProvider.writableRelationshipIndices() ) { completions.add( applier.removePropertyData( data.removedRelationshipProperties(), relationshipMap, relationshipIndex ) ); completions.add( applier.updatePropertyData( relationshipMap, relationshipIndex ) ); } for ( AsyncFulltextIndexOperation completion : completions ) { completion.awaitCompletion(); } } catch ( IOException e ) { log.error( "Unable to update fulltext index", e ); } }
Source:
<code>public static Expression values(DataType type, Collection<? extends Object> values) { switch (type) { case STRING: <START> return matchAny(Fields.STRING_VALUE, Iterables.filter(values, String.class)); <END> case INTEGER: return matchAnyInt(Fields.INTEGER_VALUE, FluentIterable.from(values).filter(Integer.class).toSet()); case DECIMAL: return matchAnyDecimal(Fields.DECIMAL_VALUE, FluentIterable.from(values).filter(BigDecimal.class).toSet()); default: throw new UnsupportedOperationException("Unsupported data type when filtering by values, " + type); } }</code><technical_language>Aha, Strings do get preferential treatment</technical_language>

Target:
public static Expression values(DataType type, Collection<? extends Object> values) { switch (type) { case STRING: return matchAny(Fields.STRING_VALUE, FluentIterable.from(values).filter(String.class).toSet()); case INTEGER: return matchAnyInt(Fields.INTEGER_VALUE, FluentIterable.from(values).filter(Integer.class).toSet()); case DECIMAL: return matchAnyDecimal(Fields.DECIMAL_VALUE, FluentIterable.from(values).filter(BigDecimal.class).toSet()); default: throw new UnsupportedOperationException("Unsupported data type when filtering by values, " + type); } }
Source:
<code>public void scenario(Scenario scenario) { <START> logDiv("Scenario: " + scenario.getName(), "scenario"); <END> }</code><technical_language>Respect I18n - scenario.getKeyword()</technical_language>

Target:
public void scenario(Scenario scenario) { logDiv(scenario.getKeyword(), scenario.getName(), "scenario"); }
Source:
<code>public void drain(Duration optionalTimeout, boolean includePrimary, boolean throwFirstError) { try { dstJob.join(includePrimary, optionalTimeout); } catch (InterruptedException e) { <START> Throwables.propagate(e); <END> } if (throwFirstError) { if (isError()) getUnchecked(); for (Task<?> t: getQueue()) if (t.isError() && !TaskTags.isInessential(t)) t.getUnchecked(); } }</code><technical_language>throw Exceptions.propagate(e); swallow interrupt</technical_language>

Target:
public void drain(Duration optionalTimeout, boolean includePrimary, boolean throwFirstError) { try { dstJob.join(includePrimary, optionalTimeout); } catch (InterruptedException e) { throw Exceptions.propagate(e); } if (throwFirstError) { if (isError()) getUnchecked(); for (Task<?> t: getQueue()) if (t.isError() && !TaskTags.isInessential(t)) t.getUnchecked(); } }