auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> protected boolean inOrderTraversal(Node node, Callback callback, TraversalOrder order) <END> { if (node == null) { return false; } Node first; Node second; if (order == TraversalOrder.FORWARD) { first = node.left; second = node.right; } else { first = node.right; second = node.left; } if (first != null && !inOrderTraversal(first, callback, order)) { return false; } if(!callback.process(node)) { return false; } if (second != null && !inOrderTraversal(second, callback, order)) { return false; } return true; }</code><technical_language>This private. This class is meant extended, benefit in making protected</technical_language>

Target:
private boolean inOrderTraversal(Node node, Callback callback, TraversalOrder order) { if (node == null) { return false; } Node first; Node second; if (order == TraversalOrder.FORWARD) { first = node.left; second = node.right; } else { first = node.right; second = node.left; } if (first != null && !inOrderTraversal(first, callback, order)) { return false; } if(!callback.process(node)) { return false; } if (second != null && !inOrderTraversal(second, callback, order)) { return false; } return true; }
Source:
<code>protected void cleanUpInvoke() throws Exception { isRunning = false; setShouldInterruptOnCancel(false); Thread.interrupted(); <START> tryShutdownTimerService(); <END> Throwable suppressedThrowable = null; try { cancelables.close(); shutdownAsyncThreads(); } catch (Throwable t) { suppressedThrowable = ExceptionUtils.firstOrSuppressed(t, suppressedThrowable); } try { cleanup(); } catch (Throwable t) { suppressedThrowable = ExceptionUtils.firstOrSuppressed(t, suppressedThrowable); } try { disposeAllOperators(true); } catch (Throwable t) { suppressedThrowable = ExceptionUtils.firstOrSuppressed(t, suppressedThrowable); } if (operatorChain != null) { actionExecutor.run(() -> operatorChain.releaseOutputs()); } else { recordWriter.close(); } try { channelIOExecutor.shutdown(); } catch (Throwable t) { suppressedThrowable = ExceptionUtils.firstOrSuppressed(t, suppressedThrowable); } mailboxProcessor.close(); if (suppressedThrowable != null) { throw (Exception) suppressedThrowable; } }</code><technical_language>This call try-catch-log inside. apply approach it</technical_language>

Target:
protected void cleanUpInvoke() throws Exception { isRunning = false; setShouldInterruptOnCancel(false); Thread.interrupted(); Exception suppressedException = runAndSuppressThrowable(this::tryShutdownTimerService, null); suppressedException = runAndSuppressThrowable(cancelables::close, suppressedException); suppressedException = runAndSuppressThrowable(this::shutdownAsyncThreads, suppressedException); suppressedException = runAndSuppressThrowable(this::cleanup, suppressedException); suppressedException = runAndSuppressThrowable(this::disposeAllOperators, suppressedException); suppressedException = runAndSuppressThrowable(this::releaseOutputResources, suppressedException); suppressedException = runAndSuppressThrowable(channelIOExecutor::shutdown, suppressedException); suppressedException = runAndSuppressThrowable(mailboxProcessor::close, suppressedException); if (suppressedException != null) { throw suppressedException; } }
Source:
<code>public boolean deleteDocument() { boolean result = false; if (selectedDocument != null) { result = wsService.deleteDocument(selectedDocument); if(result){ <START> getDocuments().remove(selectedDocument); <END> } selectedDocument = null; } else { addFacesMessageBy(GROWL_MESSAGE, msgForSelectDelete("Document")); } return result; }</code><technical_language>Personal Preference: do removing list. fetch here</technical_language>

Target:
public boolean deleteDocument() { boolean result = false; if (selectedDocument != null) { result = wsService.deleteDocument(selectedDocument); if(result){ refreshDocumentList(); } selectedDocument = null; } else { addFacesMessageBy(GROWL_MESSAGE, msgForSelectDelete("Document")); } return result; }
Source:
<code>public void open_rules_configuration() { assumeTrue(isMarsOrGreater()); openRulesConfiguration(); SWTBotTree tree = bot.tree(1); SWTBotTreeItem javaNode = tree.getAllItems()[0]; <START> assertThat(javaNode.getText()).isEqualTo("HTML"); <END> javaNode.expand(); assertThat(javaNode.cell(0, 0)).isEqualTo("\"<!DOCTYPE>\" declarations should appear before \"<html>\" tags"); bot.button("Cancel").click(); }</code><technical_language>Nitpicking: variable renamed htmlNode</technical_language>

Target:
public void open_rules_configuration() { assumeTrue(isMarsOrGreater()); openRulesConfiguration(); SWTBotTree tree = bot.tree(1); SWTBotTreeItem htmlNode = tree.getAllItems()[0]; assertThat(htmlNode.getText()).isEqualTo("HTML"); htmlNode.expand(); assertThat(htmlNode.cell(0, 0)).isEqualTo("\"<!DOCTYPE>\" declarations should appear before \"<html>\" tags"); bot.button("Cancel").click(); }
Source:
<code>public Collection<ISourceContainer> resolveSourceContainers(File classesLocation, IProgressMonitor monitor) { Collection<ArtifactKey> classesArtifacts = INDENTIFIERER.identify(classesLocation, monitor); if (classesArtifacts == null) { return null; } <START> List<ISourceContainer> result = new ArrayList<>(); <END> for (ArtifactKey classesArtifact : classesArtifacts) { ISourceContainer container = resolveSourceContainer(classesArtifact, monitor); if (container != null) { result.add(container); } } return result; }</code><technical_language>new ArrayList<>(classes.size());</technical_language>

Target:
public Collection<ISourceContainer> resolveSourceContainers(File classesLocation, IProgressMonitor monitor) { Collection<ArtifactKey> classesArtifacts = INDENTIFIER.identify(classesLocation, monitor); if (classesArtifacts == null) { return null; } List<ISourceContainer> result = new ArrayList<>(); for (ArtifactKey classesArtifact : classesArtifacts) { ISourceContainer container = resolveSourceContainer(classesArtifact, monitor); if (container != null) { result.add(container); } } return result; }
Source:
<code>public static SchedulingPolicy map(ClusterPolicy entity, SchedulingPolicy template) { SchedulingPolicy model = template != null ? template : new SchedulingPolicy(); model.setId(entity.getId().toString()); model.setName(entity.getName()); <START> model.setPolicy(entity.getName()); <END> model.setDescription(entity.getDescription()); model.setLocked(entity.isLocked()); model.setDefaultPolicy(entity.isDefaultPolicy()); if (entity.getParameterMap() != null && !entity.getParameterMap().isEmpty()) { model.setProperties(CustomPropertiesParser.fromMap(entity.getParameterMap())); } return model; }</code><technical_language>need support this in outbound messages, in inbound messages</technical_language>

