auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> protected static IProject getProject(TemplateContext context) { <END> IProject project = Platform.getAdapterManager().getAdapter(context, IProject.class); if (project != null) { return project; } if (NO_ADAPTABLE_SUPPORT && Activator.hasJavaPlugin()) { boolean hasPublicMethod = context.getClass().getSimpleName() .equals("CodeTemplateContext"); Method method; try { if (hasPublicMethod) { method = context.getClass().getMethod("getJavaProject"); } else { method = context.getClass().getSuperclass() .getDeclaredMethod("getJavaProject"); method.setAccessible(true); } Object result = method.invoke(context); if (result instanceof IJavaProject) { IJavaProject javaProject = (IJavaProject) result; return javaProject.getProject(); } } catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { return null; } } return null; }</code><technical_language>I understand this. TemplateContext IAdaptable. what? implementation in JDT CodeTemplateContext CompilationUnitContext adapt IProject? Besides I necessary TemplateContext IAdaptable. AdapterFactory, adapt object anything. JDT a minimum version requirement for org.eclipse.text of 3.5.0. I doubt increased 3.7.100. a change is provide adapter factory, in EGit reflective way</technical_language>

Target:
protected static IProject getProject(TemplateContext context) { IProject project = Platform.getAdapterManager().getAdapter(context, IProject.class); if (project != null) { return project; } if (NO_ADAPTABLE_SUPPORT && Activator.hasJavaPlugin()) { boolean hasPublicMethod = context.getClass().getSimpleName() .equals("CodeTemplateContext"); try { Method method; if (hasPublicMethod) { method = context.getClass().getMethod("getJavaProject"); } else { method = context.getClass().getSuperclass() .getDeclaredMethod("getJavaProject"); method.setAccessible(true); } Object result = method.invoke(context); if (result instanceof IJavaProject) { IJavaProject javaProject = (IJavaProject) result; return javaProject.getProject(); } } catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { return null; } } return null; }
Source:
<code>protected void doStoreUsers() { try { usersFileManager.store(new UsersDto(new HashSet<>(userMap.values()))); } catch (IOException e) { <START> throw new UndeclaredThrowableException(e); <END> } }</code><technical_language>@fuss86 : Thanks for link educate myself! a read. @sbespalov : do think</technical_language>

Target:
private void doStoreUsers() { try { usersFileManager.store(new UsersDto(new HashSet<>(userMap.values()))); } catch (IOException e) { throw new UndeclaredThrowableException(e); } }
Source:
<code>private String cleanDisplayedErrorMessage(String errorMessage) { String regex = "^[^:]*:(.*)"; <START> Pattern pattern = Pattern.compile(regex); <END> Matcher matcher = pattern.matcher(errorMessage); if (errorMessage.matches(regex) && matcher.find()) { if (errorMessage.matches(regex)) { errorMessage = matcher.group(1); } } return (errorMessage); }</code><technical_language>This pattern created time constructor level</technical_language>

Target:
private String cleanDisplayedErrorMessage(String errorMessage) { Matcher matcher = PATTERN.matcher(errorMessage); if (matcher.find()) { errorMessage = matcher.group(1); } return (errorMessage); }
Source:
<code>private String getRandomFakeSecretQuestion() { Random randomGenerator = new Random(); List<String> questions = new ArrayList<String>(); questions.add("What is your best friend's last name?"); questions.add("What is your grandfather's home town?"); questions.add("What is your mother's maiden name?"); questions.add("What is your favorite band?"); questions.add("What is your first pet's name?"); questions.add("What is your brother's middle name?"); <START> questions.add("What city were you born?"); <END> int randIndex = randomGenerator.nextInt(questions.size()); return questions.get(randIndex); }</code><technical_language>"What city born in?" correct English</technical_language>

Target:
private String getRandomFakeSecretQuestion() { Random randomGenerator = new Random(); List<String> questions = new ArrayList<String>(); questions.add("What is your best friend's last name?"); questions.add("What is your grandfather's home town?"); questions.add("What is your mother's maiden name?"); questions.add("What is your favorite band?"); questions.add("What is your first pet's name?"); questions.add("What is your brother's middle name?"); questions.add("What city were you born in?"); return questions.get(map.get(username)); }
Source:
<code>public void run() { <START> if (!TestController.isTestMode()) { <END> pool.execute(() -> runUpdate()); } }</code><technical_language>Checking for test mode is fine, do this method is called, in -- environment run in a concern of this class</technical_language>

Target:
public void run() { pool.execute(() -> runUpdate()); }
Source:
<code>public void testUpdateDataset() { DataSet preexistingDataset = new DataSet(); when(datasetService.getDatasetByName("test")).thenReturn(preexistingDataset); when(datasetService.updateDataset(any(), any(), any())).thenReturn(preexistingDataset); when(authUser.getGoogleUser()).thenReturn(googleUser); when(googleUser.getEmail()).thenReturn("email@email.com"); when(userService.findUserByEmail(any())).thenReturn(dacUser); when(dacUser.getDacUserId()).thenReturn(1); when(uriInfo.getRequestUriBuilder()).thenReturn(uriBuilder); when(uriBuilder.replacePath(anyString())).thenReturn(uriBuilder); initResource(); <START> Response response = resource.updateDataset(authUser, uriInfo, "{\"properties\":[{\"propertyName\":\"Dataset Name\",\"propertyValue\":\"test\"}]}", 1); <END> assertEquals(200, response.getStatus()); }</code><technical_language>Instead of passing in a string, cleaner pass in a Gson.toJson string constructed actual instance of DataSetDTO. If do that, kind of refactoring DataSetDTO picked in this test method find a test failure</technical_language>

