auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public synchronized Object evaluate( String xpathExpressionKey, QName returnType, NamespaceContext nsContext) throws XPathExpressionException { <START> XPathCache xpc = new XPathCache(); <END> xpc.getXPath().setNamespaceContext(nsContext); XPathExpression compiledExpression = xpc.getCompiledExpression(xpathExpressionKey); Thread thread = Thread.currentThread(); ClassLoader loader = thread.getContextClassLoader(); thread.setContextClassLoader(this.getClass().getClassLoader()); DocumentBuilder documentBuilder; byte[] array; try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) { documentBuilder = dbf.newDocumentBuilder(); TransformerFactory transformerFactory = XML_UTILS.getSecureXmlTransformerFactory(); Transformer transformer = transformerFactory.newTransformer(); DOMSource source = new DOMSource(document); StreamResult result = new StreamResult(bos); transformer.transform(source, result); array = bos.toByteArray(); } catch (IOException | ParserConfigurationException | TransformerException e) { throw new XPathExpressionException(e); } try (ByteArrayInputStream bis = new ByteArrayInputStream(array)) { return compiledExpression.evaluate(documentBuilder.parse(bis), returnType); } catch (IOException | SAXException e) { throw new XPathExpressionException(e); } finally { thread.setContextClassLoader(loader); } }</code><technical_language>undo change XPathCache methods static? I this compile is</technical_language>

Target:
public synchronized Object evaluate( String xpathExpressionKey, QName returnType, NamespaceContext nsContext) throws XPathExpressionException { XPathCache.getXPath().setNamespaceContext(nsContext); XPathExpression compiledExpression = XPathCache.getCompiledExpression(xpathExpressionKey); Thread thread = Thread.currentThread(); ClassLoader loader = thread.getContextClassLoader(); thread.setContextClassLoader(this.getClass().getClassLoader()); DocumentBuilder documentBuilder; byte[] array; try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) { documentBuilder = dbf.newDocumentBuilder(); TransformerFactory transformerFactory = XML_UTILS.getSecureXmlTransformerFactory(); Transformer transformer = transformerFactory.newTransformer(); DOMSource source = new DOMSource(document); StreamResult result = new StreamResult(bos); transformer.transform(source, result); array = bos.toByteArray(); } catch (IOException | ParserConfigurationException | TransformerException e) { throw new XPathExpressionException(e); } try (ByteArrayInputStream bis = new ByteArrayInputStream(array)) { return compiledExpression.evaluate(documentBuilder.parse(bis), returnType); } catch (IOException | SAXException e) { throw new XPathExpressionException(e); } finally { thread.setContextClassLoader(loader); } }
Source:
<code>private Object writeReplace() { synchronized (saving) { if (saving.contains(this)) { return this; <START> } else { <END> LOGGER.log(Level.WARNING, "JENKINS-45892: reference to {0} being saved but not at top level", this); return new Replacer(this); } } }</code><technical_language>do need else branch synchronized</technical_language>

Target:
private Object writeReplace() { return XmlFile.replaceIfNotAtTopLevel(this, () -> new Replacer(this)); }
Source:
<code>public void close() { try { isOpen = false; cache.close(); helixStore.stop(); } catch (Exception e) { logger.error("Exception occurred when closing HelixAccountService.", e); } <START> } <END></code><technical_language>nuage require metrics update path</technical_language>

Target:
public void close() { if (isOpen) { try { isOpen = false; helixStore.stop(); } catch (Exception e) { logger.error("Exception occurred when closing HelixAccountService.", e); } } }
Source:
<code>public AuthScheme create(final HttpContext context) { Boolean localStripPort = (Boolean) context.getAttribute(CONTEXT_ATTRIBUTE_STRIP_PORT); <START> return new KerberosScheme(localStripPort != null ? <END> localStripPort : isStripPort(), isUseCanonicalHostname()); }</code><technical_language>a variable a multi-line ternary operator a parameter? e.g. java Boolean stripPort = localStripPort != null ? localStripPort : isStripPort(); return new KerberosScheme(stripPort, isUseCanonicalHostname());</technical_language>

Target:
public AuthScheme create(final HttpContext context) { Boolean localStripPort = (Boolean) context.getAttribute(CONTEXT_ATTRIBUTE_STRIP_PORT); Boolean stripPort = localStripPort != null ? localStripPort : isStripPort(); return new KerberosScheme(stripPort, isUseCanonicalHostname()); }
Source:
<code>public void getOrderGroupsByEncounter_shouldFailGivenNullEncounter() { OrderGroup orderGroup = new OrderGroup(); <START> Encounter nullEncounter = null; <END> orderGroup.setEncounter(nullEncounter); dao.getOrderGroupsByEncounter(nullEncounter); }</code><technical_language>is of nullEncounter variable</technical_language>

Target:
public void getOrderGroupsByEncounter_shouldFailGivenNullEncounter() { dao.getOrderGroupsByEncounter(null); }
Source:
<code>public void testNotAvailableStartNotExistReplicationSlot() throws Exception { exception.expect(PSQLException.class); <START> exception.expectMessage(CoreMatchers.containsString("does not exist")); <END> exception.reportMissingExceptionWithMessage( "For logical decoding replication slot name it required parameter " + "that should be create on server before start replication" ); PGConnection pgConnection = (PGConnection) replConnection; LogSequenceNumber lsn = getCurrentLSN(); PGReplicationStream stream = pgConnection .replicationStream() .logical() .withSlotName("notExistSlotName") .withStartPosition(lsn) .start(); }</code><technical_language>this refactored PSQLState comparison</technical_language>

