auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void renameTo(final FilePath target) throws IOException, InterruptedException { if(this.channel != target.channel) { throw new IOException("renameTo target must be on the same host"); } act(new SecureFileCallable<Void>() { private static final long serialVersionUID = 1L; public Void invoke(File f, VirtualChannel channel) throws IOException { <START> Files.move(reading(f).toPath(), creating(new File(target.remote)).toPath(), StandardCopyOption.COPY_ATTRIBUTES, LinkOption.NOFOLLOW_LINKS); <END> return null; } }); }</code><technical_language>fine, do want merge master Util#fileToPath File#toPath runtime exception InvalidPathException is wrapped IOException</technical_language>

Target:
public void renameTo(final FilePath target) throws IOException, InterruptedException { if(this.channel != target.channel) { throw new IOException("renameTo target must be on the same host"); } act(new SecureFileCallable<Void>() { private static final long serialVersionUID = 1L; public Void invoke(File f, VirtualChannel channel) throws IOException { Files.move(fileToPath(reading(f)), fileToPath(creating(new File(target.remote))), LinkOption.NOFOLLOW_LINKS); return null; } }); }
Source:
<code>public WikipediaIrcDecoder(@JsonProperty("namespaces") Map<String, Map<String, String>> namespaces, @JsonProperty("geoIpDatabase") String geoIpDatabase) { <START> if(namespaces == null) namespaces = Maps.newHashMap(); <END> this.namespaces = namespaces; File geoDb; if(geoIpDatabase != null) { geoDb = new File(geoIpDatabase); } else { try { geoDb = File.createTempFile("geoip", null); geoDb.deleteOnExit(); log.info("Downloading geo ip database to [%s]", geoDb); FileUtils.copyInputStreamToFile( new GZIPInputStream( new URL("<LINK_0>").openStream() ), geoDb ); } catch(IOException e) { throw new RuntimeException("Unable to download geo ip database [%s]", e); } } try { geoLookup = new DatabaseReader(geoDb); } catch(IOException e) { throw new RuntimeException("Unable to open geo ip lookup database", e); } }</code><technical_language>squigglies please</technical_language>

Target:
public WikipediaIrcDecoder(@JsonProperty("namespaces") Map<String, Map<String, String>> namespaces, @JsonProperty("geoIpDatabase") String geoIpDatabase) { if(namespaces == null) { namespaces = Maps.newHashMap(); } this.namespaces = namespaces; File geoDb; if(geoIpDatabase != null) { geoDb = new File(geoIpDatabase); } else { try { String tmpDir = System.getProperty("java.io.tmpdir"); geoDb = new File(tmpDir, this.getClass().getCanonicalName() + ".GeoLite2-City.mmdb"); if(!geoDb.exists()) { log.info("Downloading geo ip database to [%s]", geoDb); FileUtils.copyInputStreamToFile( new GZIPInputStream( new URL("<LINK_0>").openStream() ), geoDb ); } } catch(IOException e) { throw new RuntimeException("Unable to download geo ip database [%s]", e); } } try { geoLookup = new DatabaseReader(geoDb); } catch(IOException e) { throw new RuntimeException("Unable to open geo ip lookup database", e); } }
Source:
<code><START> public Builder excludeMethod(String methodName) { <END> excludedMethods.add(methodName); return this; }</code><technical_language>null, empty, blanks? a pattern for a valid Java method name</technical_language>

Target:
public Builder excludeMethod(String methodName) { checkNotNull(methodName); final boolean validName = isName(methodName); checkArgument(validName); excludedMethods.add(methodName); return this; }
Source:
<code>public Image getImage(Object element) { Image toReturn = null; if (element instanceof FakeArtifactParent) { <START> toReturn = ImageManager.getImage(FrameworkImage.FOLDER); <END> } else if (element instanceof AttributeLineElement) { toReturn = ImageManager.getImage(FrameworkImage.LINE_MATCH); } else if (element instanceof Artifact) { Image artImage = ArtifactImageManager.getImage((Artifact) element); int matchCount = getMatchCount(element); if (matchCount > 0) { toReturn = artImage; } else { Image disabledImage = disabledImageMap.get(artImage); if (disabledImage == null) { disabledImage = new Image(artImage.getDevice(), artImage, SWT.IMAGE_DISABLE); disabledImageMap.put(artImage, disabledImage); } toReturn = disabledImage; } } return toReturn; }</code><technical_language>Change this IDE shared image folder. PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER)</technical_language>

Target:
public Image getImage(Object element) { Image toReturn = null; if (element instanceof FakeArtifactParent) { toReturn = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER); } else if (element instanceof AttributeLineElement) { toReturn = ImageManager.getImage(FrameworkImage.LINE_MATCH); } else if (element instanceof Artifact) { Image artImage = ArtifactImageManager.getImage((Artifact) element); int matchCount = getMatchCount(element); if (matchCount > 0) { toReturn = artImage; } else { Image disabledImage = disabledImageMap.get(artImage); if (disabledImage == null) { disabledImage = new Image(artImage.getDevice(), artImage, SWT.IMAGE_DISABLE); disabledImageMap.put(artImage, disabledImage); } toReturn = disabledImage; } } return toReturn; }
Source:
<code>public void bookmarkPage() { new BookmarkPageTask(getActivity(), title) { @Override public void onBeforeExecute() { <START> Toast.makeText(getActivity(), R.string.toast_saving_page, Toast.LENGTH_LONG).show(); <END> } @Override public void onFinish(Void result) { Toast.makeText(getActivity(), R.string.toast_saved_page, Toast.LENGTH_LONG).show(); } }.execute(); }</code><technical_language>Do need a toast for "bookmarking..." page? expensive operation, especially now</technical_language>

Target:
public void bookmarkPage() { new BookmarkPageTask(getActivity(), title) { @Override public void onFinish(Void result) { Toast.makeText(getActivity(), R.string.toast_saved_page, Toast.LENGTH_LONG).show(); } }.execute(); }
Source:
<code>public Consumer<OutputWriter> toJSON(T scmMaterialConfig) { return jsonWriter -> { if (!(scmMaterialConfig instanceof P4MaterialConfig)) { jsonWriter.add("url", scmMaterialConfig.getUrl()); } jsonWriter.add("destination", scmMaterialConfig.getFolder()); if (scmMaterialConfig.filter().isEmpty()) { jsonWriter.renderNull("filter"); } else { jsonWriter.addChild("filter", FilterRepresenter.toJSON(scmMaterialConfig.filter())); } <START> jsonWriter.add("invert_filter", scmMaterialConfig.isInvertFilter()); <END> jsonWriter.add("name", scmMaterialConfig.getName()); jsonWriter.add("auto_update", scmMaterialConfig.isAutoUpdate()); jsonWriter.addIfNotNull("username", scmMaterialConfig.getUserName()); jsonWriter.addIfNotNull("encrypted_password", scmMaterialConfig.getEncryptedPassword()); }; }</code><technical_language>@kritika-singh3 I wondering if need serialize attributes for a material. this API is Materials SPA consider serializing required attributes</technical_language>

