auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void createStats() { <START> float heightHealthTexture = <END> activity.getResourceManager().getLoadedTextureRegion(R.drawable.onhealth).getHeight(); float scale = cameraSize.y * RELATIVE_HP_HEIGHT / heightHealthTexture; float widthHealthTexture = activity.getResourceManager().getLoadedTextureRegion(R.drawable.onhealth).getWidth() * scale; positionHitPoint = new PointF( (1 - RELATIVE_SCREEN_BORDER) * cameraSize.x - widthHealthTexture , RELATIVE_SCREEN_BORDER * cameraSize.y * scale); for (int i = 0; i < Player.FULL_HP; i++) { HitPoint hitPoint = new HitPoint( activity , this , positionHitPoint , scale); hitPoints.add(hitPoint); positionHitPoint.x -= RELATIVE_SPACE_BETWEEN_CONTROLS * cameraSize.x + widthHealthTexture; } scoreFont = FontFactory.create( activity.getEngine().getFontManager() , activity.getEngine().getTextureManager() , FONT_ATLAS_SIDE , FONT_ATLAS_SIDE , Typeface.create(Typeface.DEFAULT, Typeface.NORMAL) , heightHealthTexture * scale , true , Color.WHITE_ABGR_PACKED_INT); scoreFont.load(); textScore = new Text( positionHitPoint.x , positionHitPoint.y , scoreFont , "Score: 000000" , activity.getEngine().getVertexBufferObjectManager()); textScore.setPosition( positionHitPoint.x - textScore.getWidth() , RELATIVE_SCREEN_BORDER * cameraSize.y); this.attachChild(textScore); }</code><technical_language>healthTextureHeight</technical_language>

Target:
private void createStats() { float healthTextureHeight = activity.getResourceManager().getLoadedTextureRegion(R.drawable.onhealth).getHeight(); float scale = cameraSize.y * RELATIVE_HP_HEIGHT / healthTextureHeight; float healthTextureWidth = activity.getResourceManager().getLoadedTextureRegion(R.drawable.onhealth).getWidth() * scale; positionHitPoint = new PointF( (1 - RELATIVE_SCREEN_BORDER) * cameraSize.x - healthTextureWidth , RELATIVE_SCREEN_BORDER * cameraSize.y * scale); for (int i = 0; i < Player.FULL_HP; i++) { HealthIndicator healthIndicator = new HealthIndicator( activity , this , positionHitPoint , scale); healthIndicators.add(healthIndicator); positionHitPoint.x -= RELATIVE_SPACE_BETWEEN_CONTROLS * cameraSize.x + healthTextureWidth; } scoreFont = FontFactory.create( activity.getEngine().getFontManager() , activity.getEngine().getTextureManager() , FONT_ATLAS_SIDE , FONT_ATLAS_SIDE , Typeface.create(Typeface.DEFAULT, Typeface.NORMAL) , healthTextureHeight * scale , true , Color.WHITE_ABGR_PACKED_INT); scoreFont.load(); scoreText = new Text( positionHitPoint.x , positionHitPoint.y , scoreFont , activity.getResources().getString(R.string.SCORE) + ": 000000" , activity.getEngine().getVertexBufferObjectManager()); scoreText.setPosition( positionHitPoint.x - scoreText.getWidth() , RELATIVE_SCREEN_BORDER * cameraSize.y); this.attachChild(scoreText); }
Source:
<code>private void storeEvent(Map<String, Object> event, Date timestamp) { try { ObjectMapper m = new ObjectMapper(); StringWriter w = new StringWriter(); m.writeValue(w, event); BaseDAO<EventQueue> eventDao = new BaseDAO<EventQueue>(EventQueue.class); EventQueue eventQ = new EventQueue(); eventQ.setCreatedDateTime(timestamp); eventQ.setPayload(w.toString()); eventDao.save(eventQ); notifyLog(); } catch (Exception e) { logger.log(Level.SEVERE, "could not store " + event.get("eventType") <START> + " event. Error: " + e.toString()); <END> } }</code><technical_language>want call uses, Throwable parameter, want full stack trace</technical_language>

Target:
private void storeEvent(Map<String, Object> event, Date timestamp) { try { ObjectMapper m = new ObjectMapper(); StringWriter w = new StringWriter(); m.writeValue(w, event); BaseDAO<EventQueue> eventDao = new BaseDAO<EventQueue>(EventQueue.class); EventQueue eventQ = new EventQueue(); eventQ.setCreatedDateTime(timestamp); eventQ.setPayload(w.toString()); eventDao.save(eventQ); notifyLog(); } catch (Exception e) { logger.log(Level.SEVERE, "could not store " + event.get("eventType") + " event. Error: " + e.toString(), e); } }
Source:
<code>private static ImmutableList<Event> remap (final Map<TypeAndTime,Long> mapping,final ImmutableList<Event> originalEvents) { <START> final List<Event> mappedEvents = new ArrayList<>(); <END> for (final Event event : originalEvents) { final TypeAndTime typeAndTime = new TypeAndTime(event.getType(),event.getStartTimestamp()); final Long mappedTime = mapping.get(typeAndTime); if (mappedTime == null) { mappedEvents.add(event); continue; } mappedEvents.add(Event.createFromType( event.getType(), mappedTime, mappedTime + 60000L, event.getTimezoneOffset(), event.getDescription(), event.getSoundInfo(), event.getSleepDepth())); } return ImmutableList.copyOf(mappedEvents); }</code><technical_language>Style nitpick: Lists.newArrayList() instead of new ArrayList<>()</technical_language>

Target:
private static ImmutableList<Event> remap (final Map<TypeAndTime,Long> mapping,final ImmutableList<Event> originalEvents) { final List<Event> mappedEvents = Lists.newArrayList(); for (final Event event : originalEvents) { final TypeAndTime typeAndTime = new TypeAndTime(event.getType(),event.getStartTimestamp()); final Long mappedTime = mapping.get(typeAndTime); if (mappedTime == null) { mappedEvents.add(event); continue; } mappedEvents.add(Event.createFromType( event.getType(), mappedTime, mappedTime + 60000L, event.getTimezoneOffset(), event.getDescription(), event.getSoundInfo(), event.getSleepDepth())); } return ImmutableList.copyOf(mappedEvents); }
Source:
<code>public synchronized ClassLoader getClassLoader(ObjectId rulesId) { if (rulesId == null || rulesDir == null) { return null; } Reference<? extends ClassLoader> ref = classLoaderCache.get(rulesId); if (ref != null) { ClassLoader cl = ref.get(); if (cl != null) { return cl; } classLoaderCache.remove(rulesId); ref.enqueue(); } cleanCache(); File jarFile = new File(rulesDir, "rules-" + rulesId.getName() + ".jar"); if (!jarFile.isFile()) { return null; } ClassLoader defaultLoader = getClass().getClassLoader(); URL url; try { url = jarFile.toURI().toURL(); } catch (MalformedURLException e) { log.error("Path to rules jar is broken", e); return null; } <START> URL[] urls = new URL[]{url}; <END> ClassLoader urlLoader = new URLClassLoader(urls, defaultLoader); LoaderRef lRef = new LoaderRef(rulesId, urlLoader); classLoaderCache.put(rulesId, lRef); return urlLoader; }</code><technical_language>Eh, this variable is pointless. inline URLClassLoader constructor</technical_language>

