auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public PlaceRequest toPlaceRequest(final String placeToken) throws TokenFormatException { if (!placeToken.startsWith("/")) { return toPlaceRequest("/" + placeToken); } int split = placeToken.indexOf('?'); String place = (split != -1) ? placeToken.substring(0, split) : placeToken; String query = (split != -1) ? placeToken.substring(split + 1) : ""; RouteMatcher matcher = new RouteMatcher(place); RouteMatch match = (matcher.allMatches.size() > 0) ? matcher.allMatches.last() : new RouteMatch(place, 0, null); match.parameters = parseQueryString(query, match.parameters); <START> return new PlaceRequest.Builder().withNameToken(match.route).withParams(match.parameters).build(); <END> }</code><technical_language>wondering, "with" a bit cumbersome, Builder().nameToken("").params().build("") carry meaning</technical_language>

Target:
public PlaceRequest toPlaceRequest(final String placeToken) throws TokenFormatException { if (!placeToken.startsWith("/")) { return toPlaceRequest("/" + placeToken); } int split = placeToken.indexOf('?'); String place = (split != -1) ? placeToken.substring(0, split) : placeToken; String query = (split != -1) ? placeToken.substring(split + 1) : ""; RouteMatcher matcher = new RouteMatcher(place); RouteMatch match = (matcher.allMatches.size() > 0) ? matcher.allMatches.last() : new RouteMatch(place, 0, null); match.parameters = parseQueryString(query, match.parameters); return new PlaceRequest.Builder().nameToken(match.route).with(match.parameters).build(); }
Source:
<code>private CqlQueryResponse executeCqlQuery(CqlRequest cqlRequest) throws UnsupportedQueryException, SourceUnavailableException, FederationException { QueryRequest request = cqlRequest.createQueryRequest(catalogFramework.getId(), filterBuilder); Stopwatch stopwatch = Stopwatch.createStarted(); List<QueryResponse> responses = Collections.synchronizedList(new ArrayList<>()); QueryFunction queryFunction = (queryRequest) -> { QueryResponse queryResponse = catalogFramework.query(queryRequest); responses.add(queryResponse); return queryResponse; }; List<Result> results = ResultIterable.resultIterable(queryFunction, request, cqlRequest.getCount()) .stream() .collect(Collectors.toList()); for (Result result : results) { Metacard metacard = result.getMetacard(); if (metacard.getAttribute("resource-download-url") != null) { List<Serializable> list = new ArrayList<>(); list.add( SystemBaseUrl.EXTERNAL .constructUrl("search/catalog/internal/catalog/sources/") .concat(metacard.getSourceId() + "/" + metacard.getId()) <START> .concat("?transform=" + metacard.getAttribute("metacard-tags").getValues().get(0))); <END> Attribute attribute = new AttributeImpl("resource-download-url", list); metacard.setAttribute(attribute); } } QueryResponse response = new QueryResponseImpl( request, results, true, responses .stream() .filter(Objects::nonNull) .map(QueryResponse::getHits) .findFirst() .orElse(-1l), responses .stream() .filter(Objects::nonNull) .map(QueryResponse::getProperties) .findFirst() .orElse(Collections.emptyMap())); stopwatch.stop(); return new CqlQueryResponse( cqlRequest.getId(), request, response, cqlRequest.getSource(), stopwatch.elapsed(TimeUnit.MILLISECONDS), cqlRequest.isNormalize(), filterAdapter, actionRegistry); }</code><technical_language>tag? is guarantee right one. I change this ?transform=resource</technical_language>

Target:
private CqlQueryResponse executeCqlQuery(CqlRequest cqlRequest) throws UnsupportedQueryException, SourceUnavailableException, FederationException { QueryRequest request = cqlRequest.createQueryRequest(catalogFramework.getId(), filterBuilder); Stopwatch stopwatch = Stopwatch.createStarted(); List<QueryResponse> responses = Collections.synchronizedList(new ArrayList<>()); QueryFunction queryFunction = (queryRequest) -> { QueryResponse queryResponse = catalogFramework.query(queryRequest); responses.add(queryResponse); return queryResponse; }; List<Result> results = ResultIterable.resultIterable(queryFunction, request, cqlRequest.getCount()) .stream() .collect(Collectors.toList()); QueryResponse response = new QueryResponseImpl( request, results, true, responses .stream() .filter(Objects::nonNull) .map(QueryResponse::getHits) .findFirst() .orElse(-1l), responses .stream() .filter(Objects::nonNull) .map(QueryResponse::getProperties) .findFirst() .orElse(Collections.emptyMap())); stopwatch.stop(); return new CqlQueryResponse( cqlRequest.getId(), request, response, cqlRequest.getSource(), stopwatch.elapsed(TimeUnit.MILLISECONDS), cqlRequest.isNormalize(), filterAdapter, actionRegistry); }
Source:
<code>public UserSyncFinishedWithErrors(User user) { this.user = user; <START> this.message = formatMessage( "%s synchronization failed.", user); <END> }</code><technical_language>Is right message? this is for UserSyncFailed.java event</technical_language>

Target:
public UserSyncFinishedWithErrors(User user) { this.user = user; this.message = formatMessage( "%s synchronization finished with errors.", user); }
Source:
<code>short setLock(short lockSetVal) { <START> LOG.debug("acquire" + name + (short) (lockSetVal | setMask)); <END> return (short) (lockSetVal | setMask); }</code><technical_language>bit twiddling ninja -- this debug message sense anyone. passing Resource type logging that. in this function, access Resource</technical_language>

Target:
short setLock(short lockSetVal) { return (short) (lockSetVal | setMask); }
Source:
<code>private VisorBaselineTaskResult remove(List<String> consistentIds) { Map<String, BaselineNode> baseline = currentBaseLine(); <START> if (!baseline.isEmpty()) { <END> for (String consistentId : consistentIds) { BaselineNode node = baseline.remove(consistentId); if (node == null) throw new IllegalStateException("Node not found for consistent ID: " + consistentId); } } return set0(baseline.values()); }</code><technical_language>Please, F.isEmpty() instead of</technical_language>

