auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private Broadcaster<Object> getBroadcaster() { long idToUse = Thread.currentThread().getId(); Broadcaster<Object> broadcaster = broadcasterMap.get(idToUse); if (broadcaster == null) { Broadcaster<Object> existingBroadcaster = broadcasterMap.putIfAbsent(idToUse, Streams.broadcast()); if (existingBroadcaster == null) { broadcaster = broadcasterMap.get(idToUse); synchronized (this.monitor) { if (broadcaster.getSubscription() == null) { Stream<?> outputStream = reactorProcessor.process(broadcaster); outputStream.when(Throwable.class, new Consumer<Throwable>() { @Override public void accept(Throwable throwable) { logger.error(throwable); } }); Controls controls = outputStream.consume(new Consumer<Object>() { @Override public void accept(Object outputObject) { if (ClassUtils.isAssignable(Message.class, outputObject.getClass())) { getOutputChannel().send((Message) outputObject); } else { getOutputChannel().send(MessageBuilder.withPayload(outputObject).build()); } } }); if (logger.isDebugEnabled()) { logger.debug(controls.debug()); } } } } } return broadcaster; }

Target:
private Broadcaster<Object> getBroadcaster() { long idToUse = Thread.currentThread().getId(); Broadcaster<Object> broadcaster = broadcasterMap.get(idToUse); if (broadcaster == null) { Broadcaster<Object> existingBroadcaster = broadcasterMap.putIfAbsent(idToUse, Streams.broadcast()); if (existingBroadcaster == null) { broadcaster = broadcasterMap.get(idToUse); Stream<?> outputStream = reactorProcessor.process(broadcaster); outputStream.when(Throwable.class, new Consumer<Throwable>() { @Override public void accept(Throwable throwable) { logger.error(throwable); } }); Controls controls = outputStream.consume(new Consumer<Object>() { @Override public void accept(Object outputObject) { if (ClassUtils.isAssignable(Message.class, outputObject.getClass())) { getOutputChannel().send((Message) outputObject); } else { getOutputChannel().send(MessageBuilder.withPayload(outputObject).build()); } } }); controlsMap.put(idToUse, controls); broadcaster.observeComplete(new Consumer<Void>() { @Override public void accept(Void aVoid) { broadcasterMap.remove(Thread.currentThread().getId()); } }); if (logger.isDebugEnabled()) { logger.debug(controls.debug()); } } } return broadcaster; }
Source:
public static ImmutableMap<String, Object> buildScalingPolicyMap(ScalingPolicy scalingPolicy) { ImmutableMap.Builder<String, Object> scalingPolicyMapBuilder = ImmutableMap.builder(); scalingPolicyMapBuilder.put("cooldown", scalingPolicy.getCooldown()); scalingPolicyMapBuilder.put("type", scalingPolicy.getType().toString()); scalingPolicyMapBuilder.put("name", scalingPolicy.getName()); String targetString = scalingPolicy.getTarget(); Integer targetInt = Ints.tryParse(targetString); Float targetFloat; if (targetInt != null) { scalingPolicyMapBuilder.put(scalingPolicy.getTargetType().toString(), targetInt); } else if ((targetFloat = Floats.tryParse(targetString)) != null) { scalingPolicyMapBuilder.put(scalingPolicy.getTargetType().toString(), targetFloat); } else { scalingPolicyMapBuilder.put(scalingPolicy.getTargetType().toString(), targetString); } if(scalingPolicy.getSchedulingArgs() != null && scalingPolicy.getType().equals(ScalingPolicy.ScalingPolicyType.SCHEDULE)) { scalingPolicyMapBuilder.put("args", scalingPolicy.getSchedulingArgs()); } return scalingPolicyMapBuilder.build(); }

Target:
public static ImmutableMap<String, Object> buildScalingPolicyMap(ScalingPolicy scalingPolicy) { ImmutableMap.Builder<String, Object> scalingPolicyMapBuilder = ImmutableMap.builder(); scalingPolicyMapBuilder.put("cooldown", scalingPolicy.getCooldown()); scalingPolicyMapBuilder.put("type", scalingPolicy.getType().toString()); scalingPolicyMapBuilder.put("name", scalingPolicy.getName()); String targetString = scalingPolicy.getTarget(); Integer targetInt = Ints.tryParse(targetString); Float targetFloat; if (targetInt != null) { scalingPolicyMapBuilder.put(scalingPolicy.getTargetType().toString(), targetInt); } else if ((targetFloat = Floats.tryParse(targetString)) != null) { scalingPolicyMapBuilder.put(scalingPolicy.getTargetType().toString(), targetFloat); } else { scalingPolicyMapBuilder.put(scalingPolicy.getTargetType().toString(), targetString); } if (scalingPolicy.getSchedulingType() != null && scalingPolicy.getType().equals(ScalingPolicyType.SCHEDULE)) { scalingPolicyMapBuilder.put("args", ImmutableMap.of(scalingPolicy.getSchedulingType().toString(),scalingPolicy.getSchedulingString())); } return scalingPolicyMapBuilder.build(); }
Source:
public SipMessage.Builder<T> withViaHeaders(final ViaHeader... vias) { if (vias != null) { this.viaHeaders = ensureList(this.viaHeaders); this.viaHeaders.clear(); for (final ViaHeader via : vias) { this.viaHeaders.add(via); viaHeader = via; } } return this; }

Target:
public SipMessage.Builder<T> withViaHeaders(final ViaHeader... vias) { if (vias != null && vias.length > 0) { this.viaHeaders = ensureList(this.viaHeaders); this.viaHeaders.clear(); viaHeader = vias[0]; this.viaHeaders.addAll(Arrays.asList(vias)); } return this; }
Source:
public void setMtu(String iface, int mtu) { final NativeDaemonEvent event; try { event = mConnector.execute("interface", "setmtu", iface, mtu); } catch (NativeDaemonConnectorException e) { throw e.rethrowAsParcelableException(); } }

Target:
public void setMtu(String iface, int mtu) { mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); final NativeDaemonEvent event; try { event = mConnector.execute("interface", "setmtu", iface, mtu); } catch (NativeDaemonConnectorException e) { throw e.rethrowAsParcelableException(); } }
Source:
public String getType() { return _type; }