Target:
public synchronized ClassLoader getClassLoader(ObjectId rulesId) { if (rulesId == null || rulesDir == null) { return null; } Reference<? extends ClassLoader> ref = classLoaderCache.get(rulesId); if (ref != null) { ClassLoader cl = ref.get(); if (cl != null) { return cl; } classLoaderCache.remove(rulesId); ref.enqueue(); } cleanCache(); File jarFile = new File(rulesDir, "rules-" + rulesId.getName() + ".jar"); if (!jarFile.isFile()) { return null; } ClassLoader defaultLoader = getClass().getClassLoader(); URL url; try { url = jarFile.toURI().toURL(); } catch (MalformedURLException e) { log.error("Path to rules jar is broken", e); return null; } ClassLoader urlLoader = new URLClassLoader(new URL[]{url}, defaultLoader); LoaderRef lRef = new LoaderRef(rulesId, urlLoader); classLoaderCache.put(rulesId, lRef); return urlLoader; }
Source:
<code>private static boolean shouldBeAloneOnLineWithAloneOrSinglelineOption(Details details, String targetSrcLine) { return !isAloneOnLine(details, targetSrcLine) && !isEmptyBody(details.lcurly) <START> && !isSingleLineBlock(details); <END> }</code><technical_language>This is longer re-ordered I assume resolved</technical_language>

Target:
private static boolean shouldBeAloneOnLineWithAloneOrSinglelineOption(Details details, String targetSrcLine) { return !isAloneOnLine(details, targetSrcLine) && !isSingleLineBlock(details) && !isEmptyBody(details.lcurly); }
Source:
<code>public boolean equals(Object object) { if (this == object) { return true; } if (object instanceof Account) { <START> final Account other = Account.class.cast(object); <END> return equal(getContainerCount(), other.getContainerCount()) && equal(getObjectCount(), other.getObjectCount()) && equal(getBytesUsed(), other.getBytesUsed()) && equal(getMetadata(), other.getMetadata()); } else { return false; } }</code><technical_language>Do want cast operator instead of class cast method: <LINK_0></technical_language>

Target:
public boolean equals(Object object) { if (this == object) return true; if (object == null || getClass() != object.getClass()) return false; Account that = Account.class.cast(object); return Objects.equal(this.containerCount, that.containerCount) && Objects.equal(this.objectCount, that.objectCount) && Objects.equal(this.bytesUsed, that.bytesUsed) && Objects.equal(this.getTransactionId(), that.getTransactionId()); }
Source:
<code><START> public EmptyFXMatrix() { <END> }</code><technical_language>this private enforce of singleton instance, need override hashCode equals. Edit: want override still, overridden in base class</technical_language>

Target:
private EmptyFXMatrix() { }
Source:
<code>protected void parseFilesets(final StartElement declareStep) throws XMLStreamException { Attribute inputs = declareStep .getAttributeByName(XProcScriptConstants.Attributes.PX_INPUT_FILESETS); Attribute outputs = declareStep .getAttributeByName(XProcScriptConstants.Attributes.PX_OUTPUT_FILESETS); if (inputs!=null){ <START> String splitInputs[]=inputs.getValue().split(" "); <END> for( String fset : splitInputs){ this.scriptBuilder.withInputFileset(fset); } } if (outputs!=null){ String splitOutputs[]=outputs.getValue().split(" "); for( String fset : splitOutputs){ this.scriptBuilder.withOutputFileset(fset); } } }</code><technical_language>safe for lists separated spaces. w/b splitter regex '\w+'</technical_language>

Target:
protected void parseFilesets(final StartElement declareStep) throws XMLStreamException { Attribute inputs = declareStep .getAttributeByName(XProcScriptConstants.Attributes.PX_INPUT_FILESETS); Attribute outputs = declareStep .getAttributeByName(XProcScriptConstants.Attributes.PX_OUTPUT_FILESETS); if (inputs!=null){ String splitInputs[]=inputs.getValue().split("\\s+"); for( String fset : splitInputs){ this.scriptBuilder.withInputFileset(fset); } } if (outputs!=null){ String splitOutputs[]=outputs.getValue().split("\\s+"); for( String fset : splitOutputs){ this.scriptBuilder.withOutputFileset(fset); } } }
Source:
<code><START> public final Maybe<T> switchIfEmpty(SingleSource<? extends T> other) { <END> ObjectHelper.requireNonNull(other, "other is null"); return RxJavaPlugins.onAssembly(new MaybeSwitchIfEmptyToSingle<T>(this, other)); }</code><technical_language>issue mentioned Single return type</technical_language>

Target:
public final Single<T> switchIfEmpty(SingleSource<? extends T> other) { ObjectHelper.requireNonNull(other, "other is null"); return RxJavaPlugins.onAssembly(new MaybeSwitchIfEmptySingle<T>(this, other)); }
Source:
<code>protected boolean isTokenAboutToExpire() { if(tokenFetchTime == -1 || super.isTokenAboutToExpire()){ return true; } boolean expiring = false; long offset = ONE_HOUR; if ((tokenFetchTime + offset) < System.currentTimeMillis()) expiring = true; if (expiring) { LOG.debug("MSIToken: token renewing : " + offset + " milliseconds window"); <START> } <END> return expiring; }</code><technical_language>nit: new line }</technical_language>

