auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>if (res != null) { List<URL> urls = Collections.list(res); Map<String, List<URL>> normalized = new LinkedHashMap<String, List<URL>>(); for (URL url : urls) { try { String canonicalPath = IOUtils.toCanonicalFilePath(url); List<URL> pathURLs = normalized.get(canonicalPath); if (pathURLs == null) { pathURLs = new ArrayList<URL>(); normalized.put(canonicalPath, pathURLs); } pathURLs.add(url); } catch (URISyntaxException e) { String message = "Could not parse classpath resource URI: " + url.toString(); LogFactory.getLog(Version.class).fatal(message, e); <START> throw new Error(message, e); <END> } catch (IOException e) { String message = "Could not retrieve canonical path to classpath resource: " + url.toString(); LogFactory.getLog(Version.class).fatal(message, e); throw new Error(message, e); } } int foundJars = 0; if (normalized.size() > 1) { StringBuilder sb = new StringBuilder("Multiple ES-Hadoop versions detected in the classpath; please use only one\n"); for (List<URL> pathURLs : normalized.values()) { String path = pathURLs.get(0).toString(); if (path.contains("jar:")) { foundJars++; sb.append(path.replace("!/" + target, "")); sb.append("\n"); } } if (foundJars > 1) { LogFactory.getLog(Version.class).fatal(sb); throw new Error(sb.toString()); } } }</code><technical_language>throw Error instead of Exception RuntimeException ? Error is generally discouraged catching Error for framework level code a resort prevent crashing JVM. Also, specific reason log throw, catching responsibility log avoid duplicated logs</technical_language>

Target:
if (res != null) { List<URL> urls = Collections.list(res); Map<String, List<URL>> normalized = new LinkedHashMap<String, List<URL>>(); for (URL url : urls) { try { String canonicalPath = IOUtils.toCanonicalFilePath(url); List<URL> pathURLs = normalized.get(canonicalPath); if (pathURLs == null) { pathURLs = new ArrayList<URL>(); normalized.put(canonicalPath, pathURLs); } pathURLs.add(url); } catch (URISyntaxException e) { String message = "Could not parse classpath resource URI: " + url.toString(); throw new RuntimeException(message, e); } catch (IOException e) { String message = "Could not retrieve canonical path to classpath resource: " + url.toString(); throw new RuntimeException(message, e); } } int foundJars = 0; if (normalized.size() > 1) { StringBuilder sb = new StringBuilder("Multiple ES-Hadoop versions detected in the classpath; please use only one\n"); for (List<URL> pathURLs : normalized.values()) { String path = pathURLs.get(0).toString(); if (path.contains("jar:")) { foundJars++; sb.append(path.replace("!/" + target, "")); sb.append("\n"); } } if (foundJars > 1) { throw new RuntimeException(sb.toString()); } } }
Source:
<code>public float getPrefWidth() { <START> return Editor.getWidth() * this.prefWidth; <END> }</code><technical_language>getStage().getWidth()</technical_language>

Target:
public float getPrefWidth() { return this.viewport == null ? 0 : this.viewport.x * this.prefWidth; }
Source:
<code>void inject(Map<String, Object> environmentVars) { if (!environmentVars.isEmpty()) { Map<String, Object> replacementEnv = new HashMap<String, Object>(System.getenv()); for (Map.Entry<String, Object> envVar : environmentVars.entrySet()) { String key = envVar.getKey(); Object val = envVar.getValue(); if (val == null) { replacementEnv.remove(envVar.getKey()); <START> if (key == "GEM_PATH" && !environmentVars.containsKey("GEM_HOME")) { <END> replacementEnv.remove("GEM_HOME"); } } else { replacementEnv.put(key, val); if (key == "GEM_PATH" && !environmentVars.containsKey("GEM_HOME")) { String gemHome = val.toString().split(File.pathSeparator)[0]; replacementEnv.put("GEM_HOME", gemHome); } } } config.setEnvironment(replacementEnv); } }</code><technical_language>This Java :) equals instead of == :P</technical_language>

Target:
void inject(Map<String, Object> environmentVars) { if (!environmentVars.isEmpty()) { Map<String, Object> replacementEnv = new HashMap<String, Object>(System.getenv()); for (Map.Entry<String, Object> envVar : environmentVars.entrySet()) { String key = envVar.getKey(); Object val = envVar.getValue(); if (val == null || "".equals(val)) { replacementEnv.remove(envVar.getKey()); if ("GEM_PATH".equals(key) && !environmentVars.containsKey("GEM_HOME")) { replacementEnv.remove("GEM_HOME"); } } else { replacementEnv.put(key, val); if ("GEM_PATH".equals(key) && !environmentVars.containsKey("GEM_HOME")) { String gemHome = val.toString().split(File.pathSeparator)[0]; replacementEnv.put("GEM_HOME", gemHome); } } } config.setEnvironment(replacementEnv); } }
Source:
<code><START> private void persistFee(ChargeEntity charge, Long feeAmount) { <END> FeeEntity fee = new FeeEntity(charge, feeAmount); feeDao.persist(fee); }</code><technical_language>This public method @Transactional work private methods</technical_language>

Target:
public void persistFee(ChargeEntity charge, Long feeAmount) { FeeEntity fee = new FeeEntity(charge, feeAmount); feeDao.persist(fee); }
Source:
<code>private void computeUncoveredIntervals(TimelineLookup<String, ServerSelector> timeline) { final List<Interval> uncoveredIntervals = new ArrayList<>(uncoveredIntervalsLimit); boolean uncoveredIntervalsOverflowed = false; for (Interval interval : intervals) { Iterable<TimelineObjectHolder<String, ServerSelector>> lookup = timeline.lookup(interval); long startMillis = interval.getStartMillis(); long endMillis = interval.getEndMillis(); for (TimelineObjectHolder<String, ServerSelector> holder : lookup) { Interval holderInterval = holder.getInterval(); long intervalStart = holderInterval.getStartMillis(); if (!uncoveredIntervalsOverflowed && startMillis != intervalStart) { if (uncoveredIntervalsLimit > uncoveredIntervals.size()) { uncoveredIntervals.add(Intervals.utc(startMillis, intervalStart)); } else { uncoveredIntervalsOverflowed = true; } } startMillis = holderInterval.getEndMillis(); } if (!uncoveredIntervalsOverflowed && startMillis < endMillis) { if (uncoveredIntervalsLimit > uncoveredIntervals.size()) { uncoveredIntervals.add(Intervals.utc(startMillis, endMillis)); } else { uncoveredIntervalsOverflowed = true; } } } if (!uncoveredIntervals.isEmpty()) { responseContext.merge(ResponseContext.Key.UNCOVERED_INTERVALS, uncoveredIntervals); <START> responseContext.merge(ResponseContext.Key.UNCOVERED_INTERVALS_OVERFLOWED, uncoveredIntervalsOverflowed); <END> } }</code><technical_language>uncoveredIntervalsOverflowed based post-merge size of list</technical_language>

