auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public PlanNode visitProject(ProjectNode node, RewriteContext<Expression> context) { Set<Symbol> deterministicSymbols = node.getAssignments().entrySet().stream() .filter(entry -> DeterminismEvaluator.isDeterministic(entry.getValue())) .map(Map.Entry::getKey) .collect(Collectors.toSet()); Predicate<Expression> deterministic = conjunct -> SymbolsExtractor.extractUnique(conjunct).stream() .allMatch(deterministicSymbols::contains); Map<Boolean, List<Expression>> conjuncts = extractConjuncts(context.get()).stream().collect(Collectors.partitioningBy(deterministic)); List<Expression> deterministicConjuncts = conjuncts.get(true); <START> Map<Boolean, List<Expression>> partitionedConjuncts = deterministicConjuncts.stream() <END> .collect(Collectors.partitioningBy(expression -> isInliningCandidate(expression, node))); List<Expression> inlinedDeterministicConjuncts = partitionedConjuncts.get(true).stream() .map(entry -> inlineSymbols(node.getAssignments().getMap(), entry)) .collect(Collectors.toList()); PlanNode rewrittenNode = context.defaultRewrite(node, combineConjuncts(inlinedDeterministicConjuncts)); List<Expression> nonInliningConjuncts = partitionedConjuncts.get(false); if (!conjuncts.get(false).isEmpty()) { nonInliningConjuncts.addAll(conjuncts.get(false)); } if (!nonInliningConjuncts.isEmpty()) { rewrittenNode = new FilterNode(idAllocator.getNextId(), rewrittenNode, combineConjuncts(nonInliningConjuncts)); } return rewrittenNode; }</code><technical_language>partitionedConjuncts sounds related data partitioning. inlineConjuncts</technical_language>

Target:
public PlanNode visitProject(ProjectNode node, RewriteContext<Expression> context) { Set<Symbol> deterministicSymbols = node.getAssignments().entrySet().stream() .filter(entry -> DeterminismEvaluator.isDeterministic(entry.getValue())) .map(Map.Entry::getKey) .collect(Collectors.toSet()); Predicate<Expression> deterministic = conjunct -> SymbolsExtractor.extractUnique(conjunct).stream() .allMatch(deterministicSymbols::contains); Map<Boolean, List<Expression>> conjuncts = extractConjuncts(context.get()).stream().collect(Collectors.partitioningBy(deterministic)); List<Expression> deterministicConjuncts = conjuncts.get(true); Map<Boolean, List<Expression>> inlineConjuncts = deterministicConjuncts.stream() .collect(Collectors.partitioningBy(expression -> isInliningCandidate(expression, node))); List<Expression> inlinedDeterministicConjuncts = inlineConjuncts.get(true).stream() .map(entry -> inlineSymbols(node.getAssignments().getMap(), entry)) .collect(Collectors.toList()); PlanNode rewrittenNode = context.defaultRewrite(node, combineConjuncts(inlinedDeterministicConjuncts)); List<Expression> nonInliningConjuncts = inlineConjuncts.get(false); nonInliningConjuncts.addAll(conjuncts.get(false)); if (!nonInliningConjuncts.isEmpty()) { rewrittenNode = new FilterNode(idAllocator.getNextId(), rewrittenNode, combineConjuncts(nonInliningConjuncts)); } return rewrittenNode; }
Source:
<code>public void deployTopology(Topology topology) throws Exception { TopologyDag dag = topologyDagBuilder.getDag(topology); topology.setTopologyDag(dag); LOG.debug("Deploying topology {}", topology); setUpClusterArtifacts(topology); setUpExtraJars(topology); <START> setUpResources(topology); <END> topologyActions.deploy(getTopologyLayout(topology)); }</code><technical_language>nit: visit graph a visitor extra jars resources pass object methods avoid traversing graph twice</technical_language>

Target:
public void deployTopology(Topology topology) throws Exception { TopologyDag dag = topologyDagBuilder.getDag(topology); topology.setTopologyDag(dag); ensureValid(dag); LOG.info("Deploying topology {}", topology); setUpClusterArtifacts(topology); StormTopologyExtraJarsHandler extraJarsHandler = new StormTopologyExtraJarsHandler(this); topology.getTopologyDag().traverse(extraJarsHandler); setUpExtraJars(topology, extraJarsHandler.getExtraJars()); setUpResources(topology, extraJarsHandler.getExtraResources()); topologyActions.deploy(getTopologyLayout(topology)); }
Source:
<code>public MatchImplementor get(final SqlMatchFunction function) { final Supplier<? extends MatchImplementor> supplier = mrMap.get(function); if (supplier != null) { return supplier.get(); } else { <START> return null; <END> } }</code><technical_language>Personally i TODOs in code, log a JIRA issue for if planning resolve it</technical_language>

Target:
public MatchImplementor get(final SqlMatchFunction function) { final Supplier<? extends MatchImplementor> supplier = mrMap.get(function); if (supplier != null) { return supplier.get(); } else { throw new IllegalStateException("Supplier should not be null"); } }
Source:
<code>private static void validateSql(String sqlDefinition) { if (!DynamicConfigHelpers.isNullOrEmpty(sqlDefinition) && (sqlDefinition.contains(SEMI_COLON) || containsDisallowedWords(sqlDefinition, SQL_SPLIT_REGEX, SQL_DISALLOWED_WORDS))) { throw new IllegalStateException( <START> "sql/definition provided in table config contain either ';' or one of these words: " <END> + Arrays.toString(SQL_DISALLOWED_WORDS.toArray())); } }</code><technical_language>';' replaced SEMI_COLON</technical_language>

Target:
private static void validateSql(String sqlDefinition) { if (!DynamicConfigHelpers.isNullOrEmpty(sqlDefinition) && (sqlDefinition.contains(SEMI_COLON) || containsDisallowedWords(sqlDefinition, SQL_SPLIT_REGEX, SQL_DISALLOWED_WORDS))) { throw new IllegalStateException("sql/definition provided in table config contain either '" + SEMI_COLON + "' or one of these words: " + Arrays.toString(SQL_DISALLOWED_WORDS.toArray())); } }
Source:
<code><START> public double simpleCapletPrice(CapFloorIbor caplet) { <END> CapFloorIbor capStandard = new CapFloorIbor(caplet.getCurrency(), caplet.getFixingPeriodEndTime(), caplet.getPaymentYearFraction(), caplet.getNotional(), caplet.getFixingTime(), caplet.getIndex(), caplet.getFixingPeriodStartTime(), caplet.getFixingPeriodEndTime(), caplet.getFixingAccrualFactor(), caplet.getStrike(), caplet.isCap()); SimpleOptionData option = CapFloorDecomposer.toOption(capStandard, _curves); return simpleOptionPrice(option); }</code><technical_language>Check arg</technical_language>

