auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void initialize(BatchJoinerRuntimeContext context) { FailureCollector collector = context.getFailureCollector(); Map<String, Schema> inputSchemas = context.getInputSchemas(); init(inputSchemas, collector); collector.getOrThrowException(); outputSchema = getOutputSchema(inputSchemas, collector); if (outputSchema == null) { outputSchema = conf.getOutputSchema(collector); <START> if (outputSchema == null) { <END> collector.addFailure("Output schema must be specified", null).withConfigProperty(conf.OUTPUT_SCHEMA); } } collector.getOrThrowException(); }</code><technical_language>this null, validated in configurePipeline() method</technical_language>

Target:
public void initialize(BatchJoinerRuntimeContext context) { FailureCollector collector = context.getFailureCollector(); Map<String, Schema> inputSchemas = context.getInputSchemas(); init(inputSchemas, collector); collector.getOrThrowException(); outputSchema = getOutputSchema(inputSchemas, collector); collector.getOrThrowException(); }
Source:
<code>ReviewNoteHeaderFormatter(TimeZone tz) { rfc2822DateFormatter = <START> new SimpleDateFormat("dd MMM yyyy HH:mm:ss Z", Locale.US); <END> rfc2822DateFormatter.setCalendar(Calendar.getInstance(tz, Locale.US)); }</code><technical_language>Missing day-of-week start of format pattern</technical_language>

