auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected List<Location> findSubLocations(Location loc) { if (!loc.hasExtension(AvailabilityZoneExtension.class)) { throw new IllegalStateException("Availability zone extension not supported for location " + loc); } AvailabilityZoneExtension zoneExtension = loc.getExtension(AvailabilityZoneExtension.class); Collection<String> zoneNames = getConfig(AVAILABILITY_ZONE_NAMES); Integer numZones = getConfig(NUM_AVAILABILITY_ZONES); List<Location> subLocations; if (zoneNames == null || zoneNames.isEmpty()) { subLocations = zoneExtension.getSubLocations(numZones); <START> if (numZones != null) { <END> checkArgument(numZones > 0, "numZones must be greater than zero: %s", numZones); if (numZones > subLocations.size()) { throw new IllegalStateException("Number of required zones (" + numZones + ") not satisfied in " + loc + "; only " + subLocations.size() + " available: " + subLocations); } } } else { subLocations = zoneExtension.getSubLocationsByName(StringPredicates.equalToAny(zoneNames), zoneNames.size()); if (zoneNames.size() > subLocations.size()) { throw new IllegalStateException("Number of required zones (" + zoneNames.size() + " - " + zoneNames + ") not satisfied in " + loc + "; only " + subLocations.size() + " available: " + subLocations); } } return subLocations; }</code><technical_language>zones if user explicitly set a number (now config default val is changed 3 null)? AWS, more zones is wanted. this is advanced feature fine expect power-users zones. overall, yes: I agree change. add a log.info message though, zones chosen (and why)</technical_language>

Target:
protected List<Location> findSubLocations(Location loc) { if (!loc.hasExtension(AvailabilityZoneExtension.class)) { throw new IllegalStateException("Availability zone extension not supported for location " + loc); } AvailabilityZoneExtension zoneExtension = loc.getExtension(AvailabilityZoneExtension.class); Collection<String> zoneNames = getConfig(AVAILABILITY_ZONE_NAMES); Integer numZones = getConfig(NUM_AVAILABILITY_ZONES); List<Location> subLocations; if (zoneNames == null || zoneNames.isEmpty()) { if (numZones != null) { subLocations = zoneExtension.getSubLocations(numZones); checkArgument(numZones > 0, "numZones must be greater than zero: %s", numZones); if (numZones > subLocations.size()) { throw new IllegalStateException("Number of required zones (" + numZones + ") not satisfied in " + loc + "; only " + subLocations.size() + " available: " + subLocations); } } else { subLocations = zoneExtension.getAllSubLocations(); } } else { subLocations = zoneExtension.getSubLocationsByName(StringPredicates.equalToAny(zoneNames), zoneNames.size()); if (zoneNames.size() > subLocations.size()) { throw new IllegalStateException("Number of required zones (" + zoneNames.size() + " - " + zoneNames + ") not satisfied in " + loc + "; only " + subLocations.size() + " available: " + subLocations); } } LOG.info("Returning sub-locations: {}", subLocations.size(), Iterables.toString(subLocations)); return subLocations; }
Source:
<code>private void handleKey(Map<CollectionAndKey, Tree> keys, CollectionAndKey collectionAndKey) { if (keys.containsKey(collectionAndKey)) { Tree previousTree = keys.get(collectionAndKey); <START> String indexOrKey = collectionAndKey.keyTree.parent().is(Tree.Kind.ARRAY_DIMENSION) ? "index" : "key"; <END> reportIssue(collectionAndKey.keyTree, String.format("Verify this is the %s that was intended; a value has already been saved for it on line %d.", indexOrKey, previousTree.firstToken().line()), ImmutableList.of(new JavaFileScannerContext.Location("Original value", previousTree)), null); } else { keys.put(collectionAndKey, collectionAndKey.keyTree); } }</code><technical_language>I encode type of collection Object, put a method there, precompute creating object</technical_language>

Target:
private void handleKey(Map<CollectionAndKey, Tree> keys, CollectionAndKey collectionAndKey) { if (keys.containsKey(collectionAndKey)) { Tree previousTree = keys.get(collectionAndKey); String indexOrKey = collectionAndKey.isArray ? "index" : "key"; reportIssue(collectionAndKey.keyTree, String.format("Verify this is the %s that was intended; a value has already been saved for it on line %d.", indexOrKey, previousTree.firstToken().line()), ImmutableList.of(new JavaFileScannerContext.Location("Original value", previousTree)), null); } else { keys.put(collectionAndKey, collectionAndKey.keyTree); } }
Source:
<code>private void writeReflog(List<ReceiveCommand> commands) { if <START> (getRefLogMessage() == null && !isRefLogIncludingResult()) { <END> return; } ReflogWriter w = refdb.getLogWriter(); for (ReceiveCommand cmd : commands) { if (cmd.getResult() != ReceiveCommand.Result.OK) { continue; } String name = cmd.getRefName(); if (cmd.getType() == ReceiveCommand.Type.DELETE) { try { RefDirectory.delete(w.logFor(name), RefDirectory.levelsIn(name)); } catch (IOException e) { } continue; } String msg = getRefLogMessage(); if (isRefLogIncludingResult()) { String strResult = toResultString(cmd); if (strResult != null) { msg = msg.isEmpty() ? strResult : msg + ": " + strResult; } } PersonIdent ident = getRefLogIdent(); if (ident == null) { ident = new PersonIdent(refdb.getRepository()); } try { w.log(name, cmd.getOldId(), cmd.getNewId(), ident, msg); } catch (IOException e) { } } }</code><technical_language>isRefLogDisabled()</technical_language>

Target:
private void writeReflog(List<ReceiveCommand> commands) { if (isRefLogDisabled()) { return; } PersonIdent ident = getRefLogIdent(); if (ident == null) { ident = new PersonIdent(refdb.getRepository()); } ReflogWriter w = refdb.getLogWriter(); for (ReceiveCommand cmd : commands) { if (cmd.getResult() != ReceiveCommand.Result.OK) { continue; } String name = cmd.getRefName(); if (cmd.getType() == ReceiveCommand.Type.DELETE) { try { RefDirectory.delete(w.logFor(name), RefDirectory.levelsIn(name)); } catch (IOException e) { } continue; } String msg = getRefLogMessage(); if (isRefLogIncludingResult()) { String strResult = toResultString(cmd); if (strResult != null) { msg = msg.isEmpty() ? strResult : msg + ": " + strResult; } } try { w.log(name, cmd.getOldId(), cmd.getNewId(), ident, msg); } catch (IOException e) { } } }
Source:
<code>protected void refreshVisuals() { boolean stack = ((MultiplicityElement) getUMLElement()).getUpper() > 1; getPrimaryShape().setStack(stack); getPrimaryShape().setLayerNumber(1); getPrimaryShape().setXOffSet(2); <START> getPrimaryShape().setYOffSet(-2); <END> super.refreshVisuals(); }</code><technical_language>constant for values this</technical_language>

