auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void init() { LOGGER.info("IPF Module started - Java compiled."); }

Target:
public String init() { LOGGER.info("IPF Module started - Java compiled."); return ipfGroovyInitializer.init(); }
Source:
private ContextGeneralPanel getContextGeneralPanel(Context context) { for (AbstractParamPanel panel : contextPanels) { if (panel instanceof ContextGeneralPanel) { ContextGeneralPanel contextGeneralPanel = (ContextGeneralPanel) panel; if (contextGeneralPanel.getContextIndex() == context.getId()) { return contextGeneralPanel; } } } return null; }

Target:
private ContextGeneralPanel getContextGeneralPanel(Context context) { for (AbstractParamPanel panel : contextPanels) { if (panel instanceof ContextGeneralPanel) { ContextGeneralPanel contextGeneralPanel = (ContextGeneralPanel) panel; if (contextGeneralPanel.getContextId() == context.getId()) { return contextGeneralPanel; } } } return null; }
Source:
static Module module() { return new CacheModule() { @Override protected void configure() { final String cacheName = CACHE_NAME; final TypeLiteral<Cache<ActiveSession.Key, ActiveSession>> type = new TypeLiteral<Cache<ActiveSession.Key, ActiveSession>>() {}; core(type, cacheName) .memoryLimit(1024) .maxAge(12, HOURS) .evictionPolicy(EvictionPolicy.LRU) ; bind(WebSession.class).in(RequestScoped.class); } }; }

Target:
static Module module() { return new CacheModule() { @Override protected void configure() { final TypeLiteral<Cache<ActiveSession.Key, ActiveSession>> type = new TypeLiteral<Cache<ActiveSession.Key, ActiveSession>>() {}; core(type, CACHE_NAME) .memoryLimit(1024) .maxAge(12, HOURS) .evictionPolicy(EvictionPolicy.LRU) ; bind(WebSession.class).in(RequestScoped.class); } }; }
Source:
public void flattenToBuffer(ByteBuffer buf) { assert(m_exception == null || m_status != SUCCESS); buf.put(VoltDbMessageFactory.FRAGMENT_RESPONSE_ID); buf.putLong(m_executorHSId); buf.putLong(m_destinationHSId); buf.putLong(m_txnId); buf.putLong(m_spHandle); buf.put(m_status); buf.put((byte) (m_dirty ? 1 : 0)); buf.put((byte) (m_recovering ? 1 : 0)); buf.put((byte) (m_respBufferable ? 1 : 0)); buf.putShort(m_dependencyCount); for (int i = 0; i < m_dependencyCount; i++) buf.putInt(m_dependencyIds.get(i)); for (int i = 0; i < m_dependencyCount; i++) { VoltTable dep = m_dependencies.get(i); if (dep == null) { buf.put((byte) 0); } else { buf.put((byte) 1); dep.flattenToBuffer(buf); } } if (m_exception != null) { m_exception.serializeToBuffer(buf); } else { buf.putInt(0); } assert(buf.capacity() == buf.position()); buf.limit(buf.position()); }

Target:
public void flattenToBuffer(ByteBuffer buf) { assert(m_exception == null || m_status != SUCCESS); buf.put(VoltDbMessageFactory.FRAGMENT_RESPONSE_ID); buf.putLong(m_executorHSId); buf.putLong(m_destinationHSId); buf.putLong(m_txnId); buf.putLong(m_spHandle); buf.put(m_status); buf.put((byte) (m_dirty ? 1 : 0)); buf.put((byte) (m_recovering ? 1 : 0)); buf.putShort(m_dependencyCount); for (int i = 0; i < m_dependencyCount; i++) buf.putInt(m_dependencyIds.get(i)); for (int i = 0; i < m_dependencyCount; i++) { VoltTable dep = m_dependencies.get(i); if (dep == null) { buf.put((byte) 0); } else { buf.put((byte) 1); dep.flattenToBuffer(buf); } } if (m_exception != null) { m_exception.serializeToBuffer(buf); } else { buf.putInt(0); } assert(buf.capacity() == buf.position()); buf.limit(buf.position()); }
Source:
public static Message parse(byte[] array) { String[] message = new String(array, UTF8).split("\n"); Message result = new Message(); Command parsedCommand = Command.valueOf(message[0]); result.setCommand(parsedCommand.toString()); Map<String, String> headers = new HashMap<>(); int i = 1; String currentLine = message[i]; while (currentLine.length() > 0) { int ind = currentLine.indexOf(':'); String key = currentLine.substring(0, ind); String value = currentLine.substring(ind + 1, currentLine.length()); headers.put(key.trim(), value.trim()); currentLine = message[++i]; } result.withHeaders(headers); i++; StringBuilder content = new StringBuilder(); for (int j = i; j < message.length; j++) { content.append(message[j]); } result.withContent(content.toString()); return result; }

Target:
public static Message parse(byte[] array) { String[] message = new String(array, UTF8).split("\n"); Message result = new Message(); Command parsedCommand = Command.valueOf(message[0]); result.setCommand(parsedCommand.toString()); Map<String, String> headers = new HashMap<>(); int i = 1; String currentLine = message[i]; while (currentLine.length() > 0) { int ind = currentLine.indexOf(':'); String key = currentLine.substring(0, ind); String value = currentLine.substring(ind + 1, currentLine.length()); headers.put(key, value); currentLine = message[++i]; } result.withHeaders(headers); result.withContent(getContent(array, message, ++i)); return result; }
Source:
public static Map<String, Object> JSONValueToHashMap(final String json) { LinkedHashMap<String, Object> keyValueMap = new LinkedHashMap<String, Object>(); if (UtilMethods.isSet(json)) { if (json.equals(ContentletCache.CACHED_METADATA)) { Logger.error(KeyValueFieldUtil.class, "Trying to parse JSON content for cached Metadata, it is required first to search the data into the cache."); return keyValueMap; } String json2; if (json.contains("\\")) { json2 = UtilMethods.replace(json, "\\", "&#92;"); } else { json2 = json; } Gson gson = new Gson(); return gson.fromJson(json2, new TypeToken<LinkedHashMap<String, String>>() { }.getType()); } return keyValueMap; }

