auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Set<String> getPendingDocumentIds() throws CouchbaseLiteException { if (config.getReplicatorType().equals(ReplicatorConfiguration.ReplicatorType.PULL)) { throw new CouchbaseLiteException( "Pending Document IDs are not supported on pull-only replicators.", Log.LOGGING_DOMAINS_TO_C4.get(DOMAIN), CBLError.Code.UNSUPPORTED); } final C4Replicator repl; synchronized (lock) { repl = c4repl; } if (repl == null) { Log.i(DOMAIN, "%s: Call to getPendingDocumentIds with unstarted replicator", this); return Collections.emptySet(); } final Set<String> pending; try { pending = c4repl.getPendingDocIDs(); } <START> catch (LiteCoreException e) { <END> Log.w(DOMAIN, "Error while fetching pending documentIds: %d/%d", e.domain, e.code); return Collections.emptySet(); } return (pending.size() <= 0) ? Collections.emptySet() : Collections.unmodifiableSet(pending); }</code><technical_language>I need lock this c4repl freed anytime</technical_language>

Target:
public Set<String> getPendingDocumentIds() throws CouchbaseLiteException { if (config.getReplicatorType().equals(ReplicatorConfiguration.ReplicatorType.PULL)) { throw new CouchbaseLiteException( "Pending Document IDs are not supported on pull-only replicators.", Log.LOGGING_DOMAINS_TO_C4.get(DOMAIN), CBLError.Code.UNSUPPORTED); } final C4Replicator repl; synchronized (lock) { repl = c4repl; } if (repl == null) { Log.i(DOMAIN, "%s: Call to getPendingDocumentIds with unstarted replicator", this); return Collections.emptySet(); } final Set<String> pending; try { pending = c4repl.getPendingDocIDs(); } catch (LiteCoreException e) { throw CBLStatus.convertException(e, "Failed fetching pending documentIds"); } return (pending.size() <= 0) ? Collections.emptySet() : Collections.unmodifiableSet(pending); }
Source:
<code>public void start(ComponentContext context) { super.start(context); configs.forEach(this::createStreamIfNotExists); processorDescriptors.forEach(this::initProcessor); if (! componentListenerAdded) { Framework.getRuntime().getComponentManager().addListener(new ComponentsLifeCycleListener()); <START> componentListenerAdded = true; <END> } }</code><technical_language>listener unregister stop time instead of storing a boolean. for instance WorkManagerImpl.init implementation of afterStop</technical_language>

Target:
public void start(ComponentContext context) { super.start(context); configs.forEach(this::createStreamIfNotExists); processorDescriptors.forEach(this::initProcessor); Framework.getRuntime().getComponentManager().addListener(new ComponentsLifeCycleListener()); }
Source:
<code>public Response act(final Request req) throws IOException { final Request transformed = this.rqtransformer.transform(req); <START> final Response response = this.origin.act(transformed); <END> return this.rstransformer.transform(response); }</code><technical_language>@bdragan transformed variable is redundant, inline</technical_language>

Target:
public Response act(final Request req) throws IOException { final RqHref.Base base = new RqHref.Base(req); final String home = new RqHref.Smart(base).home().bare(); final String dest = String.format( "http://%s/%s", this.host, base.href().toString().substring(home.length()) ); return this.response(home, dest, this.request(req, dest).fetch()); }
Source:
<code>private List<Comment> sortUnorderedMockQuery(Set<Comment> unorderedRresult, ModelQuery query) { final List<QueryOrderConstraint> orderConstraints = query.getOrderConstraints(); List<Comment> result = new ArrayList<Comment>(unorderedRresult); Collections.sort(result, new Comparator<Comment>() { public int compare(Comment t1, Comment t2) { for (QueryOrderConstraint orderConstraint : orderConstraints) { int compareResult; Enum field = orderConstraint.getField(); String fieldName = field != null ? field.toString() : "id"; Object o1 = field != null ? t1.getField(fieldName) : t1.getId(); Object o2 = field != null ? t2.getField(fieldName) : t2.getId(); if (o1 instanceof java.lang.Long) { compareResult = ((Long) o1).compareTo((Long) o2); } else if (o1 instanceof java.lang.Integer) { compareResult = ((Integer) o1).compareTo((Integer) o2); } else if (o1 instanceof java.lang.Double) { compareResult = ((Double) o1).compareTo((Double) o2); } else if (o1 instanceof java.lang.Boolean) { compareResult = ((Boolean) o1).compareTo((Boolean) o2); } else if (o1 instanceof java.lang.String) { compareResult = ((String) o1).compareTo((String) o2); } else { compareResult = Integer.compare(o1.hashCode(), o2.hashCode()); <START> } <END> int orderDirection = (orderConstraint.getOrder() == QueryOrder.ASC) ? 1 : -1; compareResult = compareResult * orderDirection; if (compareResult == 0) { continue; } else if (compareResult < 0) { return -1; } else { return 1; } } return 0; } }); return result; }</code><technical_language>want Comparable class (inherited Long, Integer, Boolean String) instead of tests</technical_language>

Target:
private List<Comment> sortUnorderedMockQuery(Set<Comment> unorderedRresult, ModelQuery query) { final List<OrderCriterion> orderCriteria = query.getOrderCriteria(); List<Comment> result = new ArrayList<Comment>(unorderedRresult); Collections.sort(result, new Comparator<Comment>() { public int compare(Comment t1, Comment t2) { for (OrderCriterion orderCriterion : orderCriteria) { int compareResult; Enum field = orderCriterion.getField(); String fieldName = field != null ? field.toString() : "id"; Object o1 = field != null ? t1.getField(fieldName) : t1.getId(); Object o2 = field != null ? t2.getField(fieldName) : t2.getId(); if (o1 instanceof java.lang.Comparable) { compareResult = ((Comparable) o1).compareTo((Comparable) o2); } else { compareResult = Integer.valueOf(o1.hashCode()).compareTo(Integer.valueOf(o2.hashCode())); } int orderDirection = (orderCriterion.getOrder() == QueryOrder.ASC) ? 1 : -1; compareResult = compareResult * orderDirection; if (compareResult == 0) { continue; } else if (compareResult < 0) { return -1; } else { return 1; } } return 0; } }); return result; }
Source:
<code>public String decrypt(String cipheredText, String passphrase) { Preconditions.checkNotNull(cipheredText); <START> Preconditions.checkNotNull(passphrase); <END> try { JsonNode json = MAPPER.readTree(ICrypto.decode(cipheredText)); return newEncryptor(passphrase).decrypt(json.get(CIPHERED_TEXT_KEY).asText()); } catch (Exception e) { throw new RuntimeException(e); } }</code><technical_language>is empty paraphrase</technical_language>