Target:
public void testNotAvailableStartNotExistReplicationSlot() throws Exception { PGConnection pgConnection = (PGConnection) replConnection; LogSequenceNumber lsn = getCurrentLSN(); try { PGReplicationStream stream = pgConnection .getReplicationAPI() .replicationStream() .logical() .withSlotName("notExistSlotName") .withStartPosition(lsn) .start(); fail("For logical decoding replication slot name it required parameter " + "that should be create on server before start replication"); } catch (PSQLException e) { String state = e.getSQLState(); assertThat("When replication slot doesn't exists, server can't start replication " + "and should throw exception about it", state, equalTo(PSQLState.UNDEFINED_OBJECT.getState()) ); } }
Source:
<code>private SearchResultGroup[] getGroupedMatches() { final Map<IResource, List<SearchMatch>> grouped= new HashMap<>(); List<SearchMatch> matches= null; IResource resource= null; SearchMatch match= null; for (final Iterator<?> iterator= getSearchMatches().iterator(); iterator.hasNext();) { match= (SearchMatch) iterator.next(); resource= match.getResource(); if (!grouped.containsKey(resource)) grouped.put(resource, new ArrayList<SearchMatch>(4)); matches= grouped.get(resource); matches.add(match); } if (fBinary) { final Collection<IResource> collection= getCollector().getBinaryResources(); <START> for (final Iterator<IResource> iterator= grouped.keySet().iterator(); iterator.hasNext();) { <END> resource= iterator.next(); if (collection.contains(resource)) iterator.remove(); } } final SearchResultGroup[] result= new SearchResultGroup[grouped.size()]; int index= 0; for (final Iterator<IResource> iterator= grouped.keySet().iterator(); iterator.hasNext();) { resource= iterator.next(); matches= grouped.get(resource); result[index++]= new SearchResultGroup(resource, matches.toArray(new SearchMatch[matches.size()])); } return result; }</code><technical_language>I patch 5 lines replaced by: grouped.keySet().removeAll(collection);</technical_language>

Target:
private SearchResultGroup[] getGroupedMatches() { final Map<IResource, List<SearchMatch>> grouped= new HashMap<>(); List<SearchMatch> matches= null; IResource resource= null; SearchMatch match= null; for (final Iterator<?> iterator= getSearchMatches().iterator(); iterator.hasNext();) { match= (SearchMatch) iterator.next(); resource= match.getResource(); if (!grouped.containsKey(resource)) grouped.put(resource, new ArrayList<SearchMatch>(4)); matches= grouped.get(resource); matches.add(match); } if (fBinary) { final Collection<IResource> collection= getCollector().getBinaryResources(); grouped.keySet().removeAll(collection); } final SearchResultGroup[] result= new SearchResultGroup[grouped.size()]; int index= 0; for (final List<SearchMatch> searchMatches : grouped.values()) { result[index++]= new SearchResultGroup(resource, searchMatches.toArray(new SearchMatch[searchMatches.size()])); } return result; }
Source:
<code>private LiveReplicaStatus computeDataReplicationStatus(Map<Domain, Map<Integer, Set<Host>>> domainToPartitionToHostsFullyServing, Set<DomainAndVersion> domainVersions, Host host) throws IOException { Set<Domain> relevantDomains = new HashSet<Domain>(); for (DomainAndVersion domainVersion : domainVersions) { relevantDomains.add(domainVersion.getDomain()); } LiveReplicaStatus worstStatus = LiveReplicaStatus.OVER_REPLICATED; for (HostDomain hostDomain : host.getAssignedDomains()) { Domain domain = hostDomain.getDomain(); if (relevantDomains.contains(domain)) { Map<Integer, Set<Host>> partitionToNumFullyServing = domainToPartitionToHostsFullyServing.get(hostDomain.getDomain()); if (partitionToNumFullyServing == null) { return LiveReplicaStatus.UNDER_REPLICATED; } for (HostDomainPartition partition : hostDomain.getPartitions()) { if (partitionToNumFullyServing.containsKey(partition.getPartitionNumber())) { <START> <END> Set<Host> servingHosts = partitionToNumFullyServing.get(partition.getPartitionNumber()); worstStatus = LiveReplicaStatus.min( worstStatus, statusFor(servingHosts.size(), minServingReplicas) ); if (availablilityBucketKey != null) { worstStatus = LiveReplicaStatus.min( worstStatus, statusFor( (int)servingHosts.stream().filter(input -> sameBucket(host, input)).count(), minServingAvailabilityBucketReplicas ) ); } } } } } return worstStatus; }</code><technical_language>accumulating statuses EnumSet<LiveReplicaStatus> Collections.min end? I easier follow</technical_language>

Target:
private LiveReplicaStatus computeDataReplicationStatus(Map<Domain, Map<Integer, Set<Host>>> domainToPartitionToHostsFullyServing, Set<DomainAndVersion> domainVersions, Host host) throws IOException { Set<Domain> relevantDomains = new HashSet<Domain>(); for (DomainAndVersion domainVersion : domainVersions) { relevantDomains.add(domainVersion.getDomain()); } Set<LiveReplicaStatus> allStatuses = EnumSet.of(LiveReplicaStatus.OVER_REPLICATED); for (HostDomain hostDomain : host.getAssignedDomains()) { Domain domain = hostDomain.getDomain(); if (relevantDomains.contains(domain)) { Map<Integer, Set<Host>> partitionToNumFullyServing = domainToPartitionToHostsFullyServing.get(hostDomain.getDomain()); if (partitionToNumFullyServing == null) { return LiveReplicaStatus.UNDER_REPLICATED; } for (HostDomainPartition partition : hostDomain.getPartitions()) { if (partitionToNumFullyServing.containsKey(partition.getPartitionNumber())) { Set<Host> servingHosts = partitionToNumFullyServing.get(partition.getPartitionNumber()); allStatuses.add(statusFor(servingHosts.size(), minServingReplicas)); if (availabilityBucketKey != null) { allStatuses.add(statusFor( servingHosts.stream().filter(input -> sameBucket(host, input)).count(), minServingAvailabilityBucketReplicas )); } } } } } return Collections.min(allStatuses); }
Source:
<code><START> public static native int posix_fadvise(int fd, long offset, long len, int flag) throws LastErrorException; <END> private NativeIO() {}</code><technical_language>this private</technical_language>

Target:
private static native int posix_fadvise(int fd, long offset, long len, int flag) throws LastErrorException; private NativeIO()
Source:
<code>public void handleRequest(HttpServerExchange httpExchange) throws Exception { SecurityIdentity identity = getElytronEndpoint().getElytronComponent().getSecurityDomain().getCurrentSecurityIdentity(); if (identity != null) { Set<String> roles = new HashSet<>(); Roles identityRoles = identity.getRoles(); if (identityRoles != null) { for (String roleName : identityRoles) { roles.add(roleName); } } if (isAllowed(roles, getElytronEndpoint().getAllowedRolesList())) { super.handleRequest(httpExchange); } else { httpExchange.setStatusCode(StatusCodes.FORBIDDEN); <START> } <END> return; } super.handleRequest(httpExchange); }</code><technical_language>Please mind if I ask, happen if request reaches this line</technical_language>