Target:
private VisorBaselineTaskResult remove(List<String> consistentIds) { Map<String, BaselineNode> baseline = currentBaseLine(); if (F.isEmpty(baseline)) return set0(Collections.EMPTY_LIST); for (String consistentId : consistentIds) { BaselineNode node = baseline.remove(consistentId); if (node == null) throw new IllegalStateException("Node not found for consistent ID: " + consistentId); } return set0(baseline.values()); }
Source:
<code>public String save() { Set<ConstraintViolation<KitodoPassword>> passwordViolations = getPasswordViolations(); <START> if(passwordViolations.isEmpty()) { <END> for (ConstraintViolation<KitodoPassword> passwordViolation : passwordViolations) { Helper.setErrorMessage(passwordViolation.getMessage()); } return this.stayOnCurrentPage; } String login = this.userObject.getLogin(); if (!isUserExistingOrLoginValid(login)) { Helper.setErrorMessage("loginNotValid", new Object[] {login }); return this.stayOnCurrentPage; } if (isMissingClient()) { Helper.setErrorMessage("errorMissingClient"); return this.stayOnCurrentPage; } try { if (userService.getAmountOfUsersWithExactlyTheSameLogin(this.userObject.getId(), login) == 0) { if (Objects.nonNull(this.passwordToEncrypt)) { this.userObject.setPassword(passwordEncoder.encrypt(this.passwordToEncrypt)); } userService.saveToDatabase(this.userObject); if (userService.getAuthenticatedUser().getId().equals(this.userObject.getId())) { loginForm.setLoggedUser(this.userObject); } return userListPath; } else { Helper.setErrorMessage("loginInUse"); return this.stayOnCurrentPage; } } catch (DAOException | RuntimeException e) { Helper.setErrorMessage(ERROR_SAVING, new Object[] {ObjectType.USER.getTranslationSingular() }, logger, e); return this.stayOnCurrentPage; } }</code><technical_language>suggestion if (!passwordViolations.isEmpty()) { I this negated</technical_language>

Target:
public String save() { Set<ConstraintViolation<KitodoPassword>> passwordViolations = getPasswordViolations(); if (!passwordViolations.isEmpty()) { for (ConstraintViolation<KitodoPassword> passwordViolation : passwordViolations) { Helper.setErrorMessage(passwordViolation.getMessage()); } return this.stayOnCurrentPage; } String login = this.userObject.getLogin(); if (!isUserExistingOrLoginValid(login)) { Helper.setErrorMessage("loginNotValid", new Object[] {login }); return this.stayOnCurrentPage; } if (isMissingClient()) { Helper.setErrorMessage("errorMissingClient"); return this.stayOnCurrentPage; } try { if (userService.getAmountOfUsersWithExactlyTheSameLogin(this.userObject.getId(), login) == 0) { if (Objects.nonNull(this.passwordToEncrypt)) { this.userObject.setPassword(passwordEncoder.encrypt(this.passwordToEncrypt)); } userService.saveToDatabase(this.userObject); if (userService.getAuthenticatedUser().getId().equals(this.userObject.getId())) { loginForm.setLoggedUser(this.userObject); } return userListPath; } else { Helper.setErrorMessage("loginInUse"); return this.stayOnCurrentPage; } } catch (DAOException | RuntimeException e) { Helper.setErrorMessage(ERROR_SAVING, new Object[] {ObjectType.USER.getTranslationSingular() }, logger, e); return this.stayOnCurrentPage; } }
Source:
<code>public void testRegisterWithoutOptionalParams() throws Exception { Cluster cluster = getTestCluster(1L); KafkaServiceRegistrar registrar = initializeServiceRegistrar(); Config config = new Config(); config.put(KafkaServiceRegistrar.PARAM_ZOOKEEPER_CONNECT, "zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181"); config.put(KafkaServiceRegistrar.PARAM_LISTENERS, "PLAINTEXT://kafka-1:9092"); registrar.register(cluster, config, Collections.emptyList()); Service kafkaService = environmentService.getServiceByName(cluster.getId(), Constants.Kafka.SERVICE_NAME); assertNotNull(kafkaService); Component broker = environmentService.getComponentByName(kafkaService.getId(), ComponentPropertyPattern.KAFKA_BROKER.name()); assertNotNull(broker); Collection<ComponentProcess> brokerProcesses = environmentService.listComponentProcessesInComponent(broker.getId()); assertEquals(1, brokerProcesses.size()); assertTrue(brokerProcesses.stream().anyMatch(p -> p.getHost().equals("kafka-1") && p.getPort().equals(9092) && p.getProtocol().equals("PLAINTEXT"))); ServiceConfiguration serverPropertiesConf = environmentService.getServiceConfigurationByName(kafkaService.getId(), CONFIGURATION_NAME_SERVER_PROPERTIES); assertNotNull(serverPropertiesConf); Map<String, String> serverPropertiesConfMap = serverPropertiesConf.getConfigurationMap(); <START> assertFalse(serverPropertiesConfMap.containsKey(KafkaServiceRegistrar.PARAM_SECURITY_INTER_BROKER_PROTOCOL)); <END> }</code><technical_language>NIT: annotation this test is expected throw IAE</technical_language>

Target:
public void testRegisterWithoutOptionalParams() throws Exception { Cluster cluster = getTestCluster(1L); KafkaServiceRegistrar registrar = initializeServiceRegistrar(); Config config = new Config(); config.put(KafkaServiceRegistrar.PARAM_ZOOKEEPER_CONNECT, "zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181"); config.put(KafkaServiceRegistrar.PARAM_LISTENERS, "PLAINTEXT://kafka-1:9092"); registrar.register(cluster, config, Collections.emptyList()); Service kafkaService = environmentService.getServiceByName(cluster.getId(), Constants.Kafka.SERVICE_NAME); assertNotNull(kafkaService); Component broker = environmentService.getComponentByName(kafkaService.getId(), ComponentPropertyPattern.KAFKA_BROKER.name()); assertNotNull(broker); Collection<ComponentProcess> brokerProcesses = environmentService.listComponentProcesses(broker.getId()); assertEquals(1, brokerProcesses.size()); assertTrue(brokerProcesses.stream().anyMatch(p -> p.getHost().equals("kafka-1") && p.getPort().equals(9092) && p.getProtocol().equals("PLAINTEXT"))); ServiceConfiguration serverPropertiesConf = environmentService.getServiceConfigurationByName(kafkaService.getId(), CONFIGURATION_NAME_SERVER_PROPERTIES); assertNotNull(serverPropertiesConf); Map<String, String> serverPropertiesConfMap = serverPropertiesConf.getConfigurationMap(); assertFalse(serverPropertiesConfMap.containsKey(KafkaServiceRegistrar.PARAM_SECURITY_INTER_BROKER_PROTOCOL)); }
Source:
<code>public ClientCertificateCredential build() { ValidationUtil.validate(getClass().getSimpleName(), new HashMap<String, Object>() {{ put("clientId", clientId); put("tenantId", tenantId); <START> put("clientCertificate", clientCertificate == null ? clientCertificatePath : clientCertificate); <END> }}); return new ClientCertificateCredential(tenantId, clientId, clientCertificatePath, clientCertificate, clientCertificatePassword, identityClientOptions); }</code><technical_language>error message Validation Util, clear for user. I think, custom handle this error message "A certificate source input stream file path configured builder." throw exception, if path inputstream configured</technical_language>

Target:
public ClientCertificateCredential build() { ValidationUtil.validate(getClass().getSimpleName(), new HashMap<String, Object>() {{ put("clientId", clientId); put("tenantId", tenantId); put("clientCertificate", clientCertificate == null ? clientCertificatePath : clientCertificate); }}); if (clientCertificate != null && clientCertificatePath != null) { throw logger.logExceptionAsWarning(new IllegalArgumentException("Both certificate input stream and " + "certificate path are provided in ClientCertificateCredentialBuilder. Only one of them should " + "be provided.")); } return new ClientCertificateCredential(tenantId, clientId, clientCertificatePath, clientCertificate, clientCertificatePassword, identityClientOptions); }
Source:
<code>protected String relativeDataFileURL(String url, Catalog catalog) { if (catalog == null) { return url; } File baseDirectory = catalog.getResourceLoader().getBaseDirectory(); <START> File f = Resources.find(Resources.fromURL(Files.asResource(baseDirectory), url), true); <END> return f == null ? url : "file:" + Paths.convert(baseDirectory, f); }</code><technical_language>a static constant of some sort constant method for readability.... a trip Path --> File --> Resource --> File above? Hold on, this method is data sources access data, do this Files (and Resources working configuration information)</technical_language>

Target:
protected String relativeDataFileURL(String url, Catalog catalog) { if (catalog == null) { return url; } File baseDirectory = catalog.getResourceLoader().getBaseDirectory(); File f = Files.url(baseDirectory, url); return f == null ? url : "file:" + Paths.convert(baseDirectory, f); }
Source:
<code>List<DataSegment> checkAndGetSegments(TaskToolbox toolbox) throws IOException { final List<DataSegment> usedSegments = toolbox.getTaskActionClient() .submit(new SegmentListUsedAction(dataSource, interval, null)); if (segments != null) { Collections.sort(usedSegments); Collections.sort(segments); if (!usedSegments.equals(segments)) { final List<DataSegment> unknownSegments = segments.stream() .filter(segment -> !usedSegments.contains(segment)) .collect(Collectors.toList()); final List<DataSegment> missingSegments = usedSegments.stream() .filter(segment -> !segments.contains(segment)) .collect(Collectors.toList()); throw new ISE( "Specified segments in the spec are different from the current used segments. " <START> + "There are unused segments[%s] and missing segments[%s] in the spec.", <END> unknownSegments, missingSegments ); } } return usedSegments; }</code><technical_language>log "unknown segments" instead of "unused segments"</technical_language>

Target:
List<DataSegment> checkAndGetSegments(TaskToolbox toolbox) throws IOException { final List<DataSegment> usedSegments = toolbox.getTaskActionClient() .submit(new SegmentListUsedAction(dataSource, interval, null)); if (segments != null) { Collections.sort(usedSegments); Collections.sort(segments); if (!usedSegments.equals(segments)) { final List<DataSegment> unknownSegments = segments.stream() .filter(segment -> !usedSegments.contains(segment)) .collect(Collectors.toList()); final List<DataSegment> missingSegments = usedSegments.stream() .filter(segment -> !segments.contains(segment)) .collect(Collectors.toList()); throw new ISE( "Specified segments in the spec are different from the current used segments. " + "There are unknown segments[%s] and missing segments[%s] in the spec.", unknownSegments, missingSegments ); } } return usedSegments; }
Source:
<code>public void run() { while (!stopThread) { List<ProductSummary> productList = null; synchronized (syncObject) { try { productList = getNextProducts(); } catch (Exception e) { <START> LOGGER.log(Level.WARNING, "[" + getName() + "] Exception getting next products", e); <END> } if (productList == null || productList.size() == 0) { try { syncObject.wait(); } catch (InterruptedException ignore) { LOGGER.log(Level.FINE,"[" + getName() + "] was told to stop, or something went wrong"); } continue; } } for(ProductSummary summary : productList) { LOGGER.log(Level.FINEST,"[" + getName() + "] preparing to process product " + summary.getIndexId()); if (stopThread) { break; } try { LOGGER.log(Level.FINEST,"[" + getName() + "] determining if we can process product " + summary.getIndexId()); if (accept(summary.getId())) { LOGGER.log(Level.FINEST,"[" + getName() + "] attempting to process product " + summary.getIndexId()); this.processProduct(summary); } this.setLastIndexId(summary.getIndexId()); } catch (Exception e) { try { this.onProcessException(summary,e); } catch(Exception e2) { break; } } } } }</code><technical_language>Ideas this more phenomenal</technical_language>

Target:
public void run() { while (!stopThread) { List<ProductSummary> productList = null; synchronized (syncObject) { try { productList = getNextProducts(); } catch (Exception e) { try { this.onProductGetException(e); } catch (Exception e2) { } } if (productList == null || productList.size() == 0) { try { syncObject.wait(); } catch (InterruptedException ignore) { LOGGER.log(Level.FINE,"[" + getName() + "] was told to stop, or something went wrong"); } continue; } } for(ProductSummary summary : productList) { LOGGER.log(Level.FINEST,"[" + getName() + "] preparing to process product " + summary.getIndexId()); if (stopThread) { break; } try { LOGGER.log(Level.FINEST,"[" + getName() + "] determining if we can process product " + summary.getIndexId()); if (accept(summary.getId())) { LOGGER.log(Level.FINEST,"[" + getName() + "] attempting to process product " + summary.getIndexId()); this.processProduct(summary); } this.setLastIndexId(summary.getIndexId()); } catch (Exception e) { try { this.onProcessException(summary,e); } catch(Exception e2) { break; } } } } }
Source:
<code>public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } IndexConfig that = (IndexConfig) o; if (!Objects.equals(name, that.name)) { return false; } if (!Objects.equals(type, that.type)) { return false; } <START> if (type == IndexType.BITMAP && !bitmapIndexOptions.equals(that.bitmapIndexOptions)) { <END> return false; } return getAttributes().equals(that.getAttributes()); }</code><technical_language>This wrong objects yield true. for hashCode</technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } IndexConfig that = (IndexConfig) o; if (!Objects.equals(name, that.name)) { return false; } if (!Objects.equals(type, that.type)) { return false; } if (!bitmapIndexOptions.equals(that.bitmapIndexOptions)) { return false; } return getAttributes().equals(that.getAttributes()); }
Source:
<code>protected DefaultJoin(DataSet<I1> input1, DataSet<I2> input2, Keys<I1> keys1, Keys<I2> keys2, JoinHint hint) { super(input1, input2, keys1, keys2, <START> new DefaultJoinFunction<I1, I2>(), <END> new TupleTypeInfo<Tuple2<I1, I2>>(input1.getType(), input2.getType()), hint); }</code><technical_language>Oh, Eclipse remove cast here</technical_language>