Target:
ReviewNoteHeaderFormatter(TimeZone tz) { rfc2822DateFormatter = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z", Locale.US); rfc2822DateFormatter.setCalendar(Calendar.getInstance(tz, Locale.US)); }
Source:
<code>public ContentBuffer(ContentResolver contentResolver, ContentWriter contentWriter, ItemsPeopleWriter peopleWriter) { <START> this.resolver = Preconditions.checkNotNull(contentResolver); <END> this.writer = Preconditions.checkNotNull(contentWriter); this.peopleWriter = Preconditions.checkNotNull(peopleWriter); }</code><technical_language>static import</technical_language>

Target:
public ContentBuffer(ContentResolver contentResolver, ContentWriter contentWriter, ItemsPeopleWriter peopleWriter) { this.resolver = checkNotNull(contentResolver); this.writer = checkNotNull(contentWriter); this.peopleWriter = checkNotNull(peopleWriter); }
Source:
<code>public void invalidateCaches(Collection<Integer> recordIds) { List<Pair<String, String[]>> whereParamList = TableBuilder.sqlList(recordIds); int removed = 0; for (Pair<String, String[]> querySet : whereParamList) { <START> removed += db.delete(TABLE_NAME, COL_APP_ID + " = '" + mAppId + "' AND " + <END> COL_CACHE_NAME + " = '" + mCacheName + "' AND " + COL_ENTITY_KEY + " IN " + querySet.first, querySet.second); } if (SqlStorage.STORAGE_OUTPUT_DEBUG) { Log.d(TAG, "Invalidated " + removed + " cached values for bulk entities"); } }</code><technical_language>counterintuitively, I this specific call app restricted. If case model changes, invalidate caches case model of app produced them</technical_language>

Target:
public void invalidateCaches(Collection<Integer> recordIds) { List<Pair<String, String[]>> whereParamList = TableBuilder.sqlList(recordIds); int removed = 0; for (Pair<String, String[]> querySet : whereParamList) { removed += db.delete(TABLE_NAME, COL_CACHE_NAME + " = '" + mCacheName + "' AND " + COL_ENTITY_KEY + " IN " + querySet.first, querySet.second); } if (SqlStorage.STORAGE_OUTPUT_DEBUG) { Log.d(TAG, "Invalidated " + removed + " cached values for bulk entities"); } }
Source:
<code><START> public void onConnect(Channel channel) { <END> log.info("CONNECTED to " + host + ":" + port); synchronized(channelSync) { this.channel = channel; } }</code><technical_language>I dislike callbacks part of public interface of a class other responsibilities receiving callbacks. This class a two-sided interface - e.g. submitLogEvent() side, onConnect() other side, a client side - - complete "union" API. sides much! Consider (possibly anonymous) classes for interface TimberClientHandler</technical_language>

Target:
public void onConnect(Channel channel) { log.info("Client connected to " + host + ":" + port); synchronized(channelSync) { this.channel = channel; } }
Source:
<code>void test_getAbbreviatedName_TooLongHint(){ <START> final String className = "java.lang.String"; <END> Assertions.assertSame(className, ClassUtils.getAbbreviatedName(className, className.length()+1)); Assertions.assertSame(className, ClassUtils.getAbbreviatedName(className, className.length())); }</code><technical_language>change visibility of test classes methods please</technical_language>

Target:
public void test_getAbbreviatedName_TooLongHint(){ final String className = "java.lang.String"; Assertions.assertSame(className, ClassUtils.getAbbreviatedName(className, className.length()+1)); Assertions.assertSame(className, ClassUtils.getAbbreviatedName(className, className.length())); }
Source:
<code><START> public Condition getConditionByUuid(String uuid) { <END> if(log.isInfoEnabled()){ log.info("Getting condition with uuid " + uuid); } return conditionDAO.getConditionByUuid(uuid); }</code><technical_language>This is unncessary</technical_language>

Target:
public Condition getConditionByUuid(String uuid) { return conditionDAO.getConditionByUuid(uuid); }
Source:
<code>public String show(Request request, Response response) throws IOException { <START> ArtifactStore artifactStore = getEntityFromConfig(request.params("store_id")); <END> if (isGetOrHeadRequestFresh(request, artifactStore)) { return notModified(response); } else { setEtagHeader(artifactStore, response); return writerForTopLevelObject(request, response, writer -> ArtifactStoreRepresenter.toJSON(writer, artifactStore)); } }</code><technical_language>this called id instead of store_id? a param matter called I suppose, but, id is key in response</technical_language>

Target:
public String show(Request request, Response response) throws IOException { ArtifactStore artifactStore = getEntityFromConfig(request.params(ID_PARAM)); if (isGetOrHeadRequestFresh(request, artifactStore)) { return notModified(response); } else { setEtagHeader(artifactStore, response); return writerForTopLevelObject(request, response, writer -> ArtifactStoreRepresenter.toJSON(writer, artifactStore)); } }
Source:
<code>public @Nonnull FormValidation doCheckNewName(@QueryParameter String newName) { <START> if (!isNameEditable()) { <END> return FormValidation.error("This item has not an editable name."); } if (!hasPermission(Item.CONFIGURE)) { if (parent instanceof AccessControlled) { ((AccessControlled)parent).checkPermission(Item.CREATE); } checkPermission(Item.DELETE); } newName = newName == null ? null : newName.trim(); try { Jenkins.checkGoodName(newName); assert newName != null; if (newName.equals(name)) { return FormValidation.warning(Messages.AbstractItem_NewNameUnchanged()); } Jenkins.get().getProjectNamingStrategy().checkName(newName); checkIfNameIsUsed(newName); checkRename(newName); } catch (Failure e) { return FormValidation.error(e.getMessage()); } return FormValidation.ok(); }</code><technical_language>needed? is a dry-run, use-cases name is editable</technical_language>

Target:
public @Nonnull FormValidation doCheckNewName(@QueryParameter String newName) { if (!isNameEditable()) { return FormValidation.error("Trying to rename an item that does not support this operation."); } if (!hasPermission(Item.CONFIGURE)) { if (parent instanceof AccessControlled) { ((AccessControlled)parent).checkPermission(Item.CREATE); } checkPermission(Item.DELETE); } newName = newName == null ? null : newName.trim(); try { Jenkins.checkGoodName(newName); assert newName != null; if (newName.equals(name)) { return FormValidation.warning(Messages.AbstractItem_NewNameUnchanged()); } Jenkins.get().getProjectNamingStrategy().checkName(newName); checkIfNameIsUsed(newName); checkRename(newName); } catch (Failure e) { return FormValidation.error(e.getMessage()); } return FormValidation.ok(); }
Source:
<code>public synchronized XmlXYDataProvider getXyProvider(@NonNull ITmfTrace trace, @NonNull Element viewElement) { if (fXyProviders.contains(trace, viewElement)) { return fXyProviders.get(trace, viewElement); } Set<String> <START> analysisIds = TmfXmlUtils.getViewAnalysisIds(viewElement); <END> Element entry = TmfXmlUtils.getChildElements(viewElement, TmfXmlStrings.ENTRY_ELEMENT).get(0); XmlXYDataProvider provider = XmlXYDataProvider.create(trace, analysisIds, entry); fXyProviders.put(trace, viewElement, provider); return provider; }</code><technical_language>miss some nonNull annotation</technical_language>

Target:
public synchronized XmlXYDataProvider getXyProvider(@NonNull ITmfTrace trace, @NonNull Element viewElement) { if (fXyProviders.contains(trace, viewElement)) { return fXyProviders.get(trace, viewElement); } @NonNull Set<@NonNull String> analysisIds = TmfXmlUtils.getViewAnalysisIds(viewElement); Element entry = TmfXmlUtils.getChildElements(viewElement, TmfXmlStrings.ENTRY_ELEMENT).get(0); XmlXYDataProvider provider = XmlXYDataProvider.create(trace, analysisIds, entry); fXyProviders.put(trace, viewElement, provider); return provider; }
Source:
<code>public void shouldFailUpdateMainContentAlreadyInColdStorage() throws IOException { DocumentModel documentModel = createFileDocument(DEFAULT_DOC_NAME, true); moveAndVerifyContent(session, documentModel); documentModel = session.getDocument(documentModel.getRef()); documentModel.setPropertyValue(ColdStorageHelper.FILE_CONTENT_PROPERTY, (Serializable) Blobs.createBlob(FILE_CONTENT)); try { session.saveDocument(documentModel); fail("Should fail because a main content document in cold storage cannot be updated."); } catch (NuxeoException e) { assertEquals(SC_FORBIDDEN, e.getStatusCode()); assertEquals( String.format("The main content of document: %s cannot be updated. It's already in cold storage.", documentModel.getId()), e.getMessage()); } <START> documentModel = session.getDocument(documentModel.getRef()); <END> documentModel.setPropertyValue("dc:title", "I update the title"); documentModel.setPropertyValue("dc:description", "I add a description"); var attachments = List.of(Map.of("file", Blobs.createBlob("bar", "text/plain"))); documentModel.setPropertyValue("files:files", (Serializable) attachments); documentModel = session.saveDocument(documentModel); assertEquals("I update the title", documentModel.getPropertyValue("dc:title")); assertEquals("I add a description", documentModel.getPropertyValue("dc:description")); attachments = (List<Map<String, Blob>>) documentModel.getPropertyValue("files:files"); assertEquals(1, attachments.size()); assertNotNull(attachments.get(0).get("file")); assertEquals("bar", attachments.get(0).get("file").getString()); }</code><technical_language>necessary I</technical_language>

Target:
public void shouldFailUpdateMainContentAlreadyInColdStorage() throws IOException { DocumentModel documentModel = createFileDocument(DEFAULT_DOC_NAME, true); moveAndVerifyContent(session, documentModel); documentModel.refresh(); documentModel.setPropertyValue(ColdStorageHelper.FILE_CONTENT_PROPERTY, (Serializable) Blobs.createBlob(FILE_CONTENT)); try { session.saveDocument(documentModel); fail("Should fail because a main content document in cold storage cannot be updated."); } catch (NuxeoException e) { assertEquals(SC_FORBIDDEN, e.getStatusCode()); assertEquals( String.format("The main content of document: %s cannot be updated. It's already in cold storage.", documentModel), e.getMessage()); } documentModel.refresh(); documentModel.setPropertyValue("dc:title", "I update the title"); documentModel.setPropertyValue("dc:description", "I add a description"); var attachments = List.of(Map.of("file", Blobs.createBlob("bar", "text/plain"))); documentModel.setPropertyValue("files:files", (Serializable) attachments); documentModel = session.saveDocument(documentModel); assertEquals("I update the title", documentModel.getPropertyValue("dc:title")); assertEquals("I add a description", documentModel.getPropertyValue("dc:description")); var actualAttachments = (List<Map<String, Blob>>) documentModel.getPropertyValue("files:files"); assertTrue(CollectionUtils.isEqualCollection(attachments, actualAttachments)); }
Source:
<code>Map createRequestDataMap(Stage stage) { Map<String, Object> data = new LinkedHashMap<String, Object>(); data.put("pipeline-name", stage.getIdentifier().getPipelineName()); data.put("pipeline-counter", new Integer(stage.getIdentifier().getPipelineCounter()).toString()); data.put("stage-name", stage.getIdentifier().getStageName()); data.put("stage-counter", stage.getIdentifier().getStageCounter()); data.put("stage-state", stage.getState().toString()); data.put("stage-result", stage.getResult().toString()); <START> Pipeline pipeline = pipelineService.fullPipelineById(stage.getPipelineId()); <END> Map<String, Object> pipelineMap = createPipelineDataMap(pipeline); data.put("pipeline", pipelineMap); return data; }</code><technical_language>This is a cached call. I problematic. [pipelineWithModsByStageId](<LINK_0> instead</technical_language>

Target:
Map createRequestDataMap(Stage stage) { Map<String, Object> data = new LinkedHashMap<String, Object>(); String pipelineName = stage.getIdentifier().getPipelineName(); Integer pipelineCounter = new Integer(stage.getIdentifier().getPipelineCounter()); Map<String, Object> pipelineMap = createPipelineDataMap(pipelineName, pipelineCounter, stage); data.put("pipeline", pipelineMap); return data; }
Source:
<code>public Iterable<Branch> iterate() { return new MkIterable<Branch>( this.storage, String.format("%s/branch", this.xpath()), new MkIterable.Mapping<Branch>() { @Override public Branch map(final XML xml) { return new MkBranch( MkBranches.this.storage, MkBranches.this.self, MkBranches.this.coords, xml.xpath("@name").get(0), <START> xml.xpath(XPATH_TO_SHA).get(0) <END> ); } } ); }</code><technical_language>@cvrebert MkBranches.XPATH_TO_SHA</technical_language>

Target:
public Iterable<Branch> iterate() { return new MkIterable<Branch>( this.storage, String.format("%s/branch", this.xpath()), new MkIterable.Mapping<Branch>() { @Override public Branch map(final XML xml) { return new MkBranch( MkBranches.this.storage, MkBranches.this.self, MkBranches.this.coords, xml.xpath("@name").get(0), xml.xpath(MkBranches.XPATH_TO_SHA).get(0) ); } } ); }
Source:
<code>public static void reload(GerritClient gerrit, ChangeInfo toRefresh) { ChangeInfo newChangeInfo = QueryHelpers.queryMessageTab(gerrit, toRefresh.getId()); toRefresh.set_number(newChangeInfo.get_number()); toRefresh.setChange_id(newChangeInfo.getChange_id()); toRefresh.setStatus(newChangeInfo.getStatus()); toRefresh.setStarred(newChangeInfo.isStarred()); toRefresh.setSubject(newChangeInfo.getSubject()); toRefresh.setCreated(newChangeInfo.getCreated()); toRefresh.setUpdated(newChangeInfo.getUpdated()); toRefresh.setReviewed(newChangeInfo.isReviewed()); toRefresh.setMergeable(newChangeInfo.isMergeable()); toRefresh.setInsertions(newChangeInfo.getInsertions()); toRefresh.setDeletions(newChangeInfo.getDeletions()); toRefresh.setCurrent_revision(newChangeInfo.getCurrent_revision()); toRefresh.setTopic(newChangeInfo.getTopic()); <START> toRefresh.setMergeable(newChangeInfo.isMergeable()); <END> toRefresh.getLabels().clear(); toRefresh.getLabels().addAll(newChangeInfo.getLabels()); toRefresh.getMessages().clear(); toRefresh.getMessages().addAll(newChangeInfo.getMessages()); toRefresh.getPermitted_labels().clear(); toRefresh.getPermitted_labels().addAll(newChangeInfo.getPermitted_labels()); toRefresh.getActions().clear(); toRefresh.getActions().addAll(newChangeInfo.getActions()); mergeRevisions(toRefresh, newChangeInfo); }</code><technical_language>line 228 line 223 identical: setMergeable.</technical_language>

Target:
public static void reload(GerritClient gerrit, ChangeInfo toRefresh) { ChangeInfo newChangeInfo = QueryHelpers.queryMessageTab(gerrit, toRefresh.getId()); toRefresh.set_number(newChangeInfo.get_number()); toRefresh.setChange_id(newChangeInfo.getChange_id()); toRefresh.setStatus(newChangeInfo.getStatus()); toRefresh.setStarred(newChangeInfo.isStarred()); toRefresh.setSubject(newChangeInfo.getSubject()); toRefresh.setCreated(newChangeInfo.getCreated()); toRefresh.setUpdated(newChangeInfo.getUpdated()); toRefresh.setReviewed(newChangeInfo.isReviewed()); toRefresh.setInsertions(newChangeInfo.getInsertions()); toRefresh.setDeletions(newChangeInfo.getDeletions()); toRefresh.setCurrent_revision(newChangeInfo.getCurrent_revision()); toRefresh.setTopic(newChangeInfo.getTopic()); toRefresh.setMergeable(newChangeInfo.isMergeable()); toRefresh.getLabels().clear(); toRefresh.getLabels().addAll(newChangeInfo.getLabels()); toRefresh.getMessages().clear(); toRefresh.getMessages().addAll(newChangeInfo.getMessages()); toRefresh.getPermitted_labels().clear(); toRefresh.getPermitted_labels().addAll(newChangeInfo.getPermitted_labels()); toRefresh.getActions().clear(); toRefresh.getActions().addAll(newChangeInfo.getActions()); mergeRevisions(toRefresh, newChangeInfo); }
Source:
<code><START> public OutputStream createFile(final Path path, final FileSystem.Statistics statistics, final boolean overwrite, final FsPermission permission, <END> final FsPermission umask) throws AzureBlobFileSystemException { try (AbfsPerfInfo perfInfo = startTracking("createFile", "createPath")) { boolean isNamespaceEnabled = getIsNamespaceEnabled(); LOG.debug("createFile filesystem: path: overwrite: permission: umask: isNamespaceEnabled: {}", client.getFileSystem(), path, overwrite, permission.toString(), umask.toString(), isNamespaceEnabled); final AbfsRestOperation op = client.createPath(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path), true, overwrite, isNamespaceEnabled ? getOctalNotation(permission) : null, isNamespaceEnabled ? getOctalNotation(umask) : null); perfInfo.registerResult(op.getResult()).registerSuccess(true); return new AbfsOutputStream( client, statistics, AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path), 0, abfsConfiguration.getWriteBufferSize(), abfsConfiguration.isFlushEnabled(), abfsConfiguration.isOutputStreamFlushDisabled()); } }</code><technical_language>nit: this line is long enough time split</technical_language>

