auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>static Duration getFsTimestampResolution(Path file) { try { Path dir = Files.isDirectory(file) ? file : file.getParent(); <START> if (!Files.exists(dir) || !dir.toFile().canWrite()) { <END> return FALLBACK_TIMESTAMP_RESOLUTION; } FileStore s = Files.getFileStore(dir); FileStoreAttributeCache c = attributeCache.get(s); if (c == null) { c = new FileStoreAttributeCache(dir); attributeCache.put(s, c); if (LOG.isDebugEnabled()) { LOG.debug(c.toString()); } } return c.getFsTimestampResolution(); } catch (IOException | InterruptedException e) { LOG.warn(e.getMessage(), e); return FALLBACK_TIMESTAMP_RESOLUTION; } }</code><technical_language>canWrite() includes exists(), need test for existence separately</technical_language>

Target:
static Duration getFsTimestampResolution(Path file) { try { Path dir = Files.isDirectory(file) ? file : file.getParent(); if (!dir.toFile().canWrite()) { return FALLBACK_TIMESTAMP_RESOLUTION; } FileStore s = Files.getFileStore(dir); FileStoreAttributeCache c = attributeCache.get(s); if (c == null) { c = new FileStoreAttributeCache(dir); attributeCache.put(s, c); if (LOG.isDebugEnabled()) { LOG.debug(c.toString()); } } return c.getFsTimestampResolution(); } catch (IOException | InterruptedException e) { LOG.warn(e.getMessage(), e); return FALLBACK_TIMESTAMP_RESOLUTION; } }
Source:
<code>public void linkingObjects_IllegalStateException_ifNotYetLoaded() { final Realm realm = looperThread.realm; realm.executeTransaction(new Realm.Transaction() { @Override public void execute(Realm realm) { final BacklinksTarget target1 = realm.createObject(BacklinksTarget.class); target1.setId(1); final BacklinksSource source = realm.createObject(BacklinksSource.class); source.setChild(target1); } }); <START> <END> final DynamicRealm dynamicRealm = DynamicRealm.getInstance(looperThread.realmConfiguration); try { final DynamicRealmObject targetAsync = dynamicRealm.where(BacklinksTarget.CLASS_NAME) .equalTo(BacklinksTarget.FIELD_ID, 1L).findFirstAsync(); assertFalse(targetAsync.isLoaded()); thrown.expect(IllegalStateException.class); targetAsync.linkingObjects(BacklinksSource.CLASS_NAME, BacklinksSource.FIELD_CHILD); fail(); } finally { dynamicRealm.close(); } }</code><technical_language>Whitespace</technical_language>

Target:
public void linkingObjects_IllegalStateException_ifNotYetLoaded() { final Realm realm = looperThread.getRealm(); realm.executeTransaction(new Realm.Transaction() { @Override public void execute(Realm realm) { final BacklinksTarget target1 = realm.createObject(BacklinksTarget.class); target1.setId(1); final BacklinksSource source = realm.createObject(BacklinksSource.class); source.setChild(target1); } }); final DynamicRealm dynamicRealm = DynamicRealm.getInstance(looperThread.getConfiguration()); try { final DynamicRealmObject targetAsync = dynamicRealm.where(BacklinksTarget.CLASS_NAME) .equalTo(BacklinksTarget.FIELD_ID, 1L).findFirstAsync(); assertFalse(targetAsync.isLoaded()); thrown.expect(IllegalStateException.class); targetAsync.linkingObjects(BacklinksSource.CLASS_NAME, BacklinksSource.FIELD_CHILD); } finally { dynamicRealm.close(); } }
Source:
<code>private void checkConnection() { if (getThing().getStatus() != ThingStatus.ONLINE) { openConnection(); } if (getThing().getStatus() == ThingStatus.ONLINE && this.session != null && this.session.isOpen()) { try { this.session.getRemote().sendPing(null); this.missedPongsCount.countDown(); } catch (IOException | NullPointerException | UnsupportedOperationException e) { <START> logger.warn("Sending websocket PING failed."); <END> onWebSocketError(e); closeConnection(); openConnection(); } } }</code><technical_language>This warning here, debug. Furthermore, message applies IOException NullPointerException, while UnsupportedOperationException means missed some pongs (but for ping sent, right? sense all?)</technical_language>

Target:
private void checkConnection() { if (getThing().getStatus() != ThingStatus.ONLINE) { openConnection(); } if (getThing().getStatus() == ThingStatus.ONLINE && this.session != null && this.session.isOpen()) { try { this.session.getRemote().sendPing(null); missedPongsCount++; } catch (IOException | NullPointerException e) { onWebSocketError(e); closeConnection(); openConnection(); } if (missedPongsCount == MAX_MISSED_PONGS_COUNT) { missedPongsCount = 0; closeConnection(); openConnection(); } } }
Source:
<code>private static List<ReadRowsResponse> createResponses(int cellCount) { Builder readRowsResponse = ReadRowsResponse.newBuilder(); int size = 100_000 / cellCount; for (int i = 0; i < cellCount; i++) { CellChunk contentChunk = CellChunk.newBuilder() .setFamilyName(StringValue.newBuilder().setValue("Family" + i)) <START> .setQualifier(BytesValue.newBuilder().setValue(ByteString.copyFromUtf8("Qaulifier"))) <END> .setRowKey(ByteString.copyFrom(Bytes.toBytes("rowkey-0"))) .setValue(ByteString.copyFrom(RandomStringUtils.randomAlphanumeric(size).getBytes())) .setTimestampMicros(0L) .setCommitRow(i == cellCount - 1) .build(); readRowsResponse.addChunks(contentChunk); } return Arrays.asList(readRowsResponse.build()); }</code><technical_language>s/Qualifier/Qualifier</technical_language>

