auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public <I> void hear(TypeLiteral<I> iTypeLiteral, TypeEncounter<I> iTypeEncounter) { GuiceInjectionMonitor gim = new GuiceInjectionMonitor(); <START> for (Class<?> c = iTypeLiteral.getRawType(); c!= Object.class; c = c.getSuperclass()) { <END> if( !gim.isWorthInjecting(c)) { return; } for (Method method : c.getDeclaredMethods()) findContextObserver(method, iTypeEncounter); for( Class<?> interfaceClass : c.getInterfaces()) for (Method method : interfaceClass.getDeclaredMethods()) findContextObserver(method, iTypeEncounter); } }</code><technical_language>this converted following? for (Class<?> c = iTypeLiteral.getRawType(); gim.isWorthInjecting(c); c = c.getSuperclass())</technical_language>

Target:
public <I> void hear(TypeLiteral<I> iTypeLiteral, TypeEncounter<I> iTypeEncounter) { GuiceInjectionMonitor gim = new GuiceInjectionMonitor(); for (Class<?> c = iTypeLiteral.getRawType(); gim.isWorthInjecting(c); c = c.getSuperclass()) { for (Method method : c.getDeclaredMethods()) findContextObserver(method, iTypeEncounter); for( Class<?> interfaceClass : c.getInterfaces()) for (Method method : interfaceClass.getDeclaredMethods()) findContextObserver(method, iTypeEncounter); } }
Source:
<code>public int getIndexOfCriteria(FilterCriteria tm) { <START> int pos = -1; <END> if (tm != null && mFilterValues != null){ for (int i = 0; i < mFilterValues.length; i++) { FilterCriteria obj = mFilterValues[i]; if (obj.equals(tm)) { pos = i; return pos; } } } return pos; }</code><technical_language>This is another minor nit, this routine oddly written. variable pos necessary. public int getIndexOfCriteria(FilterCriteria tm) { if (tm != null && mFilterValues != null){ for (int i = 0; i < mFilterValues.length; i++) { if (mFilterValues[i].equals(tm)) { return i; } } } return -1; }</technical_language>

Target:
public int getIndexOfCriteria(FilterCriteria tm) { if (tm != null && mFilterValues != null){ for (int i = 0; i < mFilterValues.length; i++) { if (mFilterValues[i].equals(tm)) { return i; } } } return -1; }
Source:
<code>public void mercury_search_searchNoResultsPageDisplayed() { init(); <START> SearchResultsPage <END> searchResults = new SearchResultsPage().openForQuery(SEARCH_PHRASE_NO_RESULTS); Assertion.assertTrue(searchResults.isNoResultsPagePresent()); }</code><technical_language>new line is needed</technical_language>

Target:
public void mercury_search_searchNoResultsPageDisplayed() { SearchResultsPage searchResults = new SearchResultsPage() .openForQuery(SEARCH_PHRASE_NO_RESULTS); Assertion.assertTrue(searchResults.isNoResultsPagePresent()); }
Source:
<code>public static String getTestCaseJobTypeByPath(String itemPath) { <START> if (itemPath.startsWith(JobType.BIGDATASTREAMING.repositoryObjectType.getFolder())) { <END> return ConvertJobsUtil.JobType.BIGDATASTREAMING.getDisplayName(); } else if (itemPath.startsWith(JobType.BIGDATABATCH.repositoryObjectType.getFolder())) { return JobType.BIGDATABATCH.getDisplayName(); } return ConvertJobsUtil.JobType.STANDARD.getDisplayName(); }</code><technical_language>need avoid npe of RepositoryObjectType, null in some DI license</technical_language>

Target:
public static String getTestCaseJobTypeByPath(String itemPath) { if (JobType.BIGDATASTREAMING.repositoryObjectType != null && itemPath.startsWith(JobType.BIGDATASTREAMING.repositoryObjectType.getFolder())) { return ConvertJobsUtil.JobType.BIGDATASTREAMING.getDisplayName(); } else if (JobType.BIGDATABATCH.repositoryObjectType != null && itemPath.startsWith(JobType.BIGDATABATCH.repositoryObjectType.getFolder())) { return JobType.BIGDATABATCH.getDisplayName(); } return ConvertJobsUtil.JobType.STANDARD.getDisplayName(); }
Source:
<code>void should_return_cause_if_throwable_has_cause() { Throwable throwable = new Throwable("top level message", new Throwable("cause message")); new ThrowableAssertAlternative<>(throwable) <START> .havingCause() <END> .withMessage("cause message"); }</code><technical_language>a test get actual calling havinCause() check is throwable variable. actual is protected in AbstractAssert is accessible test class is in package</technical_language>

Target:
void should_return_cause_if_throwable_has_cause() { Throwable cause = new Throwable("cause message"); Throwable throwable = new Throwable("top level message", cause); assertThat(new ThrowableAssertAlternative<>(throwable) .havingCause().actual) .isSameAs(cause); }
Source:
<code>private void removeOldBackups() { File fodlerWhereBackups = new File(destination); Stream.of(Objects.requireNonNull(fodlerWhereBackups.listFiles())) .filter(File::isFile) .filter(file -> file.getName().startsWith(PREFIX)) .sorted(Comparator.comparingLong(file -> { <START> try { <END> File f = (File) file; BasicFileAttributes attr = Files.readAttributes(f.toPath(), BasicFileAttributes.class); FileTime fileTime = attr.creationTime(); return fileTime.toMillis(); } catch (IOException e) { LOGGER.error(e); return 0l; } }).reversed()) .skip(windowSize - 1) .forEach(file -> { LOGGER.info("Removing old backup: " + file.getName()); file.delete(); }); }</code><technical_language>this lamba content moved a private method for code clarity</technical_language>

Target:
private void removeOldBackups() { File fodlerWhereBackups = new File(destination); Stream.of(Objects.requireNonNull(fodlerWhereBackups.listFiles())) .filter(File::isFile) .filter(file -> file.getName().startsWith(PREFIX)) .sorted(Comparator.comparingLong(file -> getCreationTime((File) file)).reversed()) .skip(windowSize - 1) .forEach(file -> { LOGGER.info("Removing old backup: " + file.getName()); file.delete(); }); }
Source:
<code>public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof TmfEvent)) { return false; } final TmfEvent other = (TmfEvent) obj; if (fTrace == null) { if (other.fTrace != null) { return false; } } else if (!getTrace().equals(other.getTrace())) { return false; } if (getRank() != other.getRank()) { return false; } if (!getTimestamp().equals(other.getTimestamp())) { return false; } if (getType() == null) { if (other.getType() != null) { return false; } } else if (!getType().equals(other.getType())) { return false; } if <START> (getContent() <END> == null) { if (other.getContent() != null) { return false; } } else if (!getContent().equals(other.getContent())) { return false; } return true; }</code><technical_language>this NonNull.equals()</technical_language>