Target:
protected DefaultJoin(DataSet<I1> input1, DataSet<I2> input2, Keys<I1> keys1, Keys<I2> keys2, JoinHint hint) { super(input1, input2, keys1, keys2, (JoinFunction<I1, I2, Tuple2<I1, I2>>) new DefaultJoinFunction<I1, I2>(), new TupleTypeInfo<Tuple2<I1, I2>>(input1.getType(), input2.getType()), hint); }
Source:
<code>private static List<Address> fromJGroupsAddressList(List<org.jgroups.Address> list) { <START> if (list == null || list.isEmpty()) <END> return Collections.emptyList(); List<Address> retval = new ArrayList<>(list.size()); for (org.jgroups.Address a : list) retval.add(fromJGroupsAddress(a)); return Collections.unmodifiableList(retval); }</code><technical_language>suggestion: return list.stream().map(JGroupsAddressCache::fromJGroupsAddress).collect(Collectors.toList()); unmodifiableList() needed picking this address invoker a defensive copy</technical_language>

Target:
private static List<Address> fromJGroupsAddressList(List<org.jgroups.Address> list) { return Collections.unmodifiableList(list.stream() .map(JGroupsAddressCache::fromJGroupsAddress) .collect(Collectors.toList())); }
Source:
<code><START> private Boolean getUsePublicEndpointAccessGateway(EnvironmentNetworkRequest network) { <END> return Optional.ofNullable(network.getUsePublicEndpointAccessGateway()).orElse(false); }</code><technical_language>enum please</technical_language>