Target:
public static Map<String, Object> JSONValueToHashMap(final String json) { LinkedHashMap<String, Object> keyValueMap = new LinkedHashMap<String, Object>(); if (UtilMethods.isSet(json)) { if (json.equals(ContentletCache.CACHED_METADATA)) { Logger.error(KeyValueFieldUtil.class, "Trying to parse JSON content for cached Metadata, it is required first to search the data into the cache."); return keyValueMap; } String replacedJSJson; if (json.contains("\\")) { replacedJSJson = UtilMethods.replace(json, "\\", "&#92;"); } else { replacedJSJson = json; } return MarshalFactory.getInstance().getMarshalUtils().unmarshal(replacedJSJson, Map.class); } return keyValueMap; }
Source:
public static Path sanitizeStoragePath(String storagePath) { File storageDirectory = new File(storagePath, MAGIC_SUFFIX); Preconditions.checkArgument( storageDirectory.getParentFile().isDirectory(), "Storage path has to point to a directory", SafeArg.of("storageDirectory", storageDirectory.getParentFile().getAbsolutePath())); if (!storageDirectory.exists()) { Preconditions.checkState( storageDirectory.mkdir(), "Not able to create a storage directory", SafeArg.of("storageDirectory", storageDirectory.getAbsolutePath())); return storageDirectory.toPath().toAbsolutePath(); } Preconditions.checkState( storageDirectory.isDirectory(), "Persistent storage path magic atlas subfolder path points to a directory", SafeArg.of("storageDirectory", storageDirectory.getAbsolutePath())); try { deletePath(storageDirectory.toPath().toAbsolutePath()); } catch (IOException e) { throw new RuntimeException(e); } return storageDirectory.toPath().toAbsolutePath(); }

Target:
public static Path sanitizeStoragePath(String storagePath) { File storageDirectory = new File(storagePath, MAGIC_SUFFIX); Preconditions.checkArgument( storageDirectory.getParentFile().isDirectory(), "Storage path has to point to a directory", SafeArg.of("storageDirectory", storageDirectory.getParentFile().getAbsolutePath())); if (!storageDirectory.exists()) { Preconditions.checkState( storageDirectory.mkdir(), "Not able to create a storage directory", SafeArg.of("storageDirectory", storageDirectory.getAbsolutePath())); return storageDirectory.toPath().toAbsolutePath(); } Preconditions.checkState( storageDirectory.isDirectory(), "Dedicated persistent storage path does not point to a directory. " + "Note this is not the same as the provided storage path as we create a special subfolder.", SafeArg.of("storageDirectory", storageDirectory.getAbsolutePath())); try { deletePath(storageDirectory.toPath().toAbsolutePath()); } catch (IOException e) { throw new RuntimeException(e); } return storageDirectory.toPath().toAbsolutePath(); }
Source:
public void update() { super.update(); if (this.world.isRemote) { return; } if (isSunOut()) { this.powerToAdd = this.generationRateD; this.addEnergy(this.powerToAdd); } else if(this.world.canBlockSeeSky(this.pos.up())) { this.powerToAdd = this.generationRateN; this.addEnergy(this.powerToAdd); } }

Target:
public void update() { super.update(); if (this.world.isRemote) { return; } if (world.getTotalWorldTime() % 20 == 0) { canSeeSky = this.world.canBlockSeeSky(this.pos.up()); } if (isSunOut()) { this.powerToAdd = panel.generationRateD; } else if (canSeeSky) { this.powerToAdd = panel.generationRateN; } else { this.powerToAdd = 0; } this.addEnergy(this.powerToAdd); }
Source:
public TrackedEventMessage<?> nextAvailable() { try { hasNextAvailable(Integer.MAX_VALUE, TimeUnit.MILLISECONDS); TrackedEventMessage<?> next = peekEvent == null ? eventStream.next() : peekEvent; logger.trace("Polling next available event in an Event Buffer {}. Tracking Token {}.", next.getIdentifier(), this, next.trackingToken()); return next; } catch (InterruptedException e) { logger.warn("Consumer thread was interrupted. Returning thread to event processor.", e); Thread.currentThread().interrupt(); return null; } finally { peekEvent = null; } }

Target:
public TrackedEventMessage<?> nextAvailable() { try { hasNextAvailable(Integer.MAX_VALUE, TimeUnit.MILLISECONDS); TrackedEventMessage<?> next = peekEvent == null ? eventStream.next() : peekEvent; if (logger.isTraceEnabled()) { logger.trace("Polled next available event in an Event Buffer {}. Tracking Token {}.", next.getIdentifier(), this, next.trackingToken()); } return next; } catch (InterruptedException e) { logger.warn("Consumer thread was interrupted. Returning thread to event processor.", e); Thread.currentThread().interrupt(); return null; } finally { peekEvent = null; } }
Source:
private int getHeight() { if (connection == null) { return 40; } if (connection instanceof TerminalConnection) { return ((TerminalConnection) connection).getTerminal().getSize().getHeight(); } return connection.size().getHeight(); }

Target:
private int getHeight() { if (connection == null) { return 40; } return connection.size().getHeight(); }
Source:
private static boolean startWithInsertion(final Cigar cigar) { for(final CigarElement element: cigar.getCigarElements()) { switch(element.getOperator()) { case I: return true; case S: continue; default: break; } } return false; }

Target:
private static boolean startWithInsertion(final Cigar cigar) { for (final CigarElement element : cigar.getCigarElements()) { if (element.getOperator()==CigarOperator.I) return true; if (!element.getOperator().consumesReferenceBases()) continue; break; } return false; }
Source:
protected AnchorListItem getBulkRequeue(final ExtendedPagedTable<RequestSummary> extendedPagedTable) { final AnchorListItem bulkAbortNavLink = GWT.create(AnchorListItem.class); bulkAbortNavLink.setText(constants.Bulk_Requeue_jobs()); bulkAbortNavLink.setIcon(IconType.BAN); bulkAbortNavLink.setIconFixedWidth(true); bulkAbortNavLink.addClickHandler(event -> confirmPopup.show(constants.Requeue_Jobs_Confirmation(), constants.Requeue_Jobs(), constants.Requeue_Jobs_Sure(), getRequeueCommand(extendedPagedTable)) ); return bulkAbortNavLink; }