Target:
public Consumer<OutputWriter> toJSON(T scmMaterialConfig) { return jsonWriter -> { if (!(scmMaterialConfig instanceof P4MaterialConfig)) { jsonWriter.add("url", scmMaterialConfig.getUrl()); } jsonWriter.add("name", scmMaterialConfig.getName()); jsonWriter.add("auto_update", scmMaterialConfig.isAutoUpdate()); }; }
Source:
<code>public <T> T getAdapter(Class<T> key) { Object adpater = super.getAdapter(key); if (adpater == null) { <START> IConsole console = getConsole(); <END> if (console != null) { ListenerList<IConsolePageParticipant> listeners = getParticipants(console); if (listeners != null) { for (IConsolePageParticipant iConsolePageParticipant : listeners) { IConsolePageParticipant participant = iConsolePageParticipant; adpater = participant.getAdapter(key); if (adpater != null) { return (T) adpater; } } } } } return (T) adpater; }</code><technical_language>call getCurrentConsole() get IDebuggerConsole</technical_language>

Target:
public <T> T getAdapter(Class<T> key) { Object adpater = super.getAdapter(key); if (adpater == null) { IDebuggerConsole console = getCurrentConsole(); if (console != null) { ListenerList<IConsolePageParticipant> listeners = getParticipants(console); if (listeners != null) { for (IConsolePageParticipant iConsolePageParticipant : listeners) { IConsolePageParticipant participant = iConsolePageParticipant; adpater = participant.getAdapter(key); if (adpater != null) { return (T) adpater; } } } } } return (T) adpater; }
Source:
<code>public HslProvider(String user, String pass) { super(NetworkId.HSL); <START> apiBase = String.format("<LINK_0>", <END> SERVER_VERSION, user, pass); try { parserFactory = XmlPullParserFactory.newInstance(System.getProperty(XmlPullParserFactory.PROPERTY_NAME), null); } catch (final XmlPullParserException x) { throw new RuntimeException(x); } }</code><technical_language>username password part of API base? understanding is constant (<LINK_1> in this case) parameters appended dynamically. Username password appended in apiUri() method</technical_language>

Target:
public HslProvider(String user, String pass) { super(NetworkId.HSL); this.user = user; this.pass = pass; try { parserFactory = XmlPullParserFactory.newInstance(System.getProperty(XmlPullParserFactory.PROPERTY_NAME), null); } catch (final XmlPullParserException x) { throw new RuntimeException(x); } }
Source:
<code>public boolean startDeleteRoleFlow(String userStoreDomain, String roleName) throws WorkflowException { WorkflowService workflowService = IdentityWorkflowDataHolder.getInstance().getWorkflowService(); String tenant = CarbonContext.getThreadLocalCarbonContext().getTenantDomain(); String nameWithTenant = UserCoreUtil.addTenantDomainToEntry(roleName, tenant); String fullyQualifiedName = UserCoreUtil.addDomainToName(nameWithTenant, userStoreDomain); Map<String, Object> wfParams = new HashMap<>(); Map<String, Object> nonWfParams = new HashMap<>(); wfParams.put(ROLENAME, roleName); wfParams.put(USER_STORE_DOMAIN, userStoreDomain); String uuid = UUID.randomUUID().toString(); boolean state = startWorkFlow(wfParams, nonWfParams, uuid); if (!Boolean.TRUE.equals(getWorkFlowCompleted()) && !state) { try { workflowService.addRequestEntityRelationships(uuid, new Entity[]{new Entity(fullyQualifiedName, "ROLE")}); } catch (InternalWorkflowException e) { <START> log.info("No workflow associated with the operation."); <END> } } return state; }</code><technical_language>Exception is logged thrown</technical_language>

Target:
public boolean startDeleteRoleFlow(String userStoreDomain, String roleName) throws WorkflowException { WorkflowService workflowService = IdentityWorkflowDataHolder.getInstance().getWorkflowService(); String tenant = CarbonContext.getThreadLocalCarbonContext().getTenantDomain(); String fullyQualifiedName = UserCoreUtil.addDomainToName(roleName, userStoreDomain); Map<String, Object> wfParams = new HashMap<>(); Map<String, Object> nonWfParams = new HashMap<>(); wfParams.put(ROLENAME, roleName); wfParams.put(USER_STORE_DOMAIN, userStoreDomain); String uuid = UUID.randomUUID().toString(); Entity roleEntity = new Entity(fullyQualifiedName, UserStoreWFConstants.ENTITY_TYPE_ROLE, tenant); if (workflowService.eventEngagedWithWorkflows(UserStoreWFConstants.DELETE_ROLE_EVENT) && !Boolean.TRUE.equals (getWorkFlowCompleted()) && !isValidOperation(new Entity[]{roleEntity})) { throw new WorkflowException("Operation is not valid."); } boolean state = startWorkFlow(wfParams, nonWfParams, uuid); if (!Boolean.TRUE.equals(getWorkFlowCompleted()) && !state) { try { workflowService.addRequestEntityRelationships(uuid, new Entity[]{roleEntity}); } catch (InternalWorkflowException e) { if (log.isDebugEnabled()) { log.debug("No workflow associated with the operation.", e); } } } return state; }
Source:
<code>private static boolean isBlinkPlanner(Table table) { TableEnvironment tableEnv = ((TableImpl) table).getTableEnvironment(); <START> if (tableEnv instanceof BatchTableEnvironment || tableEnv instanceof TableEnvImpl) { <END> return false; } else if (tableEnv instanceof TableEnvironmentImpl) { Planner planner = ((TableEnvironmentImpl) tableEnv).getPlanner(); return planner instanceof PlannerBase; } else { throw new RuntimeException(String.format( "Could not determine the planner type for table environment class %s", tableEnv.getClass())); } }</code><technical_language>tableEnv instanceof BatchTableEnvironment is unnecessary</technical_language>