Target:
private PublicEndpointAccessGateway getUsePublicEndpointAccessGateway(EnvironmentNetworkRequest network) { return Optional.ofNullable(network.getPublicEndpointAccessGateway()).orElse(PublicEndpointAccessGateway.DISABLED); }
Source:
<code>protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException { TaggedValuePointable tempTvp = ppool.takeOne(TaggedValuePointable.class); TaggedValuePointable tempValue = ppool.takeOne(TaggedValuePointable.class); UTF8StringPointable tempKey = ppool.takeOne(UTF8StringPointable.class); try { abvs.reset(); ob.reset(abvs); tvps.clear(); TaggedValuePointable arg = args[0]; <START> if (arg.getTag() == ValueTag.SEQUENCE_TAG) { <END> arg.getValue(sp); for (int i = 0; i < sp.getEntryCount(); ++i) { op = (ObjectPointable) ObjectPointable.FACTORY.createPointable(); sp.getEntry(i, tempTvp); tempTvp.getValue(op); op.getKeys(tempTvp); if (tempTvp.getTag() == ValueTag.XS_STRING_TAG) { addPair(tempTvp, tempKey, tempValue); } else if (tempTvp.getTag() == ValueTag.SEQUENCE_TAG) { tempTvp.getValue(sp1); for (int j = 0; j < sp1.getEntryCount(); ++j) { key = ppool.takeOne(TaggedValuePointable.class); sp1.getEntry(j, tempTvp); addPair(tempTvp, tempKey, tempValue); } } } } ob.finish(); result.set(abvs); } catch (IOException e) { throw new SystemException(ErrorCode.SYSE0001, e); } finally { ppool.giveBack(tempKey); ppool.giveBack(tempTvp); for (TaggedValuePointable pointable : tvps) { ppool.giveBack(pointable); } } }</code><technical_language>if get a sequence? Is {| a: z |}</technical_language>

Target:
protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException { TaggedValuePointable arg = args[0]; if (!(arg.getTag() == ValueTag.SEQUENCE_TAG || arg.getTag() == ValueTag.OBJECT_TAG)) { throw new SystemException(ErrorCode.FORG0006); } TaggedValuePointable tempTvp = ppool.takeOne(TaggedValuePointable.class); TaggedValuePointable tempValue = ppool.takeOne(TaggedValuePointable.class); try { abvs.reset(); ob.reset(abvs); tvps.clear(); if (arg.getTag() == ValueTag.SEQUENCE_TAG) { arg.getValue(sp); for (int i = 0; i < sp.getEntryCount(); ++i) { op = (ObjectPointable) ObjectPointable.FACTORY.createPointable(); sp.getEntry(i, tempTvp); tempTvp.getValue(op); op.getKeys(tempTvp); addPairs(tempTvp, tempValue); } } else { op = (ObjectPointable) ObjectPointable.FACTORY.createPointable(); arg.getValue(op); addPairs(tempTvp, tempValue); } ob.finish(); result.set(abvs); } catch (IOException e) { throw new SystemException(ErrorCode.SYSE0001, e); } finally { ppool.giveBack(tempTvp); for (TaggedValuePointable pointable : tvps) { ppool.giveBack(pointable); } } }
Source:
<code>public void unbindConsumers(String inputName) { List<Binding<?>> bindings = this.consumerBindings.remove(inputName); if (bindings != null && !CollectionUtils.isEmpty(bindings)) { for (Binding<?> binding : bindings) { binding.unbind(); } } else if (log.isWarnEnabled()) { <START> log.warn("Trying to unbind channel '" + inputName <END> + "', but no binding found."); } }</code><technical_language>replace "channel" "target" in this message</technical_language>

