auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>V call() throws StatusRuntimeException; } protected synchronized <V> V retryRPC(RpcCallable<V> rpc, Logger logger, String rpcName, String description, Object... args) throws AlluxioStatusException { String debugDesc = logger.isDebugEnabled() ? String.format(description, args) : null; long startMs = System.currentTimeMillis(); logger.debug("Enter: {}({})", rpcName, debugDesc); try (Timer.Context ctx = MetricsSystem.timer(getQualifiedMetricName(rpcName)).time()) { V ret = retryRPCInternal(rpc, () -> { MetricsSystem.counter(getQualifiedRetryMetricName(rpcName)).inc(); return null; }); long duration = System.currentTimeMillis() - startMs; logger.debug("Exit (OK): {}({}) in ms", rpcName, debugDesc, duration); if (duration >= mRpcThreshold) { <START> logger.warn("{}({}) returned in ms", <END> rpcName, String.format(description, args), ret, duration); } return ret; } catch (Exception e) { long duration = System.currentTimeMillis() - startMs; MetricsSystem.counter(getQualifiedFailureMetricName(rpcName)).inc(); logger.debug("Exit (ERROR): {}({}) in ms: {}", rpcName, debugDesc, duration, e.toString()); if (duration >= mRpcThreshold) { logger.warn("{}({}) exits with exception in ms (>={}ms)", rpcName, String.format(description, args), e.toString(), duration, mRpcThreshold); } throw e; } }</code><technical_language>Do want prevent double logging log level = debug</technical_language>

Target:
V call() throws StatusRuntimeException; } protected synchronized <V> V retryRPC(RpcCallable<V> rpc, Logger logger, String rpcName, String description, Object... args) throws AlluxioStatusException { String debugDesc = logger.isDebugEnabled() ? String.format(description, args) : null; long startMs = System.currentTimeMillis(); logger.debug("Enter: {}({})", rpcName, debugDesc); try (Timer.Context ctx = MetricsSystem.timer(getQualifiedMetricName(rpcName)).time()) { V ret = retryRPCInternal(rpc, () -> { MetricsSystem.counter(getQualifiedRetryMetricName(rpcName)).inc(); return null; }); long duration = System.currentTimeMillis() - startMs; logger.debug("Exit (OK): {}({}) in ms", rpcName, debugDesc, duration); if (duration >= mRpcThreshold) { logger.warn("{}({}) returned in ms (>={} ms)", rpcName, String.format(description, args), ret, duration, mRpcThreshold); } return ret; } catch (Exception e) { long duration = System.currentTimeMillis() - startMs; MetricsSystem.counter(getQualifiedFailureMetricName(rpcName)).inc(); logger.debug("Exit (ERROR): {}({}) in ms: {}", rpcName, debugDesc, duration, e.toString()); if (duration >= mRpcThreshold) { logger.warn("{}({}) exits with exception in ms (>={}ms)", rpcName, String.format(description, args), e.toString(), duration, mRpcThreshold); } throw e; } }
Source:
<code>protected static void createBranch(Repository myRepository, String newRefName) throws IOException { RefUpdate updateRef = myRepository.updateRef(newRefName); Ref sourceBranch = <START> myRepository.findRef("refs/heads/master"); <END> ObjectId startAt = sourceBranch.getObjectId(); String startBranch = Repository.shortenRefName(sourceBranch.getName()); updateRef.setNewObjectId(startAt); updateRef .setRefLogMessage("branch: Created from " + startBranch, false); updateRef.update(); TestUtil.waitForJobs(50, 5000); }</code><technical_language>I this exactRef()</technical_language>

Target:
protected static void createBranch(Repository myRepository, String newRefName) throws IOException { RefUpdate updateRef = myRepository.updateRef(newRefName); Ref sourceBranch = myRepository.exactRef("refs/heads/master"); ObjectId startAt = sourceBranch.getObjectId(); String startBranch = Repository.shortenRefName(sourceBranch.getName()); updateRef.setNewObjectId(startAt); updateRef .setRefLogMessage("branch: Created from " + startBranch, false); updateRef.update(); TestUtil.waitForJobs(50, 5000); }
Source:
<code>static IdentifiedLockRequest of(Set<LockDescriptor> lockDescriptors, long acquireTimeoutMs) { return ImmutableIdentifiedLockRequest.of( UUID.randomUUID(), lockDescriptors, acquireTimeoutMs, <START> Optional.of("Thread: " + Thread.currentThread().getName())); <END> }</code><technical_language>do this information anywhere? this stuff safe, useful</technical_language>

Target:
static IdentifiedLockRequest of(Set<LockDescriptor> lockDescriptors, long acquireTimeoutMs) { return ImmutableIdentifiedLockRequest.of( UUID.randomUUID(), lockDescriptors, acquireTimeoutMs, Optional.empty()); }
Source:
<code>public PriorityQueue<T> take(long n) { if (n >= length()) { return this; <START> } else { <END> PriorityQueue<T> source = this, result = empty(comparator); for (int i = 0; i < n; i++) { result = result.enqueue(source.head()); source = source.tail(); } return result; } }</code><technical_language>this java return ofAll(comparator, iterator().take(n))</technical_language>

Target:
public PriorityQueue<T> take(long n) { return ofAll(comparator, iterator().take(n)); }
Source:
<code>public void testEquals() { assertThat(internState, not(equalTo(internStateToCompare))); <START> assertNotEquals(internState, Integer.valueOf(1)); <END> }</code><technical_language>same. Thank you</technical_language>

Target:
public void testEquals() { assertThat(internState, not(equalTo(unexpectedInternState))); assertNotEquals(Integer.valueOf(1), internState); }
Source:
<code>private void compareContent(CompareAssertionResult result) { if (!compareContent) { return; } String prevContent = null; SampleResult prevResult = null; boolean success = true; StringBuilder buf = new StringBuilder(); for (SampleResult sResult : responses) { String currentContent = sResult.getResponseDataAsString(); currentContent = filterString(currentContent); if (prevContent != null) { success = prevContent.equals(currentContent); } if (success) { prevResult = sResult; prevContent = currentContent; <START> } else { <END> result.setFailure(true); buf.setLength(0); appendResultDetails(buf, prevResult); buf.append(prevContent); result.addToBaseResult(buf.toString()); buf.setLength(0); appendResultDetails(buf, sResult); buf.append(currentContent); result.addToSecondaryResult(buf.toString()); result.setFailureMessage(JMeterUtils.getResString("comparison_differ_content")); break; } } }</code><technical_language>thing: I prefer move short if branches top avoid else branches end of code block</technical_language>