Target:
public static SchedulingPolicy map(ClusterPolicy entity, SchedulingPolicy template) { SchedulingPolicy model = template != null ? template : new SchedulingPolicy(); model.setId(entity.getId().toString()); model.setName(entity.getName()); model.setDescription(entity.getDescription()); model.setLocked(entity.isLocked()); model.setDefaultPolicy(entity.isDefaultPolicy()); if (entity.getParameterMap() != null && !entity.getParameterMap().isEmpty()) { model.setProperties(CustomPropertiesParser.fromMap(entity.getParameterMap())); } return model; }
Source:
<code>protected void configure(HttpSecurity http) throws Exception { http.addFilterAfter(strongboxAuthenticationFilter(), ExceptionTranslationFilter.class) .sessionManagement() .sessionCreationPolicy(SessionCreationPolicy.STATELESS) .and() .exceptionHandling() .accessDeniedHandler(accessDeniedHandler()) .authenticationEntryPoint(customBasicAuthenticationEntryPoint()) .and() .authorizeRequests() .requestMatchers(EndpointRequest.toAnyEndpoint()) <START> .hasAuthority("ADMIN") <END> .and() .anonymous() .authenticationFilter(anonymousAuthenticationFilter()) .and() .cors() .and() .csrf() .disable(); }</code><technical_language>@ptirador this defined application.properties management.security.role=ADMIN</technical_language>

Target:
protected void configure(HttpSecurity http) throws Exception { http.addFilterAfter(strongboxAuthenticationFilter(), ExceptionTranslationFilter.class) .sessionManagement() .sessionCreationPolicy(SessionCreationPolicy.STATELESS) .and() .exceptionHandling() .accessDeniedHandler(accessDeniedHandler()) .authenticationEntryPoint(customBasicAuthenticationEntryPoint()) .and() .anonymous() .authenticationFilter(anonymousAuthenticationFilter()) .and() .cors() .and() .csrf() .disable(); }
Source:
<code>protected Stream<? extends DomainEventData<?>> readEventData(String aggregateIdentifier, long firstSequenceNumber) { logger.debug("Reading events for aggregate id {}", aggregateIdentifier); EventChannel eventChannel = connectionManager.getConnection(context).eventChannel(); AggregateEventStream aggregateStream; if (firstSequenceNumber >= 0) { aggregateStream = eventChannel.openAggregateStream(aggregateIdentifier, firstSequenceNumber); } else if (firstSequenceNumber == ALLOW_SNAPSHOTS_MAGIC_VALUE && !snapshotFilterSet) { <START> aggregateStream = eventChannel.openAggregateStream(aggregateIdentifier, true); <END> } else { aggregateStream = eventChannel.openAggregateStream(aggregateIdentifier); } return aggregateStream.asStream().map(GrpcBackedDomainEventData::new); }</code><technical_language>if calls eventChannel.openAggregateStream(aggregateIdentifier) wich calls .openAggregateStream(aggregateIdentifier,true) , of this branche</technical_language>

Target:
protected Stream<? extends DomainEventData<?>> readEventData(String aggregateIdentifier, long firstSequenceNumber) { logger.debug("Reading events for aggregate id {}", aggregateIdentifier); EventChannel eventChannel = connectionManager.getConnection(context).eventChannel(); AggregateEventStream aggregateStream; if (firstSequenceNumber >= 0) { aggregateStream = eventChannel.openAggregateStream(aggregateIdentifier, firstSequenceNumber); } else if (firstSequenceNumber == ALLOW_SNAPSHOTS_MAGIC_VALUE && !snapshotFilterSet) { aggregateStream = eventChannel.openAggregateStream(aggregateIdentifier); } else { aggregateStream = eventChannel.openAggregateStream(aggregateIdentifier, WITHOUT_SNAPSHOTS); } return aggregateStream.asStream().map(GrpcBackedDomainEventData::new); }
Source:
<code>private FileChannel createSpillingChannel() throws IOException { if (spillFile != null) { throw new IllegalStateException("Spilling file already exists."); } int maxAttempts = 10; for (int attempt = 0; attempt < maxAttempts; attempt++) { int dirIndex = rnd.nextInt(tempDirs.length); String directory = tempDirs[dirIndex]; File file = new File(directory, randomString(rnd) + ".inputchannel"); try { if (file.createNewFile()) { spillFile = new RefCountedFile(file); return new RandomAccessFile(file, "rw").getChannel(); } } catch (IOException e) { if (tempDirs.length <= 1) { throw e; } LOG.warn("Caught an IOException when creating spill file: " + directory + ". Attempt " + attempt, e); <START> tempDirs = (String[]) ArrayUtils.remove(tempDirs, dirIndex); <END> } } throw new IOException( "Could not find a unique file channel name in '" + Arrays.toString(tempDirs) + "' for spilling large records during deserialization."); }</code><technical_language>If settle trivial approach problem (without temporary blacklisting), I remove failed dir tempDir, re-try next time</technical_language>

Target:
private FileChannel createSpillingChannel() throws IOException { if (spillFile != null) { throw new IllegalStateException("Spilling file already exists."); } int maxAttempts = 10; int initialDirIndex = rnd.nextInt(tempDirs.length); for (int attempt = 0; attempt < maxAttempts; attempt++) { int dirIndex = (initialDirIndex + attempt) % tempDirs.length; String directory = tempDirs[dirIndex]; File file = new File(directory, randomString(rnd) + ".inputchannel"); try { if (file.createNewFile()) { spillFile = new RefCountedFile(file); return new RandomAccessFile(file, "rw").getChannel(); } } catch (IOException e) { if (tempDirs.length <= 1) { throw e; } LOG.warn("Caught an IOException when creating spill file: " + directory + ". Attempt " + attempt, e); tempDirs = (String[]) ArrayUtils.remove(tempDirs, dirIndex); } } throw new IOException( "Could not find a unique file channel name in '" + Arrays.toString(tempDirs) + "' for spilling large records during deserialization."); }
Source:
<code>public QueueDepthTracker(long siteId, LinkedTransferQueue<SiteTasker> tasks) { super(siteId, false); <START> m_historicalData = new ConcurrentLinkedDeque<>(); <END> m_depth = new AtomicInteger(tasks.size()); m_lastWaitTime = 0; m_maxWaitLastLogTime = System.nanoTime(); m_recentMaxWaitTime = 0; m_recentTotalWaitTime = 0; m_recentPollCount = 0; m_tasks = tasks; }</code><technical_language>ArrayBlockingQueue do here. good performance max size of this queue. writer reader</technical_language>