Target:
public void unbindConsumers(String inputName) { List<Binding<?>> bindings = this.consumerBindings.remove(inputName); if (bindings != null && !CollectionUtils.isEmpty(bindings)) { for (Binding<?> binding : bindings) { binding.unbind(); } } else if (log.isWarnEnabled()) { log.warn("Trying to unbind '" + inputName + "', but no binding found."); } }
Source:
<code>} catch (Exception exception) { <START> throw new ExceptionInInitializerError(new IOException("Error parsing id_rsa", exception)); <END> }</code><technical_language>Confusing error message, id_rsa exist</technical_language>

Target:
} catch (Exception exception) { throw new ExceptionInInitializerError(new IOException("Error parsing net.xml.", exception)); }
Source:
<code>public void handleLifecycleEvent(SaveablesLifecycleEvent event) { if (currentPart == null || event.getEventType() != SaveablesLifecycleEvent.DIRTY_CHANGED) { return; } <START> if (!isDirtyStateSupported()) { <END> return; } Saveable[] saveables = event.getSaveables(); for (Saveable saveable : saveables) { if (new DefaultSaveable(PropertySheet.this).equals(saveable)) { return; } } if (event.getSource() instanceof SaveablesList) { SaveablesList saveablesList = (SaveablesList) event.getSource(); for (Saveable saveable : saveables) { IWorkbenchPart[] parts = saveablesList.getPartsForSaveable(saveable); for (IWorkbenchPart part : parts) { if (PropertySheet.this.currentPart == part) { firePropertyChange(IWorkbenchPartConstants.PROP_DIRTY); return; } } } } }</code><technical_language>Is a special reason for combining this another if statement</technical_language>

Target:
public void handleLifecycleEvent(SaveablesLifecycleEvent event) { if (currentPart == null || event.getEventType() != SaveablesLifecycleEvent.DIRTY_CHANGED || !isDirtyStateSupported()) { return; } Saveable[] saveables = event.getSaveables(); if (saveables == null) { return; } for (Saveable saveable : saveables) { if (new DefaultSaveable(PropertySheet.this).equals(saveable)) { return; } } if (event.getSource() instanceof SaveablesList) { SaveablesList saveablesList = (SaveablesList) event.getSource(); for (Saveable saveable : saveables) { IWorkbenchPart[] parts = saveablesList.getPartsForSaveable(saveable); for (IWorkbenchPart part : parts) { if (PropertySheet.this.currentPart == part) { firePropertyChange(IWorkbenchPartConstants.PROP_DIRTY); return; } } } } }
Source:
<code>private void handleKeyAlreadyExistsException( long commitTs, KeyAlreadyExistsException ex, LockToken commitLocksToken) { try { if (wasCommitSuccessful(commitTs)) { return; } Set<LockToken> expiredLocks = refreshCommitAndImmutableTsLocks(commitLocksToken); if (!expiredLocks.isEmpty()) { transactionOutcomeMetrics.markLocksExpired(); throw new TransactionLockTimeoutException("Our commit was already rolled back at commit time" + " because our locks timed out. startTs: " + getStartTimestamp() + ". " + getExpiredLocksErrorString(commitLocksToken, expiredLocks), ex); } else { log.info("This transaction has been rolled back by someone else.", <START> SafeArg.of("immutableTimestampLock", immutableTimestampLock), <END> SafeArg.of("commitLocksToken", commitLocksToken)); } } catch (TransactionFailedException e1) { throw e1; } catch (Exception e1) { log.error("Failed to determine if we can retry this transaction. startTs: {}", SafeArg.of("startTs", getStartTimestamp()), e1); } String msg = "Our commit was already rolled back at commit time." + " Locking should prevent this from happening, but our locks may have timed out." + " startTs: " + getStartTimestamp(); throw new TransactionCommitFailedException(msg, ex); }</code><technical_language>This break logging again: LeasedLockToken is loggable logging infra. get rid of args in this logline figure out collect stuff need in a loggable</technical_language>

Target:
private void handleKeyAlreadyExistsException( long commitTs, KeyAlreadyExistsException ex, LockToken commitLocksToken) { try { if (wasCommitSuccessful(commitTs)) { return; } Set<LockToken> expiredLocks = refreshCommitAndImmutableTsLocks(commitLocksToken); if (!expiredLocks.isEmpty()) { transactionOutcomeMetrics.markLocksExpired(); throw new TransactionLockTimeoutException("Our commit was already rolled back at commit time" + " because our locks timed out. startTs: " + getStartTimestamp() + ". " + getExpiredLocksErrorString(commitLocksToken, expiredLocks), ex); } else { log.info("This transaction has been rolled back by someone else, even though we believe we still hold " + "the locks. This is not expected to occur frequently.", immutableTimestampLock .map(token -> token.toSafeArg("immutableTimestampLock")) .orElseGet(() -> SafeArg.of("immutableTimestampLock", null)), commitLocksToken.toSafeArg("commitLocksToken")); } } catch (TransactionFailedException e1) { throw e1; } catch (Exception e1) { log.error("Failed to determine if we can retry this transaction. startTs: {}", SafeArg.of("startTs", getStartTimestamp()), e1); } String msg = "Our commit was already rolled back at commit time." + " Locking should prevent this from happening, but our locks may have timed out." + " startTs: " + getStartTimestamp(); throw new TransactionCommitFailedException(msg, ex); }
Source:
<code>ImageEditorPanel(MainFrame mainFrame, BufferedImage image, String name) { this.image = image; this.name = name; setTransferHandler(new ImageTransferHandler(mainFrame)); <START> checkImage(); <END> setOpaque(false); setLayout(new BorderLayout()); loadSupport(); buildImageViewer(); buildStatusPanel(); }</code><technical_language>viewer is initialized here. NPE occurred open file</technical_language>