Target:
public double simpleCapletPrice(CapFloorIbor caplet) { ArgumentChecker.notNull(caplet, "caplet"); CapFloorIbor capStandard = new CapFloorIbor(caplet.getCurrency(), caplet.getFixingPeriodEndTime(), caplet.getPaymentYearFraction(), caplet.getNotional(), caplet.getFixingTime(), caplet.getIndex(), caplet.getFixingPeriodStartTime(), caplet.getFixingPeriodEndTime(), caplet.getFixingAccrualFactor(), caplet.getStrike(), caplet.isCap()); SimpleOptionData option = CapFloorDecomposer.toOption(capStandard, _curves); return simpleOptionPrice(option); }
Source:
<code>private ColumnStatisticsAggregation createAggregation(String functionName, SymbolReference input, Type inputType, Type outputType) { FunctionManager functionManager = metadata.getFunctionManager(); FunctionHandle functionHandle = functionManager.lookupFunction(functionName, TypeSignatureProvider.fromTypes(ImmutableList.of(inputType))); Type resolvedType = metadata.getType(getOnlyElement(functionManager.getFunctionMetadata(functionHandle).getArgumentTypes())); verify(resolvedType.equals(inputType), "resolved function input type does not match the input type: %s != %s", resolvedType, inputType); return new ColumnStatisticsAggregation( new AggregationNode.Aggregation( functionHandle, <START> ImmutableList.of(input), Optional.empty(), Optional.empty(), false, Optional.empty()), <END> outputType); }</code><technical_language>variable a line</technical_language>

Target:
private ColumnStatisticsAggregation createAggregation(String functionName, SymbolReference input, Type inputType, Type outputType) { FunctionManager functionManager = metadata.getFunctionManager(); FunctionHandle functionHandle = functionManager.lookupFunction(functionName, TypeSignatureProvider.fromTypes(ImmutableList.of(inputType))); Type resolvedType = metadata.getType(getOnlyElement(functionManager.getFunctionMetadata(functionHandle).getArgumentTypes())); verify(resolvedType.equals(inputType), "resolved function input type does not match the input type: %s != %s", resolvedType, inputType); return new ColumnStatisticsAggregation( new AggregationNode.Aggregation( new CallExpression( functionName, functionHandle, outputType, ImmutableList.of(castToRowExpression(input))), Optional.empty(), Optional.empty(), false, Optional.empty()), outputType); }
Source:
<code><START> public static ParseTree getRightSibling(ParseTree ctx) { <END> if (ctx == null || ctx.getParent() == null) { return null; } ParseTree parent = ctx.getParent(); for (int i = 0; i < parent.getChildCount(); i++) { if (parent.getChild(i) == ctx) { if (i >= parent.getChildCount() - 1) { return null; } else { return parent.getChild(i + 1); } } } return null; }</code><technical_language>planning refactor this (and getLeftSibling()) a method getIndexOfChild(ctx)</technical_language>