Target:
public QueueDepthTracker(long siteId, LinkedTransferQueue<SiteTasker> tasks) { super(siteId, false); m_historicalData = new ArrayBlockingQueue<>(10); m_depth = new AtomicInteger(tasks.size()); m_lastWaitTime = 0; m_maxWaitLastLogTime = System.nanoTime(); m_recentMaxWaitTime = 0; m_recentTotalWaitTime = 0; m_recentPollCount = 0; m_tasks = tasks; }
Source:
<code>private Map<String, ResourceAssignment> getBaselineAssignment( AssignmentMetadataStore assignmentMetadataStore, CurrentStateOutput currentStateOutput, Set<String> resources) throws HelixRebalanceException { Map<String, ResourceAssignment> currentBaseline; try { currentBaseline = assignmentMetadataStore.getBaseline(); if (currentBaseline.isEmpty()) { LOG.warn( "The current baseline assignment record is empty. Use the current states instead."); currentBaseline = getCurrentStateAssingment(currentStateOutput, resources); } <START> } catch (Exception ex) { <END> throw new HelixRebalanceException( "Failed to get the current baseline assignment because of unexpected error.", HelixRebalanceException.Type.INVALID_REBALANCER_STATUS, ex); } return currentBaseline; }</code><technical_language>Pls catch a more specific exception</technical_language>

Target:
private Map<String, ResourceAssignment> getBaselineAssignment( AssignmentMetadataStore assignmentMetadataStore, CurrentStateOutput currentStateOutput, Set<String> resources) throws HelixRebalanceException { Map<String, ResourceAssignment> currentBaseline = Collections.emptyMap(); if (assignmentMetadataStore != null) { try { currentBaseline = assignmentMetadataStore.getBaseline(); } catch (HelixException ex) { LOG.error("Failed to get the current baseline assignment.", ex); } catch (Exception ex) { throw new HelixRebalanceException( "Failed to get the current baseline assignment because of unexpected error.", HelixRebalanceException.Type.INVALID_REBALANCER_STATUS, ex); } } if (currentBaseline.isEmpty()) { LOG.warn( "The current baseline assignment record is empty. Use the current states instead."); currentBaseline = getCurrentStateAssingment(currentStateOutput, resources); } return currentBaseline; }
Source:
<code>private int predictSerializedSize() { int size = 0; size += 4; size += 1; size += 3; size += super.region.name().length; size += 1; size += 1; size += 1; size += 3; size += start_key.length; size += 3; size += stop_key.length; <START> size += 1; END> size += 4; size += 4; size += 4; size += 1; size += 1; if (filter != null) { size += filter.predictSerializedSize(); } size += 8; size += 8; size += 1; size += 4; if (families != null) { size += families.length; for (int i = 0; i < families.length; i++) { byte[] family = families[i]; size += family.length; size += 4; if (qualifiers != null && qualifiers[i] != null) { size += 3 * qualifiers[i].length; for (byte[] qualifier : qualifiers[i]) { size += qualifier.length; } } } } return size; }</code><technical_language>Nit: need this hear pre-protobuf versions support reverse scanning :)</technical_language>

Target:
private int predictSerializedSize() { int size = 0; size += 4; size += 1; size += 3; size += super.region.name().length; size += 1; size += 1; size += 1; size += 3; size += start_key.length; size += 3; size += stop_key.length; size += 4; size += 4; size += 4; size += 1; size += 1; if (filter != null) { size += filter.predictSerializedSize(); } size += 8; size += 8; size += 1; size += 4; if (families != null) { size += families.length; for (int i = 0; i < families.length; i++) { byte[] family = families[i]; size += family.length; size += 4; if (qualifiers != null && qualifiers[i] != null) { size += 3 * qualifiers[i].length; for (byte[] qualifier : qualifiers[i]) { size += qualifier.length; } } } } return size; }
Source:
<code>public void selectAll(){ <START> for(int i = 0; i < mAdapter.getCount(); i++) { <END> File file = (File) mAdapter.getItem(i); if(!file.isDirectory()){ ((ImageView) getView().findViewById(R.id.custom_checkbox)).setImageResource(R.drawable.ic_checkbox_marked); mCurrentListView.setItemChecked(i,true); mAdapter.checkFile(file); } } mAdapter.notifyDataSetChanged(); }</code><technical_language>Some spaces for if in this method selectInverse()</technical_language>

Target:
public void selectAll() { for (int i = 0; i < mAdapter.getCount(); i++) { File file = (File) mAdapter.getItem(i); if (!file.isDirectory() && !mAdapter.isAlreadyChecked(file)) { ((ImageView) getView().findViewById(R.id.custom_checkbox)).setImageResource(R.drawable.ic_checkbox_marked); mCurrentListView.setItemChecked(i, true); mAdapter.checkFile(file); } } mAdapter.notifyDataSetChanged(); }
Source:
<code>public void shouldRaiseAlertWithLowConfidenceIfTestedUrlRespondsOkWithoutRelevantBinContent() throws HttpMalformedHeaderException { String servePath = "/shouldAlert"; String testPath = ".DS_Store"; String validDSStoreBinString = new String(new byte[] {0, 0, 0, 1, 'B', 'u', 'd', '1'}, StandardCharsets.US_ASCII); <START> String inValidDSStoreBinString = <END> new String(new byte[] {0, 0, 0, 2, 'B', 'u', 'd', '2'}, StandardCharsets.US_ASCII); HiddenFile hiddenFile = new HiddenFile( testPath, Collections.emptyList(), Collections.emptyList(), validDSStoreBinString, Collections.emptyList(), "ds_store"); this.nano.addHandler(new OkResponse(servePath)); this.nano.addHandler(new OkBinResponse('/' + testPath, inValidDSStoreBinString)); HttpMessage msg = this.getHttpMessage(servePath); rule.init(msg, this.parent); HiddenFilesScanRule.addTestPayload(hiddenFile); rule.scan(); assertThat(alertsRaised, hasSize(1)); Alert alert = alertsRaised.get(0); assertEquals(1, httpMessagesSent.size()); assertEquals(Alert.RISK_MEDIUM, alertsRaised.get(0).getRisk()); assertEquals(Alert.CONFIDENCE_LOW, alertsRaised.get(0).getConfidence()); assertEquals(rule.getReference(), alert.getReference()); }</code><technical_language>invalid</technical_language>