Target:
public OutputStream createFile(final Path path, final FileSystem.Statistics statistics, final boolean overwrite, final FsPermission permission, final FsPermission umask) throws AzureBlobFileSystemException { try (AbfsPerfInfo perfInfo = startTracking("createFile", "createPath")) { boolean isNamespaceEnabled = getIsNamespaceEnabled(); LOG.debug("createFile filesystem: path: overwrite: permission: umask: isNamespaceEnabled: {}", client.getFileSystem(), path, overwrite, permission.toString(), umask.toString(), isNamespaceEnabled); boolean appendBlob = false; if (isAppendBlobKey(path.toString())) { appendBlob = true; } client.createPath(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path), true, overwrite, isNamespaceEnabled ? getOctalNotation(permission) : null, isNamespaceEnabled ? getOctalNotation(umask) : null, appendBlob); return new AbfsOutputStream( client, statistics, AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path), 0, abfsConfiguration.getWriteBufferSize(), abfsConfiguration.isFlushEnabled(), abfsConfiguration.isOutputStreamFlushDisabled(), abfsConfiguration.isAppendWithFlushEnabled(), appendBlob); } }
Source:
<code>public static void loadZombiePlayer(GenericController rc) { Class playerClass; try { <START> ClassLoader icl = new IndividualClassLoader("ZombiePlaer", _debugMethodsEnabled, false, true); <END> playerClass = icl.loadClass("ZombiePlayer"); } catch (InstrumentationException ie) { System.out.println("[Engine] Error during instrumentation of " + rc.getRobot().toString() + ".\n[Engine] Robot will self-destruct in 3...2...1..."); rc.getRobot().suicide(); return; } catch (Exception e) { ErrorReporter.report(e); rc.getRobot().suicide(); return; } new ScheduledRunnable(new RobotRunnable(playerClass, rc), rc.getRobot().getID()); }</code><technical_language>ZombiePlayer</technical_language>