Target:
protected void refreshVisuals() { boolean stack = ((MultiplicityElement) getUMLElement()).getUpper() > 1; getPrimaryShape().setStack(stack); getPrimaryShape().setLayerNumber(LAYER_NUMBER); getPrimaryShape().setXOffSet(X_OFFSET); getPrimaryShape().setYOffSet(Y_OFFSET); getPrimaryShape().setLayerOpacity(LAYER_OPACITY); super.refreshVisuals(); }
Source:
<code>public void poll() { <START> if (!context.getRweSmarthomeSession().isValid()) <END> return; try { rweSmarthomeSession.getNotifications(); lastEventTime = System.currentTimeMillis(); } catch (LogoutNotificationException e) { logger.info("Session expired!" + e.getMessage()); stop(); start(); } catch (RWESmarthomeSessionExpiredException e) { logger.warn("Session expired!" + e.getMessage()); try { rweSmarthomeSession.logon(context.getConfig().getUsername(), context.getConfig().getPassword(), context.getConfig().getHost()); } catch (LoginFailedException e1) { logger.error("Error loging in: " + e1.getMessage()); } catch (SHTechnicalException e1) { logger.error("Error loging in: " + e1.getMessage()); } logger.info("Login successful."); } catch (ConfigurationChangedException e) { logger.warn("Need to restart RWE Smarthome communicator: " + e.getMessage()); stop(); start(); } }</code><technical_language>curly braces</technical_language>

Target:
public void poll() { if(!runPoller) { return; } if (!context.getRweSmarthomeSession().isValid()) { logger.debug("Invalid session, getNotifications aborted."); return; } try { getNotifications(); lastEventTime = System.currentTimeMillis(); } catch (LogoutNotificationException e) { logger.info("Session expired!" + e.getMessage()); stop(); start(); } catch (RWESmarthomeSessionExpiredException e) { logger.info("Session expired!" + e.getMessage()); try { rweSmarthomeSession.logon(context.getConfig().getUsername(), context.getConfig().getPassword(), context.getConfig().getHost()); } catch (LoginFailedException e1) { logger.error("Error logging in with user'" + context.getConfig().getUsername()+ "' to host '" + context.getConfig().getHost() + "': " + e1.getMessage()); } catch (SHTechnicalException e1) { logger.error("Error logging in with user'" + context.getConfig().getUsername()+ "' to host '" + context.getConfig().getHost() + "': " + e1.getMessage()); } logger.info("Login successful."); } catch (ConfigurationChangedException e) { logger.info("Need to restart RWE Smarthome communicator: " + e.getMessage()); stop(); start(); } }
Source:
<code><START> private static DataSet getIrisDataSet() { <END> DataSet irisDataSet = null; try { if (DataUtilities.downloadFile(remoteUrl, localPath)) log.debug("Data downloaded from {}", remoteUrl); BufferedReader reader = new BufferedReader( new FileReader(new File(localPath))); List<DataSet> data = new ArrayList<DataSet>(); data = reader.lines() .filter(l -> !l.trim().isEmpty()) .map(mapRowToDataSet) .collect(Collectors.toList()); if (reader != null) reader.close(); DataSetIterator iter = new IteratorDataSetIterator(data.iterator(), 150); irisDataSet = iter.next(); } catch (IOException e) { log.error("IO error", e); } return irisDataSet; }</code><technical_language>need download dataset</technical_language>

Target:
private static DataSet getIrisDataSet() { DataSet irisDataSet = null; try { File irisData = new ClassPathResource("iris.txt").getFile(); BufferedReader reader = new BufferedReader(new FileReader(irisData)); List<DataSet> data = reader.lines() .filter(l -> !l.trim().isEmpty()) .map(mapRowToDataSet) .collect(Collectors.toList()); if (reader != null) reader.close(); DataSetIterator iter = new IteratorDataSetIterator(data.iterator(), 150); irisDataSet = iter.next(); } catch (IOException e) { log.error("IO error", e); } return irisDataSet; }
Source:
<code>private boolean verifySignature(final String brokerPackageName) { try { final List<X509Certificate> certs = readCertDataForBrokerApp(brokerPackageName); if (certs.size() == 1) { return verifySignatureHash(certs.get(0)); } <START> final X509Certificate singingCert = getSignerCertAndVerifyCertificateChain(certs); <END> return verifySignatureHash(singingCert); } catch (NameNotFoundException e) { Logger.e(TAG, "Broker related package does not exist", "", ADALError.BROKER_PACKAGE_NAME_NOT_FOUND); } catch (NoSuchAlgorithmException e) { Logger.e(TAG, "Digest SHA algorithm does not exists", "", ADALError.DEVICE_NO_SUCH_ALGORITHM); } catch (final AuthenticationException | IOException | GeneralSecurityException e) { Logger.e(TAG, e.getMessage(), "", ADALError.BROKER_VERIFICATION_FAILED, e); } return false; }</code><technical_language>typo</technical_language>

Target:
private boolean verifySignature(final String brokerPackageName) { try { final List<X509Certificate> certs = readCertDataForBrokerApp(brokerPackageName); verifySignatureHash(certs); if (certs.size() > 1) { verifyCertificateChain(certs); } return true; } catch (NameNotFoundException e) { Logger.e(TAG, "Broker related package does not exist", "", ADALError.BROKER_PACKAGE_NAME_NOT_FOUND); } catch (NoSuchAlgorithmException e) { Logger.e(TAG, "Digest SHA algorithm does not exists", "", ADALError.DEVICE_NO_SUCH_ALGORITHM); } catch (final AuthenticationException | IOException | GeneralSecurityException e) { Logger.e(TAG, e.getMessage(), "", ADALError.BROKER_VERIFICATION_FAILED, e); } return false; }
Source:
<code>public void removeNoteInterpreterSettingBinding(String user, String noteId) throws IOException { List<String> settingIds = (interpreterBindings.containsKey(noteId) ? interpreterBindings.remove(noteId) : <START> Collections.<String>emptyList()); <END> for (String settingId : settingIds) { InterpreterSetting setting = get(settingId); if (setting != null) { this.removeInterpretersForNote(setting, user, noteId); } } saveToFile(); }</code><technical_language>This synchronize block is for protecting interpreterBindings, i need for synchronize block for interpreterBindings. However, this.removeInterpreterForNote() protected synchronize block. i code List<String> settingIds; synchronize (interpreterSettings) { settingIds = interpreterBindings.containsKey(...) ? interpreterBindings.remove(...) : ... } for (String settingId : settingIds) { ... this.removeInterpreterForNote(...); ... }</technical_language>

