auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected void executeCommand() { parameter = getParameters(); String slaveHost = parameter.getSlaveHost(); String slaveUserPassword = parameter.getSlavePassword(); String slaveSShFingerPrint = GlusterUtil.getInstance().getHostSSHFingerPrint(slaveHost); VDSReturnValue sessionCreateReturnValue = null; <START> VDSReturnValue passwordlessSSHCreateReturnValue = runVdsCommand(VDSCommandType.CreatePasswordLessSSHSession, new GlusterSshSessionParameters(slaveHost, slaveSShFingerPrint, parameter.getUserName(), parameter.getSlavePassword())); <END> if (passwordlessSSHCreateReturnValue.getSucceeded()) { sessionCreateReturnValue = runVdsCommand(VDSCommandType.GlusterVolumeGeoRepSessionCreate, new GlusterVolumeGeoRepVDSParamaters(upServer.getId(), masterVolume.getName(), slaveHost, slaveUserPassword, parameter.getSlaveVolumeName(), parameter.isForce())); if (!getSucceeded()) { handleVdsError(AuditLogType.GLUSTER_VOLUME_GEO_REP_CREATE_FAILED, sessionCreateReturnValue.getVdsError().getMessage()); return; } setSucceeded(sessionCreateReturnValue.getSucceeded()); } else { handleVdsError(AuditLogType.GLUSTER_VOLUME_PASSWORD_LESS_SSH_FAILED, passwordlessSSHCreateReturnValue.getVdsError().getMessage()); setSucceeded(false); } getReturnValue().setActionReturnValue(sessionCreateReturnValue); }</code><technical_language>slaveUserPassword instead</technical_language>

Target:
protected void executeCommand() { String slaveHost = parameter.getSlaveHost(); String slaveSShFingerPrint = GlusterUtil.getInstance().getHostSSHFingerPrint(slaveHost); VDSReturnValue sessionCreateReturnValue = null; VDSReturnValue passwordlessSSHCreateReturnValue = runVdsCommand(VDSCommandType.CreatePasswordLessSSHSession, new GlusterSshSessionParameters(slaveHost, slaveSShFingerPrint, parameter.getUserName(), parameter.getSlaveUserPassword())); if (passwordlessSSHCreateReturnValue.getSucceeded()) { sessionCreateReturnValue = runVdsCommand(VDSCommandType.GlusterVolumeGeoRepSessionCreate, new GlusterVolumeGeoRepSessionVDSParameters(upServer.getId(), masterVolume.getName(), slaveHost, parameter.getSlaveVolumeName(), parameter.isForce())); if (!sessionCreateReturnValue.getSucceeded()) { handleVdsError(AuditLogType.GLUSTER_VOLUME_GEO_REP_CREATE_FAILED, sessionCreateReturnValue.getVdsError().getMessage()); return; } setSucceeded(sessionCreateReturnValue.getSucceeded()); } else { handleVdsError(AuditLogType.GLUSTER_VOLUME_PASSWORD_LESS_SSH_FAILED, passwordlessSSHCreateReturnValue.getVdsError().getMessage()); setSucceeded(false); } getReturnValue().setActionReturnValue(sessionCreateReturnValue); }
Source:
<code>DriverChannel next() { DriverChannel[] snapshot = this.channels; switch (snapshot.length) { case 0: return null; case 1: DriverChannel onlyChannel = snapshot[0]; return onlyChannel.preAcquireId() ? onlyChannel : null; default: while (true) { DriverChannel best = null; int bestScore = 0; for (DriverChannel channel : snapshot) { int score = channel.getAvailableIds(); if (score > bestScore) { bestScore = score; best = channel; } } if (best == null) { return null; } else if (best.preAcquireId()) { return best; } } <START> } <END> }</code><technical_language>assuming a higher score means channel is better</technical_language>

Target:
DriverChannel next() { DriverChannel[] snapshot = this.channels; switch (snapshot.length) { case 0: return null; case 1: DriverChannel onlyChannel = snapshot[0]; return onlyChannel.preAcquireId() ? onlyChannel : null; default: for (int i = 0; i < MAX_ITERATIONS; i++) { DriverChannel best = null; int bestScore = 0; for (DriverChannel channel : snapshot) { int score = channel.getAvailableIds(); if (score > bestScore) { bestScore = score; best = channel; } } if (best == null) { return null; } else if (best.preAcquireId()) { return best; } } LOG.trace("Could not select a channel after iterations", MAX_ITERATIONS); return null; } }
Source:
<code>private void filterBufferAndResetFetchRunnable(Set<StreamPartition<String>> partitions) { scheduledExec.shutdown(); try { if (!scheduledExec.awaitTermination(EXCEPTION_RETRY_DELAY_MS, TimeUnit.MILLISECONDS)) { scheduledExec.shutdownNow(); } } catch (InterruptedException e) { <START> log.info(e, "InterruptedException while shutting down"); <END> } scheduledExec = Executors.newScheduledThreadPool( fetchThreads, Execs.makeThreadFactory("KinesisRecordSupplier-Worker-%d") ); BlockingQueue<OrderedPartitionableRecord<String, String>> newQ = new LinkedBlockingQueue<>(recordBufferSize); records .parallelStream() .filter(x -> !partitions.contains(x.getStreamPartition())) .forEachOrdered(newQ::offer); records = newQ; partitionResources.values().forEach(x -> x.started = false); checkPartitionsStarted = true; }</code><technical_language>I guess this exception propagated supervisor/indexTask, it</technical_language>