Target:
public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof TmfEvent)) { return false; } final TmfEvent other = (TmfEvent) obj; if (fTrace == null) { if (other.fTrace != null) { return false; } } else if (!getTrace().equals(other.getTrace())) { return false; } if (getRank() != other.getRank()) { return false; } if (!getTimestamp().equals(other.getTimestamp())) { return false; } if (!NonNullUtils.equalsNullable(getType(), other.getType())) { return false; } if (!NonNullUtils.equalsNullable(getContent(), other.getContent())) { return false; } return true; }
Source:
<code>public BoundedAfterSubscriber(Subscriber<? super List<T>> actual, int capacityHint, Func1<? super T, Boolean> predicate, int prefetch) { this.actual = actual; this.capacityHint = capacityHint; this.predicate = predicate; Queue<Object> q; <START> if (prefetch >= 10 * 1000 * 1000) { <END> q = new SpscLinkedArrayQueue<Object>(RxRingBuffer.SIZE); } else { if (UnsafeAccess.isUnsafeAvailable()) { q = new SpscArrayQueue<Object>(prefetch); } else { q = new SpscAtomicArrayQueue<Object>(prefetch); } } queue = q; buffer = new ArrayList<T>(capacityHint); requested = new AtomicLong(); wip = new AtomicInteger(); nl = NotificationLite.instance(); limit = prefetch - (prefetch >> 2); if (prefetch == Integer.MAX_VALUE) { request(Long.MAX_VALUE); } else { request(prefetch); } }</code><technical_language>time, prefetch amount. Also, variant require runtime calculation, David's calculated compile time (nano win!)</technical_language>

Target:
public BoundedAfterSubscriber(Subscriber<? super List<T>> actual, int capacityHint, Func1<? super T, Boolean> predicate, int prefetch) { super(actual, capacityHint, predicate, prefetch); }
Source:
<code>public boolean addEdge(final V v1, final V v2, final I i) { final Map<V, I> adjEdges = getEdges(v1); if (adjEdges == null) { throw new NoSuchElementException("No src vertex " + v1); } <START> if (adjEdges.put(v2, i) == null) { <END> final int inDegree = inDegrees.get(v2); inDegrees.put(v2, inDegree + 1); if (inDegree == 0) { rootVertices.remove(v2); } return true; } else { LOG.log(Level.WARNING, "The edge from {0} to {1} already exists", new Object[]{v1, v2}); return false; } }</code><technical_language>java if (!adjEdges.containsKey(v2)) { adjEdges.put(v2, i) }</technical_language>

Target:
public boolean addEdge(final V v1, final V v2, final I i) { final Map<V, I> adjEdges = getEdges(v1); if (adjEdges == null) { throw new NoSuchElementException("No src vertex " + v1); } if (!adjEdges.containsKey(v2)) { adjEdges.put(v2, i); final int inDegree = inDegrees.get(v2); inDegrees.put(v2, inDegree + 1); if (inDegree == 0) { rootVertices.remove(v2); } return true; } else { LOG.log(Level.WARNING, "The edge from {0} to {1} already exists", new Object[]{v1, v2}); return false; } }
Source:
<code>void keywordNKeywordsSeparatedBySpace() { BibEntry entry = new BibEntry(); entry.setField(StandardField.KEYWORDS, "w1, w2a w2b, w3"); <START> String result = generateKey(entry, "keyword1"); <END> assertEquals("w1", result); result = generateKey(entry, "keyword2"); assertEquals("w2aw2b", result); result = generateKey(entry, "keyword4"); assertEquals("", result); }</code><technical_language>In other test cases inline argument for assertEquals</technical_language>

Target:
void keywordNKeywordsSeparatedBySpace() { BibEntry entry = new BibEntry(); entry.setField(StandardField.KEYWORDS, "w1, w2a w2b, w3"); assertEquals("w1", generateKey(entry, "keyword1")); assertEquals("w2aw2b", generateKey(entry, "keyword2")); assertEquals("", generateKey(entry, "keyword4")); }
Source:
<code>private void expandPreviousExpandedAndPaths(Object[] previous, TreeViewer viewer, Set<IPath> additionalPaths) { StagingViewContentProvider stagedContentProvider = getContentProvider( viewer); int count = stagedContentProvider.getCount(); updateAutoExpand(viewer, count); if (viewer.getAutoExpandLevel() == AbstractTreeViewer.ALL_LEVELS) { return; } if (getPresentation() == Presentation.LIST) return; Set<IPath> paths = new HashSet<>(additionalPaths); for (Object element : previous) { if (element instanceof StagingFolderEntry) addPathAndParentPaths(((StagingFolderEntry) element).getPath(), paths); } for (Object element : getVisibleExpandedElements(viewer)) { <START> if (element instanceof StagingFolderEntry) <END> addPathAndParentPaths(((StagingFolderEntry) element).getPath(), paths); } List<StagingFolderEntry> expand = new ArrayList<>(); calculateNodesToExpand(paths, stagedContentProvider.getElements(null), expand); viewer.setExpandedElements(expand.toArray()); }</code><technical_language>style nit: missing braces</technical_language>

Target:
private void expandPreviousExpandedAndPaths(Object[] previous, TreeViewer viewer, Set<IPath> additionalPaths) { StagingViewContentProvider stagedContentProvider = getContentProvider( viewer); int count = stagedContentProvider.getCount(); updateAutoExpand(viewer, count); if (viewer.getAutoExpandLevel() == AbstractTreeViewer.ALL_LEVELS) { return; } if (getPresentation() == Presentation.LIST) return; Set<IPath> paths = new HashSet<>(additionalPaths); for (Object element : previous) { if (element instanceof StagingFolderEntry) { addPathAndParentPaths(((StagingFolderEntry) element).getPath(), paths); } } for (Object element : getVisibleExpandedElements(viewer)) { if (element instanceof StagingFolderEntry) { addPathAndParentPaths(((StagingFolderEntry) element).getPath(), paths); } } List<StagingFolderEntry> expand = new ArrayList<>(); calculateNodesToExpand(paths, stagedContentProvider.getElements(null), expand); viewer.setExpandedElements(expand.toArray()); }
Source:
<code>public Set<ClassOrInterfaceType> getImmediateSupertypes() { Set<ClassOrInterfaceType> supertypes = new HashSet<>(); if (this.isObject()) { return supertypes; } ClassOrInterfaceType superclass = this.getSuperclass(); <START> if (superclass != null) { <END> supertypes.add(superclass); } supertypes.addAll(this.getInterfaces()); return supertypes; }</code><technical_language>This succeed, do test? (Another put this is a special case here, lines 339-341, needed places.)</technical_language>

