auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> default <C> TriConstraintStream<A, B, C> join(Class<C> otherClass, TriJoiner<A, B, C>... joiners) { <END> int joinerCount = joiners.length; int indexOfFirstFilter = -1; for (int i = 0; i < joinerCount; i++) { TriJoiner<A, B, C> joiner = joiners[i]; if (indexOfFirstFilter >= 0) { if (!(joiner instanceof FilteringTriJoiner)) { throw new IllegalStateException("Indexing joiner (" + joiner + ") must not follow " + "a filtering joiner (" + joiners[indexOfFirstFilter] + ").\n" + "Maybe reorder the joiners such that filtering() joiners are later in the parameter list."); } } else { if (joiner instanceof FilteringTriJoiner) { indexOfFirstFilter = i; } } } if (indexOfFirstFilter < 0) { return join(otherClass, AbstractTriJoiner.merge(joiners)); } TriConstraintStream<A, B, C> joined = indexOfFirstFilter == 0 ? join(otherClass) : join(otherClass, Arrays.copyOf(joiners, indexOfFirstFilter)); int filterCount = joinerCount - indexOfFirstFilter; if (filterCount == 0) { return joined; } FilteringTriJoiner<A, B, C> filteringJoiner = (FilteringTriJoiner<A, B, C>) joiners[indexOfFirstFilter]; TriPredicate<A, B, C> resultingFilter = filteringJoiner.getFilter(); for (int i = indexOfFirstFilter + 1; i < joinerCount; i++) { FilteringTriJoiner<A, B, C> anoterFilteringJoiner = (FilteringTriJoiner<A, B, C>) joiners[i]; resultingFilter = resultingFilter.and(anoterFilteringJoiner.getFilter()); } return joined.filter(resultingFilter); }</code><technical_language>Sonar test coverage report allowed detect this test coverage gap? If worth checking if api classes uncovered lines matter enough warren test coverage</technical_language>

Target:
default <C> TriConstraintStream<A, B, C> join(Class<C> otherClass, TriJoiner<A, B, C>... joiners) { BiConstraintStreamHelper<A, B, C> helper = new BiConstraintStreamHelper<>(this); return helper.join(otherClass, joiners); }
Source:
<code><START> static void pullTimeoutAndRetry(final ParameterWorker<Integer, ?, Integer> worker, <END> final WorkerHandler<Integer, ?, Integer> handler, final WorkerMsgSender<Integer, ?> sender) throws NetworkException, InterruptedException, TimeoutException, ExecutionException { final CountDownLatch sendLatch = new CountDownLatch(AsyncParameterWorker.MAX_PULL_RETRY_COUNT); final long gracePeriodMs = 100; final ExecutorService pool = Executors.newSingleThreadExecutor(); final int key = 0; doAnswer(invocationOnMock -> { sendLatch.countDown(); if (sendLatch.getCount() > 0) { throw new NetworkException("exception"); } final EncodedKey<Integer> encodedKey = (EncodedKey) invocationOnMock.getArguments()[1]; handler.processPullReply(encodedKey.getKey(), encodedKey.getKey()); return null; }).when(sender).sendPullMsg(anyString(), anyObject()); pool.execute(() -> worker.pull(key)); assertTrue(sendLatch.await((PULL_RETRY_TIMEOUT_MS + gracePeriodMs) * AsyncParameterWorker.MAX_PULL_RETRY_COUNT, TimeUnit.MILLISECONDS)); worker.close(CLOSE_TIMEOUT); pool.shutdown(); verify(sender, times(AsyncParameterWorker.MAX_PULL_RETRY_COUNT)).sendPullMsg(anyString(), any(EncodedKey.class)); }</code><technical_language>please difference this test pullNetworkExceptionAndResend test? In compilation, similar other.</technical_language>

Target:
static void pullTimeoutAndRetry(final ParameterWorker<Integer, ?, Integer> worker, final WorkerHandler<Integer, ?, Integer> handler, final WorkerMsgSender<Integer, ?> sender) throws NetworkException, InterruptedException, TimeoutException, ExecutionException { final CountDownLatch sendLatch = new CountDownLatch(AsyncParameterWorker.MAX_PULL_RETRY_COUNT); final long gracePeriodMs = 100; final ExecutorService pool = Executors.newSingleThreadExecutor(); final int key = 0; doAnswer(invocationOnMock -> { sendLatch.countDown(); if (sendLatch.getCount() > 0) { return null; } final EncodedKey<Integer> encodedKey = (EncodedKey) invocationOnMock.getArguments()[1]; handler.processPullReply(encodedKey.getKey(), encodedKey.getKey()); return null; }).when(sender).sendPullMsg(anyString(), anyObject()); pool.execute(() -> worker.pull(key)); assertTrue(sendLatch.await((PULL_RETRY_TIMEOUT_MS + gracePeriodMs) * AsyncParameterWorker.MAX_PULL_RETRY_COUNT, TimeUnit.MILLISECONDS)); worker.close(CLOSE_TIMEOUT); pool.shutdown(); verify(sender, times(AsyncParameterWorker.MAX_PULL_RETRY_COUNT)).sendPullMsg(anyString(), any(EncodedKey.class)); }
Source:
<code>public String getEmail(GHMyself myself) throws IOException { <START> for (GHEmail email: myself.getEmails2()) { <END> if (email.isPrimary()) { return email.getEmail(); } } return null; }</code><technical_language>getEmails2 return a collection? a code sure. Concerned NPE</technical_language>

Target:
private String getEmail(GHMyself myself) throws IOException { for (GHEmail email: myself.getEmails2()) { if (email.isPrimary()) { return email.getEmail(); } } return null; }
Source:
<code>public boolean equals(Object o) { if (o instanceof BaseThrowingIntermediateEvent) { BaseThrowingIntermediateEvent other = (BaseThrowingIntermediateEvent) o; return (other.general == null ? general == null : other.general.equals(general)) && (other.dataIOSet == null ? dataIOSet == null : other.dataIOSet.equals(dataIOSet)) && (other.backgroundSet == null ? backgroundSet == null : other.backgroundSet.equals(backgroundSet)) && (other.fontSet == null ? fontSet == null : other.fontSet.equals(fontSet)) && <START> (other.dimensionsSet == null ? dimensionsSet == null : other.dimensionsSet.equals(dimensionsSet)); <END> } return false; }</code><technical_language>protected final Set<String> labels = new HashSet<String>(); is part of equals/hashCode methods, in BaseSubprocess.java. is correct. @romartin ideas</technical_language>