Target:
private void computeUncoveredIntervals(TimelineLookup<String, ServerSelector> timeline) { final List<Interval> uncoveredIntervals = new ArrayList<>(uncoveredIntervalsLimit); boolean uncoveredIntervalsOverflowed = false; for (Interval interval : intervals) { Iterable<TimelineObjectHolder<String, ServerSelector>> lookup = timeline.lookup(interval); long startMillis = interval.getStartMillis(); long endMillis = interval.getEndMillis(); for (TimelineObjectHolder<String, ServerSelector> holder : lookup) { Interval holderInterval = holder.getInterval(); long intervalStart = holderInterval.getStartMillis(); if (!uncoveredIntervalsOverflowed && startMillis != intervalStart) { if (uncoveredIntervalsLimit > uncoveredIntervals.size()) { uncoveredIntervals.add(Intervals.utc(startMillis, intervalStart)); } else { uncoveredIntervalsOverflowed = true; } } startMillis = holderInterval.getEndMillis(); } if (!uncoveredIntervalsOverflowed && startMillis < endMillis) { if (uncoveredIntervalsLimit > uncoveredIntervals.size()) { uncoveredIntervals.add(Intervals.utc(startMillis, endMillis)); } else { uncoveredIntervalsOverflowed = true; } } } if (!uncoveredIntervals.isEmpty()) { responseContext.add(ResponseContext.Key.UNCOVERED_INTERVALS, uncoveredIntervals); responseContext.add(ResponseContext.Key.UNCOVERED_INTERVALS_OVERFLOWED, uncoveredIntervalsOverflowed); } }
Source:
<code>private FilterSamReads setupProgram(final File inputFile, final File inputSam, final FilterSamReads.Filter filter) throws Exception { final FilterSamReads program = new FilterSamReads(); program.INPUT = inputSam; program.OUTPUT = File.createTempFile("FilterSamReads.output.", ".sam"); program.OUTPUT.deleteOnExit(); program.FILTER = filter; switch (filter) { case includePairedIntervals: program.INTERVAL_LIST = inputFile; break; case includeJavascript: program.JAVASCRIPT_FILE = inputFile; break; case includeReadList: case excludeReadList: program.READ_LIST_FILE = inputFile; break; default: <START> throw new IllegalArgumentException("not configured for filter==" + filter); <END> } return program; }</code><technical_language>double '='</technical_language>

Target:
private FilterSamReads setupProgram(final File inputFile, final File inputSam, final FilterSamReads.Filter filter) throws Exception { final FilterSamReads program = new FilterSamReads(); program.INPUT = inputSam; program.OUTPUT = File.createTempFile("FilterSamReads.output.", ".sam"); program.OUTPUT.deleteOnExit(); program.FILTER = filter; switch (filter) { case includePairedIntervals: program.INTERVAL_LIST = inputFile; break; case includeJavascript: program.JAVASCRIPT_FILE = inputFile; break; case includeReadList: case excludeReadList: program.READ_LIST_FILE = inputFile; break; default: throw new IllegalArgumentException("Not configured for filter=" + filter); } return program; }
Source:
<code>public void start() throws IOException, InterruptedException { LocalApplicationRunner runner = new LocalApplicationRunner(config); super.start(); MessageConsumer consumeFn = new MessageConsumer(); StreamApplication app = (graph, config) -> { MessageStream<Object> stream = graph.getInputStream(streamId); stream.map(consumeFn); }; runner.run(app); while (consumeFn.eventsConsumed < totalEvents) { Thread.sleep(10); } Instant endTime = Instant.now(); runner.kill(app); System.out.println("\n*******************"); System.out.println(String.format("Started at %s Ending at %s", consumeFn.startTime, endTime)); System.out.println(String.format("Event Rate is %s Messages/Sec", (consumeFn.eventsConsumed * 1000 / Duration.between(consumeFn.startTime , Instant.now()).toMillis()))); System.out.println( "Event Rate is " + consumeFn.eventsConsumed * 1000 / Duration.between(consumeFn.startTime, endTime).toMillis()); <START> System.out.println("*******************\n"); <END> System.exit(0); }</code><technical_language>Currently in Samza, init() is expected mint new instances of MapFunctions (instead of re-using instance) - this throughput numbers off</technical_language>