Target:
private static List<ReadRowsResponse> createResponses(int cellCount) { Builder readRowsResponse = ReadRowsResponse.newBuilder(); Preconditions.checkArgument(cellCount > 0, "cellCount has to be > 0."); int size = 100_000 / cellCount; Preconditions.checkArgument(size > 0, "size has to be > 0."); for (int i = 0; i < cellCount; i++) { CellChunk contentChunk = CellChunk.newBuilder() .setFamilyName(StringValue.newBuilder().setValue("Family" + i)) .setQualifier(BytesValue.newBuilder().setValue(ByteString.copyFromUtf8("Qualifier"))) .setRowKey(ByteString.copyFrom(Bytes.toBytes("rowkey-0"))) .setValue(ByteString.copyFrom(RandomStringUtils.randomAlphanumeric(size).getBytes())) .setTimestampMicros(0L) .setCommitRow(i == cellCount - 1) .build(); readRowsResponse.addChunks(contentChunk); } return Arrays.asList(readRowsResponse.build()); }
Source:
<code>private List<Entity> retrieveSurveyForms(DatastoreService ds, Long surveyId) { Filter surveyFilter = new Query.FilterPredicate("surveyGroupId", FilterOperator.EQUAL, surveyId); Query q = new Query(FORM_KIND).setFilter(surveyFilter); List<Entity> surveyForms = new ArrayList<Entity>(); <START> for (Entity survey : ds.prepare(q).asIterable()) { <END> surveyForms.add(survey); } return surveyForms; }</code><technical_language>list of forms is huge, do: ds.prepare(q).asList() instead of Iterable adding a List</technical_language>

Target:
private List<Entity> retrieveSurveyForms(DatastoreService ds, Long surveyId) { Filter surveyFilter = new Query.FilterPredicate("surveyGroupId", FilterOperator.EQUAL, surveyId); Query q = new Query(FORM_KIND).setFilter(surveyFilter); return ds.prepare(q).asList(FetchOptions.Builder.withDefaults()); }
Source:
<code>public static void putAsJson(String path, JsonNode data, EtcdClient etcdClient) throws IOException, EtcdAuthenticationException, TimeoutException, EtcdException { Map<String, Object> flattened = new JsonFlattener(EtcdUtil.jsonToString(data)) .withFlattenMode(FlattenMode.MONGODB) .withSeparator('/') <START> .withKeyTransformer(s -> s.replaceAll("\\.", "__DOT__")) <END> .flattenAsMap(); try { etcdClient.delete(path).recursive().send().get(); } catch (EtcdException e) { if (EtcdErrorCode.KeyNotFound != e.errorCode) { throw e; } } for (Map.Entry<String, Object> entry : flattened.entrySet()) { etcdClient.put(path + "/" + entry.getKey(), String.valueOf(entry.getValue())).send().get(); } }</code><technical_language>project support java 8</technical_language>

Target:
public static void putAsJson(String path, JsonNode data, EtcdClient etcdClient) throws IOException, EtcdAuthenticationException, TimeoutException, EtcdException { Map<String, Object> flattened = new JsonFlattener(EtcdUtil.jsonToString(data)) .withFlattenMode(FlattenMode.MONGODB) .withSeparator('/') .withKeyTransformer(new KeyTransformer() { @Override public String transform(String s) { return s.replaceAll("\\.", "__DOT__"); } }) .flattenAsMap(); try { etcdClient.delete(path).recursive().send().get(); } catch (EtcdException e) { if (EtcdErrorCode.KeyNotFound != e.errorCode) { throw e; } } for (Map.Entry<String, Object> entry : flattened.entrySet()) { etcdClient.put(path + "/" + entry.getKey(), String.valueOf(entry.getValue())).send().get(); } }
Source:
<code>public void childEvent(CuratorFramework curatorFramework, PathChildrenCacheEvent pathChildrenCacheEvent) throws Exception { String jvmAlias; switch (pathChildrenCacheEvent.getType()) { case CHILD_ADDED: <START> log.debug(ZookeeperClusterService.this.clConfig.getWorkerAlias() <END> + " Node added: " + ZKPaths.getNodeFromPath(pathChildrenCacheEvent.getData().getPath())); jvmAlias = ZKPaths.getNodeFromPath(pathChildrenCacheEvent.getData().getPath()); if (!ZookeeperClusterService.this.jvmHandlers.containsKey(jvmAlias)) { ZookeeperJvmHandler handler = new ZookeeperJvmHandler( jvmAlias, ZookeeperClusterService.this.clClient, clConfig); handler.initialize(); ZookeeperClusterService.this.jvmHandlers.put(jvmAlias, handler); } break; case CHILD_UPDATED: log.debug(clConfig.getWorkerAlias() + " Node upadet: " + ZKPaths.getNodeFromPath(pathChildrenCacheEvent.getData().getPath())); break; case CHILD_REMOVED: jvmAlias = ZKPaths.getNodeFromPath(pathChildrenCacheEvent.getData().getPath()); if (ZookeeperClusterService.this.jvmHandlers.containsKey(jvmAlias)) { ZookeeperClusterService.this.jvmHandlers.get(jvmAlias).dispose(); ZookeeperClusterService.this.jvmHandlers.remove(jvmAlias); } log.debug(clConfig.getWorkerAlias() + " Node removed: " + ZKPaths.getNodeFromPath(pathChildrenCacheEvent.getData().getPath())); break; } }</code><technical_language>Please placeholders in log messages, string concatenation</technical_language>

Target:
public void childEvent(CuratorFramework curatorFramework, PathChildrenCacheEvent pathChildrenCacheEvent) throws Exception { String jvmAlias; switch (pathChildrenCacheEvent.getType()) { case CHILD_ADDED: log.debug("{} Node added: {}", clConfig.getWorkerAlias(), ZKPaths.getNodeFromPath(pathChildrenCacheEvent.getData().getPath())); jvmAlias = ZKPaths.getNodeFromPath(pathChildrenCacheEvent.getData().getPath()); if (!this.jvmHandlers.containsKey(jvmAlias)) { ZookeeperJvmHandler handler = new ZookeeperJvmHandler( jvmAlias, clClient, clConfig, zookeeperClusterService); jvmHandlers.put(jvmAlias, handler); } break; case CHILD_UPDATED: log.debug(clConfig.getWorkerAlias() + " Node update: " + ZKPaths.getNodeFromPath(pathChildrenCacheEvent.getData().getPath())); break; case CHILD_REMOVED: jvmAlias = ZKPaths.getNodeFromPath(pathChildrenCacheEvent.getData().getPath()); ZookeeperJvmHandler jvmHandler = jvmHandlers.remove(jvmAlias); if (jvmHandler != null) jvmHandler.close(); log.debug("{} Node removed: {}", clConfig.getWorkerAlias(), ZKPaths.getNodeFromPath(pathChildrenCacheEvent.getData().getPath())); break; default: throw new IllegalArgumentException("Unknown event type: " + pathChildrenCacheEvent.getType()); } }
Source:
<code>private Mono<Void> sendClientTelemetry() { return Mono.delay(Duration.ofSeconds(clientTelemetrySchedulingSec)) .flatMap(t -> { if (this.isClosed) { logger.warn("client already closed"); return Mono.empty(); } if(!Configs.isClientTelemetryEnabled(this.isClientTelemetryEnabled)) { logger.trace("client telemetry not enabled"); return Mono.empty(); } readHistogram(); try { logger.info("ClientTelemetry {}", OBJECT_MAPPER.writeValueAsString(this.clientTelemetryInfo)); } catch (JsonProcessingException e) { e.printStackTrace(); } clearDataForNextRun(); return this.sendClientTelemetry(); }).onErrorResume(ex -> { logger.error("sendClientTelemetry() - Unable to send client telemetry" + <START> ". Exception: {}", ex.toString(), ex); <END> clearDataForNextRun(); return this.sendClientTelemetry(); }).subscribeOn(scheduler); }</code><technical_language>capturing exception message twice</technical_language>