Target:
public Set<ClassOrInterfaceType> getImmediateSupertypes() { Set<ClassOrInterfaceType> supertypes = new HashSet<>(); if (this.isObject()) { return supertypes; } ClassOrInterfaceType superclass = this.getSuperclass(); supertypes.add(superclass); supertypes.addAll(this.getInterfaces()); return supertypes; }
Source:
<code>private void processEachPaymentWorksCustomFieldReceived(PaymentWorksVendor stgNewVendor, PaymentWorksNewVendorRequestDetailDTO pmwNewVendorDetailDTO, List<String> customFieldErrors) { if (paymentWorksFormModeService.shouldUseLegacyFormProcessingMode()) { Map<String, String> customFieldsDTOMap = createCustomFieldIdCustomFieldValueMapForReceivedPmwVendorData(pmwNewVendorDetailDTO.getCustom_fields()); for (String paymentWorksCustomFieldId : customFieldsDTOMap.keySet()) { String customFieldValueFromPaymentWorks = customFieldsDTOMap.get(paymentWorksCustomFieldId); PaymentWorksFieldMapping fieldMapping = findPaymentWorksFieldMapping(paymentWorksCustomFieldId); if (ObjectUtils.isNotNull(fieldMapping)) { setPaymentWorksVendorCustomFieldAttributeToReceivedValue(stgNewVendor, paymentWorksCustomFieldId, fieldMapping, customFieldsDTOMap, customFieldErrors); } else { stgNewVendor.setCustomFieldConversionErrors(true); customFieldErrors.add(MessageFormat.format(getConfigurationService().getPropertyValueAsString( PaymentWorksKeyConstants.NEW_VENDOR_REQUEST_CUSTOM_FIELD_MISSING_ERROR_MESSAGE), paymentWorksCustomFieldId)); LOG.error("processEachPaymentWorksCustomFieldReceived: Unable to find KFS staging table column for PaymentWorks custom field '" + paymentWorksCustomFieldId + "'"); } } } else if (paymentWorksFormModeService.shouldUseForeignFormProcessingMode()) { <START> processEachCustomFIeldsTheNewWay(stgNewVendor, pmwNewVendorDetailDTO, customFieldErrors); <END> } }</code><technical_language>This method a typo. FIelds Fields</technical_language>

Target:
private void processEachPaymentWorksCustomFieldReceived(PaymentWorksVendor stgNewVendor, PaymentWorksNewVendorRequestDetailDTO pmwNewVendorDetailDTO, List<String> customFieldErrors) { for (PaymentWorksCustomFieldDTO customField : pmwNewVendorDetailDTO.getCustom_fields().getCustom_fields()) { String customFieldId = customField.getField_id(); PaymentWorksFieldMapping fieldMapping = findPaymentWorksFieldMapping(customFieldId); if (ObjectUtils.isNotNull(fieldMapping)) { String customFieldValue = findCustomFieldValue(customField, fieldMapping); setPaymentWorksVendorCustomFieldAttributeToReceivedValue(stgNewVendor, customFieldId, customFieldValue, fieldMapping, customFieldErrors); } else { stgNewVendor.setCustomFieldConversionErrors(true); customFieldErrors.add(MessageFormat.format(getConfigurationService().getPropertyValueAsString( PaymentWorksKeyConstants.NEW_VENDOR_REQUEST_CUSTOM_FIELD_MISSING_ERROR_MESSAGE), customFieldId)); LOG.error("processEachPaymentWorksCustomFieldReceived: Unable to find KFS staging table column for PaymentWorks custom field '" + customFieldId + "'"); } } }
Source:
<code>public void loadData(Priority priority, final DataCallback<? super InputStream> callback) { Request.Builder requestBuilder = new Request.Builder().url(url.toStringUrl()); for (Map.Entry<String, String> headerEntry : url.getHeaders().entrySet()) { String key = headerEntry.getKey(); requestBuilder.addHeader(key, headerEntry.getValue()); } Request request = requestBuilder.build(); call = client.newCall(request); call.enqueue(new okhttp3.Callback() { @Override public void onFailure(Call call, IOException e) { if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "OkHttp failed to obtain result", e); } callback.onLoadFailed(e); } @Override public void onResponse(Call call, Response response) throws IOException { if (response.isSuccessful()) { long contentLength = response.body().contentLength(); responseBody = response.body(); stream = ContentLengthInputStream.obtain(responseBody.byteStream(), contentLength); } else if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "OkHttp got error response: " + response.code() + ", " + response.message()); <START> response.body().close(); <END> } callback.onDataReady(stream); } }); }</code><technical_language>if logging is disabled</technical_language>