Target:
public void start() throws IOException, InterruptedException { LocalApplicationRunner runner = new LocalApplicationRunner(config); super.start(); MessageConsumer consumeFn = new MessageConsumer(); StreamApplication app = (graph, config) -> { MessageStream<Object> stream = graph.getInputStream(streamId); stream.map(consumeFn); }; runner.run(app); while (consumeFn.getEventsConsumed() < totalEvents) { Thread.sleep(10); } Instant endTime = Instant.now(); runner.kill(app); System.out.println("\n*******************"); System.out.println(String.format("Started at %s Ending at %s ", consumeFn.startTime, endTime)); System.out.println(String.format("Event Rate is %s Messages/Sec ", (consumeFn.getEventsConsumed() * 1000 / Duration.between(consumeFn.startTime, Instant.now()).toMillis()))); System.out.println( "Event Rate is " + consumeFn.getEventsConsumed() * 1000 / Duration.between(consumeFn.startTime, endTime).toMillis()); System.out.println("*******************\n"); System.exit(0); }
Source:
<code><START> @Override protected List<InclusionExclusionPattern> run() throws Exception { <END> return ParallelTestExecutor.findTestSplits(step.parallelism, build, listener, false); }</code><technical_language>This is incompatible change I think. [example](<LINK_0></technical_language>

Target:
@Override protected List<?> run() throws Exception { if (step.generateInclusions) { return ParallelTestExecutor.findTestSplits(step.parallelism, build, listener, step.generateInclusions); } else { List<List<String>> result = new ArrayList<List<String>>(); for (InclusionExclusionPattern pattern : ParallelTestExecutor.findTestSplits(step.parallelism, build, listener, step.generateInclusions)) { result.add(pattern.getList()); } return result; } }
Source:
<code>protected RenderNode getDeepestLastChild( RenderBox lineBox ) { if ( lineBox.getLastChild() != null && lineBox.getLastChild() instanceof RenderBox ) { <START> return getDeepestLastChild( lineBox ); <END> } return lineBox.getLastChild(); }</code><technical_language>Infinite loop? wanted pass a cast version of lineBox.getlastChild instead</technical_language>

Target:
protected RenderNode getDeepestLastChild( RenderBox lineBox ) { if ( lineBox.getLastChild() != null && lineBox.getLastChild() instanceof RenderBox ) { return getDeepestLastChild( (RenderBox) lineBox.getLastChild() ); } return lineBox.getLastChild(); }
Source:
<code>public void execute() { List<QuotaBalanceVO> quotaUsage = _responseBuilder.getQuotaBalance(this); QuotaBalanceResponse response; <START> if (getEndDate() == null) { <END> response = _responseBuilder.createQuotaLastBalanceResponse(quotaUsage, startDate); } else { response = _responseBuilder.createQuotaBalanceResponse(quotaUsage, startDate, endDate); } response.setResponseName(getCommandName()); setResponseObject(response); }</code><technical_language>getEndDate() method in if check attribute building response? method attribute consistently</technical_language>

Target:
public void execute() { List<QuotaBalanceVO> quotaUsage = _responseBuilder.getQuotaBalance(this); QuotaBalanceResponse response; if (getEndDate() == null) { response = _responseBuilder.createQuotaLastBalanceResponse(quotaUsage, getStartDate()); } else { response = _responseBuilder.createQuotaBalanceResponse(quotaUsage, getStartDate(), getEndDate()); } response.setResponseName(getCommandName()); setResponseObject(response); }
Source:
<code>public JobSpecification( @JsonProperty("commandArgs") @Nullable final List<String> commandArgs, @JsonProperty(value = "job", required = true) final ExecutionResource job, @JsonProperty(value = "cluster", required = true) final ExecutionResource cluster, @JsonProperty(value = "command", required = true) final ExecutionResource command, @JsonProperty("applications") @Nullable final List<ExecutionResource> applications, @JsonProperty("environmentVariables") @Nullable final Map<String, String> environmentVariables, @JsonProperty(value = "interactive", required = true) final boolean interactive, @JsonProperty(value = "jobDirectoryLocation", required = true) final File jobDirectoryLocation, @JsonProperty(value = "archiveLocation") @Nullable final String archiveLocation ) { this.commandArgs = commandArgs == null ? ImmutableList.of() : ImmutableList.copyOf( commandArgs .stream() .filter(StringUtils::isNotBlank) .collect(Collectors.toList()) ); this.job = job; this.cluster = cluster; this.command = command; this.applications = applications == null ? ImmutableList.of() : ImmutableList.copyOf(applications); this.environmentVariables = environmentVariables == null ? ImmutableMap.of() : ImmutableMap.copyOf(environmentVariables); this.interactive = interactive; this.jobDirectoryLocation = jobDirectoryLocation; <START> this.archiveLocation = StringUtils.isBlank(archiveLocation) <END> ? StringUtils.EMPTY : archiveLocation; }</code><technical_language>applications commandArgs collections need initialized avoid NPE get. Strings wrapped in Optional this consistent those</technical_language>

Target:
public JobSpecification( @JsonProperty("commandArgs") @Nullable final List<String> commandArgs, @JsonProperty(value = "job", required = true) final ExecutionResource job, @JsonProperty(value = "cluster", required = true) final ExecutionResource cluster, @JsonProperty(value = "command", required = true) final ExecutionResource command, @JsonProperty("applications") @Nullable final List<ExecutionResource> applications, @JsonProperty("environmentVariables") @Nullable final Map<String, String> environmentVariables, @JsonProperty(value = "interactive", required = true) final boolean interactive, @JsonProperty(value = "jobDirectoryLocation", required = true) final File jobDirectoryLocation, @JsonProperty(value = "archiveLocation") @Nullable final String archiveLocation ) { this.commandArgs = commandArgs == null ? ImmutableList.of() : ImmutableList.copyOf( commandArgs .stream() .filter(StringUtils::isNotBlank) .collect(Collectors.toList()) ); this.job = job; this.cluster = cluster; this.command = command; this.applications = applications == null ? ImmutableList.of() : ImmutableList.copyOf(applications); this.environmentVariables = environmentVariables == null ? ImmutableMap.of() : ImmutableMap.copyOf(environmentVariables); this.interactive = interactive; this.jobDirectoryLocation = jobDirectoryLocation; this.archiveLocation = archiveLocation; }
Source:
<code>private void populateDropDown() { CertificateImportWizard certImportWizard = (CertificateImportWizard) getWizard(); if (certImportWizard.selectedImportFile == null) return; if (certDropDown.getItemCount() > 0) certDropDown.removeAll(); try { certList = new ArrayList<>(); for (Certificate certificate : certFact.generateCertificates(new FileInputStream(certImportWizard.selectedImportFile))) { certList.add(certificate); } } catch (CertificateException e) { setErrorMessage(e.getMessage()); } catch (FileNotFoundException e) { setErrorMessage(e.getMessage()); } for (Certificate <START> element : <END> certList) { X509Certificate x509Cert = (X509Certificate) element; String subjectDN = x509Cert.getSubjectDN().getName(); certDropDown.add(subjectDN); } certDropDown.addListener(SWT.Selection, this); }</code><technical_language>rename certificate</technical_language>

Target:
private void populateDropDown() { CertificateImportWizard certImportWizard = (CertificateImportWizard) getWizard(); if (certImportWizard.selectedImportFile == null) return; if (certDropDown.getItemCount() > 0) certDropDown.removeAll(); try { certList = new ArrayList<>(); for (Certificate certificate : certFact.generateCertificates(new FileInputStream(certImportWizard.selectedImportFile))) { certList.add(certificate); } } catch (CertificateException e) { setErrorMessage(e.getMessage()); } catch (FileNotFoundException e) { setErrorMessage(e.getMessage()); } for (Certificate certificate : certList) { X509Certificate x509Cert = (X509Certificate) certificate; String subjectDN = x509Cert.getSubjectDN().getName(); certDropDown.add(subjectDN); } certDropDown.addListener(SWT.Selection, this); }
Source:
<code>public void testLong() throws Throwable { final String LINE = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASDSSSSSSSSSSSSSSSSSSSSSSSDDDDDD"; final int NUM = 10000; final int FACTOR = 5; <START> StringBuilder longText = new StringBuilder(""); <END> for (int i=0;i<NUM/FACTOR;i++) { longText.append(LINE).append("\n"); } List<String> expect = new LinkedList<String>(); expect.add("start"); for (int i=0;i<NUM;i++) { expect.add(LINE); } List<String> send = new LinkedList<String>(); for (int i=0;i<NUM;i++) { if (i % (NUM/FACTOR) == 0) { send.add(longText.toString()); } else { send.add(null); } } Sink sink = new Sink( expect.toArray(new String[0]), send.toArray(new String[0]) ); _sshdialog.connect(); _sshdialog.authenticate(); _sshdialog.executeCommand( sink, "echo start && sleep 4 && cat", null ); sink.exception(); }</code><technical_language>empty string in constructor is redundant</technical_language>

Target:
public void testLong() throws Throwable { final String LINE = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASDSSSSSSSSSSSSSSSSSSSSSSSDDDDDD"; final int NUM = 10000; final int FACTOR = 5; StringBuilder longText = new StringBuilder(); for (int i=0;i<NUM/FACTOR;i++) { longText.append(LINE).append("\n"); } List<String> expect = new LinkedList<String>(); expect.add("start"); for (int i=0;i<NUM;i++) { expect.add(LINE); } List<String> send = new LinkedList<String>(); for (int i=0;i<NUM;i++) { if (i % (NUM/FACTOR) == 0) { send.add(longText.toString()); } else { send.add(null); } } Sink sink = new Sink( expect.toArray(new String[0]), send.toArray(new String[0]) ); _sshdialog.connect(); _sshdialog.authenticate(); _sshdialog.executeCommand( sink, "echo start && sleep 4 && cat", null ); sink.exception(); }
Source:
<code>public void run() { setPriority(Thread.NORM_PRIORITY); try { while ((currentJob = pool.startJob(this)) != null) { IStatus result = Status.OK_STATUS; IProgressMonitor monitor = currentJob.getProgressMonitor(); try { String currentName = currentJob.getName(); if (currentName != null) { setName(generalName + ": " + currentJob.getName()); } result = currentJob.run(monitor); } catch (OperationCanceledException e) { result = Status.CANCEL_STATUS; } catch (Exception e) { result = handleException(currentJob, e); } catch (ThreadDeath e) { result = handleException(currentJob, e); throw e; } catch (Error e) { result = handleException(currentJob, e); } finally { if (result != Job.ASYNC_FINISH && monitor != null) { monitor.done(); } Thread.interrupted(); if (result == null) { String message = NLS.bind(JobMessages.jobs_returnNoStatus, currentJob.getClass().getName()); result = handleException(currentJob, new NullPointerException(message)); } pool.endJob(currentJob, result); currentJob = null; setName(generalName); setPriority(Thread.NORM_PRIORITY); } } } catch (Throwable t) { <START> RuntimeLog .log(new <END> Status(IStatus.ERROR, JobManager.PI_JOBS, JobManager.PLUGIN_ERROR, "Unhandled error", t)); } finally { currentJob = null; pool.endWorker(this); } }</code><technical_language>Please avoid unrelated changes</technical_language>

Target:
public void run() { setPriority(Thread.NORM_PRIORITY); try { while ((currentJob = pool.startJob(this)) != null) { IStatus result = Status.OK_STATUS; IProgressMonitor monitor = currentJob.getProgressMonitor(); try { setName(getJobName()); result = currentJob.run(monitor); } catch (OperationCanceledException e) { result = Status.CANCEL_STATUS; } catch (Exception e) { result = handleException(currentJob, e); } catch (ThreadDeath e) { result = handleException(currentJob, e); throw e; } catch (Error e) { result = handleException(currentJob, e); } finally { if (result != Job.ASYNC_FINISH && monitor != null) { monitor.done(); } Thread.interrupted(); if (result == null) { String message = NLS.bind(JobMessages.jobs_returnNoStatus, currentJob.getClass().getName()); result = handleException(currentJob, new NullPointerException(message)); } pool.endJob(currentJob, result); currentJob = null; setName(generalName); setPriority(Thread.NORM_PRIORITY); } } } catch (Throwable t) { RuntimeLog.log(new Status(IStatus.ERROR, JobManager.PI_JOBS, JobManager.PLUGIN_ERROR, "Unhandled error", t)); } finally { currentJob = null; pool.endWorker(this); } }
Source:
<code>public ZipInputStream apply(VPNConfig input) { try { byte[] decoded = base64().decode(input.content()); ZipInputStream zipStream = new ZipInputStream(new ByteArrayInputStream(decoded)); return zipStream; } catch (Exception ex) { <START> Logger.getLogger(VPNConfigParser.class.getName()).log(Level.SEVERE, null, ex); <END> return null; } }</code><technical_language>java logging. jclouds provides a logging abstraction allows users configure preferred logging framework. In order get right log, declare class variable of type org.jclouds.logging.Logger: java @Resource protected Logger logger = Logger.NULL; This configure a null logger default, configured users providing a logging module creating jclouds context</technical_language>

Target:
public ZipInputStream apply(VPNConfig input) { byte[] decoded = base64().decode(input.content()); ZipInputStream zipStream = new ZipInputStream(new ByteArrayInputStream(decoded)); return zipStream; }
Source:
<code>@Override public void finish() { if (fileToWrite == null) return; try { fileToWrite.force(); <START> fileToWrite.close(); <END> } catch (IOException ex) { throw new IgniteException(ex); } }</code><technical_language>I "close" in finally block, in case</technical_language>

Target:
@Override public void finish() { if (fileToWrite == null) return; try { try { fileToWrite.force(); } finally { fileToWrite.close(); } } catch (IOException ex) { throw new IgniteException(ex); } }
Source:
<code>public <T> T createProxy(Optional<SSLSocketFactory> sslSocketFactory, String uri, Class<T> type) { return Feign.builder() .contract(contract) .encoder(encoder) .decoder(decoder) .errorDecoder(errorDecoder) .client(clientSupplier.apply(sslSocketFactory)) .options(options) .logger(new Slf4jLogger(FeignClientFactory.class)) <START> .logLevel(Level.BASIC) <END> .target(type, uri); }</code><technical_language>I assume override this standard mechanism provided slf4j implementation</technical_language>

Target:
public <T> T createProxy(Optional<SSLSocketFactory> sslSocketFactory, String uri, Class<T> type) { return Feign.builder() .contract(contract) .encoder(encoder) .decoder(decoder) .errorDecoder(errorDecoder) .client(clientSupplier.apply(sslSocketFactory)) .options(options) .logger(new Slf4jLogger(FeignClients.class)) .logLevel(Level.BASIC) .target(type, uri); }
Source:
<code>public EntityHttpClient responseSuccess(Predicate<Integer> responseSuccess) { <START> responseSuccess = checkNotNull(responseSuccess, "responseSuccess"); <END> return this; }</code><technical_language>this.responseSuccess = ..</technical_language>

Target:
public EntityHttpClient responseSuccess(Predicate<Integer> responseSuccess) { this.responseSuccess = checkNotNull(responseSuccess, "responseSuccess"); return this; }
Source:
<code>protected void executeVmCommand() { getParameters().getDiskInfo().setId(Guid.newGuid()); getParameters().setEntityInfo(new EntityInfo(VdcObjectType.Disk, getParameters().getDiskInfo().getId())); ImagesHandler.setDiskAlias(getParameters().getDiskInfo(), getVm()); if (DiskStorageType.IMAGE == getParameters().getDiskInfo().getDiskStorageType()) { createDiskBasedOnImage(); } if (DiskStorageType.LUN == getParameters().getDiskInfo().getDiskStorageType()) { <START> createDiskBasedOnLun(); <END> } }</code><technical_language>this change is irrelevant for this patch</technical_language>

Target:
protected void executeVmCommand() { getParameters().getDiskInfo().setId(Guid.newGuid()); getParameters().setEntityInfo(new EntityInfo(VdcObjectType.Disk, getParameters().getDiskInfo().getId())); ImagesHandler.setDiskAlias(getParameters().getDiskInfo(), getVm()); if (DiskStorageType.IMAGE == getParameters().getDiskInfo().getDiskStorageType()) { createDiskBasedOnImage(); } else { createDiskBasedOnLun(); } }
Source:
<code>public File resolveFile(String fileName) { File file = new File(fileName); if (cwd != null && !file.isAbsolute()) { file = new File(cwd, fileName); } if (!ENABLE_CP_RESOLVING) { return file; } synchronized (this) { if (!file.exists()) { File cacheFile = new File(cacheDir, fileName); if (enableCaching && cacheFile.exists()) { return cacheFile; } ClassLoader cl = getClassLoader(); if (NON_UNIX_FILE_SEP) { fileName = fileName.replace(FILE_SEP, "/"); } if (file.getParent() != null) { URL directoryContents = cl.getResource(file.getParent()); if (directoryContents != null) { <START> unpackUrlResource(directoryContents, file.getParent()); <END> } } URL url = cl.getResource(fileName); if (url != null) { return unpackUrlResource(url, fileName); } } } return file; }</code><technical_language>pass classloader param</technical_language>

Target:
public File resolveFile(String fileName) { File file = new File(fileName); if (cwd != null && !file.isAbsolute()) { file = new File(cwd, fileName); } if (!ENABLE_CP_RESOLVING) { return file; } synchronized (this) { if (!file.exists()) { File cacheFile = new File(cacheDir, fileName); if (enableCaching && cacheFile.exists()) { return cacheFile; } ClassLoader cl = getClassLoader(); if (NON_UNIX_FILE_SEP) { fileName = fileName.replace(FILE_SEP, "/"); } String parentFileName = file.getParent(); if (parentFileName != null) { URL directoryContents = cl.getResource(parentFileName); if (directoryContents != null) { unpackUrlResource(directoryContents, parentFileName, cl); } } URL url = cl.getResource(fileName); if (url != null) { return unpackUrlResource(url, fileName, cl); } } } return file; }
Source:
<code>public Uris(String scheme, String host) { this.scheme = scheme; this.host = host; this.port = 0; <START> this.rcnamespace = "0|120"; <END> }</code><technical_language>This a constant, a magic string</technical_language>

Target:
public Uris(String scheme, String host) { this.scheme = scheme; this.host = host; this.port = 0; }
Source:
<code>public Record beforeAppend(Record record) { <START> if (filters.isEmpty()) { <END> return record; } for (RecordFilter filter : filters) { if (record != null) { record = filter.beforeAppend(record); } } return record; }</code><technical_language>need this condition a loop if filters is empty</technical_language>

Target:
public Record beforeAppend(Record record) { for (Iterator iterator = filters.iterator(); record != null && iterator.hasNext();) { RecordFilter filter = (RecordFilter) iterator.next(); record = filter.beforeAppend(record); } return record; }
Source:
<code><START> protected void removeColumn(ColumnListMutation<String> mutation, String column) { <END> mutation.deleteColumn(column); }</code><technical_language>love extracts interface implemented Astyanax driver Protobuf? :D</technical_language>

Target:
private void removeColumn(ColumnListMutation<String> mutation, String column) { mutation.deleteColumn(column); }
Source:
<code>public void setData(@Nullable ISegmentStoreProvider provider) { fSegmentProvider = provider; if (provider == null) { updateModel(null); return; } createProviderColumns(); ISegmentStore<ISegment> segStore = provider.getSegmentStore(); Map<@NonNull Integer, @NonNull Predicate<@NonNull Map<@NonNull String, @NonNull String>>> predicates = computeRegexPredicate(); Predicate<ISegment> predicate = (segment) -> { if (!predicates.isEmpty()) { Map<@NonNull String, @NonNull String> input = getFilterInput(segment, provider); for (Map.Entry<Integer, Predicate<Map<String, String>>> mapEntry : predicates.entrySet()) { Predicate<Map<String, String>> value = Objects.requireNonNull(mapEntry.getValue()); boolean status = value.test(input); Integer property = Objects.requireNonNull(mapEntry.getKey()); if (status && (property != IFilterProperty.DIMMED || property != IFilterProperty.EXCLUDE)) { return true; } } return false; } return true; }; if (segStore != null) { <START> Collection<ISegment> segStore2 = predicates.isEmpty() ? segStore : segStore.stream().filter(predicate).collect(Collectors.toList()); <END> updateModel(segStore2); return; } updateModel(null); SegmentStoreProviderProgressListener listener = fListener; if (listener != null) { provider.addListener(listener); } if (provider instanceof IAnalysisModule) { ((IAnalysisModule) provider).schedule(); } }</code><technical_language>This overflow memory needs segment store fit</technical_language>

Target:
public void setData(@Nullable ISegmentStoreProvider provider) { fSegmentProvider = provider; if (provider == null) { updateModel(null); return; } createProviderColumns(); ISegmentStore<ISegment> segStore = provider.getSegmentStore(); Map<@NonNull Integer, @NonNull Predicate<@NonNull Map<@NonNull String, @NonNull String>>> predicates = computeRegexPredicate(); Predicate<ISegment> predicate = (segment) -> { if (!predicates.isEmpty()) { Map<@NonNull String, @NonNull String> input = getFilterInput(segment, provider); boolean r = false; for (Map.Entry<Integer, Predicate<Map<String, String>>> mapEntry : predicates.entrySet()) { Integer property = Objects.requireNonNull(mapEntry.getKey()); Predicate<Map<String, String>> value = Objects.requireNonNull(mapEntry.getValue()); if (property == IFilterProperty.DIMMED) { boolean status = value.test(input); r |= status; } } return r; } return true; }; if (segStore != null) { Collection<ISegment> filtered = Collections2.filter(segStore, seg -> predicate.test(seg)); ISegmentStore<ISegment> segStore2 = new ArrayListStore<>(filtered.toArray(new ISegment[filtered.size()])); updateModel(segStore2); return; } updateModel(null); SegmentStoreProviderProgressListener listener = fListener; if (listener != null) { provider.addListener(listener); } if (provider instanceof IAnalysisModule) { ((IAnalysisModule) provider).schedule(); } }
Source:
<code>protected boolean setupForDestroy (TileAbstractBuilder builder, IBuilderContext context, BuildingSlotBlock slot) { LinkedList<ItemStack> result = new LinkedList<ItemStack>(); int hardness = (int) context .world() .getBlock(slot.x, slot.y, slot.z) .getBlockHardness(context.world(), slot.x, slot.y, slot.z); if(hardness == 0){ hardness = 1; <START> } <END> if (builder.energyAvailable() < hardness * TileAbstractBuilder.BREAK_ENERGY) { return false; } else { builder.consumeEnergy(hardness * TileAbstractBuilder.BREAK_ENERGY); for (int i = 0; i < hardness; ++i) { slot.addStackConsumed(new ItemStack(BuildCraftBuilders.buildToolBlock)); } return true; } }</code><technical_language>Adding a constant hardness is a cleaner solution - cost linearly more expensive instead of hardness 0 hardness 1 cost same</technical_language>

Target:
protected boolean setupForDestroy (TileAbstractBuilder builder, IBuilderContext context, BuildingSlotBlock slot) { LinkedList<ItemStack> result = new LinkedList<ItemStack>(); int hardness = (int) context .world() .getBlock(slot.x, slot.y, slot.z) .getBlockHardness(context.world(), slot.x, slot.y, slot.z)+1; if (builder.energyAvailable() < hardness * TileAbstractBuilder.BREAK_ENERGY) { return false; } else { builder.consumeEnergy(hardness * TileAbstractBuilder.BREAK_ENERGY); for (int i = 0; i < hardness; ++i) { slot.addStackConsumed(new ItemStack(BuildCraftBuilders.buildToolBlock)); } return true; } }
Source:
<code><START> default <U> Validation<E,U> map(Function<? super T, ? extends U> f) { <END> if(isInvalid()) { return (Invalid<E,U>) this; } else { T v = this.get(); return Validation.valid(f.apply(v)); } }</code><technical_language>Please null-check f</technical_language>

Target:
default <U> Validation<E,U> map(Function<? super T, ? extends U> f) { Objects.requireNonNull(f, "function f is null"); if(isInvalid()) { return Validation.invalid(this.getError()); } else { T value = this.get(); return Validation.valid(f.apply(value)); } }
Source:
<code>public static void refreshVmsToolsVersion(Guid poolId, Set<String> isoList) { String latestVersion = getLatestGuestToolsVersion(isoList); if (latestVersion == null) { return; } List<VM> vms = DbFacade.getInstance().getVmDao().getAllForStoragePool(poolId); for (VM vm : vms) { if (vm.getAppList() != null && vm.getAppList().toLowerCase().contains("rhev-tools")) { Matcher m = TOOLS_PATTERN.matcher(vm.getAppList().toLowerCase()); if (m.matches() && m.groupCount() > 0) { String toolsVersion = m.group(1); if (toolsVersion.compareTo(latestVersion) < 0 && vm.getGuestAgentStatus() != GuestAgentStatus.UpdateNeeded) { updateGetsAgentStatus(vm, GuestAgentStatus.UpdateNeeded); } else { <START> updateGetsAgentStatus(vm, GuestAgentStatus.Exists); <END> } } } else { updateGetsAgentStatus(vm, GuestAgentStatus.DoesntExist); } } }</code><technical_language>This is correct say, because: - call of refreshVmsToolsVersion() in case newer version exists status correctly set UpdateNeeded - call toolsVersion is smaller latestVersion status is set UpdateNeeded, this else block executed setting status Exists (not correct) - next refresh set UpdateNeeded - next Exists etc, guest agent updated</technical_language>

Target:
public static void refreshVmsToolsVersion(Guid poolId, Set<String> isoList) { String latestVersion = getLatestGuestToolsVersion(isoList); if (latestVersion == null) { return; } List<VM> vms = DbFacade.getInstance().getVmDao().getAllForStoragePool(poolId); for (VM vm : vms) { if (vm.getAppList() != null && vm.getAppList().toLowerCase().contains("rhev-tools")) { Matcher m = TOOLS_PATTERN.matcher(vm.getAppList().toLowerCase()); if (m.matches() && m.groupCount() > 0) { String toolsVersion = m.group(1); if (toolsVersion.compareTo(latestVersion) < 0) { updateGetsAgentStatus(vm, GuestAgentStatus.UpdateNeeded); } else { updateGetsAgentStatus(vm, GuestAgentStatus.Exists); } } } else { updateGetsAgentStatus(vm, GuestAgentStatus.DoesntExist); } } }
Source:
<code>public void execute(SensorContext context) { this.context = context; failFast = context.config().getBoolean("sonar.internal.analysis.failFast").orElse(false); try { eslintBridgeServer.startServerLazily(context); analyzeFiles(); } catch (CancellationException e) { <START> LOG.debug(e.toString()); <END> } catch (ServerAlreadyFailedException e) { LOG.debug("Skipping start of eslint-bridge server due to the failure during first analysis"); LOG.debug("Skipping execution of eslint-based rules due to the problems with eslint-bridge server"); } catch (NodeCommandException e) { LOG.error(e.getMessage(), e); if (analysisWarnings != null) { analysisWarnings.addUnique("Eslint-based rules were not executed. " + e.getMessage()); } if (failFast) { throw new IllegalStateException("Analysis failed (\"sonar.internal.analysis.failFast\"=true)", e); } } catch (Exception e) { LOG.error("Failure during analysis, " + eslintBridgeServer.getCommandInfo(), e); if (failFast) { throw new IllegalStateException("Analysis failed (\"sonar.internal.analysis.failFast\"=true)", e); } } }</code><technical_language>debug? I info</technical_language>

Target:
public void execute(SensorContext context) { this.context = context; failFast = context.config().getBoolean("sonar.internal.analysis.failFast").orElse(false); try { eslintBridgeServer.startServerLazily(context); analyzeFiles(); } catch (CancellationException e) { LOG.info(e.toString()); } catch (ServerAlreadyFailedException e) { LOG.debug("Skipping start of eslint-bridge server due to the failure during first analysis"); LOG.debug("Skipping execution of eslint-based rules due to the problems with eslint-bridge server"); } catch (NodeCommandException e) { LOG.error(e.getMessage(), e); if (analysisWarnings != null) { analysisWarnings.addUnique("Eslint-based rules were not executed. " + e.getMessage()); } if (failFast) { throw new IllegalStateException("Analysis failed (\"sonar.internal.analysis.failFast\"=true)", e); } } catch (Exception e) { LOG.error("Failure during analysis, " + eslintBridgeServer.getCommandInfo(), e); if (failFast) { throw new IllegalStateException("Analysis failed (\"sonar.internal.analysis.failFast\"=true)", e); } } }
Source:
<code><START> public boolean equals(Object o) { <END> if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DeallocateVmVspCommand that = (DeallocateVmVspCommand) o; if (_isExpungingState != that._isExpungingState) return false; if (_isL3Network != that._isL3Network) return false; if (_isSharedNetwork != that._isSharedNetwork) return false; if (_networkUuid != null ? !_networkUuid.equals(that._networkUuid) : that._networkUuid != null) return false; if (_networksDomainUuid != null ? !_networksDomainUuid.equals(that._networksDomainUuid) : that._networksDomainUuid != null) return false; if (_nicFromDdUuid != null ? !_nicFromDdUuid.equals(that._nicFromDdUuid) : that._nicFromDdUuid != null) return false; if (_nicIp4Address != null ? !_nicIp4Address.equals(that._nicIp4Address) : that._nicIp4Address != null) return false; if (_nicMacAddress != null ? !_nicMacAddress.equals(that._nicMacAddress) : that._nicMacAddress != null) return false; if (_vmInstanceName != null ? !_vmInstanceName.equals(that._vmInstanceName) : that._vmInstanceName != null) return false; if (_vmUuid != null ? !_vmUuid.equals(that._vmUuid) : that._vmUuid != null) return false; if (_vpcUuid != null ? !_vpcUuid.equals(that._vpcUuid) : that._vpcUuid != null) return false; return true; }</code><technical_language>This equals implementation include attributes Command super class</technical_language>

Target:
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof DeallocateVmVspCommand)) return false; if (!super.equals(o)) return false; DeallocateVmVspCommand that = (DeallocateVmVspCommand) o; if (_isExpungingState != that._isExpungingState) return false; if (_isL3Network != that._isL3Network) return false; if (_isSharedNetwork != that._isSharedNetwork) return false; if (_networkUuid != null ? !_networkUuid.equals(that._networkUuid) : that._networkUuid != null) return false; if (_networksDomainUuid != null ? !_networksDomainUuid.equals(that._networksDomainUuid) : that._networksDomainUuid != null) return false; if (_nicFromDdUuid != null ? !_nicFromDdUuid.equals(that._nicFromDdUuid) : that._nicFromDdUuid != null) return false; if (_nicIp4Address != null ? !_nicIp4Address.equals(that._nicIp4Address) : that._nicIp4Address != null) return false; if (_nicMacAddress != null ? !_nicMacAddress.equals(that._nicMacAddress) : that._nicMacAddress != null) return false; if (_vmInstanceName != null ? !_vmInstanceName.equals(that._vmInstanceName) : that._vmInstanceName != null) return false; if (_vmUuid != null ? !_vmUuid.equals(that._vmUuid) : that._vmUuid != null) return false; if (_vpcUuid != null ? !_vpcUuid.equals(that._vpcUuid) : that._vpcUuid != null) return false; return true; }
Source:
<code>public void run() { try { JMeterContextService.getContext().setVariables(this.context.getVariables()); long endtime = 0; final boolean usingScheduler = getScheduler(); if (usingScheduler) { if (getDelay() > 0) { delayBy(getDelay() * 1000); } endtime = getDuration(); if (endtime > 0) { endtime = endtime *1000 + System.currentTimeMillis(); } } final int numThreads = getNumThreads(); final float rampUpOriginInMillis = (float) getRampUp() * 1000; final long startTimeInMillis = System.currentTimeMillis(); final boolean isSameUser = isSameUserOnNextIteration(); for (int threadNumber = 0; running && threadNumber < numThreads; threadNumber++) { if (threadNumber > 0) { long elapsedInMillis = System.currentTimeMillis() - startTimeInMillis; final int perThreadDelayInMillis = Math.round((rampUpOriginInMillis - elapsedInMillis) / (float) (numThreads - threadNumber)); pause(Math.max(0, perThreadDelayInMillis)); } if (usingScheduler && System.currentTimeMillis() > endtime) { break; } JMeterThread jmThread = makeThread(notifier, threadGroupTree, engine, threadNumber, context, isSameUser); jmThread.setInitialDelay(0); if (usingScheduler) { jmThread.setScheduled(true); jmThread.setEndTime(endtime); } Thread newThread = new Thread(jmThread, jmThread.getThreadName()); newThread.setDaemon(false); registerStartedThread(jmThread, newThread); newThread.start(); } } catch (Exception ex) { log.error("An error occurred scheduling delay start of threads for Thread Group: {}", getName(), ex); } <START> <END> }</code><technical_language>this intended</technical_language>