Target:
public void shouldRaiseAlertWithLowConfidenceIfTestedUrlRespondsOkWithoutRelevantBinContent() throws HttpMalformedHeaderException { String servePath = "/shouldAlert"; String testPath = ".DS_Store"; String validDSStoreBinString = new String(new byte[] {0, 0, 0, 1, 'B', 'u', 'd', '1'}, StandardCharsets.US_ASCII); String invalidDSStoreBinString = new String(new byte[] {0, 0, 0, 2, 'B', 'u', 'd', '2'}, StandardCharsets.US_ASCII); HiddenFile hiddenFile = new HiddenFile( testPath, Collections.emptyList(), Collections.emptyList(), validDSStoreBinString, Collections.emptyList(), "ds_store"); this.nano.addHandler(new OkResponse(servePath)); this.nano.addHandler(new OkBinResponse('/' + testPath, invalidDSStoreBinString)); HttpMessage msg = this.getHttpMessage(servePath); rule.init(msg, this.parent); HiddenFilesScanRule.addTestPayload(hiddenFile); rule.scan(); assertThat(alertsRaised, hasSize(1)); Alert alert = alertsRaised.get(0); assertEquals(1, httpMessagesSent.size()); assertEquals(Alert.RISK_MEDIUM, alertsRaised.get(0).getRisk()); assertEquals(Alert.CONFIDENCE_LOW, alertsRaised.get(0).getConfidence()); assertEquals(rule.getReference(), alert.getReference()); }
Source:
<code>public void killOlderThan(final long timestamp) throws IOException { File taskLogDir = config.getDirectory(); <START> if (taskLogDir.exists()) { <END> File[] files = taskLogDir.listFiles( new FileFilter() { @Override public boolean accept(File f) { return f.lastModified() < timestamp; } } ); for (File file : files) { log.info("Deleting local task log [%s].", file.getAbsolutePath()); FileUtils.forceDelete(file); if (Thread.currentThread().isInterrupted()) { throw new IOException( new InterruptedException("Thread interrupted. Couldn't delete all tasklogs.") ); } } } }</code><technical_language>suggest && taskLogDir.isDirectory()</technical_language>

Target:
public void killOlderThan(final long timestamp) throws IOException { File taskLogDir = config.getDirectory(); if (taskLogDir.exists()) { if (!taskLogDir.isDirectory()) { throw new IOException(String.format("taskLogDir [%s] must be a directory.", taskLogDir)); } File[] files = taskLogDir.listFiles( new FileFilter() { @Override public boolean accept(File f) { return f.lastModified() < timestamp; } } ); for (File file : files) { log.info("Deleting local task log [%s].", file.getAbsolutePath()); FileUtils.forceDelete(file); if (Thread.currentThread().isInterrupted()) { throw new IOException( new InterruptedException("Thread interrupted. Couldn't delete all tasklogs.") ); } } } }
Source:
<code>protected void prepareRoleForCommand() { roles role = getRole(); role.setId(Guid.NewGuid()); <START> role.setInheritable(false); <END> for (ActionGroup group : getParameters().getActionGroups()) { if (group.isInheritable()) { role.setInheritable(true); break; } } }</code><technical_language>a show stopper I setting property role is in 1. admin ability configure a role (Action group is a building block admin interact with) 2. easier impl - need consider underlying roles naming - suggest allowView... something. is inheritance</technical_language>

Target:
protected void prepareRoleForCommand() { roles role = getRole(); role.setId(Guid.NewGuid()); role.setAllowsViewingChildren(false); for (ActionGroup group : getParameters().getActionGroups()) { if (group.allowsViewingChildren()) { role.setAllowsViewingChildren(true); break; } } }
Source:
<code>public synchronized long receive( long ticket, T batch ) { long time = nanoTime(); applyProcessorCount(); while ( queuedBatches.get() >= maxQueueLength ) { PARK.park( receiverThread = Thread.currentThread() ); <START> } <END> queuedBatches.incrementAndGet(); Unit unit = new Unit( ticket, batch, numberOfForkedProcessors ); Unit myHead = head.getAndSet( unit ); myHead.next = unit; return nanoTime() - time; }</code><technical_language>I avoid synchronising this method if pulled top-level if-clause applyProcessorCount here, guarded checking a StampedLock read/write locks. read-lock for checking if a processor change is necessary, upgrade a write-lock if need apply processor count changes. I suppose this done in applyProcessorCount simple</technical_language>

Target:
public long receive( long ticket, T batch ) { long time = nanoTime(); while ( queuedBatches.get() >= maxQueueLength ) { PARK.park( receiverThread = Thread.currentThread() ); } long lock = applyProcessorCount( stripingLock.readLock() ); queuedBatches.incrementAndGet(); Unit unit = new Unit( ticket, batch, numberOfForkedProcessors ); Unit myHead = head.getAndSet( unit ); myHead.next = unit; stripingLock.unlock( lock ); return nanoTime() - time; }
Source:
<code>public boolean templatesExist() { String groupFileName = CodeGenerator.TEMPLATE_ROOT + "/" + getLanguage() + "/" + getLanguage() + STGroup.GROUP_FILE_EXTENSION; URL url = Thread.currentThread().getContextClassLoader().getResource(groupFileName); STGroup result = null; try { <START> result = new STGroupFile(url); <END> } catch (IllegalArgumentException iae) { result = null; } return result!=null; }</code><technical_language>STGroupFile's ctor calls getURL() getResource thing. additional functionality providing? i.e., ST4 wrong? shoulda fixed in ST4 :)</technical_language>

