auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public ConceptName getName(Locale locale, ConceptNameType ofType, ConceptNameTag havingTag) { Collection<ConceptName> namesInLocale = getNames(locale); if (!namesInLocale.isEmpty()) { <START> List<ConceptName> matches = new ArrayList<>(namesInLocale.stream().filter(c->(ofType==null || ofType.equals(c.getConceptNameType()))&&(havingTag==null||c.hasTag(havingTag))).collect(Collectors.toList())); <END> if (matches.size() == 1) { return matches.get(0); } else if (matches.size() > 1) { for (ConceptName match : matches) { if (match.getLocalePreferred()) { return match; } } return matches.get(0); } } Locale parent = new Locale(locale.getLanguage()); if (!parent.equals(locale)) { return getName(parent, ofType, havingTag); } else { return null; } }</code><technical_language>put some space left right hand side of operators? original code was</technical_language>

Target:
public ConceptName getName(Locale locale, ConceptNameType ofType, ConceptNameTag havingTag) { Collection<ConceptName> namesInLocale = getNames(locale); if (!namesInLocale.isEmpty()) { List<ConceptName> matches = namesInLocale.stream().filter( c->(ofType==null || ofType.equals(c.getConceptNameType())) && (havingTag==null || c.hasTag(havingTag)) ).collect(Collectors.toList()); if (matches.size() == 1) { return matches.get(0); } else if (matches.size() > 1) { for (ConceptName match : matches) { if (match.getLocalePreferred()) { return match; } } return matches.get(0); } } Locale parent = new Locale(locale.getLanguage()); if (!parent.equals(locale)) { return getName(parent, ofType, havingTag); } else { return null; } }
Source:
<code>public DruidQueryGeneratorContext visitProject(ProjectNode node, DruidQueryGeneratorContext contextIn) { DruidQueryGeneratorContext context = node.getSource().accept(this, contextIn); requireNonNull(context, "context is null"); Map<VariableReferenceExpression, Selection> newSelections = new LinkedHashMap<>(); node.getOutputVariables().forEach(variable -> { RowExpression expression = node.getAssignments().get(variable); DruidExpression druidExpression = expression.accept( <START> contextIn.getVariablesInAggregation().contains(variable) ? <END> new DruidAggregationProjectConverter(typeManager, functionMetadataManager, standardFunctionResolution) : druidProjectExpressionConverter, context.getSelections()); newSelections.put( variable, new Selection(druidExpression.getDefinition(), druidExpression.getOrigin())); }); return context.withProject(newSelections); }</code><technical_language>if/else for readability</technical_language>

Target:
public DruidQueryGeneratorContext visitProject(ProjectNode node, DruidQueryGeneratorContext contextIn) { DruidQueryGeneratorContext context = node.getSource().accept(this, contextIn); requireNonNull(context, "context is null"); Map<VariableReferenceExpression, Selection> newSelections = new LinkedHashMap<>(); node.getOutputVariables().forEach(variable -> { RowExpression expression = node.getAssignments().get(variable); DruidProjectExpressionConverter projectExpressionConverter = druidProjectExpressionConverter; if (contextIn.getVariablesInAggregation().contains(variable)) { projectExpressionConverter = new DruidAggregationProjectConverter(typeManager, functionMetadataManager, standardFunctionResolution); } DruidExpression druidExpression = expression.accept( projectExpressionConverter, context.getSelections()); newSelections.put( variable, new Selection(druidExpression.getDefinition(), druidExpression.getOrigin())); }); return context.withProject(newSelections); }
Source:
<code>public PersistedStats(String baseDir, Context context) { mStatsFile = new File(baseDir, "upload_stats.ini"); <START> mContext = context; <END> }</code><technical_language>this is instance of ApplicationContext</technical_language>

Target:
public PersistedStats(String baseDir, Context context) { mStatsFile = new File(baseDir, "upload_stats.ini"); mContext = context.getApplicationContext(); }
Source:
<code>void testSshKeyCreation() { String testKey = "ssh-rsa AAAASASFAS3532== banana@apple.com"; AuthenticationDto dto = AuthenticationDto.builder() .withLoginUserName(LOGIN) .withPublicKey(testKey) .withPublicKeyId(PUBLIC_KEY_ID) .withManagedKey(true) .build(); EnvironmentAuthentication environmentAuthentication = underTest.dtoToAuthentication(dto); <START> assertEquals("ssh-rsa AAAASASFAS3532== cloudbreak", environmentAuthentication.getPublicKey()); <END> }</code><technical_language>verify great</technical_language>

Target:
void testSshKeyCreation() { String testKey = "ssh-rsa AAAASASFAS3532== banana@apple.com"; AuthenticationDto dto = AuthenticationDto.builder() .withLoginUserName(LOGIN) .withPublicKey(testKey) .withPublicKeyId(PUBLIC_KEY_ID) .withManagedKey(true) .build(); EnvironmentAuthentication environmentAuthentication = underTest.dtoToAuthentication(dto); verify(publicKeyValidator, Mockito.times(1)).validatePublicKey(anyString()); assertEquals("ssh-rsa AAAASASFAS3532== login", environmentAuthentication.getPublicKey()); }
Source:
<code>public BlockStroageServicesService services() { <START> return Apis.get(BlockStroageServicesService.class); <END> }</code><technical_language>Typo: BlockStroageServices -> BlockStorageService</technical_language>

Target:
public BlockStorageServiceService services() { return Apis.get(BlockStorageServiceService.class); }
Source:
<code>protected EntityConfigChangedListener<PipelineConfig> pipelineConfigChangedListener() { final SCMMaterialSource self = this; return new EntityConfigChangedListener<PipelineConfig>() { @Override public void onEntityConfigChange(PipelineConfig pipelineConfig) { <START> self.onConfigChange(goConfigService.getCurrentConfig()); <END> } }; }</code><technical_language>I assume entity config change listeners safely call getCurrentConfig()? @jyotisingh @varshavaradarajan for sure</technical_language>