Target:
public static ParseTree getRightSibling(ParseTree ctx) { int index = ParseTreeUtil.getNodeIndex(ctx); ParseTree parent = ctx.getParent(); if (index < 0 || index >= parent.getChildCount() - 1) { return null; } return parent.getChild(index + 1); }
Source:
<code>private static InputStream fakeBody(final Request... dispositions) throws IOException { final StringBuilder builder = new StringBuilder(); for (final Request each : dispositions) { builder.append(String.format("--%s%s", BOUNDARY, CRLF)) .append("Content-Disposition: ") .append( new RqHeaders.Smart( new RqHeaders.Base(each) ).single("Content-Disposition") ).append(CRLF); final String body = new RqPrint(each).printBody(); if (!(CRLF.equals(body) || "".equals(body))) { <START> builder.append(String.format("\r\n%s\r\n", body)); <END> } } builder.append("Content-Transfer-Encoding: utf-8\r\n") .append(String.format("--%s--", BOUNDARY)); return new ByteArrayInputStream( builder.toString().getBytes() ); }</code><technical_language>@erimerturk do this formatting? builder.append(CRLF).append(body().append(CRLF) more natural "builder" ... reuse CRLF constant approach <LINK_0></technical_language>

Target:
private static InputStream fakeBody(final Request... dispositions) throws IOException { final StringBuilder builder = new StringBuilder(); for (final Request each : dispositions) { builder.append(String.format("--%s", BOUNDARY)) .append(CRLF) .append("Content-Disposition: ") .append( new RqHeaders.Smart( new RqHeaders.Base(each) ).single("Content-Disposition") ).append(CRLF); final String body = new RqPrint(each).printBody(); if (!(CRLF.equals(body) || "".equals(body))) { builder.append(CRLF).append(body).append(CRLF); } } builder.append("Content-Transfer-Encoding: utf-8").append(CRLF) .append(String.format("--%s--", BOUNDARY)); return new ByteArrayInputStream( builder.toString().getBytes() ); }
Source:
<code>public void testConnectAlreadyConnected() throws Exception { PowerMockito.when(connectionInterface, "isOpen").thenReturn(true); try { xbeeDevice.open(); fail("Device shouldn't have connected"); } catch (InterfaceAlreadyOpenException e) { } catch (XBeeDeviceException e) { fail("This exception shouldn't be thrown now."); } <START> } <END></code><technical_language>I fixes unit tests cases XBeeDevice class committed in master. sweat blood merge..</technical_language>

Target:
public void testConnectAlreadyConnected() throws Exception { PowerMockito.when(connectionInterface, "isOpen").thenReturn(true); try { xbeeDevice.open(); fail("Device shouldn't have connected"); } catch (Exception e) { assertEquals(InterfaceAlreadyOpenException.class, e.getClass()); } }
Source:
<code>public <T> Future<T> submit(SQLQueueCallable<T> callable){ callable.setDb(db); <START> callable.setInTransaction(false); <END> return queue.submit(callable); }</code><technical_language>I call ivar method runInTransaction, method's giving instruction current naming clear</technical_language>

Target:
public <T> Future<T> submit(SQLQueueCallable<T> callable){ callable.setDb(db); callable.setRunInTransaction(false); return queue.submit(callable); }
Source:
<code>public void testFailureCauseDisplayData() throws Exception { <START> Assume.assumeThat(Functions.isWindows(), not(true)); <END> FailureCauseDisplayData failureCauseDisplayData = getDisplayData(executeBuild()); assertNotNull(failureCauseDisplayData.getDownstreamFailureCauses()); assertNotNull(failureCauseDisplayData.getFoundFailureCauses()); FailureCauseDisplayData.Links links = failureCauseDisplayData.getLinks(); assertNotNull(links); assertEquals("WEST,SOUTH", links.getProjectDisplayName()); assertNotNull(links.getProjectUrl()); assertEquals("#1", links.getBuildDisplayName()); assertNotNull(links.getBuildUrl()); }</code><technical_language>assumeFalse BTW</technical_language>

Target:
public void testFailureCauseDisplayData() throws Exception { assumeFalse(Functions.isWindows()); FailureCauseDisplayData failureCauseDisplayData = getDisplayData(executeBuild()); assertNotNull(failureCauseDisplayData.getDownstreamFailureCauses()); assertNotNull(failureCauseDisplayData.getFoundFailureCauses()); FailureCauseDisplayData.Links links = failureCauseDisplayData.getLinks(); assertNotNull(links); assertEquals("WEST,SOUTH", links.getProjectDisplayName()); assertNotNull(links.getProjectUrl()); assertEquals("#1", links.getBuildDisplayName()); assertNotNull(links.getBuildUrl()); }
Source:
<code>public void saveContent(final String pageId, final List<PageContainerForm.ContainerEntry> containerEntries) throws DotDataException { MultiTreeFactory.deleteMultiTreeByParent(pageId); final List<MultiTree> multiTres = new ArrayList<>(); for (final PageContainerForm.ContainerEntry containerEntry : containerEntries) { int i = 0; final List<String> contentIds = containerEntry.getContentIds(); for (final String contentletId : contentIds) { final MultiTree multiTree = new MultiTree().setContainer(containerEntry.getContainerId()) .setContentlet(contentletId) .setRelationType(containerEntry.getContainerUUID()) .setTreeOrder(i++) .setHtmlPage(pageId); multiTres.add(multiTree); } } if (!multiTres.isEmpty()) { <START> multiTreeAPI.saveMultiTrees(pageId, multiTres); <END> } }</code><technical_language>is a misspelling of multitree array name. multiTrees</technical_language>

Target:
public void saveContent(final String pageId, final List<PageContainerForm.ContainerEntry> containerEntries) throws DotDataException { MultiTreeFactory.deleteMultiTreeByParent(pageId); final List<MultiTree> multiTrees = new ArrayList<>(); for (final PageContainerForm.ContainerEntry containerEntry : containerEntries) { int i = 0; final List<String> contentIds = containerEntry.getContentIds(); for (final String contentletId : contentIds) { final MultiTree multiTree = new MultiTree().setContainer(containerEntry.getContainerId()) .setContentlet(contentletId) .setRelationType(containerEntry.getContainerUUID()) .setTreeOrder(i++) .setHtmlPage(pageId); multiTrees.add(multiTree); } } if (!multiTrees.isEmpty()) { multiTreeAPI.saveMultiTrees(pageId, multiTrees); } }
Source:
<code>public IVersionedApiResource getEndpointFor(String apiVersion, String kind) { IVersionedApiResource apiresource = endpointFor(apiVersion, kind); if(apiresource == null) { <START> throw new OpenShiftException("No endpoint found for kind %s", kind); <END> } return apiresource; }</code><technical_language>Shouldnt error state version kind supported in</technical_language>

Target:
public IVersionedApiResource getEndpointFor(String apiVersion, String kind) { init(); IVersionedApiResource apiresource = endpointFor(apiVersion, kind); if(apiresource == null) { throw new OpenShiftException("No endpoint found for %s, version %s", kind, apiVersion); } return apiresource; }
Source:
<code>public final Transaction fence(byte[] tableName) throws TransactionException { long fenceTimestamp; <START> long tableID = Hashing.murmur3_128().newHasher().putBytes(tableName).hash().asLong(); <END> try { fenceTimer.start(); try { fenceTimestamp = tsoClient.getFence(tableID).get(); } finally { fenceTimer.stop(); } AbstractTransaction<? extends CellId> tx = transactionFactory.createTransaction(fenceTimestamp, fenceTimestamp, this); return tx; } catch (ExecutionException e) { throw new TransactionException("Could not get fence", e); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); throw new TransactionException("Interrupted creating a fence", ie); } }</code><technical_language>Copy&paste HBaseCellId.getTableId(). Please reuse code</technical_language>

Target:
public final Transaction fence(byte[] tableName) throws TransactionException { long fenceTimestamp; long tableID = getHashForTable(tableName); Hashing.murmur3_128().newHasher().putBytes(tableName).hash().asLong(); try { fenceTimer.start(); try { fenceTimestamp = tsoClient.getFence(tableID).get(); } finally { fenceTimer.stop(); } AbstractTransaction<? extends CellId> tx = transactionFactory.createTransaction(fenceTimestamp, fenceTimestamp, this); return tx; } catch (ExecutionException e) { throw new TransactionException("Could not get fence", e); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); throw new TransactionException("Interrupted creating a fence", ie); } }
Source:
<code>public FileStatus getReferencedFileStatus(final FileSystem fs) throws IOException { if(null == this.localStatus){ <START> throw new IOException("localStatus is not initialize on construct"); <END> } return this.localStatus; }</code><technical_language>Do want add name of file this message if available? Spacing</technical_language>

Target:
public FileStatus getReferencedFileStatus(final FileSystem fs) throws IOException { if(null == this.localStatus) { return loadAndCacheFileStatus(fs); } return this.localStatus; }
Source:
<code>public static void clear() { <START> synchronized <END> (ReportManager.class){ File root = Q7ReportingPlugin.getConfigStateLocation(); if (root.exists()) { FileUtil.deleteFiles(root.listFiles()); } } if (builder != null) { builder.unregisterProviders(); } builder = null; }</code><technical_language>need do this AUT startup, lets AtomicBoolean</technical_language>