Target:
public boolean templatesExist() { String groupFileName = CodeGenerator.TEMPLATE_ROOT + "/" + getLanguage() + "/" + getLanguage() + STGroup.GROUP_FILE_EXTENSION; STGroup result = null; try { result = new STGroupFile(groupFileName); } catch (IllegalArgumentException iae) { result = null; } return result!=null; }
Source:
<code>protected static Ds3Type toDs3Type(final String componentType) { if (isEmpty(componentType)) { throw new IllegalArgumentException("Cannot generate Ds3Type from empty response component type"); } return new Ds3Type( componentType + NAMESPACE_ARRAY_RESPONSE_TYPES, ImmutableList.of( new Ds3Element( stripPath(componentType), "array", componentType, <START> null)), <END> null); }</code><technical_language>Ds3Element optional constructor require this extra null param</technical_language>

Target:
protected static Ds3Type toDs3Type(final String componentType) { if (isEmpty(componentType)) { throw new IllegalArgumentException("Cannot generate Ds3Type from empty response component type"); } return new Ds3Type( componentType + NAMESPACE_ARRAY_RESPONSE_TYPES, ImmutableList.of( new Ds3Element( stripPath(componentType), "array", componentType))); }
Source:
<code>public <T> InvocationHandler<T> apply(T next) { return new InvocationHandler<T>(next) { @Override public Object invoke(Method method, Object receiver, Object[] args) throws Throwable { System.out.printf("==== CALLING %s.%s ====\n", method.getDeclaringClass().getName(), method.getName()); if(method.getName() == "buyAlbum"){ throw new FRateLimitException("rate limit exceeded"); <START> } <END> Object ret = method.invoke(receiver, args); System.out.printf("==== CALLED %s.%s ====\n", method.getDeclaringClass().getName(), method.getName()); return ret; } }; }</code><technical_language>want this in example</technical_language>

Target:
public <T> InvocationHandler<T> apply(T next) { return new InvocationHandler<T>(next) { @Override public Object invoke(Method method, Object receiver, Object[] args) throws Throwable { System.out.printf("==== CALLING %s.%s ====\n", method.getDeclaringClass().getName(), method.getName()); Object ret = method.invoke(receiver, args); System.out.printf("==== CALLED %s.%s ====\n", method.getDeclaringClass().getName(), method.getName()); return ret; } }; }
Source:
<code>protected void writeContent(AsyncWritableChannel writeChannel, ReadIntoCallbackWrapper callbackWrapper, HttpContent httpContent) { boolean retained = false; ByteBuffer[] contentBuffers; Callback<Long>[] writeCallbacks; boolean isLast = httpContent instanceof LastHttpContent; if (httpContent.content().nioBufferCount() > 0) { ReferenceCountUtil.retain(httpContent); retained = true; contentBuffers = httpContent.content().nioBuffers(); writeCallbacks = new ContentWriteCallback[contentBuffers.length]; int i = 0; for (; i < contentBuffers.length - 1; i++) { writeCallbacks[i] = new ContentWriteCallback(null, false, callbackWrapper); } writeCallbacks[i] = new ContentWriteCallback(httpContent, isLast, callbackWrapper); } else { nettyMetrics.contentCopyCount.inc(); logger.warn("HttpContent had to be copied because ByteBuf did not have a backing ByteBuffer"); ByteBuffer contentBuffer = ByteBuffer.allocate(httpContent.content().readableBytes()); httpContent.content().readBytes(contentBuffer); ContentWriteCallback writeCallback = new ContentWriteCallback(null, isLast, callbackWrapper); contentBuffers = new ByteBuffer[]{contentBuffer}; writeCallbacks = new ContentWriteCallback[]{writeCallback}; } boolean asyncWritesCalled = false; try { for (int i = 0; i < contentBuffers.length; i++) { writeChannel.write(contentBuffers[i], writeCallbacks[i]); } asyncWritesCalled = true; } finally { <START> if (retained && !asyncWritesCalled) { <END> ReferenceCountUtil.release(httpContent); } } }</code><technical_language>incase of (httpContent.content().nioBufferCount()> 0), this result in negative</technical_language>

Target:
protected void writeContent(AsyncWritableChannel writeChannel, ReadIntoCallbackWrapper callbackWrapper, HttpContent httpContent) { boolean retained = false; ByteBuffer[] contentBuffers; Callback<Long>[] writeCallbacks; boolean isLast = httpContent instanceof LastHttpContent; if (httpContent.content().nioBufferCount() > 0) { httpContent = ReferenceCountUtil.retain(httpContent); retained = true; contentBuffers = httpContent.content().nioBuffers(); writeCallbacks = new ContentWriteCallback[contentBuffers.length]; int i = 0; for (; i < contentBuffers.length - 1; i++) { writeCallbacks[i] = new ContentWriteCallback(null, false, callbackWrapper); } writeCallbacks[i] = new ContentWriteCallback(httpContent, isLast, callbackWrapper); } else { nettyMetrics.contentCopyCount.inc(); logger.warn("HttpContent had to be copied because ByteBuf did not have a backing ByteBuffer"); ByteBuffer contentBuffer = ByteBuffer.allocate(httpContent.content().readableBytes()); httpContent.content().readBytes(contentBuffer); ContentWriteCallback writeCallback = new ContentWriteCallback(null, isLast, callbackWrapper); contentBuffers = new ByteBuffer[]{contentBuffer}; writeCallbacks = new ContentWriteCallback[]{writeCallback}; } boolean asyncWritesCalled = false; try { for (int i = 0; i < contentBuffers.length; i++) { writeChannel.write(contentBuffers[i], writeCallbacks[i]); } asyncWritesCalled = true; } finally { if (retained && !asyncWritesCalled) { ReferenceCountUtil.release(httpContent); } } }
Source:
<code>public void onCreate(Bundle icicle) { super.onCreate(icicle); String histFile = getArguments().getString(EXTRA_STATS); mStats = BatteryStatsHelper.statsFromFile(getActivity(), histFile); mBatteryBroadcast = getArguments().getParcelable(EXTRA_BROADCAST); TypedValue value = new TypedValue(); getContext().getTheme().resolveAttribute(android.R.attr.colorAccent, value, true); int accentColor = getContext().getColor(value.resourceId); if (!Utils.isWifiOnly(getContext())) { mHavePhoneSignal = true; <START> } <END> mChargingParser = new BatteryFlagParser(accentColor, false, HistoryItem.STATE_BATTERY_PLUGGED_FLAG); mScreenOn = new BatteryFlagParser(accentColor, false, HistoryItem.STATE_SCREEN_ON_FLAG); mGpsParser = new BatteryFlagParser(accentColor, false, HistoryItem.STATE_GPS_ON_FLAG); mFlashlightParser = new BatteryFlagParser(accentColor, true, HistoryItem.STATE2_FLASHLIGHT_FLAG); mCameraParser = new BatteryFlagParser(accentColor, true, HistoryItem.STATE2_CAMERA_FLAG); mWifiParser = new BatteryWifiParser(accentColor); mCpuParser = new BatteryFlagParser(accentColor, false, HistoryItem.STATE_CPU_RUNNING_FLAG); if (mHavePhoneSignal) { mPhoneParser = new BatteryCellParser(); } setHasOptionsMenu(true); }</code><technical_language>else { mShowCellSignal = false; }</technical_language>