Target:
protected EntityConfigChangedListener<PipelineConfig> pipelineConfigChangedListener() { final SCMMaterialSource self = this; return new EntityConfigChangedListener<PipelineConfig>() { @Override public void onEntityConfigChange(PipelineConfig pipelineConfig) { self.onConfigChange(null); } }; }
Source:
<code>public void reward_BigDecimal() { assumeDrools(); TestdataSimpleBigDecimalScoreSolution solution = new TestdataSimpleBigDecimalScoreSolution(); TestdataValue v1 = new TestdataValue("v1"); solution.setValueList(Arrays.asList(v1)); TestdataEntity e1 = new TestdataEntity("e1", v1); TestdataEntity e2 = new TestdataEntity("e2", v1); solution.setEntityList(Arrays.asList(e1, e2)); ConstraintStreamScoreDirectorFactory<TestdataSimpleBigDecimalScoreSolution> scoreDirectorFactory = new ConstraintStreamScoreDirectorFactory<>( TestdataSimpleBigDecimalScoreSolution.buildSolutionDescriptor(), (factory) -> new Constraint[]{ factory.from(TestdataEntity.class) .join(TestdataValue.class, equal(TestdataEntity::getValue, identity())) .join(TestdataValue.class) .reward("myConstraint1", SimpleBigDecimalScore.ONE), factory.from(TestdataEntity.class) .join(TestdataValue.class, equal(TestdataEntity::getValue, identity())) .join(TestdataValue.class) <START> .rewardBigDecimal("myConstraint2", SimpleBigDecimalScore.ONE, (entity, value, extra) -> new BigDecimal("0.2")) <END> }, constraintStreamImplType); InnerScoreDirector<TestdataSimpleBigDecimalScoreSolution> scoreDirector = scoreDirectorFactory.buildScoreDirector(false, constraintMatchEnabled); scoreDirector.setWorkingSolution(solution); assertEquals(SimpleBigDecimalScore.of(new BigDecimal("2.4")), scoreDirector.calculateScore()); }</code><technical_language>This if creates a Tri stream, a quad stream</technical_language>

Target:
public void reward_BigDecimal() { assumeDrools(); TestdataSimpleBigDecimalScoreSolution solution = new TestdataSimpleBigDecimalScoreSolution(); TestdataValue v1 = new TestdataValue("v1"); solution.setValueList(Arrays.asList(v1)); TestdataEntity e1 = new TestdataEntity("e1", v1); TestdataEntity e2 = new TestdataEntity("e2", v1); solution.setEntityList(Arrays.asList(e1, e2)); ConstraintStreamScoreDirectorFactory<TestdataSimpleBigDecimalScoreSolution> scoreDirectorFactory = new ConstraintStreamScoreDirectorFactory<>( TestdataSimpleBigDecimalScoreSolution.buildSolutionDescriptor(), (factory) -> new Constraint[]{ factory.fromUniquePair(TestdataEntity.class) .join(TestdataValue.class, equal((entity1, entity2) -> e1.getValue(), identity())) .join(TestdataValue.class) .reward("myConstraint1", SimpleBigDecimalScore.ONE), factory.fromUniquePair(TestdataEntity.class) .join(TestdataValue.class, equal((entity1, entity2) -> e1.getValue(), identity())) .join(TestdataValue.class) .rewardBigDecimal("myConstraint2", SimpleBigDecimalScore.ONE, (entity1, entity2, value, extra) -> new BigDecimal("0.2")) }, constraintStreamImplType); InnerScoreDirector<TestdataSimpleBigDecimalScoreSolution> scoreDirector = scoreDirectorFactory.buildScoreDirector(false, constraintMatchEnabled); scoreDirector.setWorkingSolution(solution); assertEquals(SimpleBigDecimalScore.of(new BigDecimal("1.2")), scoreDirector.calculateScore()); }
Source:
<code>public void testCreateStatic() throws PendingIntent.CanceledException, InterruptedException { Uri aUri = new Uri.Builder().authority("mine").build(); String something = "something"; int i = 42; <START> sLatch = new CountDownLatch(1); resetState(); <END> RemoteCallback.create(Provider.class, mContext).myCallbackMethod( aUri, something, i, null).toPendingIntent().send(); sLatch.await(2, TimeUnit.SECONDS); assertState(0, aUri, something, i); }</code><technical_language>is this created recreated in resetState()</technical_language>

Target:
public void testCreateStatic() throws PendingIntent.CanceledException, InterruptedException { Uri aUri = new Uri.Builder().authority("mine").build(); String something = "something"; int i = 42; resetState(); RemoteCallback.create(Provider.class, mContext).myCallbackMethod( aUri, something, i, null).toPendingIntent().send(); sLatch.await(2, TimeUnit.SECONDS); assertState(0, aUri, something, i); }
Source:
<code>public void process(JSONRequestContext requestContext) { try { OnnistuuClient onnistuuClient = OnnistuuClient.getInstance(); JSONObject jsonObject = onnistuuClient.listSignatureSources(); requestContext.addResponseParameter("sources", jsonObject); } catch (Exception e) { <START> logger.log(Level.SEVERE, "Error loading signature soruces", e); <END> } }</code><technical_language>soruses? walrus' a bit different? Is receiving end ok missing responseParameters</technical_language>

Target:
public void process(JSONRequestContext requestContext) { try { OnnistuuClient onnistuuClient = OnnistuuClient.getInstance(); JSONObject jsonObject = onnistuuClient.listSignatureSources(); requestContext.addResponseParameter("sources", jsonObject); } catch (Exception e) { logger.log(Level.SEVERE, "Error loading signature sources", e); } }
Source:
<code>public HandlerResult handle(ProcessState state, ProcessInstance process) { final Instance instance = (Instance)state.getResource(); Map<String, Object> labels = DataAccessor.fieldMap(instance, InstanceConstants.FIELD_LABELS); List<Volume> volumes = InstanceHelpers.extractVolumesFromMounts(instance, objectManager); for (final Volume v : volumes) { String driver = DataAccessor.fieldString(v, VolumeConstants.FIELD_VOLUME_DRIVER); if (StringUtils.isNotEmpty(driver) && !VolumeConstants.LOCAL_DRIVER.equals(driver)) { List<? extends StoragePool> pools = storagePoolDao.findStoragePoolByDriverName(v.getAccountId(), driver); if (pools.size() == 0) { continue; } StoragePool sp = pools.get(0); final String accessMode = sp.getVolumeAccessMode(); if (StringUtils.isNotEmpty(accessMode) && StringUtils.isEmpty(v.getAccessMode()) && !accessMode.equals(v.getAccessMode())) { lockManager.lock(new InstanceVolumeAccessModeLock(v.getId()), new LockCallbackNoReturn() { @Override public void doWithLockNoResult() { objectManager.setFields(v, VOLUME.ACCESS_MODE, accessMode); } }); } } Map<String, Object> driver_opts = DataAccessor.fieldMap(v, VolumeConstants.FIELD_VOLUME_DRIVER_OPTS); <START> if (driver_opts.containsKey("ec2_az")) { <END> String zone = driver_opts.get("ec2_az").toString(); labels.put(VolumeConstants.SCALE_GROUP_LABEL, String.format("key=ec2.availability_zone;%s=1", zone)); objectManager.setFields(instance, InstanceConstants.FIELD_LABELS, labels); } } return null; }</code><technical_language>constants here</technical_language>