Target:
public String decrypt(String cipheredText, String passphrase) { try { JsonNode json = MAPPER.readTree(Crypto.decode(cipheredText)); return newEncryptor(passphrase).decrypt(json.get(CIPHERED_TEXT_KEY).asText()); } catch (Exception e) { throw new RuntimeException(e); } }
Source:
<code>private void addNewPatientIdentifier(Config config, Patient patient, Identifier newIdentifier) { <START> String uuid = patientResource.getPatientIdentifierTypeUuidByName(config, newIdentifier.getIdentifierType().getName()); <END> List<Location> locations = locationService.getLocations(config.getName(), "Unknown Location"); newIdentifier.getIdentifierType().setUuid(uuid); newIdentifier.setLocation(locations.get(0)); patientResource.addPatientIdentifier(config, patient.getUuid(), newIdentifier); }</code><technical_language>remove adding location, motech id needs location. OpenMRS module support additional identifiers location required</technical_language>

Target:
private void addNewPatientIdentifier(Config config, Patient patient, Identifier newIdentifier) { String uuid = patientResource.getPatientIdentifierTypeUuidByName(config, newIdentifier.getIdentifierType().getName()); if (uuid == null) { LOGGER.warn("The identifier type with name is not supported", newIdentifier.getIdentifierType().getName()); } else { newIdentifier.getIdentifierType().setUuid(uuid); patientResource.addPatientIdentifier(config, patient.getUuid(), newIdentifier); } }
Source:
<code>public void testFailedSink() throws Exception { stream("http | filter --expression=payload=='good' |" + getTestSink(sink)); <START> send("HTTP", "BAD"); <END> assertReceived(); }</code><technical_language>Similar I suggesting a Sink modeled, Source, this more typesafe string "HTTP" e.g. send(Source.HTTP + " | filter --expression bla blah " + sink) This handle source sinks same, if @Parameters for sources some point carry is currently done for sinks</technical_language>

Target:
public void testFailedSink() throws Exception { stream(Source.HTTP + XD_DELIMETER + " filter --expression=payload=='good' " + XD_DELIMETER + sink); send("HTTP", "BAD"); assertReceived(); }
Source:
<code>public String getLabel() { return <START> "New Dialog"; END> }</code><technical_language>externalized</technical_language>

Target:
public String getLabel() { return Messages.DialogTask_label; }
Source:
<code>public List<OrganizationHistory> addLastVisited(String organizationId) { <START> try { <END> UIOrganization uiOrganization = organizationService.getOrganizationFromKernel(organizationId); String userId = userInfoService.currentUser().getUserId(); UserOrganizationsHistory userOrganizationsHistories = new UserOrganizationsHistory(); Optional<UserOrganizationsHistory> optionalUserOrganizationsHistory = userOrganizationsHistoryRepository.findById(userId); if (optionalUserOrganizationsHistory.isPresent()) { userOrganizationsHistories = optionalUserOrganizationsHistory.get(); } else { userOrganizationsHistories.setUserId(userId); } List<OrganizationHistory> organizationHistories = userOrganizationsHistories.getOrganizationsHistory(); Collections.sort(organizationHistories); OrganizationHistory newOrganizationHistory = new OrganizationHistory(); for (OrganizationHistory organizationHistory : organizationHistories) { if (organizationHistory.getOrganizationId().equals(organizationId)) { organizationHistory.setDate(new Date()); userOrganizationsHistoryRepository.save(userOrganizationsHistories); return organizationHistories; } } newOrganizationHistory.setOrganizationId(organizationId); newOrganizationHistory.setDate(new Date()); newOrganizationHistory.setName(uiOrganization.getName()); if (organizationHistories.size() < MAX_ORGANIZATION_HISTORY) { organizationHistories.add(newOrganizationHistory); } else { organizationHistories.set(0, newOrganizationHistory); } userOrganizationsHistoryRepository.save(userOrganizationsHistories); return organizationHistories; }catch(Exception e){ return null; } }</code><technical_language>please giant try/catch code of a method</technical_language>

Target:
public List<OrganizationHistory> addLastVisited(String organizationId){ UIOrganization uiOrganization = organizationService.getOrganizationFromKernel(organizationId); String userId = userInfoService.currentUser().getUserId(); UserOrganizationsHistory userOrganizationsHistories = userOrganizationsHistoryRepository .findById(userId).orElse(new UserOrganizationsHistory(userId)); List<OrganizationHistory> organizationHistories = userOrganizationsHistories.getOrganizationsHistory(); Collections.sort(organizationHistories); for (OrganizationHistory organizationHistory : organizationHistories) { if (organizationHistory.getDcOrganizationId().equals(organizationId)) { organizationHistory.setDate(new Date()); userOrganizationsHistoryRepository.save(userOrganizationsHistories); return organizationHistories; } } organizationHistories = updateOrganizationHistories(organizationId, uiOrganization.getName(), organizationHistories); userOrganizationsHistoryRepository.save(userOrganizationsHistories); return organizationHistories; }
Source:
<code>public void testGetPropsStandardFormat() throws Exception { final String key1 = "bluetooth.hciattach"; final String value1 = "true"; final String key2 = "bluetooth.status"; final String value2 = "off"; String format = "[%s]: [%s] \n"; String response = String.format(format, key1, value1) + String.format(format, key2, value2); server.add("serial-123"); server.expectShell("serial-123", "getprop").returns(response); JadbDevice device = connection.getDevices().get(0); Map<String, String> props = new PropertyManager(device).getprop(); <START> assertNotNull(props.get(key1)); <END> assertEquals(props.get(key1), value1); assertNotNull(props.get(key2)); assertEquals(props.get(key2), value2); }</code><technical_language>this assertNotNull() is needed, please remove</technical_language>