Target:
protected boolean isTokenAboutToExpire() { if (tokenFetchTime == -1 || super.isTokenAboutToExpire()) { return true; } boolean expiring = false; long elapsedTimeSinceLastTokenRefreshInMillis = System.currentTimeMillis() - tokenFetchTime; expiring = elapsedTimeSinceLastTokenRefreshInMillis >= ONE_HOUR || elapsedTimeSinceLastTokenRefreshInMillis < 0; if (expiring) { LOG.debug( "MSIToken: token renewing. Time elapsed since last token fetch:" + " milli seconds", elapsedTimeSinceLastTokenRefreshInMillis); } return expiring; }
Source:
<code>public int hashCode() { <START> return dimFilter != null ? dimFilter.hashCode() : 0; <END> }</code><technical_language>dimFilter is non-null, simplified want stick "as IntelliJ generated" form</technical_language>

Target:
public int hashCode() { return dimFilter.hashCode(); }
Source:
<code><START> public String errorCode() { <END> return errorCode; }</code><technical_language>useful add a method returns ErrorCode (enum converted String)</technical_language>

Target:
public ErrorCode errorCode(){ return ErrorCode.getFromCode(code); }
Source:
<code>public RequestSpec connectTimeout(Duration duration) { delegate.connectTimeout(duration); <START> return null; <END> }</code><technical_language>return this</technical_language>

Target:
public RequestSpec connectTimeout(Duration duration) { delegate.connectTimeout(duration); return this; }
Source:
<code><START> private boolean isDockerContainer(final AbstractNodeTemplate nodeTemplate) { <END> if (nodeTemplate.getProperties() == null) { return false; } final Element propertyElement = nodeTemplate.getProperties().getDOMElement(); final NodeList childNodeList = propertyElement.getChildNodes(); int check = 0; boolean foundDockerImageProp = false; for (int index = 0; index < childNodeList.getLength(); index++) { if (childNodeList.item(index).getNodeType() != Node.ELEMENT_NODE) { continue; } if (childNodeList.item(index).getLocalName().equals("ContainerPort")) { check++; } else if (childNodeList.item(index).getLocalName().equals("Port")) { check++; } else if (childNodeList.item(index).getLocalName().equals("ContainerImage")) { foundDockerImageProp = true; } } if (check != 2) { return false; } return true; }</code><technical_language>do this method, if is used</technical_language>

Target:
private boolean isDockerContainer(final AbstractNodeTemplate nodeTemplate) { if (nodeTemplate.getProperties() == null) { return false; } final Element propertyElement = nodeTemplate.getProperties().getDOMElement(); final NodeList childNodeList = propertyElement.getChildNodes(); int check = 0; boolean foundDockerImageProp = false; for (int index = 0; index < childNodeList.getLength(); index++) { if (childNodeList.item(index).getNodeType() != Node.ELEMENT_NODE) { continue; } if (childNodeList.item(index).getLocalName().equals("ContainerPort")) { check++; } else if (childNodeList.item(index).getLocalName().equals("Port")) { check++; } else if (childNodeList.item(index).getLocalName().equals("ImageID")) { foundDockerImageProp = true; } } if (check != 2) { return false; } return true; }
Source:
<code>public void testProcessBeanAttributesEventFails() { <START> final ProcessBeanAttributes<SimpleBean> event = extension.getProcessBeanAttributes(); <END> new Invocation() { void execute() { event.addDefinitionError(new NullPointerException()); } }.run(); new Invocation() { void execute() { event.getAnnotated(); } }.run(); new Invocation() { void execute() { event.getBeanAttributes(); } }.run(); }</code><technical_language>Please add setBeanAttributes() veto()</technical_language>

Target:
public void testProcessBeanAttributesEventFails() { final ProcessBeanAttributes<SimpleBean> event = extension.getProcessBeanAttributes(); AnnotatedType<SimpleBean> type = beanManager.createAnnotatedType(SimpleBean.class); final BeanAttributes<SimpleBean> attributes = beanManager.createBeanAttributes(type); new Invocation() { void execute() { event.addDefinitionError(new NullPointerException()); } }.run(); new Invocation() { void execute() { event.getAnnotated(); } }.run(); new Invocation() { void execute() { event.setBeanAttributes(attributes); } }.run(); new Invocation() { void execute() { event.getBeanAttributes(); } }.run(); new Invocation() { void execute() { event.veto(); } }.run(); }
Source:
<code><START> public int read(ByteBuffer dst) throws IOException { <END> int remaining = dst.remaining(); final byte[] tmp = getBuf(); int read = 0; int offset = 0; while (remaining > 0) { int copyLen = Math.min(Math.min(remaining, bufferSize), available()); if (copyLen == 0) { break; } System.arraycopy(data, (int)pos, tmp, 0, copyLen); dst.put(tmp, offset, copyLen); read += copyLen; offset += copyLen; pos += copyLen; remaining -= copyLen; } return read; }</code><technical_language>I this code is other classes. for read(ByteBuffer dst) implementation here, is necessary do in a complex this. Temp buffer is necessary is backed a byte array underlayer, simply check do a copy like, do in positioned read (or call positioned read increment pos return value.)</technical_language>

Target:
public int read(ByteBuffer dst) throws IOException { int remaining = (int)(count - pos); if(remaining <= 0) { return -1; } int length = Math.min(dst.remaining(), remaining); dst.put(data, (int)pos, length); pos += length; return length; }
Source:
<code>public void uninstall(String extensionId) { Extension ext = getExtension(extensionId, null); <START> if (ext != null && ext.isInstalled()) { <END> String type = getType(extensionId); switch (type) { case EXT_TYPE_RULE_TEMPLATE: marketplaceRuleTemplateProvider.remove(extensionId); postUninstalledEvent(extensionId); break; case EXT_TYPE_BINDING: uninstallBinding(extensionId); break; default: postFailureEvent(extensionId, "Id not known."); break; } } }</code><technical_language>checked for MarketplaceExtension, do want ensure a correct extensionId to? If is a MarketplaceExtension (also above) this silently throw IllegalArgumentException another one</technical_language>