Target:
public HandlerResult handle(ProcessState state, ProcessInstance process) { final Instance instance = (Instance)state.getResource(); Map<String, Object> labels = DataAccessor.fieldMap(instance, InstanceConstants.FIELD_LABELS); List<Volume> volumes = InstanceHelpers.extractVolumesFromMounts(instance, objectManager); for (final Volume v : volumes) { String driver = DataAccessor.fieldString(v, VolumeConstants.FIELD_VOLUME_DRIVER); if (StringUtils.isNotEmpty(driver) && !VolumeConstants.LOCAL_DRIVER.equals(driver)) { List<? extends StoragePool> pools = storagePoolDao.findStoragePoolByDriverName(v.getAccountId(), driver); if (pools.size() == 0) { continue; } StoragePool sp = pools.get(0); final String accessMode = sp.getVolumeAccessMode(); if (StringUtils.isNotEmpty(accessMode) && StringUtils.isEmpty(v.getAccessMode()) && !accessMode.equals(v.getAccessMode())) { lockManager.lock(new InstanceVolumeAccessModeLock(v.getId()), new LockCallbackNoReturn() { @Override public void doWithLockNoResult() { objectManager.setFields(v, VOLUME.ACCESS_MODE, accessMode); } }); } } Map<String, Object> driver_opts = DataAccessor.fieldMap(v, VolumeConstants.FIELD_VOLUME_DRIVER_OPTS); if (driver_opts.containsKey(VolumeConstants.EC2_AZ)) { String zone = driver_opts.get(VolumeConstants.EC2_AZ).toString(); labels.put(HostAffinityConstraint.LABEL_HEADER_AFFINITY_HOST_LABEL, String.format("%s=%s", VolumeConstants.EC2_AZ_HOST_LABEL_KEY, zone)); objectManager.setFields(instance, InstanceConstants.FIELD_LABELS, labels); } } return null; }
Source:
<code>public Project getProject(int id) { Project fetchedProject = null; try { fetchedProject = projectLoader.fetchProjectById(id); <START> loadAllProjectFlows(fetchedProject); <END> } catch (ProjectManagerException e) { logger.error("Could not load project from store.", e); } return fetchedProject; }</code><technical_language>load project flows do? cases I need project load flows? If need done together. encapsulated in a method in ProjectLoader if appropriate</technical_language>

Target:
public Project getProject(int id) { Project fetchedProject = null; try { fetchedProject = projectLoader.fetchProjectById(id); loadAllProjectFlows(fetchedProject); } catch (ProjectManagerException e) { logger.error("Could not load project" + id + " from store.", e); } return fetchedProject; }
Source:
<code>public static Properties loadProperties(String properties) throws IOException { Properties p = new Properties(); try { p.load(new StringReader(properties)); <START> } catch(LinkageError _) { <END> p.load(new StringInputStream(properties)); } return p; }</code><technical_language>NoSuchMethodError specifically</technical_language>

Target:
public static Properties loadProperties(String properties) throws IOException { Properties p = new Properties(); try { p.load(new StringReader(properties)); } catch(NoSuchMethodError _) { p.load(new StringInputStream(properties)); } return p; }
Source:
<code>public InetSocketAddress getAddressForHost(String host) throws UnknownHostException { if (config.addressTranslation().containsKey(host)) { return config.addressTranslation().get(host); } InetAddress resolvedHost = InetAddress.getByName(host); Set<InetSocketAddress> allKnownHosts = Sets.union(currentPools.keySet(), config.servers()); for (InetSocketAddress address : allKnownHosts) { <START> if (resolvedHost.equals(address.getAddress())) { <END> return address; } } Set<Integer> allKnownPorts = allKnownHosts.stream() .map(InetSocketAddress::getPort) .collect(Collectors.toSet()); if (allKnownPorts.size() == 1) { return new InetSocketAddress(resolvedHost, Iterables.getOnlyElement(allKnownPorts)); } else { throw new UnknownHostException("Couldn't find the provided host in server list or current servers"); } }</code><technical_language>Objects.equals(address.getAddress(), resolvedHost) instead</technical_language>

Target:
public InetSocketAddress getAddressForHost(String host) throws UnknownHostException { if (config.addressTranslation().containsKey(host)) { return config.addressTranslation().get(host); } InetAddress resolvedHost = InetAddress.getByName(host); Set<InetSocketAddress> allKnownHosts = Sets.union(currentPools.keySet(), config.servers()); for (InetSocketAddress address : allKnownHosts) { if (Objects.equals(address.getAddress(), resolvedHost)) { return address; } } Set<Integer> allKnownPorts = allKnownHosts.stream() .map(InetSocketAddress::getPort) .collect(Collectors.toSet()); if (allKnownPorts.size() == 1) { return new InetSocketAddress(resolvedHost, Iterables.getOnlyElement(allKnownPorts)); } else { throw new UnknownHostException("Couldn't find the provided host in server list or current servers"); } }
Source:
<code>public void onNewUser(User user) { TextInputLayout emailLayout = findViewById(R.id.email_layout); AuthUI.IdpConfig emailConfig; try { <START> emailConfig = ProviderUtils.getConfigFromIdpsOrThrow( <END> getFlowParams().providers, EmailAuthProvider.PROVIDER_ID); } catch (IllegalStateException e) { emailConfig = ProviderUtils.getConfigFromIdpsOrThrow( getFlowParams().providers, EmailAuthProvider.EMAIL_LINK_SIGN_IN_METHOD); } if (emailConfig.getParams().getBoolean(ExtraConstants.ALLOW_NEW_EMAILS, true)) { FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); if (emailConfig.getProviderId().equals(EMAIL_LINK_PROVIDER)) { registerEmailLinkFragment(emailConfig, user.getEmail()); } else { RegisterEmailFragment fragment = RegisterEmailFragment.newInstance(user); ft.replace(R.id.fragment_register_email, fragment, RegisterEmailFragment.TAG); if (emailLayout != null) { String emailFieldName = getString(R.string.fui_email_field_name); ViewCompat.setTransitionName(emailLayout, emailFieldName); ft.addSharedElement(emailLayout, emailFieldName); } ft.disallowAddToBackStack().commit(); } } else { emailLayout.setError(getString(R.string.fui_error_email_does_not_exist)); } }</code><technical_language>a non-throwing version if catch anyway</technical_language>