Target:
public void testUpdateDataset() { DataSet preexistingDataset = new DataSet(); DataSetDTO json = new DataSetDTO(); List<DataSetPropertyDTO> jsonProperties = new ArrayList<>(); jsonProperties.add(new DataSetPropertyDTO("Dataset Name", "test")); json.setProperties(jsonProperties); when(datasetService.findDatasetById(anyInt())).thenReturn(preexistingDataset); when(datasetService.updateDataset(any(), any(), any())).thenReturn(Optional.of(preexistingDataset)); when(authUser.getGoogleUser()).thenReturn(googleUser); when(googleUser.getEmail()).thenReturn("email@email.com"); when(userService.findUserByEmail(any())).thenReturn(dacUser); when(dacUser.getDacUserId()).thenReturn(1); when(uriInfo.getRequestUriBuilder()).thenReturn(uriBuilder); when(uriBuilder.replacePath(anyString())).thenReturn(uriBuilder); initResource(); Response response = resource.updateDataset(authUser, uriInfo, 1, new Gson().toJson(json)); assertEquals(200, response.getStatus()); }
Source:
<code>public BindingSet next() { final MapBindingSet bs = new MapBindingSet(); for(final Binding binding : newResult) { bs.addBinding(binding); } final BindingSet joinResult = joinedResults.next(); for(final Binding binding : joinResult) { bs.addBinding(binding); } String visibility = ""; <START> if(newResult instanceof VisibilityBindingSet && joinResult instanceof VisibilityBindingSet) { <END> final Joiner join = Joiner.on(")&("); final String leftVisi = ((VisibilityBindingSet)newResult).getVisibility(); final String rightVisi = ((VisibilityBindingSet)joinResult).getVisibility(); if(leftVisi.isEmpty() || rightVisi.isEmpty()) { visibility = (leftVisi + rightVisi).trim(); } else { visibility = "(" + join.join(leftVisi, rightVisi) + ")"; } return new VisibilityBindingSet(bs, visibility); } else if(newResult instanceof VisibilityBindingSet) { visibility = ((VisibilityBindingSet) newResult).getVisibility(); return new VisibilityBindingSet(bs, visibility); } else if(joinResult instanceof VisibilityBindingSet) { visibility = ((VisibilityBindingSet) joinResult).getVisibility(); return new VisibilityBindingSet(bs, visibility); } else { return new VisibilityBindingSet(bs); } }</code><technical_language>This is another area able assume VisibilityBindingSets</technical_language>

Target:
public VisibilityBindingSet next() { final MapBindingSet bs = new MapBindingSet(); for(final Binding binding : newResult) { bs.addBinding(binding); } final VisibilityBindingSet joinResult = joinedResults.next(); for(final Binding binding : joinResult) { bs.addBinding(binding); } String visibility = ""; final Joiner join = Joiner.on(")&("); final String leftVisi = newResult.getVisibility(); final String rightVisi = joinResult.getVisibility(); if(leftVisi.isEmpty() || rightVisi.isEmpty()) { visibility = (leftVisi + rightVisi).trim(); } else { visibility = "(" + join.join(leftVisi, rightVisi) + ")"; } return new VisibilityBindingSet(bs, visibility); }
Source:
<code>private void initRevisionActions(ChangeInfo info, RevisionInfo revInfo, boolean hasUser) { NativeMap<ActionInfo> actions = revInfo.has_actions() ? revInfo.actions() : NativeMap.<ActionInfo> create(); actions.copyKeysIntoChildren("id"); canSubmit = false; if (hasUser) { canSubmit = actions.containsKey("submit"); if (canSubmit) { <START> submit.setTitle(actions.get("submit").title()); <END> } a2b(actions, "cherrypick", cherrypick); a2b(actions, "/", deleteDraftPatchSet); a2b(actions, "publish", publish); a2b(actions, "rebase", rebase); for (String id : filterNonCore(actions)) { add(new ActionButton(info, revInfo, actions.get(id))); } } }</code><technical_language>Thanks for finding fixing this bug</technical_language>

Target:
private void initRevisionActions(ChangeInfo info, RevisionInfo revInfo, boolean hasUser) { NativeMap<ActionInfo> actions = revInfo.has_actions() ? revInfo.actions() : NativeMap.<ActionInfo> create(); actions.copyKeysIntoChildren("id"); canSubmit = false; if (hasUser) { canSubmit = actions.containsKey("submit"); if (canSubmit) { submit.setTitle(actions.get("submit").title()); } a2b(actions, "/", deleteRevision); a2b(actions, "cherrypick", cherrypick); a2b(actions, "publish", publish); a2b(actions, "rebase", rebase); for (String id : filterNonCore(actions)) { add(new ActionButton(info, revInfo, actions.get(id))); } } }
Source:
<code>public static String getHexColorCode(String metricId, String sessionId) { String monitoringName = null; MonitoringId monitoringId = splitMonitoringMetricId(metricId); <START> if (monitoringId != null) <END> monitoringName = monitoringId.getMonitoringName(); String colorId = monitoringName + sessionId; if (!sessions.contains(colorId)) sessions.add(colorId); return colorsHexCodes.get(sessions.indexOf(colorId) % colorsHexCodes.size()); }</code><technical_language>Please follow code convention - if (...) { ... }</technical_language>