Target:
private static boolean isBlinkPlanner(Table table) { TableEnvironment tableEnv = ((TableImpl) table).getTableEnvironment(); if (tableEnv instanceof TableEnvImpl) { return false; } else if (tableEnv instanceof TableEnvironmentImpl) { Planner planner = ((TableEnvironmentImpl) tableEnv).getPlanner(); return planner instanceof PlannerBase; } else { throw new RuntimeException(String.format( "Could not determine the planner type for table environment class %s", tableEnv.getClass())); } }
Source:
<code>public final synchronized void step() { if (random.nextDouble() < COINCHANCE) { addEntity(new Coin(new Point3D(-1, 1.0 / 2, LENGTH))); addEntity(new Coin(new Point3D(0, 1.0 / 2, LENGTH))); addEntity(new Coin(new Point3D(1, 1.0 / 2, LENGTH))); } else if (random.nextDouble() < OBSTACLECHANCE) { addEntity(new Obstacle( new Point3D(0, 1.0 / 2, LENGTH), new Point3D(WIDTH, 1, 1)) ); } getPlayer().step(); <START> distance++; <END> moveTrack(UNITS_PER_TICK); }</code><technical_language>this? This in-game in opinion :) (then distance a double) distance += UNITS_PER_TICK;</technical_language>

Target:
public final synchronized void step() { if (random.nextDouble() < COINCHANCE) { addEntity(new Coin(new Point3D(-1, 1.0 / 2, LENGTH))); addEntity(new Coin(new Point3D(0, 1.0 / 2, LENGTH))); addEntity(new Coin(new Point3D(1, 1.0 / 2, LENGTH))); } else if (random.nextDouble() < OBSTACLECHANCE) { addEntity(new Obstacle( new Point3D(0, 1.0 / 2, LENGTH), new Point3D(WIDTH, 1, 1)) ); } getPlayer().step(); distance += UNITS_PER_TICK; moveTrack(UNITS_PER_TICK); }
Source:
<code>public void run() { for (TimeGraphEntry entry : fZoomEntryList) { if (fMonitor.isCanceled()) { return; } if (entry == null) { break; } zoom(entry, fMonitor); } List<ILinkEvent> events = getLinkList(fZoomStartTime, fZoomEndTime, fResolution, fMonitor); <START> fTimeGraphWrapper.getTimeGraphViewer().setLinks(events); <END> redraw(); }</code><technical_language>put null check here. prefer instead getLinkList() return @NonNull, check monitor's canceled state decide if update viewer not</technical_language>

Target:
public void run() { for (TimeGraphEntry entry : fZoomEntryList) { if (fMonitor.isCanceled()) { return; } if (entry == null) { break; } zoom(entry, fMonitor); } List<ILinkEvent> events = getLinkList(fZoomStartTime, fZoomEndTime, fResolution, fMonitor); if (events != null) { fTimeGraphWrapper.getTimeGraphViewer().setLinks(events); redraw(); } }
Source:
<code>private void extractContainerProperties() { String repoRelativePath = makeRepoRelative(resource) + "/"; Set<String> ignoredFiles = indexDiffData.getIgnoredNotInIndex(); Set<String> untrackedFolders = indexDiffData.getUntrackedFolders(); ignored = containsPrefixPath(ignoredFiles, repoRelativePath) || !hasContainerAnyFiles(resource); if (ignored) tracked = false; else tracked = !containsPrefixPath(untrackedFolders, repoRelativePath); <START> if (ResourceUtil.isSymbolicLink(repository, repoRelativePath)) { extractResourceProperties(); return; } <END> Set<String> changed = new HashSet<String>(indexDiffData.getChanged()); changed.addAll(indexDiffData.getAdded()); changed.addAll(indexDiffData.getRemoved()); if (containsPrefix(changed, repoRelativePath)) staged = Staged.MODIFIED; else staged = Staged.NOT_STAGED; Set<String> conflicting = indexDiffData.getConflicting(); conflicts = containsPrefix(conflicting, repoRelativePath); Set<String> modified = indexDiffData.getModified(); Set<String> untracked = indexDiffData.getUntracked(); Set<String> missing = indexDiffData.getMissing(); dirty = containsPrefix(modified, repoRelativePath) || containsPrefix(untracked, repoRelativePath) || containsPrefix(missing, repoRelativePath); }</code><technical_language>I this block moved line. "tracked" field is set in extractResourceProperties() method</technical_language>

Target:
private void extractContainerProperties() { String repoRelativePath = makeRepoRelative(resource) + "/"; if (ResourceUtil.isSymbolicLink(repository, repoRelativePath)) { extractResourceProperties(); return; } Set<String> ignoredFiles = indexDiffData.getIgnoredNotInIndex(); Set<String> untrackedFolders = indexDiffData.getUntrackedFolders(); ignored = containsPrefixPath(ignoredFiles, repoRelativePath) || !hasContainerAnyFiles(resource); if (ignored) tracked = false; else tracked = !containsPrefixPath(untrackedFolders, repoRelativePath); Set<String> changed = new HashSet<String>(indexDiffData.getChanged()); changed.addAll(indexDiffData.getAdded()); changed.addAll(indexDiffData.getRemoved()); if (containsPrefix(changed, repoRelativePath)) staged = Staged.MODIFIED; else staged = Staged.NOT_STAGED; Set<String> conflicting = indexDiffData.getConflicting(); conflicts = containsPrefix(conflicting, repoRelativePath); Set<String> modified = indexDiffData.getModified(); Set<String> untracked = indexDiffData.getUntracked(); Set<String> missing = indexDiffData.getMissing(); dirty = containsPrefix(modified, repoRelativePath) || containsPrefix(untracked, repoRelativePath) || containsPrefix(missing, repoRelativePath); }
Source:
<code>protected void migrateRealmCommon(RealmModel realm) { addAccountConsoleClient(realm); ClientModel accountClient = realm.getClientByClientId(Constants.ACCOUNT_MANAGEMENT_CLIENT_ID); RoleModel viewAppRole = accountClient.addRole(AccountRoles.VIEW_APPLICATIONS); viewAppRole.setDescription("${role_" + AccountRoles.VIEW_APPLICATIONS + "}"); LOG.debugf("Added the role %s to the '%s' client.", AccountRoles.VIEW_APPLICATIONS, Constants.ACCOUNT_MANAGEMENT_CLIENT_ID); RoleModel viewConsentRole = accountClient.addRole(AccountRoles.VIEW_CONSENT); viewConsentRole.setDescription("${role_" + AccountRoles.VIEW_CONSENT + "}"); LOG.debugf("Added the role %s to the '%s' client.", AccountRoles.VIEW_CONSENT, Constants.ACCOUNT_MANAGEMENT_CLIENT_ID); RoleModel manageConsentRole = accountClient.addRole(AccountRoles.MANAGE_CONSENT); manageConsentRole.setDescription("${role_" + AccountRoles.MANAGE_CONSENT + "}"); LOG.debugf("Added the role %s to the '%s' client.", AccountRoles.MANAGE_CONSENT, Constants.ACCOUNT_MANAGEMENT_CLIENT_ID); manageConsentRole.addCompositeRole(viewConsentRole); LOG.debugf("Added the %s role as a composite role to %s", AccountRoles.VIEW_CONSENT, AccountRoles.MANAGE_CONSENT); <START> RoleModel manageAccountRole = accountClient.getRole(AccountRoles.MANAGE_ACCOUNT); <END> manageAccountRole.addCompositeRole(manageConsentRole); }</code><technical_language>Manage account a composite role. Instead rest endpoints check for manage account manage consent roles. I this added</technical_language>