Target:
public void loadData(Priority priority, final DataCallback<? super InputStream> callback) { Request.Builder requestBuilder = new Request.Builder().url(url.toStringUrl()); for (Map.Entry<String, String> headerEntry : url.getHeaders().entrySet()) { String key = headerEntry.getKey(); requestBuilder.addHeader(key, headerEntry.getValue()); } Request request = requestBuilder.build(); call = client.newCall(request); call.enqueue(new okhttp3.Callback() { @Override public void onFailure(Call call, IOException e) { if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "OkHttp failed to obtain result", e); } callback.onLoadFailed(e); } @Override public void onResponse(Call call, Response response) throws IOException { responseBody = response.body(); if (response.isSuccessful()) { long contentLength = response.body().contentLength(); stream = ContentLengthInputStream.obtain(responseBody.byteStream(), contentLength); } else if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "OkHttp got error response: " + response.code() + ", " + response.message()); } callback.onDataReady(stream); } }); }
Source:
<code>public static ReplicationPeerConfig addBasePeerConfigsIfNotPresent(Configuration conf, <START> ReplicationPeerConfig receivedPeerConfig){ <END> boolean isPeerConfigChanged = false; String defaultPeerConfigs = conf.get(HBASE_REPLICATION_PEER_BASE_CONFIG,null); ReplicationPeerConfigBuilder copiedPeerConfigBuilder = ReplicationPeerConfig. newBuilder(receivedPeerConfig); Map<String,String> peerConfigurations = receivedPeerConfig.getConfiguration(); if (defaultPeerConfigs != null && defaultPeerConfigs.length() != 0) { String[] defaultPeerConfigList = defaultPeerConfigs.split(";"); for (String defaultPeerConfig : defaultPeerConfigList) { String[] configSplit = defaultPeerConfig.split("="); if (configSplit != null && configSplit.length == 2) { String configName = configSplit[0]; String configValue = configSplit[1]; if (!peerConfigurations.containsKey(configName)) { copiedPeerConfigBuilder.putConfiguration(configName,configValue); isPeerConfigChanged = true; } } } } return isPeerConfigChanged ? copiedPeerConfigBuilder.build() : null; }</code><technical_language>nit: space ) {</technical_language>

Target:
public static ReplicationPeerConfig addBasePeerConfigsIfNotPresent(Configuration conf, ReplicationPeerConfig receivedPeerConfig) { String basePeerConfigs = conf.get(HBASE_REPLICATION_PEER_BASE_CONFIG, ""); ReplicationPeerConfigBuilder copiedPeerConfigBuilder = ReplicationPeerConfig. newBuilder(receivedPeerConfig); Map<String,String> receivedPeerConfigMap = receivedPeerConfig.getConfiguration(); if (basePeerConfigs.length() != 0) { Map<String, String> basePeerConfigMap = Splitter.on(';').trimResults().omitEmptyStrings() .withKeyValueSeparator("=").split(basePeerConfigs); for (Map.Entry<String,String> entry : basePeerConfigMap.entrySet()) { String configName = entry.getKey(); String configValue = entry.getValue(); if (!receivedPeerConfigMap.containsKey(configName)) { copiedPeerConfigBuilder.putConfiguration(configName, configValue); } } } return copiedPeerConfigBuilder.build(); }
Source:
<code>protected void checkNonPrivateConstructor(EnhancedAnnotatedType<T> type) { <START> if (type.getEnhancedConstructors().stream().anyMatch(c -> !c.isPrivate())) { <END> return; } else { throw BeanLogger.LOG.decoratedMustHaveNonPrivateConstructor(this); } }</code><technical_language>avoid Java8 for issues backported in 2.4</technical_language>

Target:
protected void checkNonPrivateConstructor(EnhancedAnnotatedType<T> type) { for (EnhancedAnnotatedConstructor<T> eac : type.getEnhancedConstructors()) { if (!eac.isPrivate() && (eac.getParameters().size() == 0 || eac.isAnnotationPresent(Inject.class))) { return; } } throw BeanLogger.LOG.decoratedMustHaveNonPrivateConstructor(this); }
Source:
<code>private DiffConfig(final Config rc) { noPrefix = rc.getBoolean("diff", "noprefix", false); final String renameString = rc.getString("diff", null, "renames"); <START> if ("copy".equals(renameString) || "copies".equals(renameString)) <END> renameDetectionType = RenameDetectionType.COPY; else { final Boolean renameBoolean = StringUtils .toBooleanOrNull(renameString); renameDetectionType = Boolean.TRUE.equals(renameBoolean) ? RenameDetectionType.TRUE : RenameDetectionType.FALSE; } renameLimit = rc.getInt("diff", "renamelimit", 200); }</code><technical_language>StringUtils.equalsIgnoreCase here</technical_language>

Target:
private DiffConfig(final Config rc) { noPrefix = rc.getBoolean("diff", "noprefix", false); renameDetectionType = parseRenameDetectionType(rc.getString("diff", null, "renames")); renameLimit = rc.getInt("diff", "renamelimit", 200); }
Source:
<code>public String browseMessage(String processorName) throws AxisFault { SynapseConfiguration configuration = getSynapseConfiguration(); MessageConsumer messageConsumer = getMessageConsumer(configuration,processorName); String message = null; try { message = getMessageAsString(messageConsumer); } catch (AxisFault e) { handleException(log, "Failed to get message from the queue :", e); } <START> messageConsumer.cleanup(); <END> return message; }</code><technical_language>need this in a finally block</technical_language>

Target:
public String browseMessage(String processorName) throws AxisFault { SynapseConfiguration configuration = getSynapseConfiguration(); MessageConsumer messageConsumer = getMessageConsumer(configuration,processorName); String message = null; try { message = getMessageAsString(messageConsumer); } catch (AxisFault e) { handleException(log, "Failed to get message from the queue :", e); } finally { messageConsumer.cleanup(); } return message; }
Source:
<code>public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_playbar, container, false); songTitle = (TextView) view.findViewById(R.id.text_now_playing); playPause = ((ImageButton) view.findViewById(R.id.btn_play_pause)); if(boundToPlaylistService){ updateView(); } playPause.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { PlaylistService service = getPlaylistService(); long state; if (service != null) { if (service.isPlaying()) { service.pause(); <START> state = 0; END> } else { service.play(); state = 1; } smartSetPlayPauseImage(service); ((CoreActivity)getActivity()).getTracker().sendEvent( "ui_action", "click", "play_pause", state); } } }); ((ImageButton) view.findViewById(R.id.btn_skip)) .setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { PlaylistService service = getPlaylistService(); if(service != null){ service.skip(); ((CoreActivity)getActivity()).getTracker().sendEvent( "ui_action", "click", "skip", 0L); } } }); return view; }</code><technical_language>expose isPaused playlist service (the IPlayer interface isPaused method, I believe)</technical_language>