Target:
private void compareContent(CompareAssertionResult result) { if (!compareContent) { return; } String prevContent = null; SampleResult prevResult = null; boolean success = true; for (SampleResult sResult : responses) { String currentContent = sResult.getResponseDataAsString(); currentContent = filterString(currentContent); if (prevContent != null) { success = prevContent.equals(currentContent); } if (success) { prevResult = sResult; prevContent = currentContent; } else { result.setFailure(true); StringBuilder sb = new StringBuilder(); appendResultDetails(sb, prevResult); sb.append(prevContent); result.addToBaseResult(sb.toString()); sb.setLength(0); appendResultDetails(sb, sResult); sb.append(currentContent); result.addToSecondaryResult(sb.toString()); result.setFailureMessage(JMeterUtils.getResString("comparison_differ_content")); break; } } }
Source:
<code>public void requestSpace(long sessionId, long blockId, long additionalBytes) throws BlockDoesNotExistException, WorkerOutOfSpaceException, IOException { LOG.debug("requestSpace: sessionId={}, blockId={}, additionalBytes={}", sessionId, blockId, additionalBytes); try (LockResource r = new LockResource(mMetadataWriteLock)) { TempBlockMeta tempBlockMeta = mMetaManager.getTempBlockMeta(blockId); StorageDirView allocationDir = allocateSpace(sessionId, BlockAllocationOptions .defaultsForRequest(additionalBytes, tempBlockMeta.getBlockLocation())); if (allocationDir == null) { throw new WorkerOutOfSpaceException(String.format( "Can't reserve more space for block: %d under session: %d.", blockId, sessionId)); } if (!allocationDir.toBlockStoreLocation().equals(tempBlockMeta.getBlockLocation())) { <START> throw new RuntimeException("Allocation error: location enforcement failed"); <END> } try { mMetaManager.resizeTempBlockMeta( tempBlockMeta, tempBlockMeta.getBlockSize() + additionalBytes); } catch (InvalidWorkerStateException e) { throw Throwables.propagate(e); } } }</code><technical_language>Do expect this happen</technical_language>

Target:
public void requestSpace(long sessionId, long blockId, long additionalBytes) throws BlockDoesNotExistException, WorkerOutOfSpaceException, IOException { LOG.debug("requestSpace: sessionId={}, blockId={}, additionalBytes={}", sessionId, blockId, additionalBytes); try (LockResource r = new LockResource(mMetadataWriteLock)) { TempBlockMeta tempBlockMeta = mMetaManager.getTempBlockMeta(blockId); StorageDirView allocationDir = allocateSpace(sessionId, AllocateOptions.forRequestSpace(additionalBytes, tempBlockMeta.getBlockLocation())); if (allocationDir == null) { throw new WorkerOutOfSpaceException(String.format( "Can't reserve more space for block: %d under session: %d.", blockId, sessionId)); } if (!allocationDir.toBlockStoreLocation().equals(tempBlockMeta.getBlockLocation())) { throw new RuntimeException("Allocation error: location enforcement failed"); } try { mMetaManager.resizeTempBlockMeta( tempBlockMeta, tempBlockMeta.getBlockSize() + additionalBytes); } catch (InvalidWorkerStateException e) { throw Throwables.propagate(e); } } }
Source:
<code>public String getColumnText(MyModel element, int columnIndex) { <START> if (element instanceof MyModel) { <END> switch (columnIndex) { case 0: return ((MyModel)element).col1; case 1: return ((MyModel)element).col2; } } return ""; }</code><technical_language>Strange check</technical_language>

Target:
public String getColumnText(MyModel element, int columnIndex) { switch (columnIndex) { case 0: return element.col1; case 1: return element.col2; } return ""; }
Source:
<code>public ProductSearch getSearchProducts(@RequestParam(value = "query", required = false) String query) { List<Product> productList = productService.getAllProducts(); ProductSearch search = new ProductSearch(query); String finalQuery = (query != null) ? query : ""; productList.stream() .filter(p -> eventService.getEventByProductKey(p.getKey()).size() < 1) .filter(p -> p.getTitle().toLowerCase().contains(finalQuery.toLowerCase())) <START> .collect(Collectors.toCollection(ArrayList::new)) <END> .forEach(x -> search.addItem(x.getTitle(), x.getId())); return search; }</code><technical_language>collect items if do it? This unnecessary me</technical_language>

Target:
public ProductSearch getSearchProducts(@RequestParam(value = "query", required = false) String query) { List<Product> productList = productService.getAllProducts(); ProductSearch search = new ProductSearch(query); String finalQuery = (query != null) ? query : ""; productList.stream() .filter(p -> eventService.getEventByProductKey(p.getKey()).size() < 1) .filter(p -> p.getTitle().toLowerCase().contains(finalQuery.toLowerCase())) .forEach(x -> search.addItem(x.getTitle(), x.getId())); return search; }
Source:
<code>public void init(GraphHopperConfig ghConfig) { if (ghConfig.has("prepare.threads")) throw new IllegalStateException("Use " + CH.PREPARE + "threads instead of prepare.threads"); if (ghConfig.has("prepare.chWeighting") || ghConfig.has("prepare.chWeightings") || ghConfig.has("prepare.ch.weightings")) throw new IllegalStateException("Use profiles_ch instead of prepare.chWeighting, prepare.chWeightings or prepare.ch.weightings"); if (ghConfig.has("prepare.ch.edge_based")) <START> throw new IllegalStateException("Use profiles_ch instead of prepare.ch.edge_based"); <END> setPreparationThreads(ghConfig.getInt(CH.PREPARE + "threads", getPreparationThreads())); setDisablingAllowed(ghConfig.getBool(CH.INIT_DISABLING_ALLOWED, isDisablingAllowed())); setCHProfileConfigs(ghConfig.getCHProfiles()); pMap = ghConfig.asPMap(); }</code><technical_language>In exceptions I link this issue #1922 give more context</technical_language>