Target:
public void removeNoteInterpreterSettingBinding(String user, String noteId) throws IOException { List<String> settingIds = interpreterBindings.remove(noteId); if (settingIds != null) { for (String settingId : settingIds) { InterpreterSetting setting = get(settingId); if (setting != null) { this.removeInterpretersForNote(setting, user, noteId); } } } saveToFile(); }
Source:
<code>public String setGateWay(String deploymentUrl, String username, String authToken, String friend, String uName, String password, String proxy, boolean register, String ttl) { Client jerseyClient = Client.create(); jerseyClient.addFilter(new HTTPBasicAuthFilter(username, authToken)); String url = getGateWayUrl(deploymentUrl, username); WebResource webResource = jerseyClient.resource(url); MultivaluedMap<String, String> params = new MultivaluedMapImpl(); params.add("Register", String.valueOf(register)); if (friend != null) { params.add("FriendlyName", friend); } if (uName != null) { params.add("UserName", uName); } if (password != null) { params.add("Password", password); } if (proxy != null) { params.add("Proxy", proxy); } if (ttl != null) { params.add("TTL", ttl); } String response = null; try { <START> response = webResource.accept(MediaType.APPLICATION_XML).post(String.class, params); <END> } catch (Exception e) { logger.error("Exception : ", e); UniformInterfaceException exception = (UniformInterfaceException)e; } return response; }</code><technical_language>XML here, of testsuite is JSON response format ease parsing later..</technical_language>

Target:
public String setGateWay(String deploymentUrl, String username, String authToken, String friend, String uName, String password, String proxy, boolean register, String ttl) { Client jerseyClient = Client.create(); jerseyClient.addFilter(new HTTPBasicAuthFilter(username, authToken)); String url = getGateWayUrl(deploymentUrl, username); WebResource webResource = jerseyClient.resource(url); MultivaluedMap<String, String> params = new MultivaluedMapImpl(); params.add("Register", String.valueOf(register)); if (friend != null) { params.add("FriendlyName", friend); } if (uName != null) { params.add("UserName", uName); } if (password != null) { params.add("Password", password); } if (proxy != null) { params.add("Proxy", proxy); } if (ttl != null) { params.add("TTL", ttl); } String response = null; try { response = webResource.accept(MediaType.APPLICATION_JSON).post(String.class, params); } catch (Exception e) { logger.error("Exception : ", e); UniformInterfaceException exception = (UniformInterfaceException)e; } return response; }
Source:
<code>public void onFlushResults(Set<P> projections, Timestamp lastHandledEventTime) { projectionRepository.store(projections); <START> projectionRepository.projectionStorage().writeLastHandledEventTime(lastHandledEventTime); <END> }</code><technical_language>a method in ProjectionRepository parameters</technical_language>

Target:
public void onFlushResults(Set<P> projections, Timestamp lastHandledEventTime) { projectionRepository.store(projections); projectionRepository.projectionStorage() .writeLastHandledEventTime(lastHandledEventTime); projectionRepository.completeCatchUp(); }
Source:
<code><START> public String getNodesMBeanHistory(@HeaderParam("sessionid") String sessionId, <END> @QueryParam("nodejmxurl") Set<String> nodesJmxUrl, @QueryParam("objectname") String objectName, @QueryParam("attrs") List<String> attrs, @QueryParam("range") String range) throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException, NotConnectedException, MalformedObjectNameException, NullPointerException, MBeanException { RMProxyUserInterface rmProxy = checkAccess(sessionId); Map nodesMBeanHistoryMap = new HashMap<String, String>(); for (String nodeJmxUrl : nodesJmxUrl) { nodesMBeanHistoryMap.put(nodeJmxUrl, rmProxy.getNodeMBeanHistory(nodeJmxUrl, objectName, attrs, range)); } return nodesMBeanHistoryMap.toString(); }</code><technical_language>typing is aligned declaration in RMRestInterface interface. Please confirm OK</technical_language>

Target:
public Map<String, Map<String, Object>> getNodesMBeanHistory(@HeaderParam("sessionid") String sessionId, @QueryParam("nodejmxurl") Set<String> nodesJmxUrl, @QueryParam("objectname") String objectName, @QueryParam("attrs") List<String> attrs, @QueryParam("range") String range) throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException, NotConnectedException, MalformedObjectNameException, NullPointerException, MBeanException { RMProxyUserInterface rmProxy = checkAccess(sessionId); return nodesJmxUrl.stream().collect(Collectors.toMap(nodeJmxUrl -> nodeJmxUrl, nodeJmxUrl -> { try { return processHistoryResult(rmProxy.getNodeMBeanHistory(nodeJmxUrl, objectName, attrs, range), range); } catch (Exception e) { throw new RuntimeException(e); } })); }
Source:
<code>public void testExecutableAttributes() throws Exception { FS fs = FS.DETECTED; org.junit.Assume.assumeTrue(fs.getClass().equals(FS_POSIX_Java7.class)); File f = new File(trash, "bla"); assertTrue(f.createNewFile()); assertFalse(fs.canExecute(f)); String umask = readUmask(); <START> if (umask == null) { <END> return; } char others = umask.charAt(umask.length() - 1); boolean badUmask; if (others != '0' && others != '2' && others != '4' && others != '6') { badUmask = true; } else { badUmask = false; } Set<PosixFilePermission> permissions = readPermissions(f); assertTrue(!permissions.contains(PosixFilePermission.OTHERS_EXECUTE)); assertTrue(!permissions.contains(PosixFilePermission.GROUP_EXECUTE)); assertTrue(!permissions.contains(PosixFilePermission.OWNER_EXECUTE)); fs.setExecute(f, true); RepositoryTestCase.fsTick(f); permissions = readPermissions(f); assertTrue("'owner' execute permission not set", permissions.contains(PosixFilePermission.OWNER_EXECUTE)); assertTrue("'group' execute permission not set", permissions.contains(PosixFilePermission.GROUP_EXECUTE)); if (badUmask) { assertFalse("'others' execute permission set", permissions.contains(PosixFilePermission.OTHERS_EXECUTE)); fail("Unexpected umask during test execution: " + umask); } else { assertTrue("'others' execute permission not set", permissions.contains(PosixFilePermission.OTHERS_EXECUTE)); } }</code><technical_language>style nit: braces single line block</technical_language>