Target:
public static void clear() { if(hasRun){ synchronized (ReportManager.class){ File root = Q7ReportingPlugin.getConfigStateLocation(); if (root.exists()) { FileUtil.deleteFiles(root.listFiles()); } hasRun = false; } } if (builder != null) { builder.unregisterProviders(); } builder = null; }
Source:
<code>protected void internalReceiveCommand(String itemName, Command command) { logger.debug("internalReceiveCommand({},{}) is called!", itemName, command); if(harmonyHubGateway == null){ <START> logger.warn("A command was receieved, but could not be executed as no Harmony Hub has been configured"); <END> return; } for (HarmonyHubBindingProvider provider : providers) { HarmonyHubBindingConfig config = provider.getHarmonyHubBindingConfig(itemName); if(config.getBindingType().getDirection() == HarmonyHubBindingDirection.IN){ logger.warn("item is not configured to send outbound commands! Please change to > or * in the binding"); continue; } switch(config.getBindingType()) { case PressButton: logger.debug("PressButton command:{} q:{} p1:{} p2:{}", command.toString(), config.getQualifier(), config.getParam1(), config.getParam2()); String cmd = config.getParam2(); if(cmd == null){ cmd = command.toString(); } try { harmonyHubGateway.pressButton(config.getQualifier(), Integer.parseInt(config.getParam1()), cmd); } catch (NumberFormatException ignored) { harmonyHubGateway.pressButton(config.getQualifier(), config.getParam1(), cmd); } break; case StartActivity: try { harmonyHubGateway.startActivity(config.getQualifier(), Integer.parseInt(config.getParam1())); } catch (NumberFormatException ignored) { harmonyHubGateway.startActivity(config.getQualifier(), config.getParam1()); } break; case CurrentActivity: harmonyHubGateway.startActivity(config.getQualifier(),command.toString()); break; default : break; } } }</code><technical_language>typo: received</technical_language>

Target:
protected void internalReceiveCommand(String itemName, Command command) { logger.debug("internalReceiveCommand({},{}) is called!", itemName, command); if(harmonyHubGateway == null){ logger.warn("A command was received, but could not be executed as no Harmony Hub has been configured"); return; } for (HarmonyHubBindingProvider provider : providers) { HarmonyHubBindingConfig config = provider.getHarmonyHubBindingConfig(itemName); if(config.getBindingType().getDirection() == HarmonyHubBindingDirection.IN){ logger.warn("item is not configured to send outbound commands! Please change to > or * in the binding"); continue; } switch(config.getBindingType()) { case PressButton: logger.debug("PressButton command:{} q:{} p1:{} p2:{}", command.toString(), config.getQualifier(), config.getParam1(), config.getParam2()); String cmd = config.getParam2(); if(cmd == null){ cmd = command.toString(); } try { harmonyHubGateway.pressButton(config.getQualifier(), Integer.parseInt(config.getParam1()), cmd); } catch (NumberFormatException ignored) { harmonyHubGateway.pressButton(config.getQualifier(), config.getParam1(), cmd); } break; case StartActivity: try { harmonyHubGateway.startActivity(config.getQualifier(), Integer.parseInt(config.getParam1())); } catch (NumberFormatException ignored) { harmonyHubGateway.startActivity(config.getQualifier(), config.getParam1()); } break; case CurrentActivity: harmonyHubGateway.startActivity(config.getQualifier(),command.toString()); break; default : break; } } }
Source:
<code>private MwPageService.MwPageEndpoints createMwService(Site site) { MwPageService.MwPageEndpoints webService; <START> webService = RestAdapterFactory.newInstance(site) <END> .create(MwPageService.MwPageEndpoints.class); return webService; }</code><technical_language>This line combined previous line</technical_language>

Target:
private MwPageService.MwPageEndpoints createMwService(Site site) { MwPageService.MwPageEndpoints webService = RestAdapterFactory.newInstance(site) .create(MwPageService.MwPageEndpoints.class); return webService; }
Source:
<code>public Attribute getAttributeValue(PerunSessionImpl sess, Resource resource, AttributeDefinition attributeDefinition) throws InternalErrorException { Attribute attribute = new Attribute(attributeDefinition); Set<String> allUniqueGroupNames = new HashSet<>(); Vo vo = sess.getPerunBl().getResourcesManagerBl().getVo(sess, resource); List<Group> assignedGroups = sess.getPerunBl().getResourcesManagerBl().getAssignedGroups(sess, resource); boolean isAssignedWithSubgroups; try { Attribute isAssignedWithSubgroupsAttribute = sess.getPerunBl().getAttributesManagerBl().getAttribute(sess, resource, A_R_isAssignedWithSubgroups); if(isAssignedWithSubgroupsAttribute.getValue() == null) { isAssignedWithSubgroups = false; } else { isAssignedWithSubgroups = isAssignedWithSubgroupsAttribute.valueAsBoolean(); } } catch (AttributeNotExistsException ex) { log.debug("There is missing definition of attribute {}", A_R_isAssignedWithSubgroups); isAssignedWithSubgroups = false; } catch (WrongAttributeAssignmentException ex) { throw new InternalErrorException(ex); } for(Group assignedGroup: assignedGroups) { allUniqueGroupNames.add(computeGroupName(vo, assignedGroup)); if(isAssignedWithSubgroups) { for(Group subgroup: sess.getPerunBl().getGroupsManagerBl().getAllSubGroups(sess, assignedGroup)) { allUniqueGroupNames.add(computeGroupName(vo, subgroup)); } } } <START> attribute.setValue(new ArrayList(allUniqueGroupNames)); <END> return attribute; }</code><technical_language>sort list of group names ensure consistent is returned request. I SortedSet do fly</technical_language>