Target:
public void testGetPropsStandardFormat() throws Exception { Map<String, String> expected = new HashMap<>(); expected.put("bluetooth.hciattach", "true"); expected.put("bluetooth.status", "off"); String response = "[bluetooth.status]: [off] \n" + "[bluetooth.hciattach]: [true]"; server.expectShell(DEVICE_SERIAL, "getprop").returns(response); Map<String, String> actual = new PropertyManager(device).getprop(); assertEquals(expected, actual); }
Source:
<code>protected void executeQueryCommand() { <START> getQueryReturnValue().setReturnValue(processVolumesInCurrentCluster(getGlusterVolumeDao().getById(getParameters().getId()), getGlusterVolumeDao().getById(getParameters().getSlaveVolumeId()), prepareSessionMap(getGeoRepDao().getAllSessions()))); <END> }</code><technical_language>pass prepareSessionMap here? get sessions in processVolume.. method</technical_language>

Target:
protected void executeQueryCommand() { getQueryReturnValue().setReturnValue(GlusterGeoRepUtil.getInstance().getNonEligibilityReasons(getGlusterVolumeDao().getById(getParameters().getId()), getGlusterVolumeDao().getById(getParameters().getSlaveVolumeId()))); }
Source:
<code>private javax.jms.Message doSendAndReceiveAsync(Destination requestDestination, javax.jms.Message jmsRequest, Session session, int priority) throws JMSException { String correlationId = null; MessageProducer messageProducer = null; try { messageProducer = session.createProducer(requestDestination); if (!this.correlationKey.equals("JMSCorrelationID*") || jmsRequest.getJMSCorrelationID() == null) { correlationId = this.gatewayCorrelation + "_" + Long.toString(this.correlationId.incrementAndGet()); if (this.correlationKey.equals("JMSCorrelationID")) { jmsRequest.setJMSCorrelationID(correlationId); } else { jmsRequest.setStringProperty(this.correlationKey, correlationId); jmsRequest.setJMSCorrelationID(null); } } else { <START> correlationId = this.gatewayCorrelation + "_" + jmsRequest.getJMSCorrelationID(); <END> jmsRequest.setJMSCorrelationID(correlationId); } LinkedBlockingQueue<javax.jms.Message> replyQueue = new LinkedBlockingQueue<javax.jms.Message>(1); if (logger.isDebugEnabled()) { logger.debug(this.getComponentName() + " Sending message with correlationId " + correlationId); } this.replies.put(correlationId, replyQueue); this.sendRequestMessage(jmsRequest, messageProducer, priority); return obtainReplyFromContainer(correlationId, replyQueue); } finally { JmsUtils.closeMessageProducer(messageProducer); this.replies.remove(correlationId); } }</code><technical_language>temporary - works a fixed reply queue, a reply container (because needs a fixed message selector)</technical_language>

Target:
private javax.jms.Message doSendAndReceiveAsync(Destination requestDestination, javax.jms.Message jmsRequest, Session session, int priority) throws JMSException { String correlationId = null; MessageProducer messageProducer = null; try { messageProducer = session.createProducer(requestDestination); correlationId = this.gatewayCorrelation + "_" + Long.toString(this.correlationId.incrementAndGet()); if (this.correlationKey.equals("JMSCorrelationID")) { jmsRequest.setJMSCorrelationID(correlationId); } else { jmsRequest.setStringProperty(this.correlationKey, correlationId); jmsRequest.setJMSCorrelationID(null); } LinkedBlockingQueue<javax.jms.Message> replyQueue = new LinkedBlockingQueue<javax.jms.Message>(1); if (logger.isDebugEnabled()) { logger.debug(this.getComponentName() + " Sending message with correlationId " + correlationId); } this.replies.put(correlationId, replyQueue); this.sendRequestMessage(jmsRequest, messageProducer, priority); return obtainReplyFromContainer(correlationId, replyQueue); } finally { JmsUtils.closeMessageProducer(messageProducer); this.replies.remove(correlationId); } }
Source:
<code>public void parallelValueExtractorDefinitionsCausesException() { Validator validator = Validation.byDefaultProvider() .configure() <START> .addValueExtractor( new IWrapper21ValueExtractor0() ) <END> .addValueExtractor( new IWrapper211ValueExtractor0() ) .addValueExtractor( new IWrapper212ValueExtractor0() ) .addValueExtractor( new IWrapper22ValueExtractor0() ) .addValueExtractor( new IWrapper221ValueExtractor0() ) .addValueExtractor( new Wrapper2ValueExtractor1() ) .buildValidatorFactory() .getValidator(); validator.validate( new CascadingEntity2( null ) ); }</code><technical_language>of needed? extractors enough this situation</technical_language>