Target:
private void filterBufferAndResetFetchRunnable(Set<StreamPartition<String>> partitions) throws InterruptedException { scheduledExec.shutdown(); try { if (!scheduledExec.awaitTermination(EXCEPTION_RETRY_DELAY_MS, TimeUnit.MILLISECONDS)) { scheduledExec.shutdownNow(); } } catch (InterruptedException e) { log.warn(e, "InterruptedException while shutting down"); throw e; } scheduledExec = Executors.newScheduledThreadPool( fetchThreads, Execs.makeThreadFactory("KinesisRecordSupplier-Worker-%d") ); BlockingQueue<OrderedPartitionableRecord<String, String>> newQ = new LinkedBlockingQueue<>(recordBufferSize); records .stream() .filter(x -> !partitions.contains(x.getStreamPartition())) .forEachOrdered(newQ::offer); records = newQ; partitionResources.values().forEach(x -> x.started = false); checkPartitionsStarted = true; }
Source:
<code>private void updateD(SolGame game) { ObjectManager om = game.getObjectManager(); List<SolObject> objs = om.getObjects(); List<FarObjData> farObjs = om.getFarObjs(); if (drawable != null) { if (objs.contains(drawable)) { return; } drawable = null; for (FarObjData fod : farObjs) { FarObject fo = fod.fo; if (!(fo instanceof FarDrawable)) { continue; } List<Drawable> drawables = ((FarDrawable) fo).getDrawables(); if (drawables.size() != 3) { continue; } Drawable drawable = drawables.get(0); if (drawable != attackSprite) { continue; } farDrawable = (FarDrawable) fo; return; } <START> throw new AssertionError("The far object data in " + game + " is a FarDrawable object, does not contain 3 elements in drawables, or the first drawable isnt attackSprite"); <END> } if (farDrawable == null) { throw new AssertionError("Far drawable does not exist!"); } if (om.containsFarObj(farDrawable)) { return; } farDrawable = null; for (SolObject o : objs) { if ((o instanceof DrawableObject)) { List<Drawable> drawables = o.getDrawables(); if (drawables.size() != 3) { continue; } Drawable drawable = drawables.get(0); if (drawable != attackSprite) { continue; } this.drawable = (DrawableObject) o; return; } } throw new AssertionError("The SolObject in " + game + " is a DrawableObject without 3 elements in drawables or the first drawable element is not an attackSprite"); }</code><technical_language>pretty game is a string? so, printing out is useful I is instance of SolGame</technical_language>

Target:
private void updateD(SolGame game) { ObjectManager om = game.getObjectManager(); List<SolObject> objs = om.getObjects(); List<FarObjData> farObjs = om.getFarObjs(); if (drawable != null) { if (objs.contains(drawable)) { return; } drawable = null; for (FarObjData fod : farObjs) { FarObject fo = fod.fo; if (!(fo instanceof FarDrawable)) { continue; } List<Drawable> drawables = ((FarDrawable) fo).getDrawables(); if (drawables.size() != 3) { continue; } Drawable drawable = drawables.get(0); if (drawable != attackSprite) { continue; } farDrawable = (FarDrawable) fo; return; } throw new AssertionError("The far object data in game is a FarDrawable object, does not contain 3 elements in drawables, or the first drawable isnt attackSprite"); } if (farDrawable == null) { throw new AssertionError("Far drawable is null!"); } if (om.containsFarObj(farDrawable)) { return; } farDrawable = null; for (SolObject o : objs) { if ((o instanceof DrawableObject)) { List<Drawable> drawables = o.getDrawables(); if (drawables.size() != 3) { continue; } Drawable drawable = drawables.get(0); if (drawable != attackSprite) { continue; } this.drawable = (DrawableObject) o; return; } } throw new AssertionError("The SolObject in game is a DrawableObject without 3 elements in drawables or the first drawable element is not an attackSprite"); }
Source:
<code>public void removeMapping() throws LegalSPITesterException { long nbMappings = 10; tier = factory.newCachingTier(); V originalValue= factory.createValue(1); V newValue= factory.createValue(2); final Store.ValueHolder<V> originalValueHolder = mock(Store.ValueHolder.class); when(originalValueHolder.value()).thenReturn(originalValue); try { List<K> keys = new ArrayList<K>(); for (int i = 0; i < nbMappings; i++) { K key = factory.createKey(i); tier.getOrComputeIfAbsent(key, new Function<K, Store.ValueHolder<V>>() { @Override public Store.ValueHolder<V> apply(final K k) { return originalValueHolder; } }); keys.add(key); } tier.clear(); final Store.ValueHolder<V> newValueHolder = mock(Store.ValueHolder.class); when(newValueHolder.value()).thenReturn(newValue); for (K key : keys) { tier.invalidate(key); Store.ValueHolder<V> newReturnedValueHolder = tier.getOrComputeIfAbsent(key, new Function() { @Override public Object apply(final Object o) { return newValueHolder; } }); <START> if (newReturnedValueHolder != null) { <END> assertThat(newReturnedValueHolder.value(), is(equalTo(newValueHolder.value()))); } } } catch (CacheAccessException e) { throw new LegalSPITesterException("Warning, an exception is thrown due to the SPI test"); } }</code><technical_language>No, this sense changes done here, applies other changed tests. of changes belong here. Find root of failure fix instead</technical_language>

Target:
public void removeMapping() throws LegalSPITesterException { long nbMappings = 10; tier = factory.newCachingTier(); V originalValue= factory.createValue(1); V newValue= factory.createValue(2); final Store.ValueHolder<V> originalValueHolder = mock(Store.ValueHolder.class); when(originalValueHolder.value()).thenReturn(originalValue); try { List<K> keys = new ArrayList<K>(); for (int i = 0; i < nbMappings; i++) { K key = factory.createKey(i); tier.getOrComputeIfAbsent(key, new Function<K, Store.ValueHolder<V>>() { @Override public Store.ValueHolder<V> apply(final K k) { return originalValueHolder; } }); keys.add(key); } tier.clear(); final Store.ValueHolder<V> newValueHolder = mock(Store.ValueHolder.class); when(newValueHolder.value()).thenReturn(newValue); for (K key : keys) { tier.invalidate(key); Store.ValueHolder<V> newReturnedValueHolder = tier.getOrComputeIfAbsent(key, new Function() { @Override public Object apply(final Object o) { return newValueHolder; } }); assertThat(newReturnedValueHolder.value(), is(equalTo(newValueHolder.value()))); } } catch (CacheAccessException e) { throw new LegalSPITesterException("Warning, an exception is thrown due to the SPI test"); } }
Source:
<code><START> public GroupMembership addGroup(String hrefOrName) { <END> Group group = findGroup(hrefOrName); if (group != null){ return DefaultGroupMembership.create(this, group, getDataStore()); } return null; }</code><technical_language>@since 1.0.RC5</technical_language>

Target:
public GroupMembership addGroup(String hrefOrName) { Assert.hasText(hrefOrName, "hrefOrName cannot be null or empty"); Group group = findGroupInDirectory(hrefOrName, this.getDirectory()); if (group != null){ return DefaultGroupMembership.create(this, group, getDataStore()); } else { throw new IllegalStateException("The specified group was not found in this Account's directory."); } }
Source:
<code>private GeneratedColumns() { toValidate = Collections.emptyMap(); toInject = Collections.emptyMap(); <START> maybeInjectNested = Collections.emptyMap(); <END> expressions = Collections.emptyList(); }</code><technical_language>I clarification explains difference toInject maybeInjectNested. cases in apply, etc.</technical_language>