Target:
protected AnchorListItem getBulkRequeue(final ExtendedPagedTable<RequestSummary> extendedPagedTable) { final AnchorListItem bulkAbortNavLink = GWT.create(AnchorListItem.class); bulkAbortNavLink.setText(constants.Bulk_Requeue_jobs()); bulkAbortNavLink.setIcon(IconType.HISTORY); bulkAbortNavLink.setIconFixedWidth(true); bulkAbortNavLink.addClickHandler(event -> confirmPopup.show(constants.Requeue_Jobs_Confirmation(), constants.Requeue_Jobs(), constants.Requeue_Jobs_Sure(), getRequeueCommand(extendedPagedTable)) ); return bulkAbortNavLink; }
Source:
private void startInstance(Object obj) throws Exception { log.debug("Starting %s", obj.getClass().getName()); LifeCycleMethods methods = methodsMap.get(obj.getClass()); for (Method postConstruct : methods.methodsFor(PostConstruct.class)) { log.debug("\t%s()", postConstruct.getName()); try { postConstruct.invoke(obj); } catch (Exception e) { Exception cause = unwrapInvocationTargetException(e); log.debug(cause, "Exception in PostConstruct method %s::%s()", obj.getClass().getName(), postConstruct.getName()); stopInstance(obj, (Class<?> klass, Method method, Exception exception) -> { log.debug(exception, "Exception in PreDestroy method %1$s::%2$s() after PostConstruct failure in %1$s::%3$s()", klass.getName(), method.getName(), postConstruct.getName()); cause.addSuppressed(exception); }); throw cause; } } }

Target:
private void startInstance(Object obj) throws LifeCycleStartException { log.debug("Starting %s", obj.getClass().getName()); LifeCycleMethods methods = methodsMap.get(obj.getClass()); for (Method postConstruct : methods.methodsFor(PostConstruct.class)) { log.debug("\t%s()", postConstruct.getName()); try { postConstruct.invoke(obj); } catch (Exception e) { LifeCycleStartException failure = new LifeCycleStartException( format("Exception in PostConstruct method %s::%s()", obj.getClass().getName(), postConstruct.getName()), unwrapInvocationTargetException(e)); stopInstance(obj, (Class<?> klass, Method method, Exception exception) -> { String message = format("Exception in PreDestroy method %1$s::%2$s() after PostConstruct failure in %1$s::%3$s()", klass.getName(), method.getName(), postConstruct.getName()); failure.addSuppressed(new RuntimeException(message, exception)); }); throw failure; } } }
Source:
public PartitionResponse(Errors error, long baseOffset, long logAppendTime, long logStartOffset) { this(error, baseOffset, logAppendTime, logStartOffset, new HashMap<>(), ""); }

Target:
public PartitionResponse(Errors error, long baseOffset, long logAppendTime, long logStartOffset) { this(error, baseOffset, logAppendTime, logStartOffset, Collections.emptyMap(), null); }
Source:
public void draw(Batch batch, float parentAlpha) { ArrayList<PointF> stitchPoints = EmbroideryManager.getStitchPoints(); if (stitchPoints.size() >= 2) { batch.end(); ShapeRenderer renderer = StageActivity.stageListener.shapeRenderer; renderer.setColor(Color.BLACK); renderer.begin(ShapeRenderer.ShapeType.Filled); for (int index = 0; index < EmbroideryManager.getLastIndex(); index++) { PointF point = stitchPoints.get(index); PointF nextPoint = stitchPoints.get(index + 1); renderer.circle(point.x, point.y, EmbroideryManager.getStitchSize()); renderer.rectLine(point.x, point.y, nextPoint.x, nextPoint.y, EmbroideryManager.getStitchSize()); } PointF lastPoint = stitchPoints.get(EmbroideryManager.getLastIndex()); renderer.circle(lastPoint.x, lastPoint.y, EmbroideryManager.getStitchSize()); renderer.end(); batch.begin(); } }

Target:
public void draw(Batch batch, float parentAlpha) { StageActivity.stageListener.getEmbroideryManager().lockStitchpoints(); ArrayList<PointF> stitchPoints = StageActivity.stageListener.getEmbroideryManager().getStitchPoints(); ListIterator<PointF> iterator = stitchPoints.listIterator(); if (stitchPoints.size() >= 2) { batch.end(); ShapeRenderer renderer = StageActivity.stageListener.shapeRenderer; renderer.setColor(Color.BLACK); renderer.begin(ShapeRenderer.ShapeType.Filled); PointF previousPoint = iterator.next(); while (iterator.hasNext()) { PointF point = iterator.next(); renderer.circle(previousPoint.x, previousPoint.y, stitchSize); renderer.rectLine(previousPoint.x, previousPoint.y, point.x, point.y, stitchSize); previousPoint = point; } renderer.circle(previousPoint.x, previousPoint.y, stitchSize); renderer.end(); batch.begin(); } StageActivity.stageListener.getEmbroideryManager().unlockStitchpoints(); }
Source:
public int getMaxMaxMemorySize(Integer osId, Version compatVersion) { String usedVersion = (compatVersion != null) ? compatVersion.getValue() : Version.getLast().getValue(); if (osId == null) { return getMaxMaxMemoryForAllOss(usedVersion); } final ConfigValues maxMaxMemoryConfigValue = getMaxMaxMemoryConfigValue(osId); return (Integer) getConfigValuePreConverted(maxMaxMemoryConfigValue, usedVersion); }

Target:
public int getMaxMaxMemorySize(Integer osId, Version compatVersion) { String usedVersion = compatVersion != null ? compatVersion.getValue() : Version.getLast().getValue(); if (osId == null) { return getMaxMaxMemoryForAllOss(usedVersion); } final ConfigValues maxMaxMemoryConfigValue = getMaxMaxMemoryConfigValue(osId); return (Integer) getConfigValuePreConverted(maxMaxMemoryConfigValue, usedVersion); }
Source:
public static DecimalEncodedValue create() { return new FactorizedDecimalEncodedValue(KEY, 5, 5, true); }

Target:
public static DecimalEncodedValue create() { return new FactorizedDecimalEncodedValue(KEY, 5, 5, UNSET_SPEED, true); }
Source:
public Response toResponse(ResourceNotFoundException exception) { return Response.status(Response.Status.NOT_FOUND).build(); }