Target:
public void handleRequest(HttpServerExchange httpExchange) throws Exception { SecurityIdentity identity = getElytronEndpoint().getElytronComponent().getSecurityDomain().getCurrentSecurityIdentity(); if (identity != null) { Set<String> roles = new HashSet<>(); Roles identityRoles = identity.getRoles(); if (identityRoles != null) { for (String roleName : identityRoles) { roles.add(roleName); } } if (isAllowed(roles, getElytronEndpoint().getAllowedRolesList())) { super.handleRequest(httpExchange); } else { httpExchange.setStatusCode(StatusCodes.FORBIDDEN); httpExchange.endExchange(); } return; } super.handleRequest(httpExchange); }
Source:
<code>private void createSelectColumn( CharSequence columnName, ExpressionNode columnAst, QueryModel validatingModel, QueryModel translatingModel, QueryModel innerModel, QueryModel analyticModel, QueryModel groupByModel, QueryModel outerModel, QueryModel distinctModel ) throws SqlException { LowerCaseCharSequenceObjHashMap<CharSequence> translatingAliasMap = translatingModel.getColumnNameToAliasMap(); int index = translatingAliasMap.keyIndex(columnAst.token); if (index < 0) { <START> final CharSequence translatedColumnName = translatingAliasMap.valueAt(index); <END> final CharSequence alias = createColumnAlias(columnName, groupByModel); final QueryColumn translatedColumn = nextColumn(alias, translatedColumnName); innerModel.addBottomUpColumn(translatedColumn); groupByModel.addBottomUpColumn(translatedColumn); analyticModel.addBottomUpColumn(translatedColumn); outerModel.addBottomUpColumn(translatedColumn); distinctModel.addBottomUpColumn(translatedColumn); } else { final CharSequence alias = createColumnAlias(columnName, translatingModel); addColumnToTranslatingModel( queryColumnPool.next().of( alias, columnAst ), translatingModel, validatingModel ); final QueryColumn translatedColumn = nextColumn(alias); innerModel.addBottomUpColumn(translatedColumn); analyticModel.addBottomUpColumn(translatedColumn); groupByModel.addBottomUpColumn(translatedColumn); outerModel.addBottomUpColumn(translatedColumn); distinctModel.addBottomUpColumn(translatedColumn); } }</code><technical_language>"quick" fine, need extra check</technical_language>

Target:
private void createSelectColumn( CharSequence columnName, ExpressionNode columnAst, QueryModel validatingModel, QueryModel translatingModel, QueryModel innerModel, QueryModel analyticModel, QueryModel groupByModel, QueryModel outerModel, QueryModel distinctModel ) throws SqlException { LowerCaseCharSequenceObjHashMap<CharSequence> translatingAliasMap = translatingModel.getColumnNameToAliasMap(); int index = translatingAliasMap.keyIndex(columnAst.token); if (index < 0) { final CharSequence translatedColumnName = translatingAliasMap.valueAtQuick(index); final CharSequence alias = createColumnAlias(columnName, groupByModel); final QueryColumn translatedColumn = nextColumn(alias, translatedColumnName); innerModel.addBottomUpColumn(translatedColumn); groupByModel.addBottomUpColumn(translatedColumn); analyticModel.addBottomUpColumn(translatedColumn); outerModel.addBottomUpColumn(translatedColumn); distinctModel.addBottomUpColumn(translatedColumn); } else { final CharSequence alias = createColumnAlias(columnName, translatingModel); addColumnToTranslatingModel( queryColumnPool.next().of( alias, columnAst ), translatingModel, validatingModel ); final QueryColumn translatedColumn = nextColumn(alias); innerModel.addBottomUpColumn(translatedColumn); analyticModel.addBottomUpColumn(translatedColumn); groupByModel.addBottomUpColumn(translatedColumn); outerModel.addBottomUpColumn(translatedColumn); distinctModel.addBottomUpColumn(translatedColumn); } }
Source:
<code>public void testWaffleLong() throws Exception { stmt.setLong(1, 3); replay(stmt); <START> foreman.waffle(Object.class, new Long(3L), null).apply(1, stmt, null); <END> }</code><technical_language>In Mockito, stubbing expected method call is a single statement: import static org.mockito.Mockito.verify; ... @Rule MockitoRule mockitoRule = MockitoJUnit.rule(); @Mock PreparedStatement stmt; @Test public void testWaffleLong() { foreman.waffle(Object.class, new Long(3L), null).apply(1, stmt, null); verify(stmt).setLong(1, 3); }</technical_language>

Target:
public void testWaffleLong() throws Exception { foreman.waffle(Object.class, new Long(3L), null).apply(1, stmt, null); verify(stmt).setLong(1, 3); }
Source:
<code>public String toString() { <START> return MoreObjects.toStringHelper(this) <END> .add("name", this.name) .toString(); }</code><technical_language>MoreObjects 1.8, Objects.toStringHelper instead</technical_language>

Target:
public String toString() { return Objects.toStringHelper(this) .add("name", this.name) .toString(); }
Source:
<code>protected HazelcastInstance testMultiMapPutAllSetup() { MultiMapConfig multiMapConfig1 = new MultiMapConfig() .setName("testMultiMapPutAllMapList") .setValueCollectionType("LIST") .setBinary(false); MultiMapConfig multiMapConfig2 = new MultiMapConfig() .setName("testMultiMapPutAllMapSet") .setValueCollectionType("SET") .setBinary(false); MultiMapConfig multiMapConfig3 = new MultiMapConfig() .setName("expectedMultiMap1") .setValueCollectionType("LIST") .setBinary(false); Config cfg = smallInstanceConfig() .addMultiMapConfig(multiMapConfig1) .addMultiMapConfig(multiMapConfig2) .addMultiMapConfig(multiMapConfig3); HazelcastInstance hz = createHazelcastInstanceFactory(1) .newInstances(cfg)[0]; <START> Accessors.getNode(hz).getClusterService().changeClusterVersion(Version.of(4, 1)); <END> return hz; }</code><technical_language>This is unnecessary</technical_language>