Target:
public void onNewUser(User user) { TextInputLayout emailLayout = findViewById(R.id.email_layout); AuthUI.IdpConfig emailConfig = ProviderUtils.getConfigFromIdps(getFlowParams().providers, EmailAuthProvider.PROVIDER_ID); if (emailConfig == null) { emailConfig = ProviderUtils.getConfigFromIdps(getFlowParams().providers, EMAIL_LINK_PROVIDER); } if (emailConfig.getParams().getBoolean(ExtraConstants.ALLOW_NEW_EMAILS, true)) { FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); if (emailConfig.getProviderId().equals(EMAIL_LINK_PROVIDER)) { showRegisterEmailLinkFragment(emailConfig, user.getEmail()); } else { RegisterEmailFragment fragment = RegisterEmailFragment.newInstance(user); ft.replace(R.id.fragment_register_email, fragment, RegisterEmailFragment.TAG); if (emailLayout != null) { String emailFieldName = getString(R.string.fui_email_field_name); ViewCompat.setTransitionName(emailLayout, emailFieldName); ft.addSharedElement(emailLayout, emailFieldName); } ft.disallowAddToBackStack().commit(); } } else { emailLayout.setError(getString(R.string.fui_error_email_does_not_exist)); } }
Source:
<code>public void setUp() { final EventTypeCache cache = mock(EventTypeCache.class); <START> final ArgumentCaptor<Consumer<String>> changeCall = new ArgumentCaptor<>(); <END> listener = new EventTypeChangeListener(cache); verify(cache, times(1)).addInvalidationListener(changeCall.capture()); notificationTrigger = changeCall.getValue(); }</code><technical_language>I this java final Class<Consumer<String>> stringConsumerClass = (Class) Consumer.class; final ArgumentCaptor<Consumer<String>> changeCall = ArgumentCaptor.forClass(stringConsumerClass);</technical_language>

Target:
public void setUp() { final EventTypeCache cache = mock(EventTypeCache.class); final ArgumentCaptor<Consumer> changeCall = ArgumentCaptor.forClass(Consumer.class); listener = new EventTypeChangeListener(cache); verify(cache, times(1)).addInvalidationListener(changeCall.capture()); notificationTrigger = changeCall.getValue(); }
Source:
<code>public void createDocumentBuilder() { HtmlSubsetDocumentBuilder builder = newHtmlSubsetLanguage(BlockType.PARAGRAPH) .createDocumentBuilder(new StringWriter(), false); assertNotNull(builder); assertTrue(builder instanceof HtmlSubsetDocumentBuilder); <START> assertEquals(ImmutableSet.of(SpanType.BOLD), builder.getStringSubstitutedSpanTypes()); <END> }</code><technical_language>a stronger assertion builder build here, assert result</technical_language>

Target:
public void createDocumentBuilder() { StringWriter out = new StringWriter(); HtmlSubsetDocumentBuilder builder = newHtmlSubsetLanguage(BlockType.PARAGRAPH).createDocumentBuilder(out, false); assertNotNull(builder); assertTrue(builder instanceof HtmlSubsetDocumentBuilder); builder = newHtmlSubsetLanguage(SpanType.EMPHASIS).createDocumentBuilder(out, false); builder.beginSpan(SpanType.EMPHASIS, new Attributes()); builder.characters("text"); builder.endSpan(); assertEquals("<new-em>text</new-em>", out.toString()); }
Source:
<code>private <T> LocalRegistrationResult addLocalRegistration(String address, HandlerRegistration<T> registration, boolean replyHandler, boolean localOnly) { Objects.requireNonNull(address, "address"); Context context = Vertx.currentContext(); boolean hasContext = context != null; if (!hasContext) { context = vertx.getOrCreateContext(); } registration.setHandlerContext(context); HandlerHolder<T> holder = new HandlerHolder<>(metrics, registration, replyHandler, localOnly, context); Handlers handlers = new Handlers(holder); <START> Handlers actual = handlerMap.merge(address, handlers, (prev, current) -> prev.add(current.first())); <END> if (hasContext) { HandlerEntry entry = new HandlerEntry<>(address, registration); context.addCloseHook(entry); } boolean newAddress = handlers == actual; return new LocalRegistrationResult<>(holder, newAddress); }</code><technical_language>rename variables purpose more obvious? Like: newHandlers = handlerMap.merge(address, handlers, (oldHandlers, h) -> oldHandlers.add(h.first())) do current for var of remapping function</technical_language>

Target:
private <T> LocalRegistrationResult<T> addLocalRegistration(String address, HandlerRegistration<T> registration, boolean replyHandler, boolean localOnly) { Objects.requireNonNull(address, "address"); Context context = Vertx.currentContext(); boolean hasContext = context != null; if (!hasContext) { context = vertx.getOrCreateContext(); } registration.setHandlerContext(context); HandlerHolder<T> holder = new HandlerHolder<>(metrics, registration, replyHandler, localOnly, context); ConcurrentCyclicSequence<HandlerHolder> handlers = new ConcurrentCyclicSequence<HandlerHolder>().add(holder); ConcurrentCyclicSequence<HandlerHolder> actualHandlers = handlerMap.merge( address, handlers, (old, prev) -> old.add(prev.first())); if (hasContext) { HandlerEntry entry = new HandlerEntry<>(address, registration); context.addCloseHook(entry); } boolean newAddress = handlers == actualHandlers; return new LocalRegistrationResult<>(holder, newAddress); }
Source:
<code>private static boolean isKnownShortcode(String shortCode) { if (shortCode == null) return false; if (mShortcodeTable.size() == 0) { mShortcodeTable.add("dailymotion"); mShortcodeTable.add("flickr"); mShortcodeTable.add("hulu"); mShortcodeTable.add("kickstarter"); mShortcodeTable.add("vimeo"); mShortcodeTable.add("vine"); mShortcodeTable.add("wpvideo"); mShortcodeTable.add("youtube"); mShortcodeTable.add("audio"); mShortcodeTable.add("playlist"); mShortcodeTable.add("soundcloud"); mShortcodeTable.add("gallery"); mShortcodeTable.add("instagram"); mShortcodeTable.add("scribd"); mShortcodeTable.add("slideshare"); mShortcodeTable.add("slideshow"); mShortcodeTable.add("presentation"); mShortcodeTable.add("googleapps"); mShortcodeTable.add("office"); mShortcodeTable.add("googlemaps"); mShortcodeTable.add("polldaddy"); mShortcodeTable.add("recipe"); mShortcodeTable.add("sitemap"); mShortcodeTable.add("twitter-timeline"); mShortcodeTable.add("upcomingevents"); <START> } <END> return mShortcodeTable.contains(shortCode); }</code><technical_language><LINK_0> - default wporg shortcodes missing: [wp_caption] [caption] [embed] [video]</technical_language>