Target:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_playbar, container, false); songTitle = (TextView) view.findViewById(R.id.text_now_playing); playPause = ((ImageButton) view.findViewById(R.id.btn_play_pause)); skip = (ImageButton) view.findViewById(R.id.btn_skip); if(boundToPlaylistService){ updateView(); } playPause.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { PlaylistService service = getPlaylistService(); if (service != null) { boolean intended = !service.isPlaying(); if (intended) { service.play(); } else { service.pause(); } smartSetPlayPauseImage(service); tracker.trackPlayPauseEvent(intended); } } }); playPause.setContentDescription(ContentDescriptionUtils.PLAY_PAUSE); skip.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { PlaylistService service = getPlaylistService(); if (service != null) { service.skip(); tracker.trackSkipEvent(); } } }); skip.setContentDescription(ContentDescriptionUtils.SKIP); return view; }
Source:
<code>public FileAppender(Configuration conf, TaskAttemptId taskAttemptId, Schema schema, TableMeta meta, Path workDir) { this.conf = conf; this.meta = meta; this.schema = schema; this.workDir = workDir; this.taskAttemptId = taskAttemptId; try { if (taskAttemptId != null) { if (!(conf instanceof TajoConf)) { <START> throw new IllegalArgumentException("Configuration must be a TajoConf instance"); <END> } this.path = ((FileStorageManager)StorageManager.getFileStorageManager((TajoConf) conf)) .getAppenderFilePath(taskAttemptId, workDir); } else { this.path = workDir; } } catch (IOException e) { LOG.error(e.getMessage(), e); throw new IllegalStateException("Error while opeining FileAppender: " + e.getMessage(), e); } }</code><technical_language>change exception message follows. Configuration instance of TajoConf. (or Configuration is instance of TajoConf.)</technical_language>

Target:
public FileAppender(Configuration conf, TaskAttemptId taskAttemptId, Schema schema, TableMeta meta, Path workDir) { this.conf = conf; this.meta = meta; this.schema = schema; this.workDir = workDir; this.taskAttemptId = taskAttemptId; try { if (taskAttemptId != null) { if (!(conf instanceof TajoConf)) { throw new IllegalArgumentException("Configuration must be an instance of TajoConf"); } this.path = ((FileStorageManager)StorageManager.getFileStorageManager((TajoConf) conf)) .getAppenderFilePath(taskAttemptId, workDir); } else { this.path = workDir; } } catch (IOException e) { LOG.error(e.getMessage(), e); throw new IllegalStateException("Error while opeining FileAppender: " + e.getMessage(), e); } }
Source:
<code>EntityId(Change change) { this.prefix = change.entityId().substring(0, 1); int parsedId; try { parsedId = Integer.parseInt(change.entityId().substring(1)); } catch <START> (NumberFormatException ignored) { <END> parsedId = -1; } this.id = parsedId; }</code><technical_language>Guava's Ints.tryParse() instead of Integer.parseInt() if a parse error is expected. This allows exception for control flow. Note this introduce auto-unboxing. I is a isValidNumber() method in commons-lang more sense</technical_language>

Target:
EntityId(Change change) { this.prefix = change.entityId().charAt(0); Integer parsedId = Ints.tryParse(change.entityId().substring(1)); this.id = parsedId == null ? -1 : parsedId; }
Source:
<code>public void resolveSuppressedMessagingExceptionLoggingCause() { ErrorType expected = DISPATCH; Throwable exception = new DispatchException(createStaticMessage("DISPATCH PROBLEM"), new ValidateResponse(), suppressIfPresent(new MessagingException(createStaticMessage("CONNECTION PROBLEM"), event), MessagingException.class, true)); MessagingException me = newMessagingException(exception, event, processor); MessagingExceptionResolver anotherResolver = new MessagingExceptionResolver(new TestProcessor()); MessagingException resolved = anotherResolver.resolve(me, locator, emptyList()); assertExceptionErrorType(resolved, expected); assertExceptionMessage(resolved.getMessage(), "DISPATCH PROBLEM"); <START> assertExceptionMessage(resolved.getInfo().get(MuleExceptionInfo.INFO_CAUSED_BY_KEY).toString(), "CONNECTION PROBLEM"); <END> }</code><technical_language>static import</technical_language>

Target:
public void resolveSuppressedMessagingExceptionLoggingCause() { ErrorType expected = DISPATCH; Throwable exception = new DispatchException(createStaticMessage("DISPATCH PROBLEM"), new ValidateResponse(), suppressIfPresent(new MessagingException(createStaticMessage("CONNECTION PROBLEM"), event), MessagingException.class)); MessagingException me = newMessagingException(exception, event, processor); MessagingExceptionResolver anotherResolver = new MessagingExceptionResolver(new TestProcessor()); MessagingException resolved = anotherResolver.resolve(me, locator, emptyList()); assertExceptionErrorType(resolved, expected); assertExceptionMessage(resolved.getMessage(), "DISPATCH PROBLEM"); assertExceptionMessage(resolved.getInfo().get(INFO_CAUSED_BY_KEY).toString(), "CONNECTION PROBLEM"); }
Source:
<code><START> private Map<String, VdsNetworkInterface> getNicsToConfigureByNameWithoutLabelsUpdates() { <END> Map<String, Bond> bondsByName = Entities.entitiesByName(getParameters().getBonds()); Map<String, VdsNetworkInterface> removedBondsByName = Entities.entitiesByName(getRemovedBonds()); List<VdsNetworkInterface> allHostNics = interfaceDao.getAllInterfacesForVds(getVdsId()); Map<String, VdsNetworkInterface> nicsByName = Entities.entitiesByName(allHostNics); for (Bond bond : getParameters().getBonds()) { if (bond.getId() == null) { Bond newBond = new Bond(bond.getName()); nicsByName.put(bond.getName(), newBond); } } nicsByName.putAll(bondsByName); nicsByName.putAll(removedBondsByName); return nicsByName; }</code><technical_language>this code (feels copy-paste), seems, producing Map is necessary complicates situation: Returned Map is in updateLabelsOnNicsToConfigure complicates body of applyUserConfiguredNics. I think, this method return List<VdsNetworkInterface> map name created in updateLabelsOnNicsToConfigure 'entitiesByName. simplify this method, relieve need copy nicsToConfigureByName.values() new ArrayList in applyUserConfiguredNics. overwriting passed-in instances newly created is wrong: a) in case, pass Bond in place, if interessant information - I this is refactor, get rid of "too broad transfer objects". b) I slaves in newly created bonds, copied new bond</technical_language>