Target:
public boolean equals(Object o) { if (o instanceof BaseThrowingIntermediateEvent) { BaseThrowingIntermediateEvent other = (BaseThrowingIntermediateEvent) o; return Objects.equals(general, other.general) && Objects.equals(dataIOSet, other.dataIOSet) && Objects.equals(backgroundSet, other.backgroundSet) && Objects.equals(fontSet, other.fontSet) && Objects.equals(dimensionsSet, other.dimensionsSet) && Objects.equals(labels, other.labels); } return false; }
Source:
<code>final PublisherVerification<Integer> noopPublisherVerification() { return new PublisherVerification<Integer>(newTestEnvironment(), GC_TIMEOUT_MILLIS) { @Override public Publisher<Integer> createPublisher(long elements) { return new Publisher<Integer>() { @Override public void subscribe(Subscriber<? super Integer> s) { <START> s.onSubscribe(new Subscription() { <END> @Override public void request(long n) { } @Override public void cancel() { } }); } }; } @Override public Publisher<Integer> createErrorStatePublisher() { return SKIP; } }; }</code><technical_language>this noopSubscription in places, create a single reuse</technical_language>

Target:
final PublisherVerification<Integer> noopPublisherVerification() { return new PublisherVerification<Integer>(newTestEnvironment(), GC_TIMEOUT_MILLIS) { @Override public Publisher<Integer> createPublisher(long elements) { return new Publisher<Integer>() { @Override public void subscribe(Subscriber<? super Integer> s) { s.onSubscribe(new NoopSubscription()); } }; } @Override public Publisher<Integer> createErrorStatePublisher() { return SKIP; } }; }
Source:
<code><START> public static ApplyAnchor fromBundleFragment(Map<String, Object> bundleFragment) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { <END> int arity = ((Double)bundleFragment.get("arity")).intValue(); return new ApplyAnchor(arity); }</code><technical_language>In scenario this throw exceptions</technical_language>

Target:
public static ApplyAnchor fromBundleFragment(Map<String, Object> bundleFragment) { int arity = ((Double)bundleFragment.get("arity")).intValue(); return new ApplyAnchor(arity); }
Source:
<code>public void setFacing(@Nonnull EnumFacing facing) { TileSteamOven masterOven = (TileSteamOven) getMasterBlock(); if (masterOven != null) { <START> masterOven.facing = facing; <END> } this.facing = facing; WorldPlugin.setBlockState(worldObj, getPos(), getBlockState().withProperty(BlockMachineAlpha.FRONT, facing)); }</code><technical_language>I suspect ask master</technical_language>

Target:
public void setFacing(@Nonnull EnumFacing facing) { TileSteamOven masterOven = (TileSteamOven) getMasterBlock(); if (masterOven != null) { masterOven.facing = facing; } this.facing = facing; }
Source:
<code>public void testCreateDonorViewModelWithPermissions_shouldReturnViewModelWithCorrectDonorAndPermissions() { boolean irrelevantCanDeletePermission = true; <START> UUID irrelevantDonorId = UUID.fromString("11e71397-0000-0000-0000-0000000AA865"); <END> Donor donor = aDonor().withId(irrelevantDonorId).build(); DonorViewModel expectedDonorViewModel = aDonorViewModel() .withDonor(donor) .withPermission("canDelete", irrelevantCanDeletePermission) .build(); when(donorConstraintChecker.canDeleteDonor(irrelevantDonorId)).thenReturn(irrelevantCanDeletePermission); DonorViewModel returnedDonorViewModel = donorViewModelFactory.createDonorViewModelWithPermissions(donor); assertThat(returnedDonorViewModel, hasSameStateAsDonorViewModel(expectedDonorViewModel)); }</code><technical_language>I easiest if stick convention UUID.randomUUID(); (although this is fine, ask questions is done differently I of a reason)</technical_language>

Target:
public void testCreateDonorViewModelWithPermissions_shouldReturnViewModelWithCorrectDonorAndPermissions() { boolean irrelevantCanDeletePermission = true; UUID irrelevantDonorId = UUID.randomUUID(); Donor donor = aDonor().withId(irrelevantDonorId).build(); DonorViewModel expectedDonorViewModel = aDonorViewModel() .withDonor(donor) .withPermission("canDelete", irrelevantCanDeletePermission) .build(); when(donorConstraintChecker.canDeleteDonor(irrelevantDonorId)).thenReturn(irrelevantCanDeletePermission); DonorViewModel returnedDonorViewModel = donorViewModelFactory.createDonorViewModelWithPermissions(donor); assertThat(returnedDonorViewModel, hasSameStateAsDonorViewModel(expectedDonorViewModel)); }
Source:
<code>private static void assertResult(IgniteEx ignite, TextQuery qry, TestPair testPair) throws IgniteCheckedException { if (qry.getLimit() > 0){ <START> assertTrue(testPair.all.size() <= QUERY_LIMIT); <END> } else { checkForMissedKeys(ignite, testPair.expected, testPair.all); } }</code><technical_language>Braces for one-liners redundant</technical_language>

Target:
private static void assertResult(IgniteEx ignite, TextQuery qry, TestPair testPair) throws IgniteCheckedException { if (qry.getLimit() > 0) assertTrue(testPair.all.size() <= QUERY_LIMIT); else checkForMissedKeys(ignite, testPair.expected, testPair.all); }
Source:
<code>public static DBObject associationKeyToObject(AssociationKey key) { DBObject obj = new BasicDBObject(); Map<String,Object> fieldMap = new HashMap<String,Object>(); int i = 0; Object[] columnValues = key.getColumnValues(); for (String name : key.getColumnNames()) <START> fieldMap.put(name, columnValues[i++]); <END> obj.put(MongoDBDialect.ASSOCIATIONS_FIELDNAME, fieldMap); obj.put(MongoDBDialect.TABLE_FIELDNAME, key.getTable()); return obj; }</code><technical_language>create a new HashMap copying stuff for association worries a bit. good focus functionality this stage in mind alternatives. Some ideas - I try -: - provide a iterator column values/names (something EntrySet) avoid creating arrays. - alternative Map implementation pass DBObject is able behave needed copying stuff</technical_language>