Target:
public Attribute getAttributeValue(PerunSessionImpl sess, Resource resource, AttributeDefinition attributeDefinition) throws InternalErrorException { Attribute attribute = new Attribute(attributeDefinition); Set<String> allUniqueGroupNames = new HashSet<>(); Vo vo = sess.getPerunBl().getResourcesManagerBl().getVo(sess, resource); List<Group> assignedGroups = sess.getPerunBl().getResourcesManagerBl().getAssignedGroups(sess, resource); boolean isAssignedWithSubgroups; try { Attribute isAssignedWithSubgroupsAttribute = sess.getPerunBl().getAttributesManagerBl().getAttribute(sess, resource, A_R_isAssignedWithSubgroups); if(isAssignedWithSubgroupsAttribute.getValue() == null) { isAssignedWithSubgroups = false; } else { isAssignedWithSubgroups = isAssignedWithSubgroupsAttribute.valueAsBoolean(); } } catch (AttributeNotExistsException ex) { log.debug("There is missing definition of attribute {}", A_R_isAssignedWithSubgroups); isAssignedWithSubgroups = false; } catch (WrongAttributeAssignmentException ex) { throw new InternalErrorException(ex); } for(Group assignedGroup: assignedGroups) { allUniqueGroupNames.add(computeGroupName(vo, assignedGroup)); if(isAssignedWithSubgroups) { for(Group subgroup: sess.getPerunBl().getGroupsManagerBl().getAllSubGroups(sess, assignedGroup)) { allUniqueGroupNames.add(computeGroupName(vo, subgroup)); } } } List<String> allGroupNames = new ArrayList<>(allUniqueGroupNames); Collections.sort(allGroupNames); attribute.setValue(allGroupNames); return attribute; }
Source:
<code><START> public int compare(StreamInputReader a, StreamInputReader b) { <END> EventDefinition event_a = a.getCurrentEvent(); EventDefinition event_b = b.getCurrentEvent(); if (event_a == null || event_b == null) { throw new IllegalArgumentException(); } long ta = event_a.getTimestamp(); long tb = event_b.getTimestamp(); return Utils.unsignedCompare(ta, tb); }</code><technical_language>handle null in a Comparator is implementation-specific. Here, intention is in ordered list of StreamInputReader's, holds next event (lowest time stamp). a reader a null event considered greater a reader event. If readers a null event equal..</technical_language>

Target:
public int compare(StreamInputReader a, StreamInputReader b) { EventDefinition event_a = a.getCurrentEvent(); EventDefinition event_b = b.getCurrentEvent(); long ta = event_a.getTimestamp(); long tb = event_b.getTimestamp(); return Utils.unsignedCompare(ta, tb); }
Source:
<code>public DefaultIterationManager(TimeService timeService) { Caffeine<Object, Object> builder = Caffeine.newBuilder(); <START> builder.expireAfterAccess(1, TimeUnit.MINUTES).removalListener(new RemovalListener<Object, Object>() { <END> @Override public void onRemoval(Object key, Object value, RemovalCause cause) { ((IterationState)value).close(); } }).ticker(new TimeServiceTicker(timeService)).executor(new WithinThreadExecutor()); iterationStateMap = builder.build(); }</code><technical_language>I if increase 5 minutes? 1 minute a bit for a default change. this configurable some point</technical_language>

Target:
public DefaultIterationManager(TimeService timeService) { Caffeine<Object, Object> builder = Caffeine.newBuilder(); builder.expireAfterAccess(5, TimeUnit.MINUTES).removalListener(new RemovalListener<Object, Object>() { @Override public void onRemoval(Object key, Object value, RemovalCause cause) { ((IterationState)value).close(); log.removedUnclosedIterator(key.toString()); } }).ticker(new TimeServiceTicker(timeService)).executor(new WithinThreadExecutor()); iterationStateMap = builder.build(); }
Source:
<code>public static void rebootWipeUserData(Context context, boolean shutdown, String reason, boolean force, boolean wipeEuicc) throws IOException { UserManager um = (UserManager) context.getSystemService(Context.USER_SERVICE); if (!force && um.hasUserRestriction(UserManager.DISALLOW_FACTORY_RESET)) { throw new SecurityException("Wiping data is not allowed for this user."); } final ConditionVariable condition = new ConditionVariable(); Intent intent = new Intent("android.intent.action.MASTER_CLEAR_NOTIFICATION"); intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); context.sendOrderedBroadcastAsUser(intent, UserHandle.SYSTEM, android.Manifest.permission.MASTER_CLEAR, new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { condition.open(); } }, null, 0, null, null); condition.block(); if (wipeEuicc) { wipeEuiccData(context, PACKAGE_NAME_WIPING_EUICC_DATA_CALLBACK); } String shutdownArg = null; if (shutdown) { shutdownArg = "--shutdown_after"; } String reasonArg = null; if (!TextUtils.isEmpty(reason)) { <START> Calendar calendar = Calendar.getInstance(); <END> String timeStamp = DateFormat.format("yyyy-MM-dd HH:mm:ssZ", calendar).toString(); reasonArg = "--reason=" + sanitizeArg(reason + "," + timeStamp); } final String localeArg = "--locale=" + Locale.getDefault().toLanguageTag() ; bootCommand(context, shutdownArg, "--wipe_data", reasonArg, localeArg); }</code><technical_language>a Calendar System.currentTimeMillis</technical_language>

Target:
public static void rebootWipeUserData(Context context, boolean shutdown, String reason, boolean force, boolean wipeEuicc) throws IOException { UserManager um = (UserManager) context.getSystemService(Context.USER_SERVICE); if (!force && um.hasUserRestriction(UserManager.DISALLOW_FACTORY_RESET)) { throw new SecurityException("Wiping data is not allowed for this user."); } final ConditionVariable condition = new ConditionVariable(); Intent intent = new Intent("android.intent.action.MASTER_CLEAR_NOTIFICATION"); intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); context.sendOrderedBroadcastAsUser(intent, UserHandle.SYSTEM, android.Manifest.permission.MASTER_CLEAR, new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { condition.open(); } }, null, 0, null, null); condition.block(); if (wipeEuicc) { wipeEuiccData(context, PACKAGE_NAME_WIPING_EUICC_DATA_CALLBACK); } String shutdownArg = null; if (shutdown) { shutdownArg = "--shutdown_after"; } String reasonArg = null; if (!TextUtils.isEmpty(reason)) { String timeStamp = DateFormat.format("yyyy-MM-ddTHH:mm:ssZ", System.currentTimeMillis()).toString(); reasonArg = "--reason=" + sanitizeArg(reason + "," + timeStamp); } final String localeArg = "--locale=" + Locale.getDefault().toLanguageTag() ; bootCommand(context, shutdownArg, "--wipe_data", reasonArg, localeArg); }
Source:
<code>protected void validateDomain(Set<ArtifactCoordinates> domains) throws ValidationException { checkArgument(domains != null, "Set of domains should not be null"); if (!domains.stream() .allMatch(artifactCoordinates -> StringUtils.equals(artifactCoordinates.getClassifier(), MULE_DOMAIN.toString()))) { String message = "Not all dependencies are mule domains"; throw new ValidationException(message); } if (domains.size() != DOMAIN_BUNDLE_VALID_NUMBER_OF_DOMAINS) { String message = "A mule domain bundle must contain exactly one mule domain. "; <START> if (domains.size() == 0) { <END> message += "However, the project has no reference to domains in its dependencies."; } else { message += "However, the project has reference to the following domains: " + domains.stream().collect(Collectors.toList()); } throw new ValidationException(message); } }</code><technical_language>domains.size() -> domains.isEmpty()</technical_language>