Target:
public void onCreate(Bundle icicle) { super.onCreate(icicle); String histFile = getArguments().getString(EXTRA_STATS); mStats = BatteryStatsHelper.statsFromFile(getActivity(), histFile); mBatteryBroadcast = getArguments().getParcelable(EXTRA_BROADCAST); TypedValue value = new TypedValue(); getContext().getTheme().resolveAttribute(android.R.attr.colorAccent, value, true); int accentColor = getContext().getColor(value.resourceId); if (!Utils.isWifiOnly(getContext())) { mShowCellSignal = true; } else { mShowCellSignal = false; } mChargingParser = new BatteryFlagParser(accentColor, false, HistoryItem.STATE_BATTERY_PLUGGED_FLAG); mScreenOn = new BatteryFlagParser(accentColor, false, HistoryItem.STATE_SCREEN_ON_FLAG); mGpsParser = new BatteryFlagParser(accentColor, false, HistoryItem.STATE_GPS_ON_FLAG); mFlashlightParser = new BatteryFlagParser(accentColor, true, HistoryItem.STATE2_FLASHLIGHT_FLAG); mCameraParser = new BatteryFlagParser(accentColor, true, HistoryItem.STATE2_CAMERA_FLAG); mWifiParser = new BatteryWifiParser(accentColor); mCpuParser = new BatteryFlagParser(accentColor, false, HistoryItem.STATE_CPU_RUNNING_FLAG); if (mShowCellSignal) { mPhoneParser = new BatteryCellParser(); } setHasOptionsMenu(true); }
Source:
<code>public Object optimize() { <START> checkState(optimize, "evaluate() not allowed for interpreter"); <END> return expression.accept(visitor, null); }</code><technical_language>I this is copied, error message sense. fix it</technical_language>

Target:
public Object optimize() { checkState(optimize, "optimize() not allowed for interpreter"); return expression.accept(visitor, null); }
Source:
<code>private KubernetesClient create(Config config) throws InfrastructureException { OkHttpClient clientHttpClient = httpClient.newBuilder().authenticator(Authenticator.NONE).build(); OkHttpClient.Builder builder = clientHttpClient.newBuilder(); builder.interceptors().clear(); clientHttpClient = builder .addInterceptor( new Interceptor() { @Override public Response intercept(Chain chain) throws IOException { Request request = chain.request(); <START> if (isNotNullOrEmpty(config.getUsername()) <END> && isNotNullOrEmpty(config.getPassword())) { Request authReq = chain .request() .newBuilder() .addHeader( "Authorization", Credentials.basic(config.getUsername(), config.getPassword())) .build(); return chain.proceed(authReq); } else if (isNotNullOrEmpty(config.getOauthToken())) { Request authReq = chain .request() .newBuilder() .addHeader("Authorization", "Bearer " + config.getOauthToken()) .build(); return chain.proceed(authReq); } return chain.proceed(request); } }) .build(); return new UnclosableKubernetesClient(clientHttpClient, config); }</code><technical_language>If mistaken this code is copied HttpClientUtils. If so, is incomplete copy. elaborate HttpClientUtils instead of this code? If is specific reason I suggest original code. is error-prone in case of changes in k8s API</technical_language>

Target:
private KubernetesClient create(Config config) throws InfrastructureException { OkHttpClient clientHttpClient = httpClient.newBuilder().authenticator(Authenticator.NONE).build(); OkHttpClient.Builder builder = clientHttpClient.newBuilder(); builder.interceptors().clear(); clientHttpClient = builder.addInterceptor(buildKubernetesInterceptor(config)).build(); return new UnclosableKubernetesClient(clientHttpClient, config); }
Source:
<code>private void rSyntaxTextAreaKeyReleased(java.awt.event.KeyEvent evt) { <START> getEditorState().setDirty(true); <END> getEditorState().setModified(true); }</code><technical_language>need getter in this class. change editorState.setDirty(true). This applies "getEditorState()" in THIS class</technical_language>

Target:
private void rSyntaxTextAreaKeyReleased(java.awt.event.KeyEvent evt) { editorState.setDirty(true); editorState.setModified(true); }
Source:
<code><START> public Optional<ColumnMapper<?>> build(QualifiedType<?> type, ConfigRegistry config) { <END> return maps(mapper, config).equals(type) ? Optional.of(mapper) : Optional.empty(); }</code><technical_language>resolve Type construction, exceptions thrown early possible. qualifier lookup happen in build method though, satisfy purpose of this refactor</technical_language>

Target:
public Optional<ColumnMapper<?>> build(QualifiedType<?> type, ConfigRegistry config) { return maps.equals(type) ? Optional.of(mapper) : Optional.empty(); }
Source:
<code>public ColorPickerEditor(Composite parent, int style, int defaultColor) { this(parent, style); <START> doSetColor(defaultColor); <END> }</code><technical_language>this.defaultColor set well. Otherwise, pressing "Default" reset color Black</technical_language>

Target:
public ColorPickerEditor(Composite parent, int style, int defaultColor) { this(parent, style); this.defaultColor = defaultColor; doSetColor(defaultColor); }
Source:
<code>private Filter<?>[] getIncludeAndExcludeFilters() { List<Filter<?>> filters = new ArrayList<>(); Optional<List<String>> includes = getGroupOrTags(getPropertiesList(INCLUDE_GROUPS), getPropertiesList(INCLUDE_TAGS)); if (includes.isPresent()) { filters.add(TagFilter.includeTags(includes.get())); } Optional<List<String>> excludes = getGroupOrTags(getPropertiesList(EXCLUDE_GROUPS), getPropertiesList(EXCLUDE_TAGS)); if (excludes.isPresent()) { filters.add(TagFilter.excludeTags(excludes.get())); } <START> return filters.toArray(new Filter<?>[0]); <END> }</code><technical_language>Replace 0 filters.size()</technical_language>