Target:
public static String getHexColorCode(String metricId, String sessionId) { String colorId; MonitoringId monitoringId = splitMonitoringMetricId(metricId); if (monitoringId != null) { colorId = monitoringId.getMonitoringName() + sessionId; } else { colorId = metricId + sessionId; } int index = Math.abs(counter.getAndIncrement() % colorsHexCodes.size()); Integer result = sessionsMap.putIfAbsent(colorId, index); if (result == null) { return colorsHexCodes.get(index); } else { return colorsHexCodes.get(result); } }
Source:
<code>public synchronized static PlatformAddress on(int value, long size) { <START> if(value == 0) { <END> return PlatformAddress.NULL; } int idx = value >> 5; int probe = 0; do { PlatformAddress cachedObj = cache[(idx + probe) & (CACHESIZE - 1)]; if (cachedObj == null) { return cache[(idx + probe) & (CACHESIZE - 1)] = new PlatformAddress(value, size); } if (cachedObj.osaddr == value && cachedObj.size == size) { return cachedObj; } } while (probe++ < MAXPROBES); replIdx %= MAXPROBES + 1; return cache[(idx + replIdx++) & (CACHESIZE - 1)] = new PlatformAddress(value, size); }</code><technical_language>Space if (</technical_language>

Target:
public synchronized static PlatformAddress on(int value, long size) { if (value == 0) { return PlatformAddress.NULL; } int idx = value >> 5; for (int probe = 0; probe < MAX_PROBES; probe++) { PlatformAddress cachedObj = cache[(idx + probe) & CACHE_MASK]; if (cachedObj == null) { return cache[(idx + probe) & CACHE_MASK] = new PlatformAddress(value, size); } if (cachedObj.osaddr == value && cachedObj.size == size) { return cachedObj; } } replacementIndex = (replacementIndex + 1) % MAX_PROBES; return cache[(idx + replacementIndex) & CACHE_MASK] = new PlatformAddress(value, size); }
Source:
<code>public String toString() { StringBuilder virtioSerialBuilder = new StringBuilder(); <START> virtioSerialBuilder.append("<channel type='" + type.toString() + "'>\n"); <END> if (path == null) { virtioSerialBuilder.append("<source mode='bind'/>\n"); } else { virtioSerialBuilder.append("<source mode='bind' path='" + path + "'/>\n"); } virtioSerialBuilder.append("<address type='virtio-serial'/>\n"); if (state == null) { virtioSerialBuilder.append("<target type='virtio' name='" + name + "'/>\n"); } else { virtioSerialBuilder.append("<target type='virtio' name='" + name + "' state='" + state.toString() + "'/>\n"); } virtioSerialBuilder.append("</channel>\n"); return virtioSerialBuilder.toString(); }</code><technical_language>Please System.lineseparator() instead of \n for proper platform independence</technical_language>

Target:
public String toString() { return this.type; }
Source:
<code>public static boolean isSame(FeatureStructure a, FeatureStructure b) { <START> return !(a == null || b == null) && a.getCAS() == b.getCAS() && getAddr(a) == getAddr(b); <END> }</code><technical_language>previous code more verbose easier read</technical_language>

Target:
public static boolean isSame(FeatureStructure a, FeatureStructure b) { if (a == null || b == null) { return false; } if (a.getCAS() != b.getCAS()) { return false; } return getAddr(a) == getAddr(b); }
Source:
<code>protected String getConfigRoot() { <START> return ClientConfigSections.HAZELCAST_CLIENT.name.toLowerCase(); <END> }</code><technical_language>toLowerCase</technical_language>

Target:
protected String getConfigRoot() { return ClientConfigSections.HAZELCAST_CLIENT.name; }
Source:
<code>public void initialize(final ServerCoreComponents coreComponents) throws ModuleInitializationException { Assert.requireNonNull(coreComponents, "coreComponents"); final ServletContext servletContext = coreComponents.getServletContext(); Assert.requireNonNull(servletContext, "servletContext"); <START> HttpSessionMutexHolder mutexHolder = new HttpSessionMutexHolder(); <END> servletContext.addListener(mutexHolder); }</code><technical_language>final</technical_language>

Target:
public void initialize(final ServerCoreComponents coreComponents) throws ModuleInitializationException { Assert.requireNonNull(coreComponents, "coreComponents"); final ServletContext servletContext = coreComponents.getServletContext(); Assert.requireNonNull(servletContext, "servletContext"); final HttpSessionMutexHolder mutexHolder = new HttpSessionMutexHolder(); servletContext.addListener(mutexHolder); }
Source:
<code>protected DepthwiseConvolution2D(Builder builder) { super(builder); this.hasBias = builder.hasBias; this.depthMultiplier = builder.depthMultiplier; this.convolutionMode = builder.convolutionMode; this.dilation = builder.dilation; if (builder.kernelSize.length != 2) throw new IllegalArgumentException("Kernel size of should be rows x columns (a 2d array)"); this.kernelSize = builder.kernelSize; if (builder.stride.length != 2) throw new IllegalArgumentException("Stride should include stride for rows and columns (a 2d array)"); this.stride = builder.stride; if (builder.padding.length != 2) throw new IllegalArgumentException("Padding should include padding for rows and columns (a 2d array)"); this.padding = builder.padding; this.cudnnAlgoMode = builder.cudnnAlgoMode; this.cudnnFwdAlgo = builder.cudnnFwdAlgo; this.cudnnBwdFilterAlgo = builder.cudnnBwdFilterAlgo; this.cudnnBwdDataAlgo = builder.cudnnBwdDataAlgo; <START> this.nOut = this.nIn * this.depthMultiplier; <END> initializeConstraints(builder); }</code><technical_language>14 lines - superclass fields - set super(builder) removed here. <LINK_0></technical_language>

Target:
protected DepthwiseConvolution2D(Builder builder) { super(builder); this.depthMultiplier = builder.depthMultiplier; this.nOut = this.nIn * this.depthMultiplier; initializeConstraints(builder); }
Source:
<code><START> public void addMember(SubfieldPath.PathElement member, Filter filter) <END> { filters.put(member, filter); if (filter instanceof StructFilter) { StructFilter childFilter = (StructFilter) filter; childFilter.ordinal = filters.size(); } }</code><technical_language>Check for duplicates throw Filter previousFilter = filters.put(member, filter); checkArgument(previousFilter == null, "Duplicate filter key: " + member);</technical_language>

Target:
public void addMember(SubfieldPath.PathElement member, Filter filter) { verify(filters.get(member) == null, "Adding duplicate member filter" + member.toString()); filters.put(member, filter); if (filter instanceof StructFilter) { StructFilter childFilter = (StructFilter) filter; childFilter.ordinal = filters.size(); } }
Source:
<code>public ParameterMetadataImpl buildParameterMetadata(String nativeQuery) { <START> ParamLocationRecognizer recognizer = new ParamLocationRecognizer( 0 ); <END> parseQueryParameters( nativeQuery, recognizer ); final Map<Integer, OrdinalParameterDescriptor> ordinalDescriptors = recognizer.getOrdinalParameterDescriptionMap(); final Map<String, NamedParameterDescriptor> namedDescriptors = recognizer.getNamedParameterDescriptionMap(); return new ParameterMetadataImpl( ordinalDescriptors, namedDescriptors ); }</code><technical_language>So... this is change in ORM 5.3 I find (the fact base for parameter numbering changed). worried it, if a configuration knob restore behavior. I understand chose compatible behavior of OGM? I admit wondering if follow ORM more conservative. a bit torn this subject. @Sanne this</technical_language>

Target:
public ParameterMetadataImpl buildParameterMetadata(String nativeQuery) { ParamLocationRecognizer recognizer = new ParamLocationRecognizer( 0 ); parseQueryParameters( nativeQuery, recognizer ); recognizer.complete(); final Map<Integer, OrdinalParameterDescriptor> ordinalDescriptors = recognizer.getOrdinalParameterDescriptionMap(); final Map<String, NamedParameterDescriptor> namedDescriptors = recognizer.getNamedParameterDescriptionMap(); return new ParameterMetadataImpl( ordinalDescriptors, namedDescriptors ); }
Source:
<code>public void resendLatestResourcePackRequest() { <START> if (!resourcePackRequests.isEmpty()) { <END> sendPacket(resourcePackRequests.peek()); } }</code><technical_language>this</technical_language>

Target:
public void resendLatestResourcePackRequest() { if (!this.resourcePackRequests.isEmpty()) { this.sendPacket(this.resourcePackRequests.peek()); } }
Source:
<code>public void registerCache(String name) { CacheDescriptor defaultDescriptor = getCacheDescriptor(DEFAULT_CACHE_ID); if (defaultDescriptor == null) { defaultDescriptor = new CacheDescriptor(); <START> defaultDescriptor.options.put(CacheDescriptor.OPTION_MAX_SIZE, <END> String.valueOf(CacheDescriptor.DEFAULT_MAX_SIZE)); register(XP_CACHES, defaultDescriptor); } CacheDescriptor newDescriptor = (CacheDescriptor) new CacheDescriptor().merge(defaultDescriptor); newDescriptor.name = name; register(XP_CACHES, newDescriptor); maybeStart(name); }</code><technical_language>forget re-add default TTL probably</technical_language>

Target:
public void registerCache(String name) { CacheDescriptor defaultDescriptor = getCacheDescriptor(DEFAULT_CACHE_ID); if (defaultDescriptor == null) { defaultDescriptor = new CacheDescriptor(); defaultDescriptor.options.put(OPTION_MAX_SIZE, String.valueOf(DEFAULT_MAX_SIZE)); register(XP_CACHES, defaultDescriptor); } CacheDescriptor newDescriptor = (CacheDescriptor) new CacheDescriptor().merge(defaultDescriptor); newDescriptor.name = name; register(XP_CACHES, newDescriptor); maybeStart(name); }
Source:
<code>public void loadPage(@NonNull PageTitle title, @NonNull HistoryEntry entry, boolean pushBackStack, int stagedScrollY, boolean isRefresh) { clearActivityActionBarTitle(); addTimeSpentReading(activeTimer.getElapsedSec()); activeTimer.reset(); tocHandler.setEnabled(false); errorState = false; errorView.setVisibility(View.GONE); tabLayout.enableAllTabs(); leadImagesHandler.hide(); model.setTitle(title); model.setTitleOriginal(title); model.setCurEntry(entry); model.setReadingListPage(null); model.setForceNetwork(isRefresh); updateProgressBar(true, true, 0); this.pageRefreshed = isRefresh; closePageScrollFunnel(); pageFragmentLoadState.load(pushBackStack, stagedScrollY); updateBookmarkAndMenuOptions(); <START> if (entry.getSource() == HistoryEntry.SOURCE_RANDOM || entry.getSource() == HistoryEntry.SOURCE_FEED_RANDOM) { randomButton.show(); } else { randomButton.hide(); } <END> }</code><technical_language>add SOURCE_APP_SHORTCUT_RANDOM entering app shortcut icon</technical_language>

Target:
public void loadPage(@NonNull PageTitle title, @NonNull HistoryEntry entry, boolean pushBackStack, int stagedScrollY, boolean isRefresh) { clearActivityActionBarTitle(); addTimeSpentReading(activeTimer.getElapsedSec()); activeTimer.reset(); tocHandler.setEnabled(false); errorState = false; errorView.setVisibility(View.GONE); tabLayout.enableAllTabs(); leadImagesHandler.hide(); model.setTitle(title); model.setTitleOriginal(title); model.setCurEntry(entry); model.setReadingListPage(null); model.setForceNetwork(isRefresh); updateProgressBar(true, true, 0); this.pageRefreshed = isRefresh; closePageScrollFunnel(); pageFragmentLoadState.load(pushBackStack, stagedScrollY); updateBookmarkAndMenuOptions(); if (entry.getSource() == HistoryEntry.SOURCE_RANDOM || entry.getSource() == HistoryEntry.SOURCE_FEED_RANDOM || entry.getSource() == HistoryEntry.SOURCE_APP_SHORTCUT_RANDOM) { randomButton.show(); } else { randomButton.hide(); } }
Source:
<code>final AppConfig getAppConfig(CascadeStrategy defaultStrategy) throws ConfigException { return DefaultAppConfig.builder() .withDefaultCascadingStrategy(defaultStrategy) <START> .withApplicationConfigName(DefaultAppConfig.DEFAULT_APP_CONFIG_NAME) <END> .build(); }</code><technical_language>Is reason explicitly set default</technical_language>

Target:
final AppConfig getAppConfig(CascadeStrategy defaultStrategy) throws ConfigException { return DefaultAppConfig.builder() .withDefaultCascadingStrategy(defaultStrategy) .build(); }
Source:
<code>ValidationResult validateNotRemovingUsedNetworkByVms() { Collection<String> removedNetworks = new HashSet<>(); for (NetworkAttachment removedAttachment : removedNetworkAttachments) { removedNetworks.add(existingNetworkRelatedToAttachment(removedAttachment).getName()); } final List<String> vmsNames = getVmInterfaceManager().findActiveVmsUsingNetworks(host.getId(), removedNetworks); final List<String> sortedRemovedNetworks = new ArrayList<>(removedNetworks); <START> Collections.sort(sortedRemovedNetworks); <END> DetachNetworkUsedByVmValidator detachNetworkUsedByVmValidator = new DetachNetworkUsedByVmValidator(vmsNames, sortedRemovedNetworks); return detachNetworkUsedByVmValidator.validate(); }</code><technical_language>I sense move sorting DetachNetworkUsedByVmValidator. is unclear networks sorted passed DetachNetworkUsedByVmValidator</technical_language>

Target:
ValidationResult validateNotRemovingUsedNetworkByVms() { Collection<String> removedNetworks = new HashSet<>(); for (NetworkAttachment removedAttachment : removedNetworkAttachments) { removedNetworks.add(existingNetworkRelatedToAttachment(removedAttachment).getName()); } final List<String> vmsNames = getVmInterfaceManager().findActiveVmsUsingNetworks(host.getId(), removedNetworks); final List<String> removedNetworksList = new ArrayList<>(removedNetworks); DetachNetworkUsedByVmValidator detachNetworkUsedByVmValidator = new DetachNetworkUsedByVmValidator(vmsNames, removedNetworksList); return detachNetworkUsedByVmValidator.validate(); }
Source:
<code>public static void main(String[] args) throws Exception { TChannel server = createServer(); TChannel client = createClient(); SubChannel subChannel = client.makeSubChannel("server"); final long start = System.currentTimeMillis(); final AtomicInteger counter = new AtomicInteger(0); TFutureCallback<RawResponse> callback = new TFutureCallback<RawResponse>() { @Override public void onResponse(RawResponse response) { if (!response.isError()) { System.out.println(String.format("Response received: response code: %s, header: %s, body: %s", response.getResponseCode(), response.getHeader(), response.getBody())); } else { System.out.println(String.format("Got error response: %s", response.toString())); } if (counter.incrementAndGet() >= 3) { synchronized (counter) { counter.notifyAll(); } } } }; for (int i = 0; i < 3; i++) { RawRequest request = new RawRequest.Builder("server", "pong") .setHeader("Marco") .setBody("Ping!") .build(); TFuture<RawResponse> future = subChannel.send(request, InetAddress.getByName("127.0.0.1"), 8888 ); future.addCallback(callback); } <START> synchronized (counter) { <END> counter.wait(); } System.out.println(String.format("\nTime cost: %dms", System.currentTimeMillis() - start)); server.shutdown(false); client.shutdown(false); }</code><technical_language>CountDownLatch. I guess ok here</technical_language>

Target:
public static void main(String[] args) throws Exception { TChannel server = createServer(); TChannel client = createClient(); SubChannel subChannel = client.makeSubChannel("server"); final long start = System.currentTimeMillis(); final CountDownLatch done = new CountDownLatch(3); TFutureCallback<RawResponse> callback = new TFutureCallback<RawResponse>() { @Override public void onResponse(RawResponse response) { if (!response.isError()) { System.out.println(String.format("Response received: response code: %s, header: %s, body: %s", response.getResponseCode(), response.getHeader(), response.getBody())); } else { System.out.println(String.format("Got error response: %s", response.toString())); } done.countDown(); } }; for (int i = 0; i < 3; i++) { RawRequest request = new RawRequest.Builder("server", "pong") .setHeader("Marco") .setBody("Ping!") .build(); TFuture<RawResponse> future = subChannel.send(request, InetAddress.getByName("127.0.0.1"), 8888 ); future.addCallback(callback); } done.await(); System.out.println(String.format("\nTime cost: %dms", System.currentTimeMillis() - start)); server.shutdown(false); client.shutdown(false); }
Source:
<code>public JdbcMetadataStore(JdbcOperations jdbcOperations) { <START> Assert.notNull(jdbcOperations, "'dataSource' must not be null"); <END> this.jdbcTemplate = jdbcOperations; }</code><technical_language>Typo: **jdbcOperations** null</technical_language>

Target:
public JdbcMetadataStore(JdbcOperations jdbcOperations) { Assert.notNull(jdbcOperations, "'jdbcOperations' must not be null"); this.jdbcTemplate = jdbcOperations; }
Source:
<code><START> public void validateEnums(WatchDog entity) { <END> EnumValidator.validateEnum(WatchdogAction.class, entity.getAction(), true); EnumValidator.validateEnum(WatchdogModel.class, entity.getModel(), false); }</code><technical_language>potential NPE, entity NULL</technical_language>

Target:
public void validateEnums(WatchDog entity) { if (entity != null) { EnumValidator.validateEnum(WatchdogAction.class, entity.getAction(), true); EnumValidator.validateEnum(WatchdogModel.class, entity.getModel(), true); } }
Source:
<code>private void executeMethodInvocation(MethodInvocationTree mit) { setSymbolicValueOnFields(mit); final int numberOfArguments = mit.arguments().size(); <START> final Pop pop = programState.unstackValue(numberOfArguments + 1); <END> programState = pop.state; logState(mit); final SymbolicValue methodResult = constraintManager.createMethodSymbolicValue(mit, pop.values); programState = programState.stackValue(methodResult); }</code><technical_language>Please inline variable numberOfArguments (which is elsewhere), remove finalmodifier (we internally in context), type ProgramState.Pop instead of Pop (in order avoid import of type Pop, simplify understanding of context). I prefer a variable name close represents, unstack, is name in this class</technical_language>

Target:
private void executeMethodInvocation(MethodInvocationTree mit) { setSymbolicValueOnFields(mit); ProgramState.Pop unstack = programState.unstackValue(mit.arguments().size() + 1); programState = unstack.state; logState(mit); programState = programState.stackValue(constraintManager.createMethodSymbolicValue(mit, unstack.values)); }
Source:
<code>protected boolean canDoAction() { boolean retValue = true; <START> if (getParameters().getDescription().trim().length()==0) { <END> addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_EMPTY_DESCRIPTION); retValue = false; } return retValue; }</code><technical_language>StringUtils.isEmpty</technical_language>