Target:
public Type getType() { return _type; }
Source:
private boolean showWarning(int nb) { IPreferenceStore corePreferenceStore = Activator.getDefault().getPreferenceStore(); boolean hide = corePreferenceStore.getBoolean(ITmfUIPreferences.HIDE_MANY_ENTRIES_SELECTED_TOGGLE); if (nb > 20 && !hide) { MessageDialogWithToggle openOkCancelConfirm = MessageDialogWithToggle.openOkCancelConfirm(getShell(), Messages.AbstractSelectTreeViewer_ManyEntriesSelectedTitle, String.format(Messages.AbstractSelectTreeViewer_ManyEntriesSelectedMessage, nb), Messages.AbstractSelectTreeViewer_ManyEntriesSelectedDontShowAgain, false, null, null); corePreferenceStore.setValue(ITmfUIPreferences.HIDE_MANY_ENTRIES_SELECTED_TOGGLE, openOkCancelConfirm.getToggleState()); int retCode = openOkCancelConfirm.getReturnCode(); return retCode == Window.CANCEL; } return false; }

Target:
private boolean showWarning(int nb) { IPreferenceStore corePreferenceStore = Activator.getDefault().getPreferenceStore(); boolean hide = corePreferenceStore.getBoolean(ITmfUIPreferences.HIDE_MANY_ENTRIES_SELECTED_TOGGLE); if (nb > 20 && !hide) { MessageDialogWithToggle openOkCancelConfirm = MessageDialogWithToggle.openOkCancelConfirm(getShell(), Messages.AbstractSelectTreeViewer_ManyEntriesSelectedTitle, NLS.bind(Messages.AbstractSelectTreeViewer_ManyEntriesSelectedMessage, nb), Messages.AbstractSelectTreeViewer_ManyEntriesSelectedDontShowAgain, false, null, null); corePreferenceStore.setValue(ITmfUIPreferences.HIDE_MANY_ENTRIES_SELECTED_TOGGLE, openOkCancelConfirm.getToggleState()); int retCode = openOkCancelConfirm.getReturnCode(); return retCode == Window.CANCEL; } return false; }
Source:
public void testPossibleParsingWithSqlCalcFoundRowsHint() throws JSQLParserException { AtomicReference<MySqlSqlCalcFoundRows> ref = new AtomicReference<MySqlSqlCalcFoundRows>(); accept(CCJSqlParserUtil.parse("SELECT SQL_CALC_FOUND_ROWS * FROM TABLE"), ref); assertNotNull(ref); assertEquals(MySqlSqlCalcFoundRows.DESCRIPTION, ref.get().getDescription()); ref.set(null); accept(CCJSqlParserUtil.parse("SELECT * FROM TABLE"), ref); assertNull(ref.get()); }

Target:
public void testPossibleParsingWithSqlCalcFoundRowsHint() throws JSQLParserException { MySqlSqlCalcFoundRowRef ref = new MySqlSqlCalcFoundRowRef(false); String sqlCalcFoundRowsContainingSql = "SELECT SQL_CALC_FOUND_ROWS * FROM TABLE"; String generalSql = "SELECT * FROM TABLE"; accept(CCJSqlParserUtil.parse(sqlCalcFoundRowsContainingSql), ref); assertTrue(ref.sqlCalcFoundRows); accept(CCJSqlParserUtil.parse(generalSql), ref); assertFalse(ref.sqlCalcFoundRows); assertSqlCanBeParsedAndDeparsed(sqlCalcFoundRowsContainingSql); assertSqlCanBeParsedAndDeparsed(generalSql); }
Source:
private Multimap<ComponentCategory, SnomedComponentCreateRequest> collectCreateRequests(final BulkRequest<?> bulkRequest) { return FluentIterable.from(bulkRequest.getRequests()).filter(SnomedComponentCreateRequest.class) .index(new Function<Request<?, ?>, ComponentCategory>() { @Override public ComponentCategory apply(final Request<?, ?> input) { if (input instanceof SnomedConceptCreateRequest) { return ComponentCategory.CONCEPT; } else if (input instanceof SnomedDescriptionCreateRequest) { return ComponentCategory.DESCRIPTION; } else if (input instanceof SnomedRelationshipCreateRequest) { return ComponentCategory.RELATIONSHIP; } throw new IllegalArgumentException(String.format("Unknown create request type: %s", input.getClass().getName())); } }); }

Target:
private Multimap<ComponentCategory, BaseSnomedComponentCreateRequest> collectCreateRequests(final BulkRequest<?> bulkRequest) { return FluentIterable.from(bulkRequest.getRequests()).filter(BaseSnomedComponentCreateRequest.class) .index(new Function<Request<?, ?>, ComponentCategory>() { @Override public ComponentCategory apply(final Request<?, ?> input) { if (input instanceof SnomedConceptCreateRequest) { return ComponentCategory.CONCEPT; } else if (input instanceof SnomedDescriptionCreateRequest) { return ComponentCategory.DESCRIPTION; } else if (input instanceof SnomedRelationshipCreateRequest) { return ComponentCategory.RELATIONSHIP; } throw new NotImplementedException("Unknown create request type: %s", input.getClass().getName()); } }); }
Source:
void encode(final ByteBuf out) { final int expectedLength = RntbdRequestFrame.LENGTH + this.headers.computeLength(); final int start = out.writerIndex(); out.writeIntLE(expectedLength); this.frame.encode(out); this.headers.encode(out); checkState(out.writerIndex() - start == expectedLength, "encoding error: {\"expectedLength\": %s, \"observedLength\": %s}", expectedLength, out.writerIndex() - expectedLength); if (this.payload.length > 0) { out.writeIntLE(this.payload.length); out.writeBytes(this.payload); } }

Target:
void encode(final ByteBuf out) { final int expectedLength = RntbdRequestFrame.LENGTH + this.headers.computeLength(); final int start = out.writerIndex(); out.writeIntLE(expectedLength); this.frame.encode(out); this.headers.encode(out); final int observedLength = out.writerIndex() - start; checkState(observedLength == expectedLength, "encoding error: {\"expectedLength\": %s, \"observedLength\": %s}", expectedLength, observedLength); if (this.payload.length > 0) { out.writeIntLE(this.payload.length); out.writeBytes(this.payload); } }
Source:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View root = super.onCreateViewHelper(inflater, container, savedInstanceState, R.layout.new_episodes_fragment, R.string.new_episodes_label); listView.setRemoveListener(new DragSortListView.RemoveListener() { @Override public void remove(int which) { Log.d(TAG, "remove(" + which + ")"); stopItemLoader(); FeedItem item = (FeedItem) listView.getAdapter().getItem(which); DBWriter.markItemRead(getActivity(), true, item.getId()); undoBarController.showUndoBar(false, getString(R.string.marked_as_read_label), new FeedItemUndoToken(item, which) ); } }); undoBarController = new UndoBarController<FeedItemUndoToken>(root.findViewById(R.id.undobar), new UndoBarController.UndoListener<FeedItemUndoToken>() { private final Context context = getActivity(); @Override public void onUndo(FeedItemUndoToken token) { if (token != null) { long itemId = token.getFeedItemId(); DBWriter.markItemRead(context, false, itemId); } } @Override public void onHide(FeedItemUndoToken token) { if (token != null && context != null) { long itemId = token.getFeedItemId(); FeedItem item = DBReader.getFeedItem(context, itemId); FeedMedia media = item.getMedia(); if(media != null && media.hasAlmostEnded() && item.getFeed().getPreferences().getCurrentAutoDelete(UserPreferences.isAutoDelete())) { DBWriter.deleteFeedMediaOfItem(context, media.getId()); } } } }); return root; }