Target:
protected HazelcastInstance testMultiMapPutAllSetup() { MultiMapConfig multiMapConfig1 = new MultiMapConfig() .setName("testMultiMapPutAllMapList") .setValueCollectionType(MultiMapConfig.ValueCollectionType.LIST) .setBinary(false); MultiMapConfig multiMapConfig2 = new MultiMapConfig() .setName("testMultiMapPutAllMapSet") .setValueCollectionType(MultiMapConfig.ValueCollectionType.SET) .setBinary(false); Config cfg = smallInstanceConfig() .addMultiMapConfig(multiMapConfig1) .addMultiMapConfig(multiMapConfig2); HazelcastInstance hz = createHazelcastInstanceFactory(1) .newInstances(cfg)[0]; return hz; }
Source:
<code>default Function1<Integer, Option<T>> lift() { <START> return i -> Option.when(i < length() && i >= 0, () -> apply(i)); <END> }</code><technical_language>Good! switch conditions, too: Option.when(i >= 0 && i < length(), ...). omit length() call if i < 0</technical_language>

Target:
default Function1<Integer, Option<T>> lift() { return i -> (i >= 0 && i < length()) ? Option.some(apply(i)) : Option.none(); }
Source:
<code>public int hashCode() { <START> int hash = 17; <END> hash = hash * 31 + Objects.hash(checkType); hash = hash * 31 + maxConcurrentJobs; hash = hash * 31 + Objects.hash(uniqueRuleId); return hash; }</code><technical_language>Objects.hash(args) correctly, pass values function one-by-one</technical_language>

Target:
public int hashCode() { return Objects.hash(checkType, id, maxConcurrentJobs, maxConcurrentExpensiveJobs); }
Source:
<code>protected void enqueueTupleForProcessing(QUEUETUPLE QUEUETUPLE) { WorkItem item = new WorkItem(QUEUETUPLE); waitingTuples.add(item); item.taskHandle = executor.submit(new Processor(item)); <START> item.processState = State.SUBMITTED; <END> }</code><technical_language>This possibly overwrites state of processed item</technical_language>

Target:
protected void enqueueTupleForProcessing(QUEUETUPLE QUEUETUPLE) { WorkItem item = new WorkItem(QUEUETUPLE); item.processState = State.SUBMITTED; waitingTuples.add(item); item.taskHandle = executor.submit(new Processor(item)); }
Source:
<code>public void setUpItem() throws Exception { Response<SandboxPublicTokenCreateResponse> createResponse = client().service().sandboxPublicTokenCreate(new SandboxPublicTokenCreateRequest(setupItemInstitutionId(), setupItemProducts())).execute(); assertSuccessResponse(createResponse); Response<ItemPublicTokenExchangeResponse> response = client().service().itemPublicTokenExchange(new ItemPublicTokenExchangeRequest(createResponse.body().getPublicToken())).execute(); assertSuccessResponse(response); <START> exchangeTokenResponse = response.body(); <END> Response<ItemGetResponse> itemGetResponse = client().service().itemGet(new ItemGetRequest(exchangeTokenResponse.getAccessToken())).execute(); assertSuccessResponse(itemGetResponse); item = itemGetResponse.body().getItem(); }</code><technical_language>add this. in front of setting fields</technical_language>

Target:
public void setUpItem() throws Exception { Response<SandboxPublicTokenCreateResponse> createResponse = client().service().sandboxPublicTokenCreate(new SandboxPublicTokenCreateRequest(setupItemInstitutionId(), setupItemProducts())).execute(); assertSuccessResponse(createResponse); Response<ItemPublicTokenExchangeResponse> response = client().service().itemPublicTokenExchange(new ItemPublicTokenExchangeRequest(createResponse.body().getPublicToken())).execute(); assertSuccessResponse(response); this.exchangeTokenResponse = response.body(); Response<ItemGetResponse> itemGetResponse = client().service().itemGet(new ItemGetRequest(exchangeTokenResponse.getAccessToken())).execute(); assertSuccessResponse(itemGetResponse); item = itemGetResponse.body().getItem(); }
Source:
<code>public List<CourseGroupDAO> findLecturingCourseGroups(final String userId) { return getHibernateTemplate().executeFind(new HibernateCallback(){ public Object doInHibernate(Session session) throws HibernateException, SQLException { Query query = session.createSQLQuery("select distinct " + "cg.muid, cg.courseId, cg.title, cg.dept, cg.departmentName, " + "cg.subunit, cg.subunitName, cg.description, cg.supervisorApproval, " + "cg.administratorApproval, cg.hideGroup, cg.deleted, cg.contactEmail, " + "cg.regulations, cg.visibility, cg.source, cg.prerequisite " + "from course_group cg " + "LEFT JOIN course_group_component cgc on cgc.courseGroupMuid = cg.muid " + "LEFT JOIN course_component cc on cgc.courseComponentMuid = cc.muid " + "where cc.teacherName = :userId").addEntity(CourseGroupDAO.class); <START> query.setString("userId", userId); <END> return query.list(); } }); }</code><technical_language>Bad variable name, a userId</technical_language>

Target:
public List<CourseGroupDAO> findLecturingCourseGroups(final String userId) { return getHibernateTemplate().executeFind(new HibernateCallback(){ public Object doInHibernate(Session session) throws HibernateException, SQLException { Query query = session.createSQLQuery("select distinct cg.* " + "from course_group cg " + "LEFT JOIN course_group_component cgc on cgc.courseGroupMuid = cg.muid " + "LEFT JOIN course_component cc on cgc.courseComponentMuid = cc.muid " + "where cc.teacher = :userId").addEntity(CourseGroupDAO.class); query.setString("userId", userId); return query.list(); } }); }
Source:
<code>public void onLoad(Run<?,?> r) { this.build = r; if( this.projectActions == null ) { <START> this.projectActions = new ArrayList<>(); <END> } this.projectActions.add(new SloccountProjectAction(this.build.getParent(), this.numBuildsInGraph)); }</code><technical_language>This collection type is thread-safe. synchronization logic fail some point</technical_language>