Target:
public void testExecutableAttributes() throws Exception { FS fs = FS.DETECTED; org.junit.Assume.assumeTrue(fs.getClass().equals(FS_POSIX_Java7.class)); File f = new File(trash, "bla"); assertTrue(f.createNewFile()); assertFalse(fs.canExecute(f)); String umask = readUmask(); if (umask == null) return; char others = umask.charAt(umask.length() - 1); boolean badUmask; if (others != '0' && others != '2' && others != '4' && others != '6') { badUmask = true; } else { badUmask = false; } Set<PosixFilePermission> permissions = readPermissions(f); assertTrue(!permissions.contains(PosixFilePermission.OTHERS_EXECUTE)); assertTrue(!permissions.contains(PosixFilePermission.GROUP_EXECUTE)); assertTrue(!permissions.contains(PosixFilePermission.OWNER_EXECUTE)); fs.setExecute(f, true); RepositoryTestCase.fsTick(f); permissions = readPermissions(f); assertTrue("'owner' execute permission not set", permissions.contains(PosixFilePermission.OWNER_EXECUTE)); assertTrue("'group' execute permission not set", permissions.contains(PosixFilePermission.GROUP_EXECUTE)); if (badUmask) { assertFalse("'others' execute permission set", permissions.contains(PosixFilePermission.OTHERS_EXECUTE)); fail("Unexpected umask during test execution: " + umask); } else { assertTrue("'others' execute permission not set", permissions.contains(PosixFilePermission.OTHERS_EXECUTE)); } }
Source:
<code>protected String makeNext() throws InterruptedException, ConsumerTimeoutException { FetchedDataChunk currentDataChunk = null; Iterator<MessageAndOffset> localCurrent = current.get(); if (localCurrent == null || !localCurrent.hasNext()) { if (consumerTimeoutMs < 0) { currentDataChunk = queue.take(); } else { currentDataChunk = queue.poll(consumerTimeoutMs, TimeUnit.MILLISECONDS); if (currentDataChunk == null) { state = State.NOT_READY; throw new ConsumerTimeoutException("consumer timeout in " + consumerTimeoutMs + " ms"); } } if (currentDataChunk == ConsumerConnector.SHUTDOWN_COMMAND) { logger.warn("Now closing the message stream"); queue.offer(currentDataChunk); state = State.DONE; return null; } else { currentTopicInfo = currentDataChunk.topicInfo; if (currentTopicInfo.getConsumedOffset() < currentDataChunk.fetchOffset) { logger.error("consumed offset: " + currentTopicInfo.getConsumedOffset() + " doesn't match fetch offset: " + currentDataChunk.fetchOffset + " for " + currentTopicInfo + ";\n Consumer may lose data"); currentTopicInfo.resetConsumeOffset(currentDataChunk.fetchOffset); } localCurrent = currentDataChunk.messages.getItertor(); current.set(localCurrent); } } <START> MessageAndOffset item = localCurrent.next(); <END> while (item.offset < currentTopicInfo.getConsumedOffset() && localCurrent.hasNext()) { item = localCurrent.next(); } consumedOffset = item.offset; return Util.toEvent(item.message); }</code><technical_language>chech hasNext()</technical_language>

Target:
protected String makeNext() throws InterruptedException, ConsumerTimeoutException { FetchedDataChunk currentDataChunk = null; if (current == null || !current.hasNext()) { if (consumerTimeoutMs < 0) { currentDataChunk = queue.take(); } else { currentDataChunk = queue.poll(consumerTimeoutMs, TimeUnit.MILLISECONDS); if (currentDataChunk == null) { state = State.NOT_READY; throw new ConsumerTimeoutException("consumer timeout in " + consumerTimeoutMs + " ms"); } } if (currentDataChunk == ConsumerConnector.SHUTDOWN_COMMAND) { logger.warn("Now closing the message stream"); queue.offer(currentDataChunk); state = State.DONE; return null; } else { currentTopicInfo = currentDataChunk.topicInfo; if (currentTopicInfo.getConsumedOffset() < currentDataChunk.fetchOffset) { logger.error("consumed offset: " + currentTopicInfo.getConsumedOffset() + " doesn't match fetch offset: " + currentDataChunk.fetchOffset + " for " + currentTopicInfo + ";\n Consumer may lose data"); currentTopicInfo.resetConsumeOffset(currentDataChunk.fetchOffset); } current = currentDataChunk.messages.getItertor(); } } MessageAndOffset item = current.next(); while (item.offset < currentTopicInfo.getConsumedOffset() && current.hasNext()) { item = current.next(); } consumedOffset = item.offset; return Util.toEvent(item.message); }
Source:
<code>public synchronized boolean setReplicaSealedState(ReplicaId replicaId, boolean isSealed) { if (!(replicaId instanceof AmbryReplica)) { throw new IllegalArgumentException( "HelixParticipant only works with the AmbryReplica implementation of ReplicaId"); } List<String> sealedReplicas = getSealedReplicas(); if (sealedReplicas == null) { sealedReplicas = new ArrayList<>(); } String partitionId = replicaId.getPartitionId().toPathString(); boolean success = true; if (!isSealed && sealedReplicas.contains(partitionId)) { logger.trace("Removing the partition from sealReplicas list", partitionId); sealedReplicas.remove(partitionId); success = setSealedReplicas(sealedReplicas); } else if (isSealed && !sealedReplicas.contains(partitionId)) { <START> logger.trace("Adding the partition to sealReplicas list", partitionId); <END> sealedReplicas.add(partitionId); success = setSealedReplicas(sealedReplicas); } logger.trace("Set sealed state of partition is completed", partitionId); return success; }</code><technical_language>sealedReplicas list</technical_language>