Target:
protected boolean canDoAction() { boolean retValue = true; if (StringUtils.isEmpty(getParameters().getDescription())) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_EMPTY_DESCRIPTION); retValue = false; } return retValue; }
Source:
<code>private Matcher<Object> alwaysFail() { <START> return new AlwaysFailsMatcher(); <END> }</code><technical_language>this replaced returning anonymous class extends Hamcrest's IsNot matcher not() overriden return true? clearer? sure</technical_language>

Target:
private Matcher<Object> alwaysFail() { return new BaseMatcher<Object>() { @Override public boolean matches(Object item) { return false; } @Override public void describeTo(Description description) { } }; }
Source:
<code>public static Configuration create(final HbaseConfig hbaseConfig) throws IOException { Configuration configuration = HBaseConfiguration.create(); if(null != hbaseConfig.getKeytabFileName() && !hbaseConfig.getKeytabFileName().isEmpty()) { File file = new File(hbaseConfig.getKeytabFileName()); <START> if (file.exists()) { <END> configuration.addResource(new File(hbaseConfig.getCoreSite()).toURI().toURL()); configuration.addResource(new File(hbaseConfig.getHdfsSite()).toURI().toURL()); configuration.addResource(new File(hbaseConfig.getHbasePolicy()).toURI().toURL()); configuration.addResource(new File(hbaseConfig.getHbaseSite()).toURI().toURL()); configuration.set("hbase.master.kerberos.principal", hbaseConfig.getAuthString()); configuration.set("hadoop.kerberos.kinit.command", hbaseConfig.getKinitPath()); UserGroupInformation.setConfiguration(configuration); System.setProperty("java.security.krb5.conf", hbaseConfig.getKerberosConfigFile()); if (hbaseConfig.isSecure()) { UserGroupInformation.loginUserFromKeytab( hbaseConfig.getAuthString(), hbaseConfig.getKeytabFileName()); logger.info("Logged into Hbase with User: " + UserGroupInformation.getLoginUser()); } } } return configuration; }</code><technical_language>this checked in case cluster is secure</technical_language>