Target:
public static void loadZombiePlayer(GenericController rc) { Class playerClass; try { ClassLoader icl = new IndividualClassLoader("ZombiePlayer", _debugMethodsEnabled, false, true); playerClass = icl.loadClass("ZombiePlayer.ZombiePlayer"); } catch (InstrumentationException ie) { System.out.println("[Engine] Error during instrumentation of " + rc.getRobot().toString() + ".\n[Engine] Robot will self-destruct in 3...2...1..."); rc.getRobot().suicide(); return; } catch (Exception e) { ErrorReporter.report(e); rc.getRobot().suicide(); return; } new ScheduledRunnable(new RobotRunnable(playerClass, rc), rc.getRobot().getID()); }
Source:
<code>private static Set<Set<Integer>> getAllJoiningColumns(RexCall joinCondition) { if (joinCondition.isA(SqlKind.AND)) { final Set<Set<Integer>> r = new HashSet<>(); joinCondition.getOperands() .forEach(node -> { if (node instanceof RexCall) { final Pair<Integer, Integer> columnPair = getJoiningColumns((RexCall) node); if (columnPair != null) { final Integer fst = columnPair.getFirst(), snd = columnPair.getSecond(); <START> final AtomicBoolean updated = new AtomicBoolean(false); <END> for (Set<Integer> entry : r) { if (entry.contains(fst) || entry.contains(snd)) { entry.add(fst); entry.add(snd); updated.set(true); break; } } if (! updated.get()) { r.add(new HashSet<Integer>() {{ add(columnPair.getFirst()); add(columnPair.getSecond()); }}); } } } }); return r; } else { final Pair<Integer, Integer> pair = getJoiningColumns(joinCondition); if (pair == null) { return new HashSet<>(); } else { return Collections.singleton(new HashSet<Integer>(){{ add(pair.getFirst()); add(pair.getSecond()); }}); } } }</code><technical_language>Out of curiosity, atomic boolean? access "updated" is a single thread of control I see. r's access concurrent if forEach execution is parallelized, right</technical_language>

Target:
private static Set<Set<Integer>> getAllJoiningColumns(RexCall joinCondition) { final Set<Set<Integer>> r = new HashSet<>(); if (joinCondition.isA(SqlKind.AND)) { joinCondition.getOperands().stream().filter(node -> node instanceof RexCall) .forEach(node -> getJoiningColumns((RexCall) node).ifPresent(columnPair -> { final Integer fst = columnPair.getFirst(), snd = columnPair.getSecond(); boolean updated = false; for (Set<Integer> entry : r) { if (entry.contains(fst) || entry.contains(snd)) { entry.add(fst); entry.add(snd); updated = true; break; } } if (! updated) { r.add(new HashSet<Integer>() {{ add(columnPair.getFirst()); add(columnPair.getSecond()); }}); } })); } else { getJoiningColumns(joinCondition).ifPresent(pair -> r.add(new HashSet<Integer>(){{ add(pair.getFirst()); add(pair.getSecond()); }})); } return r; }
Source:
<code>public SimpleVersionedSerializerTypeSerializerProxy( SerializableSupplier<SimpleVersionedSerializer<T>> serializerSupplier) { <START> this.serializerSupplier = serializerSupplier; <END> }</code><technical_language>I add a checkNotNull safe</technical_language>

Target:
public SimpleVersionedSerializerTypeSerializerProxy( SerializableSupplier<SimpleVersionedSerializer<T>> serializerSupplier) { this.serializerSupplier = checkNotNull(serializerSupplier, "serializerSupplier"); }
Source:
<code>private RexNode simplifyOrs(List<RexNode> terms, RexUnknownAs unknownAs) { final Map<RexNode, Comparison> notEqualsComparisonMap = new HashMap<>(); for (int i = 0; i < terms.size(); i++) { final RexNode term = terms.get(i); switch (term.getKind()) { case LITERAL: if (RexLiteral.isNullLiteral(term)) { if (unknownAs == FALSE) { terms.remove(i); --i; continue; } } else { if (RexLiteral.booleanValue(term)) { return term; } else { terms.remove(i); --i; continue; } } break; case NOT_EQUALS: Comparison notEqualsComparison = <START> Comparison.of(term, node -> RexUtil.isReferenceOrAccess(node, false)); <END> if (notEqualsComparison != null) { Comparison prevNotEqualsComparison = notEqualsComparisonMap.get(notEqualsComparison.ref); if (prevNotEqualsComparison == null) { notEqualsComparisonMap.put(notEqualsComparison.ref, notEqualsComparison); } else { Comparable comparable1 = notEqualsComparison.literal.getValue(); Comparable comparable2 = prevNotEqualsComparison.literal.getValue(); if (comparable1.compareTo(comparable2) != 0) { return rexBuilder.makeLiteral(true); } } } break; } terms.set(i, term); } return RexUtil.composeDisjunction(rexBuilder, terms); }</code><technical_language>If limited RexUtil.isReferenceOrAccess , is support case ? (x+y <> a x+y <> b) => TRUE</technical_language>