Target:
public boolean setReplicaSealedState(ReplicaId replicaId, boolean isSealed) { if (!(replicaId instanceof AmbryReplica)) { throw new IllegalArgumentException( "HelixParticipant only works with the AmbryReplica implementation of ReplicaId"); } synchronized (helixAdministrationLock) { List<String> sealedReplicas = getSealedReplicas(); if (sealedReplicas == null) { sealedReplicas = new ArrayList<>(); } String partitionId = replicaId.getPartitionId().toPathString(); boolean success = true; if (!isSealed && sealedReplicas.contains(partitionId)) { logger.trace("Removing the partition from sealedReplicas list", partitionId); sealedReplicas.remove(partitionId); success = setSealedReplicas(sealedReplicas); } else if (isSealed && !sealedReplicas.contains(partitionId)) { logger.trace("Adding the partition to sealedReplicas list", partitionId); sealedReplicas.add(partitionId); success = setSealedReplicas(sealedReplicas); } logger.trace("Set sealed state of partition is completed", partitionId); return success; } }
Source:
<code>public void before() { Map<String, List<String>> resultMap = new HashMap<String, List<String>>(); resultMap.put(ServiceTaskUploadFormPresenter.CREATED, createdList); resultMap.put(ServiceTaskUploadFormPresenter.SKIPPED, updatedList); when(serviceTaskService.addServiceTasks(any())).thenReturn(resultMap); presenter = spy(new ServiceTaskUploadFormPresenter(view, new CallerMock<ServiceTaskService>(serviceTaskService), notificationEvent, iocManager)); presenter.init(); when(view.getSuccessInstallMessage()).thenReturn(addTaskSuccess); <START> when(view.getSkippedMessage()).thenReturn(updateTaskSuccess); <END> }</code><technical_language>update anymore, right? create skip (At I in impl)</technical_language>

Target:
public void before() { Map<String, List<String>> resultMap = new HashMap<String, List<String>>(); resultMap.put(ServiceTaskUploadFormPresenter.CREATED, createdList); resultMap.put(ServiceTaskUploadFormPresenter.SKIPPED, skippedList); when(serviceTaskService.addServiceTasks(any())).thenReturn(resultMap); presenter = spy(new ServiceTaskUploadFormPresenter(view, new CallerMock<ServiceTaskService>(serviceTaskService), notificationEvent, iocManager)); presenter.init(); when(view.getSuccessInstallMessage()).thenReturn(ADD_TASK_SUCCESS); when(view.getSkippedMessage(any())).thenReturn(SKIP_TASK_SUCCESS); }
Source:
<code>public Result processWorkPackage(final I_C_Queue_WorkPackage workPackage, final String localTrxName) { final IQueueDAO queueDAO = Services.get(IQueueDAO.class); <START> final IRequestBL requestBL = Services.get(IRequestBL.class); <END> final I_C_Order order = queueDAO.retrieveItems(workPackage, I_C_Order.class, localTrxName).get(0); requestBL.createTestApplianceRequestFromOrder(order); return Result.SUCCESS; }</code><technical_language>extract fields</technical_language>

Target:
public Result processWorkPackage(final I_C_Queue_WorkPackage workPackage, final String localTrxName) { queueDAO.retrieveItems(workPackage, I_C_Order.class, localTrxName) .forEach(requestBL::createRequestFromOrder); return Result.SUCCESS; }
Source:
<code>public void configureMessageChannel(MessageChannel channel, String channelName) { Assert.isAssignable(AbstractMessageChannel.class, channel.getClass()); AbstractMessageChannel messageChannel = (AbstractMessageChannel) channel; BindingProperties bindingProperties = this.channelBindingServiceProperties.getBindingProperties(channelName); final String contentType = bindingProperties.getContentType(); <START> if (bindingProperties != null && StringUtils.hasText(contentType)) { <END> MimeType mimeType = MessageConverterUtils.getMimeType(contentType); SmartMessageConverter messageConverter = this.compositeMessageConverterFactory.getMessageConverterForType(mimeType); Class<?>[] supportedDataTypes = this.compositeMessageConverterFactory.supportedDataTypes(mimeType); messageChannel.setDatatypes(supportedDataTypes); messageChannel.setMessageConverter(new MessageWrappingMessageConverter(messageConverter, mimeType)); messageChannel.addInterceptor(new ChannelInterceptorAdapter() { @Override public Message<?> preSend(Message<?> message, MessageChannel messageChannel) { Object contentTypeFromMessage = message.getHeaders().get(MessageHeaders.CONTENT_TYPE); if (contentTypeFromMessage == null) { return messageBuilderFactory .fromMessage(message) .setHeader(MessageHeaders.CONTENT_TYPE, contentType) .build(); } return message; } }); } }</code><technical_language>bindingProps null, accessed previous line</technical_language>

Target:
public void configureMessageChannel(MessageChannel channel, String channelName) { Assert.isAssignable(AbstractMessageChannel.class, channel.getClass()); AbstractMessageChannel messageChannel = (AbstractMessageChannel) channel; BindingProperties bindingProperties = this.channelBindingServiceProperties.getBindingProperties(channelName); final String contentType = bindingProperties.getContentType(); if (StringUtils.hasText(contentType)) { MimeType mimeType = MessageConverterUtils.getMimeType(contentType); SmartMessageConverter messageConverter = this.compositeMessageConverterFactory.getMessageConverterForType(mimeType); Class<?>[] supportedDataTypes = this.compositeMessageConverterFactory.supportedDataTypes(mimeType); messageChannel.setDatatypes(supportedDataTypes); messageChannel.setMessageConverter(new MessageWrappingMessageConverter(messageConverter, mimeType)); messageChannel.addInterceptor(new ChannelInterceptorAdapter() { @Override public Message<?> preSend(Message<?> message, MessageChannel messageChannel) { Object contentTypeFromMessage = message.getHeaders().get(MessageHeaders.CONTENT_TYPE); if (contentTypeFromMessage == null) { return messageBuilderFactory .fromMessage(message) .setHeader(MessageHeaders.CONTENT_TYPE, contentType) .build(); } return message; } }); } }
Source:
<code>public List<AggregatorFactory> getRequiredColumns() { <START> return Arrays.<AggregatorFactory>asList(new StringFirstAggregatorFactory(fieldName, fieldName, maxStringBytes)); <END> }</code><technical_language>Arrays.asList(new StringFirstAggregatorFactory(fieldName, fieldName, maxStringBytes))</technical_language>

Target:
public List<AggregatorFactory> getRequiredColumns() { return Collections.singletonList(new StringFirstAggregatorFactory(fieldName, fieldName, maxStringBytes)); }
Source:
<code>private String genericInfoContent(Map.Entry<String, String> pair) { <START> return String.format(FOUT_SPACES_INDENT + "<%s %s=\"%s\" %s=\"%s\"/>", <END> XMLTags.COMMON_INFO, XMLAttributes.COMMON_NAME, pair.getKey(), XMLAttributes.COMMON_VALUE, pair.getValue()); }</code><technical_language>"<%s %s=\"%s\" %s=\"%s\"/>"</technical_language>