Target:
public Response toResponse(ResourceNotFoundException exception) { return Response.status(HttpResponseCodes.SC_NOT_FOUND).build(); }
Source:
public static void fillImagesMapBasedOnTemplate(VmTemplate template, List<StorageDomain> domains, Map<Guid, DiskImage> diskInfoDestinationMap, Map<Guid, StorageDomain> destStorages) { Map<Guid, StorageDomain> storageDomainsMap = new HashMap<>(); for (StorageDomain storageDomain : domains) { StorageDomainValidator validator = new StorageDomainValidator(storageDomain); if (validator.isDomainExistAndActive().isValid() && validator.domainIsValidDestination().isValid()) { storageDomainsMap.put(storageDomain.getId(), storageDomain); } } for (DiskImage image : template.getDiskTemplateMap().values()) { for (Guid storageId : image.getStorageIds()) { if (storageDomainsMap.containsKey(storageId)) { ArrayList<Guid> storageIds = new ArrayList<>(); storageIds.add(storageId); image.setStorageIds(storageIds); diskInfoDestinationMap.put(image.getId(), image); break; } } } if (destStorages != null) { destStorages.putAll(diskInfoDestinationMap.values().stream() .collect(Collectors.toMap(d -> d.getStorageIds().get(0), d -> storageDomainsMap.get(d.getStorageIds().get(0))))); } }

Target:
public static void fillImagesMapBasedOnTemplate(VmTemplate template, List<StorageDomain> domains, Map<Guid, DiskImage> diskInfoDestinationMap, Map<Guid, StorageDomain> destStorages) { Map<Guid, StorageDomain> storageDomainsMap = domains.stream().filter(ImagesHandler::isDomainValidDestination) .collect(Collectors.toMap(d -> d.getId(), Function.identity())); for (DiskImage image : template.getDiskTemplateMap().values()) { for (Guid storageId : image.getStorageIds()) { if (storageDomainsMap.containsKey(storageId)) { ArrayList<Guid> storageIds = new ArrayList<>(); storageIds.add(storageId); image.setStorageIds(storageIds); diskInfoDestinationMap.put(image.getId(), image); break; } } } if (destStorages != null) { destStorages.putAll(diskInfoDestinationMap.values().stream() .collect(Collectors.toMap(d -> d.getStorageIds().get(0), d -> storageDomainsMap.get(d.getStorageIds().get(0))))); } }
Source:
public void visitDistanceBufferType(VisitableElement<List<Object>> visitable) { traceName(visitable); List<Object> values = visitable.getValue(); if (values == null || values.isEmpty()) { LOGGER.debug("No values found on distance buffer type"); return; } builder.beginBinarySpatialType("DWITHIN"); visitable .getValue() .stream() .map(VisitableElement.class::cast) .forEachOrdered(v -> v.accept(this)); builder.endTerminalType(); }

Target:
public void visitDistanceBufferType(VisitableElement<List<Object>> visitable) { traceName(visitable); List<Object> values = visitable.getValue(); if (CollectionUtils.isEmpty(values)) { LOGGER.debug("No values found on distance buffer type"); return; } builder.beginBinarySpatialType("DWITHIN"); visitable .getValue() .stream() .map(VisitableElement.class::cast) .forEachOrdered(v -> v.accept(this)); builder.endTerminalType(); }
Source:
private Object getTableUpdaterLock(String offlineTableName) { return _tableUpdaterLocks[offlineTableName.hashCode() % _tableUpdaterLocks.length]; }

Target:
private Object getTableUpdaterLock(String offlineTableName) { return _tableUpdaterLocks[(offlineTableName.hashCode() & Integer.MAX_VALUE) % _tableUpdaterLocks.length]; }
Source:
protected void addVmNumaNodes() { List<VdsNumaNode> numaNodes = new ArrayList<VdsNumaNode>(); for (VmNumaNode vnode : getParameters().getVmStaticData().getvNumaNodeList()) { numaNodes.add(vnode); } DbFacade.getInstance().getVmNumaNodeDAO().massSaveNumaNode(numaNodes, null, getVmId()); }

Target:
protected void addVmNumaNodes() { List<VmNumaNode> numaNodes = getParameters().getVmStaticData().getvNumaNodeList(); VmNumaNodeOperationParameters params = new VmNumaNodeOperationParameters(getVmId(), numaNodes); getBackend().runInternalAction(VdcActionType.AddVmNumaNodes, params); }
Source:
private void setupMediaControls(Context context, Intent intent) { if (!Settings.showMediaStyleNotification(context) || activity == null) { return; } String template = intent.getStringExtra("template"); if (template == null || !template.contains("MediaStyle")) { return; } Log.i(TAG, "Show MediaStyle notification"); Log.i(TAG, "template = " + template); int iconId = intent.getIntExtra("iconId", -1); String packageName = intent.getStringExtra("packageName"); Drawable notificationMessageSmallIcon = getNotificationIcon(context, packageName, iconId); View clockLayout = contentView.findViewById(R.id.clockLayout); ConstraintLayout mediaStyleContainer = contentView.findViewById(R.id.notification_mediacontrol_bar); MediaControlLayout mediaControlLayout = new MediaControlLayout(mediaStyleContainer); mediaStyleContainer.removeAllViews(); mediaStyleContainer.addView(mediaControlLayout.getView()); mediaControlLayout.setupFromNotificationIntent(context, intent, notificationMessageSmallIcon); NightDreamUI nightDreamUI = new NightDreamUI(context, NightDreamActivity.window ); mediaControlLayout.setColor(nightDreamUI.getSecondaryColor()); clockLayout.postDelayed(new Runnable() { @Override public void run() { activity.onConfigurationChanged(activity.getResources().getConfiguration()); } }, 500); }