Target:
public static DBObject associationKeyToObject(AssociationKey key) { Object[] columnValues = key.getColumnValues(); DBObject columns = new BasicDBObject(columnValues.length); DBObject obj = new BasicDBObject(1); int i = 0; for (String name : key.getColumnNames()) columns.put(name, columnValues[i++]); obj.put(MongoDBDialect.COLUMNS_FIELDNAME, columns); return obj; }
Source:
<code>public void shouldReportViolationWithOutDetails() throws IOException { new ConfigurationSetup().setUp(ImmutableMap.of(GeneralOption.VOLATIONS_WITH_DETAILS.getKey(), "false")); renderer.getReviewResult().getViolations().clear(); Rule rule = createRule(ruleDescription, externalInfoUrl, priority); Report report = createReportWithVolation(createRuleViolation(rule, violationDescription)); renderer.renderFileReport(report); Violation violation = renderer.getReviewResult().getViolations().get(0); <START> assertThat(violation.getMessage()).doesNotContain(ruleDescription); <END> assertThat(violation.getMessage()).doesNotContain(externalInfoUrl); }</code><technical_language>Please test full expected string, doesNotContain sufficient</technical_language>

Target:
public void shouldReportViolationWithOutDetails() throws IOException { new ConfigurationSetup().setUp(ImmutableMap.of(GeneralOption.VOLATIONS_WITH_DETAILS.getKey(), "false")); renderer.getReviewResult().getViolations().clear(); Rule rule = createRule(ruleDescription, externalInfoUrl, RulePriority.MEDIUM); Report report = createReportWithVolation(createRuleViolation(rule, violationDescription)); renderer.renderFileReport(report); Violation violation = renderer.getReviewResult().getViolations().get(0); assertThat(violation.getMessage()).isEqualTo(violationDescription); }
Source:
<code>public static org.ovirt.engine.core.common.businessentities.storage.ImageTransfer map(ImageTransfer model, org.ovirt.engine.core.common.businessentities.storage.ImageTransfer template) { org.ovirt.engine.core.common.businessentities.storage.ImageTransfer entity = template != null ? template : new org.ovirt.engine.core.common.businessentities.storage.ImageTransfer(); if (model.isSetId()) { entity.setId(GuidUtils.asGuid(model.getId())); } if (model.isSetHost() && model.getHost().isSetId()) { entity.setVdsId(GuidUtils.asGuid(model.getHost().getId())); } if (model.isSetImage() && model.getImage().isSetId()) { entity.setDiskId(GuidUtils.asGuid(model.getImage().getId())); } if (model.isSetFormat()) { entity.setImageFormat(map(model.getFormat(), null)); } <START> if (model.isSetBackup() && model.getImage().isSetId()) { <END> entity.setBackupId(GuidUtils.asGuid(model.getBackup().getId())); } return entity; }</code><technical_language>this be: model.isSetBackup() && model.getBackup().isSetId()</technical_language>

Target:
public static org.ovirt.engine.core.common.businessentities.storage.ImageTransfer map(ImageTransfer model, org.ovirt.engine.core.common.businessentities.storage.ImageTransfer template) { org.ovirt.engine.core.common.businessentities.storage.ImageTransfer entity = template != null ? template : new org.ovirt.engine.core.common.businessentities.storage.ImageTransfer(); if (model.isSetId()) { entity.setId(GuidUtils.asGuid(model.getId())); } if (model.isSetHost() && model.getHost().isSetId()) { entity.setVdsId(GuidUtils.asGuid(model.getHost().getId())); } if (model.isSetImage() && model.getImage().isSetId()) { entity.setDiskId(GuidUtils.asGuid(model.getImage().getId())); } if (model.isSetFormat()) { entity.setImageFormat(map(model.getFormat(), null)); } if (model.isSetBackup() && model.getBackup().isSetId()) { entity.setBackupId(GuidUtils.asGuid(model.getBackup().getId())); } return entity; }
Source:
<code>@Override public void onLocationPermissionsGranted() { googleMap.setMyLocationEnabled(true); <START> googleMap.getUiSettings().setMyLocationButtonEnabled(true); <END> }</code><technical_language>set myLocationEnabled = true here</technical_language>

Target:
@Override public void onLocationPermissionsGranted() { googleMap.setMyLocationEnabled(myLocationEnabled); }
Source:
<code><START> public boolean canCreate(Repository repo, RevWalk rw, RevObject object) { <END> if (!canWrite()) { return false; } boolean owner; switch (getCurrentUser().getAccessPath()) { case REST_API: case JSON_RPC: owner = isOwner(); break; default: owner = false; } if (object instanceof RevCommit) { return owner || (canPerform(Permission.CREATE) && canReadCommit(repo, rw, (RevCommit) object)); } else if (object instanceof RevTag) { final RevTag tag = (RevTag) object; try { rw.parseBody(tag); } catch (IOException e) { return false; } final PersonIdent tagger = tag.getTaggerIdent(); if (tagger != null) { boolean valid; if (getCurrentUser() instanceof IdentifiedUser) { final IdentifiedUser user = (IdentifiedUser) getCurrentUser(); final String addr = tagger.getEmailAddress(); valid = user.getEmailAddresses().contains(addr); } else { valid = false; } if (!valid && !owner && !canForgeCommitter()) { return false; } } if (tag.getFullMessage().contains("-----BEGIN PGP SIGNATURE-----\n")) { return owner || canPerform(Permission.PUSH_SIGNED_TAG); } else { return owner || canPerform(Permission.PUSH_TAG); } } else { return false; } }</code><technical_language>I this API this class is specific a project ref. a RefControl for project P ref R instance check if a user read a commit C project X is unintuitive. (new) logic (canReadCommit) of checking read privilege a commit is ref specific. belong ProjectControl. ProjectControl access underlying git Repository access ProjectState access repository. I implement new logic in ProjectControl ProjectState this method unchanged</technical_language>

Target:
public boolean canCreate(Repository repo, RevWalk rw, RevObject object) { if (!canWrite()) { return false; } boolean owner; switch (getCurrentUser().getAccessPath()) { case REST_API: case JSON_RPC: owner = isOwner(); break; default: owner = false; } if (object instanceof RevCommit) { return owner || (canPerform(Permission.CREATE) && projectControl.canReadCommit(rw, (RevCommit) object)); } else if (object instanceof RevTag) { final RevTag tag = (RevTag) object; try { rw.parseBody(tag); } catch (IOException e) { return false; } final PersonIdent tagger = tag.getTaggerIdent(); if (tagger != null) { boolean valid; if (getCurrentUser() instanceof IdentifiedUser) { final IdentifiedUser user = (IdentifiedUser) getCurrentUser(); final String addr = tagger.getEmailAddress(); valid = user.getEmailAddresses().contains(addr); } else { valid = false; } if (!valid && !owner && !canForgeCommitter()) { return false; } } if (tag.getFullMessage().contains("-----BEGIN PGP SIGNATURE-----\n")) { return owner || canPerform(Permission.PUSH_SIGNED_TAG); } else { return owner || canPerform(Permission.PUSH_TAG); } } else { return false; } }
Source:
<code>public static String getSiteLoginUrl(SiteModel site) { <START> if (site.isJetpackConnected()) { <END> return WPCOM_LOGIN_URL; } String loginURL = site.getLoginUrl(); if (loginURL == null) { if (site.getUrl() != null) { return site.getUrl() + "/wp-login.php"; } else { return site.getXmlRpcUrl().replace("xmlrpc.php", "wp-login.php"); } } return loginURL; }</code><technical_language>Is this change due a merge conflict chance? Otherwise, I this change in Themes related PR</technical_language>