Target:
ImageEditorPanel(MainFrame mainFrame, BufferedImage image, String name) { this.image = image; this.name = name; setTransferHandler(new ImageTransferHandler(mainFrame)); setOpaque(false); setLayout(new BorderLayout()); loadSupport(); buildImageViewer(); buildStatusPanel(); checkImage(); }
Source:
<code>@Test public void unprocessedRequest() throws Exception { MOCK_RESPONSE.set(SUCCESS_RESPONSE); AtomicReference<RequestLog> log = new AtomicReference<>(); http = new HttpCall.Factory(new HttpClientBuilder(server.httpUri("/")) .decorator((client, ctx, req) -> { throw new UnprocessedRequestException("Could not process request.", new EndpointGroupException("No endpoints")); }) .build()); assertThatThrownBy(() -> http.newCall(REQUEST, BodyConverters.NULL, "test").execute()) .isInstanceOf(RejectedExecutionException.class) <START> .hasMessageContaining("No endpoints"); <END> }</code><technical_language>do equals show potentially horrible messages :P</technical_language>

Target:
@Test public void unprocessedRequest() throws Exception { MOCK_RESPONSE.set(SUCCESS_RESPONSE); AtomicReference<RequestLog> log = new AtomicReference<>(); http = new HttpCall.Factory(new HttpClientBuilder(server.httpUri("/")) .decorator((client, ctx, req) -> { throw new UnprocessedRequestException("Could not process request.", new EndpointGroupException("No endpoints")); }) .build()); assertThatThrownBy(() -> http.newCall(REQUEST, BodyConverters.NULL, "test").execute()) .isInstanceOf(RejectedExecutionException.class) .hasMessage("Rejected execution: No endpoints"); }
Source:
<code>public static ShellLogHandler getLogHandler(Map<String, Object> topoConf) { if (topoConf == null) { throw new IllegalArgumentException("Config is required"); } if (topoConf.containsKey(Config.TOPOLOGY_MULTILANG_LOG_HANDLER)) { try { return (ShellLogHandler) Class.forName(topoConf.get(Config.TOPOLOGY_MULTILANG_LOG_HANDLER).toString()).newInstance(); } catch (ClassCastException | InstantiationException | IllegalAccessException | ClassNotFoundException e) { <START> LOG.warn(e.toString()); <END> } } return new DefaultShellLogHandler(); }</code><technical_language>throw exception (propagation wrapping RuntimeException) worker crash instead of leaving warning message. This is easy missed, a principle of Storm: fail-fast</technical_language>

Target:
public static ShellLogHandler getLogHandler(Map<String, Object> topoConf) { if (topoConf == null) { throw new IllegalArgumentException("Config is required"); } String logHandlerClassName = null; if (topoConf.containsKey(Config.TOPOLOGY_MULTILANG_LOG_HANDLER)) { try { logHandlerClassName = topoConf.get(Config.TOPOLOGY_MULTILANG_LOG_HANDLER).toString(); return (ShellLogHandler) Class.forName(logHandlerClassName).newInstance(); } catch (ClassCastException | InstantiationException | IllegalAccessException | ClassNotFoundException e) { throw new RuntimeException("Error loading ShellLogHandler " + logHandlerClassName, e); } } return new DefaultShellLogHandler(); }
Source:
<code>private void verifyFeedbackIsReportedToService() { AuthHeader authHeader = AuthHeader.valueOf("Bearer omitted"); SettableRefreshable<AtlasDbRuntimeConfig> refreshableRuntimeConfig = Refreshable.create(mockAtlasDbRuntimeConfig); Refreshable<List<TimeLockClientFeedbackService>> timeLockClientFeedbackServices = TransactionManagers.getTimeLockClientFeedbackServices( config, refreshableRuntimeConfig, USER_AGENT, DialogueClients.create(Refreshable.only(ServicesConfigBlock.builder().build())) <START> .withBlockingExecutor(PTExecutors.newCachedThreadPool("atlas-dialogue-blocking"))); <END> ConjureTimeLockClientFeedback feedbackReport = ConjureTimeLockClientFeedback .builder() .atlasVersion("1.0") .serviceName("service") .nodeId(UUID.randomUUID()) .build(); assertThat(timeLockClientFeedbackServices.current().size()).isEqualTo(1); timeLockClientFeedbackServices.current().get(0).reportFeedback(authHeader, feedbackReport); List<LoggedRequest> requests = findAll(postRequestedFor(urlMatching(FEEDBACK_PATH))); assertThat(requests.size()).isEqualTo(1); availableServer.verify(postRequestedFor(urlMatching(FEEDBACK_PATH)) .withHeader("Authorization", WireMock.containing("Bearer omitted"))); timeLockRuntimeConfig = getTimelockRuntimeConfig(ImmutableList.of()); mockAtlasDbRuntimeConfig = mock(AtlasDbRuntimeConfig.class); when(mockAtlasDbRuntimeConfig.timelockRuntime()).thenReturn(Optional.of(timeLockRuntimeConfig)); refreshableRuntimeConfig.update(mockAtlasDbRuntimeConfig); assertThat(timeLockClientFeedbackServices.current().size()).isEqualTo(0); }</code><technical_language>default cached executor is fine here, matter way</technical_language>

Target:
private void verifyFeedbackIsReportedToService() { AuthHeader authHeader = AuthHeader.valueOf("Bearer omitted"); SettableRefreshable<AtlasDbRuntimeConfig> refreshableRuntimeConfig = Refreshable.create(mockAtlasDbRuntimeConfig); Refreshable<List<TimeLockClientFeedbackService>> timeLockClientFeedbackServices = TransactionManagers.getTimeLockClientFeedbackServices( config, refreshableRuntimeConfig, USER_AGENT, DialogueClients.create(Refreshable.only(ServicesConfigBlock.builder().build()))); ConjureTimeLockClientFeedback feedbackReport = ConjureTimeLockClientFeedback .builder() .atlasVersion("1.0") .serviceName("service") .nodeId(UUID.randomUUID()) .build(); assertThat(timeLockClientFeedbackServices.current().size()).isEqualTo(1); timeLockClientFeedbackServices.current().get(0).reportFeedback(authHeader, feedbackReport); List<LoggedRequest> requests = findAll(postRequestedFor(urlMatching(FEEDBACK_PATH))); assertThat(requests.size()).isEqualTo(1); availableServer.verify(postRequestedFor(urlMatching(FEEDBACK_PATH)) .withHeader("Authorization", WireMock.containing("Bearer omitted"))); timeLockRuntimeConfig = getTimelockRuntimeConfig(ImmutableList.of()); mockAtlasDbRuntimeConfig = mock(AtlasDbRuntimeConfig.class); when(mockAtlasDbRuntimeConfig.timelockRuntime()).thenReturn(Optional.of(timeLockRuntimeConfig)); refreshableRuntimeConfig.update(mockAtlasDbRuntimeConfig); assertThat(timeLockClientFeedbackServices.current().size()).isEqualTo(0); }
Source:
<code>public void shutdown() { Awaitility.await().atMost(30, TimeUnit.SECONDS).pollInterval(3, TimeUnit.SECONDS).until(new Callable<Boolean>() { @Override public Boolean call() throws Exception { try { <START> Unirest.post(String.format("http://%s:4242/cluster/shutdown", crateMesosFrameworkHostIp)).asJson(); <END> } catch (UnirestException e) { } return 0 == crateNodesCount(); } }); }</code><technical_language>API port a static field</technical_language>