Target:
private RexNode simplifyOrs(List<RexNode> terms, RexUnknownAs unknownAs) { final Map<RexNode, RexNode> notEqualsComparisonMap = new HashMap<>(); final RexLiteral trueLiteral = rexBuilder.makeLiteral(true); for (int i = 0; i < terms.size(); i++) { final RexNode term = terms.get(i); switch (term.getKind()) { case LITERAL: if (RexLiteral.isNullLiteral(term)) { if (unknownAs == FALSE) { terms.remove(i); --i; continue; } else if (unknownAs == TRUE) { return trueLiteral; } } else { if (RexLiteral.booleanValue(term)) { return term; } else { terms.remove(i); --i; continue; } } break; case NOT_EQUALS: final Comparison notEqualsComparison = Comparison.of(term); if (notEqualsComparison != null) { final RexNode prevNotEquals = notEqualsComparisonMap.get(notEqualsComparison.ref); if (prevNotEquals == null) { notEqualsComparisonMap.put(notEqualsComparison.ref, term); } else { if (prevNotEquals.getKind() != SqlKind.IS_NOT_NULL) { final Comparable comparable1 = notEqualsComparison.literal.getValue(); final Comparable comparable2 = Comparison.of(prevNotEquals).literal.getValue(); if (comparable1.compareTo(comparable2) != 0) { final RexNode isNotNull = rexBuilder.makeCall(SqlStdOperatorTable.IS_NOT_NULL, notEqualsComparison.ref); final RexNode constantNull = rexBuilder.makeNullLiteral(trueLiteral.getType()); final RexNode newCondition = simplify( rexBuilder.makeCall(SqlStdOperatorTable.OR, isNotNull, constantNull), unknownAs); if (newCondition.isAlwaysTrue()) { return trueLiteral; } notEqualsComparisonMap.put(notEqualsComparison.ref, isNotNull); final int pos = terms.indexOf(prevNotEquals); terms.set(pos, newCondition); } } terms.remove(i); --i; continue; } } break; } terms.set(i, term); } return RexUtil.composeDisjunction(rexBuilder, terms); }
Source:
<code>public AccountGroup.Id call() throws OrmException, NameAlreadyUsedException { final PerformCreateGroup performCreateGroup = performCreateGroupFactory.create(); final Account.Id me = user.getAccountId(); <START> return performCreateGroup.createGroup(groupName, null, null, new Account.Id[] { me }, null); <END> }</code><technical_language>Collections.singleton(me) instead</technical_language>

Target:
public AccountGroup.Id call() throws OrmException, NameAlreadyUsedException { final PerformCreateGroup performCreateGroup = performCreateGroupFactory.create(); final Account.Id me = user.getAccountId(); return performCreateGroup.createGroup(groupName, null, false, null, Collections.singleton(me), null); }
Source:
<code>public void registerDevice( List<String> channels, Date expiration, AsyncCallback<String> callback ) throws BackendlessException { if( !BackendlessPushService.isFCM( ContextHandler.getAppContext() ) ) <START> throw new IllegalStateException( "The method is intended only for FireBase messaging." ); <END> if( channels == null || channels.isEmpty() || (channels.size() == 1 && (channels.get( 0 ) == null || channels.get( 0 ).isEmpty())) ) channels = Collections.singletonList( DEFAULT_CHANNEL_NAME ); for( String channel : channels ) checkChannelName( channel ); long expirationMs = 0; if( expiration != null) if (expiration.before( Calendar.getInstance().getTime() ) ) throw new IllegalArgumentException( ExceptionMessage.WRONG_EXPIRATION_DATE ); else expirationMs = expiration.getTime(); FCMRegistration.registerDevice( ContextHandler.getAppContext(), channels, expirationMs, callback ); }</code><technical_language>improve this error message information do fix error</technical_language>

Target:
public void registerDevice( List<String> channels, Date expiration, AsyncCallback<String> callback ) { if( !BackendlessPushService.isFCM( ContextHandler.getAppContext() ) ) throw new IllegalStateException( "The method is intended only for FireBase messaging." ); if( channels == null || channels.isEmpty() || (channels.size() == 1 && (channels.get( 0 ) == null || channels.get( 0 ).isEmpty())) ) { channels = Collections.singletonList( DEFAULT_CHANNEL_NAME ); } for( String channel : channels ) checkChannelName( channel ); long expirationMs = 0; if( expiration != null) { if( expiration.before( Calendar.getInstance().getTime() ) ) throw new IllegalArgumentException( ExceptionMessage.WRONG_EXPIRATION_DATE ); else expirationMs = expiration.getTime(); } FCMRegistration.registerDevice( ContextHandler.getAppContext(), channels, expirationMs, callback ); }
Source:
<code>private Properties initProperties() throws MojoExecutionException { if (generateGitPropertiesFile) { return properties = new Properties(); } else { <START> return properties = project.getProperties(); <END> } }</code><technical_language>great if rod of magic flag :+1:</technical_language>

Target:
private Properties initProperties() throws GitCommitIdExecutionException { if (generateGitPropertiesFile) { return properties = new Properties(); } else { return properties = project.getProperties(); } }
Source:
<code>protected OperationRequest makeOperationRequest(ReplicaId replicaId) { DeleteRequest deleteRequest = new DeleteRequest(context.getCorrelationId(), context.getClientId(), blobId); <START> if(!sslEnabledColos.contains(replicaId.getDataNodeId().getDatacenterName())) { <END> return new DeleteOperationRequest(connectionPool, responseQueue, context, blobId, replicaId, deleteRequest, false); } else { return new DeleteOperationRequest(connectionPool, responseQueue, context, blobId, replicaId, deleteRequest, true); } }</code><technical_language>things: is if else here, is generally a coding style do "if (x) y else z" "if (!x) z else y"</technical_language>

Target:
protected OperationRequest makeOperationRequest(ReplicaId replicaId) { DeleteRequest deleteRequest = new DeleteRequest(context.getCorrelationId(), context.getClientId(), blobId); return new DeleteOperationRequest(connectionPool, responseQueue, context, blobId, replicaId, deleteRequest); }
Source:
<code>public void test_getDisplayThread() { final Display display = new Display (); try { final AtomicBoolean <START> isDisplayThread = <END> new AtomicBoolean (false); display.syncExec (new Runnable () { public void run () { isDisplayThread.set (display.isCurrentThread ()); } }); assertTrue (isDisplayThread.get ()); } finally { display.dispose (); } }</code><technical_language>BTW great of atomic boolean :)</technical_language>