Target:
protected void validateDomain(Set<ArtifactCoordinates> domains) throws ValidationException { checkArgument(domains != null, "Set of domains should not be null"); if (!domains.stream() .allMatch(artifactCoordinates -> StringUtils.equals(artifactCoordinates.getClassifier(), MULE_DOMAIN.toString()))) { String message = "Not all dependencies are mule domains"; throw new ValidationException(message); } if (domains.size() != DOMAIN_BUNDLE_VALID_NUMBER_OF_DOMAINS) { String message = "A mule domain bundle must contain exactly one mule domain. "; if (domains.isEmpty()) { message += "However, the project has no reference to domains in its dependencies."; } else { message += "However, the project has reference to the following domains: " + domains.stream().collect(Collectors.toList()); } throw new ValidationException(message); } }
Source:
<code>public RMStateDTO cloneAndFilter(long filter) { long actualFilter = computeActualFilter(filter); final List<RMEvent> responseEvents = events.getSortedItems() <START> .tailSet(new RMEvent(actualFilter + 1)) END> .stream() .limit(PAResourceManagerProperties.RM_REST_MONITORING_MAXIMUM_CHUNK_SIZE.getValueAsInt()) .collect(Collectors.toList()); RMStateDTO response = new RMStateDTO(); response.setNodeSource(getNodeSource(responseEvents)); response.setNodesEvents(getNodesEvents(responseEvents)); response.setLatestCounter(Math.max(actualFilter, findLargestCounter(responseEvents))); return response; }</code><technical_language>Instead of adding here, computeActualFilter return includes element of tailSet</technical_language>

Target:
public RMStateDelta cloneAndFilter(long filter) { long actualFilter = computeActualFilter(filter); final List<RMEvent> responseEvents = events.getSortedItems() .tailSet(new RMEvent(actualFilter + 1)) .stream() .limit(PAResourceManagerProperties.RM_REST_MONITORING_MAXIMUM_CHUNK_SIZE.getValueAsInt()) .collect(Collectors.toList()); RMStateDelta response = new RMStateDelta(); response.setNodeSource(getNodeSourceEvents(responseEvents)); response.setNodesEvents(getNodeEvents(responseEvents)); response.setLatestCounter(Math.max(actualFilter, findLargestCounter(responseEvents))); return response; }
Source:
<code>private OverlayKey findOverlayKey(String key) { for (OverlayKey <START> fOverlayKey : <END> fOverlayKeys) { if (fOverlayKey.fKey.equals(key)) return fOverlayKey; } return null; }</code><technical_language>rename key</technical_language>

Target:
private OverlayKey findOverlayKey(String key) { for (OverlayKey overlayKey : fOverlayKeys) { if (overlayKey.fKey.equals(key)) return overlayKey; } return null; }
Source:
<code>protected Control createPageControls(final Composite parent) { setTitle(Messages.CherryPickDialog_Cherry_Pick); setMessage(NLS.bind(Messages.CherryPickDialog_Change_X_Set_Y, task.getTaskId(), patchSet.getPatchSetId())); Composite composite = new Composite(parent, SWT.NONE); <START> composite.setLayout(new GridLayout(1, false)); <END> Label branchlabel = new Label(composite, SWT.NONE); branchlabel.setText(NLS.bind(Messages.CherryPickDialog_Cherry_Pick_to_Branch, patchSet.getRefName())); destination = new Text(composite, SWT.SINGLE | SWT.LEFT | SWT.BORDER); GridDataFactory.swtDefaults().align(SWT.FILL, SWT.FILL).applyTo(destination); Label commitLabel = new Label(composite, SWT.NONE); commitLabel.setText(NLS.bind(Messages.CherryPickDialog_Cherry_Pick_Commit_Message, patchSet.getRefName())); commitMessage = createRichTextEditor(composite, ""); GridDataFactory.fillDefaults().grab(true, true).hint(400, 100).applyTo(commitMessage.getControl()); commitMessage.setText(NLS.bind(Messages.CherryPickDialog_Cherry_Pick_Commit_Message_Template, getCleanTitle(), getChangeId())); destination.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { dialogUpdated(); } }); commitMessage.getViewer().addTextListener(new ITextListener() { @Override public void textChanged(TextEvent event) { dialogUpdated(); } }); destination.setFocus(); return composite; }</code><technical_language>GridLayoutFactory instead</technical_language>

Target:
protected Control createPageControls(final Composite parent) { setTitle(Messages.CherryPickDialog_Cherry_Pick); setMessage(NLS.bind(Messages.CherryPickDialog_Change_X_Set_Y, task.getTaskId(), patchSet.getPatchSetId())); Composite composite = new Composite(parent, SWT.NONE); GridLayoutFactory.swtDefaults().applyTo(composite); Label branchlabel = new Label(composite, SWT.NONE); branchlabel.setText(NLS.bind(Messages.CherryPickDialog_Cherry_Pick_to_Branch, patchSet.getRefName())); destination = new Text(composite, SWT.SINGLE | SWT.LEFT | SWT.BORDER); GridDataFactory.swtDefaults().align(SWT.FILL, SWT.FILL).applyTo(destination); Label commitLabel = new Label(composite, SWT.NONE); commitLabel.setText(NLS.bind(Messages.CherryPickDialog_Cherry_Pick_Commit_Message, patchSet.getRefName())); commitMessage = createRichTextEditor(composite, ""); GridDataFactory.fillDefaults().grab(true, true).hint(400, 100).applyTo(commitMessage.getControl()); commitMessage.setText(change.getPatchSetDetails().get(0).getInfo().getMessage()); destination.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { dialogUpdated(); } }); commitMessage.getViewer().addTextListener(new ITextListener() { @Override public void textChanged(TextEvent event) { dialogUpdated(); } }); destination.setFocus(); return composite; }
Source:
<code>protected void refreshDisplayLabels() { <START> IAxis xAxis = getChart().getAxisSet().getXAxis(0); <END> if (!xAxis.getTick().isVisible()) { return; } Rectangle rect = getChart().getClientArea(); int lengthLimit = (int) (rect.height * 0.40); GC gc = new GC(getParent()); gc.setFont(xAxis.getTick().getFont()); if (fXStringMap.size() > 0) { String longestString = fXStringMap.keySet().stream() .max(Comparator.comparingInt(String::length)) .orElse(fXStringMap.keySet().iterator().next()); Point pixels = gc.stringExtent(longestString); int cutLen = 5; if (pixels.x > lengthLimit) { for (Entry<String, Integer> entry : fXStringMap.entrySet()) { String reference = checkNotNull(entry.getKey()); if (reference.length() > cutLen) { String key = reference.substring(0, cutLen) + ELLIPSIS; fVisibleXMap.remove(reference); fVisibleXMap.put(key, entry.getValue()); } else { fVisibleXMap.inverse().remove(entry.getValue()); fVisibleXMap.put(reference, entry.getValue()); } } } else { resetBiMap(fXStringMap, fVisibleXMap); } for (IAxis axis : getChart().getAxisSet().getXAxes()) { IAxisTick tick = axis.getTick(); tick.setFormat(new LabelFormat(fVisibleXMap)); } } gc.dispose(); }</code><technical_language>cache</technical_language>