Target:
private GeneratedColumns() { validation = Validation.NONE; nestedReferenceByTopLevelColumnName = Collections.emptyMap(); toInject = Collections.emptyMap(); expressions = Collections.emptyList(); }
Source:
<code>public void convertProductReference() { <START> assertThat(converting(ATTR_NAME_REF_SET)).isNull(); <END> }</code><technical_language>I print reference ID. I usable, null bad scenarios: 1) NPE 2) shown. I ID people obtain results (though need adjusted)</technical_language>

Target:
public void convertProductReference() { assertThat(converting(ATTR_NAME_REF)).matches(Pattern.compile("\\S+")); }
Source:
<code>public Map<String, String> getTags() { <START> return null; <END> }</code><technical_language>return tags;</technical_language>

Target:
public Map<String, String> getTags() { return tags; }
Source:
<code>public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) { if (!children.get(1).evaluate(tuple, ptr)) { return false; } String[] pattern =decodePath((String)PVarchar.INSTANCE.toObject(ptr)); if (!children.get(0).evaluate(tuple, ptr)) { return false; } <START> PhoenixJson value = (PhoenixJson) PJson.INSTANCE.toObject(ptr); <END> try{ PhoenixJson jsonValue=value.getPhoenixJson(pattern); ptr.set(jsonValue.valueWrapToBytes()); datatype=jsonValue.getValueAsPDataType(); return true; }catch(SQLException e) { return false; } }</code><technical_language>change rhs array. This consistent implemented ?| ?&</technical_language>

Target:
public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) { if (!children.get(1).evaluate(tuple, ptr)) { return false; } PhoenixArray pattern =(PhoenixArray)PVarcharArray.INSTANCE.toObject(ptr); if (!children.get(0).evaluate(tuple, ptr)) { return false; } PhoenixJson value = (PhoenixJson) PJson.INSTANCE.toObject(ptr); if(value==null){ ptr.set(PDataType.FALSE_BYTES); return true; } try{ PhoenixJson jsonValue=value.getPhoenixJson((String[])pattern.getArray()); ptr.set(jsonValue.valueWrapToBytes()); return true; }catch(SQLException e) { return false; } }
Source:
<code><START> public String toStatement() { <END> return statementBuilder.toString(); }</code><technical_language>add Override annotation</technical_language>

Target:
public String toStatement() { StringBuilder buffer = new StringBuilder(); String columnNames = String.join( ",", (CharSequence[]) getColumns() ); for ( int i = 0; i < getIds().size(); i++ ) { Object[] idTokens = getIds().get( i ); if ( i > 0 ) { if( chunkLimit > 0 && i % chunkLimit == 0 ) { buffer.append( " ) or ( " ); buffer.append( columnNames ); buffer.append( " ) in (" ); } else { buffer.append( "," ); } } buffer.append( "(" ); buffer.append( quoteIdentifier( idTokens ) ); buffer.append( ")" ); } return buffer.toString(); }
Source:
<code>public synchronized void setTaskScheduler(TaskScheduler taskScheduler) { this.internalTaskScheduler = false; <START> this.taskScheduler = taskScheduler; <END> }</code><technical_language>Assert.notNull() is missed. this.internalTaskScheduler == false this.taskScheduler == null - and, therefore, NPE in target code. Test-case do</technical_language>

Target:
public synchronized void setTaskScheduler(TaskScheduler taskScheduler) { Assert.notNull(taskScheduler, "'taskScheduler' cannot be null"); this.internalTaskScheduler = false; this.taskScheduler = taskScheduler; }
Source:
<code>protected LockProperties getLockingPropertiesSettings() { return null; <START> } <END></code><technical_language>do return null avoid extra logic. return object, drop null requirements over. default lock properties object state "do lock"</technical_language>

Target:
protected LockProperties getLockingPropertiesSettings() { return new LockProperties().setObtainLock(false); }
Source:
<code>NetworkClient getNetworkClient() throws IOException { <START> Selector selector = new Selector(networkMetrics, time, sslFactory); <END> ConnectionTracker connectionTracker = new ConnectionTracker(maxConnectionsPerPortPlainText, maxConnectionsPerPortSsl, time); return new NetworkClient(selector, connectionTracker, networkConfig, networkRequestMetrics, connectionCheckoutTimeoutMs, time); }</code><technical_language>do plan embed MockSelector for testing purposes</technical_language>

Target:
NetworkClient getNetworkClient() throws IOException { Selector selector = new Selector(networkMetrics, time, sslFactory); ConnectionTracker connectionTracker = new ConnectionTracker(maxConnectionsPerPortPlainText, maxConnectionsPerPortSsl); return new NetworkClient(selector, connectionTracker, networkConfig, connectionCheckoutTimeoutMs, time); }
Source:
<code>public Iterator<Journal.JournalEntry> getJournalEntryIterator() { List<Iterator<Journal.JournalEntry>> componentIters = StreamUtils <START> .map(JournalEntryIterable::getJournalEntryIterator, mDBs.values()); <END> return Iterators.concat(getDbIterator(), getDbInfoIterator(), Iterators.concat(componentIters.iterator())); }</code><technical_language>mDBs.values() add DBInfo entries</technical_language>

Target:
public Iterator<Journal.JournalEntry> getJournalEntryIterator() { List<Iterator<Journal.JournalEntry>> componentIters = StreamUtils .map(JournalEntryIterable::getJournalEntryIterator, mDBs.values()); return Iterators.concat(getDbIterator(), Iterators.concat(componentIters.iterator())); }
Source:
<code>public MultipleJGitEnvironmentRepository build(MultipleJGitEnvironmentProperties environmentProperties) { MultipleJGitEnvironmentRepository repository = new MultipleJGitEnvironmentRepository(environment, environmentProperties); <START> repository.setTransportConfigCallback(propertiesBasedSshTransportCallback(environmentProperties)); <END> if (server.getDefaultLabel() != null) { repository.setDefaultLabel(server.getDefaultLabel()); } return repository; }</code><technical_language>I guess leave transportConfigCallback for custom configuration check provided here</technical_language>

Target:
public MultipleJGitEnvironmentRepository build(MultipleJGitEnvironmentProperties environmentProperties) { MultipleJGitEnvironmentRepository repository = new MultipleJGitEnvironmentRepository(environment, environmentProperties); repository.setTransportConfigCallback(customTransportConfigCallback .orElse(buildTransportConfigCallback(environmentProperties))); if (server.getDefaultLabel() != null) { repository.setDefaultLabel(server.getDefaultLabel()); } return repository; }
Source:
<code>private static Color getDistinctForeground(RGB rgb) { final int luminanceThreshold = 128; <START> final double redFactor = 0.2126; <END> final double greenFactor = 0.7152; final double blueFactor = 0.0722; int luminance = (int) (redFactor * rgb.red + greenFactor * rgb.green + blueFactor * rgb.blue); return Display.getDefault().getSystemColor( luminance > luminanceThreshold ? SWT.COLOR_BLACK : SWT.COLOR_WHITE); }</code><technical_language>get a bit more detail origin of values</technical_language>