Target:
public void parallelValueExtractorDefinitionsCausesException() { Validator validator = Validation.byDefaultProvider() .configure() .addValueExtractor( new IWrapper211ValueExtractor0() ) .addValueExtractor( new IWrapper212ValueExtractor0() ) .addValueExtractor( new Wrapper2ValueExtractor1() ) .buildValidatorFactory() .getValidator(); validator.validate( new CascadingEntity2( null ) ); }
Source:
<code>public void invokeCallbackMethods() { initCommandExecutor(); for (Iterator<Entry<Guid, CommandCallBack>> iterator = cmdCallBackMap.entrySet().iterator(); iterator.hasNext();) { Entry<Guid, CommandCallBack> entry = iterator.next(); Guid cmdId = entry.getKey(); CommandCallBack callBack = entry.getValue(); CommandStatus status = coco.getCommandStatus(cmdId); switch (status) { case FAILED: try { callBack.onFailed(cmdId, coco.getChildCommandIds(cmdId)); } catch (Exception ex) { log.errorFormat("Error invoking onFailed for FAILED command {0}", cmdId.toString()); } coco.updateCallBackNotified(cmdId); iterator.remove(); break; case SUCCEEDED: try { <START> callBack.onSucceeded(cmdId, coco.getChildCommandIds(cmdId)); <END> } catch (Exception ex) { log.errorFormat("Error invoking onSucceeded for SUCCEEDED command {0}", cmdId.toString()); } coco.updateCallBackNotified(cmdId); iterator.remove(); break; case ACTIVE_ASYNC_EXECUTED: try { callBack.doPolling(cmdId, coco.getChildCommandIds(cmdId)); } catch (Exception ex) { coco.retrieveCommand(cmdId).setCommandStatus(CommandStatus.FAILED); log.errorFormat("Error invoking doPooling for active command {0}", cmdId.toString()); } break; default: break; } } }</code><technical_language>in SUCCEEDED yo need change status FAILED? if consider this, rewrite this code try { .... switch (status) .... .. catch (Exception ex) { coco.retrieveCommand(cmdId).setCommandStatus(CommandStatus.FAILED); log.errorFormat(....) } of need set proper logging messages, like, in errorFormat a parameter of method failed</technical_language>

Target:
public void invokeCallbackMethods() { initCommandExecutor(); CommandEntity cmdEntity; for (Iterator<Entry<Guid, CommandCallBack>> iterator = cmdCallBackMap.entrySet().iterator(); iterator.hasNext();) { Entry<Guid, CommandCallBack> entry = iterator.next(); Guid cmdId = entry.getKey(); CommandCallBack callBack = entry.getValue(); CommandStatus status = coco.getCommandStatus(cmdId); switch (status) { case FAILED: try { callBack.onFailed(cmdId, coco.getChildCommandIds(cmdId)); } catch (Exception ex) { log.errorFormat("Error invoking onFailed for FAILED command {0}", cmdId.toString()); } coco.updateCallBackNotified(cmdId); iterator.remove(); break; case SUCCEEDED: try { callBack.onSucceeded(cmdId, coco.getChildCommandIds(cmdId)); coco.updateCallBackNotified(cmdId); iterator.remove(); } catch (Exception ex) { log.errorFormat("Error invoking onSucceeded for SUCCEEDED command {0}", cmdId.toString()); coco.updateCommandStatus(cmdId, CommandStatus.FAILED); } break; case ACTIVE: cmdEntity = coco.getCommandEntity(cmdId); if (cmdEntity.isExecuted() && cmdEntity.isAsync()) { try { callBack.doPolling(cmdId, coco.getChildCommandIds(cmdId)); } catch (Exception ex) { coco.updateCommandStatus(cmdId, CommandStatus.FAILED); log.errorFormat("Error invoking doPolling for active command {0}", cmdId.toString()); } } break; default: break; } } }
Source:
<code>public BindQuery getBindersForSlot(ChildSlot slot, AssociationQuery childAq) { List<Binder> binders = new ArrayList<>(); for (BoundObject bo : childAq.getFieldBindings()) { Path field = bo.getFieldInfo().getEntityRelativeFieldNameWithContext(); Path fieldAtSlot = field.mutableCopy().rewriteIndexes(slot.getLocalContainerName()).immutableCopy(); Object value; if (fieldAtSlot.nAnys() > 0) { KeyValueCursor<Path, JsonNode> cursor = doc.getAllNodes(fieldAtSlot); value=new ArrayList<Value>(); while (cursor.hasNext()) { cursor.next(); ((List)value).add(getValue(bo.getFieldInfo().getFieldMd(),cursor.getCurrentValue())); } } else { value=getValue(bo.getFieldInfo().getFieldMd(),doc.get(fieldAtSlot)); } <START> binders.add(new Binder(bo, value)); <END> } return new BindQuery(binders); }</code><technical_language>cal this in respective if/else block typecase Object? a suggestion, hold review. great</technical_language>

Target:
public BindQuery getBindersForSlot(ChildSlot slot, AssociationQuery childAq) { List<Binder> binders = new ArrayList<>(); for (BoundObject bo : childAq.getFieldBindings()) { Path field = bo.getFieldInfo().getEntityRelativeFieldNameWithContext(); Path fieldAtSlot = field.mutableCopy().rewriteIndexes(slot.getLocalContainerName()).immutableCopy(); if (fieldAtSlot.nAnys() > 0) { KeyValueCursor<Path, JsonNode> cursor = doc.getAllNodes(fieldAtSlot); List<Value> value=new ArrayList<Value>(); while (cursor.hasNext()) { cursor.next(); ((List)value).add(getValue(bo.getFieldInfo().getFieldMd(),cursor.getCurrentValue())); } binders.add(new Binder(bo,value)); } else { binders.add(new Binder(bo,getValue(bo.getFieldInfo().getFieldMd(),doc.get(fieldAtSlot)))); } } return new BindQuery(binders); }
Source:
<code>public <T> T evalSha(byte[] scriptSha1, ReturnType returnType, int numKeys, byte[]... keysAndArgs) { <START> return evalSha(JedisConverters.toString(scriptSha1), returnType, numKeys, keysAndArgs); <END> }</code><technical_language>a Jedis component a Lettuce component</technical_language>

Target:
public <T> T evalSha(byte[] scriptSha1, ReturnType returnType, int numKeys, byte[]... keysAndArgs) { return evalSha(LettuceConverters.toString(scriptSha1), returnType, numKeys, keysAndArgs); }
Source:
<code>public void notify(String message) { LOGGER.info(message); <START> DefaultTaskExecutor.runInJavaFXThread(() -> statusLine.fireEvent(new SnackbarEvent(new JFXSnackbarLayout(message), TOAST_MESSAGE_DISPLAY_TIME, null))); <END> }</code><technical_language>Please remove runInJavaFXThread. This is a leftover a lot of interaction Swing JavaFX code</technical_language>

Target:
public void notify(String message) { LOGGER.info(message); statusLine.fireEvent(new SnackbarEvent(new JFXSnackbarLayout(message), TOAST_MESSAGE_DISPLAY_TIME, null)); }
Source:
<code>private void handleResult(StreamingRecognitionResult result) { if (result.getAlternativesList().isEmpty()) { throw new IllegalArgumentException( "The alternatives list must not be empty"); } SpeechRecognitionAlternative alternative = result.getAlternatives(0); <START> String newStablePart = alternative.getTranscript(); <END> if (this.stableText.equals(newStablePart)) { if (logger.isDebugEnabled()) { logger.debug( debugName + ": dropping result without any change to" + " the stable part"); } return; } this.stableText = newStablePart; TranscriptionResult transcriptionResult = new TranscriptionResult( null, this.messageID, !result.getIsFinal(), this.languageTag, result.getStability(), new TranscriptionAlternative( newStablePart, alternative.getConfidence() )); sent(transcriptionResult); }</code><technical_language>called part stableText? more descriptive names latestTranscript newTranscript</technical_language>

Target:
private void handleResult(StreamingRecognitionResult result) { if (result.getAlternativesList().isEmpty()) { throw new IllegalArgumentException( "The alternatives list must not be empty"); } SpeechRecognitionAlternative alternative = result.getAlternatives(0); String newTranscript = alternative.getTranscript(); if (this.latestTranscript.equals(newTranscript)) { if (logger.isDebugEnabled()) { logger.debug( debugName + ": dropping result without any change to" + " the stable part"); } return; } this.latestTranscript = newTranscript; TranscriptionResult transcriptionResult = new TranscriptionResult( null, this.messageID, !result.getIsFinal(), this.languageTag, result.getStability(), new TranscriptionAlternative( newTranscript, alternative.getConfidence() )); sent(transcriptionResult); }
Source:
<code>public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) { if (extensionPoint.equals(EVENT_EXT_POINT)) { doRegisterEvent((EventDescriptor) contribution); } else if (extensionPoint.equals(EXTENDED_INFO_EXT_POINT)) { doRegisterExtendedInfo((ExtendedInfoDescriptor) contribution); } else if (extensionPoint.equals(ADAPTER_POINT)) { doRegisterAdapter((AdapterDescriptor) contribution); } else if (contribution instanceof AuditBackendDescriptor) { backendConfig = (AuditBackendDescriptor)contribution; } else if (contribution instanceof AuditBulkerDescriptor) { bulkerConfig = (AuditBulkerDescriptor)contribution; } else if (contribution instanceof AuditStorageDescriptor) { AuditStorageDescriptor auditStorageDesc = (AuditStorageDescriptor) contribution; <START> auditStorageDescriptors.putIfAbsent(auditStorageDesc.getId(), auditStorageDesc); <END> } }</code><technical_language>putIfAbsent prevents overrides, I a good idea</technical_language>