Target:
protected void refreshDisplayLabels() { Chart chart = getChart(); IAxisSet axisSet = chart.getAxisSet(); IAxis xAxis = axisSet.getXAxis(0); if (!xAxis.getTick().isVisible()) { return; } Rectangle rect = chart.getClientArea(); int lengthLimit = (int) (rect.height * 0.40); GC gc = new GC(getParent()); gc.setFont(xAxis.getTick().getFont()); if (fXStringMap.size() > 0) { String longestString = fXStringMap.keySet().stream() .max(Comparator.comparingInt(String::length)) .orElse(fXStringMap.keySet().iterator().next()); Point pixels = gc.stringExtent(longestString); int cutLen = 5; if (pixels.x > lengthLimit) { for (Entry<String, Integer> entry : fXStringMap.entrySet()) { String reference = checkNotNull(entry.getKey()); if (reference.length() > cutLen) { String key = reference.substring(0, cutLen) + ELLIPSIS; fVisibleXMap.remove(reference); fVisibleXMap.put(key, entry.getValue()); } else { fVisibleXMap.inverse().remove(entry.getValue()); fVisibleXMap.put(reference, entry.getValue()); } } } else { resetBiMap(fXStringMap, fVisibleXMap); } for (IAxis axis : axisSet.getXAxes()) { IAxisTick tick = axis.getTick(); tick.setFormat(new LabelFormat(fVisibleXMap)); } } gc.dispose(); }
Source:
<code><START> private static boolean monoNativeFailure(Either<Utils.CommandResult> result) { <END> if (result == null || !result.isSuccess()) { return true; } else { Utils.CommandResult commandResult = result.get(); return monoNativeFailure(commandResult.output) || monoNativeFailure(commandResult.error); } }</code><technical_language>check for start of file newline also</technical_language>

Target:
static boolean monoNativeFailure(Either<Utils.CommandResult> result) { if (result == null || !result.isSuccess()) { return true; } else { Utils.CommandResult commandResult = result.get(); return monoNativeFailure(commandResult.output) || monoNativeFailure(commandResult.error); } }
Source:
<code>protected boolean validateStorageDomains() { final List<DiskImage> <START> disksList = <END> getSourceImages(); MultipleStorageDomainsValidator storageDomainsValidator = getStorageDomainsValidator(getStoragePoolId(), getStorageDomainsIds()); return validate(storageDomainsValidator.allDomainsExistAndActive()) && validate(storageDomainsValidator.allDomainsWithinThresholds()) && validate(storageDomainsValidator.allDomainsHaveSpaceForMerge(getSnapshotsForFreeSpaceValidation(disksList))); }</code><technical_language>diskLists is in getSnapshotsFroFreeSpaceValidation created</technical_language>

Target:
protected boolean validateStorageDomains() { MultipleStorageDomainsValidator storageDomainsValidator = getStorageDomainsValidator(getStoragePoolId(), getStorageDomainsIds()); return validate(storageDomainsValidator.allDomainsExistAndActive()) && validate(storageDomainsValidator.allDomainsWithinThresholds()) && validate(storageDomainsValidator.allDomainsHaveSpaceForMerge(getAllDisksSnapshot(getSourceImages()))); }
Source:
<code>public CachedSchemaRegistryClientBuilder endpoint(String schemaRegistryUrl) { <START> Objects.requireNonNull(schemaRegistryUrl, "'endpoint' cannot be null."); <END> try { new URL(schemaRegistryUrl); } catch (MalformedURLException ex) { throw logger.logExceptionAsWarning(new IllegalArgumentException("'endpoint' must be a valid URL.", ex)); } if (schemaRegistryUrl.endsWith("/")) { this.schemaRegistryUrl = schemaRegistryUrl.substring(0, schemaRegistryUrl.length() - 1); } else { this.schemaRegistryUrl = schemaRegistryUrl; } return this; }</code><technical_language>suggestion Objects.requireNonNull(schemaRegistryUrl, "'schemaRegistryUrl' null.");</technical_language>

Target:
public CachedSchemaRegistryClientBuilder endpoint(String schemaRegistryUrl) { Objects.requireNonNull(schemaRegistryUrl, "'schemaRegistryUrl' cannot be null."); try { new URL(schemaRegistryUrl); } catch (MalformedURLException ex) { throw logger.logExceptionAsWarning( new IllegalArgumentException("'schemaRegistryUrl' must be a valid URL.", ex)); } if (schemaRegistryUrl.endsWith("/")) { this.schemaRegistryUrl = schemaRegistryUrl.substring(0, schemaRegistryUrl.length() - 1); } else { this.schemaRegistryUrl = schemaRegistryUrl; } return this; }
Source:
<code>public Map<String, String> getWorkflowVariablesFromPathSegment(PathSegment pathSegment) { Map<String, String> variables = null; MultivaluedMap<String, String> matrixParams = pathSegment.getMatrixParameters(); <START> matrixParams.remove(""); <END> if (matrixParams != null && !matrixParams.isEmpty()) { variables = Maps.newHashMap(); for (String key : matrixParams.keySet()) { String value = matrixParams.getFirst(key) == null ? "" : matrixParams.getFirst(key); variables.put(key, value); } } return variables; }</code><technical_language>please move this statement if, matricParams null</technical_language>