Target:
protected void migrateRealmCommon(RealmModel realm) { addAccountConsoleClient(realm); addAccountApiRoles(realm); }
Source:
<code>private static void checkType(Type type) { <START> checkArgument(isAcceptedType(type), "Can't handle type: %s", type); <END> }</code><technical_language>"Type is supported"</technical_language>

Target:
private static void checkType(Type type) { checkArgument(isSupported(type), "Type not supported: %s", type); }
Source:
<code>public boolean isMergerFor(Diff target) { <START> final Conflict conflict = target.getConflict(); <END> return conflict != null && conflict.getKind() == ConflictKind.PSEUDO; }</code><technical_language>this occasion mention this. This kind of variable extraction for performance hinders readability. please avoid (they're cluttering of "performance" patches). Simple getters this highlighted profilers of instrumentation</technical_language>

Target:
public boolean isMergerFor(Diff target) { return target.getConflict() != null && target.getConflict().getKind() == ConflictKind.PSEUDO; }
Source:
<code>public boolean equals(Object other) { <START> if (this == other) <END> { return true; } if (other == null || getClass() != other.getClass()) { return false; } return Objects.equals(id, ((VirtualMachine) other).id); }</code><technical_language>whitespace/style</technical_language>

Target:
public boolean equals(Object other) { if (this == other) return true; if (other == null || getClass() != other.getClass()) return false; return Objects.equals(id, ((VirtualMachine) other).id); }
Source:
<code>public CategoryInfo(Parcel source) { category = (Category) source.readSerializable(); <START> visible = source.readInt() == 1 ? true : false; <END> }</code><technical_language>diff - source.readInt() == 1 ? true : false + source.readInt() == 1</technical_language>

Target:
public CategoryInfo(Parcel source) { category = (Category) source.readSerializable(); visible = source.readInt() == 1; }
Source:
<code>public static void write(OutputStream out, @Nullable AnyObjectId id) throws IOException { if (id != null) { out.write(NON_NULL_MARKER); <START> id.copyRawTo(out); <END> } else { out.write(NULL_MARKER); } }</code><technical_language>optional: call writeWithoutMarker</technical_language>

Target:
public static void write(OutputStream out, @Nullable AnyObjectId id) throws IOException { if (id != null) { out.write(NON_NULL_MARKER); writeWithoutMarker(out, id); } else { out.write(NULL_MARKER); } }
Source:
<code>protected List<ProjectNegotiationData> createProjectNegotiationDataList( final List<IProject> projectsToShare, final IProgressMonitor monitor) throws IOException, LocalCancellationException { final int scale = 1000; monitor .beginTask( "Creating file list and calculating file checksums. This may take a while...", projectsToShare.size() * scale); List<ProjectNegotiationData> negData = new ArrayList<ProjectNegotiationData>( projectsToShare.size()); for (IProject project : projectsToShare) { if (monitor.isCanceled()) throw new LocalCancellationException(null, CancelOption.DO_NOT_NOTIFY_PEER); try { if (editorManager != null) editorManager.saveEditors(project); FileList projectFileList = FileListFactory.createFileList( project, session.getSharedResources(project .getReferencePoint()), checksumCache, new SubProgressMonitor(monitor, 1 * scale, SubProgressMonitor.SUPPRESS_BEGINTASK | SubProgressMonitor.SUPPRESS_SETTASKNAME)); boolean partial = !session.isCompletelyShared(project .getReferencePoint()); <START> String projectID = session.getReferencePointID(project <END> .getReferencePoint()); projectFileList.setProjectID(projectID); ProjectNegotiationData data = new ProjectNegotiationData( projectID, project.getName(), partial, projectFileList); negData.add(data); } catch (IOException e) { localCancel(e.getMessage(), CancelOption.DO_NOT_NOTIFY_PEER); throw new IOException(e.getMessage(), e); } } monitor.done(); return negData; }</code><technical_language>rename variable referencePointID</technical_language>

Target:
protected List<ProjectNegotiationData> createProjectNegotiationDataList( final List<IProject> projectsToShare, final IProgressMonitor monitor) throws IOException, LocalCancellationException { final int scale = 1000; monitor .beginTask( "Creating file list and calculating file checksums. This may take a while...", projectsToShare.size() * scale); List<ProjectNegotiationData> negData = new ArrayList<ProjectNegotiationData>( projectsToShare.size()); for (IProject project : projectsToShare) { if (monitor.isCanceled()) throw new LocalCancellationException(null, CancelOption.DO_NOT_NOTIFY_PEER); try { if (editorManager != null) editorManager.saveEditors(project); FileList projectFileList = FileListFactory.createFileList( project, session.getSharedResources(project .getReferencePoint()), checksumCache, new SubProgressMonitor(monitor, 1 * scale, SubProgressMonitor.SUPPRESS_BEGINTASK | SubProgressMonitor.SUPPRESS_SETTASKNAME)); boolean partial = !session.isCompletelyShared(project .getReferencePoint()); String referencePointID = session.getReferencePointID(project .getReferencePoint()); projectFileList.setProjectID(referencePointID); ProjectNegotiationData data = new ProjectNegotiationData( referencePointID, project.getName(), partial, projectFileList); negData.add(data); } catch (IOException e) { localCancel(e.getMessage(), CancelOption.DO_NOT_NOTIFY_PEER); throw new IOException(e.getMessage(), e); } } monitor.done(); return negData; }
Source:
<code><START> protected CompositeHeaderMatcher createHeaderMatcher(Collection<String> patterns) { <END> Collection<HeaderMatcher> matchers = new ArrayList<HeaderMatcher>(); for (String pattern : patterns) { if (STANDARD_REQUEST_HEADER_NAME_PATTERN.equals(pattern)) { matchers.add(new ContentBasedHeaderMatcher(true, this.requestHeaderNames)); } else if (STANDARD_REPLY_HEADER_NAME_PATTERN.equals(pattern)) { matchers.add(new ContentBasedHeaderMatcher(true, this.replyHeaderNames)); } else if (NON_STANDARD_HEADER_NAME_PATTERN.equals(pattern)) { matchers.add(new PrefixBasedMatcher(false, this.standardHeaderPrefix)); } else { matchers.add(new PatternBasedHeaderMatcher(Collections.singleton(pattern))); } } return new CompositeHeaderMatcher(matchers); }</code><technical_language>Is intentional overdid, return for CompositeHeaderMatcher, HeaderMatcher strategy</technical_language>

Target:
protected HeaderMatcher createHeaderMatcher(Collection<String> patterns) { Collection<HeaderMatcher> matchers = new ArrayList<HeaderMatcher>(); for (String pattern : patterns) { if (STANDARD_REQUEST_HEADER_NAME_PATTERN.equals(pattern)) { matchers.add(new ContentBasedHeaderMatcher(true, this.requestHeaderNames)); } else if (STANDARD_REPLY_HEADER_NAME_PATTERN.equals(pattern)) { matchers.add(new ContentBasedHeaderMatcher(true, this.replyHeaderNames)); } else if (NON_STANDARD_HEADER_NAME_PATTERN.equals(pattern)) { matchers.add(new PrefixBasedMatcher(false, this.standardHeaderPrefix)); } else { matchers.add(new PatternBasedHeaderMatcher(Collections.singleton(pattern))); } } return new CompositeHeaderMatcher(matchers); }
Source:
<code>protected final void handleMessageInternal(Message<?> message) { MailMessage mailMessage = convertMessageToMailMessage(message); if (mailMessage instanceof SimpleMailMessage) { this.mailSender.send((SimpleMailMessage) mailMessage); } else if (mailMessage instanceof MimeMailMessage) { Assert.state(this.mailSender instanceof JavaMailSender, <START> "'mailSender' [" + this.mailSender + "] doesn't support 'MimeMailMessage' to send: " + mailMessage); <END> ((JavaMailSender) this.mailSender).send(((MimeMailMessage) mailMessage).getMimeMessage()); } else { throw new IllegalArgumentException( "Unsupported MailMessage type [" + mailMessage.getClass().getName() + "]."); } }</code><technical_language>if is true; some other MailSender implementation **does** support MimeMailMessage, of course, (and method call). change message "this adapter requires a JavaMailSender send a MimeMailMessage"</technical_language>

Target:
protected final void handleMessageInternal(Message<?> message) { MailMessage mailMessage = convertMessageToMailMessage(message); if (mailMessage instanceof SimpleMailMessage) { this.mailSender.send((SimpleMailMessage) mailMessage); } else if (mailMessage instanceof MimeMailMessage) { Assert.state(this.mailSender instanceof JavaMailSender, "this adapter requires a 'JavaMailSender' to send a 'MimeMailMessage'"); ((JavaMailSender) this.mailSender).send(((MimeMailMessage) mailMessage).getMimeMessage()); } else { throw new IllegalArgumentException( "Unsupported MailMessage type [" + mailMessage.getClass().getName() + "]."); } }
Source:
<code>protected MultiFieldQueryParser newMultipleFieldQueryParser(String[] fields) { Analyzer analyzer = getFullTextSession().getSearchFactory().getAnalyzer(getType()); <START> return new MultiFieldQueryParser(fields, analyzer); <END> }</code><technical_language>I want set defaultOperator return items matching terms included in a query</technical_language>

Target:
protected MultiFieldQueryParser newMultipleFieldQueryParser(String[] fields) { Analyzer analyzer; if (getType().isAssignableFrom(PersonName.class)) { analyzer = getFullTextSession().getSearchFactory().getAnalyzer("PartialPersonNameQueryAnalyzer"); } else { analyzer = getFullTextSession().getSearchFactory().getAnalyzer(getType()); } MultiFieldQueryParser queryParser = new MultiFieldQueryParser(fields, analyzer); queryParser.setDefaultOperator(Operator.AND); return queryParser; }
Source:
<code>protected boolean isOrganizationalUnitCreated(String orgName, DirContext initialDirContext) throws UserStoreException { String partitionDN = tenantMgtConfig.getTenantStoreProperties().get( UserCoreConstants.TenantMgtConfig.PROPERTY_ROOT_PARTITION); String organizationalObjectClass = tenantMgtConfig.getTenantStoreProperties().get( UserCoreConstants.TenantMgtConfig.PROPERTY_ORGANIZATIONAL_OBJECT_CLASS); String organizationalAttribute = tenantMgtConfig.getTenantStoreProperties().get( UserCoreConstants.TenantMgtConfig.PROPERTY_ORGANIZATIONAL_ATTRIBUTE); String searchFilter = "(&(objectClass=" + organizationalObjectClass + ")(" + organizationalAttribute + "=" + orgName + "))"; SearchControls userSearchControl = new SearchControls(); userSearchControl.setSearchScope(SearchControls.SUBTREE_SCOPE); NamingEnumeration<SearchResult> userSearchResults = null; try { userSearchResults = initialDirContext.search(partitionDN, searchFilter, userSearchControl); <START> return userSearchResults.hasMore(); <END> } catch (NamingException e) { String errorMessage = "Error occurred while searching in root partition."; if(logger.isDebugEnabled()){ logger.debug(errorMessage, e); } throw new UserStoreException(errorMessage, e); } }</code><technical_language>add avilable context info for debug logs</technical_language>

Target:
protected boolean isOrganizationalUnitCreated(String orgName, DirContext initialDirContext) throws UserStoreException { String partitionDN = tenantMgtConfig.getTenantStoreProperties().get( UserCoreConstants.TenantMgtConfig.PROPERTY_ROOT_PARTITION); String organizationalObjectClass = tenantMgtConfig.getTenantStoreProperties().get( UserCoreConstants.TenantMgtConfig.PROPERTY_ORGANIZATIONAL_OBJECT_CLASS); String organizationalAttribute = tenantMgtConfig.getTenantStoreProperties().get( UserCoreConstants.TenantMgtConfig.PROPERTY_ORGANIZATIONAL_ATTRIBUTE); String searchFilter = "(&(objectClass=" + organizationalObjectClass + ")(" + organizationalAttribute + "=" + orgName + "))"; SearchControls userSearchControl = new SearchControls(); userSearchControl.setSearchScope(SearchControls.SUBTREE_SCOPE); NamingEnumeration<SearchResult> userSearchResults = null; try { userSearchResults = initialDirContext.search(partitionDN, searchFilter, userSearchControl); return userSearchResults.hasMore(); } catch (NamingException e) { String errorMessage = "Error occurred while searching in root partition for organization : " + orgName; if (logger.isDebugEnabled()) { logger.debug(errorMessage, e); } throw new UserStoreException(errorMessage, e); } }
Source:
<code>public void validate(Element element, ElementValidation validation) { super.validate(element, validation); restSpringValidatorHelper.hasHttpHeadersReturnType((ExecutableElement) element, validation); <START> restSpringValidatorHelper.doesNotHavePartAnnotatedParameter((ExecutableElement) element, validation); <END> restSpringValidatorHelper.doesNotHaveFieldAnnotatedParameter((ExecutableElement) element, validation); restSpringValidatorHelper.doesNotHaveBodyAnnotatedParameter((ExecutableElement) element, validation); }</code><technical_language>validations present in multiple handlers, extracting a validator method</technical_language>

Target:
public void validate(Element element, ElementValidation validation) { super.validate(element, validation); restSpringValidatorHelper.hasHttpHeadersReturnType((ExecutableElement) element, validation); restSpringValidatorHelper.doesNotHaveRequestEntityAnnotatedParameters((ExecutableElement) element, validation); }
Source:
<code>public void metricIsOnlyRegisteredOnce() { TableLevelMetricsController memoizing = new MemoizingTableLevelMetricsController(delegate); Counter c1 = memoizing.createAndRegisterCounter(STRING_CLASS, METRIC_NAME, TABLE_REFERENCE); Counter c2 = memoizing.createAndRegisterCounter(STRING_CLASS, METRIC_NAME, TABLE_REFERENCE); assertThat(c1).isSameAs(c2); verify(delegate, times(1)).createAndRegisterCounter(STRING_CLASS, METRIC_NAME, TABLE_REFERENCE); <START> } <END></code><technical_language>verify(delegate) well</technical_language>

Target:
public void metricIsOnlyRegisteredOnce() { Counter c1 = memoizing.createAndRegisterCounter(STRING_CLASS, METRIC_NAME, TABLE_REFERENCE); Counter c2 = memoizing.createAndRegisterCounter(STRING_CLASS, METRIC_NAME, TABLE_REFERENCE); assertThat(c1).isSameAs(c2); verify(delegate, times(1)).createAndRegisterCounter(STRING_CLASS, METRIC_NAME, TABLE_REFERENCE); }
Source:
<code>public void visitDecorator(PyDecoratorTree pyDecoratorTree) { PyNameTree nameTree = pyDecoratorTree.name().names().get(0); Scope scope = scopesByRootTree.get(currentScopeRootTree()); SymbolImpl symbol = scope.resolve(nameTree.name()); if (symbol != null && !symbol.usages().contains(nameTree)) { symbol.addUsage(nameTree); <START> } <END> super.visitDecorator(pyDecoratorTree); }</code><technical_language>5 lines a duplication of visitName method</technical_language>

Target:
public void visitDecorator(PyDecoratorTree pyDecoratorTree) { PyNameTree nameTree = pyDecoratorTree.name().names().get(0); addSymbolUsage(nameTree); super.visitDecorator(pyDecoratorTree); }
Source:
<code>public void testAutoMap_ReturnEmptyWhenNoPoolConfigured() { final CallActivity callActivity = CallActivityBuilder .aCallActivity() .build(); <START> final CallActivityMapper mapper = callActivityHelper.automapSubProcess(callActivity); <END> assertThat(mapper.getInputMappingToCreate()).isEmpty(); assertThat(mapper.getOutputMappingToCreate()).isEmpty(); }</code><technical_language>automapSubProcess(..) ? name</technical_language>

Target:
public void testAutoMap_ReturnEmptyWhenNoPoolConfigured() { final CallActivity callActivity = CallActivityBuilder .aCallActivity() .build(); final CallActivityMapper mapper = callActivityHelper.findAutomapingCandidatesForContractInputsAndDataWithCalledProcess(callActivity); assertThat(mapper.getInputMappingToCreate()).isEmpty(); assertThat(mapper.getOutputMappingToCreate()).isEmpty(); }
Source:
<code>public static CommandSource of(ICommandSender sender) { if (sender instanceof IMixinCommandSender) { return ((IMixinCommandSender) sender).asCommandSource(); } if (sender instanceof WrapperICommandSender) { return ((WrapperICommandSender) sender).source; } if (sender.getCommandSenderEntity() != null) { return new WithEntity(sender); } <START> if (!new Vec3(0, 0, 0).equals(sender.getPositionVector())) { <END> return new Located(sender); } return new WrapperCommandSource(sender); }</code><technical_language>extract this a constant</technical_language>

Target:
public static CommandSource of(ICommandSender sender) { if (sender instanceof IMixinCommandSender) { return ((IMixinCommandSender) sender).asCommandSource(); } if (sender instanceof WrapperICommandSender) { return ((WrapperICommandSender) sender).source; } if (sender.getCommandSenderEntity() != null || !VecHelper.VEC3_ORIGIN.equals(sender.getPositionVector())) { return new Located(sender); } return new WrapperCommandSource(sender); }
Source:
<code>public Set<Resource> getEnumeration(final Resource type) { if (enumerations != null) { final Set<Resource> oneOfSet = enumerations.get(type); return oneOfSet; } <START> return null; <END> }</code><technical_language>return Optional empty Set null</technical_language>

Target:
public Set<Resource> getEnumeration(final Resource type) { if (enumerations != null) { final Set<Resource> oneOfSet = enumerations.get(type); if (oneOfSet != null) { return oneOfSet; } } return new LinkedHashSet<>(); }
Source:
<code>static void checkValidPositions(int[] positions, int offset, int length, int positionCount) { checkValidPositionsArray(positions, offset, length); for (int i = offset; i < offset + length; ++i) { int position = positions[i]; if (position > positionCount) { <START> throw new IllegalArgumentException("Invalid position " + position + " in block with " + positionCount + " positions"); <END> } } }</code><technical_language>% args instead of +</technical_language>

Target:
static void checkValidPositions(int[] positions, int offset, int length, int positionCount) { checkValidPositionsArray(positions, offset, length); for (int i = offset; i < offset + length; ++i) { int position = positions[i]; if (position > positionCount) { throw new IllegalArgumentException(String.format("Invalid position '%s' in block with '%s' positions", position, positionCount)); } } }
Source:
<code>public void testLogErrorDoesntLogWhenLogLevelInactive() throws Exception { Log log = mock(Log.class); <START> when(log.isWarnEnabled()).thenReturn(false); <END> LoggedUtils.logError(log, "", new LoggedOverridingSubclass(), new Exception()); }</code><technical_language>need mock, this is default behavior</technical_language>

Target:
public void testLogErrorDoesntLogWhenLogLevelInactive() throws Exception { Log log = mock(Log.class); LoggedUtils.logError(log, "", new LoggedOverridingSubclass(), new Exception()); verify(log, never()).traceFormat(any(String.class), any()); verify(log, never()).debugFormat(any(String.class), any()); verify(log, never()).infoFormat(any(String.class), any()); verify(log, never()).warnFormat(any(String.class), any()); verify(log, never()).errorFormat(any(String.class), any()); verify(log, never()).fatalFormat(any(String.class), any()); }
Source:
<code>public InfoboxBuilderPage addHeaderComponent() { <START> wait.forElementVisible(componentsButtons.get(3)); <END> componentsButtons.get(3).click(); return this; }</code><technical_language>store WebElement in variable wait for clickable please correct other occurrences in this file</technical_language>

Target:
public InfoboxBuilderPage addHeaderComponent() { WebElement headerComponentButton = componentsButtons.get(3); wait.forElementVisible(headerComponentButton); headerComponentButton.click(); return this; }
Source:
<code>public HadoopDruidIndexerConfig getHadoopDruidIndexerConfig() { try { if (argumentSpec.startsWith("{")) { return HadoopDruidIndexerConfig.fromString(argumentSpec); } else { URI argumentSpecUri = new URI(argumentSpec); String argumentSpecScheme = argumentSpecUri.getScheme(); <START> if ((argumentSpecScheme == null) || argumentSpecScheme.equals("file")) { <END> return HadoopDruidIndexerConfig.fromFile(new File(argumentSpec)); } else { return HadoopDruidIndexerConfig.fromDistributedFileSystem(argumentSpec); } } } catch (Exception e) { throw Throwables.propagate(e); } }</code><technical_language>I file:/// strings work here, I java.io.Files support them. sense run this code path if scheme is null</technical_language>

Target:
public HadoopDruidIndexerConfig getHadoopDruidIndexerConfig() { try { if (argumentSpec.startsWith("{")) { return HadoopDruidIndexerConfig.fromString(argumentSpec); } else { URI argumentSpecUri = new URI(argumentSpec); String argumentSpecScheme = argumentSpecUri.getScheme(); if ((argumentSpecScheme == null) || argumentSpecScheme.equals("file")) { return HadoopDruidIndexerConfig.fromFile(new File(argumentSpecUri.getPath())); } else { return HadoopDruidIndexerConfig.fromDistributedFileSystem(argumentSpec); } } } catch (Exception e) { throw Throwables.propagate(e); } }
Source:
<code>private InitializationManager() { WatchDogGlobals.setLogDirectory( "watchdog" + File.separator + "logs" + File.separator); WatchDogGlobals.setPreferences(Preferences.getInstance()); File baseFolder = Activator.getDefault().getStateLocation().toFile(); File toTransferDatabaseFile = new File(baseFolder, "intervals.mapdb"); File statisticsDatabaseFile = new File(baseFolder, "intervalsStatistics.mapdb"); intervalsToTransferPersister = new IntervalPersisterBase( toTransferDatabaseFile); intervalsStatisticsPersister = new IntervalPersisterBase( statisticsDatabaseFile); new ClientVersionChecker(); intervalManager = new IntervalManager(intervalsToTransferPersister, intervalsStatisticsPersister); eventManager = new EventManager(intervalManager, USER_ACTIVITY_TIMEOUT); new TimeSynchronityChecker(intervalManager, eventManager); WorkbenchListener workbenchListener = new WorkbenchListener( eventManager, new IntervalTransferManager(intervalsToTransferPersister, WatchDogUtils.getWorkspaceName())); workbenchListener.attachListeners(); <START> DebugPlugin.getDefault() <END> .addDebugEventListener(new DebuggerListener(eventManager)); }</code><technical_language>this call more sense workbenchListener.attachListeners();</technical_language>

Target:
private InitializationManager() { WatchDogGlobals.setLogDirectory( "watchdog" + File.separator + "logs" + File.separator); WatchDogGlobals.setPreferences(Preferences.getInstance()); File baseFolder = Activator.getDefault().getStateLocation().toFile(); File toTransferDatabaseFile = new File(baseFolder, "intervals.mapdb"); File statisticsDatabaseFile = new File(baseFolder, "intervalsStatistics.mapdb"); intervalsToTransferPersister = new IntervalPersisterBase( toTransferDatabaseFile); intervalsStatisticsPersister = new IntervalPersisterBase( statisticsDatabaseFile); new ClientVersionChecker(); intervalManager = new IntervalManager(intervalsToTransferPersister, intervalsStatisticsPersister); eventManager = new EventManager(intervalManager, USER_ACTIVITY_TIMEOUT); new TimeSynchronityChecker(intervalManager, eventManager); WorkbenchListener workbenchListener = new WorkbenchListener( eventManager, new IntervalTransferManager(intervalsToTransferPersister, WatchDogUtils.getWorkspaceName())); workbenchListener.attachListeners(); }
Source:
<code>public void compare(List<JsonObject> expectedEventList, List<JsonObject> currentEventList) { Boolean equals = false; for (JsonObject expectedEvent : expectedEventList) { <START> for (JsonObject event : currentEventList) { <END> PageObjectLogging.log("compare", "comparing clicktracked events to expected event \n" + "expected event: "+expectedEvent.toString() + "\n" + "compared event: "+event.toString(), true); equals = event.equals(expectedEvent); if (equals) { break; } } if (!equals) { PageObjectLogging.log("compare", "didn't find match for expected event: "+expectedEvent.toString(), false); } Assertion.assertTrue(equals); equals = false; } }</code><technical_language>please rename event currentEvent approach for for loops</technical_language>

Target:
public void compare(List<JsonObject> expectedEventList, List<JsonObject> currentEventList) { for (JsonObject expectedEvent : expectedEventList) { Boolean equals = false; for (JsonObject currentEvent : currentEventList) { PageObjectLogging.log("compare", "comparing clicktracked events to expected event: \n" + "expected event: "+expectedEvent.toString() + "\n" + "compared event: "+currentEvent.toString(), true); equals = currentEvent.equals(expectedEvent); if (equals) { PageObjectLogging.log("compare", "match for expected event found: \n" + "expected event: "+expectedEvent.toString() + "\n" + "compared event: "+currentEvent.toString(), true); currentEventList.remove(currentEvent); break; } } if (!equals) { PageObjectLogging.log("compare", "didn't find match for expected event: "+expectedEvent.toString(), false); } Assertion.assertTrue(equals); } }
Source:
<code>public Snapshot getSnapshot() { rescaleIfNeeded(); lockForRegularUsage(); try { Snapshot snapshot = new WeightedSnapshot(values.values()); values.clear(); return snapshot; } finally { unlockForRegularUsage(); } <START> } <END></code><technical_language>reset count i think</technical_language>

Target:
public Snapshot getSnapshot() { rescaleIfNeeded(); lockForRegularUsage(); try { Snapshot snapshot = new WeightedSnapshot(values.values()); values.clear(); count.set(0); return snapshot; } finally { unlockForRegularUsage(); } }
Source:
<code>public Builder() { this.kernelSize = new int[] { 5, 1 }; <START> this.stride = new int[] { 1, 1 }; <END> this.padding = new int[] { 0, 0 }; }</code><technical_language>5 from? I feel throw exception here</technical_language>

Target:
public Builder() { this(0, 1, 0); this.kernelSize = null; }
Source:
<code>public void populateRightDocks(String identifier) { if (dataManagementStrategy != null) { final PlaceRequest currentRightDockPlaceRequest = getCurrentRightDockPlaceRequest(identifier); switch (identifier) { case SettingsPresenter.IDENTIFIER: getSettingsPresenter(currentRightDockPlaceRequest).ifPresent(presenter -> { setSettings(presenter); presenter.setCurrentPath(path); }); break; case TestToolsPresenter.IDENTIFIER: getTestToolsPresenter(currentRightDockPlaceRequest).ifPresent(this::setTestTools); break; case CheatSheetPresenter.IDENTIFIER: getCheatSheetPresenter(currentRightDockPlaceRequest).ifPresent(presenter -> { if (!presenter.isCurrentlyShow(path)) { setCheatSheet(presenter); presenter.setCurrentPath(path); } }); break; case CoverageReportPresenter.IDENTIFIER: getCoverageReportPresenter(currentRightDockPlaceRequest).ifPresent(presenter -> { setCoverageReport(presenter); presenter.setCurrentPath(path); }); break; <START> default: <END> break; } } }</code><technical_language>add some log notification</technical_language>

Target:
public void populateRightDocks(String identifier) { if (dataManagementStrategy != null) { final PlaceRequest currentRightDockPlaceRequest = getCurrentRightDockPlaceRequest(identifier); switch (identifier) { case SettingsPresenter.IDENTIFIER: getSettingsPresenter(currentRightDockPlaceRequest).ifPresent(presenter -> { setSettings(presenter); presenter.setCurrentPath(path); }); break; case TestToolsPresenter.IDENTIFIER: getTestToolsPresenter(currentRightDockPlaceRequest).ifPresent(this::setTestTools); break; case CheatSheetPresenter.IDENTIFIER: getCheatSheetPresenter(currentRightDockPlaceRequest).ifPresent(presenter -> { if (!presenter.isCurrentlyShow(path)) { setCheatSheet(presenter); presenter.setCurrentPath(path); } }); break; case CoverageReportPresenter.IDENTIFIER: getCoverageReportPresenter(currentRightDockPlaceRequest).ifPresent(presenter -> { setCoverageReport(presenter); presenter.setCurrentPath(path); }); break; default: throw new IllegalArgumentException("Invalid identifier"); } } }
Source:
<code>public static TupleDomainFilter toBigintValues(long[] values, boolean nullAllowed) { long min = values[0]; long max = values[0]; for (int i = 1; i < values.length; i++) { min = Math.min(min, values[i]); max = Math.max(max, values[i]); } long range = max - min + 1; <START> if (range > Integer.MAX_VALUE || range < Integer.MIN_VALUE || (range / values.length) > 192) { <END> return BigintValuesUsingHashTable.of(min, max, values, nullAllowed); } return BigintValuesUsingBitmask.of(min, max, values, nullAllowed); }</code><technical_language>max >= min, range > 0. Hence, range < Integer.MIN_VALUE check is needed. remove</technical_language>

Target:
public static TupleDomainFilter toBigintValues(long[] values, boolean nullAllowed) { long min = values[0]; long max = values[0]; for (int i = 1; i < values.length; i++) { min = Math.min(min, values[i]); max = Math.max(max, values[i]); } BigInteger range = BigInteger.valueOf(max) .subtract(BigInteger.valueOf(min)) .add(BigInteger.valueOf(1)); if (range.compareTo(BigInteger.valueOf(Integer.MAX_VALUE)) == 1 || (range.intValueExact() / values.length) > 192) { return BigintValuesUsingHashTable.of(min, max, values, nullAllowed); } return BigintValuesUsingBitmask.of(min, max, values, nullAllowed); }
Source:
<code><START> public void removeFactMapping(FactMapping toRemove) { <END> factMappings.remove(toRemove); }</code><technical_language>I prefer move methods Simulation (or create methods change package private) remove existing related FactMappingValue Scenarios remove header. is easy forget cleanup Scenarios inconsistent data</technical_language>

Target:
void removeFactMapping(FactMapping toRemove) { factMappings.remove(toRemove); }
Source:
<code>private <T> T verifyBean(String beanName, Class<T> beanClass) { <START> return verify(this.spring.getContext().getBean(beanName, beanClass), atLeastOnce()); <END> }</code><technical_language>sense this change is necessary -- expression is parsed metadata source authorization manager. However, recommend times instead of atLeastOnce unexpected if called more twice</technical_language>

Target:
private <T> T verifyBean(String beanName, Class<T> beanClass) { return verify(this.spring.getContext().getBean(beanName, beanClass)); }