Target:
private void setupMediaControls(Context context, Intent intent) { if (!Settings.showMediaStyleNotification(context) || activity == null) { return; } String template = intent.getStringExtra("template"); if (template == null || !template.contains("MediaStyle")) { return; } Log.i(TAG, "Show MediaStyle notification"); Log.i(TAG, "template = " + template); int iconId = intent.getIntExtra("iconId", -1); String packageName = intent.getStringExtra("packageName"); Drawable notificationMessageSmallIcon = getNotificationIcon(context, packageName, iconId); View clockLayout = contentView.findViewById(R.id.clockLayout); ConstraintLayout mediaStyleContainer = contentView.findViewById(R.id.notification_mediacontrol_bar); if (mediaStyleContainer != null) { View boundView = mediaStyleContainer.getChildAt(0); NotificationMediacontrolBinding mediaControlLayoutBinding = DataBindingUtil.getBinding(boundView); if (mediaControlLayoutBinding != null) { mediaControlLayoutBinding.getModel().setupFromNotificationIntent(context, intent, notificationMessageSmallIcon); mediaControlLayoutBinding.invalidateAll(); } else { MediaControlLayout mediaControlLayout = new MediaControlLayout(mediaStyleContainer); mediaStyleContainer.removeAllViews(); mediaStyleContainer.addView(mediaControlLayout.getView()); mediaControlLayout.setupFromNotificationIntent(context, intent, notificationMessageSmallIcon); } } clockLayout.postDelayed(new Runnable() { @Override public void run() { activity.onConfigurationChanged(activity.getResources().getConfiguration()); } }, 500); }
Source:
static <T1> Tuple1<Seq<T1>> sequence1(Iterable<? extends Tuple1<? extends T1>> tuples) { Objects.requireNonNull(tuples, "tuples is null"); return new Tuple1<>(Stream.narrow(Iterator.ofAll(tuples).map(Tuple1::_1).toStream())); }

Target:
static <T1> Tuple1<Seq<T1>> sequence1(Iterable<? extends Tuple1<? extends T1>> tuples) { Objects.requireNonNull(tuples, "tuples is null"); final Stream<Tuple1<? extends T1>> s = Stream.ofAll(tuples); return new Tuple1<>(s.map(Tuple1::_1)); }
Source:
public GroupInfo apply(GroupResource resource, Input input) throws MethodNotAllowedException, AuthException, BadRequestException, OrmException { AccountGroup internalGroup = resource.toAccountGroup(); if (internalGroup == null) { throw new MethodNotAllowedException(); } else if (!resource.getControl().isOwner()) { throw new AuthException("Not group owner"); } if (input == null || Strings.emptyToNull(input.owner) == null) { throw new BadRequestException("new owner is missing"); } GroupReference owner = GroupBackends.findExactSuggestion(groupBackend, input.owner); if (owner == null) { throw new BadRequestException(String.format("No such group: %s", input.owner)); } try { GroupControl c = controlFactory.validateFor(owner.getUUID()); if (!internalGroup.getOwnerGroupUUID().equals(owner.getUUID())) { internalGroup.setOwnerGroupUUID(owner.getUUID()); db.accountGroups().update(Collections.singleton(internalGroup)); groupCache.evict(internalGroup); } return new GroupInfo(c.getGroup()); } catch (NoSuchGroupException e) { throw new BadRequestException(String.format("No such group: %s", input.owner)); } }

Target:
public GroupInfo apply(GroupResource resource, Input input) throws MethodNotAllowedException, AuthException, BadRequestException, ResourceNotFoundException, OrmException { AccountGroup group = resource.toAccountGroup(); if (group == null) { throw new MethodNotAllowedException(); } else if (!resource.getControl().isOwner()) { throw new AuthException("Not group owner"); } if (input == null || Strings.isNullOrEmpty(input.owner)) { throw new BadRequestException("owner is required"); } GroupReference owner = GroupBackends.findExactSuggestion(groupBackend, input.owner); if (owner == null) { throw new BadRequestException(String.format("No such group: %s", input.owner)); } try { GroupControl c = controlFactory.validateFor(owner.getUUID()); group = db.accountGroups().get(group.getId()); if (group == null) { throw new ResourceNotFoundException(); } if (!group.getOwnerGroupUUID().equals(owner.getUUID())) { group.setOwnerGroupUUID(owner.getUUID()); db.accountGroups().update(Collections.singleton(group)); groupCache.evict(group); } return new GroupInfo(c.getGroup()); } catch (NoSuchGroupException e) { throw new BadRequestException(String.format("No such group: %s", input.owner)); } }
Source:
protected boolean canDoAction() { addCanDoActionMessage(VdcBllMessages.VAR__ACTION__ADD); boolean returnValue = super.canDoAction() && InitializeVds() && checkStorageDomainNameLengthValid(); if (returnValue && IsStorageWithSameNameExists()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NAME_ALREADY_EXIST); returnValue = false; } if (returnValue && getStorageDomain().getStorageDomainType() == StorageDomainType.ISO && !(getStorageDomain().getStorageType() == StorageType.NFS || getStorageDomain().getStorageType() == StorageType.LOCALFS)) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); returnValue = false; } if (returnValue && getStorageDomain().getStorageDomainType() == StorageDomainType.ImportExport && getStorageDomain().getStorageType() == StorageType.LOCALFS) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); returnValue = false; } if (returnValue && getStorageDomain().getStorageDomainType() == StorageDomainType.Master) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); returnValue = false; } boolean isSupportedStorageFormat = isStorageFormatSupportedByStoragePool() && isStorageFormatCompatibleWithDomain(); if (returnValue && !isSupportedStorageFormat) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL_HOST); getReturnValue().getCanDoActionMessages().add( String.format("$storageFormat %1$s", getStorageDomain().getStorageFormat().toString())); returnValue = false; } return returnValue && CanAddDomain(); }

Target:
protected boolean canDoAction() { addCanDoActionMessage(VdcBllMessages.VAR__ACTION__ADD); boolean returnValue = super.canDoAction() && InitializeVds() && checkStorageDomainNameLengthValid(); if (returnValue && IsStorageWithSameNameExists()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NAME_ALREADY_EXIST); returnValue = false; } if (returnValue && getStorageDomain().getStorageDomainType() == StorageDomainType.ISO && !getStorageDomain().getStorageType().isFileDomain()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); returnValue = false; } if (returnValue && getStorageDomain().getStorageDomainType() == StorageDomainType.ImportExport && getStorageDomain().getStorageType() == StorageType.LOCALFS) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); returnValue = false; } if (returnValue && getStorageDomain().getStorageDomainType() == StorageDomainType.Master) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); returnValue = false; } boolean isSupportedStorageFormat = isStorageFormatSupportedByStoragePool() && isStorageFormatCompatibleWithDomain(); if (returnValue && !isSupportedStorageFormat) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL_HOST); getReturnValue().getCanDoActionMessages().add( String.format("$storageFormat %1$s", getStorageDomain().getStorageFormat().toString())); returnValue = false; } return returnValue && canAddDomain(); }
Source:
public void setup(final String headerKey, final String nameKey, final String valueKey) { getView().setHeader(translationService.format(headerKey)); getView().setNameLabel(translationService.format(nameKey)); getView().setValueLabel(translationService.format(valueKey)); superSetup(); }