Target:
public void run() { try { JMeterContextService.getContext().setVariables(this.context.getVariables()); long endtime = 0; final boolean usingScheduler = getScheduler(); if (usingScheduler) { if (getDelay() > 0) { delayBy(getDelay() * 1000); } endtime = getDuration(); if (endtime > 0) { endtime = endtime *1000 + System.currentTimeMillis(); } } final int numThreads = getNumThreads(); final float rampUpOriginInMillis = (float) getRampUp() * 1000; final long startTimeInMillis = System.currentTimeMillis(); final boolean isSameUserOnNextIteration = isSameUserOnNextIteration(); for (int threadNumber = 0; running && threadNumber < numThreads; threadNumber++) { if (threadNumber > 0) { long elapsedInMillis = System.currentTimeMillis() - startTimeInMillis; final int perThreadDelayInMillis = Math.round((rampUpOriginInMillis - elapsedInMillis) / (float) (numThreads - threadNumber)); pause(Math.max(0, perThreadDelayInMillis)); } if (usingScheduler && System.currentTimeMillis() > endtime) { break; } JMeterThread jmThread = makeThread(notifier, threadGroupTree, engine, threadNumber, context, isSameUserOnNextIteration); jmThread.setInitialDelay(0); if (usingScheduler) { jmThread.setScheduled(true); jmThread.setEndTime(endtime); } Thread newThread = new Thread(jmThread, jmThread.getThreadName()); newThread.setDaemon(false); registerStartedThread(jmThread, newThread); newThread.start(); } } catch (Exception ex) { log.error("An error occurred scheduling delay start of threads for Thread Group: {}", getName(), ex); } }
Source:
<code>public ModelAndView getRssFeedView(@SiteParam Site site, @PathVariable String feedType) throws IOException { ArticleSearchQuery.Builder query = ArticleSearchQuery.builder() .setStart(0) .setRows(15) .setSortOrder(SolrSearchServiceImpl.SolrSortOrder.DATE_NEWEST_FIRST) .setJournalKeys(ImmutableList.of(site.getJournalKey())) .setDateRange(SolrSearchServiceImpl.SolrEnumeratedDateRange.ALL_TIME) .setIsRssSearch(true); Map<String, ?> recentArticles = solrSearchService.search(query.build()); ModelAndView mav = new ModelAndView(); mav.addObject("site", site); <START> mav.addObject("solrResults", recentArticles.get("docs")); <END> if (feedType.equalsIgnoreCase(FeedType.ATOM.name())) { mav.setView(articleFeedView.getArticleAtomView()); } else { mav.setView(articleFeedView.getArticleRssView()); } return mav; }</code><technical_language>add title @rskonnord-plos suggested</technical_language>