Target:
public static Configuration create(final HbaseConfig hbaseConfig) throws IOException { Configuration configuration = HBaseConfiguration.create(); if(hbaseConfig.isSecure() && null != hbaseConfig.getKeytabFileName() && !hbaseConfig.getKeytabFileName().isEmpty()) { File file = new File(hbaseConfig.getKeytabFileName()); if (file.exists()) { configuration.addResource(new File(hbaseConfig.getCoreSite()).toURI().toURL()); configuration.addResource(new File(hbaseConfig.getHdfsSite()).toURI().toURL()); configuration.addResource(new File(hbaseConfig.getHbasePolicy()).toURI().toURL()); configuration.addResource(new File(hbaseConfig.getHbaseSite()).toURI().toURL()); configuration.set("hbase.master.kerberos.principal", hbaseConfig.getAuthString()); configuration.set("hadoop.kerberos.kinit.command", hbaseConfig.getKinitPath()); UserGroupInformation.setConfiguration(configuration); System.setProperty("java.security.krb5.conf", hbaseConfig.getKerberosConfigFile()); if (hbaseConfig.isSecure()) { UserGroupInformation.loginUserFromKeytab( hbaseConfig.getAuthString(), hbaseConfig.getKeytabFileName()); logger.info("Logged into Hbase with User: " + UserGroupInformation.getLoginUser()); } } } return configuration; }
Source:
<code>private void writeResponse(Command command, ExecutionHandlerContext context, ArrayList<ArrayList<Object>> items) { ByteBuf bigResponse = context.getByteBufAllocator().buffer(); items.forEach(item -> { ByteBuf response = null; try { response = Coder.getArrayResponse(context.getByteBufAllocator(), item); } catch (CoderException e) { <START> e.printStackTrace(); <END> } bigResponse.writeBytes(response); }); command.setResponse(bigResponse); }</code><technical_language>a logger</technical_language>