Target:
public void uninstall(String extensionId) { Extension ext = getExtension(extensionId, null); if (ext instanceof MarketplaceExtension) { MarketplaceExtension mpExt = (MarketplaceExtension) ext; for (MarketplaceExtensionHandler handler : extensionHandlers) { if (handler.supports(mpExt)) { if (handler.isInstalled(mpExt)) { try { handler.uninstall(mpExt); postUninstalledEvent(extensionId); } catch (MarketplaceHandlerException e) { postFailureEvent(extensionId, e.getMessage()); } } else { postFailureEvent(extensionId, "Extension is not installed."); } return; } } } postFailureEvent(extensionId, "Extension not known."); }
Source:
<code>public void registerSegmentCallback( final Executor exec, final SegmentCallback callback, final Predicate<Pair<DruidServerMetadata, DataSegment>> filter ) { segmentPredicates.put(callback, filter); registerSegmentCallback( exec, new SegmentCallback() { @Override public CallbackAction segmentAdded( DruidServerMetadata server, DataSegment segment ) { final CallbackAction action; if(filter.apply(Pair.of(server, segment))) { action = callback.segmentAdded(server, segment); if (action.equals(CallbackAction.UNREGISTER)) { segmentPredicates.remove(callback); } } else { action = CallbackAction.CONTINUE; } return action; } @Override public CallbackAction segmentRemoved( DruidServerMetadata server, DataSegment segment ) { { final CallbackAction action; if(filter.apply(Pair.of(server, segment))) { action = callback.segmentRemoved(server, segment); if (action.equals(CallbackAction.UNREGISTER)) { segmentPredicates.remove(callback); } } else { action = CallbackAction.CONTINUE; } return action; } } @Override public CallbackAction segmentViewInitialized() { return callback.segmentViewInitialized(); } } ); <START> } <END></code><technical_language>this in BatchServerInventoryView, refactor reuse</technical_language>

Target:
public void registerSegmentCallback( final Executor exec, final SegmentCallback callback, final Predicate<Pair<DruidServerMetadata, DataSegment>> filter ) { SegmentCallback filteringCallback = new SingleServerInventoryView.FilteringSegmentCallback(callback, filter); segmentPredicates.put(filteringCallback, filter); registerSegmentCallback( exec, filteringCallback ); }
Source:
<code>public final void freeMacs(List<String> macs) { List<String> macsToRelease = filterOutUnusedMacs(macs); <START> if (macsToRelease.isEmpty()) { log.warn("Call to release with empty collection as parameter."); <END> } else { TransactionalStrategyState strategyForMacRelease = getStrategyForMacRelease(); log.debug("Using as release strategy", strategyForMacRelease); strategyForMacRelease.releaseMacsOnCommit(macsToRelease); } }</code><technical_language>WARN woul visible a user, if want report in this level rephrase message wwould more informative user-friendly</technical_language>

Target:
public final void freeMacs(List<String> macs) { List<String> macsToRelease = filterOutUnusedMacs(macs); if (macsToRelease.isEmpty()) { log.warn("Trying to release MACs using empty collection as parameter."); } else { TransactionalStrategyState strategyForMacRelease = getStrategyForMacRelease(); log.debug("Using as release strategy", strategyForMacRelease); strategyForMacRelease.releaseMacsOnCommit(macsToRelease); } }
Source:
<code>public synchronized Bomb createBomb(){ if (numBombs == 0){ <START> throw new RuntimeException("Cannot create a bomb; out of bombs"); <END> } numBombs--; return new Bomb(this); }</code><technical_language>a more descriptive Exception UnsupportedOperationException</technical_language>

Target:
public synchronized Bomb createBomb(){ if (numBombs == 0){ throw new BufferUnderflowException(); } numBombs--; return new Bomb(this); }
Source:
<code>public SimpleClusterTierClientEntity(EntityClientEndpoint<EhcacheEntityMessage, EhcacheEntityResponse> endpoint, <START> Timeouts timeouts, String storeIdentifier, Executor asyncWorker) { <END> this.endpoint = endpoint; this.timeouts = timeouts; this.storeIdentifier = storeIdentifier; this.asyncWorker = asyncWorker; this.messageFactory = new LifeCycleMessageFactory(); endpoint.setDelegate(new EndpointDelegate<EhcacheEntityResponse>() { @Override public void handleMessage(EhcacheEntityResponse messageFromServer) { LOGGER.trace("Entity response received from server: {}", messageFromServer); fireResponseEvent(messageFromServer); } @Override public byte[] createExtendedReconnectData() { synchronized (lock) { ClusterTierReconnectMessage reconnectMessage = new ClusterTierReconnectMessage(eventsEnabled); reconnectListeners.forEach(reconnectListener -> reconnectListener.onHandleReconnect(reconnectMessage)); return reconnectMessageCodec.encode(reconnectMessage); } } @Override public void didDisconnectUnexpectedly() { LOGGER.info("Cluster tier for cache disconnected", storeIdentifier); fireDisconnectionEvent(); } }); }</code><technical_language>Recommend checking guarding asyncWorker null</technical_language>

Target:
public SimpleClusterTierClientEntity(EntityClientEndpoint<EhcacheEntityMessage, EhcacheEntityResponse> endpoint, Timeouts timeouts, String storeIdentifier, Executor asyncWorker) { this.endpoint = endpoint; this.timeouts = timeouts; this.storeIdentifier = storeIdentifier; this.asyncWorker = requireNonNull(asyncWorker); this.messageFactory = new LifeCycleMessageFactory(); endpoint.setDelegate(new EndpointDelegate<EhcacheEntityResponse>() { @Override public void handleMessage(EhcacheEntityResponse messageFromServer) { LOGGER.trace("Entity response received from server: {}", messageFromServer); fireResponseEvent(messageFromServer); } @Override public byte[] createExtendedReconnectData() { synchronized (lock) { ClusterTierReconnectMessage reconnectMessage = new ClusterTierReconnectMessage(eventsEnabled); reconnectListeners.forEach(reconnectListener -> reconnectListener.onHandleReconnect(reconnectMessage)); return reconnectMessageCodec.encode(reconnectMessage); } } @Override public void didDisconnectUnexpectedly() { LOGGER.info("Cluster tier for cache disconnected", storeIdentifier); fireDisconnectionEvent(); } }); }
Source:
<code>private void deleteWorkflows(String workflowIdParams) { jdbc.update("delete from nflow_workflow_state where workflow_id in " + workflowIdParams); <START> jdbc.update("update nflow_workflow set root_workflow_id=null, parent_workflow_id=null, parent_action_id=null " + <END> "where id in " + workflowIdParams); jdbc.update("delete from nflow_workflow_action where workflow_id in " + workflowIdParams); jdbc.update("delete from nflow_workflow where id in " + workflowIdParams); }</code><technical_language>do need do update? reorder deletes instead</technical_language>

Target:
private void deleteWorkflows(String workflowIdParams) { jdbc.update("delete from nflow_workflow where id in " + workflowIdParams); }
Source:
<code>public MicroservicesRegistry() { ServiceLoader<SwaggerService> swaggerServices = ServiceLoader.load(SwaggerService.class); Iterator<SwaggerService> iterator = swaggerServices.iterator(); if (iterator.hasNext()) { SwaggerService swaggerService = iterator.next(); <START> swaggerService.init(this); <END> services.add(swaggerService); } }</code><technical_language>sense initialize Swagger services MicroservicesRegistry. Swagger service handle registry. registry tracked channel.id</technical_language>