Target:
public void init(GraphHopperConfig ghConfig) { if (ghConfig.has("prepare.threads")) throw new IllegalStateException("Use " + CH.PREPARE + "threads instead of prepare.threads"); if (ghConfig.has("prepare.chWeighting") || ghConfig.has("prepare.chWeightings") || ghConfig.has("prepare.ch.weightings")) throw new IllegalStateException("Use profiles_ch instead of prepare.chWeighting, prepare.chWeightings or prepare.ch.weightings, see #1922"); if (ghConfig.has("prepare.ch.edge_based")) throw new IllegalStateException("Use profiles_ch instead of prepare.ch.edge_based, see #1922"); setPreparationThreads(ghConfig.getInt(CH.PREPARE + "threads", getPreparationThreads())); setDisablingAllowed(ghConfig.getBool(CH.INIT_DISABLING_ALLOWED, isDisablingAllowed())); setCHProfileConfigs(ghConfig.getCHProfiles()); pMap = ghConfig.asPMap(); }
Source:
<code>public void testSerde() throws Exception { WorkerBehaviorConfig config = new WorkerBehaviorConfig( new FillCapacityWithAffinityWorkerSelectStrategy( new FillCapacityWithAffinityConfig( ImmutableMap.of("foo", Arrays.asList("localhost")) ) ), new EC2AutoScaler( 7, 11, new EC2EnvironmentConfig( <START> "us-east-1", <END> "us-east-1a", new EC2NodeData( "amiid", "instanceType", 3, 5, Arrays.asList("securityGroupIds"), "keyNames", "subnetId", null, null ), new StringEC2UserData( "availZone", "replace", "version" ) ), null, null ) ); final ObjectMapper mapper = new DefaultObjectMapper(); mapper.setInjectableValues( new InjectableValues() { @Override public Object findInjectableValue( Object valueId, DeserializationContext ctxt, BeanProperty forProperty, Object beanInstance ) { return null; } } ); Assert.assertEquals(config, mapper.readValue(mapper.writeValueAsBytes(config), WorkerBehaviorConfig.class)); }</code><technical_language>here, need retain a test for legacy configs this is null</technical_language>

Target:
public void testSerde() throws Exception { WorkerBehaviorConfig config = new WorkerBehaviorConfig( new FillCapacityWithAffinityWorkerSelectStrategy( new FillCapacityWithAffinityConfig( ImmutableMap.of("foo", Arrays.asList("localhost")) ) ), new EC2AutoScaler( 7, 11, new EC2EnvironmentConfig( "us-east-1a", new EC2NodeData( "amiid", "instanceType", 3, 5, Arrays.asList("securityGroupIds"), "keyNames", "subnetId", null, null ), new StringEC2UserData( "availZone", "replace", "version" ) ), null, null ) ); final ObjectMapper mapper = new DefaultObjectMapper(); mapper.setInjectableValues( new InjectableValues() { @Override public Object findInjectableValue( Object valueId, DeserializationContext ctxt, BeanProperty forProperty, Object beanInstance ) { return null; } } ); Assert.assertEquals(config, mapper.readValue(mapper.writeValueAsBytes(config), WorkerBehaviorConfig.class)); }
Source:
<code>public String toSubscribeMessage() { String msg = super.toSubscribeMessage(); <START> storeMyUserId(channelData); <END> return msg; }</code><technical_language>Previously, if channel data missing (e.g. if authorise a presence channel auth endpoint configured authorise private channels) a null pointer exception thrown in storeMyUserId caught converted AuthorizationFailureException above. uncaught null pointer exception. I wrap call storeMyUserId in a try catch before</technical_language>

Target:
public String toSubscribeMessage() { String msg = super.toSubscribeMessage(); myUserID = extractUserIdFromChannelData(channelData); return msg; }
Source:
<code>protected void eventHandle(@NonNull ITmfEvent event) { ITmfStateSystemBuilder ss = getStateSystemBuilder(); if (ss == null) { return; } int rootGroupedQuark = ss.getQuarkAbsoluteAndAdd(CounterAnalysis.GROUPED_COUNTER_ASPECTS_ATTRIB); for (GroupedCounterAspect aspect : fGroupedCounterAspects) { handleCounterAspect(event, ss, aspect, rootGroupedQuark); } int rootUngroupedQuark = ss.getQuarkAbsoluteAndAdd(CounterAnalysis.UNGROUPED_COUNTER_ASPECTS_ATTRIB); <START> for (ITmfCounterAspect aspect : fUngroupedCounterAspects) { <END> handleCounterAspect(event, ss, aspect, rootUngroupedQuark); } }</code><technical_language>No, want this for grouped item, overwritten, ungrouped here</technical_language>

Target:
protected void eventHandle(@NonNull ITmfEvent event) { ITmfStateSystemBuilder ss = getStateSystemBuilder(); if (ss == null) { return; } int rootGroupedQuark = ss.getQuarkAbsoluteAndAdd(CounterAnalysis.GROUPED_COUNTER_ASPECTS_ATTRIB); for (GroupedCounterAspect aspect : fGroupedCounterAspects) { handleGroupedCounterAspect(event, ss, aspect, rootGroupedQuark); } int rootUngroupedQuark = ss.getQuarkAbsoluteAndAdd(CounterAnalysis.UNGROUPED_COUNTER_ASPECTS_ATTRIB); for (ITmfCounterAspect aspect : fUngroupedCounterAspects) { handleCounterAspect(event, ss, aspect, rootUngroupedQuark); } }
Source:
<code>protected AddDiskParameters buildAddDiskParameters(DiskImage image, boolean isBoot) { image.setDiskAlias(renameDiskAlias(getVm().getOrigin(), image.getDiskAlias())); AddDiskParameters diskParameters = new AddDiskParameters(new DiskVmElement(null, getVmId()), image); diskParameters.setStorageDomainId(getStorageDomainId()); diskParameters.setParentCommand(getActionType()); diskParameters.setParentParameters(getParameters()); diskParameters.setShouldRemainIllegalOnFailedExecution(true); diskParameters.setStorageDomainId(getParameters().getDestDomainId()); DiskVmElement dve = image.getDiskVmElementForVm(getVmId()) != null ? <START> image.getDiskVmElementForVm(getVmId()) : new DiskVmElement(image.getId(), getVmId()); <END> if (dve.getDiskInterface() == null || getVm().getOrigin() != OriginType.KVM ) { dve.setDiskInterface(DiskInterface.VirtIO); } dve.setBoot(isBoot); diskParameters.setDiskVmElement(dve); return diskParameters; }</code><technical_language>do expect disk-vm-elements null now</technical_language>