Target:
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) { if (extensionPoint.equals(EVENT_EXT_POINT)) { doRegisterEvent((EventDescriptor) contribution); } else if (extensionPoint.equals(EXTENDED_INFO_EXT_POINT)) { doRegisterExtendedInfo((ExtendedInfoDescriptor) contribution); } else if (extensionPoint.equals(ADAPTER_POINT)) { doRegisterAdapter((AdapterDescriptor) contribution); } else if (contribution instanceof AuditBackendDescriptor) { backendConfig = (AuditBackendDescriptor)contribution; } else if (contribution instanceof AuditBulkerDescriptor) { bulkerConfig = (AuditBulkerDescriptor)contribution; } else if (contribution instanceof AuditStorageDescriptor) { AuditStorageDescriptor auditStorageDesc = (AuditStorageDescriptor) contribution; auditStorageDescriptors.put(auditStorageDesc.getId(), auditStorageDesc); } }
Source:
<code><START> public D withChangelogStream(String changelogStream) { <END> this.changelogStream = changelogStream; return (D) this; }</code><technical_language>Do a use-case for overriding auto-generated changelogStream? Is throw exception instead of rewriting changelog stream if conform pattern [a-zA-Z0-9_-]+</technical_language>

Target:
public D withChangelogStream(String changelogStream) { this.enableChangelog = true; this.changelogStream = changelogStream; return (D) this; }
Source:
<code><START> public String getProductSlug() { <END> return mProductSlug; }</code><technical_language>of models StringUtils.notNullString() in getters/setters avoid returning nulls. I recommend well</technical_language>

Target:
public String getProductSlug() { return StringUtils.notNullStr(mProductSlug); }
Source:
<code>public byte[] enhance(String className, byte[] originalBytes) throws EnhancementException { final String safeClassName = className.replace( '/', '.' ); classFileLocator.addNameAndBytes( safeClassName, originalBytes ); try { final TypeDescription typeDescription = typePool.describe( safeClassName ).resolve(); return byteBuddyState.rewrite( typePool, safeClassName, byteBuddy -> doEnhance( byteBuddy.ignore( isDefaultFinalizer() ).redefine( typeDescription, ClassFileLocator.Simple.of( safeClassName, originalBytes ) ), typeDescription ) ); } catch (RuntimeException e) { throw new EnhancementException( "Failed to enhance class " + className, e ); <START> } <END> }</code><technical_language>Map<String,Resolution> in classFileLocator, cleared enhance(String className, byte[] originalBytes) call avoid keeping 'originalBytes' in memory, for large deployments? transformation of entity classes involves (class) references other entity classes? If yes, clear Map<String,Resolution>, needed for transformations span multiple classes referenced ByteBuddy</technical_language>

Target:
public byte[] enhance(String className, byte[] originalBytes) throws EnhancementException { final String safeClassName = className.replace( '/', '.' ); classFileLocator.setClassNameAndBytes( safeClassName, originalBytes ); try { final TypeDescription typeDescription = typePool.describe( safeClassName ).resolve(); return byteBuddyState.rewrite( typePool, safeClassName, byteBuddy -> doEnhance( byteBuddy.ignore( isDefaultFinalizer() ).redefine( typeDescription, ClassFileLocator.Simple.of( safeClassName, originalBytes ) ), typeDescription ) ); } catch (RuntimeException e) { throw new EnhancementException( "Failed to enhance class " + className, e ); } }
Source:
<code>public void onPlayerTeleports(PlayerTeleportEvent event) { if (event.getFrom().getY() > 255 || event.getFrom().getY() < 0 || event.getTo().getY() > 255 || event.getTo().getY() < 0) { return; } Location from = event.getFrom().getBlock().getLocation(); Location to = event.getTo().getBlock().getLocation(); if (from.equals(to)) { return; } int maxRad = 50 * 50; for (final NPC npc: getAllNPCs()) { if (npc.isSpawned() && npc.getEntity().getType() == EntityType.PLAYER) { <START> if ((to.getWorld().getName().equalsIgnoreCase(npc.getEntity().getLocation().getWorld().getName()) <END> && npc.getEntity().getLocation().distanceSquared(to) < maxRad) && ((from.getWorld().getName().equalsIgnoreCase(npc.getEntity().getLocation().getWorld().getName()) && npc.getEntity().getLocation().distanceSquared(from) > maxRad) || !from.getWorld().getName().equalsIgnoreCase(to.getWorld().getName()))) { showNPCReset(event.getPlayer(), npc); } } } }</code><technical_language>to.getWorld() == npc.getEntity().getLocation().getWorld()</technical_language>