Target:
public MicroservicesRegistry() { if (DataHolder.getInstance().getBundleContext() == null) { ServiceLoader<SwaggerService> swaggerServices = ServiceLoader.load(SwaggerService.class); Iterator<SwaggerService> iterator = swaggerServices.iterator(); if (iterator.hasNext()) { SwaggerService swaggerService = iterator.next(); swaggerService.init(this); services.add(swaggerService); } } }
Source:
<code>public void handleResponse(Packet response) { long correlationID = response.getCorrelationID(); Packet packet = store.get(correlationID); <START> store.remove(correlationID); <END> if (packet != null) { responseHandler.responseHandler(packet, response); } }</code><technical_language>store::remove return current (if any) of correlationID key</technical_language>

Target:
public void handleResponse(Packet response) { long correlationID = response.getCorrelationID(); Packet packet = store.remove(correlationID); if (packet != null) { responseHandler.responseHandler(packet, response); } }
Source:
<code>public void updateScreen() { <START> ++this.progress; <END> if (this.progress % 20 == 0) { this.connection.sendPacket(new CPacketKeepAlive()); } if(this.progress % 200 == 0) { assignScreenContent(); } if (this.screenReassign) { this.assignScreenContent(); this.screenReassign = false; } if(this.screenEntities.getLeft() instanceof EntityKoaHunter) { this.screenEntities.getLeft().ticksExisted++; } if(this.screenEntities.getRight() instanceof EntityKoaHunter) { this.screenEntities.getRight().ticksExisted++; } this.animTick++; }</code><technical_language>this extend GuiDownloadTerrain avoid duplicating this logic</technical_language>

Target:
public void updateScreen() { super.updateScreen(); if (this.screenReassign) { this.assignScreenContent(); this.screenReassign = false; } if (this.screenEntities.getLeft() instanceof EntityKoaHunter) { this.screenEntities.getLeft().ticksExisted++; } if (this.screenEntities.getRight() instanceof EntityKoaHunter) { this.screenEntities.getRight().ticksExisted++; } this.animTick++; }
Source:
<code>public void setUp() { tested = spy(new DiagramMarshaller() { @Override <START> public Graph unmarshall(Metadata metadata, InputStream input) throws IOException { <END> return graph; } @Override public String marshall(Diagram diagram) throws IOException { return null; } @Override public DiagramMetadataMarshaller getMetadataMarshaller() { return null; } }); request = MarshallingRequest.builder() .metadata(metadata) .input(input) .mode(MarshallingRequest.Mode.ERROR) .build(); }</code><technical_language>IOException is thrown here. removed</technical_language>

Target:
public void setUp(){ request = MarshallingRequest.builder() .metadata(metadata) .input(input) .mode(MarshallingRequest.Mode.ERROR) .build(); }
Source:
<code>public void shouldProcessingFromSinkTopic() { final KStream<String, String> source = builder.stream("topic-source"); source.to("topic-sink"); final MockProcessorSupplier<String, String> processorSupplier = new MockProcessorSupplier<>(); source.process(processorSupplier); final ConsumerRecordFactory<String, String> recordFactory = new ConsumerRecordFactory<>(new StringSerializer(), new StringSerializer(), 0L); try (final TopologyTestDriver driver = new TopologyTestDriver(builder.build(), props)) { driver.pipeInput(recordFactory.create("topic-source", "A", "aa")); } <START> assertEquals(asList(new KeyValueTimestamp<>("A", "aa", 0)), <END> processorSupplier.theCapturedProcessor().processed); }</code><technical_language>do need avoid singleton list? format assertion call more consistently in L285-286</technical_language>

Target:
public void shouldProcessingFromSinkTopic() { final KStream<String, String> source = builder.stream("topic-source"); source.to("topic-sink"); final MockProcessorSupplier<String, String> processorSupplier = new MockProcessorSupplier<>(); source.process(processorSupplier); final ConsumerRecordFactory<String, String> recordFactory = new ConsumerRecordFactory<>(new StringSerializer(), new StringSerializer(), 0L); try (final TopologyTestDriver driver = new TopologyTestDriver(builder.build(), props)) { driver.pipeInput(recordFactory.create("topic-source", "A", "aa")); } assertEquals(Collections.singletonList(new KeyValueTimestamp<>("A", "aa", 0)), processorSupplier.theCapturedProcessor().processed); }
Source:
<code>void setUnresolvedCompact(boolean unresolvedCompact) { this.unresolvedCompact = unresolvedCompact; if (outer != null) { <START> outer.setUnresolvedCompact(true); <END> } }</code><technical_language>required</technical_language>

Target:
void setUnresolvedCompact(boolean unresolvedCompact) { this.unresolvedCompact = unresolvedCompact; }
Source:
<code>protected void initSimulations() { d_models = new HashMap<Task, MCMCWrapper>(); initAllBaselineModels(); <START> initNetworkMetaProgressModels(); <END> }</code><technical_language>initNetworkMetaAnalysisModels() a more name</technical_language>

Target:
protected void initSimulations() { d_models = new HashMap<Task, MCMCWrapper>(); initAllBaselineModels(); initNetworkMetaAnalysisModels(); }
Source:
<code>public void testParseError() throws Exception { String path = new URI(resultPath()).getPath(); new File(path).mkdirs(); File file = new File(path, "my_file"); file.createNewFile(); FileUtils.writeFileUtf8(file, "{\"x\":\"x5\",\"y\":5,\"a\":1,\"b\":1}\n" + "{I am a wrong json.}\n" + "{\"x\":\"x5\",\"y\":5,\"a\":1,\"b\":1}"); check("select * from nonPartitionedTable", <START> JavaConverters.asScalaIteratorConverter(Arrays.asList( <END> Row.of("x5,5,1,1"), Row.of("x5,5,1,1")).iterator()).asScala().toSeq()); }</code><technical_language>add a check(String sqlQuery, java.util.List<Row> expectedResult) FileSystemITCaseBase</technical_language>