Target:
protected AddDiskParameters buildAddDiskParameters(DiskImage image, boolean isBoot) { image.setDiskAlias(renameDiskAlias(getVm().getOrigin(), image.getDiskAlias())); AddDiskParameters diskParameters = new AddDiskParameters(new DiskVmElement(null, getVmId()), image); diskParameters.setStorageDomainId(getStorageDomainId()); diskParameters.setParentCommand(getActionType()); diskParameters.setParentParameters(getParameters()); diskParameters.setShouldRemainIllegalOnFailedExecution(true); diskParameters.setStorageDomainId(getParameters().getDestDomainId()); DiskVmElement dve = image.getDiskVmElementForVm(getVmId()); if (getVm().getOrigin() != OriginType.KVM ) { dve.setDiskInterface(DiskInterface.VirtIO); } dve.setBoot(isBoot); diskParameters.setDiskVmElement(dve); return diskParameters; }
Source:
<code>public void unsubscribe() { if (this.transport != null) { <START> transport.unsubscribe(); <END> } }</code><technical_language>err... realize this java, consistent usage of this</technical_language>

Target:
public void unsubscribe() { if (transport != null) { transport.unsubscribe(); } }
Source:
<code>public void connect() { <START> session = new CqlSessionBuilder().build(); <END> System.out.printf("Connected session: %s%n", session.getName()); }</code><technical_language>a difference in practice, pattern show in docs is CqlSession.builder().build()</technical_language>

Target:
public void connect() { session = CqlSession.builder().build(); System.out.printf("Connected session: %s%n", session.getName()); }
Source:
<code>private void invokeServlet(HttpServletRequest req, HttpServletResponse resp) throws IOException { <START> resp.setHeader("Strict-Transport-Security", "max-age=31536000"); <END> log.info("Request received: [" + req.getMethod() + "] " + req.getRequestURL().toString() + ": " + HttpRequestHelper.getRequestParametersAsString(req)); log.info("User agent: " + req.getHeader("User-Agent")); Action action; try { action = new ActionFactory().getAction(req); } catch (ActionMappingException e) { throwError(resp, e.getStatusCode(), e.getMessage()); return; } boolean passAccessControlCheck = action.checkAccessControl(); if (!passAccessControlCheck) { throwError(resp, 403, "Not authorized to access this resource."); return; } try { ActionResult result = action.execute(resp); result.send(resp); } catch (Throwable t) { throwError(resp, 500, t.getMessage()); } }</code><technical_language><transport-guarantee>CONFIDENTIAL</transport-guarantee> in web.xml do this job</technical_language>

Target:
private void invokeServlet(HttpServletRequest req, HttpServletResponse resp) throws IOException { resp.setHeader("Strict-Transport-Security", "max-age=31536000"); @SuppressWarnings("PMD.PrematureDeclaration") long startTime = System.currentTimeMillis(); log.info("Request received: [" + req.getMethod() + "] " + req.getRequestURL().toString() + ", Params: " + HttpRequestHelper.getRequestParametersAsString(req) + ", Headers: " + HttpRequestHelper.getRequestHeadersAsString(req)); Action action; try { action = new ActionFactory().getAction(req); } catch (ActionMappingException e) { throwError(resp, e.getStatusCode(), e.getMessage()); return; } boolean passAccessControlCheck = action.checkAccessControl(); if (!passAccessControlCheck) { throwError(resp, 403, "Not authorized to access this resource."); return; } try { ActionResult result = action.execute(resp); result.send(resp); long timeTaken = System.currentTimeMillis() - startTime; log.info(action.getLogMessage() + "|||" + timeTaken); } catch (Throwable t) { throwError(resp, 500, t.getMessage()); } }
Source:
<code>public static Project getByName(String name) { RuntimeEnvironment env = RuntimeEnvironment.getInstance(); if (env.hasProjects()) { for (Project proj : env.getProjects()) { <START> if (name.equals(proj.getName())) { <END> return (proj); } } } return null; }</code><technical_language>if is this change, container type finally changed List Set (TreeSet) ultra speedup for this lookup. ultra I this is significant for single project in container of size app. 700. event this done times request</technical_language>

Target:
public static Project getByName(String name) { RuntimeEnvironment env = RuntimeEnvironment.getInstance(); if (env.hasProjects()) { Project proj; if ((proj = env.getProjects().get(name)) != null) { return (proj); } } return null; }
Source:
<code>public double median(String colName) { <START> double[] colArray = toDoubleArray(colName); double arrayMedian = StatUtils.percentile(colArray, 50); return arrayMedian; <END> }</code><technical_language>return StatUtils. percentile(toDoubleArray(colName), 50) directly</technical_language>

Target:
public double median(String colName) { return StatUtils.percentile(toDoubleArray(colName), 50); }
Source:
<code>public void exportDescription(Class<? extends Configuration> description) { if (descriptionExported) return; for (Annotation annotaion : description.getAnnotations()) { if (annotaion instanceof GroupContainer) { for (Annotation group : ((GroupContainer) annotaion).value()) { exportGroup((Group) group); } } else if (annotaion instanceof Group) { exportGroup((Group) annotaion); } else if (annotaion instanceof Runtime) { exportRuntimeType((Runtime) annotaion); } else { warningList.add("Only Group and Runtime annotations are allowed to use."); } } if (!runtimeTypeIsPresent) { <START> warningList.add("You haven't sepcified the runtime type!\n " <END> + "The default runtime type is: MultiThreadedRT"); runtime = RuntimeType.THREADED; } exportDefaultConfiguration(); descriptionExported = true; }</code><technical_language>Typo, _specified_</technical_language>