Target:
public ModelAndView getRssFeedView(@SiteParam Site site, @PathVariable String feedType) throws IOException { ArticleSearchQuery.Builder query = ArticleSearchQuery.builder() .setStart(0) .setRows(30) .setSortOrder(SolrSearchServiceImpl.SolrSortOrder.DATE_NEWEST_FIRST) .setJournalKeys(ImmutableList.of(site.getJournalKey())) .setDateRange(SolrSearchServiceImpl.SolrEnumeratedDateRange.ALL_TIME) .setIsRssSearch(true); Map<String, ?> recentArticles = solrSearchService.search(query.build()); ModelAndView mav = new ModelAndView(); mav.addObject("site", site); mav.addObject("solrResults", recentArticles.get("docs")); if (feedType.equalsIgnoreCase(FeedType.ATOM.name())) { mav.setView(articleFeedView.getArticleAtomView()); } else { mav.setView(articleFeedView.getArticleRssView()); } return mav; }
Source:
<code>public int getRunningTaskCount() { if (subGroups().isEmpty()) { return runningQueries.stream() <START> .filter(query -> query instanceof SqlQueryExecution) <END> .mapToInt(query -> ((SqlQueryExecution) query).getRunningTaskCount()) .sum(); } int taskCount = 0; for (InternalResourceGroup subGroup : subGroups()) { taskCount += subGroup.getRunningTaskCount(); } return taskCount; }</code><technical_language>nit: SqlQueryExecution.class::isInstance</technical_language>