Target:
public void test_getDisplayThread() { final Display display = new Display (); try { final AtomicBoolean isDisplayThread = new AtomicBoolean (false); display.syncExec (new Runnable () { public void run () { isDisplayThread.set (display.isDisplayThread ()); } }); assertTrue (isDisplayThread.get ()); } finally { display.dispose (); } }
Source:
<code>private WorkbenchThemeManager() { defaultThemeColorRegistry = new ColorRegistry(PlatformUI.getWorkbench() .getDisplay()); defaultThemeFontRegistry = new FontRegistry(PlatformUI.getWorkbench() .getDisplay()); FontRegistry jfaceFonts = JFaceResources.getFontRegistry(); for (Iterator i = jfaceFonts.getKeySet().iterator(); i.hasNext();) { String key = (String) i.next(); defaultThemeFontRegistry.put(key, jfaceFonts.getFontData(key)); } String themeId = PrefUtil.getAPIPreferenceStore().getDefaultString(IWorkbenchPreferenceConstants.CURRENT_THEME_ID); if (themeId.length() == 0) themeId = IThemeManager.DEFAULT_THEME; final boolean highContrast = Display.getCurrent().getHighContrast(); Display.getCurrent().addListener(SWT.Settings, new Listener() { public void handleEvent(Event event) { updateThemes(); } }); if (highContrast) themeId = SYSTEM_DEFAULT_THEME; PrefUtil.getAPIPreferenceStore().setDefault( IWorkbenchPreferenceConstants.CURRENT_THEME_ID, themeId); <START> context = (IEclipseContext) Workbench.getInstance().getService(IEclipseContext.class); <END> eventBroker = (IEventBroker) Workbench.getInstance().getService(IEventBroker.class); eventBroker.subscribe(UIEvents.UILifeCycle.CSS_THEME_CHANGED, cssThemeChangedHandler); }</code><technical_language>currently some problems if early startup of this class is triggered. IEventBroker null</technical_language>

Target:
private WorkbenchThemeManager() { defaultThemeColorRegistry = new ColorRegistry(PlatformUI.getWorkbench() .getDisplay()); defaultThemeFontRegistry = new FontRegistry(PlatformUI.getWorkbench() .getDisplay()); FontRegistry jfaceFonts = JFaceResources.getFontRegistry(); for (Iterator i = jfaceFonts.getKeySet().iterator(); i.hasNext();) { String key = (String) i.next(); defaultThemeFontRegistry.put(key, jfaceFonts.getFontData(key)); } String themeId = PrefUtil.getAPIPreferenceStore().getDefaultString(IWorkbenchPreferenceConstants.CURRENT_THEME_ID); if (themeId.length() == 0) themeId = IThemeManager.DEFAULT_THEME; final boolean highContrast = Display.getCurrent().getHighContrast(); Display.getCurrent().addListener(SWT.Settings, new Listener() { public void handleEvent(Event event) { updateThemes(); } }); if (highContrast) themeId = SYSTEM_DEFAULT_THEME; PrefUtil.getAPIPreferenceStore().setDefault( IWorkbenchPreferenceConstants.CURRENT_THEME_ID, themeId); context = (IEclipseContext) Workbench.getInstance().getService(IEclipseContext.class); eventBroker = (IEventBroker) Workbench.getInstance().getService(IEventBroker.class); if (eventBroker != null) { eventBroker.subscribe(UIEvents.UILifeCycle.THEME_CHANGED, themeChangedHandler); } }
Source:
<code>void testDescribeInstances() { for (String region : ec2Api.getConfiguredRegions()) { Set<? extends Reservation<? extends RunningInstance>> allResults = client.describeInstancesInRegion(region); assertNotNull(allResults); <START> assertTrue(allResults.size() >= 0); <END> } }</code><technical_language>a set of a negative size</technical_language>

Target:
void testDescribeInstances() { for (String region : ec2Api.getConfiguredRegions()) { Set<? extends Reservation<? extends RunningInstance>> allResults = client.describeInstancesInRegion(region); assertNotNull(allResults); } }
Source:
<code><START> protected void initialize() { <END> getInFilter().add("breadcrumbId"); getInFilter().add("org.apache.kafka.clients.producer.RecordMetadata"); setOutFilterPattern("(?i)(Camel|org\\.apache\\.camel)[\\.|a-z|A-z|0-9]*"); setInFilterPattern("(?i)(Camel|org\\.apache\\.camel)[\\.|a-z|A-z|0-9]*"); }</code><technical_language>if assume super.initialize in ancestors, this code in constructor initialize abstract eliminate assumptions</technical_language>

Target:
protected void initialize() { getInFilter().add("org.apache.kafka.clients.producer.RecordMetadata"); setOutFilterPattern("(?i)(Camel|org\\.apache\\.camel)[\\.|a-z|A-z|0-9]*"); setInFilterPattern("(?i)(Camel|org\\.apache\\.camel)[\\.|a-z|A-z|0-9]*"); }
Source:
<code>public void testAccessControl() throws Exception { String iDOfCourseOfStudent = dataBundle.students .get("student1InCourse1").course; String[] submissionParams = new String[] { Const.ParamsNames.COURSE_ID, iDOfCourseOfStudent }; <START> ______TS("Student of same course can access"); <END> verifyAccessibleForStudentsOfTheSameCourse(submissionParams); ______TS("Admin can access to Masquerade as student"); verifyAccessibleForAdminToMasqueradeAsStudent(submissionParams); ______TS("Unaccessible without login"); verifyUnaccessibleWithoutLogin(submissionParams); iDOfCourseOfStudent = dataBundle.students.get("student2InCourse1").course; submissionParams = new String[] { Const.ParamsNames.COURSE_ID, iDOfCourseOfStudent }; ______TS("Student of different course can not access"); verifyUnaccessibleForStudentsOfOtherCourses(submissionParams); ______TS("UnregisteredUsers cannot access"); verifyUnaccessibleForUnregisteredUsers(submissionParams); }</code><technical_language>____TS(...) test separators testAccessControl method. code is clear enough them. deviate convention a good reason</technical_language>