Target:
private Map<String, VdsNetworkInterface> getNicsToConfigureByNameWithoutLabelsUpdates() { Map<String, VdsNetworkInterface> removedBondsByName = Entities.entitiesByName(getRemovedBonds()); List<VdsNetworkInterface> allHostNics = interfaceDao.getAllInterfacesForVds(getVdsId()); Map<String, VdsNetworkInterface> nicsByName = Entities.entitiesByName(allHostNics); for (Bond bond : getParameters().getBonds()) { if (bond.getId() == null) { Bond newBond = new Bond(bond.getName()); nicsByName.put(bond.getName(), newBond); } } nicsByName.putAll(removedBondsByName); return nicsByName; }
Source:
<code>public void edit(GlusterStorageModel object) { final GlusterStorageModel glusterStorageModel = object; driver.edit(object); glusterVolumesEditor.asEditor().setValue(object.getGlusterVolumes().getSelectedItem()); pathExampleLabel.setVisible(object.getPath().getIsAvailable() && object.getPath().getIsChangable()); glusterStorageModel.getLinkGlusterVolume().getEntityChangedEvent().addListener(new IEventListener<EventArgs>() { @Override public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) { <START> pathEditorRow.setVisible(!glusterStorageModel.getLinkGlusterVolume().getEntity()); <END> pathExampleLabel.setVisible(!glusterStorageModel.getLinkGlusterVolume().getEntity()); glusterVolumesRow.setVisible(glusterStorageModel.getLinkGlusterVolume().getEntity()); } }); }</code><technical_language>suggest extracting this a local variable</technical_language>

Target:
public void edit(GlusterStorageModel object) { final GlusterStorageModel glusterStorageModel = object; driver.edit(object); glusterVolumesEditor.asEditor().setValue(object.getGlusterVolumes().getSelectedItem()); pathExampleLabel.setVisible(object.getPath().getIsAvailable() && object.getPath().getIsChangable()); glusterStorageModel.getLinkGlusterVolume().getEntityChangedEvent().addListener(new IEventListener<EventArgs>() { @Override public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) { boolean showEditor = !glusterStorageModel.getLinkGlusterVolume().getEntity(); pathEditorRow.setVisible(showEditor); pathExampleLabel.setVisible(showEditor); glusterVolumesRow.setVisible(!showEditor); } }); }
Source:
<code>void onRenderTaskPostExecute() { mIsRendering = false; <START> mTileRenderHandler.post( new Runnable() { <END> @Override public void run() { if ( !mTransitionsEnabled ) { cleanup(); } if( mTileRenderListener != null ) { mTileRenderListener.onRenderComplete(); } invalidate(); requestRender(); } } ); }</code><technical_language>question: a benefit throw-away anonymous instances of Runnable preferable A) creating a single instance a member variable passing instance .post, B) implementing Runnable passing bare instances e.g., .post( new RenderTaskPostExecuteRunnable() ); another, done - asking opinion. i personally efficient (in this case) alternative A - define Runnable a member variable of TileCanvasViewGroup pass Handler.post time, open other ways if a reason to. @peterLaurence feel free weigh in</technical_language>

Target:
void onRenderTaskPostExecute() { mIsRendering = false; mTileRenderHandler.post( mRenderPostExecuteRunnable ); }
Source:
<code>protected Layout getLayout() { VStack root = new VStack(); root.setWidth100(); label = new Label("No job selected"); label.setWidth100(); label.setAlign(Alignment.CENTER); root.addMember(label); genericInformationGrid = new KeyValueGrid(GENERIC_INFORMATION_LABEL_TEXT); genericInformationGrid.showTopMargin(); genericInformationGrid.setWidth100(); genericInformationGrid.hide(); <START> root.addMember(genericInformationGrid); <END> variablesGrid = new KeyValueGrid(JOB_VARIABLES_LABEL_TEXT); variablesGrid.showTopMargin(); variablesGrid.setWidth100(); variablesGrid.hide(); root.addMember(variablesGrid); return root; }</code><technical_language>change order of tables: generic Info variables (and requested order)</technical_language>

Target:
protected Layout getLayout() { VStack root = new VStack(); root.setWidth100(); label = new Label("No job selected"); label.setWidth100(); label.setAlign(Alignment.CENTER); root.addMember(label); variablesGrid = new KeyValueGrid(JOB_VARIABLES_LABEL_TEXT); variablesGrid.showTopMargin(); variablesGrid.setWidth100(); variablesGrid.hide(); root.addMember(variablesGrid); genericInformationGrid = new KeyValueGrid(GENERIC_INFORMATION_LABEL_TEXT); genericInformationGrid.showTopMargin(); genericInformationGrid.setWidth100(); genericInformationGrid.hide(); root.addMember(genericInformationGrid); return root; }
Source:
<code>protected void validateDemographics(PendingCertifiedProductDTO product) { super.validateDemographics(product); for(PendingCertificationResultDTO cert : product.getCertificationCriterion()) { if(cert.getMeetsCriteria() != null && cert.getMeetsCriteria() == Boolean.TRUE) { boolean gapEligibleAndTrue = false; if(certRules.hasCertOption(cert.getNumber(), CertificationResultRules.GAP) && cert.getGap() == Boolean.TRUE) { gapEligibleAndTrue = true; } if(!gapEligibleAndTrue && certRules.hasCertOption(cert.getNumber(), CertificationResultRules.TEST_TOOLS_USED) && !cert.getNumber().equals("170.314 (g)(1)") && !cert.getNumber().equals("170.314 (g)(2)") && !cert.getNumber().equals("170.314 (f)(3)") && (cert.getTestTools() == null || cert.getTestTools().size() == 0)) { product.getErrorMessages().add("Test Tools are required for certification " + cert.getNumber() + "."); } if(cert.getTestTools() != null && cert.getTestTools().size() > 0) { for(PendingCertificationResultTestToolDTO testTool : cert.getTestTools()) { if(testTool.getTestToolId() == null) { product.getErrorMessages().add("There was no test tool found matching '" + testTool.getName() + "' for certification " + cert.getNumber() + "."); } else { TestToolDTO tt = ttDao.getById(testTool.getTestToolId()); if(tt != null && tt.isRetired() && product.getIcs() == false) { product.getErrorMessages().add("Test Tool '" + testTool.getName() + "' for Certification Result '" + cert.getNumber() <START> + "' has been retired for product with ICS=false."); <END> } } } } } } }</code><technical_language>change this line used, is a retired tool, this Certified Product carry ICS? ICS=false phrase is programmery for end users</technical_language>