Target:
private Mono<Void> sendClientTelemetry() { return Mono.delay(Duration.ofSeconds(clientTelemetrySchedulingSec)) .flatMap(t -> { if (this.isClosed) { logger.warn("client already closed"); return Mono.empty(); } if(!Configs.isClientTelemetryEnabled(this.isClientTelemetryEnabled)) { logger.trace("client telemetry not enabled"); return Mono.empty(); } readHistogram(); try { logger.info("ClientTelemetry {}", OBJECT_MAPPER.writeValueAsString(this.clientTelemetryInfo)); } catch (JsonProcessingException e) { logger.error("Error which parsing client telemetry into json. ", e); } clearDataForNextRun(); return this.sendClientTelemetry(); }).onErrorResume(ex -> { logger.error("sendClientTelemetry() - Unable to send client telemetry" + ". Exception: ", ex); clearDataForNextRun(); return this.sendClientTelemetry(); }).subscribeOn(scheduler); }
Source:
<code>public void scanFile(JavaFileScannerContext context) { occurrences.clear(); constants.clear(); scan(context.getTree()); for (String entry : occurrences.keySet()) { Collection<LiteralTree> literalTrees = occurrences.get(entry); <START> boolean allInConstants = context.getSemanticModel() != null && literalTrees.stream().allMatch(t -> { <END> if (t.parent().is(Tree.Kind.VARIABLE)) { Symbol symbol = ((VariableTree) t.parent()).symbol(); return symbol.isStatic() && symbol.isFinal(); } return false; }); if(allInConstants) { continue; } int literalOccurrence = literalTrees.size(); if (constants.containsKey(entry) && literalOccurrence > 1) { VariableTree constant = constants.get(entry); List<LiteralTree> duplications = literalTrees.stream().filter(literal -> literal.parent() != constant).collect(Collectors.toList()); context.reportIssue(this, duplications.iterator().next(), "Use already-defined constant '" + constant.simpleName() + "' instead of duplicating its value here.", secondaryLocations(duplications.subList(1, duplications.size())), literalOccurrence); } else if (literalOccurrence >= threshold) { context.reportIssue( this, literalTrees.iterator().next(), "Define a constant instead of duplicating this literal " + entry + " " + literalOccurrence + " times.", secondaryLocations(literalTrees), literalOccurrence); } } }</code><technical_language>I is simpler ignore "constants" visit, i.e. cut visit in visitVariable method, constants counted in occurences</technical_language>

Target:
public void scanFile(JavaFileScannerContext context) { occurrences.clear(); constants.clear(); scan(context.getTree()); for (String entry : occurrences.keySet()) { Collection<LiteralTree> literalTrees = occurrences.get(entry); int literalOccurrence = literalTrees.size(); if (constants.containsKey(entry) && literalOccurrence > 0) { VariableTree constant = constants.get(entry); List<LiteralTree> duplications = literalTrees.stream().filter(literal -> literal.parent() != constant).collect(Collectors.toList()); context.reportIssue(this, duplications.iterator().next(), "Use already-defined constant '" + constant.simpleName() + "' instead of duplicating its value here.", secondaryLocations(duplications.subList(1, duplications.size())), literalOccurrence); } else if (literalOccurrence >= threshold) { context.reportIssue( this, literalTrees.iterator().next(), "Define a constant instead of duplicating this literal " + entry + " " + literalOccurrence + " times.", secondaryLocations(literalTrees), literalOccurrence); } } }
Source:
<code>public PropertyRest findOne(Context context, String property) { <START> if (!exposedProperties.contains(property) || configurationService.getArrayProperty(property).length == 0) { <END> throw new ResourceNotFoundException("No such configuration property: " + property); } String[] propertyValues = configurationService.getArrayProperty(property); PropertyRest propertyRest = new PropertyRest(); propertyRest.setName(property); propertyRest.setValues(Arrays.asList(propertyValues)); return propertyRest; }</code><technical_language>replace this getArrayProperty().length check a call configurationService.hasProperty(). recommended determine if a property exists in configuration</technical_language>

Target:
public PropertyRest findOne(Context context, String property) { if (!exposedProperties.contains(property) || !configurationService.hasProperty(property)) { throw new ResourceNotFoundException("No such configuration property: " + property); } String[] propertyValues = configurationService.getArrayProperty(property); PropertyRest propertyRest = new PropertyRest(); propertyRest.setName(property); propertyRest.setValues(Arrays.asList(propertyValues)); return propertyRest; }
Source:
<code>public GitHubRepositoryList createRepositoriesList() throws IOException { GitHubRepositoryList dtoRepositoriesList = DtoFactory.getInstance().createDto(GitHubRepositoryList.class); <START> return dtoRepositoriesList; <END> }</code><technical_language>line this</technical_language>

Target:
public GitHubRepositoryList createRepositoriesList() throws IOException { return DtoFactory.getInstance().createDto(GitHubRepositoryList.class); }
Source:
<code>private List<String> getNewWarnings(List<PrestoWarning> warnings) { int end; <START> if (maxWarnings.isPresent()) { <END> end = Math.min(processedWarnings + maxWarnings.getAsInt(), warnings.size()); } else { end = warnings.size(); } List<String> subList = warnings.subList(processedWarnings, end).stream() .map(this::getWarningMessage) .collect(toImmutableList()); processedWarnings = end; return subList; }</code><technical_language>This simplified to: java int end = Math.min(processedWarnings + maxWarnings.orElse(Integer.MAX_VALUE), warnings.size()); Alternatively, write follows, intent a clearer. java int end = warnings.size(); if (maxWarnings.isPresent()) { end = Math.min(end, processedWarnings + maxWarnings.getAsInt()); }</technical_language>