Target:
public void exportDescription(Class<? extends Configuration> description) { if (descriptionExported) return; for (Annotation annotaion : description.getAnnotations()) { if (annotaion instanceof GroupContainer) { for (Annotation group : ((GroupContainer) annotaion).value()) { exportGroup((Group) group); } } else if (annotaion instanceof Group) { exportGroup((Group) annotaion); } else if (annotaion instanceof Runtime) { exportRuntimeType((Runtime) annotaion); } else { warningList.add("Only Group and Runtime annotations are allowed to use."); } } if (!runtimeTypeIsPresent) { warningList.add("You haven't specified the runtime type!\n " + "The default runtime type is: MultiThreadedRT"); runtime = RuntimeType.THREADED; } exportDefaultConfiguration(); descriptionExported = true; }
Source:
<code>public static AnalyzeRequest map(com.azure.search.documents.implementation.models.AnalyzeRequest obj) { if (obj == null) { return null; } AnalyzeRequest analyzeRequest = new AnalyzeRequest(); if (obj.getCharFilters() != null) { <START> List<CharFilterName> _charFilters = <END> obj.getCharFilters().stream().map(CharFilterNameConverter::map).collect(Collectors.toList()); analyzeRequest.setCharFilters(_charFilters); } if (obj.getAnalyzer() != null) { LexicalAnalyzerName _analyzer = LexicalAnalyzerNameConverter.map(obj.getAnalyzer()); analyzeRequest.setAnalyzer(_analyzer); } if (obj.getTokenFilters() != null) { List<TokenFilterName> _tokenFilters = obj.getTokenFilters().stream().map(TokenFilterNameConverter::map).collect(Collectors.toList()); analyzeRequest.setTokenFilters(_tokenFilters); } String _text = obj.getText(); analyzeRequest.setText(_text); if (obj.getTokenizer() != null) { LexicalTokenizerName _tokenizer = LexicalTokenizerNameConverter.map(obj.getTokenizer()); analyzeRequest.setTokenizer(_tokenizer); } return analyzeRequest; }</code><technical_language>Do need temp variable</technical_language>

Target:
public static AnalyzeRequest map(com.azure.search.documents.implementation.models.AnalyzeRequest obj) { if (obj == null) { return null; } AnalyzeRequest analyzeRequest = new AnalyzeRequest(); if (obj.getCharFilters() != null) { List<CharFilterName> charFilters = obj.getCharFilters().stream().map(CharFilterNameConverter::map).collect(Collectors.toList()); analyzeRequest.setCharFilters(charFilters); } if (obj.getAnalyzer() != null) { LexicalAnalyzerName analyzer = LexicalAnalyzerNameConverter.map(obj.getAnalyzer()); analyzeRequest.setAnalyzer(analyzer); } if (obj.getTokenFilters() != null) { List<TokenFilterName> tokenFilters = obj.getTokenFilters().stream().map(TokenFilterNameConverter::map).collect(Collectors.toList()); analyzeRequest.setTokenFilters(tokenFilters); } String text = obj.getText(); analyzeRequest.setText(text); if (obj.getTokenizer() != null) { LexicalTokenizerName tokenizer = LexicalTokenizerNameConverter.map(obj.getTokenizer()); analyzeRequest.setTokenizer(tokenizer); } return analyzeRequest; }
Source:
<code><START> public String getLastLoginIpAddress() { <END> return lastLoginIpAddress; }</code><technical_language>Is a reason InetAddresses? I perform a DNS request, DNS names IP addresses</technical_language>

Target:
public Optional<String> getLastLoginIpAddress() { return Optional.ofNullable(lastLoginIpAddress); }
Source:
<code>public void stateUpdated(Item item, State state) { if (exposedItems != null && exposedItems.contains(item.getName())) { <START> logger.debug("Sending item update to openhab Cloud: - {}", item.getName(), state.toString()); <END> cloudClient.sendItemUpdate(item.getName(), state.toString()); } }</code><technical_language>toString() left logger for performance</technical_language>

Target:
public void stateUpdated(Item item, State state) { if (exposedItems != null && exposedItems.contains(item.getName())) { logger.debug("Sending item update to openhab Cloud: - {}", item.getName(), state); cloudClient.sendItemUpdate(item.getName(), state.toString()); } }
Source:
<code>public void testTimeToDeleteFalse() { HostAndPort address = HostAndPort.fromString("tserver1:9998"); long wait = AccumuloConfiguration.getTimeInMillis("1h"); long t1, t2; boolean ttd; do { t1 = System.nanoTime(); gcwal.clearFirstSeenDead(); gcwal.timeToDelete(address, wait); ttd = gcwal.timeToDelete(address, wait); t2 = System.nanoTime(); <START> } while (t2 - t1 > (wait / 2) * 1000000); END> assertFalse(gcwal.timeToDelete(address, wait)); }</code><technical_language>I TimeUnit earlier in patch convert time. TimeUnit earlier in this test method convert wait nanos. IMO slightly more readable multiplying 1000000</technical_language>

Target:
public void testTimeToDeleteFalse() { HostAndPort address = HostAndPort.fromString("tserver1:9998"); long wait = AccumuloConfiguration.getTimeInMillis("1h"); long t1, t2; boolean ttd; do { t1 = System.nanoTime(); gcwal.clearFirstSeenDead(); assertFalse("First call should be false and should store the first seen time", gcwal.timeToDelete(address, wait)); ttd = gcwal.timeToDelete(address, wait); t2 = System.nanoTime(); } while (TimeUnit.NANOSECONDS.toMillis(t2 - t1) > (wait / 2)); assertFalse(ttd); }
Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Mapbox.getInstance(this, getString(R.string.access_token)); setContentView(R.layout.activity_javaservices_directions); mapView = findViewById(R.id.mapView); mapView.onCreate(savedInstanceState); mapView.getMapAsync(new OnMapReadyCallback() { @Override public void onMapReady(@NonNull MapboxMap mapboxMap) { <START> DirectionsActivity.this.mapboxMap = mapboxMap; <END> mapboxMap.setStyle(Style.MAPBOX_STREETS, new Style.OnStyleLoaded() { @Override public void onStyleLoaded(@NonNull Style style) { origin = Point.fromLngLat(-3.588098, 37.176164); destination = Point.fromLngLat(-3.601845, 37.184080); initSource(style); initLayers(style); getRoute(origin, destination); } }); } }); }</code><technical_language>pass mapboxMap getRoute method argument? usage of mapboxMap in this activity</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Mapbox.getInstance(this, getString(R.string.access_token)); setContentView(R.layout.activity_javaservices_directions); mapView = findViewById(R.id.mapView); mapView.onCreate(savedInstanceState); mapView.getMapAsync(new OnMapReadyCallback() { @Override public void onMapReady(@NonNull MapboxMap mapboxMap) { mapboxMap.setStyle(Style.MAPBOX_STREETS, new Style.OnStyleLoaded() { @Override public void onStyleLoaded(@NonNull Style style) { origin = Point.fromLngLat(-3.588098, 37.176164); destination = Point.fromLngLat(-3.601845, 37.184080); initSource(style); initLayers(style); getRoute(mapboxMap, origin, destination); } }); } }); }
Source:
<code>public void validateJmxMetrics() throws Exception { MetricsRegistry metricsRegistry = new MetricsRegistryMap(); CoordinatorStreamStore coordinatorStreamStore = new CoordinatorStreamStore(config, metricsRegistry); coordinatorStreamStore.init(); try { LocalityManager localityManager = new LocalityManager(new NamespaceAwareCoordinatorStreamStore(coordinatorStreamStore, SetConfig.TYPE)); validator.init(config); LocalityModel localityModel = localityManager.readLocality(); for (ContainerLocality containerLocality : localityModel.getContainerLocalities().values()) { String containerId = containerLocality.id(); String jmxUrl = containerLocality.jmxTunnelingUrl(); <START> if (StringUtils.isNotBlank(jmxUrl)) { <END> log.info("validate container " + containerId + " metrics with JMX: " + jmxUrl); JmxMetricsAccessor jmxMetrics = new JmxMetricsAccessor(jmxUrl); jmxMetrics.connect(); validator.validate(jmxMetrics); jmxMetrics.close(); log.info("validate container " + containerId + " successfully"); } } validator.complete(); } finally { coordinatorStreamStore.close(); } }</code><technical_language>In samza control JMX enable disable a config, emit JMX metrics if config is enabled</technical_language>