Target:
private String genericInfoContent(Map.Entry<String, String> pair) { return String.format(FOUR_SPACES_INDENT + TAG_WITH_TWO_ATTRIBUTES, XMLTags.COMMON_INFO, XMLAttributes.COMMON_NAME, pair.getKey(), XMLAttributes.COMMON_VALUE, pair.getValue()); }
Source:
<code>public void updateInitialRunFields() { getIsSysprepPossible().setEntity(!vm.getCompatibilityVersion().greaterOrEquals(Version.v4_4) && getIsWindowsOS()); <START> getIsSysprepEnabled().setEntity(!vm.getCompatibilityVersion().greaterOrEquals(Version.v4_4) && <END> getInitializationType() == InitializationType.Sysprep); getIsCloudInitPossible().setEntity(!getIsWindowsOS()); getIsCloudInitEnabled().setEntity(getInitializationType() == InitializationType.CloudInit); getIsCloudInitEnabled().setIsAvailable(!getIsWindowsOS()); if (getIsSysprepPossible().getEntity() && getIsSysprepEnabled().getEntity()) { getVmInitModel().updateSysprepDomain(getVmInitModel().getSysprepDomain().getSelectedItem()); } }</code><technical_language>floppy support it. goal of change is mechanism, ditch feature entirely. way, this osinfo, hardcoded levels</technical_language>

Target:
public void updateInitialRunFields() { getIsSysprepPossible().setEntity(getIsWindowsOS()); getIsSysprepEnabled().setEntity(getInitializationType() == InitializationType.Sysprep); getIsCloudInitPossible().setEntity(!getIsWindowsOS()); getIsCloudInitEnabled().setEntity(getInitializationType() == InitializationType.CloudInit); getIsCloudInitEnabled().setIsAvailable(!getIsWindowsOS()); if (getIsSysprepPossible().getEntity() && getIsSysprepEnabled().getEntity()) { getVmInitModel().updateSysprepDomain(getVmInitModel().getSysprepDomain().getSelectedItem()); } }
Source:
<code>private void doTestCriticalHeapAndQueryTimeout(VM server, VM client, final boolean disabledQueryMonitorForLowMem, final int queryTimeout, final boolean hitCriticalThreshold) { createLatchTestHook(server, hitCriticalThreshold, VM.getController()); AsyncInvocation queryExecution = invokeClientQuery(client, disabledQueryMonitorForLowMem, queryTimeout, hitCriticalThreshold, VM.getController()); try { <START> criticalMemoryCountDownLatch.await(); <END> } catch (InterruptedException e) { e.printStackTrace(); } if (hitCriticalThreshold) { vmHitsCriticalHeap(server); await().until(() -> vmCheckCritcalHeap(server) == EVICTION_DISABLED_CRITICAL); } try { Thread.sleep(MAX_TEST_QUERY_TIMEOUT); } catch (InterruptedException e1) { Thread.currentThread().interrupt(); } releaseHook(server); try { assertThat(queryExecution.get(60, SECONDS)).isEqualTo(0); } catch (Throwable e) { e.printStackTrace(); fail("queryExecution.getResult() threw Exception " + e.toString()); } }</code><technical_language>Delete surrounding try-catch add throws InterruptedException method</technical_language>

Target:
private void doTestCriticalHeapAndQueryTimeout(VM server, VM client, final boolean disabledQueryMonitorForLowMem, final int queryTimeout, final boolean hitCriticalThreshold) throws InterruptedException { createLatchTestHook(server, hitCriticalThreshold, VM.getController()); AsyncInvocation queryExecution = invokeClientQuery(client, disabledQueryMonitorForLowMem, queryTimeout, hitCriticalThreshold, VM.getController()); criticalMemoryCountDownLatch.await(); if (hitCriticalThreshold) { vmHitsCriticalHeap(server); await().until(() -> vmCheckCritcalHeap(server) == EVICTION_DISABLED_CRITICAL); } criticalMemorySetLatch.countDown(); Thread.sleep(MAX_TEST_QUERY_TIMEOUT); releaseHook(server); await().untilAsserted(() -> assertThat(queryExecution.get()).isEqualTo(0)); }
Source:
<code>private ObjectId endObject(ObjectId id, long offset) throws IOException { PackedObjectInfo obj = new PackedObjectInfo(id); obj.setOffset(offset); obj.setCRC((int) packOut.crc32.getValue()); objectList.add(obj); objectMap.addIfAbsent(obj); <START> packOut.flushStream(); <END> return id; }</code><technical_language>flushBlock(), this put newly written data in DfsBlockCache. good asking a lot of block cache putting partial blocks there. I right in assuming DfsOutputStream#read is meant fast this hurt anything</technical_language>

Target:
private ObjectId endObject(ObjectId id, long offset) { PackedObjectInfo obj = new PackedObjectInfo(id); obj.setOffset(offset); obj.setCRC((int) packOut.crc32.getValue()); objectList.add(obj); objectMap.addIfAbsent(obj); return id; }
Source:
<code>INode toDirectory(UGIResolver ugi) { final FileStatus s = getFileStatus(); final AclStatus aclStatus = getAclStatus(); long permissions = ugi.getPermissionsProto(s, aclStatus); INodeDirectory.Builder b = INodeDirectory.newBuilder() .setModificationTime(s.getModificationTime()) .setNsQuota(DEFAULT_NAMESPACE_QUOTA) .setDsQuota(DEFAULT_STORAGE_SPACE_QUOTA) .setPermission(permissions); if (aclStatus != null) { throw new UnsupportedOperationException( <START> "Acls not supported by ImageWriter"); <END> } INode.Builder ib = INode.newBuilder() .setType(INode.Type.DIRECTORY) .setId(id) .setName(ByteString.copyFrom(string2Bytes(s.getPath().getName()))) .setDirectory(b); return ib.build(); }</code><technical_language>ACLs</technical_language>