Target:
public void setup(final String headerKey, final String nameKey, final String valueKey) { getView().setHeader(translationService.format(headerKey)); getView().setNameLabel(translationService.format(nameKey)); getView().setValueLabel(translationService.format(valueKey)); setup(); }
Source:
public CompletableFuture<Void> restoreSnapshot(String snapshotName) { throw new UnsupportedOperationException("restoreSnapshot"); }

Target:
public CompletableFuture<Void> restoreSnapshot(String snapshotName) { throw new UnsupportedOperationException( "In place table restorations are not supported. Please use cloneSnapshot"); }
Source:
public long quota() { return this.quota; }

Target:
public int quota() { return this.quota; }
Source:
public static String forCurrentUser() { final User current = User.current(); if (current == null) { return null; } TimeZoneProperty tzp = current.getProperty(TimeZoneProperty.class); if(tzp.timeZoneName == null || tzp.timeZoneName.isEmpty()) { return null; } TimeZone tz = TimeZone.getTimeZone(tzp.timeZoneName); if (!Objects.equals(tz.getID(), tzp.timeZoneName)) { LOGGER.log(Level.WARNING, "Invalid user time zone {0} for {1}", new Object[]{tzp.timeZoneName, current.getId()}); return null; } return tz.getID(); }

Target:
public static String forCurrentUser() { final User current = User.current(); if (current == null) { return null; } TimeZoneProperty tzp = current.getProperty(TimeZoneProperty.class); if(tzp.timeZoneName == null || tzp.timeZoneName.isEmpty()) { return null; } TimeZone tz = TimeZone.getTimeZone(tzp.timeZoneName); if (!tz.getID().equals(tzp.timeZoneName)) { LOGGER.log(Level.WARNING, "Invalid user time zone {0} for {1}", new Object[]{tzp.timeZoneName, current.getId()}); return null; } return tz.getID(); }
Source:
public String getPersonSpecified() { if (q == null) { return null; } else { return q.personValue; } }

Target:
public String getPersonSpecified() { if (q == null) { return null; } return q.personValue; }
Source:
private boolean buildPayload( JSONObject json ) { environmentVariables = new HashMap<>(); boolean actionIdSet = false, actionClassSet = false, actionUserSet = false, actionParamsSet = false; try { JSONArray jsonArray = (JSONArray) json.get( environmentVariablesKey ); if ( json == null || StringUtils.isEmpty( jsonArray.toJSONString() ) ) { return false; } for ( Object var : jsonArray ) { JSONObject environmentVariable = (JSONObject) var; String name = (String) environmentVariable.get( "name" ); String value = (String) environmentVariable.get( "value" ); switch ( name ) { case actionId: actionIdSet = !StringUtils.isEmpty( value ); environmentVariables.put( actionId, value ); break; case actionClass: actionClassSet = !StringUtils.isEmpty( value ); environmentVariables.put( actionClass, value ); break; case actionUser: actionUserSet = !StringUtils.isEmpty( value ); environmentVariables.put( actionUser, value ); break; case actionParams: environmentVariables.put( actionParams, value ); actionParamsSet = !StringUtils.isEmpty( value ); break; } } return actionIdSet && actionClassSet && actionUserSet && actionParamsSet; } catch ( Exception e ) { logger.error( Arrays.toString( e.getStackTrace( ) ) ); return false; } }

Target:
private boolean buildPayload( JSONObject json ) { try { actionClass = (String) json.get( ActionUtil.INVOKER_ACTIONCLASS ); actionId = (String) json.get( ActionUtil.INVOKER_ACTIONID ); actionParams = (String) json.get( ActionUtil.INVOKER_ACTIONPARAMS ); actionUser = (String) json.get( ActionUtil.INVOKER_ACTIONUSER ); return !StringUtils.isEmpty( actionClass ) && !StringUtils.isEmpty( actionId ) && !StringUtils.isEmpty( actionParams ) && !StringUtils.isEmpty( actionUser ); } catch ( Exception e ) { logger.error( Arrays.toString( e.getStackTrace( ) ) ); return false; } }
Source:
public Map<String, Object> parse(List<String> args) throws Exception { List<String> others = new ArrayList<>(); Map<String, Object> argMap = new HashMap<>(); args.addAll(defaults); while(!args.isEmpty()) { String arg = args.remove(0); if(arg.equals(LONG_PREFIX)) { break; } if(!arg.startsWith(LONG_PREFIX)) { others.add(arg); } else { String[] argVal = parseArgument(arg.substring(2)); ParserArgument parserArgument = arguments.get(argVal[0]); if(parserArgument == null) { others.add(arg); continue; } if(parserArgument.getType() == ArgumentType.required_argument && argVal[1] == null) { throw new IllegalArgumentException( String.format("Argument's '%1$s' value is required", argVal[0]) ); } Matcher m = parserArgument.getMatcher().matcher(argVal[1]); if (!m.find()) { throw new IllegalArgumentException( String.format( "Argument's '%1$s' value don't match pattern: ", parserArgument.getMatcher().pattern() ) ); } if(!argMap.containsKey(argVal[0])) { argMap.put( argVal[0], Util.getObjectValueByString(parserArgument.getConvert(), argVal[1]) ); } } } mandatory.removeAll(argMap.keySet()); if(!mandatory.isEmpty()) { throw new IllegalArgumentException( String.format("Argument(s) '%1$s' required", StringUtils.join(mandatory, ", ")) ); } argMap.put("__other__", others); return argMap; }