Target:
public void validateJmxMetrics() throws Exception { MetricsRegistry metricsRegistry = new MetricsRegistryMap(); CoordinatorStreamStore coordinatorStreamStore = new CoordinatorStreamStore(config, metricsRegistry); coordinatorStreamStore.init(); try { LocalityManager localityManager = new LocalityManager(new NamespaceAwareCoordinatorStreamStore(coordinatorStreamStore, SetConfig.TYPE)); validator.init(config); LocalityModel localityModel = localityManager.readLocality(); for (ProcessorLocality processorLocality : localityModel.getProcessorLocalities().values()) { String containerId = processorLocality.id(); String jmxUrl = processorLocality.jmxTunnelingUrl(); if (StringUtils.isNotBlank(jmxUrl)) { log.info("validate container " + containerId + " metrics with JMX: " + jmxUrl); JmxMetricsAccessor jmxMetrics = new JmxMetricsAccessor(jmxUrl); jmxMetrics.connect(); validator.validate(jmxMetrics); jmxMetrics.close(); log.info("validate container " + containerId + " successfully"); } } validator.complete(); } finally { coordinatorStreamStore.close(); } }
Source:
<code>public int getLatestPacketFailRate() { int failure = 0; int sent = 0; int received = 0; int size = mTcpStats.size(); for (int i = 0; i < size; i++) { final long key = mTcpStats.keyAt(i); failure += (mTcpStats.get(key).lostCount + mTcpStats.get(key).retransmitCount); sent += mTcpStats.get(key).sentCount; received += mTcpStats.get(key).receivedCount; } updateSentSinceLastRecv(sent, received); if (getSentSinceLastRecv() < getMinPacketsThreshold()) return 0; <START> int rate <END> = ((sent != 0) ? (failure * 100 / sent) : 0); log("getLatestPacketFailRate:" + rate); return rate; }</code><technical_language>final</technical_language>

Target:
public int getLatestPacketFailRate() { int failure = 0; int sent = 0; int received = 0; int size = mTcpStats.size(); for (int i = 0; i < size; i++) { final long key = mTcpStats.keyAt(i); failure += (mTcpStats.get(key).lostCount + mTcpStats.get(key).retransmitCount); sent += mTcpStats.get(key).sentCount; received += mTcpStats.get(key).receivedCount; } updateSentSinceLastRecv(sent, received); if (getSentSinceLastRecv() < getMinPacketsThreshold()) return 0; final int rate = ((sent != 0) ? (failure * 100 / sent) : 0); log("getLatestPacketFailRate:" + rate); return rate; }
Source:
<code>public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException { final MutableValueInt inspected = new MutableValueInt(); <START> return new ConstantScoreWeight(this) { <END> @Override public Scorer scorer(final LeafReaderContext context) throws IOException { int remaining = settings.getMaxInspect() - inspected.value; if(remaining < 0) { remaining = 0; } int maxDoc = remaining > context.reader().maxDoc() ? context.reader().maxDoc() : remaining; final DocIdSetIterator approximation = DocIdSetIterator.all(maxDoc); return new ConstantScoreScorer(this, 1f, new RegexTwoPhaseIterator(approximation, context, inspected)); } }; }</code><technical_language>a case of BrainDoesNotEngageException, I moved inspected of class</technical_language>

Target:
public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException { return new ConstantScoreWeight(this) { private final MutableValueInt inspected = new MutableValueInt(); @Override public Scorer scorer(final LeafReaderContext context) throws IOException { int remaining = settings.getMaxInspect() - inspected.value; if(remaining < 0) { remaining = 0; } int maxDoc = remaining > context.reader().maxDoc() ? context.reader().maxDoc() : remaining; final DocIdSetIterator approximation = DocIdSetIterator.all(maxDoc); return new ConstantScoreScorer(this, 1f, new RegexTwoPhaseIterator(approximation, context, inspected)); } }; }
Source:
<code>private void setupAttribution() { Page page = parentFragment.getPage(); pageLicenseText.setText(Html.fromHtml(activity.getString(R.string.content_license_html))); pageLicenseText.setMovementMethod(new LinkMovementMethodExt(linkHandler)); if (page.isMainPage() || page.isFilePage()) { pageLastUpdatedText.setVisibility(View.GONE); } else { String lastUpdatedHtml = "<a href=\"" + page.getTitle().getUriForAction("history") + "\">" + activity.getString(R.string.last_updated_text, formatDateRelative(page.getPageProperties().getLastModified()) + "</a>"); <START> String discussionHtml = "<a href=\"" + page.getTitle().getPrefixedUri("Talk") <END> + "\">" + activity.getString(R.string.talk_page_link_text) + "</a>"; pageLastUpdatedText.setText(Html.fromHtml(lastUpdatedHtml + " &mdash; " + discussionHtml)); pageLastUpdatedText.setMovementMethod(new LinkMovementMethodExt(linkHandler)); pageLastUpdatedText.setVisibility(View.VISIBLE); } }</code><technical_language>build Talk uri instantiating a new PageTitle this constructor: PageTitle t = new PageTitle("Talk", page.getTitle().getPrefixedText(), page.getTitle().getSite()); ...and t.getCanonicalUri()</technical_language>