Target:
protected void validateDemographics(PendingCertifiedProductDTO product) { super.validateDemographics(product); for(PendingCertificationResultDTO cert : product.getCertificationCriterion()) { if(cert.getMeetsCriteria() != null && cert.getMeetsCriteria() == Boolean.TRUE) { boolean gapEligibleAndTrue = false; if(certRules.hasCertOption(cert.getNumber(), CertificationResultRules.GAP) && cert.getGap() == Boolean.TRUE) { gapEligibleAndTrue = true; } if(!gapEligibleAndTrue && certRules.hasCertOption(cert.getNumber(), CertificationResultRules.TEST_TOOLS_USED) && !cert.getNumber().equals("170.314 (g)(1)") && !cert.getNumber().equals("170.314 (g)(2)") && !cert.getNumber().equals("170.314 (f)(3)") && (cert.getTestTools() == null || cert.getTestTools().size() == 0)) { product.getErrorMessages().add("Test Tools are required for certification " + cert.getNumber() + "."); } if(cert.getTestTools() != null && cert.getTestTools().size() > 0) { for(PendingCertificationResultTestToolDTO testTool : cert.getTestTools()) { if(testTool.getTestToolId() == null) { product.getErrorMessages().add("There was no test tool found matching '" + testTool.getName() + "' for certification " + cert.getNumber() + "."); } } } } } }
Source:
<code>LogicalType convertToLogicalType(LogicalTypeAnnotation logicalTypeAnnotation) { <START> return logicalTypeAnnotation.accept(new LogicalTypeConverterVisitor()).get(); <END> }</code><technical_language>I suggest a constant instead of creating a new instance time this method is invoked</technical_language>

Target:
LogicalType convertToLogicalType(LogicalTypeAnnotation logicalTypeAnnotation) { return logicalTypeAnnotation.accept(LOGICAL_TYPE_ANNOTATION_VISITOR).get(); }
Source:
<code>public void setup() { <START> qos = mock(HostNetworkQos.class); <END> validator = new HostNetworkQosValidator(qos); nullValidator = new HostNetworkQosValidator(null); }</code><technical_language>add @RunWith(MockitoJUnitRunner.class) class, you"ll able @mock declaration instead of this initialization. is a matter of style, wish</technical_language>

Target:
public void setup() { validator = new HostNetworkQosValidator(qos); nullValidator = new HostNetworkQosValidator(null); }
Source:
<code>private Object proceedAndLog(final ProceedingJoinPoint point) throws Throwable { final String methodCallDetail = methodCallDetail(point); final String securityContextDetail = securityContextDetail(); final long startTime = System.currentTimeMillis(); try { logger.debug("Enter;[{}] {}", methodCallDetail, securityContextDetail); final Object result = point.proceed(); <START> logger.debug("Return;[{}] ms:[{}] {}", result, System.currentTimeMillis() - startTime, <END> securityContextDetail); return result; } catch (final Throwable e) { logger.debug("Exception;[{}] exception:[{}] ms:[{}] {}", methodCallDetail, e, System.currentTimeMillis() - startTime, securityContextDetail); throw e; } }</code><technical_language>this change removes method call detail, remove security context detail (this part describes principal team ids)</technical_language>

Target:
private Object proceedAndLog(final ProceedingJoinPoint point) throws Throwable { final String methodCallDetail = methodCallDetail(point); final String securityContextDetail = securityContextDetail(); final long startTime = System.currentTimeMillis(); try { logger.debug("Enter;[{}] {}", methodCallDetail, securityContextDetail); final Object result = point.proceed(); logger.debug("Return;[{}] ms:[{}]", result, System.currentTimeMillis() - startTime); return result; } catch (final Throwable e) { logger.debug("Exception;[{}] ms:[{}]", e, System.currentTimeMillis() - startTime); throw e; } }
Source:
<code>public void testAutoPauseOnSendError() throws Exception { String[] cookieTopics = new String[] { "MacadamiaWhiteChocolateCookie", "AlmondCookie", "ChocolateChipCookie", "SaltyCaramelCookie" }; <START> for (String topic: cookieTopics) { <END> createTopic(_zkUtils, topic); } Datastream datastream = KafkaMirrorMakerConnectorTestUtils.createDatastream("cookieStream", _broker, "\\w+Cookie"); DatastreamTaskImpl task = new DatastreamTaskImpl(Collections.singletonList(datastream)); MockDatastreamEventProducer datastreamProducer = new MockDatastreamEventProducer((r) -> true); task.setEventProducer(datastreamProducer); KafkaMirrorMakerConnectorTask connectorTask = KafkaMirrorMakerConnectorTestUtils.createFlushlessKafkaMirrorMakerConnectorTask(task, true, 50, 100, Duration.ofDays(1)); KafkaMirrorMakerConnectorTestUtils.runKafkaMirrorMakerConnectorTask(connectorTask); for (String topic: cookieTopics) { KafkaMirrorMakerConnectorTestUtils.produceEvents(topic, 1, _kafkaCluster); } Assert.assertTrue(PollUtils.poll(() -> connectorTask.getAutoPausedSourcePartitions().size() == cookieTopics.length, POLL_PERIOD_MS, POLL_TIMEOUT_MS), "All topics should have had auto-paused partitions"); connectorTask.stop(); Assert.assertTrue(connectorTask.awaitStop(CONNECTOR_AWAIT_STOP_TIMEOUT_MS, TimeUnit.MILLISECONDS), "did not shut down on time"); }</code><technical_language>nit: space topic : String topic : cookieTopics</technical_language>

Target:
public void testAutoPauseOnSendError() throws Exception { String[] cookieTopics = new String[] { "MacadamiaWhiteChocolateCookie", "AlmondCookie", "ChocolateChipCookie", "SaltyCaramelCookie" }; for (String topic : cookieTopics) { createTopic(_zkUtils, topic); } Datastream datastream = KafkaMirrorMakerConnectorTestUtils.createDatastream("cookieStream", _broker, "\\w+Cookie"); DatastreamTaskImpl task = new DatastreamTaskImpl(Collections.singletonList(datastream)); MockDatastreamEventProducer datastreamProducer = new MockDatastreamEventProducer((r) -> true); task.setEventProducer(datastreamProducer); KafkaMirrorMakerConnectorTask connectorTask = KafkaMirrorMakerConnectorTestUtils.createFlushlessKafkaMirrorMakerConnectorTask(task, true, 50, 100, Duration.ofDays(1)); KafkaMirrorMakerConnectorTestUtils.runKafkaMirrorMakerConnectorTask(connectorTask); for (String topic : cookieTopics) { KafkaMirrorMakerConnectorTestUtils.produceEvents(topic, 1, _kafkaCluster); } Assert.assertTrue(PollUtils.poll(() -> connectorTask.getAutoPausedSourcePartitions().size() == cookieTopics.length, POLL_PERIOD_MS, POLL_TIMEOUT_MS), "All topics should have had auto-paused partitions"); Assert.assertTrue(datastreamProducer.getEvents().isEmpty(), "No events should have been successfully sent"); connectorTask.stop(); Assert.assertTrue(connectorTask.awaitStop(CONNECTOR_AWAIT_STOP_TIMEOUT_MS, TimeUnit.MILLISECONDS), "did not shut down on time"); }
Source:
<code>public String read(Record record) { UserIdReader userIdReader = new UserIdReader(); ClientSummaryReader clientReader = new ClientSummaryReader(); String timestamp = record.getTimestamp().toString(); String userId = userIdReader.read(record); String client = clientReader.read(record); <START> return timestamp + ":" + userId + ":" + client; <END> }</code><technical_language>Please Key.SEPARATOR for ":"</technical_language>