Target:
public void onPlayerTeleports(PlayerTeleportEvent event) { Location from = roundLocation(event.getFrom()); Location to = roundLocation(event.getTo()); if (from.equals(to)) { return; } int maxRad = 50 * 50; for (final NPC npc: getAllNPCs()) { if (npc.isSpawned() && npc.getEntity().getType() == EntityType.PLAYER) { Location npcPos = npc.getEntity().getLocation(); if ((to.getWorld() == npcPos.getWorld() && npcPos.distanceSquared(to) < maxRad) && ((from.getWorld() == npcPos.getWorld() && npcPos.distanceSquared(from) > maxRad) || from.getWorld() != to.getWorld())) { showNPCReset(event.getPlayer(), npc); } } } }
Source:
<code>public void testToCheckNoConfigurationsAreExecuted() { XmlSuite suite = createXmlSuite("suite"); XmlTest test = createXmlTest(suite, "test", Issue1574TestclassSample.class); test.addExcludedGroup("sometest"); TestNG testng = create(suite); testng.run(); <START> assertThat(Issue1574TestclassSample.messages).containsExactly("anothertest","@AfterSuite"); <END> }</code><technical_language>Typo: space missing ','</technical_language>

Target:
public void testToCheckNoConfigurationsAreExecuted() { XmlSuite suite = createXmlSuite("suite"); XmlTest test = createXmlTest(suite, "test", Issue1574TestclassSample.class); test.addExcludedGroup("sometest"); TestNG testng = create(suite); InvokedMethodNameListener listener = new InvokedMethodNameListener(); testng.addListener((ITestNGListener) listener); testng.run(); assertThat(listener.getInvokedMethodNames()).containsExactly("anothertest", "tearDownSuite"); }
Source:
<code>private static String normAutoRangeValue(Object objectValue) { <START> if (objectValue == null) return null; <END> String value = objectValue.toString(); if ("auto".equals(value)) { return value; } return normRangeValue(objectValue); }</code><technical_language>need a null check here, "auto".equals(objectValue) is enough, if true return objectValue.toString(), continue normRangeValue. This important in case decide handle null values differently, fix in places</technical_language>

Target:
private static String normAutoRangeValue(Object objectValue) { if ("auto".equals(objectValue)) { return objectValue.toString(); } return normRangeValue(objectValue); }
Source:
<code>private List<Observation> resolveConceptUuidForConceptNames(Config config, List<Observation> originalObservations) { List<Observation> updatedObs = new ArrayList<>(); if (originalObservations != null) { for (Observation observation : originalObservations) { <START> if (observation.getValue() != null && StringUtils.isNotEmpty(observation.getValue().getDisplay())) { <END> String conceptUuid = conceptService.resolveConceptUuidFromConceptName(config.getName(), observation.getConcept().getName().getName()); if (CollectionUtils.isNotEmpty(observation.getGroupsMembers())) { resolveConceptUuidForConceptNames(config, observation.getGroupsMembers()); } observation.getConcept().setUuid(conceptUuid); updatedObs.add(observation); } } } return updatedObs; }</code><technical_language>please move this condition separate method. more readable</technical_language>

Target:
private List<Observation> resolveConceptUuidForConceptNames(Config config, List<Observation> originalObservations) { List<Observation> updatedObs = new ArrayList<>(); if (originalObservations != null) { for (Observation observation : originalObservations) { if (observationValueIsNotEmpty(observation)) { String conceptUuid = conceptService.resolveConceptUuidFromConceptName(config.getName(), observation.getConcept().getName().getName()); if (CollectionUtils.isNotEmpty(observation.getGroupsMembers())) { resolveConceptUuidForConceptNames(config, observation.getGroupsMembers()); } observation.getConcept().setUuid(conceptUuid); updatedObs.add(observation); } else { LOGGER.warn("Observation value is null or empty for concept: " + observation.getConcept().getName() + " and will not be created"); } } } return updatedObs; }
Source:
<code>public boolean equals(Object a, Object b) { final boolean ret; if (a != b && a instanceof IMergeViewerItem && b instanceof IMergeViewerItem) { IMergeViewerItem itemA = (IMergeViewerItem)a; IMergeViewerItem itemB = (IMergeViewerItem)b; Diff diffA = itemA.getDiff(); Diff diffB = itemB.getDiff(); if (diffA != null && diffA.getConflict() != null && diffA.getConflict().getKind() == ConflictKind.PSEUDO && diffB != null && diffB.getConflict() != null && diffB.getConflict().getKind() == ConflictKind.PSEUDO) { ret = Objects.equal(itemA.getAncestor(), itemB.getAncestor()) && Objects.equal(diffA.getConflict(), diffB.getConflict()); } else if (diffA != null && diffB != null && itemA.getLeft() == null && itemA.getRight() == null && itemB.getLeft() == null && itemB.getRight() == null) { ret = Objects.equal(diffA, diffB); <START> } else if ((diffA == null) != (diffB == null)) { <END> ret = Objects.equal(itemA.getLeft(), itemB.getLeft()) && Objects.equal(itemA.getRight(), itemB.getRight()) && Objects.equal(itemA.getAncestor(), itemB.getAncestor()); } else { ret = Objects.equal(itemA.getLeft(), itemB.getLeft()) && Objects.equal(itemA.getRight(), itemB.getRight()) && Objects.equal(itemA.getAncestor(), itemB.getAncestor()) && Objects.equal(diffA, diffB); } } else { ret = Objects.equal(a, b); } return ret; }</code><technical_language>this capture intent is pretty hard read. diffA == null || diffB == null effect while clearer. difference is this (if) if null while fall next condition... for exact effect in end comparing nulls (Objects.equal(diffA, diffB)) for return value</technical_language>