Target:
public Map<String, Object> parse(List<String> args) throws Exception { List<String> others = new ArrayList<>(); Map<String, Object> argMap = new HashMap<>(); args.addAll(defaults); while(!args.isEmpty()) { String arg = args.remove(0); if(arg.equals(LONG_PREFIX)) { break; } if(!arg.startsWith(LONG_PREFIX)) { others.add(arg); break; } String[] argVal = parseArgument(arg.substring(2)); ParserArgument parserArgument = arguments.get(argVal[0]); if(parserArgument == null) { throw new IllegalArgumentException( String.format("Argument %1$s is not valid", arg) ); } if(parserArgument.getType() == ArgumentType.required_argument && argVal[1] == null) { throw new IllegalArgumentException( String.format("Argument's '%1$s' value is required", argVal[0]) ); } Matcher m = parserArgument.getMatcher().matcher(argVal[1]); if (!m.find()) { throw new IllegalArgumentException( String.format( "Argument's '%1$s' value don't match pattern: ", parserArgument.getMatcher().pattern() ) ); } if(!argMap.containsKey(argVal[0])) { argMap.put( argVal[0], Util.getObjectValueByString(parserArgument.getConvert(), argVal[1]) ); } } mandatory.removeAll(argMap.keySet()); if(!mandatory.isEmpty()) { throw new IllegalArgumentException( String.format("Argument(s) '%1$s' required", StringUtils.join(mandatory, ", ")) ); } others.addAll(args); argMap.put("__other__", others); return argMap; }
Source:
private boolean downloadMedium(String mediaUrl) { File file = new File(getOfflineMediaPath(mediaUrl)); if (!file.exists()) { try { Log.d(TAG, "Downloading: " + mediaUrl); file.createNewFile(); HttpRequest request = HttpRequest.get(mediaUrl); request.receive(file); if (request.code() < 200 || request.code() >= 300) { Log.e(TAG, "MEDIA FAIL! " + mediaUrl); return false; } } catch (IOException e) { Log.e(TAG, "Failed to download medium", e); throw new ApiSyncException(ApiSyncException.CONNECTION_EXCEPTION, e); } catch (HttpRequest.HttpRequestException e) { Log.e(TAG, "Failed to download medium", e); throw new ApiSyncException(ApiSyncException.CONNECTION_EXCEPTION, e); } } else { Log.d(TAG, "Skipping: " + mediaUrl); } return true; }

Target:
private boolean downloadMedium(String mediaUrl) { File file = new File(getOfflineMediaPath(mediaUrl)); if (!file.exists()) { try { if (BuildConfig.DEBUG) { Log.i(TAG, "Downloading: " + mediaUrl); } file.createNewFile(); HttpRequest request = HttpRequest.get(mediaUrl); request.receive(file); if (request.code() < 200 || request.code() >= 300) { if (BuildConfig.DEBUG) { Log.w(TAG, "MEDIA FAIL! " + mediaUrl); } return false; } } catch (IOException e) { if (BuildConfig.DEBUG) { Log.e(TAG, "Failed to download medium", e); } throw new ApiSyncException(ApiSyncException.CONNECTION_EXCEPTION, e); } catch (HttpRequest.HttpRequestException e) { if (BuildConfig.DEBUG) { Log.e(TAG, "Failed to download medium", e); } throw new ApiSyncException(ApiSyncException.CONNECTION_EXCEPTION, e); } } else if (BuildConfig.DEBUG) { Log.d(TAG, "Skipping: " + mediaUrl); } return true; }
Source:
private void configure(ClientDescriptor clientDescriptor, ConfigureStoreManager message) throws ClusterException { validateClientConnected(clientDescriptor); if (ehcacheStateService.getClientMessageTracker().isConfigureDuplicate(message.getClientId(), message.getId())) { ehcacheStateService.configure(message); } this.clientStateMap.get(clientDescriptor).attach(); }

Target:
private void configure(ClientDescriptor clientDescriptor, ConfigureStoreManager message) throws ClusterException { validateClientConnected(clientDescriptor); if (ehcacheStateService.getClientMessageTracker().isConfigureApplicable(message.getClientId(), message.getId())) { ehcacheStateService.configure(message); } this.clientStateMap.get(clientDescriptor).attach(); }
Source:
private Converter createConverter(Type field) { LogicalTypeAnnotation otype = field.getLogicalTypeAnnotation(); if (field.isPrimitive()) { if (otype != null) { return otype.accept(new LogicalTypeAnnotation.LogicalTypeAnnotationVisitor<Converter>() { @Override public Optional<Converter> visit(LogicalTypeAnnotation.StringLogicalTypeAnnotation stringLogicalType) { return of(new StringConverter(field.getName())); } @Override public Optional<Converter> visit(LogicalTypeAnnotation.DecimalLogicalTypeAnnotation decimalLogicalType) { int scale = decimalLogicalType.getScale(); return of(new DecimalConverter(field.getName(), scale)); } }).orElse(new SimplePrimitiveConverter(field.getName())); } } GroupType groupType = field.asGroupType(); if (otype != null) { return otype.accept(new LogicalTypeAnnotation.LogicalTypeAnnotationVisitor<Converter>() { @Override public Optional<Converter> visit(LogicalTypeAnnotation.MapLogicalTypeAnnotation mapLogicalType) { return of(new SimpleMapRecordConverter(groupType, field.getName(), SimpleRecordConverter.this)); } @Override public Optional<Converter> visit(LogicalTypeAnnotation.ListLogicalTypeAnnotation listLogicalType) { return of(new SimpleListRecordConverter(groupType, field.getName(), SimpleRecordConverter.this)); } }).orElse(new SimpleRecordConverter(groupType, field.getName(), this)); } return new SimpleRecordConverter(groupType, field.getName(), this); }