Target:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View root = super.onCreateViewHelper(inflater, container, savedInstanceState, R.layout.new_episodes_fragment, R.string.new_episodes_label); listView.setRemoveListener(new DragSortListView.RemoveListener() { @Override public void remove(int which) { Log.d(TAG, "remove(" + which + ")"); stopItemLoader(); FeedItem item = (FeedItem) listView.getAdapter().getItem(which); DBWriter.markItemRead(getActivity(), true, item.getId()); undoBarController.showUndoBar(false, getString(R.string.marked_as_read_label), new FeedItemUndoToken(item, which) ); } }); undoBarController = new UndoBarController<FeedItemUndoToken>(root.findViewById(R.id.undobar), new UndoBarController.UndoListener<FeedItemUndoToken>() { private final Context context = getActivity(); @Override public void onUndo(FeedItemUndoToken token) { if (token != null) { long itemId = token.getFeedItemId(); DBWriter.markItemRead(context, false, itemId); } } @Override public void onHide(FeedItemUndoToken token) { if (token != null && context != null) { long itemId = token.getFeedItemId(); FeedItem item = DBReader.getFeedItem(context, itemId); FeedMedia media = item.getMedia(); if(media != null && media.hasAlmostEnded() && item.getFeed().getPreferences().getCurrentAutoDelete()) { DBWriter.deleteFeedMediaOfItem(context, media.getId()); } } } }); return root; }
Source:
private void executeGroupSearch(String filter, Set<Map<String, String>> groupDetailsMap, InitialLdapContext ctx, SearchControls searchControls, String[] baseDNs, int x) throws NamingException { NamingEnumeration<SearchResult> answer = ctx.search(baseDNs[x], filter, searchControls); boolean ldapApiEnumerationBugEncountered = false; int resultCount = 0; while ((resultCount <= LDAP_GROUP_QUERY_LIMIT) && (groupDetailsMap.size() <= LDAP_GROUP_QUERY_LIMIT) && (!ldapApiEnumerationBugEncountered) && answer.hasMoreElements()) { SearchResult si = null; try { si = answer.next(); } catch (NullPointerException npe) { ldapApiEnumerationBugEncountered = true; break; } Map<String, String> entry = new HashMap<String, String>(); Attribute nameAttribute = si.getAttributes().get("cn"); if (nameAttribute == null) { continue; } String name = ((String) nameAttribute.get()).trim(); Attribute desc = si.getAttributes().get("description"); String description = desc != null ? (String) desc.get() : ""; description = description.trim(); entry.put("id", name); entry.put("name", name); entry.put("description", description); groupDetailsMap.add(entry); resultCount++; groupQueryResultCount = resultCount; if (groupQueryPageCount == 0) { groupQueryPageCount++; } groupQueryCurrentTime = System.currentTimeMillis(); } }

Target:
private void executeGroupSearch(String filter, Set<Map<String, String>> groupDetailsMap, InitialLdapContext ctx, SearchControls searchControls, String[] baseDNs, int x) throws NamingException { NamingEnumeration<SearchResult> answer = ctx.search(baseDNs[x], filter, searchControls); boolean ldapApiEnumerationBugEncountered = false; int resultCount = 0; while ((resultCount <= LDAP_GROUP_QUERY_LIMIT) && (groupDetailsMap.size() <= LDAP_GROUP_QUERY_LIMIT) && (!ldapApiEnumerationBugEncountered) && answer.hasMoreElements()) { SearchResult si = null; try { si = answer.next(); } catch (NullPointerException npe) { ldapApiEnumerationBugEncountered = true; break; } Map<String, String> entry = new HashMap<String, String>(); Attribute nameAttribute = si.getAttributes().get("cn"); if (nameAttribute == null || nameAttribute.get() == null) { continue; } String name = ((String) nameAttribute.get()).trim(); Attribute desc = si.getAttributes().get("description"); String description = desc != null ? (String) desc.get() : ""; description = description.trim(); entry.put("id", name); entry.put("name", name); entry.put("description", description); groupDetailsMap.add(entry); resultCount++; groupQueryResultCount = resultCount; if (groupQueryPageCount == 0) { groupQueryPageCount++; } groupQueryCurrentTime = System.currentTimeMillis(); } }
Source:
private void setupLookAndFeel() { if (Constant.isMacOsX()) { OsXGui.setup(); } if (lookAndFeelSet) { return; } lookAndFeelSet = true; if (setLookAndFeel(System.getProperty("swing.defaultlaf"))) { return; } OptionsParam options = Model.getSingleton().getOptionsParam(); if (setLookAndFeel(getLookAndFeelClassname(options.getViewParam().getLookAndFeel())) || setLookAndFeel(options.getViewParam().getLookAndFeelInfo().getClassName())) { return; } if (setLookAndFeel(getLookAndFeelClassname("Nimbus"))) { return; } setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); }

Target:
private void setupLookAndFeel() { if (lookAndFeelSet) { return; } lookAndFeelSet = true; if (Constant.isMacOsX()) { OsXGui.setup(); } if (setLookAndFeel(System.getProperty("swing.defaultlaf"))) { return; } OptionsParam options = Model.getSingleton().getOptionsParam(); if (setLookAndFeel(getLookAndFeelClassname(options.getViewParam().getLookAndFeel())) || setLookAndFeel(options.getViewParam().getLookAndFeelInfo().getClassName())) { return; } if (!Constant.isMacOsX() && setLookAndFeel(getLookAndFeelClassname("Nimbus"))) { return; } setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); }
Source:
protected String createSearchPattern(Collection<ImportTemplateData> entities) { String vmt_guidKey = "_VMT_ID ="; String orKey = " or "; StringBuilder searchPattern = new StringBuilder(); searchPattern.append("Template: "); for (ImportTemplateData templateData : entities) { VmTemplate template = templateData.getTemplate(); searchPattern.append(vmt_guidKey); searchPattern.append(template.getId().toString()); searchPattern.append(orKey); searchPattern.append(vmt_guidKey); searchPattern.append(template.getBaseTemplateId().toString()); searchPattern.append(orKey); } return searchPattern.substring(0, searchPattern.length() - orKey.length()); }