Target:
public void shutdown() { Awaitility.await().atMost(WAIT_TIMEOUT_SECONDS, TimeUnit.SECONDS) .pollInterval(3, TimeUnit.SECONDS).until(new Callable<Boolean>() { @Override public Boolean call() throws Exception { try { Unirest.post( String.format("http://%s:%d/cluster/shutdown", crateMesosFrameworkHostIp, API_PORT) ).asJson(); } catch (UnirestException e) { } return 0 == crateNodesCount(); } }); }
Source:
<code><START> public void getOwnedTicketsAndFromTeamMembersNull() { <END> thrown.expect(UserNotFoundException.class); thrown.expectMessage("could not find user 'null'."); ticketService.getOwnedTicketsAndFromTeamMembers(null); }</code><technical_language>This is a test for userRepository in opinion here</technical_language>

Target:
public void getOwnedTicketsAndFromTeamMembersNull() { thrown.expect(IllegalArgumentException.class); ticketService.getOwnedTicketsAndFromTeamMembers(null); }
Source:
<code>public void before() { writer = new StringWriter(); delegate = new HtmlDocumentBuilder(writer); delegate.setEmitAsDocument(false); builder = new HtmlSubsetDocumentBuilder(delegate); builder.setSupportedBlockTypes(Sets.newHashSet(BlockType.PARAGRAPH)); builder.setSupportedSpanTypes(Sets.newHashSet(SpanType.BOLD), Collections.<SpanHtmlElementStrategy> emptyList(), <START> ImmutableMap.<SpanType, String> of()); <END> builder.setSupportedHeadingLevel(3); builder.beginDocument(); }</code><technical_language>changes unnecessary if builder a separate method for setting span substitutions</technical_language>

Target:
public void before() { writer = new StringWriter(); delegate = new HtmlDocumentBuilder(writer); delegate.setEmitAsDocument(false); builder = new HtmlSubsetDocumentBuilder(delegate); builder.setSupportedBlockTypes(Sets.newHashSet(BlockType.PARAGRAPH)); builder.setSupportedSpanTypes(Sets.newHashSet(SpanType.BOLD), Collections.<SpanHtmlElementStrategy> emptyList()); builder.setSupportedHeadingLevel(3); builder.beginDocument(); }
Source:
<code>private void renderChunksOpaque() { PerformanceMonitor.startActivity("Render Chunks (Opaque)"); <START> renderChunk(renderQueues.chunksOpaque, ChunkMesh.RenderPhase.OPAQUE, playerCamera, ChunkRenderMode.DEFAULT); <END> PerformanceMonitor.endActivity(); }</code><technical_language>I this simplification: good idea. However, semantic of method name is longer correct. method deals chunkS renamed renderChunks</technical_language>

Target:
private void renderChunksOpaque() { PerformanceMonitor.startActivity("Render Chunks (Opaque)"); renderChunks(renderQueues.chunksOpaque, ChunkMesh.RenderPhase.OPAQUE, playerCamera, ChunkRenderMode.DEFAULT); PerformanceMonitor.endActivity(); }
Source:
<code><START> void setKey(Input newInput, char newKeyChar) { <END> this.input = newInput; this.keyChar = newKeyChar; }</code><technical_language>This is technically API violation, I find usages. IDE recommendation? I is needed swap remain in compliance (to clarify surrounding diff this preview confused)</technical_language>

Target:
protected void setKey(Input newInput, char newKeyChar) { this.input = newInput; this.keyChar = newKeyChar; }
Source:
<code>public ItemStack onItemUseFinish(ItemStack stack, World world, LivingEntity player) { if(player instanceof PlayerEntity && !player.world.isRemote) { Random ran = new Random(); ItemStack[] items = new ItemStack[]{new ItemStack(Items.MELON_SLICE), new ItemStack(Items.STICK), new ItemStack(Items.EGG), new ItemStack(Blocks.DIRT), new ItemStack(Blocks.PUMPKIN), new ItemStack(Blocks.COBBLESTONE)}; int num = ran.nextInt(items.length); <START> ((PlayerEntity) player).inventory.addItemStackToInventory(items[num].copy()); <END> ITextComponent message = new TranslationTextComponent(getTranslationKey() + ".message", items[num].getDisplayName()); message.getStyle().setColor(TextFormatting.GOLD); player.sendMessage(message); } return super.onItemUseFinish(stack, world, player); }</code><technical_language>This function returns false if players inventory is full. do related that. (See obsidian bucket for example)</technical_language>

Target:
public ItemStack onItemUseFinish(ItemStack stack, World world, LivingEntity player) { if(player instanceof PlayerEntity && !player.world.isRemote) { Random ran = new Random(); ItemStack[] items = new ItemStack[]{new ItemStack(Items.MELON_SLICE), new ItemStack(Items.STICK), new ItemStack(Items.EGG), new ItemStack(Blocks.DIRT), new ItemStack(Blocks.PUMPKIN), new ItemStack(Blocks.COBBLESTONE)}; int num = ran.nextInt(items.length); if(!((PlayerEntity) player).inventory.addItemStackToInventory(items[num].copy())) if(!world.isRemote) ((PlayerEntity) player).dropItem(items[num].copy(), false); ITextComponent message = new TranslationTextComponent(getTranslationKey() + ".message", items[num].getDisplayName()); message.getStyle().setColor(TextFormatting.GOLD); player.sendMessage(message); } return super.onItemUseFinish(stack, world, player); }
Source:
<code>public void onInstanceConfigChange(List<InstanceConfig> instanceConfigs, NotificationContext context) { <START> _instanceConfigs = instanceConfigs; <END> }</code><technical_language>_instanceConfigs = HelixHelper.getInstanceConfigs(_helixManager);</technical_language>