Target:
private List<String> getNewWarnings(List<PrestoWarning> warnings) { int end = warnings.size(); if (maxWarnings.isPresent()) { end = Math.min(processedWarnings + maxWarnings.getAsInt(), end); } List<String> subList = warnings.subList(processedWarnings, end).stream() .map(this::getWarningMessage) .collect(toImmutableList()); processedWarnings = end; return subList; }
Source:
<code>protected void executeCommand() { StorageDomainDR storageDomainDR = storageDomainDRDao.get(getParameters().getStorageDomainId(), getParameters().getGeoRepSessionId()); if (storageDomainDR == null) { storageDomainDR = new StorageDomainDR(); storageDomainDR.setStorageDomainId(getParameters().getStorageDomainId()); storageDomainDR.setGeoRepSessionId(getParameters().getGeoRepSessionId()); } else { if (storageDomainDR.getJobId() != null) { schedulerUtil.deleteJob(storageDomainDR.getJobId()); } } if (getParameters().getSchedule().getFrequency() != StorageSyncSchedule.Frequency.NONE) { String jobId = schedulerUtil.scheduleACronJob(GlusterStorageDomainDRSyncJob.class, "syncData", new Class[] { String.class, String.class }, new Object[] { getParameters().getStorageDomainId().toString(), <START> getParameters().getGeoRepSessionId().toString() }, <END> getParameters().getSchedule().getCronExpression()); storageDomainDR.setScheduleCronExpression(getParameters().getSchedule().getCronExpression()); storageDomainDR.setJobId(jobId); storageDomainDRDao.saveOrUpdate(storageDomainDR); } else { storageDomainDRDao.remove(storageDomainDR.getStorageDomainId(), storageDomainDR.getGeoRepSessionId()); } setSucceeded(true); }</code><technical_language>if storageDomainDR.getJobId() != null, need storageDomainDR.getGeoRepSessionId storageDomainDR.getStorageDomainId instead of getParameters().getGeoRepSessionId() getParameters().getStorageDomainId()</technical_language>

Target:
protected void executeCommand() { StorageDomainDR storageDomainDR = storageDomainDRDao.get(getParameters().getStorageDomainId(), getParameters().getGeoRepSessionId()); if (storageDomainDR == null) { storageDomainDR = new StorageDomainDR(); storageDomainDR.setStorageDomainId(getParameters().getStorageDomainId()); storageDomainDR.setGeoRepSessionId(getParameters().getGeoRepSessionId()); } else { if (storageDomainDR.getJobId() != null) { schedulerUtil.deleteJob(storageDomainDR.getJobId()); } } if (getParameters().getSchedule().getFrequency() != StorageSyncSchedule.Frequency.NONE) { String jobId = schedulerUtil.scheduleACronJob(new GlusterStorageDomainDRSyncJob(), "syncData", new Class[] { String.class, String.class }, new Object[] { getParameters().getStorageDomainId().toString(), getParameters().getGeoRepSessionId().toString() }, getParameters().getSchedule().toCronExpression()); storageDomainDR.setScheduleCronExpression(getParameters().getSchedule().toCronExpression()); storageDomainDR.setJobId(jobId); storageDomainDRDao.saveOrUpdate(storageDomainDR); } else { storageDomainDRDao.remove(storageDomainDR.getStorageDomainId(), storageDomainDR.getGeoRepSessionId()); } setSucceeded(true); }
Source:
<code>private List<EnvironmentInfo> getStrongboxInfo() { List<EnvironmentInfo> strongboxInfo = new ArrayList(); Map<String, Storage> storageMap = getConfiguration().getStorages(); Long repositoriesCount = storageMap.values() .stream() .map(e -> e.getRepository(e.getId())) .count(); strongboxInfo.add(new EnvironmentInfo("repositories", String.valueOf(repositoriesCount))); Long storagesCount = storageMap.values() .stream() .count(); strongboxInfo.add(new EnvironmentInfo("storages", String.valueOf(storagesCount))); <START> Long usersCount = userService.getUsers(null, null) <END> .getUsers() .stream() .count(); strongboxInfo.add(new EnvironmentInfo("users", String.valueOf(usersCount))); return strongboxInfo; }</code><technical_language>@anki2189 implementation is correct. other hand, real user count run slowly, I suggest drop usersCount strongboxInfo. @steve-todorov mind</technical_language>

Target:
private List<EnvironmentInfo> getStrongboxInfo() { List<EnvironmentInfo> strongboxInfo = new ArrayList(); Map<String, Storage> storageMap = getConfiguration().getStorages(); Long repositoriesCount = storageMap.values() .stream() .map(e -> e.getRepository(e.getId())) .count(); strongboxInfo.add(new EnvironmentInfo("repositories", String.valueOf(repositoriesCount))); Long storagesCount = storageMap.values() .stream() .count(); strongboxInfo.add(new EnvironmentInfo("storages", String.valueOf(storagesCount))); Long usersCount = 0L; strongboxInfo.add(new EnvironmentInfo("users", String.valueOf(usersCount))); return strongboxInfo; }
Source:
<code>private void assertAsSetContainsAll(MetricTarget... targets) { <START> assertContainsAll(asSet(targets), asList(targets)); <END> }</code><technical_language>Minor: I static import for clarity</technical_language>

Target:
private void assertAsSetContainsAll(MetricTarget... targets) { assertContainsAll(MetricTarget.asSet(targets), asList(targets)); }
Source:
<code>private Map<String, AttributeValueUpdate> generateAlarmUpdateItem(final List<Alarm> newAlarmList, final List<Alarm> oldAlarmList, final DateTimeZone userTimeZone){ <START> final ObjectMapper mapper = new ObjectMapper(); <END> final Map<String, AttributeValueUpdate> items = new HashMap<>(); final DateTime now = DateTime.now().withZone(userTimeZone); if(shouldUpdateRingTime(oldAlarmList, newAlarmList, userTimeZone, now)) { final Map<String, AttributeValueUpdate> ringTimeUpdateItems = appendRingTimeUpdateItem(newAlarmList, userTimeZone, now); items.putAll(ringTimeUpdateItems); } final String alarmListJSON; try { alarmListJSON = mapper.writeValueAsString(newAlarmList); } catch (JsonProcessingException e) { LOGGER.error("Deserialize alarmList error: {}", e.getMessage()); return Collections.EMPTY_MAP; } items.put(ALARM_TEMPLATES_ATTRIBUTE_NAME, new AttributeValueUpdate() .withAction(AttributeAction.PUT) .withValue(new AttributeValue().withS(alarmListJSON))); return items; }</code><technical_language>static</technical_language>