Target:
private Converter createConverter(Type field) { LogicalTypeAnnotation ltype = field.getLogicalTypeAnnotation(); if (field.isPrimitive()) { if (ltype != null) { return ltype.accept(new LogicalTypeAnnotation.LogicalTypeAnnotationVisitor<Converter>() { @Override public Optional<Converter> visit(LogicalTypeAnnotation.StringLogicalTypeAnnotation stringLogicalType) { return of(new StringConverter(field.getName())); } @Override public Optional<Converter> visit(LogicalTypeAnnotation.DecimalLogicalTypeAnnotation decimalLogicalType) { int scale = decimalLogicalType.getScale(); return of(new DecimalConverter(field.getName(), scale)); } }).orElse(new SimplePrimitiveConverter(field.getName())); } } GroupType groupType = field.asGroupType(); if (ltype != null) { return ltype.accept(new LogicalTypeAnnotation.LogicalTypeAnnotationVisitor<Converter>() { @Override public Optional<Converter> visit(LogicalTypeAnnotation.MapLogicalTypeAnnotation mapLogicalType) { return of(new SimpleMapRecordConverter(groupType, field.getName(), SimpleRecordConverter.this)); } @Override public Optional<Converter> visit(LogicalTypeAnnotation.ListLogicalTypeAnnotation listLogicalType) { return of(new SimpleListRecordConverter(groupType, field.getName(), SimpleRecordConverter.this)); } }).orElse(new SimpleRecordConverter(groupType, field.getName(), this)); } return new SimpleRecordConverter(groupType, field.getName(), this); }
Source:
public void testPullTimeoutAndRetry() throws NetworkException, InterruptedException, TimeoutException, ExecutionException, InjectionException { final long pullRetryTimeoutMs = 1000; setup(pullRetryTimeoutMs); ParameterWorkerTestUtil.pullTimeoutAndRetry(parameterWorker, workerHandler, mockSender, pullRetryTimeoutMs); }

Target:
public void testPullTimeoutAndRetry() throws NetworkException, InterruptedException, TimeoutException, ExecutionException, InjectionException { prepare(ParameterWorkerTestUtil.PULL_RETRY_TIMEOUT_MS); ParameterWorkerTestUtil.pullTimeoutAndRetry(parameterWorker, workerHandler, mockSender); }
Source:
public void fromJson(ObjectNode node) { JsonNode x = node.get("query"); if (x != null) { query = QueryExpression.fromJson(x); } x = node.get("projection"); if (x != null) { projection = Projection.fromJson(x); } x = node.get("sort"); if (x != null) { sort = Sort.fromJson(x); } x = node.get("range"); if (x instanceof ArrayNode && ((ArrayNode) x).size() == 2) { from = ((ArrayNode) x).get(0).asLong(); to = ((ArrayNode) x).get(1).asLong(); } else { x = node.get("from"); if (x != null) { from = x.asLong(); } x = node.get("to"); if (x != null && x.asLong()>0) { to = x.asLong(); } } }

Target:
public void fromJson(ObjectNode node) { JsonNode x = node.get("query"); if (x != null) { query = QueryExpression.fromJson(x); } x = node.get("projection"); if (x != null) { projection = Projection.fromJson(x); } x = node.get("sort"); if (x != null) { sort = Sort.fromJson(x); } x = node.get("range"); if (x instanceof ArrayNode && ((ArrayNode) x).size() == 2) { from = ((ArrayNode) x).get(0).asLong(); if(!((ArrayNode) x).get(1).isNull()) to = ((ArrayNode) x).get(1).asLong(); else to = null; } else { x = node.get("from"); if (x != null) { from = x.asLong(); } x = node.get("to"); if (x != null) { to = x.asLong(); } } }
Source:
protected String getInvalidCharsInName(final String value) { return getInvalidCharsInName(regExp, value); }

Target:
private String getInvalidCharsInName(final String value) { return getInvalidCharsInName(regExp, value); }
Source:
public void testGetAction() throws Exception { deployContrib("org.nuxeo.ecm.actions.jsf.tests", "test-actions-contrib.xml"); applyInlineDeployments(); postSetUp(); DocumentModel doc = new MockDocumentModel("Workspace", new String[0]); Action action = as.getAction("singleActionRetrievedWithFilter", getActionContext(doc), true); assertNotNull(action); assertTrue(action.getAvailable()); action = as.getAction("singleActionRetrievedWithFilter", getActionContext(doc), false); assertNotNull(action); assertTrue(action.getAvailable()); doc = new MockDocumentModel("File", new String[0]); action = as.getAction("singleActionRetrievedWithFilter", getActionContext(doc), true); assertNull(action); action = as.getAction("singleActionRetrievedWithFilter", getActionContext(doc), false); assertNotNull(action); assertFalse(action.getAvailable()); }

Target:
public void testGetAction() throws Exception { pushInlineDeployments("org.nuxeo.ecm.actions.jsf.tests:test-actions-contrib.xml"); DocumentModel doc = new MockDocumentModel("Workspace", new String[0]); Action action = as.getAction("singleActionRetrievedWithFilter", getActionContext(doc), true); assertNotNull(action); assertTrue(action.getAvailable()); action = as.getAction("singleActionRetrievedWithFilter", getActionContext(doc), false); assertNotNull(action); assertTrue(action.getAvailable()); doc = new MockDocumentModel("File", new String[0]); action = as.getAction("singleActionRetrievedWithFilter", getActionContext(doc), true); assertNull(action); action = as.getAction("singleActionRetrievedWithFilter", getActionContext(doc), false); assertNotNull(action); assertFalse(action.getAvailable()); }
Source:
private String getWeekCharacters(String label) { int labelCPCount = label.codePointCount(0, label.length()); return label.substring(labelCPCount - 2, labelCPCount); }

Target:
private String getWeekCharacters(String label) { return label.substring(label.length() - 2); }
Source:
public Operator createOperator(DriverContext driverContext) { OperatorContext operatorContext = driverContext.addOperatorContext(operatorId, planNodeId, PartitionedOutputOperator.class.getSimpleName()); return new PartitionedOutputOperator( operatorContext, sourceTypes, pagePreprocessor, partitionFunction, partitionChannels, partitionConstants, replicatesAnyRow, nullChannel, outputBuffer, serdeFactory, maxMemory, SystemSessionProperties.isOptimizedRepartitioningEnabled(operatorContext.getSession())); }

Target:
public Operator createOperator(DriverContext driverContext) { OperatorContext operatorContext = driverContext.addOperatorContext(operatorId, planNodeId, PartitionedOutputOperator.class.getSimpleName()); return new PartitionedOutputOperator( operatorContext, sourceTypes, pagePreprocessor, partitionFunction, partitionChannels, partitionConstants, replicatesAnyRow, nullChannel, outputBuffer, serdeFactory, maxMemory); }