Target:
public void testAccessControl() throws Exception { String iDOfCourseOfStudent = dataBundle.students .get("student1InCourse1").course; String[] submissionParams = new String[] { Const.ParamsNames.COURSE_ID, iDOfCourseOfStudent }; verifyAccessibleForStudentsOfTheSameCourse(submissionParams); verifyAccessibleForAdminToMasqueradeAsStudent(submissionParams); verifyUnaccessibleWithoutLogin(submissionParams); iDOfCourseOfStudent = dataBundle.students.get("student2InCourse1").course; submissionParams = new String[] { Const.ParamsNames.COURSE_ID, iDOfCourseOfStudent }; verifyUnaccessibleForStudentsOfOtherCourses(submissionParams); verifyUnaccessibleForUnregisteredUsers(submissionParams); }
Source:
<code>private boolean containsRedundantUnwrapAttr(Attribute attribute) { <START> return attribute.getName().equalsIgnoreCase(UNWRAP_ATTRIBUTE_NAME) && <END> StringUtils.isBlank(attribute.getValue()) && getExpressions(attribute.getValue()).isEmpty(); }</code><technical_language>flip equals() constant is left side</technical_language>

Target:
private boolean containsRedundantUnwrapAttr(Attribute attribute) { return UNWRAP_ATTRIBUTE_NAME.equalsIgnoreCase(attribute.getName()) && StringUtils.isBlank(attribute.getValue()) && getExpressions(attribute.getValue()).isEmpty(); }
Source:
<code>public RecoveryMethod(String recoveryMethodName, Method originalMethod, Object[] args, Object target) throws NoSuchMethodException, ClassCastException { Class[] params = originalMethod.getParameterTypes(); Class[] recoveryParams = Arrays.copyOf(params, params.length + 1); <START> recoveryParams[params.length] = Throwable.class; <END> Method recovery = ReflectionUtils.findMethod(target.getClass(), recoveryMethodName, recoveryParams); if (recovery == null) { throw new NoSuchMethodException(String.format("%s.%s(%s)", target.getClass(), recoveryMethodName, StringUtils.arrayToDelimitedString(recoveryParams, ","))); } Class<?> originalReturnType = originalMethod.getReturnType(); if (!originalReturnType.isAssignableFrom(recovery.getReturnType())) { throw new ClassCastException(String.format("recovery return type not matched (expected: %s, actual :%s)", originalReturnType.getName(), recovery.getReturnType().getName())); } this.recovery = recovery; this.args = args; this.target = target; }</code><technical_language>I need Class<? extends Throwable> instead this forcing user recovery method Throwbale type parameter specific exception type is bad practice need do : 1- instead Class<? extends Throwable> 2- check if casue configured recover method is assignable remark : do check accessibility of recovery method assuming is public case time ,so need check if is accessible accessible : // check isAccessible method.isAccessible(); // accessible ReflectionUtils.makeAccessible(method);</technical_language>

Target:
public RecoveryMethod(String recoveryMethodName, Method originalMethod, Object[] args, Object target) throws NoSuchMethodException { Class<?>[] params = originalMethod.getParameterTypes(); Class<?> originalReturnType = originalMethod.getReturnType(); Map<Class<?>, Method> methods = extractMethods(recoveryMethodName, params, originalReturnType, target.getClass()); if (methods.isEmpty()) { throw new NoSuchMethodException(String.format("%s %s.%s(%s,%s)", originalReturnType, target.getClass(), recoveryMethodName, StringUtils.arrayToDelimitedString(params, ","), Throwable.class)); } this.recoveryMethods = methods; this.args = args; this.target = target; this.returnType = originalReturnType; }
Source:
<code>public byte[] getSerialized() { if (serialized == null) { ByteArrayBuilder bab = new ByteArrayBuilder() .append(VERSION_BYTES, VERSION_BYTES_LEN); for (String key : headerMap.keySet()) { for (String value : values(key)) { bab.append(key); bab.append(COLON_BYTES, COLON_BYTES_LEN); bab.append(value); <START> bab.append(CRLF_BYTES, CRLF_BYTES_LEN); <END> } } bab.append(CRLF_BYTES, CRLF_BYTES_LEN); serialized = bab.toByteArray(); } return serialized; }</code><technical_language>append operations do efficient introduce a lot of allocation overhead, pre-allocating exact amount of bytes necessary expanding buffer repeatedly. This straight if replace strings in headerMap ByteBuffer's</technical_language>

Target:
public byte[] getSerialized() { if (serialized == null) { ByteArrayBuilder bab = new ByteArrayBuilder(projectedLength + VERSION_BYTES_PLUS_CRLF_LEN) .append(VERSION_BYTES_PLUS_CRLF); for (String key : headerMap.keySet()) { for (String value : values(key)) { bab.append(key); bab.append(COLON_BYTES); bab.append(value); bab.append(CRLF_BYTES); } } bab.append(CRLF_BYTES); serialized = bab.toByteArray(); } return serialized; }
Source:
<code>public static Xpp3Dom getPluginGoalConfig(Plugin plugin, String goal, Log log) { Xpp3Dom config = null; String execId = "default"; int numExec = 0; List<PluginExecution> executions = plugin.getExecutions(); if (executions != null) { for (PluginExecution e : executions) { if (e.getGoals() != null && e.getGoals().contains(goal)) { if (numExec == 0) { config = (Xpp3Dom) e.getConfiguration(); execId = e.getId(); } numExec++; } } if (config == null) { config = (Xpp3Dom) plugin.getConfiguration(); } } else { config = (Xpp3Dom) plugin.getConfiguration(); } if (numExec > 1) { log.warn(plugin.getArtifactId() + ":" + goal <START> + " goal has multiple execution configrations (default to \"" + execId + "\" execution)"); <END> } if (config == null) { config = configuration(); } else { config = Xpp3Dom.mergeXpp3Dom(configuration(), config); config = validateConfiguration(plugin, goal, config, log); } log.debug(plugin.getArtifactId() + ":" + goal + " configuration\n" + config); return config; }</code><technical_language>typo configrations > configurations</technical_language>