Target:
public boolean equals(Object a, Object b) { final boolean ret; if (a != b && a instanceof IMergeViewerItem && b instanceof IMergeViewerItem) { IMergeViewerItem itemA = (IMergeViewerItem)a; IMergeViewerItem itemB = (IMergeViewerItem)b; Diff diffA = itemA.getDiff(); Diff diffB = itemB.getDiff(); if (diffA != null && diffA.getConflict() != null && diffA.getConflict().getKind() == ConflictKind.PSEUDO && diffB != null && diffB.getConflict() != null && diffB.getConflict().getKind() == ConflictKind.PSEUDO) { ret = Objects.equal(itemA.getAncestor(), itemB.getAncestor()) && Objects.equal(diffA.getConflict(), diffB.getConflict()); } else if (diffA != null && diffB != null && itemA.getLeft() == null && itemA.getRight() == null && itemB.getLeft() == null && itemB.getRight() == null) { ret = Objects.equal(diffA, diffB); } else if (diffA == null || diffB == null) { ret = Objects.equal(itemA.getLeft(), itemB.getLeft()) && Objects.equal(itemA.getRight(), itemB.getRight()) && Objects.equal(itemA.getAncestor(), itemB.getAncestor()); } else { ret = Objects.equal(itemA.getLeft(), itemB.getLeft()) && Objects.equal(itemA.getRight(), itemB.getRight()) && Objects.equal(itemA.getAncestor(), itemB.getAncestor()) && Objects.equal(diffA, diffB); } } else { ret = Objects.equal(a, b); } return ret; }
Source:
<code>public Iterator<Widget> iterator() { return new Iterator<Widget>() { boolean hasElement = widget != null; Widget returned = null; @Override public boolean hasNext() { return hasElement; } @Override public Widget next() { if (!hasElement || (widget == null)) { throw new NoSuchElementException(); } hasElement = false; <START> return (returned = widget); <END> } @Override public void remove() { if (returned != null) { WidgetDecorator.this.remove(returned); } } }; }</code><technical_language>This fails compile parenthesis</technical_language>

Target:
public Iterator<Widget> iterator() { return new Iterator<Widget>() { boolean hasElement = widget != null; Widget returned = null; @Override public boolean hasNext() { return hasElement; } @Override public Widget next() { if (!hasElement || (widget == null)) { throw new NoSuchElementException(); } hasElement = false; returned = widget; return returned; } @Override public void remove() { if (returned != null) { WidgetDecorator.this.remove(returned); } } }; }
Source:
<code>public void write (OutputStream outputStream) { DataOutputStream write = null; GZIPOutputStream gzip = null; byte[] buffer = new byte[10 * 1024]; int writtenBytes = 0; <START> compressedData.position(0); <END> compressedData.limit(compressedData.capacity()); try { gzip = new GZIPOutputStream(outputStream); write = new DataOutputStream(gzip); write.writeInt(compressedData.capacity()); while (writtenBytes != compressedData.capacity()) { int bytesToWrite = Math.min(compressedData.remaining(), buffer.length); compressedData.get(buffer, 0, bytesToWrite); write.write(buffer, 0, bytesToWrite); writtenBytes += bytesToWrite; } write.close(); gzip.close(); } catch (Exception e) { throw new GdxRuntimeException("Couldn't write PKM", e); } compressedData.position(dataOffset); compressedData.limit(compressedData.capacity()); }</code><technical_language>remove this? exception thrown closing file failed. Previously happened. I reason change this behavior</technical_language>

Target:
public void write (OutputStream outputStream) { DataOutputStream dataStream = null; GZIPOutputStream gzipStream = null; byte[] buffer = new byte[10 * 1024]; int writtenBytes = 0; compressedData.position(0); compressedData.limit(compressedData.capacity()); try { gzipStream = new GZIPOutputStream(outputStream); dataStream = new DataOutputStream(gzipStream); dataStream.writeInt(compressedData.capacity()); while (writtenBytes != compressedData.capacity()) { int bytesToWrite = Math.min(compressedData.remaining(), buffer.length); compressedData.get(buffer, 0, bytesToWrite); dataStream.write(buffer, 0, bytesToWrite); writtenBytes += bytesToWrite; } dataStream.flush(); gzipStream.flush(); } catch (Exception e) { throw new GdxRuntimeException("Couldn't write PKM", e); } finally { StreamUtils.closeQuietly(dataStream); StreamUtils.closeQuietly(gzipStream); } compressedData.position(dataOffset); compressedData.limit(compressedData.capacity()); }
Source:
<code>boolean doRefresh() { boolean performRefresh = false; synchronized (isRefreshing) { if (!isRefreshing.get() && getCacheState(headerCache.get()) != CacheState.Good) { isRefreshing.set(true); performRefresh = true; } } <START> if (!performRefresh) { <END> return false; } HeaderCacheElement cacheElement = null; try { AccessToken newToken = credentials.refreshAccessToken(); if (newToken == null) { cacheElement = new HeaderCacheElement( new IOException("Could not load the token for credentials: " + credentials)); } else { cacheElement = new HeaderCacheElement(newToken); } } catch (IOException e) { cacheElement = new HeaderCacheElement(e); } catch (Exception e) { cacheElement = new HeaderCacheElement(new IOException("Could not read headers", e)); } finally { synchronized (isRefreshing) { headerCache.set(cacheElement); isRefreshing.set(false); isRefreshing.notifyAll(); } } return true; }</code><technical_language>nit: if (!refreshed)</technical_language>

Target:
boolean doRefresh() { boolean requiresRefresh = false; synchronized (isRefreshing) { if (!isRefreshing.get() && getCacheState(this.headerCache.get()) != CacheState.Good) { isRefreshing.set(true); requiresRefresh = true; } } if (!requiresRefresh) { return false; } HeaderCacheElement cacheElement = null; try { AccessToken newToken = credentials.refreshAccessToken(); if (newToken == null) { cacheElement = new HeaderCacheElement( new IOException("Could not load the token for credentials: " + credentials)); } else { cacheElement = new HeaderCacheElement(newToken); } } catch (IOException e) { cacheElement = new HeaderCacheElement(e); } catch (Exception e) { cacheElement = new HeaderCacheElement(new IOException("Could not read headers", e)); } finally { synchronized (isRefreshing) { headerCache.set(cacheElement); isRefreshing.set(false); isRefreshing.notifyAll(); } } return true; }
Source:
<code>private VCFColumn getColumn(String token) { <START> String lkToken = token.toLowerCase(); <END> VCFColumn matchedColumn = null; for (VCFColumn column : VCFColumn.values()) { if (column.getName().equals(lkToken)) { matchedColumn = column; } } return matchedColumn; }</code><technical_language>read <LINK_0></technical_language>