Target:
public void onLoad(Run<?,?> r) { this.build = r; if( this.projectActions == null ) { this.projectActions = new ArrayList<>(); } this.projectActions.add(new SloccountProjectAction(this.build.getParent(), this.numBuildsInGraph)); this.result.setOwner(r); }
Source:
<code>public AccessResultCode execute(final ClientConnection conn, final List<SpecialDay> specialDays) throws IOException, ProtocolAdapterException { final ArrayList<DataObject> specialDayEntries = new ArrayList<DataObject>(); final int i = 0; for (final SpecialDay specialDay : specialDays) { final ArrayList<DataObject> specDayEntry = new ArrayList<DataObject>(); <START> specDayEntry.add(DataObject.newUInteger32Data(i)); <END> specDayEntry.add(this.dlmsHelperService.dateStringToOctetString(specialDay.getSpecialDayDate())); specDayEntry.add(DataObject.newUInteger8Data((short) i)); final DataObject dayStruct = DataObject.newStructureData(specDayEntry); specialDayEntries.add(dayStruct); } final DataObject arrayData = DataObject.newArrayData(specialDayEntries); final RequestParameterFactory factory = new RequestParameterFactory(CLASS_ID, OBIS_CODE, ATTRIBUTE_ID); final SetRequestParameter request = factory.createSetRequestParameter(arrayData); return conn.set(request).get(0); }</code><technical_language>Is this correct? Based definition of special day entries in DLMS Blue Book I expect a long-unsigned (newUInteger16Data)</technical_language>

Target:
public AccessResultCode execute(final ClientConnection conn, final List<SpecialDay> specialDays) throws IOException, ProtocolAdapterException { final ArrayList<DataObject> specialDayEntries = new ArrayList<DataObject>(); int i = 0; for (final SpecialDay specialDay : specialDays) { final ArrayList<DataObject> specDayEntry = new ArrayList<DataObject>(); specDayEntry.add(DataObject.newUInteger16Data(i)); specDayEntry.add(this.dlmsHelperService.dateStringToOctetString(specialDay.getSpecialDayDate())); specDayEntry.add(DataObject.newUInteger8Data((short) specialDay.getDayId())); final DataObject dayStruct = DataObject.newStructureData(specDayEntry); specialDayEntries.add(dayStruct); i += 1; } final DataObject arrayData = DataObject.newArrayData(specialDayEntries); final RequestParameterFactory factory = new RequestParameterFactory(CLASS_ID, OBIS_CODE, ATTRIBUTE_ID); final SetRequestParameter request = factory.createSetRequestParameter(arrayData); return conn.set(request).get(0); }
Source:
<code>public int getSmsCapacityOnIcc() { mContext.enforceCallingOrSelfPermission( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, "getSmsCapacityOnIcc"); int numberOnIcc = 0; if (mPhone.getIccRecordsLoaded()) { final UiccProfile uiccProfile = UiccController.getInstance() .getUiccProfileForPhone(mPhone.getPhoneId()); IccRecords iccRecords = null; if(uiccProfile != null) { iccRecords = uiccProfile.getIccRecords(); } <START> if(uiccProfile != null && <END> iccRecords != null) { numberOnIcc = iccRecords.getSmsCapacityOnIcc(); } else { log("UiccProfile = " + uiccProfile + "IccRecords = " + iccRecords); } } else { log("getSmsCapacityOnIcc - aborting, no icc card present."); } log("getSmsCapacityOnIcc().numberOnIcc = " + numberOnIcc); return numberOnIcc; }</code><technical_language>need I think. iccRecords is null if uiccProfile is null</technical_language>

Target:
public int getSmsCapacityOnIcc() { mContext.enforceCallingOrSelfPermission( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, "getSmsCapacityOnIcc"); int numberOnIcc = 0; if (mPhone.getIccRecordsLoaded()) { final UiccProfile uiccProfile = UiccController.getInstance() .getUiccProfileForPhone(mPhone.getPhoneId()); if(uiccProfile != null) { numberOnIcc = uiccProfile.getIccRecords().getSmsCapacityOnIcc(); } else { loge("uiccProfile is null"); } } else { loge("getSmsCapacityOnIcc - aborting, no icc card present."); } log("getSmsCapacityOnIcc().numberOnIcc = " + numberOnIcc); return numberOnIcc; }
Source:
<code>public List<ApplicationInterfaceDescription> getApplicationInterfaces(Map<String, String> filters) throws AppCatalogException { if(filters.containsKey(DBConstants.ApplicationInterface.APPLICATION_NAME)) { Map<String, Object> queryParameters = new HashMap<>(); queryParameters.put(DBConstants.ApplicationInterface.APPLICATION_NAME, filters.get(DBConstants.ApplicationInterface.APPLICATION_NAME)); List<ApplicationInterfaceDescription> applicationInterfaceDescriptionList = select(QueryConstants.FIND_APPLICATION_INTERFACES_FOR_APPLICATION_NAME, -1,0, queryParameters); return applicationInterfaceDescriptionList; } else { <START> logger.error("Unsupported field name for app interface.", new IllegalArgumentException()); <END> throw new IllegalArgumentException("Unsupported field name for app interface."); } }</code><technical_language>do push a new IllegalArgumentException error logs. print log line</technical_language>

Target:
public List<ApplicationInterfaceDescription> getApplicationInterfaces(Map<String, String> filters) throws AppCatalogException { if(filters.containsKey(DBConstants.ApplicationInterface.APPLICATION_NAME)) { logger.debug("Fetching Application Interfaces for given Application Name"); Map<String, Object> queryParameters = new HashMap<>(); queryParameters.put(DBConstants.ApplicationInterface.APPLICATION_NAME, filters.get(DBConstants.ApplicationInterface.APPLICATION_NAME)); List<ApplicationInterfaceDescription> applicationInterfaceDescriptionList = select(QueryConstants.FIND_APPLICATION_INTERFACES_FOR_APPLICATION_NAME, -1,0, queryParameters); return applicationInterfaceDescriptionList; } else { logger.error("Unsupported field name for app interface."); throw new IllegalArgumentException("Unsupported field name for app interface."); } }
Source:
<code>static String getAsNtriples() { return Arrays.asList(getElasticsearchDocuments().getHits().getHits()) .parallelStream() .flatMap( <START> hit -> Stream.of(toRdf(cleanseEndtime(hit.getSourceAsString())))) <END> .collect(Collectors.joining()); }</code><technical_language>Oh, Stream.of is cool, that. in this case here, map avoid stream altogether, this: .map(hit -> toRdf(cleanseEndtime(hit.getSourceAsString())))</technical_language>

Target:
private static String getAsNtriples() { return Arrays.asList(getElasticsearchDocuments().getHits().getHits()) .parallelStream() .map(hit -> toRdf(cleanseEndtime(hit.getSourceAsString()))) .collect(Collectors.joining()); }
Source:
<code>private boolean isLeftAddOrRightDelete(ReferenceChange diff) { <START> return (diff.getKind() == DifferenceKind.ADD && diff.getSource() == DifferenceSource.LEFT) <END> || (diff.getKind() == DifferenceKind.DELETE && diff.getSource() == DifferenceSource.RIGHT); }</code><technical_language>Checkstyle allow this one, I easier read : if (diff.getSource() == DifferenceSource.LEFT) { return diff.getKind() == DifferenceKind.ADD; } else { return diff.getKind() == DiferenceKind.DELETE; }</technical_language>