Target:
private Map<String, AttributeValueUpdate> generateAlarmUpdateItem(final List<Alarm> newAlarmList, final List<Alarm> oldAlarmList, final DateTimeZone userTimeZone){ final Map<String, AttributeValueUpdate> items = new HashMap<>(); final DateTime now = DateTime.now().withZone(userTimeZone); if(shouldUpdateRingTime(oldAlarmList, newAlarmList, userTimeZone, now)) { final Map<String, AttributeValueUpdate> ringTimeUpdateItems = appendRingTimeUpdateItem(newAlarmList, userTimeZone, now); items.putAll(ringTimeUpdateItems); } final String alarmListJSON; try { alarmListJSON = this.objectMapper.writeValueAsString(newAlarmList); } catch (JsonProcessingException e) { LOGGER.error("Deserialize alarmList error: {}", e.getMessage()); return Collections.EMPTY_MAP; } items.put(ALARM_TEMPLATES_ATTRIBUTE_NAME, new AttributeValueUpdate() .withAction(AttributeAction.PUT) .withValue(new AttributeValue().withS(alarmListJSON))); return items; }
Source:
<code>public void testGenericWordConstainsString() { StopList sut = new StopList(); <START> boolean containsWord = sut.contains("and"); <END> assertTrue(containsWord); }</code><technical_language>reason this line, assertTrue(sut.contains("and"))</technical_language>

Target:
public void testGenericWordConstainsString() { StopList sut = new StopList(); boolean containsWord = sut.contains("and"); assertTrue("Determine if stopword as string is contained", containsWord); }
Source:
<code>public static String getDevMachineName(Environment envConfig) { for (Map.Entry<String, ? extends MachineConfig> entry : envConfig.getMachines().entrySet()) { List<String> installers = entry.getValue().getInstallers(); if (InstallerFqn.idInKeyList(WSAGENT_INSTALLER, installers)) { <START> return entry.getKey(); <END> } } return null; }</code><technical_language>do a notion of "dev-machine" anymore, disagree this class in a practically root package of workspace API. if needed for some local - is (depends reason of usage) correct resolve installer, is done server</technical_language>

Target:
public static String getDevMachineName(Environment envConfig) { for (Map.Entry<String, ? extends MachineConfig> entry : envConfig.getMachines().entrySet()) { if (isDev(entry.getValue())) { return entry.getKey(); } } return null; }
Source:
<code>public GerritHandler(int numberOfWorkerThreads, int threadKeepAliveTime) { this.numberOfWorkerThreads = numberOfWorkerThreads; <START> if (threadKeepAliveTime < MIN_RECEIVE_THREAD_KEEP_ALIVE_TIME) <END> { threadKeepAliveTime = MIN_RECEIVE_THREAD_KEEP_ALIVE_TIME; } this.threadKeepAliveTime = threadKeepAliveTime; startQueue(); }</code><technical_language>Math.max</technical_language>

Target:
public GerritHandler(int numberOfWorkerThreads, int threadKeepAliveTime) { this.numberOfWorkerThreads = numberOfWorkerThreads; this.threadKeepAliveTime = Math.max(MIN_RECEIVE_THREAD_KEEP_ALIVE_TIME, threadKeepAliveTime); startQueue(); }
Source:
<code>void testEncodingWithEmptyMetadata() { ByteBuf frame = RequestStreamFrameFlyweight.encode( ByteBufAllocator.DEFAULT, 1, false, 1, Unpooled.EMPTY_BUFFER, Unpooled.copiedBuffer("d", StandardCharsets.UTF_8)); frame = FrameLengthFlyweight.encode(ByteBufAllocator.DEFAULT, frame.readableBytes(), frame); <START> assertEquals("00000b0000000118000000000164", ByteBufUtil.hexDump(frame)); <END> frame.release(); }</code><technical_language>for this test in develop branch is correct value. Changing this is a bug</technical_language>

Target:
void testEncodingWithEmptyMetadata() { ByteBuf frame = RequestStreamFrameFlyweight.encode( ByteBufAllocator.DEFAULT, 1, false, 1, Unpooled.EMPTY_BUFFER, Unpooled.copiedBuffer("d", StandardCharsets.UTF_8)); frame = FrameLengthFlyweight.encode(ByteBufAllocator.DEFAULT, frame.readableBytes(), frame); assertEquals("00000e0000000119000000000100000064", ByteBufUtil.hexDump(frame)); frame.release(); }
Source:
<code>private void interpretCommandStatus(String status, ResultHandler handler) { long oid = 0; long count = 0; int marker1 = -1; int marker2 = -1; <START> if (status.indexOf(" ") != -1) { <END> for (int i = status.length() - 1; i >= 0; i--) { if (Character.isDigit(status.charAt(i))) { } else if (status.charAt(i) == ' ') { if (marker1 == -1) { marker1 = i; } else { marker2 = i; } } else { break; } } } if (marker1 != -1) { try { if (marker2 != -1) { oid = Long.parseLong(status.substring(marker2 + 1, marker1)); count = Long.parseLong(status.substring(marker1 + 1)); } else { count = Long.parseLong(status.substring(marker1 + 1)); } } catch (NumberFormatException e) { handler.handleError(new PSQLException( GT.tr("Unable to parse the count in command completion tag: {0}.", status), PSQLState.CONNECTION_FAILURE)); return; } } int countAsInt = 0; if (count > Integer.MAX_VALUE) { countAsInt = Statement.SUCCESS_NO_INFO; } else if (count > 0) { countAsInt = (int) count; } handler.handleCommandStatus(status, countAsInt, oid); }</code><technical_language>this check add value? In case a command spaces, this requires examining char. for loop stop chars soon a non-digit is encountered</technical_language>