Target:
private void writeResponse(Command command, ExecutionHandlerContext context, ArrayList<ArrayList<Object>> items) { ByteBuf aggregatedResponse = context.getByteBufAllocator().buffer(); items.forEach(item -> { ByteBuf response = null; try { response = Coder.getArrayResponse(context.getByteBufAllocator(), item); } catch (CoderException e) { logger.warn("Error encoding subscribe response", e); } aggregatedResponse.writeBytes(response); }); command.setResponse(aggregatedResponse); }
Source:
<code>public static AdditionalFeature map(org.ovirt.engine.api.model.ClusterFeature model, AdditionalFeature template) { <START> AdditionalFeature entity = new AdditionalFeature(); <END> entity.setName(model.getName()); entity.setId(Guid.createGuidFromString(model.getId())); return entity; }</code><technical_language>idea of "template" parameter is pass object populated, partially, if is null instead of creating a new one: AdditionalFeature entity = template != null? template: new AdditionalFeature();</technical_language>

Target:
public static AdditionalFeature map(org.ovirt.engine.api.model.ClusterFeature model, AdditionalFeature template) { AdditionalFeature entity = template != null ? template : new AdditionalFeature(); entity.setName(model.getName()); entity.setId(Guid.createGuidFromString(model.getId())); return entity; }
Source:
<code>public void testSendRequest() { OkHttpClient okHttpClient = Mockito.mock(OkHttpClient.class); okHttpClient.setConnectionSpecs(Collections.singletonList(ConnectionSpec.MODERN_TLS)); WebConnection webConnection = new WebConnection(okHttpClient); Call call = Mockito.mock(Call.class); Mockito.when(okHttpClient.newCall(Mockito.any(Request.class))).thenReturn(call); webConnection.setUrl(BASE_URL_TEST_HTTPS); <START> boolean isRequestSuccessfullySend = webConnection.sendWebRequest(); <END> assertTrue(isRequestSuccessfullySend); }</code><technical_language>please assert this calls enque call</technical_language>

Target:
public void testSendRequest() { OkHttpClient okHttpClient = Mockito.mock(OkHttpClient.class); okHttpClient.setConnectionSpecs(Collections.singletonList(ConnectionSpec.MODERN_TLS)); WebConnection webConnection = new WebConnection(okHttpClient); Call call = Mockito.mock(Call.class); when(okHttpClient.newCall(any(Request.class))).thenReturn(call); webConnection.setUrl(BASE_URL_TEST_HTTPS); webConnection.sendWebRequest(); verify(call, times(1)).enqueue(any()); }
Source:
<code>public static String printCommentTree(List<CommentTreeElement> cs) { <START> String buffer = ""; <END> for (CommentTreeElement c : cs) { buffer += printCommentTree(c, 0); } return buffer; }</code><technical_language>instead of string concatenation a StringBuilder</technical_language>

Target:
public static String printCommentTree(List<CommentTreeElement> cs) { StringBuilder builder = new StringBuilder(); for (CommentTreeElement c : cs) { builder.append(printCommentTree(c, 0)); } return builder.toString(); }
Source:
<code>public InputStream getSource(Locale locale) throws Exception { <START> return this.resolver.resolve(locale).orElseThrow(() -> new IllegalStateException("Could not resolve source for locale " + locale + ".")); <END> }</code><technical_language>uh, checkState(false, "") instead of a lambda ;)</technical_language>