Target:
private static Color getDistinctForeground(RGB rgb) { final int luminanceThreshold = 128; final double redCoefficient = 0.2126; final double greenCoefficient = 0.7152; final double blueCoefficient = 0.0722; int luminance = (int) (redCoefficient * rgb.red + greenCoefficient * rgb.green + blueCoefficient * rgb.blue); return Display.getDefault().getSystemColor( luminance > luminanceThreshold ? SWT.COLOR_BLACK : SWT.COLOR_WHITE); }
Source:
<code>public void mavenProjectChanged(MavenProjectChangedEvent[] events, IProgressMonitor monitor) { boolean changed = false; for (MavenProjectChangedEvent event : ((events != null) ? events : new MavenProjectChangedEvent[0])) { Kind kind = Kind.get(event); logger.debug("{}: mavenProjectChanged({}, {})", getName(), kind, event.getSource()); switch (kind) { case ADDED : case CHANGED : IMavenProjectFacade projectFacade = event.getMavenProject(); Set<File> collected = collect(projectFacade, monitor); if (!collected.isEmpty()) { index(projectFacade.getProject(), collected); changed = true; } break; case REMOVED : <START> changed = remove(event <END> .getOldMavenProject() .getProject()); break; } } if (changed) { list = memoize(this::list0); unchecked(() -> Central.refreshPlugins()); } }</code><technical_language>in a loop here, do want potentially set changed true false. want like: java if (remove(event.getOldMavenProject().getProject())) { changed = true; }</technical_language>

Target:
public void mavenProjectChanged(MavenProjectChangedEvent[] events, IProgressMonitor monitor) { boolean changed = false; for (MavenProjectChangedEvent event : ((events != null) ? events : new MavenProjectChangedEvent[0])) { Kind kind = Kind.get(event); logger.debug("{}: mavenProjectChanged({}, {})", getName(), kind, event.getSource()); switch (kind) { case ADDED : case CHANGED : if (process(event.getMavenProject(), monitor)) { changed = true; } break; case REMOVED : if (remove(event.getOldMavenProject() .getProject())) { changed = true; } break; } } if (changed) { list = memoize(this::list0); unchecked(() -> Central.refreshPlugins()); } }
Source:
<code>public void setup() { doReturn(dbFacade).when(validator).getDbFacade(); doReturn(storageServerConnectionExtensionDao).when(dbFacade).getStorageServerConnectionExtensionDao(); doReturn(vdsDao).when(dbFacade).getVdsDao(); <START> doReturn(new VDS()).when(vdsDao).get(any(Guid.class)); <END> conn = new StorageServerConnectionExtension(); conn.setHostId(Guid.newGuid()); conn.setIqn("iqn1"); conn.setUserName("user1"); conn.setPassword("password1"); }</code><technical_language>a specific Guid a stronger test</technical_language>

Target:
public void setup() { Guid hostId = Guid.newGuid(); doReturn(dbFacade).when(validator).getDbFacade(); doReturn(storageServerConnectionExtensionDao).when(dbFacade).getStorageServerConnectionExtensionDao(); doReturn(vdsDao).when(dbFacade).getVdsDao(); doReturn(new VDS()).when(vdsDao).get(hostId); conn = new StorageServerConnectionExtension(); conn.setHostId(hostId); conn.setIqn("iqn1"); conn.setUserName("user1"); conn.setPassword("password1"); }
Source:
<code>public Transcoder getTranscoder(MediaType mediaType, MediaType another) { Optional<Transcoder> transcoder = transcoders .stream() .filter(t -> t.supportsConversion(mediaType, another)) .findAny(); if (!transcoder.isPresent()) { <START> throw new EncodingException("Cannot find transcoder from " + mediaType + " to " + another); <END> } return transcoder.get(); }</code><technical_language>I some of exception deserve jboss logging treatement</technical_language>

Target:
public Transcoder getTranscoder(MediaType mediaType, MediaType another) { Optional<Transcoder> transcoder = transcoders .stream() .filter(t -> t.supportsConversion(mediaType, another)) .findAny(); if (!transcoder.isPresent()) { throw log.cannotFindTranscoder(mediaType, another); } return transcoder.get(); }
Source:
<code>private String analyzerName(Class<?> entityType, DocumentFieldMetadata fieldMetadata) { AnalyzerReference analyzer = fieldMetadata.getAnalyzer(); if ( analyzer.is( RemoteAnalyzerReference.class ) ) { return analyzer.unwrap( RemoteAnalyzerReference.class ).getName(); } <START> LOG.analyzerIsNotRemote( entityType, fieldMetadata.getFieldName(), analyzer.toString() ); <END> return null; }</code><technical_language>if simply delete "toString", formatter invoke if needed. avoid creating String log level is disabled.. WARN in this case matter much, pointing out a toString() suspicious</technical_language>