Target:
private Filter<?>[] getIncludeAndExcludeFilters() { List<Filter<?>> filters = new ArrayList<>(); Optional<List<String>> includes = getGroupsOrTags(getPropertiesList(INCLUDE_GROUPS), getPropertiesList(INCLUDE_TAGS)); if (includes.isPresent()) { filters.add(TagFilter.includeTags(includes.get())); } Optional<List<String>> excludes = getGroupsOrTags(getPropertiesList(EXCLUDE_GROUPS), getPropertiesList(EXCLUDE_TAGS)); if (excludes.isPresent()) { filters.add(TagFilter.excludeTags(excludes.get())); } return filters.toArray(new Filter<?>[filters.size()]); }
Source:
<code>public static String publicBodyLink(String publicBodyId){ <START> return UriBuilder.fromPath("<LINK_0>").path(publicBodyId).build().toString(); <END> }</code><technical_language>this url hardcoded? link rendering code for field links</technical_language>

Target:
public static String publicBodyLink(String publicBodyId){ return new LinkValue("public-body", publicBodyId).link(); }
Source:
<code>Map<String, FixedLengthAudioStream> getMultiTimeStreams() { <START> return multiTimeStreams; <END> }</code><technical_language>If need map in test check if entry is removed not, I prefer return unmodifiable view of collection ensure a caller (also test case) change private member (easily)</technical_language>

Target:
Map<String, FixedLengthAudioStream> getMultiTimeStreams() { return Collections.unmodifiableMap(multiTimeStreams); }
Source:
<code><START> public UnsupportedFilterException(List<FilterSupportStatus> filterSupportStatuses) { <END> super(String.format( "Unsupported filters encountered: %s", STATUS_JOINER.join(filterSupportStatuses))); this.filterSupportStatuses = filterSupportStatuses; }</code><technical_language>Do need input list is non-empty</technical_language>

Target:
public UnsupportedFilterException(List<FilterSupportStatus> filterSupportStatuses) { super(String.format( "Unsupported filters encountered: %s", STATUS_JOINER.join(filterSupportStatuses))); Preconditions.checkArgument( !filterSupportStatuses.isEmpty(), "Unsupported statuses should not be empty."); this.filterSupportStatuses = filterSupportStatuses; }
Source:
<code>private ExtMap processAuthnResult(ExtMap outMap, String operation) { if (outMap.<Integer> get(Base.InvokeKeys.RESULT) != Base.InvokeResult.SUCCESS) { throw new RuntimeException( String.format( "Base.InvokeResult code is: %1$s. Invocation of %2$s failed.", outMap.<Integer> get(Base.InvokeKeys.RESULT), operation ) ); } <START> logger.info(String.format("Successful invocation of %1$s", operation)); <END> if (outMap.<Integer> get(Authn.InvokeKeys.RESULT) != Authn.AuthResult.SUCCESS) { throw new RuntimeException( String.format( "Authn.Result code is: %1$s", outMap.<Integer> get(Authn.InvokeKeys.RESULT) ) ); } logger.info("AuthnRecord: {}", outMap.get(Authn.InvokeKeys.AUTH_RECORD)); return outMap.get(Authn.InvokeKeys.AUTH_RECORD); }</code><technical_language>please {}</technical_language>

Target:
private ExtMap processAuthnResult(ExtMap outMap, String operation) { if (outMap.<Integer> get(Base.InvokeKeys.RESULT) != Base.InvokeResult.SUCCESS) { throw new RuntimeException( String.format( "Base.InvokeResult code is: %1$s. Invocation of %2$s failed.", outMap.<Integer> get(Base.InvokeKeys.RESULT), operation ) ); } log.info("Successful invocation of {}", operation); if (outMap.<Integer> get(Authn.InvokeKeys.RESULT) != Authn.AuthResult.SUCCESS) { throw new RuntimeException( String.format( "Authn.Result code is: %1$s", outMap.<Integer> get(Authn.InvokeKeys.RESULT) ) ); } log.info("AuthnRecord: {}", outMap.get(Authn.InvokeKeys.AUTH_RECORD)); return outMap.get(Authn.InvokeKeys.AUTH_RECORD); }
Source:
<code>private int generateNumOfChoicesForStudentsExcludingSelf(String courseId) { <START> List<StudentAttributes> copyOfStudentList = <END> StudentsLogic.inst().getStudentsForCourse(courseId); return copyOfStudentList.size() - 1; }</code><technical_language>This is a copyOf, is it</technical_language>

Target:
private int generateNumOfChoicesForStudentsExcludingSelf(String courseId) { List<StudentAttributes> studentList = StudentsLogic.inst().getStudentsForCourse(courseId); return studentList.size() - 1; }
Source:
<code>public EList<IBuildPlan> getPlanAndAllChildren() { <START> return new BasicEList<IBuildPlan>( <END> Stream.concat(Stream.of(this), getChildren().stream().flatMap(IBuildPlan::flattened)) .collect(Collectors.toList())); }</code><technical_language>I need EList</technical_language>

Target:
public List<IBuildPlan> getPlanAndAllChildren() { return Stream.concat(Stream.of(this), getChildren().stream().flatMap(IBuildPlan::flattened)) .collect(Collectors.toList()); }
Source:
<code>private SingularityLoadBalancerUpdate sendRequestWrapper(LoadBalancerRequestId loadBalancerRequestId, LoadBalancerMethod method, Request request, BaragonRequestState onFailure) { final long start = System.currentTimeMillis(); final LoadBalancerUpdateHolder result = sendRequest(loadBalancerRequestId, request, onFailure); if ((method != LoadBalancerMethod.CHECK_STATE && method != LoadBalancerMethod.PRE_ENQUEUE) && result.state == BaragonRequestState.FAILED && result.message.orElse("").contains("is already enqueued with different parameters")) { <START> LOG.info("Baragon request already in the queue, will fetch current state instead", loadBalancerRequestId.getId()); <END> return sendRequestWrapper(loadBalancerRequestId, LoadBalancerMethod.CHECK_STATE, request, onFailure); } LOG.debug("LB request had result after {}", request.getMethod(), loadBalancerRequestId, result, JavaUtils.duration(start)); return new SingularityLoadBalancerUpdate(result.state, loadBalancerRequestId, result.message, start, method, Optional.of(request.getUrl())); }</code><technical_language>Bit of a nit, is cleaner check for this state other matching message string? if do do a string match, put string a constant somewhere</technical_language>