Target:
INode toDirectory(UGIResolver ugi) { final FileStatus s = getFileStatus(); final AclStatus aclStatus = getAclStatus(); long permissions = ugi.getPermissionsProto(s, aclStatus); INodeDirectory.Builder b = INodeDirectory.newBuilder() .setModificationTime(s.getModificationTime()) .setNsQuota(DEFAULT_NAMESPACE_QUOTA) .setDsQuota(DEFAULT_STORAGE_SPACE_QUOTA) .setPermission(permissions); if (aclStatus != null) { throw new UnsupportedOperationException( "ACLs not supported by ImageWriter"); } INode.Builder ib = INode.newBuilder() .setType(INode.Type.DIRECTORY) .setId(id) .setName(ByteString.copyFrom(string2Bytes(s.getPath().getName()))) .setDirectory(b); return ib.build(); }
Source:
<code>public void deleteTable(String tableName) throws IOException{ TableName tn = tableInfoFactory.getTableInfo(tableName); try{ if (admin.isTableEnabled(tn)) { admin.disableTable(tn); } admin.deleteTable(tn); <START> }catch(TableNotFoundException ignored){ <END> }catch (Exception e) { if (!admin.isTableEnabled(tn)){ admin.enableTable(tn); } throw e; } }</code><technical_language>Please log this exception, a WARN level</technical_language>