Target:
private VCFColumn getColumn(String token) { VCFColumn matchedColumn = null; for (VCFColumn column : VCFColumn.values()) { if (column.name().equalsIgnoreCase(token)) { matchedColumn = column; } } return matchedColumn; }
Source:
<code><START> public LookupRuntimeProvider getLookupRuntimeProvider(LookupTableSource.Context context) { <END> String[] keyNames = new String[context.getKeys().length]; for (int i = 0; i < keyNames.length; i++) { int index = context.getKeys()[i][0]; keyNames[i] = schema.getFieldNames()[index]; } return TableFunctionProvider.of(JdbcDynamicLookupFunction.builder() .setFieldNames(schema.getFieldNames()) .setFieldTypes(schema.getFieldDataTypes()) .setKeyNames(keyNames) .setOptions(options) .setLookupOptions(lookupOptions) .build()); }</code><technical_language>Add a check length of array of context#getKeys() 1</technical_language>

Target:
public LookupRuntimeProvider getLookupRuntimeProvider(LookupTableSource.Context context) { String[] keyNames = new String[context.getKeys().length]; for (int i = 0; i < keyNames.length; i++) { int[] innerKeyArr = context.getKeys()[i]; Preconditions.checkArgument(innerKeyArr.length == 1, "JDBC only support non-nested look up keys"); keyNames[i] = schema.getFieldNames()[innerKeyArr[0]]; } final RowType rowType = (RowType) schema.toRowDataType().getLogicalType(); return TableFunctionProvider.of(new JdbcRowDataLookupFunction( options, lookupOptions, schema.getFieldNames(), schema.getFieldDataTypes(), keyNames, rowType)); }
Source:
<code>public static CFGBytecode buildCFG(Symbol.MethodSymbol methodSymbol, SquidClassLoader classLoader) { InputStream is = classLoader.getResourceAsStream(Convert.bytecodeName(((JavaSymbol.TypeJavaSymbol) methodSymbol.owner()).getFullyQualifiedName()) + ".class"); try { byte[] bytes = ByteStreams.toByteArray(is); if (Java9Support.isJava9Class(bytes)) { Java9Support.setJava8MajorVersion(bytes); } ClassReader cr = new ClassReader(bytes); BytecodeCFGMethodVisitor methodVisitor = new BytecodeCFGMethodVisitor(methodSymbol); cr.accept(new ClassVisitor(Opcodes.ASM5) { @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { if (name.equals(methodSymbol.name())) { return methodVisitor; } return null; } }, ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES); return methodVisitor.cfg; } catch (IOException e) { throw Throwables.propagate(e); <START> } finally { <END> Closeables.closeQuietly(is); } }</code><technical_language>try-with-resources avoid this finally</technical_language>

Target:
public static BytecodeCFG buildCFG(Symbol.MethodSymbol methodSymbol, SquidClassLoader classLoader) { try(InputStream is = classLoader.getResourceAsStream(Convert.bytecodeName(((JavaSymbol.TypeJavaSymbol) methodSymbol.owner()).getFullyQualifiedName()) + ".class")) { byte[] bytes = ByteStreams.toByteArray(is); if (Java9Support.isJava9Class(bytes)) { Java9Support.setJava8MajorVersion(bytes); } return buildCFG(methodSymbol, bytes); } catch (IOException e) { throw Throwables.propagate(e); } }
Source:
<code>private boolean validateAccount(String chartCode, String accountNumber) { if (StringUtils.isBlank(accountNumber)) { <START> LOG.error("Account Number cannot be blank."); <END> return false; } if (StringUtils.equalsIgnoreCase(accountNumber, CuFPConstants.AmazonWebServiceBillingConstants.INTERNAL_KFS_ACCOUNT_DESCRIPTION)) { return true; } Account account = accountService.getByPrimaryId(chartCode, accountNumber); if (ObjectUtils.isNull(account)) { LOG.error(String.format("Could not find Account (%s, %s).", chartCode, accountNumber)); return false; } if (!account.isActive()) { LOG.error(String.format("Invalid Account (%s, %s) is not active.", chartCode, accountNumber)); return false; } if (account.isClosed()) { LOG.error(String.format("Invalid Account (%s, %s) is closed.", chartCode, accountNumber)); return false; } if (account.isExpired()) { LOG.error(String.format("Invalid Account (%s, %s) is expired.", chartCode, accountNumber)); return false; } return true; }</code><technical_language>move error Strings CU-ApplicationResources.properties</technical_language>

Target:
private boolean validateAccount(String chartCode, String accountNumber) { if (StringUtils.isBlank(accountNumber)) { LOG.error(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_ACCOUNT_NUMBER_BLANK)); return false; } if (StringUtils.equalsIgnoreCase(accountNumber, CuFPConstants.AmazonWebServiceBillingConstants.INTERNAL_KFS_ACCOUNT_DESCRIPTION)) { return true; } Account account = accountService.getByPrimaryId(chartCode, accountNumber); if (ObjectUtils.isNull(account)) { LOG.error(String.format(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_ACCOUNT_NOT_FOUND), chartCode, accountNumber)); return false; } if (account.isClosed()) { LOG.error(String.format(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_ACCOUNT_CLOSED), chartCode, accountNumber)); return false; } if (account.isExpired()) { LOG.error(String.format(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_ACCOUNT_EXPIRED), chartCode, accountNumber)); return false; } return true; }
Source:
<code>protected void onBindBoxItemViewHolder(BoxItemViewHolder holder, BoxItem itemToBind) { <START> if (holder.getItem() == null || holder.getItem() == null) { <END> return; } final BoxItem item = holder.getItem(); holder.getNameView().setText(item.getName()); holder.getMetaDescription().setText(BoxSearchListAdapter.createPath(item, File.separator)); mController.getThumbnailManager().loadThumbnail(item, holder.getThumbView()); holder.getProgressBar().setVisibility(View.GONE); holder.getMetaDescription().setVisibility(View.VISIBLE); holder.getThumbView().setVisibility(View.VISIBLE); }</code><technical_language>Do need check itemToBind</technical_language>

Target:
protected void onBindBoxItemViewHolder(BoxItemViewHolder holder, BoxItem itemToBind) { if (itemToBind == null || itemToBind == null) { return; } holder.getNameView().setText(itemToBind.getName()); holder.getMetaDescription().setText(BoxSearchListAdapter.createPath(itemToBind, File.separator)); mController.getThumbnailManager().loadThumbnail(itemToBind, holder.getThumbView()); holder.getProgressBar().setVisibility(View.GONE); holder.getMetaDescription().setVisibility(View.VISIBLE); holder.getThumbView().setVisibility(View.VISIBLE); }