Target:
public Map<String, String> getWorkflowVariablesFromPathSegment(PathSegment pathSegment) { Map<String, String> variables = null; MultivaluedMap<String, String> matrixParams = pathSegment.getMatrixParameters(); if (matrixParams != null && !matrixParams.isEmpty()) { matrixParams.remove(""); variables = Maps.newHashMap(); for (String key : matrixParams.keySet()) { String value = matrixParams.getFirst(key) == null ? "" : matrixParams.getFirst(key); variables.put(key, value); } } return variables; }
Source:
<code>private static View findBestView(Activity activity) { if (activity instanceof PageActivity) { return activity.findViewById(R.id.page_contents_container); } else { <START> return activity.findViewById(android.R.id.content); <END> } }</code><technical_language>reason this used</technical_language>

Target:
private static View findBestView(Activity activity) { if (activity instanceof PageActivity && ((PageActivity) activity).getCurPageFragment() != null) { return activity.findViewById(R.id.page_contents_container); } else { return activity.findViewById(android.R.id.content); } }
Source:
<code>protected Mono<Void> handleMessageInternal(Message<?> message) { Assert.isTrue(this.initialized, "This class is not yet initialized. Invoke its afterPropertiesSet() method"); <START> String collectionName = this.collectionNameExpression.getValue(this.evaluationContext, message, String.class); <END> Assert.notNull(collectionName, "'collectionNameExpression' must not evaluate to null"); Object payload = message.getPayload(); return this.mongoTemplate.save(payload, collectionName).then(); }</code><technical_language>I move collection calculation reactive stream processing: return Mono.fromSupplier(() -> this.collectionNameExpression.getValue(this.evaluationContext, message, String.class)) .flatMap((collection) -> this.mongoTemplate.save(payload, collectionName)) .then(); a simple operation, block a sending thread</technical_language>

Target:
protected Mono<Void> handleMessageInternal(Message<?> message) { Assert.isTrue(this.initialized, "This class is not yet initialized. Invoke its afterPropertiesSet() method"); return evaluateCollectionNameExpression(message) .flatMap(collection -> this.mongoTemplate.save(message.getPayload(), collection)) .then(); }
Source:
<code>public static List<DataType> typeView(List<? extends Symbol> symbols) { <START> return Lists2.map(symbols, Symbol::valueType); <END> }</code><technical_language>a case for mapLazy, change function name, View implied structure is lazy</technical_language>

Target:
public static List<DataType> typeView(List<? extends Symbol> symbols) { return LazyMapList.of(symbols, Symbol::valueType); }
Source:
<code>protected String doInBackground(ResponseBody... urls) { <START> saveToDisk(urls[0], "fr.openfoodfacts.org.products.small.zip"); <END> return null; }</code><technical_language>turn a non-translatable string work Open Beauty Facts other variants</technical_language>

Target:
protected String doInBackground(ResponseBody... urls) { saveToDisk(urls[0], url); return null; }
Source:
<code>private Map<Integer, Vector> copyMap(final Map<Integer, Vector> toCopy) { final Map<Integer, Vector> copied = new HashMap<>(toCopy.size()); <START> toCopy.forEach((integer, vectorEntries) -> copied.put(integer, vectorEntries.copy())); <END> return copied; }</code><technical_language>Typically Entry of map means a pair of key value. more accurate replacing vectorEntries vector</technical_language>

Target:
private Map<Integer, Vector> copyMap(final Map<Integer, Vector> toCopy) { final Map<Integer, Vector> copied = new HashMap<>(toCopy.size()); toCopy.forEach((integer, vector) -> copied.put(integer, vector.copy())); return copied; }
Source:
<code>public void addRecipients(ExtendedEmailPublisherContext context, EnvVars env, Set<InternetAddress> to, Set<InternetAddress> cc, Set<InternetAddress> bcc) { ExtendedEmailPublisherDescriptor descriptor = Jenkins.getInstance().getDescriptorByType(ExtendedEmailPublisherDescriptor.class); Set<User> users = new HashSet<User>(); if (context.getRun() instanceof AbstractBuild) { AbstractBuild<?, ?> build = (AbstractBuild) context.getRun(); <START> for (ChangeLogSet.Entry change : build.getChangeSet()) { <END> users.add(change.getAuthor()); } } for (User user : users) { if (!EmailRecipientUtils.isExcludedRecipient(user, context.getListener())) { String userAddress = EmailRecipientUtils.getUserConfiguredEmail(user); if (userAddress != null) { descriptor.debug(context.getListener().getLogger(), "Adding user address %s, they were not considered an excluded committer", userAddress); EmailRecipientUtils.addAddressesFromRecipientList(to, cc, bcc, userAddress, env, context.getListener()); } else { context.getListener().getLogger().println("Failed to send e-mail to " + user.getFullName() + " because no e-mail address is known, and no default e-mail domain is configured"); } } } }</code><technical_language>getChangeSets reflection, pending [JENKINS-24141](<LINK_0></technical_language>

Target:
public void addRecipients(ExtendedEmailPublisherContext context, EnvVars env, Set<InternetAddress> to, Set<InternetAddress> cc, Set<InternetAddress> bcc) { ExtendedEmailPublisherDescriptor descriptor = Jenkins.getActiveInstance().getDescriptorByType(ExtendedEmailPublisherDescriptor.class); Set<User> users = new HashSet<User>(); if (context.getRun() instanceof AbstractBuild) { AbstractBuild<?, ?> build = (AbstractBuild) context.getRun(); for (ChangeLogSet.Entry change : build.getChangeSet()) { users.add(change.getAuthor()); } } for (User user : users) { if (!EmailRecipientUtils.isExcludedRecipient(user, context.getListener())) { String userAddress = EmailRecipientUtils.getUserConfiguredEmail(user); if (userAddress != null) { descriptor.debug(context.getListener().getLogger(), "Adding user address %s, they were not considered an excluded committer", userAddress); EmailRecipientUtils.addAddressesFromRecipientList(to, cc, bcc, userAddress, env, context.getListener()); } else { context.getListener().getLogger().println("Failed to send e-mail to " + user.getFullName() + " because no e-mail address is known, and no default e-mail domain is configured"); } } } }