Target:
public static String getSiteLoginUrl(SiteModel site) { String loginURL = site.getLoginUrl(); if (loginURL == null) { if (site.getUrl() != null) { return site.getUrl() + "/wp-login.php"; } else { return site.getXmlRpcUrl().replace("xmlrpc.php", "wp-login.php"); } } return loginURL; }
Source:
<code>public void testRemoteMapReduceWithStreams_DistributedMode() throws Exception { String cacheName = "testRemoteMapReduce_Streams_dist"; ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC, true); builder.dataContainer().keyEquivalence(new AnyServerEquivalence()).valueEquivalence(new AnyServerEquivalence()) .compatibility().enable().marshaller(new GenericJBossMarshaller()); defineInAll(cacheName, builder); waitForClusterToForm(cacheName); RemoteCache<String, String> cache = clients.get(0).getCache(cacheName); RemoteCache<String, String> scriptCache = clients.get(1).getCache(SCRIPT_CACHE); loadData(cache, "/macbeth.txt"); loadScript(scriptCache, "/wordCountStream_dist.js"); <START> ArrayList<HashMap<String, Long>> results = cache.execute("wordCountStream_dist.js", new HashMap<String, String>()); <END> assertEquals(2, results.size()); assertEquals(3209, results.get(0).size()); assertEquals(3209, results.get(1).size()); assertTrue(results.get(0).get("macbeth").equals(Long.valueOf(287))); assertTrue(results.get(1).get("macbeth").equals(Long.valueOf(287))); }</code><technical_language>here... more places this in this commit. please update also</technical_language>

Target:
public void testRemoteMapReduceWithStreams_DistributedMode() throws Exception { String cacheName = "testRemoteMapReduce_Streams_dist"; ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC, true); builder.dataContainer().keyEquivalence(new AnyServerEquivalence()).valueEquivalence(new AnyServerEquivalence()) .compatibility().enable().marshaller(new GenericJBossMarshaller()); defineInAll(cacheName, builder); waitForClusterToForm(cacheName); RemoteCache<String, String> cache = clients.get(0).getCache(cacheName); RemoteCache<String, String> scriptCache = clients.get(1).getCache(SCRIPT_CACHE); loadData(cache, "/macbeth.txt"); loadScript(scriptCache, "/wordCountStream_dist.js"); ArrayList<Map<String, Long>> results = cache.execute("wordCountStream_dist.js", new HashMap<String, String>()); assertEquals(2, results.size()); assertEquals(3209, results.get(0).size()); assertEquals(3209, results.get(1).size()); assertTrue(results.get(0).get("macbeth").equals(Long.valueOf(287))); assertTrue(results.get(1).get("macbeth").equals(Long.valueOf(287))); }
Source:
<code>private void testBinaryStatsWithTruncation(int truncateLen, int minLen, int maxLen) { BinaryStatistics stats = new BinaryStatistics(); byte[] min = generateRandomString("a", minLen).getBytes(); byte[] max = generateRandomString("b", maxLen).getBytes(); stats.updateStats(Binary.fromConstantByteArray(min)); stats.updateStats(Binary.fromConstantByteArray(max)); ParquetMetadataConverter metadataConverter = new ParquetMetadataConverter(truncateLen); org.apache.parquet.format.Statistics formatStats = metadataConverter.toParquetStatistics(stats); <START> if (minLen >= ParquetMetadataConverter.MAX_STATS_SIZE || maxLen >= ParquetMetadataConverter.MAX_STATS_SIZE) { <END> assertNull(formatStats.getMin_value()); assertNull(formatStats.getMax_value()); } else { String minString = new String(min, Charset.forName("UTF-8")); String minStatString = new String(formatStats.getMin_value(), Charset.forName("UTF-8")); assertTrue(minStatString.compareTo(minString) <= 0); String maxString = new String(max, Charset.forName("UTF-8")); String maxStatString = new String(formatStats.getMax_value(), Charset.forName("UTF-8")); assertTrue(maxStatString.compareTo(maxString) >= 0); } }</code><technical_language>MAX_STATS_SIZE is for statistics this minLen + maxLen >= MAX_STATS_SIZE</technical_language>

Target:
private void testBinaryStatsWithTruncation(int truncateLen, int minLen, int maxLen) { BinaryStatistics stats = new BinaryStatistics(); byte[] min = generateRandomString("a", minLen).getBytes(); byte[] max = generateRandomString("b", maxLen).getBytes(); stats.updateStats(Binary.fromConstantByteArray(min)); stats.updateStats(Binary.fromConstantByteArray(max)); ParquetMetadataConverter metadataConverter = new ParquetMetadataConverter(truncateLen); org.apache.parquet.format.Statistics formatStats = metadataConverter.toParquetStatistics(stats); if (minLen + maxLen >= ParquetMetadataConverter.MAX_STATS_SIZE) { assertNull(formatStats.getMin_value()); assertNull(formatStats.getMax_value()); } else { String minString = new String(min, Charset.forName("UTF-8")); String minStatString = new String(formatStats.getMin_value(), Charset.forName("UTF-8")); assertTrue(minStatString.compareTo(minString) <= 0); String maxString = new String(max, Charset.forName("UTF-8")); String maxStatString = new String(formatStats.getMax_value(), Charset.forName("UTF-8")); assertTrue(maxStatString.compareTo(maxString) >= 0); } }
Source:
<code>public static String getFQNForFile(VirtualFile file) { String packageName = ""; if (file instanceof JavaFileNode) { if (((JavaFileNode)file).getParent() instanceof PackageNode) { packageName = ((PackageNode)((JavaFileNode)file).getParent()).getPackage(); } if (!packageName.isEmpty()) { packageName = packageName + "."; } return packageName + file.getName().substring(0, file.getName().lastIndexOf('.')); <START> } else if (file instanceof ContentNode || file instanceof JarFileNode) { <END> return file.getPath(); } return file.getName().substring(0, file.getName().lastIndexOf('.')); }</code><technical_language>ContentNode JarFileNode similar</technical_language>