Target:
private static boolean isKnownShortcode(String shortCode) { if (shortCode == null) return false; if (mShortcodeTable.size() == 0) { mShortcodeTable.add("audio"); mShortcodeTable.add("caption"); mShortcodeTable.add("embed"); mShortcodeTable.add("gallery"); mShortcodeTable.add("playlist"); mShortcodeTable.add("video"); mShortcodeTable.add("wp_caption"); mShortcodeTable.add("dailymotion"); mShortcodeTable.add("flickr"); mShortcodeTable.add("hulu"); mShortcodeTable.add("kickstarter"); mShortcodeTable.add("soundcloud"); mShortcodeTable.add("vimeo"); mShortcodeTable.add("vine"); mShortcodeTable.add("wpvideo"); mShortcodeTable.add("youtube"); mShortcodeTable.add("instagram"); mShortcodeTable.add("scribd"); mShortcodeTable.add("slideshare"); mShortcodeTable.add("slideshow"); mShortcodeTable.add("presentation"); mShortcodeTable.add("googleapps"); mShortcodeTable.add("office"); mShortcodeTable.add("googlemaps"); mShortcodeTable.add("polldaddy"); mShortcodeTable.add("recipe"); mShortcodeTable.add("sitemap"); mShortcodeTable.add("twitter-timeline"); mShortcodeTable.add("upcomingevents"); } return mShortcodeTable.contains(shortCode); }
Source:
<code>private static boolean validateWildcardSerializable(MetaClass mc) { if(mc.isInterface() || (mc.isAbstract() && !mc.isEnum())) { <START> log.info("Serializable types cannot be an interface or abstract, ignoring: " + mc.getFullyQualifiedName()); <END> return false; } return true; }</code><technical_language>want spam logs types serializable. please change this debug level? Also, unnecessary String concatenation this log message printed, do this: log.debug("Serializable types interface abstract, ignoring: {}", mc.getFullyQualifiedName());</technical_language>

Target:
private static boolean validateWildcardSerializable(MetaClass mc) { if (mc.isInterface() || (mc.isAbstract() && !mc.isEnum())) { log.debug("Serializable types cannot be an interface or abstract, ignoring: {}", mc.getFullyQualifiedName()); return false; } return true; }
Source:
<code>public void testLookupForUserFileNotFound() throws IOException { TextFileBasedIdentityHandler handler = new TextFileBasedIdentityHandler(userMappingFile.getPath() + ".test", groupMappingFile.getPath()); <START> assertUserLookup(handler, testUserDataLine3.split(":")[0], ""); <END> }</code><technical_language>expecting lookup raise IOE? prefer LambaTestUtils.intercept, assertion raised include string of closure if unexpectedly fail. for debugging</technical_language>

Target:
public void testLookupForUserFileNotFound() throws Exception { TextFileBasedIdentityHandler handler = new TextFileBasedIdentityHandler(userMappingFile.getPath() + ".test", groupMappingFile.getPath()); intercept(FileNotFoundException.class, "FileNotFoundException", () -> handler.lookupForLocalUserIdentity(testUserDataLine3.split(":")[0])); }
Source:
<code>protected void addReferences(ReferenceDescriptor[] references) { if (references != null) { for (ReferenceDescriptor desc : references) { try { addReference(referenceClass.getDeclaredConstructor(ReferenceDescriptor.class).newInstance(desc)); <START> } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException | InstantiationException e) { <END> throw new DirectoryException( "An error occurred while instantiating reference class " + referenceClass.getName(), e); } } } }</code><technical_language>replace exceptions ReflectiveOperationException</technical_language>

Target:
protected void addReferences(ReferenceDescriptor[] references) { if (references != null) { for (ReferenceDescriptor desc : references) { try { addReference(referenceClass.getDeclaredConstructor(ReferenceDescriptor.class).newInstance(desc)); } catch (ReflectiveOperationException e) { throw new DirectoryException( "An error occurred while instantiating reference class " + referenceClass.getName(), e); } } } }
Source:
<code>public void testValidateNonsenseCigar(){ SAMRecord rec = createTestRecordHelper(); rec.setCigarString("nonsense"); rec.setValidationStringency(ValidationStringency.STRICT); <START> List<SAMValidationError> err = rec.validateCigar(-1); <END> Assert.assertTrue(err != null); Assert.assertTrue(!err.isEmpty()); }</code><technical_language>This test is kind of deceptive. test is throwing this line in rec.validateCigar(-1) reaches asserts it. this test is proving validateCigar() a bug. contract @return List of errors, null if errors., instead of throws IllegalArgumentException if is a completely invalid cigar</technical_language>