Target:
private void setupAttribution() { Page page = parentFragment.getPage(); pageLicenseText.setText(Html.fromHtml(activity.getString(R.string.content_license_html))); pageLicenseText.setMovementMethod(new LinkMovementMethodExt(linkHandler)); if (page.isMainPage() || page.isFilePage()) { pageLastUpdatedText.setVisibility(View.GONE); } else { PageTitle title = page.getTitle(); String lastUpdatedHtml = "<a href=\"" + title.getUriForAction("history") + "\">" + activity.getString(R.string.last_updated_text, formatDateRelative(page.getPageProperties().getLastModified()) + "</a>"); PageTitle talkPageTitle = new PageTitle("Talk", title.getPrefixedText(), title.getSite()); String discussionHtml = "<a href=\"" + talkPageTitle.getCanonicalUri() + "\">" + activity.getString(R.string.talk_page_link_text) + "</a>"; pageLastUpdatedText.setText(Html.fromHtml(lastUpdatedHtml + " &mdash; " + discussionHtml)); pageLastUpdatedText.setMovementMethod(new LinkMovementMethodExt(linkHandler)); pageLastUpdatedText.setVisibility(View.VISIBLE); } }
Source:
<code>public void testSetContentFromFile() throws Exception { TestHttpData test = new TestHttpData("test", UTF_8, 0); File tmpFile = File.createTempFile(UUID.randomUUID().toString(), ".tmp"); tmpFile.deleteOnExit(); FileOutputStream fos = new FileOutputStream(tmpFile); byte[] bytes = new byte[4096]; ThreadLocalRandom.current().nextBytes(bytes); try { fos.write(bytes); fos.flush(); } finally { fos.close(); } test.setContent(tmpFile); <START> ByteBuf buf = test.getByteBuf(); <END> assertEquals(buf.readerIndex(), 0); assertEquals(buf.writerIndex(), bytes.length); assertArrayEquals(bytes, test.get()); assertArrayEquals(bytes, ByteBufUtil.getBytes(buf)); }</code><technical_language>@seedeed do need release this buf</technical_language>

Target:
public void testSetContentFromFile() throws Exception { TestHttpData test = new TestHttpData("test", UTF_8, 0); try { File tmpFile = File.createTempFile(UUID.randomUUID().toString(), ".tmp"); tmpFile.deleteOnExit(); FileOutputStream fos = new FileOutputStream(tmpFile); byte[] bytes = new byte[4096]; PlatformDependent.threadLocalRandom().nextBytes(bytes); try { fos.write(bytes); fos.flush(); } finally { fos.close(); } test.setContent(tmpFile); ByteBuf buf = test.getByteBuf(); assertEquals(buf.readerIndex(), 0); assertEquals(buf.writerIndex(), bytes.length); assertArrayEquals(bytes, test.get()); assertArrayEquals(bytes, ByteBufUtil.getBytes(buf)); } finally { test.delete(); } }
Source:
<code>public void setWebClient(WebClient webClient){ <START> Assert.notNull(webClient, "Custom WebClient must not be null"); <END> this.webClient = webClient; }</code><technical_language>follow conventions of Spring Security, please change "webClient null"</technical_language>

Target:
public void setWebClient(WebClient webClient){ Assert.notNull(webClient, "webClient cannot be null"); this.webClient = webClient; }
Source:
<code>String getEndpointURLForService(String serviceName) { String endpointURL = null; try { endpointURL = invokeConnectionManager(serviceName); LOG.debug("Retrieved endpoint URL for service " + serviceName + ": " + endpointURL); } catch (ConnectionManagerException ex) { LOG.error( <START> "Error getting url for " + serviceName + " from the connection manager. Error: " + ex.getMessage(), ex); <END> } return endpointURL; }</code><technical_language>log's parameter</technical_language>

Target:
String getEndpointURLForService(String serviceName) { String endpointURL = null; try { endpointURL = invokeConnectionManager(serviceName); LOG.debug("Retrieved endpoint URL: for service : ", endpointURL, serviceName); } catch (ConnectionManagerException ex) { LOG.error( "Error getting url for : from the connection manager. Error: {}" , serviceName, ex.getMessage(), ex); } return endpointURL; }
Source:
<code>private void configureParameterServiceForSuspensionCheck(Boolean value) { Mockito.when(parameterService.getParameterValueAsBoolean(ArConstants.AR_NAMESPACE_CODE, <START> ArConstants.CONTRACTS_GRANTS_INVOICE_COMPONENT, CuArConstants.CG_INVOICE_AMT_BILLED_SUSPENSION_BY_BUDGET_TOTAL, Boolean.TRUE.booleanValue())).thenReturn(value); <END> suspensionCategory.setParameterService(parameterService); }</code><technical_language>Another area Boolean unboxing needed</technical_language>

Target:
private void configureParameterServiceForSuspensionCheck(Boolean value) { Mockito.when(parameterService.getParameterValueAsBoolean(ArConstants.AR_NAMESPACE_CODE, ArConstants.CONTRACTS_GRANTS_INVOICE_COMPONENT, CuArConstants.CG_INVOICE_AMT_BILLED_SUSPENSION_BY_BUDGET_TOTAL, Boolean.TRUE)).thenReturn(value); suspensionCategory.setParameterService(parameterService); }
Source:
<code>public final Optional<U> getUserProfile(final C credentials, final WebContext context) { init(); logger.debug("credentials : {}", credentials); if (credentials == null) { return Optional.empty(); } U profile = retrieveUserProfile(credentials, context); if (profile != null) { profile.setClientName(getName()); if (this.authorizationGenerators != null) { for (AuthorizationGenerator<U> authorizationGenerator : this.authorizationGenerators) { profile = authorizationGenerator.generate(context, profile); } } } <START> return Optional.of(profile); <END> }</code><technical_language>ofNullable maybe, no</technical_language>