Target:
public static String getFQNForFile(VirtualFile file) { String packageName = ""; if (file instanceof JavaFileNode) { if (((JavaFileNode)file).getParent() instanceof PackageNode) { packageName = ((PackageNode)((JavaFileNode)file).getParent()).getPackage(); } if (!packageName.isEmpty()) { packageName = packageName + "."; } return packageName + file.getName().substring(0, file.getName().lastIndexOf('.')); } else if (file instanceof JarFileNode) { return file.getPath(); } return file.getName().substring(0, file.getName().lastIndexOf('.')); }
Source:
<code>protected ConsumerRecords<?, ?> pollRecords(long pollInterval) throws Exception { ConsumerRecords<?, ?> records; try { long curPollTime = System.currentTimeMillis(); _lastPolledTimeMillis = curPollTime; records = consumerPoll(pollInterval); long pollDurationMillis = System.currentTimeMillis() - curPollTime; if (pollDurationMillis > pollInterval + POLL_BUFFER_TIME_MILLIS) { _logger.warn("ConsumerId: {}, Kafka client poll took ms (> poll timeout + buffer time ms)", _taskName, pollDurationMillis, pollInterval, POLL_BUFFER_TIME_MILLIS); _consumerMetrics.updateClientPollOverTimeout(1); } _consumerMetrics.updateNumPolls(1); _consumerMetrics.updateEventCountsPerPoll(records.count()); if (_enablePollDurationMsMetric) { <START> _dynamicMetricsManager.createOrUpdateHistogram(_metricsPrefix, _datastreamName, POLL_DURATION_MS, <END> pollDurationMillis); } if (!records.isEmpty()) { _consumerMetrics.updateEventsProcessedRate(records.count()); _consumerMetrics.updateLastEventReceivedTime(Instant.now()); } _pollAttempts.set(0); return records; } catch (NoOffsetForPartitionException e) { handleNoOffsetForPartitionException(e); return ConsumerRecords.EMPTY; } catch (WakeupException e) { _logger.warn("Got a WakeupException, shutdown in progress.", e); return ConsumerRecords.EMPTY; } catch (Exception e) { handlePollRecordsException(e); return ConsumerRecords.EMPTY; } }</code><technical_language>Do refactoring createKafkaBasedConnectorTaskMetrics additional boolean decides creation of histogram for poll duration more sense? in future, if decide enable for other tasks, set boolean true</technical_language>

Target:
protected ConsumerRecords<?, ?> pollRecords(long pollInterval) throws Exception { ConsumerRecords<?, ?> records; try { long curPollTime = System.currentTimeMillis(); _lastPolledTimeMillis = curPollTime; records = consumerPoll(pollInterval); long pollDurationMillis = System.currentTimeMillis() - curPollTime; if (pollDurationMillis > pollInterval + POLL_BUFFER_TIME_MILLIS) { _logger.warn("ConsumerId: {}, Kafka client poll took ms (> poll timeout + buffer time ms)", _taskName, pollDurationMillis, pollInterval, POLL_BUFFER_TIME_MILLIS); _consumerMetrics.updateClientPollOverTimeout(1); } _consumerMetrics.updateNumPolls(1); _consumerMetrics.updateEventCountsPerPoll(records.count()); if (_enablePollDurationMillisMetric) { _consumerMetrics.updatePollDurationMs(pollDurationMillis); } if (!records.isEmpty()) { _consumerMetrics.updateEventsProcessedRate(records.count()); _consumerMetrics.updateLastEventReceivedTime(Instant.now()); } _pollAttempts.set(0); return records; } catch (NoOffsetForPartitionException e) { handleNoOffsetForPartitionException(e); return ConsumerRecords.EMPTY; } catch (WakeupException e) { _logger.warn("Got a WakeupException, shutdown in progress.", e); return ConsumerRecords.EMPTY; } catch (Exception e) { handlePollRecordsException(e); return ConsumerRecords.EMPTY; } }
Source:
<code>private void doubleBufferPaint(GC dest) { <START> if (fCanvas.isVisible()) { <END> return; } Point size= fCanvas.getSize(); if (size.x <= 0 || size.y <= 0) return; if (fBuffer != null) { Rectangle r= fBuffer.getBounds(); if (r.width != size.x || r.height != size.y) { fBuffer.dispose(); fBuffer= null; } } if (fBuffer == null) fBuffer= new Image(fCanvas.getDisplay(), size.x, size.y); GC gc= new GC(fBuffer); gc.setFont(fCanvas.getFont()); try { gc.setBackground(getBackground()); gc.fillRectangle(0, 0, size.x, size.y); doPaint(gc); } finally { gc.dispose(); } dest.drawImage(fBuffer, 0, 0); }</code><technical_language>visible</technical_language>

Target:
private void doubleBufferPaint(GC dest) { if (!fCanvas.isVisible()) { return; } Point size= fCanvas.getSize(); if (size.x <= 0 || size.y <= 0) return; if (fBuffer != null) { Rectangle r= fBuffer.getBounds(); if (r.width != size.x || r.height != size.y) { fBuffer.dispose(); fBuffer= null; } } if (fBuffer == null) fBuffer= new Image(fCanvas.getDisplay(), size.x, size.y); GC gc= new GC(fBuffer); gc.setFont(fCanvas.getFont()); try { gc.setBackground(getBackground()); gc.fillRectangle(0, 0, size.x, size.y); doPaint(gc); } finally { gc.dispose(); } dest.drawImage(fBuffer, 0, 0); }
Source:
<code>public String showExperimentPage(Model model, @PathVariable String experimentAccession, @RequestParam(defaultValue = "") String accessKey) { Experiment<?> experiment = experimentTrader.getExperiment(experimentAccession, accessKey); model.addAllAttributes(experiment.getAttributes()); if (!experiment.getDois().isEmpty()) { model.addAttribute("publications", experimentPageContentService.getPublications(experiment.getDois())); } else if (!experiment.getPubMedIds().isEmpty()) { model.addAttribute("publications", experimentPageContentService.getPublications(experiment.getPubMedIds())); <START> } <END> model.addAttribute("content", GSON.toJson(experimentPageContentForExperiment(experiment, accessKey))); return "experiment-page"; }</code><technical_language>field publication populated part of experiment.getAttributes</technical_language>