Target:
public void testValidateNonsenseCigar(){ SAMRecord rec = createTestRecordHelper(); rec.setCigarString("nonsense"); rec.setValidationStringency(ValidationStringency.STRICT); List<SAMValidationError> err = rec.validateCigar(-1); Assert.assertNotNull(err); Assert.assertEquals(err.size(), 1); Assert.assertEquals(err.get(0).getType(), SAMValidationError.Type.INVALID_CIGAR); }
Source:
<code>public Void call(ApiCaller ac, Deserializer parms) throws PerunException { ac.stateChangingCheck(); List<Integer> memberInts = parms.readList("members", Integer.class); if (memberInts == null) { throw new RpcException(RpcException.Type.MISSING_VALUE, "Non-empty list of members not sent."); } Group group = ac.getGroupById(parms.readInt("group")); List<Member> members = new ArrayList<>(); for (Integer memberInt : memberInts) { Member member = ac.getMemberById(memberInt); <START> if (!ac.getGroupsManager().isGroupMember(ac.getSession(), group, member)) { <END> members.add(member); } else { Member groupMember = ac.getGroupsManager().getGroupMemberById(ac.getSession(), group, member.getId()); if (MembershipType.INDIRECT.equals(groupMember.getMembershipType())) { members.add(member); } } } ac.getGroupsManager().addMembers(ac.getSession(), group, members); return null; }</code><technical_language>isDirectGroupMember() is currently present in impl/dao layer (GroupsManagerImplApi). add method BL API (entry) layers here</technical_language>

Target:
public Group call(ApiCaller ac, Deserializer parms) throws PerunException { ac.stateChangingCheck(); if (parms.contains("group")) { if (parms.contains("parentGroup")) { return ac.getGroupsManager().createGroup(ac.getSession(), ac.getGroupById(parms.readInt("parentGroup")), parms.read("group", Group.class)); } else if (parms.contains("vo")) { Group group = parms.read("group", Group.class); if (group.getParentGroupId() == null) { return ac.getGroupsManager().createGroup(ac.getSession(), ac.getVoById(parms.readInt("vo")), group); } else { throw new RpcException(RpcException.Type.WRONG_PARAMETER, "Top-level groups can't have parentGroupId set!"); } } else { throw new RpcException(RpcException.Type.MISSING_VALUE, "vo or parentGroup"); } } else if (parms.contains("name") && parms.contains("description")) { if (parms.contains("parentGroup")) { String name = parms.readString("name"); String description = parms.readString("description"); Group group = new Group(name, description); return ac.getGroupsManager().createGroup(ac.getSession(), ac.getGroupById(parms.readInt("parentGroup")), group); } else if (parms.contains("vo")) { String name = parms.readString("name"); String description = parms.readString("description"); Group group = new Group(name, description); return ac.getGroupsManager().createGroup(ac.getSession(), ac.getVoById(parms.readInt("vo")), group); } else { throw new RpcException(RpcException.Type.MISSING_VALUE, "vo or parentGroup"); } } else { throw new RpcException(RpcException.Type.MISSING_VALUE, "group or (name and description)"); } }
Source:
<code>protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.puzzle); setTitle(R.string.puzzle_view_name); Level levelObject = new Level(); levelObject.put("levelNumber", 100); levelObject.put("points", 100); levelObject.put("puzzleID", 10); levelObject.saveInBackground(); Puzzle puzzleObject = new Puzzle(); puzzleObject.put("riddle", "What is the favorite animal of Jennifer?"); puzzleObject.put("answer", "Pusheen"); puzzleObject.put("points", 100); puzzleObject.put("location", new ParseGeoPoint(23, 23)); puzzleObject.saveInBackground(); <START> <END> TextView question = (TextView) findViewById(R.id.question); question.setText(puzzleObject.getString("riddle")); correctAnswer = puzzleObject.getString("answer"); chk1 = (CheckBox) findViewById(R.id.chkanswer_1); chk2 = (CheckBox) findViewById(R.id.chkanswer_2); chk3 = (CheckBox) findViewById(R.id.chkanswer_3); chk4 = (CheckBox) findViewById(R.id.chkanswer_4); List<String> answers = new ArrayList<String>(Arrays.asList("Puppy","Koala","Panda",correctAnswer)); List<CheckBox> checkBoxes = new ArrayList<CheckBox>(Arrays.asList(chk1, chk2, chk3, chk4)); List<Integer> ordering = generateRandomOrder(); for (int i = 0; i < totalNumMultChoice; i++){ checkBoxes.get(i).setText(answers.get(ordering.get(i))); } addListenerOnMainMenuButton(); addListenerOnChkAnswer_1(); addListenerOnChkAnswer_2(); addListenerOnChkAnswer_3(); addListenerOnChkAnswer_4(); }</code><technical_language>Again, do need persist data database. options: 1. a dummy puzzle persisting database 2. query database (look test app example) DONE (i think?)</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.puzzle); setTitle(R.string.puzzle_view_name); Level levelObject = new Level(); levelObject.put("levelNumber", 100); levelObject.put("points", 100); levelObject.put("puzzleID", 10); Puzzle puzzleObject = new Puzzle(); puzzleObject.put("riddle", "What is the favorite animal of Jennifer?"); puzzleObject.put("answer", "Pusheen"); puzzleObject.put("points", 100); puzzleObject.put("location", new ParseGeoPoint(23, 23)); TextView question = (TextView) findViewById(R.id.question); question.setText(puzzleObject.getString("riddle")); correctAnswer = puzzleObject.getString("answer"); chk1 = (CheckBox) findViewById(R.id.chkanswer_1); chk2 = (CheckBox) findViewById(R.id.chkanswer_2); chk3 = (CheckBox) findViewById(R.id.chkanswer_3); chk4 = (CheckBox) findViewById(R.id.chkanswer_4); List<String> answers = new ArrayList<String>(Arrays.asList("Puppy","Koala","Panda",correctAnswer)); List<CheckBox> checkBoxes = new ArrayList<CheckBox>(Arrays.asList(chk1, chk2, chk3, chk4)); List<Integer> ordering = generateRandomOrder(); for (int i = 0; i < totalNumMultChoice; i++) { checkBoxes.get(i).setText(answers.get(ordering.get(i))); } addListenerOnMainMenuButton(); addListenerOnChkAnswer_1(); addListenerOnChkAnswer_2(); addListenerOnChkAnswer_3(); addListenerOnChkAnswer_4(); }
Source:
<code>private String escapedValue(String value) { <START> if (value != null) { <END> value = value.replaceAll("&", "&amp;"); value = value.replaceAll("<", "&lt;"); value = value.replaceAll(">", "&gt;"); } return value; }</code><technical_language>concise do this = value.replaceAll("&", "&amp;").replaceAll(...).replaceAll() I more readable concise</technical_language>