Target:
private boolean isLeftAddOrRightDelete(ReferenceChange diff) { if (diff.getSource() == DifferenceSource.LEFT) { return diff.getKind() == DifferenceKind.ADD; } else { return diff.getKind() == DifferenceKind.DELETE; } }
Source:
<code>public Optional<String> getGDALWrapperJarVersion() { if (isAvailable()) { Version v = GeoTools.getVersion(gdal.class); if (v == null) { <START> return Optional.empty(); <END> } return Optional.ofNullable(v.toString()); } else { return "unavailable"; } }</code><technical_language>this occur? running a development environment? I kind of thought GDAL bindings if report version of GDAL used</technical_language>

Target:
public Optional<String> getGDALWrapperJarVersion() { if (isAvailable()) { Version v = GeoTools.getVersion(gdal.class); if (v == null) { return Optional.empty(); } return Optional.ofNullable(v.toString()); } else { return Optional.ofNullable("unavailable"); } }
Source:
<code>public void setupExecutors() throws ExecutorManagerException { activeExecutors.clear(); if (azkProps.containsKey("executor.port")) { String executorHost = azkProps.getString("executor.host", "localhost"); int executorPort = azkProps.getInt("executor.port"); Executor executor = executorLoader.fetchExecutor(executorHost, executorPort); if (executor == null) { executor = executorLoader.addExecutor(executorHost, executorPort); } else if (!executor.isActive()) { executor.setActive(true); executorLoader.updateExecutor(executor); } activeExecutors.add(new Executor(executor.getId(), executorHost, executorPort, true)); } if (azkProps.getBoolean(AZKABAN_USE_MULTIPLE_EXECUTORS, false)) { <START> activeExecutors.addAll(executorLoader.fetchActiveExecutors()); <END> } if (activeExecutors.isEmpty()) { throw new ExecutorManagerException("No active executor found"); } }</code><technical_language>If switched running local executor multiple executors, this load local executor</technical_language>

Target:
public void setupExecutors() throws ExecutorManagerException { Set<Executor> newExecutors = new HashSet<Executor>(); if (isMultiExecutorMode()) { logger.info("Initializing multi executors from database"); newExecutors.addAll(executorLoader.fetchActiveExecutors()); } else if (azkProps.containsKey("executor.port")) { String executorHost = azkProps.getString("executor.host", "localhost"); int executorPort = azkProps.getInt("executor.port"); logger.info(String.format("Initializing local executor %s:%d", executorHost, executorPort)); Executor executor = executorLoader.fetchExecutor(executorHost, executorPort); if (executor == null) { executor = executorLoader.addExecutor(executorHost, executorPort); } else if (!executor.isActive()) { executor.setActive(true); executorLoader.updateExecutor(executor); } newExecutors.add(new Executor(executor.getId(), executorHost, executorPort, true)); } if (newExecutors.isEmpty()) { throw new ExecutorManagerException("No active executor found"); } else if(newExecutors.size() > 1 && !isMultiExecutorMode()) { throw new ExecutorManagerException("Multiple local executors specified"); } else { activeExecutors.clear(); activeExecutors.addAll(newExecutors); } }
Source:
<code><START> public EncounterType saveEncounterType(EncounterType encounterType) throws EncounterTypeLockedException { <END> sessionFactory.getCurrentSession().saveOrUpdate(encounterType); return encounterType; }</code><technical_language>In DAO throw APIExceptions subclasses in general, remove this</technical_language>

Target:
public EncounterType saveEncounterType(EncounterType encounterType) { sessionFactory.getCurrentSession().saveOrUpdate(encounterType); return encounterType; }
Source:
<code>public ExecutorStateEvent(ExecutorService executor, LeaseCoordinator leaseCoordinator) { <START> if (executor instanceof ThreadPoolExecutor) { <END> ThreadPoolExecutor ex = (ThreadPoolExecutor) executor; this.currentQueueSize = ex.getQueue().size(); this.activeThreads = ex.getActiveCount(); this.coreThreads = ex.getCorePoolSize(); this.largestPoolSize = ex.getLargestPoolSize(); this.maximumPoolSize = ex.getMaximumPoolSize(); } this.leasesOwned = leaseCoordinator.getAssignments().size(); }</code><technical_language>this class meaningful ThreadPoolExecutor type is passed. specific type in arguments, instead of allowing executor type</technical_language>

Target:
ExecutorStateEvent(ExecutorService executor, LeaseCoordinator leaseCoordinator) { if (executor instanceof ThreadPoolExecutor) { this.isThreadPoolExecutor = true; ThreadPoolExecutor ex = (ThreadPoolExecutor) executor; this.executorName = ex.getClass().getSimpleName(); this.currentQueueSize = ex.getQueue().size(); this.activeThreads = ex.getActiveCount(); this.coreThreads = ex.getCorePoolSize(); this.largestPoolSize = ex.getLargestPoolSize(); this.maximumPoolSize = ex.getMaximumPoolSize(); } this.leasesOwned = leaseCoordinator.getAssignments().size(); }
Source:
<code>public void accept(InputStream input) { <START> InputStream output = null; <END> try { queue.put(input); } catch (InterruptedException e) { e.printStackTrace(); } if((queue.size()% getBatchSize()) > 0) return; switch (getPhase()) { case INITIALIZING: setPhase(WorkPhase.RUNNING); break; case RUNNING: break; case INTERRUPTING: throw new MarkLogicInternalException( "cannot accept more input as current phase is " + getPhase().name()); case INTERRUPTED: throw new MarkLogicInternalException( "cannot accept more input as current phase is " + getPhase().name()); case COMPLETED: throw new MarkLogicInternalException( "cannot accept more input as current phase is " + getPhase().name()); default: throw new MarkLogicInternalException( "unexpected state for " + getEndpointPath() + " during loop: " + getPhase().name()); } List<InputStream> inputStreamList = new ArrayList<InputStream>(); queue.drainTo(inputStreamList); SessionState session = allowsSession() ? getEndpoint().getCaller().newSessionState() : null; logger.trace("input endpoint running endpoint={} count={} state={}", getEndpointPath(), getCallCount(), getEndpointState()); output = getEndpoint().getCaller().call( getEndpoint().getClient(), getEndpointState(), session, getWorkUnit(), inputStreamList.stream() ); if (allowsEndpointState()) { setEndpointState(output); } }</code><technical_language>declare variable point of assignment line 130? If so, code easier understand for else maintains it</technical_language>