Target:
public String showExperimentPage(Model model, @PathVariable String experimentAccession, @RequestParam(defaultValue = "") String accessKey) { Experiment<Cell> experiment = experimentTrader.getExperiment(experimentAccession, accessKey); model.addAllAttributes(experimentAttributesService.getAttributes(experiment)); model.addAttribute("content", GSON.toJson(experimentPageContentForExperiment(experiment, accessKey))); return "experiment-page"; }
Source:
<code>public void testDbBenchmarkSuiteSupplier() throws Exception { <START> Bootstrap app = new Bootstrap( <END> ImmutableList.<Module>builder() .add(new BenchmarkSuiteModule(ImmutableSet.of())) .build()); Injector injector = app.strictConfig() .setRequiredConfigurationProperties(ImmutableMap.<String, String>builder() .putAll(DEFAULT_CONFIGURATION_PROPERTIES) .put("database", "jdbc://localhost:1080") .put("suite-name", "test") .build()) .initialize(); assertTrue(injector.getInstance(BenchmarkSuiteSupplier.class) instanceof DbBenchmarkSuiteSupplier); }</code><technical_language>merge previous line</technical_language>

Target:
public void testDbBenchmarkSuiteSupplier() { Bootstrap app = new Bootstrap(ImmutableList.<Module>builder() .add(new BenchmarkSuiteModule(ImmutableSet.of())) .build()); Injector injector = null; try { injector = app.strictConfig() .setRequiredConfigurationProperties(ImmutableMap.<String, String>builder() .putAll(DEFAULT_CONFIGURATION_PROPERTIES) .put("database-url", "jdbc://localhost:1080") .put("suite", "test") .build()) .initialize(); assertTrue(injector.getInstance(BenchmarkSuiteSupplier.class) instanceof DbBenchmarkSuiteSupplier); } finally { if (injector != null) { injector.getInstance(LifeCycleManager.class).stop(); } } }
Source:
<code>public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BoundDimFilter that = (BoundDimFilter) o; <START> if (lowerStrict != that.lowerStrict) { <END> return false; } if (upperStrict != that.upperStrict) { return false; } if (alphaNumeric != that.alphaNumeric) { return false; } if (!dimension.equals(that.dimension)) { return false; } if (!upper.equals(that.upper)) { return false; } if (!lower.equals(that.lower)) { return false; } return extractionFn != null ? extractionFn.equals(that.extractionFn) : that.extractionFn == null; }</code><technical_language>Is a need move getters fields here</technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BoundDimFilter that = (BoundDimFilter) o; if (isLowerStrict() != that.isLowerStrict()) { return false; } if (isUpperStrict() != that.isUpperStrict()) { return false; } if (isAlphaNumeric() != that.isAlphaNumeric()) { return false; } if (!getDimension().equals(that.getDimension())) { return false; } if (getUpper() != null ? !getUpper().equals(that.getUpper()) : that.getUpper() != null) { return false; } if (getLower() != null ? !getLower().equals(that.getLower()) : that.getLower() != null) { return false; } return getExtractionFn() != null ? getExtractionFn().equals(that.getExtractionFn()) : that.getExtractionFn() == null; }
Source:
<code>public Map<String, ServerSideConfiguration.Pool> getSharedResourcePools() { Map<String, ServerSideConfiguration.Pool> sharedPools = new HashMap<String, ServerSideConfiguration.Pool>(); for (Map.Entry<String, ResourcePageSource> entry : sharedResourcePools.entrySet()) { sharedPools.put(entry.getKey(), entry.getValue().getPool()); } <START> return sharedPools; <END> }</code><technical_language>moved this module Java 8: return sharedResourcePools.entrySet().stream().collect(toMap(Map.Entry::getKey, e -> e.getValue().getPool()))</technical_language>

Target:
public Map<String, ServerSideConfiguration.Pool> getSharedResourcePools() { return sharedResourcePools.entrySet().stream().collect(toMap(Map.Entry::getKey, e -> e.getValue().getPool())); }
Source:
<code>public void testClusterManagerUpgradeNotNeeded() { Image currentImmage = createImage(CURRENT_BUILD_NUMBER, CURRENT_BUILD_NUMBER); StatedImage currentImage = StatedImage.statedImage(currentImmage, null, null); <START> StatedImage targetImage = StatedImage.statedImage(currentImmage, null, null); <END> boolean actualResult = underTest.upgradeClusterManager(STACK_ID, currentImage, targetImage); Assertions.assertFalse(actualResult); verify(flowMessageService).fireEventAndLog(STACK_ID, Status.UPDATE_IN_PROGRESS.name(), CLUSTER_MANAGER_UPGRADE_NOT_NEEDED, CURRENT_BUILD_NUMBER); verify(flowMessageService, times(0)).fireEventAndLog(STACK_ID, Status.UPDATE_IN_PROGRESS.name(), CLUSTER_MANAGER_UPGRADE); }</code><technical_language>Nice coverage, done</technical_language>

Target:
public void testClusterManagerUpgradeNotNeeded() { Image currImage = createImage(CURRENT_BUILD_NUMBER, CURRENT_BUILD_NUMBER); StatedImage currentImage = StatedImage.statedImage(currImage, null, null); StatedImage targetImage = StatedImage.statedImage(currImage, null, null); boolean actualResult = underTest.upgradeClusterManager(STACK_ID, currentImage, targetImage); Assertions.assertFalse(actualResult); verify(flowMessageService).fireEventAndLog(STACK_ID, Status.UPDATE_IN_PROGRESS.name(), CLUSTER_MANAGER_UPGRADE_NOT_NEEDED, CURRENT_BUILD_NUMBER); verify(flowMessageService, times(0)).fireEventAndLog(STACK_ID, Status.UPDATE_IN_PROGRESS.name(), CLUSTER_MANAGER_UPGRADE); }
Source:
<code>public void dispose() { cm.unregisterForAvailable(this); cm.unregisterForRadioStateChanged(this); cm.unregisterForNetworkStateChanged(this); cm.unregisterForRUIMReady(this); phone.unregisterForNvLoaded(this); phone.mRuimRecords.unregisterForRecordsLoaded(this); cm.unSetOnSignalStrengthUpdate(this); <START> this.removeCallbacksAndMessages(null); <END> cr.unregisterContentObserver(this.mAutoTimeObserver); this.phone = null; this.cm = null; this.ss = null; this.newSS = null; this.cellLoc = null; this.newCellLoc = null; this.cr = null; this.mAutoTimeObserver = null; this.cdmaDataConnectionAttachedRegistrants = null; this.cdmaDataConnectionDetachedRegistrants = null; }</code><technical_language>this.removeCallbacksAndMessages(null) instead. Done in Patch set 2</technical_language>