Target:
public static Xpp3Dom getPluginGoalConfig(Plugin plugin, String goal, Log log) { Xpp3Dom config = null; String execId = "default"; int numExec = 0; List<PluginExecution> executions = plugin.getExecutions(); if (executions != null) { for (PluginExecution e : executions) { if (e.getGoals() != null && e.getGoals().contains(goal)) { if (numExec == 0) { config = (Xpp3Dom) e.getConfiguration(); execId = e.getId(); } numExec++; } } if (config == null) { config = (Xpp3Dom) plugin.getConfiguration(); } } else { config = (Xpp3Dom) plugin.getConfiguration(); } if (numExec > 1) { log.warn(plugin.getArtifactId() + ":" + goal + " goal has multiple execution configurations (default to \"" + execId + "\" execution)"); } if (config == null) { config = configuration(); } else { config = Xpp3Dom.mergeXpp3Dom(configuration(), config); config = validateConfiguration(plugin, goal, config, log); } log.debug(plugin.getArtifactId() + ":" + goal + " configuration\n" + config); return config; }
Source:
<code>public UserIdentity identifyUser(String sessionID) throws UserIdentityException { if (StringUtils.isEmpty(sessionID)) { logWarn("identify user error, no auth token was provided").log(); throw new UserIdentityException("user not authenticated", SC_UNAUTHORIZED); } Session session; try { session = sessionServiceSupplier.getService().get(sessionID); } catch (IOException e) { logError(e, "identify user error, unexpected error while attempting to get user session") .sessionID(sessionID) .log(); <START> throw new UserIdentityException("internal server error", SC_INTERNAL_SERVER_ERROR); <END> } if (session == null) { logWarn("identify user error, session with specified ID could not be found") .sessionID(sessionID) .log(); throw new UserIdentityException("user not authenticated", SC_UNAUTHORIZED); } try { if (!userServiceSupplier.getService().exists(session.getEmail())) { logWarn("identify user error, valid user session found but user no longer exists") .session(session) .log(); throw new UserIdentityException("user does not exist", SC_NOT_FOUND); } } catch (IOException e) { logError(e, "identify user error, unexpected error while checking if user exists") .session(session) .log(); throw new UserIdentityException("internal server error", SC_INTERNAL_SERVER_ERROR); } return new UserIdentity(session); }</code><technical_language>"internal server error" string a constant. for other error messages</technical_language>

Target:
public UserIdentity identifyUser(String sessionID) throws UserIdentityException { if (StringUtils.isEmpty(sessionID)) { logWarn("identify user error, no auth token was provided").log(); throw new UserIdentityException(AUTHENTICATED_ERROR, SC_UNAUTHORIZED); } Session session; try { session = sessionServiceSupplier.getService().get(sessionID); } catch (IOException e) { logError(e, "identify user error, unexpected error while attempting to get user session") .sessionID(sessionID) .log(); throw new UserIdentityException(INTERNAL_ERROR, SC_INTERNAL_SERVER_ERROR); } if (session == null) { logWarn("identify user error, session with specified ID could not be found") .sessionID(sessionID) .log(); throw new UserIdentityException(AUTHENTICATED_ERROR, SC_UNAUTHORIZED); } try { if (!userServiceSupplier.getService().exists(session.getEmail())) { logWarn("identify user error, valid user session found but user no longer exists") .session(session) .log(); throw new UserIdentityException(USER_NOT_FOUND, SC_NOT_FOUND); } } catch (IOException e) { logError(e, "identify user error, unexpected error while checking if user exists") .session(session) .log(); throw new UserIdentityException(INTERNAL_ERROR, SC_INTERNAL_SERVER_ERROR); } return new UserIdentity(session); }
Source:
<code>protected Collection<TaskAttribute> getAttributes() { Map<String, TaskAttribute> allAttributes = getTaskData().getRoot().getAttributes(); List<TaskAttribute> attributes = new ArrayList<TaskAttribute>(allAttributes.size()); attributes.add(getTaskData().getRoot().getMappedAttribute(TaskAttribute.USER_ASSIGNED)); TaskAttribute assignee = getTaskData().getRoot().getAttribute(BugzillaAttribute.SET_DEFAULT_ASSIGNEE.getKey()); if (assignee != null) { attributes.add(assignee); } attributes.add(getTaskData().getRoot().getMappedAttribute(TaskAttribute.USER_REPORTER)); <START> String useParam = getTaskData().getAttributeMapper() <END> .getTaskRepository() .getProperty(IBugzillaConstants.BUGZILLA_PARAM_USEQACONTACT); if (useParam == null || (useParam != null && useParam.equals("true"))) { attributes.add(getTaskData().getRoot().getMappedAttribute(BugzillaAttribute.QA_CONTACT.getKey())); } attributes.add(getTaskData().getRoot().getMappedAttribute(BugzillaAttribute.NEWCC.getKey())); addSelfToCC(attributes); attributes.add(getTaskData().getRoot().getMappedAttribute(BugzillaAttribute.CC.getKey())); for (TaskAttribute attribute : allAttributes.values()) { if (TaskAttribute.TYPE_PERSON.equals(attribute.getMetaData().getType())) { if (!attribute.getId().endsWith("_name") && !attribute.getId().equals(BugzillaAttribute.EXPORTER_NAME.getKey())) { if (!attributes.contains(attribute)) { attributes.add(attribute); } } } } return attributes; }</code><technical_language>Rename useQaContact</technical_language>

Target:
protected Collection<TaskAttribute> getAttributes() { Map<String, TaskAttribute> allAttributes = getTaskData().getRoot().getAttributes(); List<TaskAttribute> attributes = new ArrayList<TaskAttribute>(allAttributes.size()); attributes.add(getTaskData().getRoot().getMappedAttribute(TaskAttribute.USER_ASSIGNED)); TaskAttribute assignee = getTaskData().getRoot().getAttribute(BugzillaAttribute.SET_DEFAULT_ASSIGNEE.getKey()); if (assignee != null) { attributes.add(assignee); } attributes.add(getTaskData().getRoot().getMappedAttribute(TaskAttribute.USER_REPORTER)); String useQaContact = getTaskData().getAttributeMapper() .getTaskRepository() .getProperty(IBugzillaConstants.BUGZILLA_PARAM_USEQACONTACT); if (useQaContact == null || Boolean.parseBoolean(useQaContact)) { attributes.add(getTaskData().getRoot().getMappedAttribute(BugzillaAttribute.QA_CONTACT.getKey())); } attributes.add(getTaskData().getRoot().getMappedAttribute(BugzillaAttribute.NEWCC.getKey())); addSelfToCC(attributes); attributes.add(getTaskData().getRoot().getMappedAttribute(BugzillaAttribute.CC.getKey())); for (TaskAttribute attribute : allAttributes.values()) { if (TaskAttribute.TYPE_PERSON.equals(attribute.getMetaData().getType())) { if (!attribute.getId().endsWith("_name") && !attribute.getId().equals(BugzillaAttribute.EXPORTER_NAME.getKey())) { if (!attributes.contains(attribute)) { attributes.add(attribute); } } } } return attributes; }