Target:
public String read(Record record) { Long timestamp = record.getTimestamp(); String userId = (new UserIdReader()).read(record); String client = (new ClientSummaryReader()).read(record); return Long.toString(timestamp) + ":" + userId + ":" + client; }
Source:
<code>private void waitListIsRenderedAndClickOnItem(String nameOfCommand, Actions action) { testWebElementRenderChecker.waitElementIsRendered( String.format( <START> " END> nameOfCommand)); action.release(); loadPageWait .until( ExpectedConditions.visibilityOfElementLocated( By.xpath(String.format(Locators.COMMAND_DROPDAWN, nameOfCommand)))) .click(); }</code><technical_language>is id</technical_language>

Target:
private void waitListIsRenderedAndClickOnItem(String nameOfCommand, Actions action) { testWebElementRenderChecker.waitElementIsRendered(By.id("commandsPopup")); action.release(); loadPageWait .until( ExpectedConditions.visibilityOfElementLocated( By.xpath(String.format(Locators.COMMAND_DROPDAWN, nameOfCommand)))) .click(); }
Source:
<code>public void <START> testCleartextTrafficPolicyWithFtpURLConnection() <END> throws Exception { NetworkSecurityPolicy.setCleartextTrafficPermitted(true); byte[] serverReplyOnConnect = "220\r\n".getBytes("US-ASCII"); try (CapturingServerSocket server = new CapturingServerSocket(serverReplyOnConnect)) { URL url = new URL("ftp://localhost:" + server.getPort() + "/test.txt"); try { url.openConnection().getContent(); } catch (IOException expected) { } assertDataTransmittedByClient(server); } NetworkSecurityPolicy.setCleartextTrafficPermitted(false); try (CapturingServerSocket server = new CapturingServerSocket(serverReplyOnConnect)) { URL url = new URL("ftp://localhost:" + server.getPort() + "/test.txt"); try { url.openConnection().getContent(); fail(); } catch (IOException expected) { } assertNoDataTransmittedByClient(server); } }</code><technical_language>Possibly. I a public bug raised it, hard for people develop 3rd-party support</technical_language>

Target:
public void testCleartextTrafficPolicyWithFtpURLConnection() throws Exception { NetworkSecurityPolicy.setCleartextTrafficPermitted(true); byte[] serverReplyOnConnect = "220\r\n".getBytes("US-ASCII"); try (CapturingServerSocket server = new CapturingServerSocket(serverReplyOnConnect)) { URL url = new URL("ftp://localhost:" + server.getPort() + "/test.txt"); try { url.openConnection().getContent(); fail(); } catch (IOException expected) { } server.assertDataTransmittedByClient(); } NetworkSecurityPolicy.setCleartextTrafficPermitted(false); try (CapturingServerSocket server = new CapturingServerSocket(serverReplyOnConnect)) { URL url = new URL("ftp://localhost:" + server.getPort() + "/test.txt"); try { url.openConnection().getContent(); fail(); } catch (IOException expected) { } server.assertNoDataTransmittedByClient(); } }
Source:
<code>private void onAddedOrUpdated() { Object newValue = inMemoryFormat == OBJECT ? entry.getValue() : entry.getByPrioritizingDataValue(); if (backup) { <START> recordStore.putBackup(dataKey, newValue, NOT_WAN); <END> } else { recordStore.setWithUncountedAccess(dataKey, newValue, entry.getNewTtl(), UNSET); if (mapOperation.isPostProcessing(recordStore)) { Record record = recordStore.getRecord(dataKey); newValue = record == null ? null : record.getValue(); entry.setValueByInMemoryFormat(inMemoryFormat, newValue); } mapServiceContext.interceptAfterPut(mapContainer.getInterceptorRegistry(), newValue); stats.incrementPutLatencyNanos(getLatencyNanos(startTimeNanos)); } }</code><technical_language>Hi, in this [test](<LINK_0>, eventually, total entry count(owned + backup) zero. copy test change put entry-processor equivalent</technical_language>

Target:
private void onAddedOrUpdated() { Object newValue = inMemoryFormat == OBJECT ? entry.getValue() : entry.getByPrioritizingDataValue(); if (backup) { recordStore.putBackup(dataKey, newValue, entry.getNewTtl(), UNSET, NOT_WAN); } else { recordStore.setWithUncountedAccess(dataKey, newValue, entry.getNewTtl(), UNSET); if (mapOperation.isPostProcessing(recordStore)) { Record record = recordStore.getRecord(dataKey); newValue = record == null ? null : record.getValue(); entry.setValueByInMemoryFormat(inMemoryFormat, newValue); } mapServiceContext.interceptAfterPut(mapContainer.getInterceptorRegistry(), newValue); stats.incrementPutLatencyNanos(getLatencyNanos(startTimeNanos)); } }
Source:
<code>public void onServerStarting(SpongeServerStartingEvent event) { event.game.getLogger().info("Hey...my implementation's server is starting?"); event.game.getCommandManager().registerCommand(new HelloWorldCommand()); <START> <END> public void onServerStarting(ServerStartingEvent event) { event.getGame().getLogger().info("Hey...my implementation's server is starting?"); } }</code><technical_language>umm, missing brace? "}"</technical_language>

Target:
public void onServerStarting(SpongeServerStartingEvent event) { event.game.getLogger().info("Hey...my implementation's server is starting?"); event.game.getCommandManager().registerCommand(new HelloWorldCommand()); }