Target:
public final Optional<U> getUserProfile(final C credentials, final WebContext context) { init(); logger.debug("credentials : {}", credentials); if (credentials == null) { return Optional.empty(); } Optional<U> profile = retrieveUserProfile(credentials, context); if (profile.isPresent()) { profile.get().setClientName(getName()); if (this.authorizationGenerators != null) { for (AuthorizationGenerator<U> authorizationGenerator : this.authorizationGenerators) { profile = Optional.of( authorizationGenerator.generate(context, profile.get()) ); } } } return profile; }
Source:
<code>public static Builder newBuilder( <START> AwsSecurityCredentials awsSecurityCredentials, String httpMethod, String url, String region) { <END> return new Builder(awsSecurityCredentials, httpMethod, url, region); }</code><technical_language>AwsSecurityCredentials package private. a user able obtain one</technical_language>

Target:
static Builder newBuilder( AwsSecurityCredentials awsSecurityCredentials, String httpMethod, String url, String region) { return new Builder(awsSecurityCredentials, httpMethod, url, region); }
Source:
<code><START> void changePos(int delta) { <END> this.pos += delta; }</code><technical_language>this a bounds check throws if try set < 0 > bufferSize</technical_language>

Target:
void changePos(int delta) { int newPos = this.pos + delta; if (newPos < 0 || newPos > this.buf.length) { throw new IllegalArgumentException("New position not in buffer pos=" + this.pos + ", delta=" + delta); } this.pos = newPos; }
Source:
<code>public boolean getRequiredSignatures() throws IOException { <START> return requester().method("GET").withUrlPath(url + REQUIRE_SIGNATURES_URI).to(RequiredSignatures.class).enabled; <END> }</code><technical_language>If implement suggestion of private Requester requester() get rid of .method("GET") advantage of default HTTP method</technical_language>

Target:
public boolean getRequiredSignatures() throws IOException { return requester().withUrlPath(url + REQUIRE_SIGNATURES_URI).fetch(RequiredSignatures.class).enabled; }
Source:
<code>public void stop() { if (isStarted()) { transportFactory.destroy(); asyncExecutorService.shutdownNow(); <START> listenerNotifier.stop(); <END> } started = false; }</code><technical_language>this happen shut asyncExecutorService is bound</technical_language>

Target:
public void stop() { if (isStarted()) { listenerNotifier.stop(); transportFactory.destroy(); asyncExecutorService.shutdownNow(); } started = false; }
Source:
<code>@Test public void testFilterAndSortWithTrim() { Tester tester = new TesterImpl(getDiffRepos(), false, true, true, false, null, null) { @Override public RelOptPlanner createPlanner() { return new MockRelOptPlanner(Contexts.empty()) { @Override public List<RelTraitDef> getRelTraitDefs() { return ImmutableList.<RelTraitDef>of(RelCollationTraitDef.INSTANCE); } @Override public RelTraitSet emptyTraitSet() { return RelTraitSet.createEmpty().plus( RelCollationTraitDef.INSTANCE.getDefault()); } }; } }; final String sql = "select count(a.EMPNO)\n" + "from (select * from emp order by sal limit 3) a\n" + "where a.EMPNO > 10 group by 2"; RelNode afterTrim = tester.convertSqlToRel(sql).rel; final List<RelNode> rels = new ArrayList<>(); final RelShuttleImpl visitor = new RelShuttleImpl() { @Override public RelNode visit(LogicalSort sort) { rels.add(sort); return super.visit(sort); } @Override public RelNode visit(LogicalFilter filter) { rels.add(filter); return super.visit(filter); } }; visitor.visit(afterTrim); <START> assert rels.size() == 2; <END> RelTrait filterCollation = rels.get(0).getTraitSet() .getTrait(RelCollationTraitDef.INSTANCE); RelTrait sortCollation = rels.get(1).getTraitSet() .getTrait(RelCollationTraitDef.INSTANCE); assert filterCollation.satisfies(sortCollation); }</code><technical_language>JUnit Hamcrest assert methods</technical_language>

Target:
@Test public void testFilterAndSortWithTrim() { Tester tester = new TesterImpl(getDiffRepos(), false, true, true, false, null, null) { @Override public RelOptPlanner createPlanner() { return new MockRelOptPlanner(Contexts.empty()) { @Override public List<RelTraitDef> getRelTraitDefs() { return ImmutableList.<RelTraitDef>of(RelCollationTraitDef.INSTANCE); } @Override public RelTraitSet emptyTraitSet() { return RelTraitSet.createEmpty().plus( RelCollationTraitDef.INSTANCE.getDefault()); } }; } }; final String sql = "select count(a.EMPNO)\n" + "from (select * from emp order by sal limit 3) a\n" + "where a.EMPNO > 10 group by 2"; RelNode afterTrim = tester.convertSqlToRel(sql).rel; final List<RelNode> rels = new ArrayList<>(); final RelShuttleImpl visitor = new RelShuttleImpl() { @Override public RelNode visit(LogicalSort sort) { rels.add(sort); return super.visit(sort); } @Override public RelNode visit(LogicalFilter filter) { rels.add(filter); return super.visit(filter); } }; visitor.visit(afterTrim); assertThat(rels.size(), is(2)); RelTrait filterCollation = rels.get(0).getTraitSet() .getTrait(RelCollationTraitDef.INSTANCE); RelTrait sortCollation = rels.get(1).getTraitSet() .getTrait(RelCollationTraitDef.INSTANCE); assertTrue(filterCollation.satisfies(sortCollation)); }
Source:
<code>public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { <START> <END> String filesStudyIdField = String.format("%s.%s", FILES_FIELD, STUDYID_FIELD); Query query = new Query( new Criteria(filesStudyIdField).is(inputParameters.getStudyId()) .and(FILES_FIELD).size(1)); logger.info("removing single study variants. used query: {}", query); WriteResult writeResult = mongoOperations.remove(query, dbParameters.getCollectionVariantsName()); logger.info("result: {}", writeResult.toString()); return RepeatStatus.FINISHED; }</code><technical_language>Remove blank line</technical_language>

Target:
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { String filesStudyIdField = String.format("%s.%s", FILES_FIELD, STUDYID_FIELD); Query query = new Query( new Criteria(filesStudyIdField).is(inputParameters.getStudyId()) .and(FILES_FIELD).size(1)); logger.info("Deleting variants reported only in study {}", inputParameters.getStudyId()); logger.trace("Query used: {}", query); WriteResult writeResult = mongoOperations.remove(query, dbParameters.getCollectionVariantsName()); logger.info("Result: {}", writeResult.toString()); return RepeatStatus.FINISHED; }