Target:
public InputStream getSource(Locale locale) throws Exception { checkNotNull(locale, "locale"); return this.resolver.resolve(locale).orElseThrow(() -> new IllegalStateException("Could not resolve source for locale " + locale + ".")); }
Source:
<code>public void setBiDirectionalPipe(final boolean twoWay) { biDirectionalPipe = twoWay; if (!biDirectionalPipe && (requestPolicy == RequestPolicy.ADVERTISED <START> || requestPolicy == RequestPolicy.TIP)) <END> requestPolicy = RequestPolicy.REACHABLE_COMMIT; }</code><technical_language>HTTP TIP work. need types of REACHABLE_COMMIT</technical_language>

Target:
public void setBiDirectionalPipe(final boolean twoWay) { biDirectionalPipe = twoWay; if (!biDirectionalPipe) { if (requestPolicy == RequestPolicy.ADVERTISED) requestPolicy = RequestPolicy.REACHABLE_COMMIT; else if (requestPolicy == RequestPolicy.TIP) requestPolicy = RequestPolicy.REACHABLE_COMMIT_TIP; } }
Source:
<code><START> Boolean canEditColumns() { <END> final String permission = WorkbenchFeatures.GUIDED_DECISION_TABLE_EDIT_COLUMNS; final User user = sessionInfo.getIdentity(); return authorizationManager.authorize(permission, user); }</code><technical_language>Boolean for a reason (vs boolean)? asking.. of Boolean in mind this is a tri-value boolean (true, false, null).</technical_language>

Target:
boolean canEditColumns() { final String permission = WorkbenchFeatures.GUIDED_DECISION_TABLE_EDIT_COLUMNS; final User user = sessionInfo.getIdentity(); return authorizationManager.authorize(permission, user); }
Source:
<code>private static ExpressionTree instanceofFound(ExpressionTree expressionTree, Tree.Kind kind) { <START> if (Tree.Kind.CONDITIONAL_OR.equals(kind)) { <END> if (expressionTree.is(Tree.Kind.LOGICAL_COMPLEMENT)) { return instanceofLHS(ExpressionUtils.skipParentheses(((UnaryExpressionTree) expressionTree).expression())); } else { return null; } } else { return instanceofLHS(expressionTree); } }</code><technical_language>kind == Tree.Kind.CONDITIONAL_OR</technical_language>

Target:
private static ExpressionTree instanceofFound(ExpressionTree expressionTree, Tree.Kind kind) { if (kind == Tree.Kind.CONDITIONAL_OR) { if (expressionTree.is(Tree.Kind.LOGICAL_COMPLEMENT)) { return instanceofLHS(ExpressionUtils.skipParentheses(((UnaryExpressionTree) expressionTree).expression())); } else { return null; } } else { return instanceofLHS(expressionTree); } }
Source:
<code><START> public void testItemSequences() throws Exception { <END> List<String> arrayList = new ArrayList<>(); arrayList.add("one"); arrayList.add("two"); arrayList.add("three"); arrayList.add("four"); CoreEvent in = eventBuilder(muleContext).message(of(arrayList)).build(); process(simpleForeach, in); Set<ItemSequenceInfo> sequences = processedEvents.stream() .map(e -> e.getItemSequenceInfo().orElse(null)) .collect(toSet()); assertFalse(ERR_INVALID_ITEM_SEQUENCE, sequences.contains(null)); assertEquals(ERR_NUMBER_ITEM_SEQUENCE, arrayList.size(), sequences.size()); }</code><technical_language>add allure annotations</technical_language>

Target:
public void testItemSequences() throws Exception { List<String> payload = new ArrayList<>(); payload.add("one"); payload.add("two"); payload.add("three"); payload.add("four"); CoreEvent in = eventBuilder(muleContext).message(of(payload)).build(); process(simpleForeach, in); List<Integer> sequences = processedEvents.stream() .map(e -> e.getItemSequenceInfo().map(i -> i.getPosition()).orElse(-1)) .collect(toList()); assertThat(ERR_INVALID_ITEM_SEQUENCE, sequences, is(asList(0, 1, 2, 3))); }
Source:
<code>public boolean test() throws Exception { ICondition selectionRangeCondition = ConditionHelpers.selectionRange(fSelectionRange); if (!selectionRangeCondition.test()) { fFailureMessage = selectionRangeCondition.getFailureMessage(); return false; } TmfTraceManager instance = TmfTraceManager.getInstance(); ITmfTrace trace = instance.getActiveTrace(); <START> if(trace == null) { <END> fFailureMessage = "No trace opened."; return false; } @NonNull TmfTimeRange curWindowRange = instance.getTraceContext(trace).getWindowRange(); if (!curWindowRange.contains(fVisibleTime)) { fFailureMessage = "Current window range " + curWindowRange + " does not contain " + fVisibleTime; return false; } if (fView.isDirty()) { fFailureMessage = "Time graph is dirty"; return false; } return true; }</code><technical_language>formatting</technical_language>

Target:
public boolean test() throws Exception { ICondition selectionRangeCondition = ConditionHelpers.selectionRange(fSelectionRange); if (!selectionRangeCondition.test()) { fFailureMessage = selectionRangeCondition.getFailureMessage(); return false; } TmfTraceManager instance = TmfTraceManager.getInstance(); ITmfTrace trace = instance.getActiveTrace(); if (trace == null) { fFailureMessage = "No trace opened."; return false; } TmfTimeRange curWindowRange = instance.getTraceContext(trace).getWindowRange(); if (!curWindowRange.contains(fVisibleTime)) { fFailureMessage = "Current window range " + curWindowRange + " does not contain " + fVisibleTime; return false; } if (fView.isDirty()) { fFailureMessage = "Time graph is dirty"; return false; } return true; }
Source:
<code>protected SSHClient connect(String serverName) { SSHClient client = createSSHClient(); Integer timeout = Config.<Integer> GetValue(ConfigValues.ConnectToServerTimeoutInSeconds) * 1000; client.setHardTimeout(timeout); client.setSoftTimeout(timeout); client.setHost(serverName, PORT); try { client.connect(); return client; <START> } catch (Exception e) { <END> throw new RuntimeException(e); } }</code><technical_language>want add some logging here? debug level</technical_language>