Target:
private String escapedValue(String value) { if (value != null) { value = value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;"); } return value; }
Source:
<code>public void poll() { if (isMonitoringNeeded(vdsManager.getStatus())) { VmsListFetcher fetcher = new VmsStatisticsFetcher(vdsManager); long fetchTime = System.nanoTime(); if (fetcher.fetch()) { List<VdsmVm> <START> dbVms = <END> getVmsMonitoring().perform(fetcher.getChangedVms(), fetchTime, vdsManager, true); processDevices(dbVms.stream(), fetchTime); } else { log.info("Failed to fetch vms info for host '{}' - skipping VMs monitoring.", vdsManager.getVdsName()); } } }</code><technical_language>I meant a confusing name collection holds VdsmVms</technical_language>

Target:
public void poll() { if (isMonitoringNeeded(vdsManager.getStatus())) { VmsListFetcher fetcher = new VmsStatisticsFetcher(vdsManager); long fetchTime = System.nanoTime(); if (fetcher.fetch()) { getVmsMonitoring().perform(fetcher.getChangedVms(), fetchTime, vdsManager, true); List<VdsmVm> vdsmVmsToMonitor = fetcher.getChangedVms().stream(). filter(monitoredVm -> monitoredVm.getFirst() != null). map(Pair::getSecond).collect(Collectors.toList()); processDevices(vdsmVmsToMonitor.stream(), fetchTime); } else { log.info("Failed to fetch vms info for host '{}' - skipping VMs monitoring.", vdsManager.getVdsName()); } } }
Source:
<code><START> public int hashCode() { <END> final int prime = 31; int result = 1; result = prime * result + ((fullPath == null) ? 0 : fullPath.hashCode()); result = prime * result + ((storage == null) ? 0 : storage.hashCode()); return result; }</code><technical_language>1 - of ternary operator is forbidden in compare. 2 - Replace this method of * return Arrays.hashCode(new Object[] {fullPath, storage}) * return Objects.hashCode(fullPath, storage);</technical_language>

Target:
public int hashCode() { return Objects.hashCode(fullPath, storage); }
Source:
<code>public static ObjectInstance getNewSimpleIngredientObjectInstance(ObjectClass simpleIngredientClass, String name, int attributes, int useCount, Set<String> traits, String ingredientContainer) { ObjectInstance newInstance = new ObjectInstance(simpleIngredientClass, name); <START> setAttributes(newInstance, attributes); <END> newInstance.setValue(IngredientFactory.attributeUseCount, useCount); for (String trait : traits) { newInstance.addRelationalTarget("traits", trait); } if (ingredientContainer != null || ingredientContainer != "") { newInstance.addRelationalTarget(IngredientFactory.attributeContainer, ingredientContainer); } return newInstance; }</code><technical_language>calling a static method, put classname in front (i.e. IngredientFactory.setAttributes)</technical_language>

Target:
public static ObjectInstance getNewSimpleIngredientObjectInstance(ObjectClass simpleIngredientClass, String name, int attributes, int useCount, Set<String> traits, String ingredientContainer) { ObjectInstance newInstance = new ObjectInstance(simpleIngredientClass, name); IngredientFactory.setAttributes(newInstance, attributes); newInstance.setValue(IngredientFactory.attributeUseCount, useCount); for (String trait : traits) { newInstance.addRelationalTarget("traits", trait); } if (ingredientContainer != null || ingredientContainer != "") { newInstance.addRelationalTarget(IngredientFactory.attributeContainer, ingredientContainer); } return newInstance; }
Source:
<code>public boolean equals(Object o) { if (this == o) { return true; } <START> if(o == null || o.getClass() != this.getClass()){ <END> return false; } if (!(o instanceof DTColumnConfig52)) { return false; } DTColumnConfig52 that = (DTColumnConfig52) o; if (hideColumn != that.hideColumn) { return false; } if (width != that.width) { return false; } if (defaultValue != null ? !defaultValue.equals(that.defaultValue) : that.defaultValue != null) { return false; } if (typedDefaultValue != null ? !typedDefaultValue.equals(that.typedDefaultValue) : that.typedDefaultValue != null) { return false; } return header != null ? header.equals(that.header) : that.header == null; }</code><technical_language>This change is needed, <LINK_0></technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof DTColumnConfig52)) { return false; } DTColumnConfig52 that = (DTColumnConfig52) o; return hideColumn == that.hideColumn && width == that.width && Objects.equals(defaultValue, that.defaultValue) && Objects.equals(typedDefaultValue, that.typedDefaultValue) && Objects.equals(header, that.header); }
Source:
<code>private void runExec() { try { this.process = Runtime.getRuntime().exec(this.command); this.reader = new BufferedReader(new InputStreamReader(this.process.getInputStream())); this.getTaskExecutor().execute(this); this.startStatusReader(); this.startProcessMonitor(); } catch (IOException e) { <START> throw new MessagingException("Failed to exec tail command: '" + this.options + "'", e); <END> } }</code><technical_language>message include "command _with options_:" + this.options</technical_language>

Target:
private void runExec() { this.destroyProcess(); if (logger.isInfoEnabled()) { logger.info("Starting tail process"); } try { Process process = Runtime.getRuntime().exec(this.command); BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())); this.process = process; this.startProcessMonitor(); this.startStatusReader(); this.reader = reader; this.getTaskExecutor().execute(this); } catch (IOException e) { throw new MessagingException("Failed to exec tail command: '" + this.command + "'", e); } }
Source:
<code>private boolean hasDateFormat() { return Optional .ofNullable(dateFormatContainer) <START> .map(DateFormatContainer::getDateFormat) <END> .isPresent(); }</code><technical_language>nice java8 optionals. easier read fashioned if null checks</technical_language>

Target:
private boolean hasDateFormat() { return dateFormatContainer != null && dateFormatContainer.getDateFormat() != null; }
Source:
<code>private void initializeDefaults() { encoding_.addItem("ASCII", "ASCII"); encoding_.addItem("UTF-16", "UTF-16"); encoding_.addItem("UTF-16BE", "UTF-16BE"); encoding_.addItem("UTF-16LE", "UTF-16LE"); encoding_.addItem("UTF-32", "UTF-32"); encoding_.addItem("UTF-32BE", "UTF-32BE"); encoding_.addItem("UTF-32LE", "UTF-32LE"); encoding_.addItem("UTF-7", "UTF-7"); encoding_.addItem("UTF-8", "UTF-8"); encoding_.addItem("UTF-8-MAC", "UTF-8-MAC"); encoding_.addItem("UTF8", "UTF8"); <START> encoding_.addItem("UTF8-MAC", "UTF8-MAC"); <END> encoding_.addItem("Other", ""); encoding_.setSelectedIndex(8); }</code><technical_language>Some of common. list .rs.iconvcommon() here</technical_language>