Target:
private String analyzerName(Class<?> entityType, DocumentFieldMetadata fieldMetadata) { AnalyzerReference analyzer = fieldMetadata.getAnalyzer(); if ( analyzer.is( RemoteAnalyzerReference.class ) ) { return analyzer.unwrap( RemoteAnalyzerReference.class ).getName(); } LOG.analyzerIsNotRemote( entityType, fieldMetadata.getFieldName(), analyzer ); return null; }
Source:
<code>private boolean removeContactFromGroupsExcluding(XMPPContact contact, List<String> exclude) { <START> boolean change = <END> contactsGrouped .entrySet() .stream() .filter(entry -> !exclude.contains(entry.getKey())) .map( entry -> Optional.ofNullable( entry.getValue().remove(GET_BASEJID_STRING.apply(contact)))) .filter(Optional::isPresent) .count() != 0; removeEmptyGroups(); return change; }</code><technical_language>boolean changed = false; for (Entry<..> e : contactsGrouped) { String groupName = e.getKey(); if (exclude.contains(groupName) continue; Map<> contacts = e.getKey(); changed |= contacts.remove(contact.getBareJid.getRaw()) != null; } I guess this is easier understand lambda 1 minute write 5 minutes this method chaining (without method name I get this statement does)</technical_language>

Target:
private boolean removeContactFromGroupsExcluding(XMPPContact contact, List<String> exclude) { String jid = GET_BAREJID_STRING.apply(contact); long removed = contactsGrouped .entrySet() .stream() .filter(entry -> !exclude.contains(entry.getKey())) .map(entry -> Optional.ofNullable(entry.getValue().remove(jid))) .filter(Optional::isPresent) .count(); removeEmptyGroups(); return removed != 0; }
Source:
<code>public void notifyOnVoiceMessage() { <START> Log.d("ttpl", "notify listeners: "); <END> int i = 0; for (VoiceMessageListener lnt : voiceMessageListeners.keySet()) { Log.d("ttpl", "listner " + ++i); lnt.onVoiceMessage(); } }</code><technical_language>Log.d deleted - for dev commons logging for prod</technical_language>

Target:
public void notifyOnVoiceMessage() { for (WeakReference<VoiceMessageListener> weakReferenceWrapper : voiceMessageListeners.keySet()) { VoiceMessageListener lnt = weakReferenceWrapper.get(); if (lnt != null) { lnt.onVoiceMessage(); } } }
Source:
<code>public void execute(ApplicationContext currentContext) throws CLIException { try { validateFilePath(currentContext); File jobFile = new File(pathname); String contentType = URLConnection.getFileNameMap().getContentTypeFor(pathname); <START> System.out.println(contentType); <END> JobIdData jobId; if (APPLICATION_XML.getMimeType().equals(contentType)) { jobId = currentContext.getRestClient().submitXml(currentContext.getSessionId(), new FileInputStream(jobFile), map(this.variables)); } else { jobId = currentContext.getRestClient().submitJobArchive(currentContext.getSessionId(), new FileInputStream(jobFile), map(this.variables)); } writeLine(currentContext, "Job('%s') successfully submitted: job('%d')", pathname, jobId.getId()); resultStack(currentContext).push(jobId); } catch (Exception e) { handleError(String.format("An error occurred while attempting to submit job('%s'):", pathname), e, currentContext); } }</code><technical_language>This a debug output, remove</technical_language>

Target:
public void execute(ApplicationContext currentContext) throws CLIException { try { validateFilePath(currentContext); File jobFile = new File(pathname); String contentType = URLConnection.getFileNameMap().getContentTypeFor(pathname); JobIdData jobId; if (APPLICATION_XML.getMimeType().equals(contentType)) { jobId = currentContext.getRestClient().submitXml(currentContext.getSessionId(), new FileInputStream(jobFile), map(this.variables)); } else { jobId = currentContext.getRestClient().submitJobArchive(currentContext.getSessionId(), new FileInputStream(jobFile), map(this.variables)); } writeLine(currentContext, "Job('%s') successfully submitted: job('%d')", pathname, jobId.getId()); resultStack(currentContext).push(jobId); } catch (Exception e) { handleError(String.format("An error occurred while attempting to submit job('%s'):", pathname), e, currentContext); } }
Source:
<code>public DataRecord getRecordIfStored(DataIdentifier identifier) throws DataStoreException { return null; <START> } <END></code><technical_language>Need implement</technical_language>

Target:
public DataRecord getRecordIfStored(DataIdentifier identifier) throws DataStoreException { LOG.info("Attempt to retrieve record for identifier \"{}\"", identifier); DataRecord result = null; DataStore ds = getDelegateForId(identifier); if (null != ds) { result = ds.getRecordIfStored(identifier); } if (null == result) { try { Iterator<DataStore> iter = delegateHandler.getAllDelegatesIterator(identifier); if (iter.hasNext()) { while (iter.hasNext()) { ds = iter.next(); result = ds.getRecordIfStored(identifier); if (null != result) { mapIdToDelegate(identifier, ds); LOG.info("Matching record found in delegate role \"{}\"", rolesForDelegates.getOrDefault(ds, "<not found>")); break; } } } else { LOG.info("No mapping for identifier \"{}\", trying all delegates", identifier); iter = delegateHandler.getAllDelegatesIterator(); while (iter.hasNext()) { ds = iter.next(); result = ds.getRecordIfStored(identifier); if (null != result) { mapIdToDelegate(identifier, ds); LOG.info("Matching record found in delegate role \"{}\"", rolesForDelegates.getOrDefault(ds, "<not found")); break; } } } } catch (DataStoreException e) { LOG.error("Error retrieving record [{}]", identifier, e); return null; } if (null == result) { LOG.error("Error retrieving record [{}]", identifier); } } return result; }
Source:
<code>protected boolean isWindowResizable() { <START> return false; <END> }</code><technical_language>dialog longer resizable</technical_language>

Target:
protected boolean isWindowResizable() { return true; }
Source:
<code>public void selectFirst() { <START> ((ToolbarMenuBar)menuBar_).selectFirst(); <END> }</code><technical_language>Ditto override getMenuBar instead of a cast</technical_language>

Target:
public void selectFirst() { getMenuBar().selectFirst(); }
Source:
<code>private static void buildDiskRequestsEntries(Disk disk, ITmfTrace trace, TimeGraphEntry traceEntry, ITmfStateSystem ssq, long startTime, long endTime, Map<Object, TimeGraphEntry> entryMap) { DiskRequestQueue driverQueue = disk.getDriverQueue(); DiskRequestQueue waitingQueue = disk.getWaitingQueue(); TimeGraphEntry diskEntry = createOrUpdateDiskEntry(disk, entryMap, trace, traceEntry, startTime, endTime); if (waitingQueue != null) { TimeGraphEntry wqEntry = createOrUpdateQueueEntry(waitingQueue, entryMap, diskEntry, startTime, endTime, WAITING_QUEUE, DESCENDING); <START> for (int wqRequestsQuark : waitingQueue.getQuarks()) { <END> createOrUpdateRequestsEntry(wqRequestsQuark, waitingQueue, entryMap, wqEntry, ssq, startTime, endTime); } } if (driverQueue != null) { TimeGraphEntry wqEntry = createOrUpdateQueueEntry(driverQueue, entryMap, diskEntry, startTime, endTime, DRIVER_QUEUE, ASCENDING); for (int wqRequestsQuark : driverQueue.getQuarks()) { createOrUpdateRequestsEntry(wqRequestsQuark, driverQueue, entryMap, wqEntry, ssq, startTime, endTime); } } }</code><technical_language>this a good place for a waitingQueue.foreach(wq->create....)</technical_language>

Target:
private static void buildDiskRequestsEntries(Disk disk, ITmfTrace trace, TimeGraphEntry traceEntry, ITmfStateSystem ssq, long startTime, long endTime, Map<Object, TimeGraphEntry> entryMap) { DiskRequestQueue driverQueue = disk.getDriverQueue(); DiskRequestQueue waitingQueue = disk.getWaitingQueue(); TimeGraphEntry diskEntry = createOrUpdateDiskEntry(disk, entryMap, trace, traceEntry, startTime, endTime); if (waitingQueue != null) { TimeGraphEntry wqEntry = createOrUpdateQueueEntry(waitingQueue, entryMap, diskEntry, startTime, endTime, WAITING_QUEUE, DESCENDING); waitingQueue.getQuarks().forEach(wqQuark -> createOrUpdateRequestsEntry(wqQuark, waitingQueue, entryMap, wqEntry, ssq, startTime, endTime)); } if (driverQueue != null) { TimeGraphEntry wqEntry = createOrUpdateQueueEntry(driverQueue, entryMap, diskEntry, startTime, endTime, DRIVER_QUEUE, ASCENDING); driverQueue.getQuarks().forEach(wqQuark -> createOrUpdateRequestsEntry(wqQuark, driverQueue, entryMap, wqEntry, ssq, startTime, endTime)); } }
Source:
<code><START> public int getSSLPort() { <END> for (PortType portType : ports.keySet()) { if (portType == PortType.SSL) { return ports.get(portType); } } throw new IllegalArgumentException("No SSL port exists for the datanode " + hostname + ":" + port); }</code><technical_language>MockDataNodeId extend DataNodeId reimplement methods different. this way</technical_language>

Target:
public int getSSLPort() { if (hasSSLPort()) { return ports.get(PortType.SSL); } throw new IllegalArgumentException("No SSL port exists for the datanode " + hostname + ":" + port); }
Source:
<code>public ChannelHandler storeListingRequestHandler( CatchupServerProtocol catchupServerProtocol ) { <START> return new PrepareStoreCopyRequestHandler( catchupServerProtocol, checkPointerServiceBundle::getCheckPointer, storeCopyCheckPointMutex, <END> dataSourceSupplier, new PrepareStoreCopyFilesProvider( pageCache, fs ) ); }</code><technical_language>This changes sending in a supplier sending in checkpointer in this instance. I send in checkPointerServiceBundle</technical_language>

Target:
public ChannelHandler storeListingRequestHandler( CatchupServerProtocol catchupServerProtocol ) { return new PrepareStoreCopyRequestHandler( catchupServerProtocol, checkPointerService::getCheckPointer, storeCopyCheckPointMutex, dataSourceSupplier, new PrepareStoreCopyFilesProvider( pageCache, fs ) ); }
Source:
<code>public static void serializeHeader(ByteBuffer outputBuffer, long totalSize, int blobEncryptionKeyRecordRelativeOffset, int blobPropertiesRecordRelativeOffset, int deleteRecordRelativeOffset, int userMetadataRecordRelativeOffset, int blobRecordRelativeOffset) throws MessageFormatException { checkHeaderConstraints(totalSize, blobEncryptionKeyRecordRelativeOffset, blobPropertiesRecordRelativeOffset, deleteRecordRelativeOffset, userMetadataRecordRelativeOffset, blobRecordRelativeOffset); int startOffset = outputBuffer.position(); outputBuffer.putShort(Message_Header_Version_V2); outputBuffer.putLong(totalSize); outputBuffer.putInt(blobEncryptionKeyRecordRelativeOffset); outputBuffer.putInt(blobPropertiesRecordRelativeOffset); outputBuffer.putInt(deleteRecordRelativeOffset); outputBuffer.putInt(userMetadataRecordRelativeOffset); outputBuffer.putInt(blobRecordRelativeOffset); Crc32 crc = new Crc32(); crc.update(outputBuffer.array(), startOffset, getHeaderSize() - Crc_Size); outputBuffer.putLong(crc.getValue()); <START> Logger logger = LoggerFactory.getLogger(MessageHeader_Format_V2.class); <END> logger.trace( "serializing header : version size blobencryptionkeyrecordrelativeoffset blobpropertiesrecordrelativeoffset " + "deleterecordrelativeoffset usermetadatarecordrelativeoffset blobrecordrelativeoffset crc {}", Message_Header_Version_V2, totalSize, blobEncryptionKeyRecordRelativeOffset, blobPropertiesRecordRelativeOffset, deleteRecordRelativeOffset, userMetadataRecordRelativeOffset, blobPropertiesRecordRelativeOffset, crc.getValue()); }</code><technical_language>is this declared (as opposed a static declaration class level)</technical_language>

Target:
public static void serializeHeader(ByteBuffer outputBuffer, long totalSize, int blobEncryptionKeyRecordRelativeOffset, int blobPropertiesRecordRelativeOffset, int deleteRecordRelativeOffset, int userMetadataRecordRelativeOffset, int blobRecordRelativeOffset) throws MessageFormatException { checkHeaderConstraints(totalSize, blobEncryptionKeyRecordRelativeOffset, blobPropertiesRecordRelativeOffset, deleteRecordRelativeOffset, userMetadataRecordRelativeOffset, blobRecordRelativeOffset); int startOffset = outputBuffer.position(); outputBuffer.putShort(Message_Header_Version_V2); outputBuffer.putLong(totalSize); outputBuffer.putInt(blobEncryptionKeyRecordRelativeOffset); outputBuffer.putInt(blobPropertiesRecordRelativeOffset); outputBuffer.putInt(deleteRecordRelativeOffset); outputBuffer.putInt(userMetadataRecordRelativeOffset); outputBuffer.putInt(blobRecordRelativeOffset); Crc32 crc = new Crc32(); crc.update(outputBuffer.array(), startOffset, getHeaderSize() - Crc_Size); outputBuffer.putLong(crc.getValue()); logger.trace( "serializing header : version size blobencryptionkeyrecordrelativeoffset blobpropertiesrecordrelativeoffset " + "deleterecordrelativeoffset usermetadatarecordrelativeoffset blobrecordrelativeoffset crc {}", Message_Header_Version_V2, totalSize, blobEncryptionKeyRecordRelativeOffset, blobPropertiesRecordRelativeOffset, deleteRecordRelativeOffset, userMetadataRecordRelativeOffset, blobPropertiesRecordRelativeOffset, crc.getValue()); }
Source:
<code>public int[] execute() { if (parts.isEmpty()) { return new int[] {}; } @SuppressWarnings("PMD.CloseResource") Statement stmt; try { try { stmt = getHandle().getStatementBuilder().create(getHandle().getConnection(), getContext()); addCleanable(stmt::close); <START> Integer queryTimeout = getConfig(Connections.class).getQueryTimeout(); <END> if (queryTimeout != null) { stmt.setQueryTimeout(queryTimeout); } } catch (SQLException e) { throw new UnableToCreateStatementException(e, getContext()); } LOG.trace("Execute batch ["); try { for (String part : parts) { final String sql = getConfig(SqlStatements.class).getTemplateEngine().render(part, getContext()); LOG.trace(" {}", sql); stmt.addBatch(sql); } } catch (SQLException e) { throw new UnableToExecuteStatementException("Unable to configure JDBC statement", e, getContext()); } try { return SqlLoggerUtil.wrap(stmt::executeBatch, getContext(), getConfig(SqlStatements.class).getSqlLogger()); } catch (SQLException e) { throw new UnableToExecuteStatementException(mungeBatchException(e), getContext()); } } finally { close(); } }</code><technical_language>Consider, Batch al understand here, add a protected void customize(Statement stmt) actual work config class</technical_language>

Target:
public int[] execute() { if (parts.isEmpty()) { return new int[] {}; } @SuppressWarnings("PMD.CloseResource") Statement stmt; try { try { stmt = getHandle().getStatementBuilder().create(getHandle().getConnection(), getContext()); addCleanable(stmt::close); getConfig(SqlStatements.class).customize(stmt); } catch (SQLException e) { throw new UnableToCreateStatementException(e, getContext()); } LOG.trace("Execute batch ["); try { for (String part : parts) { final String sql = getConfig(SqlStatements.class).getTemplateEngine().render(part, getContext()); LOG.trace(" {}", sql); stmt.addBatch(sql); } } catch (SQLException e) { throw new UnableToExecuteStatementException("Unable to configure JDBC statement", e, getContext()); } try { return SqlLoggerUtil.wrap(stmt::executeBatch, getContext(), getConfig(SqlStatements.class).getSqlLogger()); } catch (SQLException e) { throw new UnableToExecuteStatementException(mungeBatchException(e), getContext()); } } finally { close(); } }
Source:
<code>public PoolInitializationException(Throwable t) { <START> super(t); <END> }</code><technical_language>weird in a log, especially if user suppresses stack traces. If change it, this better: java super("Exception pool initialization: " + t.getMessage(), t);</technical_language>

Target:
public PoolInitializationException(Throwable t) { super("Exception during pool initialization: " + t.getMessage(), t); }
Source:
<code>private static OverlapDetector<ShardBoundary> getShardBoundaryOverlapDetector(final SAMFileHeader header, final List<SimpleInterval> intervals, final int readShardSize, final int readShardPadding) { final OverlapDetector<ShardBoundary> shardBoundaryOverlapDetector = new OverlapDetector<>(0, 0); intervals.stream() <START> .flatMap(interval -> Shard.divideIntervalIntoShards(interval, readShardSize, readShardSize, readShardPadding, header.getSequenceDictionary()).stream()) <END> .forEach(boundary -> shardBoundaryOverlapDetector.addLhs(boundary, boundary.getPaddedInterval())); return shardBoundaryOverlapDetector; }</code><technical_language>Call overload sets shard size == shard step for you</technical_language>

Target:
private static OverlapDetector<ShardBoundary> getShardBoundaryOverlapDetector(final SAMFileHeader header, final List<SimpleInterval> intervals, final int readShardSize, final int readShardPadding) { final OverlapDetector<ShardBoundary> shardBoundaryOverlapDetector = new OverlapDetector<>(0, 0); intervals.stream() .flatMap(interval -> Shard.divideIntervalIntoShards(interval, readShardSize, readShardPadding, header.getSequenceDictionary()).stream()) .forEach(boundary -> shardBoundaryOverlapDetector.addLhs(boundary, boundary.getPaddedInterval())); return shardBoundaryOverlapDetector; }
Source:
<code>public RuleBuilder(String name, String clazz, String language) { <START> this.name = name; <END> this.resourceLoader = new ResourceLoader(); language(language); className(clazz); }</code><technical_language>Please call other constructor: this(name, new ResourceLoader(), clazz, language); need duplicated code here</technical_language>

Target:
public RuleBuilder(String name, String clazz, String language) { this(name, new ResourceLoader(), clazz, language); }
Source:
<code>public void queryChangesReviewerAfterReview() throws Exception { PushOneCommit.Result r = createChange(); AddReviewerInput in = new AddReviewerInput(); in.reviewer = user.email; gApi.changes() .id("p~master~" + r.getChangeId()) .addReviewer(in); setApiUser(user); revision(r).review(ReviewInput.recommend()); <START> assertTrue(get(r.getChangeId()).reviewed); <END> }</code><technical_language>more readable, thanks. I assertFalse(...) immediately .review() call</technical_language>

Target:
public void queryChangesReviewerAfterReview() throws Exception { PushOneCommit.Result r = createChange(); AddReviewerInput in = new AddReviewerInput(); in.reviewer = user.email; gApi.changes() .id("p~master~" + r.getChangeId()) .addReviewer(in); setApiUser(user); assertNull(get(r.getChangeId()).reviewed); revision(r).review(ReviewInput.recommend()); assertTrue(get(r.getChangeId()).reviewed); }
Source:
<code>public GeoscalingWebClient() { <START> this(HttpTool.httpClientBuilder().trustAll().build()); <END> }</code><technical_language>Revert this, change GeoscalingDnsServiceImpl</technical_language>

Target:
public GeoscalingWebClient() { this(HttpTool.httpClientBuilder().build()); }
Source:
<code>private static String getFailMessage(ProcessStatus result) { ProcessStatus firstFail = getFirstFail(result.getChildren()); if (firstFail != null) { <START> return result.getMessage() + ": " + getFailMessage(firstFail) + getLineMessage(firstFail); <END> } return result.getMessage(); }</code><technical_language>Line number command, separated failure message. Example: 50: click: Control is disabled. Discuss Ulyana ond Olya</technical_language>

Target:
private static String getFailMessage(ProcessStatus result) { ProcessStatus firstFail = getFirstFail(result.getChildren()); if (firstFail != null) { return getLineMessage(firstFail) + result.getMessage() + ": " + getFailMessage(firstFail); } return result.getMessage(); }
Source:
<code>public void testNotStoredQualitiesFields(final String inputFile, final double expectedValue) throws IOException { <START> final SamReader reader = SamReaderFactory.makeDefault().open((new File(TEST_DATA_DIR, inputFile))); <END> final Histogram<String> results = executeValidation(reader, null, IndexValidationStringency.EXHAUSTIVE); Assert.assertEquals(results.get(SAMValidationError.Type.QUALITY_NOT_STORED.getHistogramString()).getValue(), expectedValue); }</code><technical_language>reader initialized in a try-with-resources block closed automatically</technical_language>

Target:
public void testNotStoredQualitiesFields(final String inputFile, final double expectedValue) throws IOException { try (final SamReader reader = SamReaderFactory.makeDefault().open((new File(TEST_DATA_DIR, inputFile)))) { final Histogram<String> results = executeValidation(reader, null, IndexValidationStringency.EXHAUSTIVE); Assert.assertEquals(results.get(SAMValidationError.Type.QUALITY_NOT_STORED.getHistogramString()).getValue(), expectedValue); } }
Source:
<code><START> StatementClient startQuery(String sql, Map<String, String> sessionPropertiesOverride) { <END> String source = firstNonNull(clientInfo.get("ApplicationName"), "presto-jdbc"); Map<String, String> allProperties; if (sessionPropertiesOverride.isEmpty()) { allProperties = sessionPropertiesOverride; } else { allProperties = new HashMap<>(sessionProperties); allProperties.putAll(sessionPropertiesOverride); } ClientSession session = new ClientSession( httpUri, user, source, clientInfo.get("ClientInfo"), catalog.get(), schema.get(), timeZoneId.get(), locale.get(), ImmutableMap.copyOf(allProperties), transactionId.get(), false, new Duration(2, MINUTES)); return queryExecutor.startQuery(session, sql); }</code><technical_language>This formatting is off. Please run formatter: <LINK_0></technical_language>

Target:
StatementClient startQuery(String sql, Map<String, String> sessionPropertiesOverride) { String source = firstNonNull(clientInfo.get("ApplicationName"), "presto-jdbc"); Map<String, String> allProperties = new HashMap<>(sessionProperties); allProperties.putAll(sessionPropertiesOverride); ClientSession session = new ClientSession( httpUri, user, source, clientInfo.get("ClientInfo"), catalog.get(), schema.get(), timeZoneId.get(), locale.get(), ImmutableMap.copyOf(allProperties), transactionId.get(), false, new Duration(2, MINUTES)); return queryExecutor.startQuery(session, sql); }
Source:
<code>public Builder setTableConfig(TableConfig tableConfig) { <START> this.tableConfig = tableConfig; <END> return this; }</code><technical_language>for other places suggestion _tableConfig = tableConfig;</technical_language>

Target:
public Builder setTableConfig(TableConfig tableConfig) { _tableConfig = tableConfig; return this; }
Source:
<code>public void updateConfiguration(Configuration config) { copy(resourcesConfiguration, config); <START> config.setInt(LineRecordReader.MAX_LINE_LENGTH, toIntExact(new DataSize(100, DataSize.Unit.MEGABYTE).toBytes())); <END> config.setClass(NET_TOPOLOGY_NODE_SWITCH_MAPPING_IMPL_KEY, NoOpDNSToSwitchMapping.class, DNSToSwitchMapping.class); if (socksProxy != null) { config.setClass(HADOOP_RPC_SOCKET_FACTORY_CLASS_DEFAULT_KEY, SocksSocketFactory.class, SocketFactory.class); config.set(HADOOP_SOCKS_SERVER_KEY, socksProxy.toString()); } if (domainSocketPath != null) { config.setStrings(DFS_DOMAIN_SOCKET_PATH_KEY, domainSocketPath); } if (!config.get(DFS_DOMAIN_SOCKET_PATH_KEY, "").trim().isEmpty()) { config.setBooleanIfUnset(DFS_CLIENT_READ_SHORTCIRCUIT_KEY, true); } config.setInt(DFS_CLIENT_SOCKET_TIMEOUT_KEY, toIntExact(dfsTimeout.toMillis())); config.setInt(IPC_PING_INTERVAL_KEY, toIntExact(ipcPingInterval.toMillis())); config.setInt(IPC_CLIENT_CONNECT_TIMEOUT_KEY, toIntExact(dfsConnectTimeout.toMillis())); config.setInt(IPC_CLIENT_CONNECT_MAX_RETRIES_KEY, dfsConnectMaxRetries); if (isHdfsWireEncryptionEnabled) { config.set(HADOOP_RPC_PROTECTION, "privacy"); config.setBoolean("dfs.encrypt.data.transfer", true); } config.setInt("fs.cache.max-size", fileSystemMaxCacheSize); configureCompression(config, compressionCodec); s3ConfigurationUpdater.updateConfiguration(config); }</code><technical_language>closer original limit, 20x bigger</technical_language>

Target:
public void updateConfiguration(Configuration config) { copy(resourcesConfiguration, config); config.setClass(NET_TOPOLOGY_NODE_SWITCH_MAPPING_IMPL_KEY, NoOpDNSToSwitchMapping.class, DNSToSwitchMapping.class); if (socksProxy != null) { config.setClass(HADOOP_RPC_SOCKET_FACTORY_CLASS_DEFAULT_KEY, SocksSocketFactory.class, SocketFactory.class); config.set(HADOOP_SOCKS_SERVER_KEY, socksProxy.toString()); } if (domainSocketPath != null) { config.setStrings(DFS_DOMAIN_SOCKET_PATH_KEY, domainSocketPath); } if (!config.get(DFS_DOMAIN_SOCKET_PATH_KEY, "").trim().isEmpty()) { config.setBooleanIfUnset(DFS_CLIENT_READ_SHORTCIRCUIT_KEY, true); } config.setInt(DFS_CLIENT_SOCKET_TIMEOUT_KEY, toIntExact(dfsTimeout.toMillis())); config.setInt(IPC_PING_INTERVAL_KEY, toIntExact(ipcPingInterval.toMillis())); config.setInt(IPC_CLIENT_CONNECT_TIMEOUT_KEY, toIntExact(dfsConnectTimeout.toMillis())); config.setInt(IPC_CLIENT_CONNECT_MAX_RETRIES_KEY, dfsConnectMaxRetries); if (isHdfsWireEncryptionEnabled) { config.set(HADOOP_RPC_PROTECTION, "privacy"); config.setBoolean("dfs.encrypt.data.transfer", true); } config.setInt("fs.cache.max-size", fileSystemMaxCacheSize); config.setInt(LineRecordReader.MAX_LINE_LENGTH, textMaxLineLength); configureCompression(config, compressionCodec); s3ConfigurationUpdater.updateConfiguration(config); }
Source:
<code>private Edge(Node child, Node parent) { <START> Preconditions.checkState(!Objects.equals(child, parent)); <END> this.child = child; this.parent = parent; hashcode = Objects.hash(child, parent); }</code><technical_language>worth removing call Objects.equals() too, child parent null</technical_language>

Target:
private Edge(Node child, Node parent) { Preconditions.checkState(!child.equals(parent)); this.child = child; this.parent = parent; hashcode = Objects.hash(child, parent); }