Target:
protected SSHClient connect(String serverName) { SSHClient client = createSSHClient(); Integer timeout = Config.<Integer> GetValue(ConfigValues.ConnectToServerTimeoutInSeconds) * 1000; client.setHardTimeout(timeout); client.setSoftTimeout(timeout); client.setHost(serverName, PORT); try { client.connect(); return client; } catch (Exception e) { log.debug(String.format("Could not connect to server %1$s: %2$s", serverName, e.getMessage())); throw new RuntimeException(e); } }
Source:
<code>public void testAllOutputsReferenced() throws Exception { tester().assertThat(new PruneAggregationColumns()) <START> .on(p -> buildProjectedAggregation(p, Predicates.alwaysTrue())) <END> .doesNotFire(); }</code><technical_language>static import</technical_language>

Target:
public void testAllOutputsReferenced() throws Exception { tester().assertThat(new PruneAggregationColumns()) .on(p -> buildProjectedAggregation(p, alwaysTrue())) .doesNotFire(); }
Source:
<code>public void testDropViewIndexColumnForMultiTenantTable() throws Exception { String table = generateUniqueName(); String view = generateUniqueName(); String index = generateUniqueName(); try (Connection conn = DriverManager.getConnection(getUrl())) { conn.setAutoCommit(true); try (Statement stmt = conn.createStatement()) { stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," + " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX)) MULTI_TENANT=TRUE"); stmt.execute( "CREATE VIEW IF NOT EXISTS " + view + " (PK1 DATE NOT NULL,PK2 CHAR(15) NOT NULL," + "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT PKVIEW PRIMARY KEY (PK1,PK2)) " + "AS SELECT * FROM " + table + " WHERE KEY_PREFIX = '123'"); stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, PK1) INCLUDE (NON_PK1, NON_PK2)"); stmt.execute("ALTER VIEW " + view + " DROP COLUMN NON_PK1"); } <START> } catch (Exception e) { <END> fail(); } }</code><technical_language>here, need catch exception fail. propagate</technical_language>

Target:
public void testDropViewIndexColumnForMultiTenantTable() throws Exception { String table = generateUniqueName(); String view = generateUniqueName(); String index = generateUniqueName(); try (Connection conn = DriverManager.getConnection(getUrl())) { conn.setAutoCommit(true); try (Statement stmt = conn.createStatement()) { stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," + " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX)) MULTI_TENANT=TRUE"); stmt.execute( "CREATE VIEW IF NOT EXISTS " + view + " (PK1 DATE NOT NULL,PK2 CHAR(15) NOT NULL," + "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT " + "PKVIEW PRIMARY KEY (PK1,PK2)) " + "AS SELECT * FROM " + table + " WHERE KEY_PREFIX = '123'"); stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, PK1) INCLUDE (NON_PK1, NON_PK2)"); stmt.execute("ALTER VIEW " + view + " DROP COLUMN NON_PK1"); } } }
Source:
<code>JwtClaimIssuerConverter() { <START> this.resolver = new DefaultBearerTokenResolver(); <END> }</code><technical_language>more efficient do: java this(new DefaulBearerTokenResolver());</technical_language>

Target:
JwtClaimIssuerConverter() { this(new DefaultBearerTokenResolver()); }
Source:
<code>public void testImagePropertiesTab() { DockerImagesTab imageTab = new DockerImagesTab(); imageTab.activate(); imageTab.refresh(); <START> for (TableItem item : imageTab.getTableItems()) { <END> if (item.getText(1).contains(imageName)) { item.click(); } } PropertiesView propertiesView = new PropertiesView(); propertiesView.open(); try { propertiesView.selectTab("Info"); } catch (SWTLayerException ex) { fail("Properties tab Info is not opened, is image selected in Images Tab?"); } }</code><technical_language>(except for DockerImagesTab)</technical_language>

Target:
public void testImagePropertiesTab() { DockerImagesTab imageTab = new DockerImagesTab(); imageTab.activate(); imageTab.refresh(); imageTab.selectImage(imageName); PropertiesView propertiesView = new PropertiesView(); propertiesView.open(); try { propertiesView.selectTab("Info"); } catch (SWTLayerException ex) { fail("Properties tab Info is not opened, is image selected in Images Tab?"); } }
Source:
<code>public boolean isValidForAddOperation() { if (!this.isSignatureValid()) return false; MailboxStoragePayload mailboxStoragePayload = this.getMailboxStoragePayload(); if (!mailboxStoragePayload.getOwnerPubKey().equals(this.receiversPubKey)) { log.debug("Entry receiversPubKey does not match payload owner which is a requirement for adding MailboxStoragePayloads"); return false; } boolean result = mailboxStoragePayload.getSenderPubKeyForAddOperation() != null && mailboxStoragePayload.getSenderPubKeyForAddOperation().equals(this.getOwnerPubKey()); if (!result) { String res1 = this.toString(); String res2 = "null"; <START> if (mailboxStoragePayload.getOwnerPubKey() != null) <END> res2 = Utilities.encodeToHex(mailboxStoragePayload.getSenderPubKeyForAddOperation().getEncoded(),true); log.warn("ProtectedMailboxStorageEntry::isValidForAddOperation() failed. " + "Entry owner does not match sender key in payload:\nProtectedStorageEntry=%{}\n" + "SenderPubKeyForAddOperation=%{}", res1, res2); } return result; }</code><technical_language>ah damn. missed that</technical_language>

Target:
public boolean isValidForAddOperation() { if (!this.isSignatureValid()) return false; MailboxStoragePayload mailboxStoragePayload = this.getMailboxStoragePayload(); if (!mailboxStoragePayload.getOwnerPubKey().equals(this.receiversPubKey)) { log.debug("Entry receiversPubKey does not match payload owner which is a requirement for adding MailboxStoragePayloads"); return false; } boolean result = mailboxStoragePayload.getSenderPubKeyForAddOperation().equals(this.getOwnerPubKey()); if (!result) { String res1 = this.toString(); String res2 = "null"; if (mailboxStoragePayload.getOwnerPubKey() != null) res2 = Utilities.encodeToHex(mailboxStoragePayload.getSenderPubKeyForAddOperation().getEncoded(),true); log.warn("ProtectedMailboxStorageEntry::isValidForAddOperation() failed. " + "Entry owner does not match sender key in payload:\nProtectedStorageEntry=%{}\n" + "SenderPubKeyForAddOperation=%{}", res1, res2); } return result; }