Target:
protected String createSearchPattern(Collection<ImportTemplateData> entities) { String vmt_guidKey = "_VMT_ID = "; String orKey = " or "; String prefix = "Template: "; StringJoiner sj = new StringJoiner(orKey, prefix, ""); entities.stream().map(ImportTemplateData::getTemplate).forEach(template -> { sj.add(vmt_guidKey + template.getId().toString()); sj.add(vmt_guidKey + template.getBaseTemplateId().toString()); }); return sj.toString(); }
Source:
void createFileSizeCount(Connection conn) { DSL.using(conn).createTableIfNotExists(FILE_COUNT_BY_SIZE_TABLE_NAME) .column("file_size_kb", SQLDataType.BIGINT) .column("count", SQLDataType.BIGINT) .constraint(DSL.constraint("pk_file_size_kb") .primaryKey("file_size_kb")) .execute(); }

Target:
void createFileSizeCount(Connection conn) { DSL.using(conn).createTableIfNotExists(FILE_COUNT_BY_SIZE_TABLE_NAME) .column("file_size", SQLDataType.BIGINT) .column("count", SQLDataType.BIGINT) .constraint(DSL.constraint("pk_file_size") .primaryKey("file_size")) .execute(); }
Source:
public int dispatch() { boolean subject = (getSubject() == null || getSubject().isEmpty()); if (subject) { return 0; } boolean body = (getBody() == null || getBody().isEmpty()); boolean htmlBody = (getHtmlBody() == null || getHtmlBody().isEmpty()); if (body || htmlBody) { return 0; } final Person person = getPerson(); final Set<String> destinationBccs = getDestinationBccs(); final Set<String> tos = getRecipientAddresses(getTosSet()); final Set<String> ccs = getRecipientAddresses(getCcsSet()); createEmailBatch(person, tos, ccs, split(destinationBccs)); return destinationBccs.size() + tos.size() + ccs.size(); }

Target:
public int dispatch() { if (Strings.isNullOrEmpty(getSubject())) { return 0; } if (Strings.isNullOrEmpty(getBody()) && Strings.isNullOrEmpty(getHtmlBody())) { return 0; } final Person person = getPerson(); final Set<String> destinationBccs = getDestinationBccs(); final Set<String> tos = getRecipientAddresses(getTosSet()); final Set<String> ccs = getRecipientAddresses(getCcsSet()); createEmailBatch(person, tos, ccs, split(destinationBccs)); return destinationBccs.size() + tos.size() + ccs.size(); }
Source:
public void sourceContainersChanged(final ISourceLookupDMContext sourceLookupCtx, final DataRequestMonitor<Boolean> rm) { if (!fDirectors.containsKey(sourceLookupCtx)) { rm.done(false); return; } Map<String, String> entries = getSubstitutionsPaths(sourceLookupCtx); if (entries.equals(fCachedEntries)) { rm.done(false); } else { fCommand.queueCommand(fCommandFactory.createCLIUnsetSubstitutePath(sourceLookupCtx), new DataRequestMonitor<MIInfo>(getExecutor(), rm) { @Override protected void handleSuccess() { initializeSourceSubstitutions(sourceLookupCtx, new RequestMonitor(getExecutor(), rm) { @Override protected void handleSuccess() { rm.done(true); } }); } }); } }

Target:
public void sourceContainersChanged(final ISourceLookupDMContext sourceLookupCtx, final DataRequestMonitor<Boolean> rm) { if (!fDirectors.containsKey(sourceLookupCtx)) { rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE, "No source director configured for given context", null)); rm.done(); return; } Map<String, String> entries = getSubstitutionsPaths(sourceLookupCtx); if (entries.equals(fCachedEntries)) { rm.done(false); } else { fCommand.queueCommand(fCommandFactory.createCLIUnsetSubstitutePath(sourceLookupCtx), new DataRequestMonitor<MIInfo>(getExecutor(), rm) { @Override protected void handleSuccess() { initializeSourceSubstitutions(sourceLookupCtx, new RequestMonitor(getExecutor(), rm) { @Override protected void handleSuccess() { rm.done(true); } }); } }); } }
Source:
private void deleteDir(FileSystem fs, String target) throws Exception { Path path = new Path(target.replaceAll(".*://.*?(?=/)", "")); if (fs.exists(path)) { fs.delete(path, true); if (fs.exists(path)) { warn("Could not delete temp directory " + path + " in CDN!"); } else { info("Deleted " + path); } } }

Target:
private void deleteDir(FileSystem fs, String target) throws Exception { Path path = new Path(extractPathFromUrl(target)); if (fs.exists(path)) { fs.delete(path, true); if (fs.exists(path)) { warn("Could not delete temp directory " + path + " in CDN!"); } else { info("Deleted " + path); } } }
Source:
public void exportMeasurements(MeasurementsExporter exporter) throws IOException { Histogram intervalHistogram = getIntervalHistogramAndAccumulate(); if (histogramLogWriter != null) { histogramLogWriter.outputIntervalHistogram(intervalHistogram); log.close(); } exporter.write(getName(), "Operations", totalHistogram.getTotalCount()); exporter.write(getName(), "AverageLatency(us)", totalHistogram.getMean()); exporter.write(getName(), "MinLatency(us)", totalHistogram.getMinValue()); exporter.write(getName(), "MaxLatency(us)", totalHistogram.getMaxValue()); for (Integer percentile: percentiles) { exporter.write(getName(), percentile + "thPercentileLatency(us)", totalHistogram.getValueAtPercentile(percentile)); } exportReturnCodes(exporter); }

Target:
public void exportMeasurements(MeasurementsExporter exporter) throws IOException { Histogram intervalHistogram = getIntervalHistogramAndAccumulate(); if (histogramLogWriter != null) { histogramLogWriter.outputIntervalHistogram(intervalHistogram); log.close(); } exporter.write(getName(), "Operations", totalHistogram.getTotalCount()); exporter.write(getName(), "AverageLatency(us)", totalHistogram.getMean()); exporter.write(getName(), "MinLatency(us)", totalHistogram.getMinValue()); exporter.write(getName(), "MaxLatency(us)", totalHistogram.getMaxValue()); for (Integer percentile: percentiles) { exporter.write(getName(), ordinal(percentile) + "PercentileLatency(us)", totalHistogram.getValueAtPercentile(percentile)); } exportReturnCodes(exporter); }
Source:
public void setLocked(boolean locked) { mLocked = locked; }