Target:
public void accept(InputStream input) { try { queue.put(input); } catch (InterruptedException e) { e.printStackTrace(); throw new IllegalStateException("InputStream was not added to the queue." + e.getMessage()); } if ((queue.size() % getBatchSize()) > 0) return; switch (getPhase()) { case INITIALIZING: setPhase(WorkPhase.RUNNING); break; case RUNNING: break; case INTERRUPTING: case INTERRUPTED: case COMPLETED: throw new IllegalStateException( "cannot accept more input as current phase is " + getPhase().name()); default: throw new MarkLogicInternalException( "unexpected state for " + getEndpointPath() + " during loop: " + getPhase().name()); } List<InputStream> inputStreamList = new ArrayList<InputStream>(); queue.drainTo(inputStreamList); SessionState session = allowsSession() ? getEndpoint().getCaller().newSessionState() : null; logger.trace("input endpoint running endpoint={} count={} state={}", getEndpointPath(), getCallCount(), getEndpointState()); InputStream output = getEndpoint().getCaller().call(getEndpoint().getClient(), getEndpointState(), session, getWorkUnit(), inputStreamList.stream()); if (allowsEndpointState()) { setEndpointState(output); } }
Source:
<code>private void setupSnackBar() { snackbar = Snackbar.make(root, "", Snackbar.LENGTH_INDEFINITE); <START> View customSnackBarView = getLayoutInflater().inflate(R.layout.snackbar, null); <END> Snackbar.SnackbarLayout snackBarLayout = (Snackbar.SnackbarLayout) snackbar.getView(); snackBarLayout.setPadding(0, 0, 0, 0); TextView noticeField = customSnackBarView.findViewById(R.id.snackbar_text); noticeField.setText(R.string.snackbar_empty_visit_list); TextView dismiss_button = customSnackBarView.findViewById(R.id.snackbar_action_button); dismiss_button.setText(R.string.snackbar_select); Typeface typeface = Typeface.createFromAsset(getActivity().getAssets(), "fonts/Roboto/Roboto-Medium.ttf"); dismiss_button.setTypeface(typeface); dismiss_button.setOnClickListener(v -> mPresenter.fillForm()); snackBarLayout.addView(customSnackBarView, 0); }</code><technical_language>@rishabh-997 I is empty string constant in Application constants</technical_language>

Target:
private void setupSnackBar() { snackbar = Snackbar.make(root, ApplicationConstants.EMPTY_STRING, Snackbar.LENGTH_INDEFINITE); View customSnackBarView = getLayoutInflater().inflate(R.layout.snackbar, null); Snackbar.SnackbarLayout snackBarLayout = (Snackbar.SnackbarLayout) snackbar.getView(); snackBarLayout.setPadding(0, 0, 0, 0); TextView noticeField = customSnackBarView.findViewById(R.id.snackbar_text); noticeField.setText(R.string.snackbar_empty_visit_list); TextView dismissButton = customSnackBarView.findViewById(R.id.snackbar_action_button); dismissButton.setText(R.string.snackbar_select); Typeface typeface = Typeface.createFromAsset(getActivity().getAssets(), ApplicationConstants.TypeFacePathConstants.ROBOTO_MEDIUM); dismissButton.setTypeface(typeface); dismissButton.setOnClickListener(v -> mPresenter.fillForm()); snackBarLayout.addView(customSnackBarView, 0); }
Source:
<code>public void testListRegionsReturns404() { server.enqueue(response404()); List<Region> regions = api.regionAndZoneApi().describeRegions(); assertTrue(isEmpty(regions)); assertEquals(server.getRequestCount(), 1); <START> } <END></code><technical_language>Assert request</technical_language>

Target:
public void testListRegionsReturns404() throws InterruptedException { server.enqueue(response404()); List<Region> regions = api.regionAndZoneApi().describeRegions(); assertTrue(isEmpty(regions)); assertEquals(server.getRequestCount(), 1); assertSent(server, "GET", "DescribeRegions"); }
Source:
<code>public JavaRDD<StructuredRecord> transform(SparkExecutionPluginContext context, JavaRDD<StructuredRecord> input) throws Exception { if (input.isEmpty()) { return context.getSparkContext().emptyRDD(); } outputSchema = outputSchema != null ? outputSchema : config.getOutputSchema(input.first().getSchema()); <START> final Map<String, String> mapping = SparkUtils.getFeatureListMapping(config.outputColumnMapping); <END> return input.map(new Function<StructuredRecord, StructuredRecord>() { @Override public StructuredRecord call(StructuredRecord input) throws Exception { splitter = splitter == null ? Splitter.on(Pattern.compile(config.pattern)) : splitter; StructuredRecord.Builder builder = StructuredRecord.builder(outputSchema); for (Schema.Field field : input.getSchema().getFields()) { String fieldName = field.getName(); builder.set(fieldName, input.get(fieldName)); } for (Map.Entry<String, String> mapEntry : mapping.entrySet()) { String inputField = mapEntry.getKey(); String outputField = mapEntry.getValue(); List<String> text = SparkUtils.getInputFieldValue(input, inputField, splitter); Vector vector = text == null ? Vectors.sparse(0, new int[0], new double[0]) : hashingTF.transform(text); builder.set(outputField, VectorUtils.asRecord((SparseVector) vector)); } return builder.build(); } }); }</code><technical_language>if I unclear this, create a utility function parse string. is fine parse method in individual plugin configs, need give a plugin-specific error message. meant passing Map validation method instead of string</technical_language>