Target:
private SingularityLoadBalancerUpdate sendRequestWrapper(LoadBalancerRequestId loadBalancerRequestId, LoadBalancerMethod method, Request request, BaragonRequestState onFailure) { final long start = System.currentTimeMillis(); final LoadBalancerUpdateHolder result = sendRequest(loadBalancerRequestId, request, onFailure); if ((method != LoadBalancerMethod.CHECK_STATE && method != LoadBalancerMethod.PRE_ENQUEUE) && result.state == BaragonRequestState.FAILED && result.message.orElse("").contains(ALREADY_ENQUEUED_ERROR)) { LOG.info("Baragon request already in the queue, will fetch current state instead", loadBalancerRequestId.getId()); return sendRequestWrapper(loadBalancerRequestId, LoadBalancerMethod.CHECK_STATE, request, onFailure); } LOG.debug("LB request had result after {}", request.getMethod(), loadBalancerRequestId, result, JavaUtils.duration(start)); return new SingularityLoadBalancerUpdate(result.state, loadBalancerRequestId, result.message, start, method, Optional.of(request.getUrl())); }
Source:
<code>public Response totpKeyGenLocal(@Context HttpServletRequest request) { TOTPManager totpManager = (TOTPManager) PrivilegedCarbonContext.getThreadLocalCarbonContext().getOSGiService (TOTPManager.class); if (totpManager != null) { <START> String username = request.getParameter("username"); <END> TOTPDTO totpdto = null; try { totpdto = totpManager.generateTOTPKeyLocal(username); String json = createJsonPayload(totpdto.getSecretkey(), totpdto.getQRCodeURL()); return Response.ok(json, MediaType.APPLICATION_JSON_TYPE).build(); } catch (TOTPException e) { log.error("TOTPKeyGenerator endpoint could not generate keys for local user", e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity("Error when generating the key") .type(MediaType.APPLICATION_JSON_TYPE).build(); } } else { log.error("TOTPKeyGenerator endpoint could not generate keys for local user"); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity("Error when generating the key") .type(MediaType.APPLICATION_JSON_TYPE).build(); } }</code><technical_language>CharacterEncoder.getSafeText()</technical_language>

Target:
public Response totpKeyGenLocal(@Context HttpServletRequest request) { TOTPManager totpManager = (TOTPManager) PrivilegedCarbonContext.getThreadLocalCarbonContext().getOSGiService (TOTPManager.class); if (totpManager != null) { String username = CharacterEncoder.getSafeText(request.getParameter("username")); TOTPDTO totpdto = null; try { totpdto = totpManager.generateTOTPKeyLocal(username); String json = createJsonPayload(totpdto.getSecretkey(), totpdto.getQRCodeURL()); return Response.ok(json, MediaType.APPLICATION_JSON_TYPE).build(); } catch (TOTPException e) { log.error("TOTPKeyGenerator endpoint could not generate keys for local user", e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity("Error when generating the key") .type(MediaType.APPLICATION_JSON_TYPE).build(); } } else { log.error("TOTPKeyGenerator endpoint could not generate keys for local user"); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity("Error when generating the key") .type(MediaType.APPLICATION_JSON_TYPE).build(); } }
Source:
<code><START> public static String getRateLimiterImpl() { <END> return rateLimiterImpl; }</code><technical_language>I creating a couple of static fields is approach here..</technical_language>

Target:
public String getRateLimiterImpl() { if (rateLimiterImpl == null) { return System.getProperty("zookeeper." + RateLimiter.RATE_LIMITER_IMPL); } return rateLimiterImpl; }
Source:
<code>public void validate() { if (reaperWakeUpInterval < 0) throw new CacheConfigurationException("reaperWakeUpInterval must be > 0, we got " + reaperWakeUpInterval); if (completedTxTimeout < 0) throw new CacheConfigurationException("completedTxTimeout must be > 0, we got " + reaperWakeUpInterval); if(transactionProtocol == TransactionProtocol.TOTAL_ORDER) { if(transactionMode == TransactionMode.NON_TRANSACTIONAL) { throw new ConfigurationException("Total Order based protocol needs a transactional cache"); } if(!clustering().cacheMode().isReplicated() && !clustering().cacheMode().isDistributed()) { throw new ConfigurationException(clustering().cacheMode().friendlyCacheModeString() + " is not supported by Total Order based protocol"); } if (recovery.create().enabled()) { throw new ConfigurationException("Total Order based protocol not available with recovery"); <START> } <END> } }</code><technical_language>check locking mode is OPTIMISTIC</technical_language>

Target:
public void validate() { if (reaperWakeUpInterval < 0) throw new CacheConfigurationException("reaperWakeUpInterval must be > 0, we got " + reaperWakeUpInterval); if (completedTxTimeout < 0) throw new CacheConfigurationException("completedTxTimeout must be > 0, we got " + reaperWakeUpInterval); if(transactionProtocol == TransactionProtocol.TOTAL_ORDER) { if(transactionMode != TransactionMode.TRANSACTIONAL) { throw new ConfigurationException("Total Order based protocol not available in " + transactionMode +" cache"); } if(!clustering().cacheMode().isReplicated() && !clustering().cacheMode().isDistributed()) { throw new ConfigurationException(clustering().cacheMode().friendlyCacheModeString() + " is not supported by Total Order based protocol"); } if (recovery.create().enabled()) { throw new ConfigurationException("Total Order based protocol not available with recovery"); } if (lockingMode != LockingMode.OPTIMISTIC) { throw new ConfigurationException("Total Order based protocol not available with " + lockingMode); } } }
Source:
<code>public OvirtBreadCrumbsView(MainModelProvider<T, M> listModelProvider, MenuDetailsProvider menuDetailsProvider) { this.menuDetailsProvider = menuDetailsProvider; <START> initWidget(ViewUiBinder.uiBinder.createAndBindUi(this)); <END> this.listModelProvider = listModelProvider; }</code><technical_language>Nit-pick: for consistency, please move this.xx = xx; declarations top, actual logic, initWidget() call</technical_language>

Target:
public OvirtBreadCrumbsView(MainModelProvider<T, M> listModelProvider, MenuDetailsProvider menuDetailsProvider) { this.menuDetailsProvider = menuDetailsProvider; this.listModelProvider = listModelProvider; initWidget(ViewUiBinder.uiBinder.createAndBindUi(this)); }