Target:
public void setLocked(boolean locked) { mLocked = locked; notifyDataSetChanged(); }
Source:
public DeviceResourceAssembler(CurieProvider curieProvider, UUID userId) { super(BuddyController.class, DeviceResource.class); this.curieProvider = curieProvider; this.userId = userId; }

Target:
public DeviceResourceAssembler(CurieProvider curieProvider, UUID userId) { super(DeviceController.class, DeviceResource.class); this.curieProvider = curieProvider; this.userId = userId; }
Source:
private Tuple<EntityRef<ConcurrentClusteredMap, Object>, ConcurrentClusteredMap> createConcurrentClusteredMap(String name, Class<?> keyClass, Class<?> valueClass) { try { EntityRef<ConcurrentClusteredMap, Object> clusteredMapRef = clusterConnection.getEntityRef(ConcurrentClusteredMap.class, ConcurrentClusteredMap.VERSION, name); ConcurrentClusteredMap clusteredMap; try { clusteredMap = clusteredMapRef.fetchEntity(); } catch (EntityNotFoundException e) { clusteredMapRef.create(null); clusteredMap = clusteredMapRef.fetchEntity(); } clusteredMap.setTypes(keyClass, valueClass); return new Tuple<EntityRef<ConcurrentClusteredMap, Object>, ConcurrentClusteredMap>(clusteredMapRef, clusteredMap); } catch (EntityNotFoundException e) { throw new AssertionError("Should not happen"); } catch (EntityException e) { LOGGER.error("Classpath issue - missing entity provider", e); throw new AssertionError("Classpath issues as expected entity is not resolvable"); } }

Target:
private ConcurrentClusteredMap createConcurrentClusteredMap(String name, Class<?> keyClass, Class<?> valueClass) { try { EntityRef<ConcurrentClusteredMap, Object> clusteredMapRef = clusterConnection.getEntityRef(ConcurrentClusteredMap.class, ConcurrentClusteredMap.VERSION, name); ConcurrentClusteredMap clusteredMap; try { clusteredMap = clusteredMapRef.fetchEntity(); } catch (EntityNotFoundException e) { clusteredMapRef.create(null); clusteredMap = clusteredMapRef.fetchEntity(); } clusteredMap.setTypes(keyClass, valueClass); return clusteredMap; } catch (EntityNotFoundException e) { throw new AssertionError("Should not happen"); } catch (EntityException e) { LOGGER.error("Classpath issue - missing entity provider", e); throw new AssertionError("Classpath issues as expected entity is not resolvable"); } }
Source:
protected void checkout() throws NoWorkTreeException, IOException { ObjectReader r = db.getObjectDatabase().newReader(); try { for (Map.Entry<String, DirCacheEntry> entry : toBeCheckedOut .entrySet()) { File f = new File(db.getWorkTree(), entry.getKey()); createDir(f.getParentFile()); DirCacheCheckout.checkoutEntry(db, f, entry.getValue(), r); modifiedFiles.add(entry.getKey()); } for (int i = toBeDeleted.size() - 1; i >= 0; i--) { String fileName = toBeDeleted.get(i); File f = new File(db.getWorkTree(), fileName); if (!f.delete()) failingPaths.put(fileName, MergeFailureReason.COULD_NOT_DELETE); modifiedFiles.add(fileName); } } finally { r.release(); } }

Target:
private void checkout() throws NoWorkTreeException, IOException { ObjectReader r = db.getObjectDatabase().newReader(); try { for (Map.Entry<String, DirCacheEntry> entry : toBeCheckedOut .entrySet()) { File f = new File(db.getWorkTree(), entry.getKey()); createDir(f.getParentFile()); DirCacheCheckout.checkoutEntry(db, f, entry.getValue(), r); modifiedFiles.add(entry.getKey()); } for (int i = toBeDeleted.size() - 1; i >= 0; i--) { String fileName = toBeDeleted.get(i); File f = new File(db.getWorkTree(), fileName); if (!f.delete()) failingPaths.put(fileName, MergeFailureReason.COULD_NOT_DELETE); modifiedFiles.add(fileName); } } finally { r.release(); } }
Source:
void onSelectChange(final JQuerySelectPickerEvent event) { final String constraintType = event.target.value; if (!isEmpty(constraintType)) { ConstraintType constraint = ConstraintType.fromString(constraintType); loadComponent(constraint); presenter.setConstraintType(constraint); } }

Target:
void onSelectChange(final JQuerySelectPickerEvent event) { final String constraintType = event.target.value; if (!isEmpty(constraintType)) { final ConstraintType constraint = ConstraintType.fromString(constraintType); loadComponent(constraint); presenter.setConstraintType(constraint); } }
Source:
public UserExtSource getUserExtSourceFromMultipleIdentifiers(PerunSession sess, PerunPrincipal principal) throws InternalErrorException, UserExtSourceNotExistsException, WrongReferenceAttributeValueException { String additionalIdentifiers = principal.getAdditionalInformations().get(additionalIdentifiersAttributeName); if (additionalIdentifiers == null) { throw new WrongReferenceAttributeValueException("Principal's mandatory attribute is not defined: ".concat(additionalIdentifiersAttributeName)); } UserExtSource ues = null; for(String identifier : additionalIdentifiers.split(multivalueAttributeSeparatorRegExp)) { try { ues = perunBl.getUsersManagerBl().getUserExtSourceByUniqueAttributeValue(sess, additionalIdentifiersPerunAttributeName, identifier); log.debug("UserExtSource found using additional identifiers: " + ues); break; } catch (UserExtSourceNotExistsException ex) { } catch (InternalErrorException | AttributeNotExistsException ex) { String errorMessage = "Mandatory attribute is not defined: ".concat(additionalIdentifiersPerunAttributeName); log.error(errorMessage); throw new InternalErrorException(errorMessage, ex); } } if (ues == null) throw new UserExtSourceNotExistsException("User ext source was not found. Searched value is any from \"" + additionalIdentifiers + "\" in " + additionalIdentifiersPerunAttributeName); return ues; }