Target:
public int getRunningTaskCount() { if (subGroups().isEmpty()) { return runningQueries.stream() .filter(SqlQueryExecution.class::isInstance) .mapToInt(query -> ((SqlQueryExecution) query).getRunningTaskCount()) .sum(); } int taskCount = 0; for (InternalResourceGroup subGroup : subGroups()) { taskCount += subGroup.getRunningTaskCount(); } return taskCount; }
Source:
<code>public void networkInUse() throws Exception { <START> Nameable nameable = new VM(); <END> List<Nameable> nameables = new ArrayList<Nameable>(); nameables.add(nameable); networkNotUsedTest(new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_IN_USE), nameables); }</code><technical_language>Please replace instantiation independent Nameable implementation, e.g.: Nameable nameable = new Nameable() { @Override public String getName() { return null; } };</technical_language>

Target:
public void networkInUse() throws Exception { Nameable nameable = new Nameable() { @Override public String getName() { return ""; } }; networkNotUsedTest(new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_IN_USE), Collections.singletonList(nameable)); }
Source:
<code>protected void registerVersioningRestriction(VersioningRestrictionDescriptor contrib) { versioningRestrictionsRegistry.addContribution(contrib); <START> log.info("Registered versioning filter: " + contrib.getType()); <END> recompute(); }</code><technical_language>filter -> restriction</technical_language>

Target:
protected void registerVersioningRestriction(VersioningRestrictionDescriptor contrib) { versioningRestrictionsRegistry.addContribution(contrib); log.info("Registered versioning restriction: " + contrib.getType()); recompute(); }