Target:
public void dispose() { cm.unregisterForAvailable(this); cm.unregisterForRadioStateChanged(this); cm.unregisterForNetworkStateChanged(this); cm.unregisterForRUIMReady(this); phone.unregisterForNvLoaded(this); phone.mRuimRecords.unregisterForRecordsLoaded(this); cm.unSetOnSignalStrengthUpdate(this); cr.unregisterContentObserver(this.mAutoTimeObserver); }
Source:
<code>private ValidationResult validateMinimumVersionSupport() { <START> return FeatureSupported.momPolicyOnHost(Version.v3_3) <END> ? ValidationResult.VALID : new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_VDS_VERSION); }</code><technical_language>sending is cluster compatibility version, a constant version.. send host's version confusing users. norm in oVirt is restrict version specific features cluster DC - this is related cluster (and related storage), restriction cluster level</technical_language>

Target:
private ValidationResult validateMinimumVersionSupport() { return FeatureSupported.momPolicyOnHost(getVdsGroup().getcompatibility_version()) ? ValidationResult.VALID : new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_MOM_UPDATE_VDS_VERSION); }
Source:
<code>public void testNotEnoughResourcesAvailableFailsPendingRequests() throws Exception { final SlotRequestId slotRequestId = new SlotRequestId(); final TestingDeclarativeSlotPoolFactory declarativeSlotPoolFactory = new TestingDeclarativeSlotPoolFactory(TestingDeclarativeSlotPool.builder()); try (DeclarativeSlotPoolBridge declarativeSlotPoolBridge = createDeclarativeSlotPoolBridge(declarativeSlotPoolFactory)) { declarativeSlotPoolBridge.start(jobMasterId, "localhost", mainThreadExecutor); CompletableFuture<PhysicalSlot> slotAllocationFuture = CompletableFuture .supplyAsync(() -> declarativeSlotPoolBridge.requestNewAllocatedSlot(slotRequestId, ResourceProfile.UNKNOWN, Time.minutes(5)), mainThreadExecutor) .get(); mainThreadExecutor.execute(() -> declarativeSlotPoolBridge.notifyNotEnoughResourcesAvailable(Collections.emptyList())); try { slotAllocationFuture.join(); Assert.fail(); } catch (Exception e) { <START> Optional<NoResourceAvailableException> expectedException = ExceptionUtils.findThrowable(e, NoResourceAvailableException.class); assertThat(expectedException.isPresent(), is(true)); <END> } } }</code><technical_language>suggest FlinkMatchers.containsCause</technical_language>

Target:
public void testNotEnoughResourcesAvailableFailsPendingRequests() throws Exception { final SlotRequestId slotRequestId = new SlotRequestId(); final TestingDeclarativeSlotPoolFactory declarativeSlotPoolFactory = new TestingDeclarativeSlotPoolFactory(TestingDeclarativeSlotPool.builder()); try (DeclarativeSlotPoolBridge declarativeSlotPoolBridge = createDeclarativeSlotPoolBridge(declarativeSlotPoolFactory)) { declarativeSlotPoolBridge.start(jobMasterId, "localhost", mainThreadExecutor); CompletableFuture<PhysicalSlot> slotAllocationFuture = CompletableFuture .supplyAsync(() -> declarativeSlotPoolBridge.requestNewAllocatedSlot(slotRequestId, ResourceProfile.UNKNOWN, Time.minutes(5)), mainThreadExecutor) .get(); mainThreadExecutor.execute(() -> declarativeSlotPoolBridge.notifyNotEnoughResourcesAvailable(Collections.emptyList())); assertThat( slotAllocationFuture, FlinkMatchers.futureWillCompleteExceptionally( NoResourceAvailableException.class, Duration.ofSeconds(10))); } }
Source:
<code>public Void call() throws Exception { RemoteCache<Integer, String> remote = client(0).getCache(); <START> for (int i = 2; i < 100 ; i++) <END> remote.put(i, "v" + i); return null; }</code><technical_language>preferable for PutHammer putting data main test method verified rehash completed instead of a fixed-size loop</technical_language>

Target:
public Void call() throws Exception { RemoteCache<Integer, String> remote = client(0).getCache(); int i = 2; while (!rehashCompleted) { remote.put(i, "v" + i); i += 1; } for (int j = i + 1; j < i + 100 ; j++) remote.put(j, "v" + j); return null; }
Source:
<code>public String toString() { <START> StringBuilder sb = new StringBuilder("TmfVisibleRangeUpdatedSignal [source="); END> if (getSource() != null) { sb.append(getSource().toString()); } else { sb.append("null"); } sb.append(", range="); if (fCurrentRange != null) { sb.append(fCurrentRange.toString()); } else { sb.append("null"); } sb.append(']'); return sb.toString(); }</code><technical_language>TmfWindowRangeUpdatedSignal</technical_language>

Target:
public String toString() { StringBuilder sb = new StringBuilder(getClass().getSimpleName() + " [source="); if (getSource() != null) { sb.append(getSource().toString()); } else { sb.append("null"); } sb.append(", range="); if (fCurrentRange != null) { sb.append(fCurrentRange.toString()); } else { sb.append("null"); } sb.append(']'); return sb.toString(); }
Source:
<code>public void testNewInstance() { Optional<String> description = getDescriptionForCallable(new String("abc")::toString); assertTrue(description.isPresent()); <START> assertNameMatch("new String()::toString", "testNewInstance", CLASSNAME, description.get().toString()); <END> }</code><technical_language>this be: new String(_)::toString</technical_language>

Target:
public void testNewInstance() { Optional<String> description = getDescriptionForCallable(new String("abc")::toString); assertTrue(description.isPresent()); assertNameMatch("::toString", "testNewInstance", CLASSNAME, description.get()); }
Source:
<code>default @NonNull String getLabel() { <START> if (getUnits() == null) { <END> return getName(); } return (getName() + " (" + getUnits() + ')'); }</code><technical_language>extract getUnits a local variable getName</technical_language>