Target:
public UserExtSource getUserExtSourceFromMultipleIdentifiers(PerunSession sess, PerunPrincipal principal) throws UserExtSourceNotExistsException { String additionalIdentifiers = principal.getAdditionalInformations().get(additionalIdentifiersAttributeName); if (additionalIdentifiers == null) { throw new InternalErrorException("Entry " + additionalIdentifiersAttributeName + " is not defined in the principal's additional information. Either it was not provided by external source used for sign-in or the mapping configuration is wrong."); } UserExtSource ues = null; for(String identifier : additionalIdentifiers.split(multivalueAttributeSeparatorRegExp)) { try { ues = perunBl.getUsersManagerBl().getUserExtSourceByUniqueAttributeValue(sess, additionalIdentifiersPerunAttributeName, identifier); log.debug("UserExtSource found using additional identifiers: " + ues); break; } catch (UserExtSourceNotExistsException ex) { } catch (AttributeNotExistsException ex) { String errorMessage = "Mandatory attribute is not defined: ".concat(additionalIdentifiersPerunAttributeName); log.error(errorMessage); throw new InternalErrorException(errorMessage, ex); } } if (ues == null) throw new UserExtSourceNotExistsException("User ext source was not found. Searched value is any from \"" + additionalIdentifiers + "\" in " + additionalIdentifiersPerunAttributeName); return ues; }
Source:
final public Set<SchoolClass> getSchoolClassesToEnrolBy(final ExecutionCourse executionCourse) { Set<SchoolClass> schoolClasses = getActiveStudentCurricularPlan() != null ? executionCourse .getSchoolClassesBy(getActiveStudentCurricularPlan().getDegreeCurricularPlan()) : new HashSet<SchoolClass>(); return schoolClasses.isEmpty() ? executionCourse.getSchoolClasses() : schoolClasses; }

Target:
final public Set<SchoolClass> getSchoolClassesToEnrolBy(final ExecutionCourse executionCourse) { StudentCurricularPlan scp = getActiveStudentCurricularPlan(); Set<SchoolClass> schoolClasses = scp != null ? executionCourse .getSchoolClassesBy(scp.getDegreeCurricularPlan()) : new HashSet<SchoolClass>(); return schoolClasses.isEmpty() ? executionCourse.getSchoolClasses() : schoolClasses; }
Source:
public CookieFilter(CookieSpec cookieSpec) { this.cookieSpec = cookieSpec; this.allowMultipleCookiesWithTheSameName = false; this.cookieStore = new BasicCookieStore(); }

Target:
public CookieFilter(CookieSpec cookieSpec) { this(cookieSpec, false); }
Source:
protected List<Class<?>> getModelAdapters() { return new ArrayList<>(Arrays.asList( SteppingController.class, IViewerInputProvider.class, ISteppingModeTarget.class, ISourceDisplay.class, IStepIntoHandler.class, IStepIntoSelectionHandler.class, IReverseStepIntoHandler.class, IStepOverHandler.class, IReverseStepOverHandler.class, IStepReturnHandler.class, IUncallHandler.class, ISuspendHandler.class, IResumeHandler.class, IReverseResumeHandler.class, IResumeWithoutSignalHandler.class, IRestartHandler.class, ITerminateHandler.class, IDebugNewExecutableHandler.class, IConnectHandler.class, IDisconnectHandler.class, IModelSelectionPolicyFactory.class, IRefreshAllTarget.class, IChangeReverseMethodHandler.class, IStartTracingHandler.class, IStopTracingHandler.class, ISaveTraceDataHandler.class, ISelectNextTraceRecordHandler.class, ISelectPrevTraceRecordHandler.class, IPinProvider.class, IDebugModelProvider.class, ILaunch.class, ICEditorTextHover.class)); }

Target:
protected List<Class<?>> getModelAdapters() { return new ArrayList<>(Arrays.asList( SteppingController.class, IViewerInputProvider.class, ISteppingModeTarget.class, ISourceDisplay.class, IStepIntoHandler.class, IStepIntoSelectionHandler.class, IReverseStepIntoHandler.class, IStepOverHandler.class, IReverseStepOverHandler.class, IStepReturnHandler.class, IUncallHandler.class, ISuspendHandler.class, IResumeHandler.class, IReverseResumeHandler.class, IResumeWithoutSignalHandler.class, IRestartHandler.class, ITerminateHandler.class, IDebugNewExecutableHandler.class, IConnectHandler.class, IDisconnectHandler.class, IModelSelectionPolicyFactory.class, IRefreshAllTarget.class, IReverseToggleHandler.class, IStartTracingHandler.class, IStopTracingHandler.class, ISaveTraceDataHandler.class, ISelectNextTraceRecordHandler.class, ISelectPrevTraceRecordHandler.class, IPinProvider.class, IDebugModelProvider.class, ILaunch.class, ICEditorTextHover.class)); }
Source:
public void updateMessageView(View view){ if (view == null ) view = getView(); if ( view == null ) return; TextView messageView = (TextView) view.findViewById(R.id.no_chapter_tv); if(adapter.getCount()==0){ messageView.setVisibility(View.VISIBLE); if ( adapter.hasFilteredUnits() ){ Context context = getActivity(); Drawable modeSwitcherDrawable = new IconDrawable(context, FontAwesomeIcons.fa_list) .colorRes(context, R.color.edx_grayscale_neutral_light) .sizeDp(context, 80); messageView.setCompoundDrawablesWithIntrinsicBounds( null, modeSwitcherDrawable, null, null); Resources resources = getResources(); messageView.setText(ResourceUtil.getFormattedString(resources, R.string.assessment_empty_video_info, "mode_switcher", '{' + FontAwesomeIcons.fa_list.key() + " baseline}")); messageView.setContentDescription(ResourceUtil.getFormattedString(resources, R.string.assessment_empty_video_info, "mode_switcher", getText(R.string.course_change_mode))); } else { messageView.setCompoundDrawables(null, null, null, null); messageView.setText(R.string.no_chapter_text); messageView.setContentDescription(null); } }else{ messageView.setVisibility(View.GONE); } }

Target:
public void updateMessageView(View view){ if (view == null ) view = getView(); if ( view == null ) return; TextView messageView = (TextView) view.findViewById(R.id.no_chapter_tv); if(adapter.getCount()==0){ messageView.setVisibility(View.VISIBLE); if ( adapter.hasFilteredUnits() ){ Context context = getActivity(); Drawable modeSwitcherDrawable = new IconDrawable(context, FontAwesomeIcons.fa_list) .colorRes(context, R.color.edx_grayscale_neutral_light) .sizeRes(context, R.dimen.empty_list_icon_size); messageView.setCompoundDrawablesWithIntrinsicBounds( null, modeSwitcherDrawable, null, null); Resources resources = getResources(); messageView.setText(ResourceUtil.getFormattedString(resources, R.string.assessment_empty_video_info, "mode_switcher", '{' + FontAwesomeIcons.fa_list.key() + " baseline}")); messageView.setContentDescription(ResourceUtil.getFormattedString(resources, R.string.assessment_empty_video_info, "mode_switcher", getText(R.string.course_change_mode))); } else { messageView.setCompoundDrawables(null, null, null, null); messageView.setText(R.string.no_chapter_text); messageView.setContentDescription(null); } }else{ messageView.setVisibility(View.GONE); } }
Source:
public Map<String, ByteBuffer> getOperatorState() throws IOException { final Map<String, ByteBuffer> fizedSizeWindowStateMap = super.getOperatorState(); fizedSizeWindowStateMap.put("count", StateSerializer.serializeState(count)); return fizedSizeWindowStateMap; }