Target:
public synchronized void onInstanceConfigChange(List<InstanceConfig> instanceConfigs, NotificationContext context) { if (context.getType() == NotificationContext.Type.INIT) { _listenerInitiated = true; } if(_lastEventTimestamp > context.getCreationTime()) { LOGGER.warn("RECEIVED OUT OF ORDER EVENT"); } if (_lastEventTimestamp <= context.getCreationTime()) { _instanceConfigs = instanceConfigs; _lastEventTimestamp = context.getCreationTime(); } }
Source:
<code>private GraphQLObjectType buildConnectionObject(Class<?> entityClass) { if (connectionObjectRegistry.containsKey(entityClass)) { return connectionObjectRegistry.get(entityClass); } String relationName = dictionary.getJsonAliasFor(entityClass); GraphQLObjectType connectionObject = newObject() <START> .name(relationName) <END> .field(newFieldDefinition() .name("edges") .dataFetcher(dataFetcher) .type(buildEdgesObject(relationName, buildQueryObject(entityClass)))) .field(newFieldDefinition() .name("pageInfo") .dataFetcher(dataFetcher) .type(pageInfoObject)) .build(); connectionObjectRegistry.put(entityClass, connectionObject); return connectionObject; }</code><technical_language>I this needs unique</technical_language>

Target:
private GraphQLObjectType buildConnectionObject(Class<?> entityClass) { if (connectionObjectRegistry.containsKey(entityClass)) { return connectionObjectRegistry.get(entityClass); } String entityName = dictionary.getJsonAliasFor(entityClass); GraphQLObjectType connectionObject = newObject() .name(entityName) .field(newFieldDefinition() .name("edges") .dataFetcher(dataFetcher) .type(buildEdgesObject(entityName, buildQueryObject(entityClass)))) .field(newFieldDefinition() .name("pageInfo") .dataFetcher(dataFetcher) .type(pageInfoObject)) .build(); connectionObjectRegistry.put(entityClass, connectionObject); return connectionObject; }
Source:
<code>public <T> T data(Class<T> type) { ArgChecker.notNull(type, "type"); Object result = additionalData.get(type); if (result == null) { throw new IllegalArgumentException("Unknown type: " + type.getName()); } <START> return type.cast(result); <END> }</code><technical_language>happy a ClassCastException check type cast throw IllegalArgumentException</technical_language>

Target:
public <T> T data(Class<T> type) { ArgChecker.notNull(type, "type"); @SuppressWarnings("unchecked") T result = (T) additionalData.get(type); if (result == null) { throw new IllegalArgumentException("Unknown type: " + type.getName()); } return result; }
Source:
<code>public String verse(int verseNumber) { <START> return constructVerse(verseNumber); <END> }</code><technical_language>reason inline constructVerse() here</technical_language>

Target:
public String verse(int verseNumber) { StringBuilder stringBuilder = new StringBuilder("On the " + days[verseNumber - 1] + " day of Christmas my true love gave to me, "); for (int i = verseNumber; i > 0; i--) { if (verseNumber != 1 && i == 1) stringBuilder.append("and "); stringBuilder.append(gifts[i - 1]); } stringBuilder.append("\n"); return stringBuilder.toString(); }
Source:
<code>private boolean arrayMatched(JSONArray value) { if (value.isEmpty() && "[]".equals(getExpectedValue())) { return true; } <START> boolean foundMatch = Arrays.stream(value.toArray()) <END> .anyMatch(subj -> (subj == null && isExpectNull()) || isEquals(subj)); return foundMatch || isEquals(value); }</code><technical_language>this change incur a performance penalty load testing phase</technical_language>

Target:
private boolean arrayMatched(JSONArray value) { if (value.isEmpty() && "[]".equals(getExpectedValue())) { return true; } for (Object subj : value.toArray()) { if ((subj == null && isExpectNull()) || isEquals(subj)) { return true; } } return isEquals(value); }
Source:
<code>public void csvWithNoFieldsShouldReturnNull() { DefaultCSVMetaDataBuilder builder = new DefaultCSVMetaDataBuilder(); CSVMetaDataModel model = builder.setDelimiter(",").build(); <START> Assert.assertThat(model, CoreMatchers.nullValue()); <END> }</code><technical_language>static import</technical_language>

Target:
public void csvWithNoFieldsShouldReturnNull() { DefaultCSVMetaDataBuilder builder = new DefaultCSVMetaDataBuilder(); CSVMetaDataModel model = builder.setDelimiter(COMMA_DELIMITER).build(); assertThat(model, nullValue()); }
Source:
<code>public void execute(SensorContext context) { <START> System.out.println("EXECUTE DA SENSOR"); <END> javaResourceLocator.setSensorContext(context); sonarComponents.setSensorContext(context); sonarComponents.registerCheckClasses(CheckList.REPOSITORY_KEY, CheckList.getJavaChecks()); sonarComponents.registerTestCheckClasses(CheckList.REPOSITORY_KEY, CheckList.getJavaTestChecks()); JavaConfiguration configuration = createConfiguration(); Measurer measurer = new Measurer(fs, context, noSonarFilter); JavaSquid squid = new JavaSquid(configuration, sonarComponents, measurer, javaResourceLocator, postAnalysisIssueFilter, sonarComponents.checkClasses()); squid.scan(getSourceFiles(), getTestFiles()); }</code><technical_language>![MAJOR](<LINK_1> Replace this usage of System.out System.err a logger. [![rule](<LINK_2>](<LINK_0></technical_language>

Target:
public void execute(SensorContext context) { System.out.println("EXECUTE DA SENSOR"); System.out.println("EXECUTE DA SENSOR, FOR REAL"); javaResourceLocator.setSensorContext(context); sonarComponents.setSensorContext(context); sonarComponents.registerCheckClasses(CheckList.REPOSITORY_KEY, CheckList.getJavaChecks()); sonarComponents.registerTestCheckClasses(CheckList.REPOSITORY_KEY, CheckList.getJavaTestChecks()); JavaConfiguration configuration = createConfiguration(); Measurer measurer = new Measurer(fs, context, noSonarFilter); JavaSquid squid = new JavaSquid(configuration, sonarComponents, measurer, javaResourceLocator, postAnalysisIssueFilter, sonarComponents.checkClasses()); squid.scan(getSourceFiles(), getTestFiles()); }