Target:
private void interpretCommandStatus(String status, ResultHandler handler) { long oid = 0; long count = 0; int marker1 = -1; int marker2 = -1; for (int i = status.length() - 1; i >= 0; i--) { if (Character.isDigit(status.charAt(i))) { } else if (status.charAt(i) == ' ') { if (marker1 == -1) { marker1 = i; } else { marker2 = i; } } else { break; } } if (marker1 != -1) { try { if (marker2 != -1) { oid = Long.parseLong(status.substring(marker2 + 1, marker1)); count = Long.parseLong(status.substring(marker1 + 1)); } else { count = Long.parseLong(status.substring(marker1 + 1)); } } catch (NumberFormatException e) { handler.handleError(new PSQLException( GT.tr("Unable to parse the count in command completion tag: {0}.", status), PSQLState.CONNECTION_FAILURE)); return; } } int countAsInt = 0; if (count > Integer.MAX_VALUE) { countAsInt = Statement.SUCCESS_NO_INFO; } else if (count > 0) { countAsInt = (int) count; } handler.handleCommandStatus(status, countAsInt, oid); }
Source:
<code>private static void scanFile(String filename, JavaFileScanner check, JavaCheckVerifier javaCheckVerifier) { Collection<File> classpath = Lists.newLinkedList(); File testJars = new File("target/test-jars"); <START> if(testJars.exists()) { <END> classpath = FileUtils.listFiles(testJars, new String[]{"jar", "zip"}, true); } classpath.add(new File("target/test-classes")); JavaAstScanner.scanSingleFile(new File(filename), new VisitorsBridge(Lists.newArrayList(check, javaCheckVerifier), Lists.newArrayList(classpath), null)); }</code><technical_language>@m-g-sonar if( space</technical_language>

Target:
private static void scanFile(String filename, JavaFileScanner check, JavaCheckVerifier javaCheckVerifier) { Collection<File> classpath = Lists.newLinkedList(); File testJars = new File(javaCheckVerifier.testJarsDirectory); if (testJars.exists()) { classpath = FileUtils.listFiles(testJars, new String[]{"jar", "zip"}, true); } else if (!DEFAULT_TEST_JARS_DIRECTORY.equals(javaCheckVerifier.testJarsDirectory)) { throw Fail.fail("The directory to be used to extend class path does not exists (" + testJars.getAbsolutePath() + ")."); } classpath.add(new File("target/test-classes")); JavaAstScanner.scanSingleFile(new File(filename), new VisitorsBridge(Lists.newArrayList(check, javaCheckVerifier), Lists.newArrayList(classpath), null)); }
Source:
<code>public static Dialog <START> find(@NotNull <END> Robot robot, @NotNull String title) { return WindowFinder.findDialog(new DialogTitleMatcher(title)).withTimeout(10000).using(robot).target; }</code><technical_language>Annotate method @NotNull</technical_language>

Target:
public static Dialog find(@NotNull Robot robot, @NotNull String title) { return WindowFinder.findDialog(new DialogTitleMatcher(title)).withTimeout(GuiTests.LONG_TIMEOUT.duration()).using(robot).target; }
Source:
<code>public void testHostStatuses() throws Exception { final String aHost = testHost() + "a"; final String bHost = testHost() + "b"; startDefaultMaster(); startDefaultAgent(aHost); startDefaultAgent(bHost); <START> awaitHostStatus(aHost, UP, LONG_WAIT_MINUTES, MINUTES); <END> awaitHostStatus(bHost, UP, LONG_WAIT_MINUTES, MINUTES); final Map<String, HostStatus> cliStatuses = new ObjectMapper().readValue(cli("hosts", "--json"), new TypeReference<Map<String, HostStatus>>(){}); assertTrue("status must contain key for " + aHost, cliStatuses.containsKey(aHost)); assertTrue("status must contain key for " + bHost, cliStatuses.containsKey(bHost)); final HeliosClient client = defaultClient(); final Map<String, HostStatus> clientStatuses = client.hostStatuses( ImmutableList.of(aHost, bHost)).get(); assertTrue("status must contain key for " + aHost, clientStatuses.containsKey(aHost)); assertTrue("status must contain key for " + bHost, clientStatuses.containsKey(bHost)); }</code><technical_language>Needs rebased (LONG_WAIT_MINUTES is LONG_WAIT_SECONDS)</technical_language>

Target:
public void testHostStatuses() throws Exception { final String aHost = testHost() + "a"; final String bHost = testHost() + "b"; startDefaultMaster(); startDefaultAgent(aHost); startDefaultAgent(bHost); awaitHostStatus(aHost, UP, LONG_WAIT_SECONDS, SECONDS); awaitHostStatus(bHost, UP, LONG_WAIT_SECONDS, SECONDS); final Map<String, HostStatus> cliStatuses = new ObjectMapper().readValue(cli("hosts", "--json"), new TypeReference<Map<String, HostStatus>>(){}); assertTrue("status must contain key for " + aHost, cliStatuses.containsKey(aHost)); assertTrue("status must contain key for " + bHost, cliStatuses.containsKey(bHost)); final HeliosClient client = defaultClient(); final Map<String, HostStatus> clientStatuses = client.hostStatuses( ImmutableList.of(aHost, bHost)).get(); assertTrue("status must contain key for " + aHost, clientStatuses.containsKey(aHost)); assertTrue("status must contain key for " + bHost, clientStatuses.containsKey(bHost)); }
Source:
<code>public void maybeShowIndicatorDots() { editOptionIndicatorDot.setVisibility((Prefs.showEditMenuOptionIndicator() <START> && Prefs.getTotalUserDescriptionsEdited() >= ACTION_DESCRIPTION_EDIT_UNLOCK_THRESHOLD) ? <END> VISIBLE : GONE); }</code><technical_language>Again, this is specific logic this component need about. depend Prefs.showEditMenuOptionIndicator()</technical_language>

Target:
public void maybeShowIndicatorDots() { editOptionIndicatorDot.setVisibility(Prefs.showEditMenuOptionIndicator() ? VISIBLE : GONE); }
Source:
<code>public BlockBreakHandler getItemHandler() { return new BlockBreakHandler() { @Override public boolean isPrivate() { return false; } @Override public boolean onBlockBreak(BlockBreakEvent e, ItemStack item, int fortune, List<ItemStack> drops) { if (isItem(item)) { if (Slimefun.hasUnlocked(e.getPlayer(), ExplosiveTool.this, true)) { e.getBlock().getWorld().createExplosion(e.getBlock().getLocation(), 0.0F); e.getBlock().getWorld().playSound(e.getBlock().getLocation(), Sound.ENTITY_GENERIC_EXPLODE, 0.2F, 1F); List<Block> blocks = findBlocks(e.getBlock()); <START> if (callExplosionEvent.getValue()) { <END> BlockExplodeEvent blockExplodeEvent = new BlockExplodeEvent(e.getBlock(), blocks, 0); Bukkit.getServer().getPluginManager().callEvent(blockExplodeEvent); if (!blockExplodeEvent.isCancelled()) { blockExplodeEvent.blockList().forEach(b -> breakBlock(e.getPlayer(), item, b, fortune, drops)); } } else { for (Block b : blocks) { breakBlock(e.getPlayer(), item, b, fortune, drops); } } } return true; } else { return false; } } }; }</code><technical_language>Removing this is a bad idea, primitive boolean instead of boxing it</technical_language>

Target:
public ToolUseHandler getItemHandler() { return (e, tool, fortune, drops) -> { Player p = e.getPlayer(); Block b = e.getBlock(); b.getWorld().createExplosion(b.getLocation(), 0.0F); b.getWorld().playSound(b.getLocation(), Sound.ENTITY_GENERIC_EXPLODE, 0.2F, 1F); List<Block> blocks = findBlocks(b); breakBlocks(p, tool, b, blocks, fortune, drops); }; }
Source:
<code><START> private void applyChanges(Library target, Library source) throws IOException { <END> target.setDescription(source.getDescription()); target.setIdentificationBarcode(source.getIdentificationBarcode()); target.setLocationBarcode(source.getLocationBarcode()); target.setInitialConcentration(source.getInitialConcentration()); target.setPlatformName(source.getPlatformName()); target.setAlias(source.getAlias()); target.setPaired(source.getPaired()); target.setLowQuality(source.isLowQuality()); target.setDiscarded(source.isDiscarded()); if (target.isDiscarded()) { target.setVolume(0.0); } else { target.setVolume(source.getVolume()); } target.setQcPassed(source.getQcPassed()); if (isDetailedLibrary(target)) { DetailedLibrary dSource = (DetailedLibrary) source; DetailedLibrary dTarget = (DetailedLibrary) target; dTarget.setPreMigrationId(dSource.getPreMigrationId()); dTarget.setNonStandardAlias(dSource.hasNonStandardAlias()); dTarget.setArchived(dSource.getArchived()); } }</code><technical_language>I LibraryType, selection, strategy, volume, qcPassed, design, designCode, kit updateable</technical_language>

Target:
private void applyChanges(Library target, Library source) throws IOException { target.setDescription(source.getDescription()); target.setIdentificationBarcode(source.getIdentificationBarcode()); target.setLocationBarcode(source.getLocationBarcode()); target.setInitialConcentration(source.getInitialConcentration()); target.setPlatformName(source.getPlatformName()); target.setAlias(source.getAlias()); target.setPaired(source.getPaired()); target.setLowQuality(source.isLowQuality()); target.setDiscarded(source.isDiscarded()); if (target.isDiscarded()) { target.setVolume(0.0); } else { target.setVolume(source.getVolume()); } target.getLibraryType().setId(source.getLibraryType().getId()); target.getLibrarySelectionType().setId(source.getLibrarySelectionType().getId()); target.getLibraryStrategyType().setId(source.getLibraryStrategyType().getId()); target.setQcPassed(source.getQcPassed()); if (isDetailedLibrary(target)) { DetailedLibrary dSource = (DetailedLibrary) source; DetailedLibrary dTarget = (DetailedLibrary) target; dTarget.setPreMigrationId(dSource.getPreMigrationId()); dTarget.setNonStandardAlias(dSource.hasNonStandardAlias()); dTarget.setArchived(dSource.getArchived()); dTarget.getLibraryDesignCode().setId(dSource.getLibraryDesignCode().getId()); if (dSource.getLibraryDesign() != null) { dTarget.getLibraryDesign().setId(dSource.getLibraryDesign().getId()); } else { dTarget.getLibraryDesign().setId(null); } if (dSource.getKitDescriptor() != null) { dTarget.getKitDescriptor().setId(dSource.getKitDescriptor().getId()); } else { dTarget.getKitDescriptor().setId(null); } } }
Source:
<code>private Dimension layoutSize(Container target, boolean preferred) { synchronized (target.getTreeLock()) { <START> synchronized (this.oppositeAlignedItems) { <END> ParentDimensions targetDims = getTargetDimensions(target); List<Component> components = Arrays.asList(target.getComponents()); List<WrapLayoutRow> rows = getAllRows(components, preferred, targetDims.innerWidth); Integer containerHeight = rows.stream().map((r) -> r.height).reduce(0, Integer::sum); if (rows.size() > 1) { containerHeight += (rows.size() - 1) * getVgap(); } containerHeight += targetDims.insets.top + targetDims.insets.bottom; Integer containerWidth = rows.stream().map((r) -> r.width).reduce(0, Math::max); containerWidth += targetDims.insets.left + targetDims.insets.right + (getHgap() * 2); Container scrollPane = SwingUtilities.getAncestorOfClass(JScrollPane.class, target); if (scrollPane != null && target.isValid()) { containerWidth -= (getHgap() + 1); } return new Dimension(containerWidth, containerHeight); } } }</code><technical_language>synchronizing synchronization</technical_language>

Target:
private Dimension layoutSize(Container target, boolean preferred) { ParentDimensions targetDims = getTargetDimensions(target); List<Component> components = Arrays.asList(target.getComponents()); List<WrapLayoutRow> rows = getAllRows(components, preferred, targetDims.getInnerWidth()); Integer containerHeight = rows.stream().map((r) -> r.getHeight()).reduce(0, Integer::sum); if (rows.size() > 1) { containerHeight += (rows.size() - 1) * getVerticalGap(); } containerHeight += targetDims.getInsets().top + targetDims.getInsets().bottom; Integer containerWidth = rows.stream().map((r) -> r.getWidth()).reduce(0, Math::max); containerWidth += targetDims.getInsets().left + targetDims.getInsets().right + (getHorizontalGap() * 2); Container scrollPane = SwingUtilities.getAncestorOfClass(JScrollPane.class, target); if (scrollPane != null && target.isValid()) { containerWidth -= (getHorizontalGap() + 1); } return new Dimension(containerWidth, containerHeight); }
Source:
<code>public String toString() { <START> return description != null ? description : ""; <END> }</code><technical_language>nit: class name of input strategy default</technical_language>

Target:
public String toString() { return description != null ? description : strategy.getClass().getSimpleName(); }
Source:
<code>private static Action1<Object> startPostActivityAction(final Activity activity) { return new Action1<Object>() { @Override public void call(Object o) { <START> activity.startActivity(new Intent(activity.getApplicationContext(), CreatePostActivity.class)); <END> } }; }</code><technical_language>Please do: acitivity.startActivity(CreatePostActivity.newIntent(activity));</technical_language>

Target:
private static Action1<Object> startPostActivityAction(final Activity activity) { return new Action1<Object>() { @Override public void call(Object o) { activity.startActivity(CreatePostActivity.newIntent(activity)); } }; }
Source:
<code>private boolean isOkUsingLombok(ASTClassOrInterfaceDeclaration parent) { if (hasClassLombokAnnotation()) { ASTAnnotation annotation = parent.getAnnotation("lombok.NoArgsConstructor"); <START> if (annotation != null) { <END> List<ASTMemberValuePair> memberValuePairs = annotation.findDescendantsOfType(ASTMemberValuePair.class); for (ASTMemberValuePair memberValuePair : memberValuePairs) { if ("access".equals(memberValuePair.getImage())) { List<ASTName> names = memberValuePair.findDescendantsOfType(ASTName.class); for (ASTName name : names) { if (name.getImage().endsWith("PRIVATE")) { return true; } } } } } } return false; }</code><technical_language>this double check for lombok annotation + specific lombok annotation pointless, (specific) check. Moreover, a property annotations... it? a user setup property here. Also, this class extend AbstractLombokAwareRule anymore. a configurable set of annotations suppress warning, defaulting lombok annotations, check for lombok.NoArgsConstructor... extending AbstractIgnoredAnnotRule settig default property lombok.NoArgsConstructor? Or, avoid a breaking API change, extending it, override default. For 7.0.0 change class hierarchy</technical_language>

Target:
private boolean isOkUsingLombok(ASTClassOrInterfaceDeclaration parent) { ASTAnnotation annotation = parent.getAnnotation("lombok.NoArgsConstructor"); if (annotation != null) { List<ASTMemberValuePair> memberValuePairs = annotation.findDescendantsOfType(ASTMemberValuePair.class); for (ASTMemberValuePair memberValuePair : memberValuePairs) { if ("access".equals(memberValuePair.getImage())) { List<ASTName> names = memberValuePair.findDescendantsOfType(ASTName.class); for (ASTName name : names) { if (name.getImage().endsWith("PRIVATE")) { return true; } } } } } return false; }
Source:
<code>public boolean equals(Object o) { if (o instanceof MagnetConnection) { MagnetConnection other = (MagnetConnection) o; <START> return ((null != location) ? <END> (location.getX() == other.location.getX() && location.getY() == other.location.getY()) : null == other.location) && ((null != auto) ? auto.equals(other.auto) : null == other.auto); } return false; }</code><technical_language>If Location null lead NullPointerException if other.location == null. I location null if remove this check all</technical_language>

Target:
public boolean equals(Object o) { if (o instanceof MagnetConnection) { MagnetConnection other = (MagnetConnection) o; return ((null != location && null != other.location) ? (location.getX() == other.location.getX() && location.getY() == other.location.getY()) : null == location && null == other.location) && ((null != auto) ? auto.equals(other.auto) : null == other.auto); } return false; }
Source:
<code>private String getNetworkName() { <START> return getVmNetworkInterfaceDAO().get(getParameters().getNicId()).getNetworkName(); <END> }</code><technical_language>NPE if interface exist</technical_language>

Target:
private String getNetworkName() { VmNetworkInterface vmNetworkInterface = getVmNetworkInterfaceDAO().get(getParameters().getNicId()); return vmNetworkInterface == null ? null : vmNetworkInterface.getNetworkName(); }
Source:
<code>public void save(final JdbcSession session) { final byte[] sessionBytes = this.serializer.convert(session.delegate); if (session.isNew()) { this.jdbcOperations.update(getQuery(Query.CREATE_SESSION), new PreparedStatementSetter() { @Override public void setValues(PreparedStatement ps) throws SQLException { ps.setString(1, session.getId()); ps.setLong(2, session.getLastAccessedTime()); ps.setString(3, session.getPrincipalName()); JdbcOperationsSessionRepository.this.lobHandler.getLobCreator() .setBlobAsBytes(ps, 4, sessionBytes); } }); session.setNew(false); <START> publishEvent(new SessionCreatedEvent(this, session)); <END> } else { this.jdbcOperations.update(getQuery(Query.UPDATE_SESSION), new PreparedStatementSetter() { @Override public void setValues(PreparedStatement ps) throws SQLException { ps.setLong(1, session.getLastAccessedTime()); ps.setString(2, session.getPrincipalName()); JdbcOperationsSessionRepository.this.lobHandler.getLobCreator() .setBlobAsBytes(ps, 3, sessionBytes); ps.setString(4, session.getId()); } }); } }</code><technical_language>This JVM instances is inconsistent Spring Session works. remove this</technical_language>

Target:
public void save(final JdbcSession session) { if (session.isNew()) { this.jdbcOperations.update(getQuery(CREATE_SESSION_QUERY), new PreparedStatementSetter() { @Override public void setValues(PreparedStatement ps) throws SQLException { ps.setString(1, session.getId()); ps.setLong(2, session.getLastAccessedTime()); ps.setString(3, session.getPrincipalName()); JdbcOperationsSessionRepository.this.lobHandler.getLobCreator() .setBlobAsBytes(ps, 4, serialize(session.delegate)); } }); } else { if (session.isAttributesChanged()) { this.jdbcOperations.update(getQuery(UPDATE_SESSION_QUERY), new PreparedStatementSetter() { @Override public void setValues(PreparedStatement ps) throws SQLException { ps.setLong(1, session.getLastAccessedTime()); ps.setString(2, session.getPrincipalName()); JdbcOperationsSessionRepository.this.lobHandler.getLobCreator() .setBlobAsBytes(ps, 3, serialize(session.delegate)); ps.setString(4, session.getId()); } }); } else if (session.isLastAccessTimeChanged()) { this.jdbcOperations.update(getQuery(UPDATE_SESSION_LAST_ACCESS_TIME_QUERY), new PreparedStatementSetter() { @Override public void setValues(PreparedStatement ps) throws SQLException { ps.setLong(1, session.getLastAccessedTime()); ps.setString(2, session.getId()); } }); } else { return; } } session.clearChangeFlags(); }
Source:
<code>public String getDescription() { <START> return "A rule detects ambiguities in words."; <END> }</code><technical_language>This description mention TC SC, I guess</technical_language>

Target:
public String getDescription() { return "A rule detects ambiguities in TC words."; }