Target:
public Map<String, Object> getOperatorState() { final Map<String, Object> stateMap = super.getOperatorState(); stateMap.put("count", count); return stateMap; }
Source:
public void stopMachine(String workspaceId, String machineId) throws NotFoundException, ServerException, ConflictException { Instance targetMachine = null; try (StripedLocks.WriteLock lock = stripedLocks.acquireWriteLock(workspaceId)) { EnvironmentHolder environmentHolder = environments.get(workspaceId); if (environmentHolder == null || environmentHolder.status != EnvStatus.RUNNING) { throw new ConflictException(format("Environment '%s' is not running", workspaceId)); } for (Instance machine : environmentHolder.machines) { if (machine.getId().equals(machineId)) { if (machine.getConfig().isDev()) { throw new ConflictException( "Stop of dev machine is not allowed. Please, stop whole environment"); } targetMachine = machine; break; } } environmentHolder.machines.remove(targetMachine); } if (targetMachine == null) { throw new NotFoundException(format("Machine with ID '%s' is not found in environment of workspace '%s'", machineId, workspaceId)); } eventService.publish(newDto(MachineStatusEvent.class) .withEventType(MachineStatusEvent.EventType.DESTROYING) .withDev(targetMachine.getConfig().isDev()) .withMachineName(targetMachine.getConfig().getName()) .withMachineId(machineId) .withWorkspaceId(workspaceId)); targetMachine.destroy(); eventService.publish(newDto(MachineStatusEvent.class) .withEventType(MachineStatusEvent.EventType.DESTROYED) .withDev(targetMachine.getConfig().isDev()) .withMachineName(targetMachine.getConfig().getName()) .withMachineId(machineId) .withWorkspaceId(workspaceId)); }

Target:
public void stopMachine(String workspaceId, String machineId) throws NotFoundException, ServerException, ConflictException { Instance targetMachine = null; try (StripedLocks.WriteLock lock = stripedLocks.acquireWriteLock(workspaceId)) { EnvironmentHolder environmentHolder = environments.get(workspaceId); if (environmentHolder == null || environmentHolder.status != EnvStatus.RUNNING) { throw new EnvironmentNotRunningException(format("Environment '%s' is not running", workspaceId)); } for (Instance machine : environmentHolder.machines) { if (machine.getId().equals(machineId)) { if (machine.getConfig().isDev()) { throw new ConflictException( "Stop of dev machine is not allowed. Please, stop whole environment"); } targetMachine = machine; break; } } environmentHolder.machines.remove(targetMachine); } if (targetMachine == null) { throw new NotFoundException(format("Machine with ID '%s' is not found in environment of workspace '%s'", machineId, workspaceId)); } eventService.publish(newDto(MachineStatusEvent.class) .withEventType(MachineStatusEvent.EventType.DESTROYING) .withDev(targetMachine.getConfig().isDev()) .withMachineName(targetMachine.getConfig().getName()) .withMachineId(machineId) .withWorkspaceId(workspaceId)); targetMachine.destroy(); eventService.publish(newDto(MachineStatusEvent.class) .withEventType(MachineStatusEvent.EventType.DESTROYED) .withDev(targetMachine.getConfig().isDev()) .withMachineName(targetMachine.getConfig().getName()) .withMachineId(machineId) .withWorkspaceId(workspaceId)); }
Source:
private static Optional<InetAddress> toValidAddress(InetAddress address) { if (address instanceof Inet6Address) { Inet6Address v6Address = (Inet6Address) address; if (isValidV6Address(v6Address)) { return Optional.ofNullable(normalizeV6Address(v6Address)); } } if (isValidAddress(address)) { return Optional.of(address); } return Optional.empty(); }

Target:
private static Optional<InetAddress> toValidAddress(InetAddress address) { if (address instanceof Inet6Address) { Inet6Address v6Address = (Inet6Address) address; if (isValidV6Address(v6Address)) { return Optional.ofNullable(normalizeV6Address(v6Address)); } } if (isValidV4Address(address)) { return Optional.of(address); } return Optional.empty(); }
Source:
public void render(Context context, GlusterVolumeEntity volume, SafeHtmlBuilder sb) { if (volume == null) { return; } int brickCount = volume.getBricks().size(); int count = 0; GlusterStatus status = volume.getStatus(); ImageResource statusImage = null; String tooltip; switch (status) { case DOWN: statusImage = resources.downImage(); tooltip = constants.down(); break; case UP: count = countDownBricks(volume); if(count == 0){ statusImage = resources.upImage(); tooltip = constants.up(); } else if(count < brickCount) { statusImage = resources.volumeBricksDownWarning(); tooltip = constants.volumeBricksDown(); } else { statusImage = resources.volumeAllBricksDownWarning(); tooltip = constants.volumeAllBricksDown(); } break; default: statusImage = resources.downImage(); tooltip = constants.down(); } ImageResource alertImage = resources.alertImage(); SafeHtml statusImageHtml = SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(statusImage).getHTML()); sb.append(applicationTemplates.statusTemplate(statusImageHtml, tooltip)); }

Target:
public void render(Context context, GlusterVolumeEntity volume, SafeHtmlBuilder sb) { if (volume == null) { return; } int brickCount = volume.getBricks().size(); int count = 0; GlusterStatus status = volume.getStatus(); ImageResource statusImage = null; String tooltip; switch (status) { case DOWN: statusImage = resources.downImage(); tooltip = constants.down(); break; case UP: count = countDownBricks(volume); if (count == 0) { statusImage = resources.upImage(); tooltip = constants.up(); } else if (count < brickCount) { statusImage = resources.volumeBricksDownWarning(); tooltip = constants.volumeBricksDown(); } else { statusImage = resources.volumeAllBricksDownWarning(); tooltip = constants.volumeAllBricksDown(); } break; default: statusImage = resources.downImage(); tooltip = constants.down(); } SafeHtml statusImageHtml = SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(statusImage).getHTML()); sb.append(applicationTemplates.statusTemplate(statusImageHtml, tooltip)); }
Source:
public void testBusinessRuleTaskFireLimitAsParameter() throws Exception { KieBase kbase = createKnowledgeBaseWithoutDumper("BPMN2-BusinessRuleTaskWithDataInputLoop.bpmn2", "BPMN2-BusinessRuleTaskInfiniteLoop.drl"); ksession = createKnowledgeSession(kbase); ksession.insert(new Person()); Map<String, Object> parameters = new HashMap<>(); parameters.put("limit", 5); assertThatExceptionOfType(RuntimeException.class).isThrownBy(() -> { ksession.startProcess("BPMN2-BusinessRuleTask", parameters); }) .withMessageContaining("Fire rule limit reached 5"); }