Target:
public void deleteTable(String tableName) throws IOException{ TableName tn = tableInfoFactory.getTableInfo(tableName); try{ if (admin.isTableEnabled(tn)) { admin.disableTable(tn); } admin.deleteTable(tn); }catch(TableNotFoundException ignored){ SpliceLogUtils.warn(LOG, "Table %s not found. It may be deleted by another running vacuum.", tableName); }catch (Exception e) { SpliceLogUtils.warn(LOG, "Deleting table %s failed", tableName); if (!admin.isTableEnabled(tn)){ SpliceLogUtils.warn(LOG, "Re-enable table %s", tableName); admin.enableTable(tn); } throw e; } }
Source:
<code>protected void drawGuiContainerForegroundLayer(int mx, int my) { super.drawGuiContainerForegroundLayer(mx, my); helper.draw2(mx, my); ArrayList<String> list = new ArrayList<String>(); GL11.glColor4f(1f, 1f, 1f, 1f); for (Object o : inventorySlots.inventorySlots) { Slot slot = (Slot) o; <START> if (slot.getHasStack() == false <END> && mx - guiLeft >= slot.xDisplayPosition && my - guiTop >= slot.yDisplayPosition && mx - guiLeft < slot.xDisplayPosition + 17 && my - guiTop < slot.yDisplayPosition + 17) { list.clear(); SlotSkin comment = SlotSkin.none; if (slot instanceof ISlotWithComment) { ((ISlotWithComment) slot).getComment(list); int x, y; int strWidth = 0; for (String str : list) { int size = fontRendererObj.getStringWidth(str); if (size > strWidth) strWidth = size; } x = slot.xDisplayPosition; y = slot.yDisplayPosition; int xOffset = 0; if (guiLeft + x + strWidth + 30 > this.width) { xOffset -= strWidth + 20; } if (!list.isEmpty()) drawHoveringText((java.util.List) list, mx - guiLeft + xOffset, my - guiTop, fontRendererObj); } } } }</code><technical_language>This simplified if(!slot.getHasStack() ... is easier understand</technical_language>

Target:
protected void drawGuiContainerForegroundLayer(int mx, int my) { super.drawGuiContainerForegroundLayer(mx, my); helper.draw2(mx, my); ArrayList<String> list = new ArrayList<String>(); GL11.glColor4f(1f, 1f, 1f, 1f); for (Object o : inventorySlots.inventorySlots) { Slot slot = (Slot) o; if (!slot.getHasStack() && mx - guiLeft >= slot.xPos && my - guiTop >= slot.yPos && mx - guiLeft < slot.xPos + 17 && my - guiTop < slot.yPos + 17) { list.clear(); if (slot instanceof ISlotWithComment) { ((ISlotWithComment) slot).getComment(list); int x, y; int strWidth = 0; for (String str : list) { int size = fontRenderer.getStringWidth(str); if (size > strWidth) strWidth = size; } x = slot.xPos; y = slot.yPos; int xOffset = 0; if (guiLeft + x + strWidth + 30 > this.width) { xOffset -= strWidth + 20; } if (!list.isEmpty()) drawHoveringText((java.util.List) list, mx - guiLeft + xOffset, my - guiTop, fontRenderer); } } } }
Source:
<code>public String[] getVisibleColumns() { if (isShowColumns()) { IColumnPresentation presentation = getColumnPresentation(); if (presentation != null) { String[] columns = fVisibleColumns.get(presentation.getId()); if (columns == null) { return presentation.getInitialColumns(); } else { String[] available = presentation.getAvailableColumns(); for (String <START> column2 : <END> columns) { boolean columnAvailable = false; for (String element : available) { if (column2.equals(element)) { columnAvailable = true; } } if (!columnAvailable || presentation.getHeader(column2) == null) { fVisibleColumns.remove(presentation.getId()); fColumnOrder.remove(presentation.getId()); fColumnSizes.remove(presentation.getId()); return presentation.getInitialColumns(); } } } return columns; } } return null; }</code><technical_language>rename column</technical_language>

Target:
public String[] getVisibleColumns() { if (isShowColumns()) { IColumnPresentation presentation = getColumnPresentation(); if (presentation != null) { String[] columns = fVisibleColumns.get(presentation.getId()); if (columns == null) { return presentation.getInitialColumns(); } else { String[] available = presentation.getAvailableColumns(); for (String column : columns) { boolean columnAvailable = false; for (String element : available) { if (column.equals(element)) { columnAvailable = true; } } if (!columnAvailable || presentation.getHeader(column) == null) { fVisibleColumns.remove(presentation.getId()); fColumnOrder.remove(presentation.getId()); fColumnSizes.remove(presentation.getId()); return presentation.getInitialColumns(); } } } return columns; } } return null; }
Source:
<code>protected boolean getForcedDecimal( List featureCollections, GeoServer geoServer, Catalog catalog) { boolean forcedDecimal = false; for (int i = 0; i < featureCollections.size(); i++) { Boolean forced = getFeatureTypeInfoProperty( catalog, (FeatureCollection) featureCollections.get(i), fti -> fti.getForcedDecimal()); <START> if (forced != null && forced.booleanValue()) { <END> forcedDecimal = true; } } return forcedDecimal; }</code><technical_language>This is a bit weird do comparison, Boolean.TRUE.equals(forced) idiomatic approach</technical_language>

Target:
protected boolean getForcedDecimal( List featureCollections, GeoServer geoServer, Catalog catalog) { boolean forcedDecimal = false; for (int i = 0; i < featureCollections.size(); i++) { Boolean forced = getFeatureTypeInfoProperty( catalog, (FeatureCollection) featureCollections.get(i), fti -> fti.getForcedDecimal()); if (Boolean.TRUE.equals(forced)) { forcedDecimal = true; } } return forcedDecimal; }
Source:
<code>public void visitLambdaExpression(LambdaExpressionTree tree) { <START> if ((isMethodInvocation(tree.body()) && isUsingLambdaParamAsArg(tree)) || isBlockInvokingMethod(tree.body())) { <END> context.addIssue(tree, this, "Replace this lambda with a method reference."); } super.visitLambdaExpression(tree); }</code><technical_language>@m-g-sonar I move isMethodInvocation(tree.body()) isUsingLambdaParamAsArg method right cast MethodInvocationTree isUsingLambdaParamAsArg rule a unclear</technical_language>

Target:
public void visitLambdaExpression(LambdaExpressionTree tree) { if (isSingleMethodInvocationUsingLambdaParamAsArg(tree) || isBlockInvokingMethod(tree.body())) { context.addIssue(tree, this, "Replace this lambda with a method reference."); } super.visitLambdaExpression(tree); }
Source:
<code>public void testPush() throws Exception { RestS3Service s3Client = EasyMock.createStrictMock(RestS3Service.class); EasyMock.expect(s3Client.putObject(EasyMock.anyString(), EasyMock.<S3Object>anyObject())) .andReturn(null) .atLeastOnce(); EasyMock.replay(s3Client); S3DataSegmentPusherConfig config = new S3DataSegmentPusherConfig(); config.bucket = "bucket"; config.baseKey = "key"; S3DataSegmentPusher pusher = new S3DataSegmentPusher(s3Client, config, new DefaultObjectMapper()); <START> File tmpDir = Files.createTempDir(); <END> tmpDir.deleteOnExit(); File tmp = new File(tmpDir, "version.bin"); tmp.deleteOnExit(); final byte[] data = new byte[]{0x0, 0x0, 0x0, 0x1}; Files.write(data, tmp); final long size = data.length; DataSegment segmentToPush = new DataSegment( "foo", new Interval("2015/2016"), "0", Maps.<String, Object>newHashMap(), Lists.<String>newArrayList(), Lists.<String>newArrayList(), new NoneShardSpec(), 0, size ); DataSegment segment = pusher.push(tmpDir, segmentToPush); Assert.assertEquals(segmentToPush.getSize(), segment.getSize()); EasyMock.verify(s3Client); }</code><technical_language>create TemporaryFolder</technical_language>

Target:
public void testPush() throws Exception { RestS3Service s3Client = EasyMock.createStrictMock(RestS3Service.class); EasyMock.expect(s3Client.putObject(EasyMock.anyString(), EasyMock.<S3Object>anyObject())) .andReturn(null) .atLeastOnce(); EasyMock.replay(s3Client); S3DataSegmentPusherConfig config = new S3DataSegmentPusherConfig(); config.setBucket("bucket"); config.setBaseKey("key"); S3DataSegmentPusher pusher = new S3DataSegmentPusher(s3Client, config, new DefaultObjectMapper()); File tmp = tempFolder.newFile("version.bin"); final byte[] data = new byte[]{0x0, 0x0, 0x0, 0x1}; Files.write(data, tmp); final long size = data.length; DataSegment segmentToPush = new DataSegment( "foo", new Interval("2015/2016"), "0", Maps.<String, Object>newHashMap(), Lists.<String>newArrayList(), Lists.<String>newArrayList(), new NoneShardSpec(), 0, size ); DataSegment segment = pusher.push(tempFolder.getRoot(), segmentToPush); Assert.assertEquals(segmentToPush.getSize(), segment.getSize()); EasyMock.verify(s3Client); }
Source:
<code>private static void printConfigurationInfo() throws IOException { log.info("Executing as " + System.getProperty("user.name") + '@' + InetAddress.getLocalHost().getHostName() + " on " + System.getProperty("os.name") + ' ' + System.getProperty("os.version") + ' ' + System.getProperty("os.arch") + "; " + System.getProperty("java.vm.name") + ' ' + System.getProperty("java.runtime.version") + ' ' + (DeflaterFactory.usingIntelDeflater() ? "IntelDeflater" : "JdkDeflater")); <START> log.info("CREATE_INDEX:" + Defaults.CREATE_INDEX + <END> ' ' + "CREATE_MD5:" + Defaults.CREATE_MD5 + ' ' + "USE_ASYNC_IO:" + Defaults.USE_ASYNC_IO + ' ' + "BUFFER_SIZE:" + Defaults.BUFFER_SIZE + ' ' + "COMPRESSION_LEVEL:" + Defaults.COMPRESSION_LEVEL + ' ' + "NON_ZERO_BUFFER_SIZE:" + Defaults.NON_ZERO_BUFFER_SIZE + ' ' + "CUSTOM_READER_FACTORY:" + Defaults.CUSTOM_READER_FACTORY); }</code><technical_language>is Options.INDEX_ON_THE_FLY Defaults.CREATE_INDEX</technical_language>

Target:
private static void printConfigurationInfo() throws IOException { log.info("Executing as " + System.getProperty("user.name") + '@' + InetAddress.getLocalHost().getHostName() + " on " + System.getProperty("os.name") + ' ' + System.getProperty("os.version") + ' ' + System.getProperty("os.arch") + "; " + System.getProperty("java.vm.name") + ' ' + System.getProperty("java.runtime.version") + ' ' + (DeflaterFactory.usingIntelDeflater() ? "IntelDeflater" : "JdkDeflater")); log.info(Defaults.allDefaults().entrySet().stream().map(e -> e.getKey() + ':' + e.getValue()).collect(Collectors.<String>joining(" "))); }
Source:
<code>public Builder(Class<?> indexedType, ScopedAnalyzerReference scopedAnalyzer) { this.indexedType = indexedType; this.scopedAnalyzer = scopedAnalyzer; <START> this.passThroughAnalyzer = new LuceneAnalyzerReference( PassThroughAnalyzer.INSTANCE ); <END> }</code><technical_language>I suppose a pass-through singleton instance of LuceneAnalyzerReference: LuceneAnalyzerReference.PASS_THROUGH</technical_language>

Target:
public Builder(Class<?> indexedType, ScopedAnalyzerReference scopedAnalyzer) { this.indexedType = indexedType; this.scopedAnalyzer = scopedAnalyzer; this.passThroughAnalyzer = LuceneAnalyzerReference.PASS_THROUGH; }