Target:
public JavaRDD<StructuredRecord> transform(SparkExecutionPluginContext context, JavaRDD<StructuredRecord> input) throws Exception { if (input.isEmpty()) { return context.getSparkContext().emptyRDD(); } outputSchema = outputSchema != null ? outputSchema : config.getOutputSchema(input.first().getSchema()); final Map<String, String> mapping = config.getFeatureListMapping(config.outputColumnMapping); return input.map(new Function<StructuredRecord, StructuredRecord>() { @Override public StructuredRecord call(StructuredRecord input) throws Exception { splitter = splitter == null ? Splitter.on(pattern) : splitter; StructuredRecord.Builder builder = StructuredRecord.builder(outputSchema); for (Schema.Field field : input.getSchema().getFields()) { String fieldName = field.getName(); builder.set(fieldName, input.get(fieldName)); } for (Map.Entry<String, String> mapEntry : mapping.entrySet()) { String inputField = mapEntry.getKey(); String outputField = mapEntry.getValue(); List<String> text = SparkUtils.getInputFieldValue(input, inputField, splitter); Vector vector = text == null ? Vectors.sparse(0, new int[0], new double[0]) : hashingTF.transform(text); builder.set(outputField, VectorUtils.asRecord((SparseVector) vector)); } return builder.build(); } }); }
Source:
<code>public ListResolver( Class clazz, Field fieldIfPresent, Class[] genericArgumentsIfPresent, Container parentContainerIfPresent ) { super(clazz, fieldIfPresent, genericArgumentsIfPresent, parentContainerIfPresent); if (fieldIfPresent != null) { genericArgumentsIfPresent = getGenericArgs(fieldIfPresent); } <START> valuesResolver = new Resolver(genericArgumentsIfPresent[0], null, null, null); <END> }</code><technical_language>If a case of List a = new ArrayList; In pre generics java style, throw throw out of bounds</technical_language>

Target:
public ListResolver( Class clazz, Field fieldIfPresent, Class[] genericArgumentsIfPresent, Container parentContainerIfPresent ) { super(clazz, fieldIfPresent, genericArgumentsIfPresent, parentContainerIfPresent); if (fieldIfPresent != null) { genericArgumentsIfPresent = getGenericArgs(fieldIfPresent); } if(genericArgumentsIfPresent.length != 1) { throw new BadGenericsConfigurationException( "List type requires 1 generic argument, provided through a field declaration or through configuration." ); } valuesResolver = new Resolver(genericArgumentsIfPresent[0], null, null, null); }
Source:
<code>private TransactionMethod<Boolean> updateVdsNetworksInTx() { return new TransactionMethod<Boolean>() { @Override public Boolean runInTransaction() { List<VdsNetworkInterface> ifaces = <START> new ArrayList<VdsNetworkInterface>(getInterfaces()); <END> ifaces.addAll(getRemovedBonds().values()); Backend.getInstance().getResourceManager() .RunVdsCommand(VDSCommandType.CollectVdsNetworkData, new CollectHostNetworkDataVdsCommandParameters(getVds(), ifaces)); for (Network net : getNetworks()) { NetworkClusterHelper.setStatus(getVdsGroupId(), net); } return Boolean.TRUE; } }; }</code><technical_language>need for declaring type for ArrayList, is enough: new ArrayList<>(getInterfaces())</technical_language>

Target:
private TransactionMethod<Boolean> updateVdsNetworksInTx() { return new TransactionMethod<Boolean>() { @Override public Boolean runInTransaction() { List<VdsNetworkInterface> ifaces = new ArrayList<>(getInterfaces()); ifaces.addAll(getRemovedBonds().values()); Backend.getInstance().getResourceManager() .RunVdsCommand(VDSCommandType.CollectVdsNetworkData, new CollectHostNetworkDataVdsCommandParameters(getVds(), ifaces)); for (Network net : getNetworks()) { NetworkClusterHelper.setStatus(getVdsGroupId(), net); } return Boolean.TRUE; } }; }
Source:
<code>public void testUserTermination() throws ApiException { ApiClient adminWebClient = getWebClient(ADMIN_USERNAME, testingPostgres); ApiClient userWebClient = getWebClient(USER_2_USERNAME,testingPostgres ); UsersApi userUserWebClient = new UsersApi(userWebClient); final User user = userUserWebClient.getUser(); assertFalse(user.getUsername().isEmpty()); UsersApi adminAdminWebClient = new UsersApi(adminWebClient); final Boolean aBoolean = adminAdminWebClient.terminateUser(user.getId()); assertTrue(aBoolean); boolean shouldFail = false; try { <START> userUserWebClient.getUser(); <END> } catch (ApiException e) { shouldFail = true; } assertTrue(shouldFail); }</code><technical_language>do try { userUserWebClient.getUser(); assertFail("Should've encountered a exception"); } catch (ApiException e) { AssertEqual("blah blah blah", e.getMessage()); } avoids shouldFail</technical_language>

Target:
public void testUserTermination() throws ApiException { ApiClient adminWebClient = getWebClient(ADMIN_USERNAME, testingPostgres); ApiClient userWebClient = getWebClient(USER_2_USERNAME,testingPostgres ); UsersApi userUserWebClient = new UsersApi(userWebClient); final User user = userUserWebClient.getUser(); assertFalse(user.getUsername().isEmpty()); UsersApi adminAdminWebClient = new UsersApi(adminWebClient); final Boolean aBoolean = adminAdminWebClient.terminateUser(user.getId()); assertTrue(aBoolean); try { userUserWebClient.getUser(); fail("should be unreachable, user must not have been banned properly"); } catch (ApiException e) { assertEquals(e.getCode(), HttpStatus.SC_UNAUTHORIZED); } }
Source:
<code>private static URL[] fileToURL(List<File> files) throws IOException { List<URL> urlList = new ArrayList<>(); for (File f : files) { <START> addFileURLs(urlList, f.toURI().toURL()); <END> } return urlList.toArray(new URL[urlList.size()]); }</code><technical_language>addFileUrls, add urlList</technical_language>

Target:
private static URL[] fileToURL(List<File> files) throws IOException { List<URL> urlList = new ArrayList<>(); for (File f : files) { urlList.add(f.toURI().toURL()); } return urlList.toArray(new URL[0]); }
Source:
<code>public int hashCode() { <START> int result = this.args.hashCode(); <END> result = 31 * result + this.executor.hashCode(); result = 31 * result + (this.description != null ? this.description.hashCode() : 0); result = 31 * result + (this.extendedDescription != null ? this.extendedDescription.hashCode() : 0); result = 31 * result + (this.permission != null ? this.permission.hashCode() : 0); result = 31 * result + this.argumentParser.hashCode(); return result; }</code><technical_language>Objects.hashCode(Object...) Guava simplify this (we this in a lot of classes already)</technical_language>

Target:
public int hashCode() { return Objects.hashCode(this.args, this.executor, this.description, this.extendedDescription, this.permission, this.argumentParser); }