Target:
public void testBusinessRuleTaskFireLimitAsParameter() throws Exception { KieBase kbase = createKnowledgeBaseWithoutDumper("BPMN2-BusinessRuleTaskWithDataInputLoop.bpmn2", "BPMN2-BusinessRuleTaskInfiniteLoop.drl"); ksession = createKnowledgeSession(kbase); ksession.insert(new Person()); Map<String, Object> parameters = Collections.singletonMap("limit", 5); assertThatExceptionOfType(RuntimeException.class).isThrownBy(() -> { ksession.startProcess("BPMN2-BusinessRuleTask", parameters); }) .withMessageContaining("Fire rule limit reached 5"); }
Source:
public void hotSwapScript(Node scriptRoot, Node originalRoot) { if (!isModuleFile(scriptRoot)) return; Node block = IR.block(); block.addChildToBack(IR.exprResult(IR.string("use strict"))); for (Node c = scriptRoot.getFirstChild(); c != null; c = c.getNext()) { block.addChildToBack(c.cloneTree()); } block.addChildToBack(IR.returnNode(IR.name("exports"))); Node loadMod = IR.exprResult(IR.call( IR.getprop(IR.name("goog"), IR.string("loadModule")), IR.function(IR.name(""), IR.paramList(IR.name("exports")), block))); scriptRoot.removeChildren(); scriptRoot.addChildToBack(loadMod); compiler.reportCodeChange(); }

Target:
public void hotSwapScript(Node scriptRoot, Node originalRoot) { if (!NodeUtil.isModuleFile(scriptRoot)) return; Node block = IR.block(); block.addChildToBack(IR.exprResult(IR.string("use strict"))); Node loadMod = IR.exprResult(IR.call( IR.getprop(IR.name("goog"), IR.string("loadModule")), IR.function(IR.name(""), IR.paramList(IR.name("exports")), block))) .srcrefTree(scriptRoot); if (scriptRoot.hasChildren()) { block.addChildrenToBack(scriptRoot.removeChildren()); } block.addChildToBack(IR.returnNode(IR.name("exports")).srcrefTree(scriptRoot)); scriptRoot.addChildToBack(loadMod); compiler.reportCodeChange(); }
Source:
public String showUserPage(@Context HttpServletRequest request, @PathParam("netId") String netId) throws IOException, ApiError { Map<String, Object> parameters = Maps.newHashMap(); parameters.put("user", currentUser); parameters.put("path", request.getRequestURI()); parameters.put("notifications", currentUser.getNotifications()); List<Locale> locales = Collections.list(request.getLocales()); return templateEngine.process("notifications.ftl", locales, parameters); }

Target:
public String showUserPage(@Context HttpServletRequest request, @PathParam("netId") String netId) throws IOException, ApiError, URISyntaxException { return showPersonalUserPage(request); }
Source:
public static Iterable<Reference> getReferences(String referenceSetId, GenomicsFactory.OfflineAuth auth) throws IOException, GeneralSecurityException { Genomics genomics = auth.getGenomics(auth.getDefaultFactory()); Iterable<Reference> references = Paginator.References.create( genomics).search(new SearchReferencesRequest().setReferenceSetId(referenceSetId)); return references; }

Target:
public static Iterable<Reference> getReferences(String referenceSetId, GenomicsFactory.OfflineAuth auth) throws IOException, GeneralSecurityException { Genomics genomics = auth.getGenomics(auth.getDefaultFactory()); return Paginator.References.create( genomics).search(new SearchReferencesRequest().setReferenceSetId(referenceSetId)); }
Source:
public LagPortStats(final ByteBuf buffer) throws InvalidPacketException { this.dot3adAggPortActorSystemID = new Mac(buffer); this.dot3adAggPortPartnerOperSystemID = new Mac(buffer); this.dot3adAggPortAttachedAggID = BufferUtils.uint32(buffer); this.dot3adAggPortState = new Opaque(buffer, Optional.of(4), buffer1 -> Opaque.parseBytes(buffer1)); this.dot3adAggPortStatsLACPDUsRx = BufferUtils.uint32(buffer); this.dot3adAggPortStatsMarkerPDUsRx = BufferUtils.uint32(buffer); this.dot3adAggPortStatsMarkerResponsePDUsRx = BufferUtils.uint32(buffer); this.dot3adAggPortStatsUnknownRx = BufferUtils.uint32(buffer); this.dot3adAggPortStatsIllegalRx = BufferUtils.uint32(buffer); this.dot3adAggPortStatsLACPDUsTx = BufferUtils.uint32(buffer); this.dot3adAggPortStatsMarkerPDUsTx = BufferUtils.uint32(buffer); this.dot3adAggPortStatsMarkerResponsePDUsTx = BufferUtils.uint32(buffer); }

Target:
public LagPortStats(final ByteBuf buffer) throws InvalidPacketException { this.dot3adAggPortActorSystemID = new Mac(buffer); this.dot3adAggPortPartnerOperSystemID = new Mac(buffer); this.dot3adAggPortAttachedAggID = BufferUtils.uint32(buffer); this.dot3adAggPortState = new Opaque(buffer, Optional.of(4), Opaque::parseBytes); this.dot3adAggPortStatsLACPDUsRx = BufferUtils.uint32(buffer); this.dot3adAggPortStatsMarkerPDUsRx = BufferUtils.uint32(buffer); this.dot3adAggPortStatsMarkerResponsePDUsRx = BufferUtils.uint32(buffer); this.dot3adAggPortStatsUnknownRx = BufferUtils.uint32(buffer); this.dot3adAggPortStatsIllegalRx = BufferUtils.uint32(buffer); this.dot3adAggPortStatsLACPDUsTx = BufferUtils.uint32(buffer); this.dot3adAggPortStatsMarkerPDUsTx = BufferUtils.uint32(buffer); this.dot3adAggPortStatsMarkerResponsePDUsTx = BufferUtils.uint32(buffer); }
Source:
default Type getType() { return new DefaultParameterizedType(null, List.class, Block.class); }

Target:
default Type getType() { return String.class; }