Target:
default String getLabel() { String name = getName(); String units = getUnits(); if (units == null) { return name; } return (name + " (" + units + ')'); }
Source:
<code>static Set<Set<CandidateFact>> findCoveringSets(List<CandidateFact> cfactsPassed, Set<String> msrs) { Set<Set<CandidateFact>> cfactset = new HashSet<Set<CandidateFact>>(); List<CandidateFact> cfacts = new ArrayList<CandidateFact>(cfactsPassed); for (Iterator<CandidateFact> i = cfacts.iterator(); i.hasNext();) { CandidateFact cfact = i.next(); i.remove(); <START> if (!checkForColumnExists(cfact, msrs)) { <END> } else if (cfact.getColumns().containsAll(msrs)) { Set<CandidateFact> one = new LinkedHashSet<CandidateFact>(); one.add(cfact); cfactset.add(one); } else { Set<String> remainingMsrs = new HashSet<String>(msrs); remainingMsrs.removeAll(cfact.getColumns()); Set<Set<CandidateFact>> coveringSets = findCoveringSets(cfacts, remainingMsrs); if (!coveringSets.isEmpty()) { for (Set<CandidateFact> set : coveringSets) { set.add(cfact); cfactset.add(set); } } else { LOG.info("Couldnt find any set containing remaining measures:" + remainingMsrs); } } } return cfactset; }</code><technical_language>If block is empty</technical_language>

Target:
static Set<Set<CandidateFact>> findCoveringSets(List<CandidateFact> cfactsPassed, Set<String> msrs) { Set<Set<CandidateFact>> cfactset = new HashSet<Set<CandidateFact>>(); List<CandidateFact> cfacts = new ArrayList<CandidateFact>(cfactsPassed); for (Iterator<CandidateFact> i = cfacts.iterator(); i.hasNext();) { CandidateFact cfact = i.next(); i.remove(); if (!checkForColumnExists(cfact, msrs)) { continue; } else if (cfact.getColumns().containsAll(msrs)) { Set<CandidateFact> one = new LinkedHashSet<CandidateFact>(); one.add(cfact); cfactset.add(one); } else { Set<String> remainingMsrs = new HashSet<String>(msrs); remainingMsrs.removeAll(cfact.getColumns()); Set<Set<CandidateFact>> coveringSets = findCoveringSets(cfacts, remainingMsrs); if (!coveringSets.isEmpty()) { for (Set<CandidateFact> set : coveringSets) { set.add(cfact); cfactset.add(set); } } else { LOG.info("Couldnt find any set containing remaining measures:" + remainingMsrs); } } } return cfactset; }
Source:
<code>public ImapClientRespReader(final int maxLineLength) { <START> super(maxLineLength, false, Delimiters.lineDelimiter()); <END> }</code><technical_language>Line delimiter allows newline (carriage return-newline). Imap protocol is delimited carriage return - newline. Change carriage return - newline</technical_language>

Target:
public ImapClientRespReader(final int maxLineLength) { super(maxLineLength, false, DELIMITER); }
Source:
<code><START> private Boolean doDelete( final ProjectName projectName ) <END> { final DeleteRepositoryParams params = DeleteRepositoryParams.from( projectName.getRepoId() ); final RepositoryId deletedRepositoryId = this.repositoryService.deleteRepository( params ); return deletedRepositoryId != null; }</code><technical_language>boolean instead of Boolean</technical_language>

Target:
private boolean doDelete( final ProjectName projectName ) { final DeleteRepositoryParams params = DeleteRepositoryParams.from( projectName.getRepoId() ); final RepositoryId deletedRepositoryId = this.repositoryService.deleteRepository( params ); return deletedRepositoryId != null; }
Source:
<code>public void analyse(Project project, SensorContext sensorContext) { <START> File workDir = new File(fileSystem.baseDir(), "/pylint/"); <END> prepareWorkDir(workDir); int i = 0; for (File file : fileSystem.files(fileSystem.predicates().hasLanguage(Python.KEY))) { try { File out = new File(workDir, i + ".out"); analyzeFile(file, out, project); i++; } catch (Exception e) { String msg = new StringBuilder() .append("Cannot analyse the file '") .append(file.getAbsolutePath()) .append("', details: '") .append(e) .append("'") .toString(); throw new IllegalStateException(msg, e); } } }</code><technical_language>fileSystem.workDir()</technical_language>

Target:
public void analyse(Project project, SensorContext sensorContext) { File workDir = new File(fileSystem.workDir(), "/pylint/"); prepareWorkDir(workDir); int i = 0; FilePredicates p = fileSystem.predicates(); Iterable<File> files = fileSystem.files(p.and(p.hasType(InputFile.Type.MAIN), p.hasLanguage(Python.KEY))); for (File file : files) { try { File out = new File(workDir, i + ".out"); analyzeFile(file, out, project); i++; } catch (Exception e) { String msg = new StringBuilder() .append("Cannot analyse the file '") .append(file.getAbsolutePath()) .append("', details: '") .append(e) .append("'") .toString(); throw new IllegalStateException(msg, e); } } }
Source:
<code>private static AffMatchOrganizationAltNameFiller createAffMatchOrganizationAltNameFiller() throws IOException { AffMatchOrganizationAltNameFiller altNameFiller = new AffMatchOrganizationAltNameFiller(); <START> List<String> altNamesCountryCodes = of( <END> "at", "be", "bg", "cy", "cz", "de", "dk", "ee", "es", "fi", "fr", "gr", "hr", "hu", "it", "lt", "lu", "lv", "nl", "pl", "pt", "ro", "se", "si", "sk" ); List<String> alternativeNamesResources = altNamesCountryCodes.stream() .map(code -> "/eu/dnetlib/iis/wf/affmatching/universities/universities_" + code + ".csv").collect(toList()); List<List<String>> alternativeNamesDictionary = alternativeNamesFactory.createAlternativeNamesDictionary(alternativeNamesResources); altNameFiller.setAlternativeNamesDictionary(alternativeNamesDictionary); return altNameFiller; }</code><technical_language>I wondering dynamic this list become. If is static - leave is. if is changed time time define files mappings (as a call registry file). This adding new language file spot registry file right add new entry in registry. need is java definition altered recompiled. I realized is defined in 2 other places</technical_language>

Target:
private static AffMatchOrganizationAltNameFiller createAffMatchOrganizationAltNameFiller() throws IOException { AffMatchOrganizationAltNameFiller altNameFiller = new AffMatchOrganizationAltNameFiller(); List<Set<String>> alternativeNamesDictionary = alternativeNamesFactory.createAlternativeNamesDictionary(OrganizationAltNameConst.CLASSPATH_ALTERNATIVE_NAMES_CSV_FILES); altNameFiller.setAlternativeNamesDictionary(alternativeNamesDictionary); return altNameFiller; }