Target:
public void testParseError() throws Exception { String path = new URI(resultPath()).getPath(); new File(path).mkdirs(); File file = new File(path, "temp_file"); file.createNewFile(); FileUtils.writeFileUtf8(file, "{\"x\":\"x5\",\"y\":5,\"a\":1,\"b\":1}\n" + "{I am a wrong json.}\n" + "{\"x\":\"x5\",\"y\":5,\"a\":1,\"b\":1}"); check("select * from nonPartitionedTable", Arrays.asList( Row.of("x5,5,1,1"), Row.of("x5,5,1,1"))); }
Source:
<code>public void initialize(SparkExecutionPluginContext context) throws Exception { super.initialize(context); FileSet fileSet = context.getDataset(config.fileSetName); Location modelLocation = fileSet.getBaseLocation().append(config.path); if (!modelLocation.exists()) { throw new IllegalArgumentException(String.format("Failed to find model to use for Regression. Location does " + <START> "not exist: {}.", modelLocation)); <END> } JavaSparkContext javaSparkContext = context.getSparkContext(); SparkContext sparkContext = JavaSparkContext.toSparkContext(javaSparkContext); loadedModel = DecisionTreeModel.load(sparkContext, modelLocation.toURI().getPath()); }</code><technical_language>'{}' works for Logger. need '%s' for String.format()</technical_language>

Target:
public void initialize(SparkExecutionPluginContext context) throws Exception { super.initialize(context); FileSet fileSet = context.getDataset(config.fileSetName); Location modelLocation = fileSet.getBaseLocation().append(config.path); if (!modelLocation.exists()) { throw new IllegalArgumentException(String.format("Failed to find model to use for Regression. Location does " + "not exist: %s.", modelLocation)); } JavaSparkContext javaSparkContext = context.getSparkContext(); SparkContext sparkContext = JavaSparkContext.toSparkContext(javaSparkContext); loadedModel = DecisionTreeModel.load(sparkContext, modelLocation.toURI().getPath()); }
Source:
<code>public H3IndexHandler(File indexDir, SegmentMetadataImpl segmentMetadata, IndexLoadingConfig indexLoadingConfig, SegmentDirectory.Writer segmentWriter) { _indexDir = indexDir; _segmentWriter = segmentWriter; _segmentName = segmentMetadata.getName(); _segmentVersion = SegmentVersion.valueOf(segmentMetadata.getVersion()); for (String column : indexLoadingConfig.getH3IndexColumns()) { <START> ColumnMetadata columnMetadata = segmentMetadata.getColumnMetadataFor(column); <END> if (columnMetadata != null) { _h3IndexColumns.add(columnMetadata); } } }</code><technical_language>This brings interesting question. If user wants store point column lat, lng double, is create index for them</technical_language>

Target:
public H3IndexHandler(File indexDir, SegmentMetadataImpl segmentMetadata, IndexLoadingConfig indexLoadingConfig, SegmentDirectory.Writer segmentWriter) { _indexDir = indexDir; _segmentWriter = segmentWriter; _segmentName = segmentMetadata.getName(); _segmentVersion = SegmentVersion.valueOf(segmentMetadata.getVersion()); for (H3IndexColumn h3IndexConfig : indexLoadingConfig.getH3IndexColumns()) { ColumnMetadata columnMetadata = segmentMetadata.getColumnMetadataFor(h3IndexConfig.getName()); if (columnMetadata != null) { _h3IndexColumns.add(columnMetadata); _h3IndexMap.put(h3IndexConfig.getName(), h3IndexConfig); } } }
Source:
<code>private Object validateAndSet(String[] values, HashMap toEmit) { Object pojoObject = null; try { List<FixedWidthSchema.FixedWidthField> fields = schema.getFields(); try { if (clazz != null) { pojoObject = clazz.newInstance(); } } catch (InstantiationException ie) { <START> pojoObject = null; <END> } for (int i = 0; i < fields.size(); i++) { FixedWidthSchema.FixedWidthField currentField = fields.get(i); FixedWidthParser.TypeInfo typeInfo = setters.get(i); validateAndSetCurrentField(currentField, values[i], typeInfo, pojoObject, toEmit); } } catch (StringIndexOutOfBoundsException e) { throw new RuntimeException("Record length and tuple length mismatch ", e); } catch (IllegalAccessException ie) { throw new RuntimeException("Illegal Access ", ie); } catch (Exception e) { throw new RuntimeException("Exception in validation"); } return pojoObject; }</code><technical_language>throw exception here</technical_language>

Target:
private Object validateAndSet(String[] values, HashMap toEmit) { Object pojoObject = null; try { List<FixedWidthSchema.Field> fields = schema.getFields(); try { if (clazz != null) { pojoObject = clazz.newInstance(); } } catch (InstantiationException ie) { throw new RuntimeException("Exception in instantiating", ie); } for (int i = 0; i < fields.size(); i++) { FixedWidthSchema.Field currentField = fields.get(i); FixedWidthParser.TypeInfo typeInfo = setters.get(i); validateAndSetCurrentField(currentField, values[i], typeInfo, pojoObject, toEmit); } } catch (StringIndexOutOfBoundsException e) { throw new RuntimeException("Record length and tuple length mismatch ", e); } catch (IllegalAccessException ie) { throw new RuntimeException("Illegal Access ", ie); } catch (Exception e) { throw new RuntimeException("Exception in validation", e); } return pojoObject; }
Source:
<code>public MultipleCurrencyAmount accruedInterest(SwapFixedIborDefinition swapDefinition, DayCount fixedLegDayCount, DayCount iborLegDayCount, Calendar calendar, ZonedDateTime valuationDate, <START> ZonedDateTimeDoubleTimeSeries indexTimeSeries, MulticurveProviderDiscount multicurves) { <END> ArgumentChecker.notNull(swapDefinition, "swapDefinition"); ArgumentChecker.notNull(fixedLegDayCount, "fixedLegDayCount"); ArgumentChecker.notNull(iborLegDayCount, "iborLegDayCount"); ArgumentChecker.notNull(calendar, "calendar"); ArgumentChecker.notNull(valuationDate, "valuationDate"); ArgumentChecker.notNull(indexTimeSeries, "indexTimeSeries"); ArgumentChecker.notNull(multicurves, "multicurves"); Annuity<? extends Coupon> iborLeg = swapDefinition.getIborLeg().toDerivative(valuationDate, indexTimeSeries); double iborLegAccruedInterest = getAccrued(iborLegDayCount, calendar, valuationDate, swapDefinition.getIborLeg(), indexTimeSeries) * Math.signum(iborLeg.getNthPayment(0).getNotional()); CouponFixedDefinition refFixed = swapDefinition.getFixedLeg().getNthPayment(0); double fixedLegAccruedInterest = getAccrued(fixedLegDayCount, calendar, valuationDate, swapDefinition.getFixedLeg(), indexTimeSeries) * Math.signum(refFixed.getNotional()) * refFixed.getRate(); return MultipleCurrencyAmount.of(swapDefinition.getCurrency(), iborLegAccruedInterest + fixedLegAccruedInterest); }</code><technical_language>In integration, extra day count obtained</technical_language>