Target:
private void initializeDefaults() { encoding_.addItem("ASCII", "ASCII"); encoding_.addItem("UTF-8", "UTF-8"); encoding_.addItem("ISO-8859-1", "ISO-8859-1"); encoding_.addItem("WINDOWS-1252", "WINDOWS-1252"); encoding_.addItem("SHIFT-JIS", "SHIFT-JIS"); encoding_.addItem("ISO-2022-JP", "ISO-2022-JP"); encoding_.addItem("BIG5", "BIG5"); encoding_.addItem("ISO-2022-KR", "ISO-2022-KR"); encoding_.addItem("ISO-8859-7", "ISO-8859-7"); encoding_.addItem("GB2312", "GB2312"); encoding_.addItem("GB18030", "GB18030"); encoding_.addItem("ISO-8859-2", "ISO-8859-2"); encoding_.addItem(otherLabel, ""); encoding_.setSelectedIndex(1); }
Source:
<code>public void trackValuePropModalView(@NonNull String courseId, @Nullable String assignmentId, @NonNull String screenName) { final FirebaseEvent event = new FirebaseEvent(Events.VALUE_PROP_MODAL_VIEW); event.putCourseId(courseId); <START> if (assignmentId != null) { <END> event.putString(Keys.ASSIGNMENT_ID, assignmentId); } event.putString(Keys.SCREEN_NAME, screenName); logFirebaseEvent(event.getName(), event.getBundle()); }</code><technical_language>condition replaced !TextUtils.isEmpty(assignmentId)</technical_language>

Target:
public void trackValuePropModalView(@NonNull String courseId, @Nullable String assignmentId, @NonNull String screenName) { final FirebaseEvent event = new FirebaseEvent(Events.VALUE_PROP_MODAL_VIEW); event.putCourseId(courseId); if (TextUtils.isEmpty(assignmentId)) { event.putString(Keys.ASSIGNMENT_ID, assignmentId); } event.putString(Keys.SCREEN_NAME, screenName); logFirebaseEvent(event.getName(), event.getBundle()); }
Source:
<code>public void allFilesExist() { <START> assertTrue(CertificateUtils.verifyCertificatesExist("src/test/resources/testVerifyCertificatesExist/allFiles")); <END> }</code><technical_language>good practice place method name src/test/resources/com/github/dockerjava/core/util/CertificateUtilsTest/allFilesExist</technical_language>

Target:
public void allFilesExist() { assertTrue(CertificateUtils.verifyCertificatesExist(getPathToTestResources("allFilesExist"))); }
Source:
<code>public InstructorFeedbackResultsSectionPanel() { <START> panelClass = "panel-success"; <END> isDisplayingMissingParticipants = true; isTeamWithResponses = new HashMap<String, Boolean>(); participantPanels = new LinkedHashMap<String, List<InstructorResultsParticipantPanel>>(); }</code><technical_language>storing this here? completely sure, change (searched for references variable / setter), putting tag valid</technical_language>

Target:
public InstructorFeedbackResultsSectionPanel() { panelClass = "panel-success"; isDisplayingMissingParticipants = true; isAbleToLoadResponses = true; isTeamWithResponses = new HashMap<String, Boolean>(); participantPanels = new LinkedHashMap<String, List<InstructorFeedbackResultsParticipantPanel>>(); }
Source:
<code>protected JAXBContext getClassContext(Class<?> type, Type genericType) throws JAXBException { <START> final AtomicReference<JAXBException> jaxbException = new AtomicReference<>(); <END> final JAXBContext context = classContexts.computeIfAbsent(type, t -> { final Class<?>[] classes; if (extraClass != null) { classes = new Class[extraClass.length + 1]; classes[0] = type; System.arraycopy(extraClass, 0, classes, 1, extraClass.length); } else { classes = new Class[] {type}; } try { return newJAXBContextInstance(classes, cProperties); } catch (JAXBException e) { jaxbException.set(e); return null; } }); if (null != jaxbException.get()) { throw jaxbException.get(); } return context; }</code><technical_language>I wondering if is reason AtomicReference, code block local function, sharing race conditions observed</technical_language>

Target:
protected JAXBContext getClassContext(Class<?> type, Type genericType) throws JAXBException { final JAXBException[] jaxbException = new JAXBException[] {null}; final JAXBContext context = classContexts.computeIfAbsent(type, t -> { final Class<?>[] classes; if (extraClass != null) { classes = new Class[extraClass.length + 1]; classes[0] = type; System.arraycopy(extraClass, 0, classes, 1, extraClass.length); } else { classes = new Class[] {type}; } try { return newJAXBContextInstance(classes, cProperties); } catch (JAXBException e) { jaxbException[0] = e; return null; } }); if (null != jaxbException[0]) { throw jaxbException[0]; } return context; }
Source:
<code>public List<Integer> getPartitionIntegerKeys() throws NoConnectionsException, IOException, ProcCallException { if(m_distributer.getPartitionKeys().size() > 0){ return m_distributer.getPartitionKeys(); } long time = System.currentTimeMillis() - m_lastPartitionKeyFetched; <START> if(time > 5 * 60 * 1000){ <END> m_partitionIntegerKeys.clear(); } setPartitions(); return m_partitionIntegerKeys; }</code><technical_language>early return case 5 minutes, put "setPartitions" function for case need update. "if (time <= PARTITION_KEYS_INFO_REFRESH_FREQUENCY) { return m_partitionIntegerKeys; } "</technical_language>

Target:
public List<Integer> getPartitionIntegerKeys() throws NoConnectionsException, IOException, ProcCallException { if (m_distributer.getPartitionKeys().size() > 0) { return m_distributer.getPartitionKeys(); } long time = System.currentTimeMillis() - m_lastPartitionKeyFetched; if (time > PARTITION_KEYS_INFO_REFRESH_FREQUENCY) { m_partitionIntegerKeys.clear(); } refreshPartitionKeys(); return m_partitionIntegerKeys; }