Target:
public MultipleCurrencyAmount accruedInterest(SwapFixedIborDefinition swapDefinition, DayCount fixedLegDayCount, DayCount iborLegDayCount, Calendar calendar, ZonedDateTime valuationDate, ZonedDateTimeDoubleTimeSeries indexTimeSeries, MulticurveProviderDiscount multicurves) { ArgumentChecker.notNull(swapDefinition, "swapDefinition"); ArgumentChecker.notNull(fixedLegDayCount, "fixedLegDayCount"); ArgumentChecker.notNull(iborLegDayCount, "iborLegDayCount"); ArgumentChecker.notNull(calendar, "calendar"); ArgumentChecker.notNull(valuationDate, "valuationDate"); ArgumentChecker.notNull(indexTimeSeries, "indexTimeSeries"); ArgumentChecker.notNull(multicurves, "multicurves"); checkNotionalAndFixedRate(swapDefinition); double iborLegAccruedInterest = getAccrued(iborLegDayCount, calendar, valuationDate, swapDefinition.getIborLeg(), indexTimeSeries); CouponFixedDefinition refFixed = swapDefinition.getFixedLeg().getNthPayment(0); double fixedLegAccruedInterest = getAccrued(fixedLegDayCount, calendar, valuationDate, swapDefinition.getFixedLeg(), indexTimeSeries) * refFixed.getRate(); return MultipleCurrencyAmount.of(swapDefinition.getCurrency(), iborLegAccruedInterest + fixedLegAccruedInterest); }
Source:
<code>public Response act(final Request req) throws IOException { final User user = this.base.user(new RqAuth(req).identity().urn()); return new RsPage( "/xsl/admin.xsl", req, new XeSource() { @Override public Iterable<Directive> toXembly() throws IOException { <START> return TkAdmin.this.list(user); <END> } } ); }</code><technical_language>[XeTransform](<LINK_0></technical_language>

Target:
public Response act(final Request req) throws IOException { final User user = this.base.user(new RqAuth(req).identity().urn()); return new RsPage( "/xsl/admin.xsl", req, this.base, new XeAppend( "docs", new XeTransform<>( user.docs().names(), new XeTransform.Func<String>() { @Override public XeSource transform(final String name) { return new XeAppend( "doc", new XeDirectives( new Directives() .add("path").set( String.format( "%s/%s", user.urn(), name ) ) ) ); } } ) ) ); }
Source:
<code>public static Map<String,String> getIdToNameMap(Instance instance) { TableMap map = tableMapCache; <START> if (map == null || tableMapTimestamp.longValue() + TABLE_MAP_CACHE_EXPIRATION <= System.nanoTime()) { <END> tableMapCache = new TableMap(instance); tableMapTimestamp.set(System.nanoTime()); map = tableMapCache; } return map.getIdtoNameMap(); }</code><technical_language>TableMap class a final long creationTime field instead of mutable tableMapTimestamp. CPU able avoid trips main memory. I keeping immutable easier reason about. do a double check avoid multiple threads regenerating put of this in a single function. java private static TableMap getTableMap() { TableMap map = tableMapCache; if (map == null || map.getCreationTime() + TABLE_MAP_CACHE_EXPIRATION <= System.nanoTime()) { synchronized(Tables.class) { map = tableMapCache; if (map == null || map.getCreationTime() + TABLE_MAP_CACHE_EXPIRATION <= System.nanoTime()) { map = tableMapCache = new TableMap(instance); //this set creation time, do in constructor } } } return map; }</technical_language>

Target:
public static Map<String,String> getIdToNameMap(Instance instance) { return getTableMap(instance).getIdtoNameMap(); }
Source:
<code>public void commitAfterSquashMerge() throws Exception { Git git = new Git(db); writeTrashFile("file1", "file1"); git.add().addFilepattern("file1").call(); RevCommit first = git.commit().setMessage("initial commit").call(); assertTrue(new File(db.getWorkTree(), "file1").exists()); createBranch(first, "refs/heads/branch1"); checkoutBranch("refs/heads/branch1"); writeTrashFile("file2", "file2"); git.add().addFilepattern("file2").call(); git.commit().setMessage("second commit").call(); assertTrue(new File(db.getWorkTree(), "file2").exists()); checkoutBranch("refs/heads/master"); MergeResult result = git.merge().include(db.getRef("branch1")) .setSquash(true).call(); assertTrue(new File(db.getWorkTree(), "file1").exists()); assertTrue(new File(db.getWorkTree(), "file2").exists()); assertEquals(MergeResult.MergeStatus.FAST_FORWARD_SQUASHED, result.getMergeStatus()); <START> git.commit().call(); <END> assertEquals("commit: Squashed commit of the following:", db .getReflogReader(Constants.HEAD).getLastEntry().getComment()); assertEquals("commit: Squashed commit of the following:", db .getReflogReader(db.getBranch()).getLastEntry().getComment()); }</code><technical_language>I add a check resulting commit parent. important fix</technical_language>

Target:
public void commitAfterSquashMerge() throws Exception { Git git = new Git(db); writeTrashFile("file1", "file1"); git.add().addFilepattern("file1").call(); RevCommit first = git.commit().setMessage("initial commit").call(); assertTrue(new File(db.getWorkTree(), "file1").exists()); createBranch(first, "refs/heads/branch1"); checkoutBranch("refs/heads/branch1"); writeTrashFile("file2", "file2"); git.add().addFilepattern("file2").call(); git.commit().setMessage("second commit").call(); assertTrue(new File(db.getWorkTree(), "file2").exists()); checkoutBranch("refs/heads/master"); MergeResult result = git.merge().include(db.getRef("branch1")) .setSquash(true).call(); assertTrue(new File(db.getWorkTree(), "file1").exists()); assertTrue(new File(db.getWorkTree(), "file2").exists()); assertEquals(MergeResult.MergeStatus.FAST_FORWARD_SQUASHED, result.getMergeStatus()); RevCommit squashedCommit = git.commit().call(); assertEquals(1, squashedCommit.getParentCount()); assertNull(db.readSquashCommitMsg()); assertEquals("commit: Squashed commit of the following:", db .getReflogReader(Constants.HEAD).getLastEntry().getComment()); assertEquals("commit: Squashed commit of the following:", db .getReflogReader(db.getBranch()).getLastEntry().getComment()); }
Source:
<code>public static ReferenceSource getDefaultCRAMReferenceSource() { if (null != Defaults.REFERENCE_FASTA) { if (Defaults.REFERENCE_FASTA.exists()) { return new ReferenceSource(Defaults.REFERENCE_FASTA); } else { throw new IllegalArgumentException( "The file specified by the reference property does not exist: " + Defaults.REFERENCE_FASTA.getName()); } } else if (Defaults.USE_CRAM_REF_DOWNLOAD) { return new ReferenceSource(); } else { throw new IllegalStateException( <START> "A valid CRAM reference was not supplied and one cannot be acquired via property settings"); <END> } }</code><technical_language>Mention property settings in error message</technical_language>

Target:
public static ReferenceSource getDefaultCRAMReferenceSource() { if (null != Defaults.REFERENCE_FASTA) { if (Defaults.REFERENCE_FASTA.exists()) { return new ReferenceSource(Defaults.REFERENCE_FASTA); } else { throw new IllegalArgumentException( "The file specified by the reference_fasta property does not exist: " + Defaults.REFERENCE_FASTA.getName()); } } else if (Defaults.USE_CRAM_REF_DOWNLOAD) { return new ReferenceSource(); } else { throw new IllegalStateException( "A valid CRAM reference was not supplied and one cannot be acquired via the property settings reference_fasta or use_cram_ref_download"); } }
Source:
<code>private void expandObjectLitAssignment(NodeTraversal t, Node export) { Preconditions.checkState(export.getParent().isAssign()); Node insertionRef = export.getParent().getParent(); Preconditions.checkState(insertionRef.isExprResult()); Node insertionParent = insertionRef.getParent(); Preconditions.checkNotNull(insertionParent); Node rValue = NodeUtil.getRValueOfLValue(export); Node key = rValue.getFirstChild(); while (key != null) { Node lhs; if (key.isQuotedString()) { lhs = IR.getelem(export.cloneTree(), IR.string(key.getString())); } else { lhs = IR.getprop(export.cloneTree(), IR.string(key.getString())); } Node value = null; if (key.isStringKey()) { if (key.hasChildren()) { value = key.getFirstChild().detachFromParent(); } else { value = IR.name(key.getString()); } <START> } else if (key.isMemberFunctionDef() || key.isGetterDef()) { <END> value = key.getFirstChild().detach(); } Node expr = IR.exprResult(IR.assign(lhs, value)).useSourceInfoIfMissingFromForTree(key); insertionParent.addChildAfter(expr, insertionRef); visitExport(t, lhs.getFirstChild()); if (expr.getParent() != null) { insertionRef = expr; } key = key.getNext(); } export.getParent().getParent().detach(); }</code><technical_language>This blocks crash, produce correct output. of acceptable transformations: js /** @const */ var module$test = { get a() { return 1; } }; js Object.defineProperties(module$test, { a: { get: function() { return 1; }; } });</technical_language>

Target:
private void expandObjectLitAssignment(NodeTraversal t, Node export) { checkState(export.getParent().isAssign()); Node insertionRef = export.getParent().getParent(); checkState(insertionRef.isExprResult()); Node insertionParent = insertionRef.getParent(); checkNotNull(insertionParent); Node rValue = NodeUtil.getRValueOfLValue(export); Node key = rValue.getFirstChild(); while (key != null) { Node lhs; if (key.isQuotedString()) { lhs = IR.getelem(export.cloneTree(), IR.string(key.getString())); } else { lhs = IR.getprop(export.cloneTree(), IR.string(key.getString())); } Node value = null; if (key.isStringKey()) { if (key.hasChildren()) { value = key.removeFirstChild(); } else { value = IR.name(key.getString()); } } else if (key.isMemberFunctionDef()) { value = key.getFirstChild().detach(); } Node expr = null; if (!key.isGetterDef()) { expr = IR.exprResult(IR.assign(lhs, value)).useSourceInfoIfMissingFromForTree(key); insertionParent.addChildAfter(expr, insertionRef); visitExport(t, lhs.getFirstChild()); } else { Node getter = key.detach(); String moduleName = t.getInput().getPath().toModuleName(); Node moduleObj = t.getScope().getVar(moduleName).getNode().getFirstChild(); moduleObj.addChildToBack(getter); } if (expr != null && expr.getParent() != null) { insertionRef = expr; } key = key.getNext(); } export.getParent().getParent().detach(); }
Source:
<code>public void onNestedPreScroll(CoordinatorLayout coordinatorLayout, View child, View target, int dx, int dy, int[] consumed) { try { if (linearLayoutManager.findLastCompletelyVisibleItemPosition() < adapter.getItemCount() - 3) { if (dy > 0 && changeInYDir < 0 || dy < 0 && changeInYDir > 0) { child.animate().cancel(); changeInYDir = 0; } changeInYDir += dy; if (changeInYDir > toolbarHeight && child.getVisibility() == View.VISIBLE && !isViewHidden) hideView(child); else if (changeInYDir < 0 && child.getVisibility() == View.GONE && !mIsShowing) { if (child instanceof FloatingActionButton) { if (chatBox == null) chatBox = coordinatorLayout.findViewById(R.id.messageBoxContainer); if (chatBox.getVisibility() == View.VISIBLE) { return; } } showView(child); } } } catch (NullPointerException e) { <START> ZLog.logException(e); <END> } }</code><technical_language>need send this exception crashylytics</technical_language>

Target:
public void onNestedPreScroll(CoordinatorLayout coordinatorLayout, View child, View target, int dx, int dy, int[] consumed) throws NullPointerException { if (linearLayoutManager.findLastCompletelyVisibleItemPosition() < adapter.getItemCount() - 3) { if (dy > 0 && changeInYDir < 0 || dy < 0 && changeInYDir > 0) { child.animate().cancel(); changeInYDir = 0; } changeInYDir += dy; if ((changeInYDir > toolbarHeight && child.getVisibility() == View.VISIBLE) && (!isViewHidden || isTopSnackBar(child))) hideView(child); else if (changeInYDir < 0 && (child.getVisibility() == View.GONE && !mIsShowing) || isTopSnackBar(child)) { if (child instanceof FloatingActionButton) { if (chatBox == null) chatBox = coordinatorLayout.findViewById(R.id.messageBoxContainer); if (chatBox.getVisibility() == View.VISIBLE) { return; } } showView(child); } } }