auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void dropConglomerate() throws StandardException { TransactionController tc = activation.getTransactionController(); LOG.trace(format("Dropping temporary conglomerate splice:%d", CID)); try { tc.dropConglomerate(CID); } <START> catch (StandardException e) { <END> } try { dropTable(CID); } catch (StandardException e) { } conglomCreated = false; CID = 0; }</code><technical_language>log potential error</technical_language>

Target:
private void dropConglomerate() throws StandardException { TransactionController tc = activation.getTransactionController(); LOG.trace(format("Dropping temporary conglomerate splice:%d", CID)); try { tc.dropConglomerate(CID); } catch (StandardException e) { LOG.warn(format("Unable to drop temporary trigger conglomerate %d. Cleanup may have been called twice.", CID), e); } try { dropTable(CID); } catch (StandardException e) { LOG.warn(format("Unable to drop HBase table for temporary trigger conglomerate %d. Cleanup may have been called twice.", CID), e); } conglomCreated = false; CID = 0; }
Source:
<code>public static Map<String, Class> getFieldNamesToTypes(Class clazz) { Field[] declaredFields = clazz.getDeclaredFields(); Map<String, Class> instanceVariableNamesToTypes = new HashMap<>(); for(Field field : declaredFields) { if(!Modifier.isStatic(field.getModifiers())) { instanceVariableNamesToTypes.put(field.getName(), field.getType()); } } <START> if(clazz.getSuperclass() != Object.class) { <END> instanceVariableNamesToTypes.putAll(getFieldNamesToTypes(clazz.getSuperclass())); } return instanceVariableNamesToTypes; }</code><technical_language>!equals() ??</technical_language>

Target:
public static Map<String, Class> getFieldNamesToTypes(Class clazz) { Field[] declaredFields = clazz.getDeclaredFields(); Map<String, Class> instanceVariableNamesToTypes = new HashMap<>(); for(Field field : declaredFields) { if(!Modifier.isStatic(field.getModifiers())) { LOG.trace("clazz has field with type {}", clazz.getName(), field.getName(), field.getType().getName()); instanceVariableNamesToTypes.put(field.getName(), field.getType()); } else { LOG.trace("clazz has field with type {}, which is static so ignoring", clazz.getName(), field.getName(), field.getType().getName()); } } if(!clazz.getSuperclass().equals(Object.class)) { instanceVariableNamesToTypes.putAll(getFieldNamesToTypes(clazz.getSuperclass())); } return instanceVariableNamesToTypes; }
Source:
<code>public void synchronizeKeyToPassive(PassiveSynchronizationChannel<EhcacheEntityMessage> syncChannel, int concurrencyKey) { <START> if (concurrencyKey == 1) { <END> ServerSideConfiguration configuration = new ServerSideConfiguration(ehcacheStateService.getDefaultServerResource(), ehcacheStateService.getSharedResourcePools()); Map<String, ServerStoreConfiguration> storeConfigs = new HashMap<>(); for (String storeName : ehcacheStateService.getStores()) { ServerStoreImpl store = ehcacheStateService.getStore(storeName); storeConfigs.put(storeName, store.getStoreConfiguration()); } UUID configuredEntityId = ehcacheStateService.getClientMessageTracker().getConfiguredEntityId(); long configuredTimeStamp = ehcacheStateService.getClientMessageTracker().getConfiguredTimeStamp(); syncChannel.synchronizeToPassive( new EntityStateSyncMessage(configuration, storeConfigs, trackedClients, configuredEntityId, configuredTimeStamp)); } }</code><technical_language>Please reference org.ehcache.clustered.server.ConcurrencyStrategies.DefaultConcurrencyStrategy#DEFAULT_KEY instead of a hard coded value</technical_language>

Target:
public void synchronizeKeyToPassive(PassiveSynchronizationChannel<EhcacheEntityMessage> syncChannel, int concurrencyKey) { if (concurrencyKey == ConcurrencyStrategies.DefaultConcurrencyStrategy.DEFAULT_KEY) { ServerSideConfiguration configuration = new ServerSideConfiguration(ehcacheStateService.getDefaultServerResource(), ehcacheStateService.getSharedResourcePools()); Map<String, ServerStoreConfiguration> storeConfigs = new HashMap<>(); for (String storeName : ehcacheStateService.getStores()) { ServerStoreImpl store = ehcacheStateService.getStore(storeName); storeConfigs.put(storeName, store.getStoreConfiguration()); } syncChannel.synchronizeToPassive(new EntityStateSyncMessage(configuration, storeConfigs, trackedClients)); } }
Source:
<code>public QuadrigaUserDTO findUserByProviderUserId(String userId, String provider) throws QuadrigaStorageException { QuadrigaUserDTO userDTO = null; try { Query query = sessionFactory.getCurrentSession().createQuery( " from QuadrigaUserDTO user where user.userIdOfProvider=:userId AND user.provider=:provider"); query.setParameter("userId", userId); query.setParameter("provider", provider); List resultList = query.list(); if(resultList != null){ <START> System.out.println("resultList.size() : "+resultList.size()); <END> if(resultList.size() > 0) userDTO = (QuadrigaUserDTO)(resultList.get(0)); else userDTO = null; } else return null; return userDTO; } catch (Exception e) { logger.error("Error in adding an account request: ", e); throw new QuadrigaStorageException(e); } }</code><technical_language>remove</technical_language>

Target:
public QuadrigaUserDTO findUserByProviderUserId(String userId, String provider) { Query query = sessionFactory.getCurrentSession().createQuery( " from QuadrigaUserDTO user where user.userIdOfProvider=:userId AND user.provider=:provider"); query.setParameter("userId", userId); query.setParameter("provider", provider); List resultList = query.list(); if (resultList != null && resultList.size() > 0) { return (QuadrigaUserDTO) resultList.get(0); } return null; }
Source:
<code>public List<Order> getOrders(OrderType orderType, List<Patient> patients, List<Concept> concepts, List<User> orderers, List<Encounter> encounters) { Criteria crit = sessionFactory.getCurrentSession().createCriteria(Order.class); if (orderType != null) { crit.add(Restrictions.eq("orderType", orderType)); } if (!patients.isEmpty()) { crit.add(Restrictions.in("patient", patients)); } if (!concepts.isEmpty()) { crit.add(Restrictions.in("concept", concepts)); } <START> if (!orderers.isEmpty()) { <END> crit.add(Restrictions.in("orderer", orderers)); } if (!encounters.isEmpty()) { crit.add(Restrictions.in("encounter", encounters)); } crit.addOrder(org.hibernate.criterion.Order.desc("dateActivated")); return crit.list(); }</code><technical_language>CollectionUtils.isNotEmpty()</technical_language>

Target:
public List<Order> getOrders(OrderType orderType, List<Patient> patients, List<Concept> concepts, List<User> orderers, List<Encounter> encounters) { Criteria crit = sessionFactory.getCurrentSession().createCriteria(Order.class); if (orderType != null) { crit.add(Restrictions.eq("orderType", orderType)); } if (CollectionUtils.isNotEmpty(patients)) { crit.add(Restrictions.in("patient", patients)); } if (CollectionUtils.isNotEmpty(concepts)) { crit.add(Restrictions.in("concept", concepts)); } if (CollectionUtils.isNotEmpty(orderers)) { crit.add(Restrictions.in("orderer", orderers)); } if (CollectionUtils.isNotEmpty(encounters)) { crit.add(Restrictions.in("encounter", encounters)); } crit.addOrder(org.hibernate.criterion.Order.desc("dateActivated")); return crit.list(); }
Source:
<code>public void test() { connect(); click(jq(".z-button")); waitResponse(); <START> Assert.assertTrue(!jq(".z-error").exists()); <END> }</code><technical_language>is assertFalse method</technical_language>

Target:
public void test() { connect(); click(jq(".z-button:eq(0)")); waitResponse(); Assert.assertFalse(jq(".z-error").exists()); click(jq(".z-button:eq(1)")); waitResponse(); Assert.assertFalse(jq(".z-error").exists()); }
Source:
<code>public boolean isInsideStructure(World worldIn, String structureName, BlockPos position) { <START> if (this.baseGenerator instanceof SpongeGenerationPopulator) { <END> return ((SpongeGenerationPopulator) this.baseGenerator).getHandle(this.world).isInsideStructure(worldIn, structureName, position); } Class<? extends MapGenStructure> target = null; if ("Stronghold".equals(structureName)) { target = MapGenStronghold.class; } else if ("Mansion".equals(structureName)) { target = WoodlandMansion.class; } else if ("Monument".equals(structureName)) { target = StructureOceanMonument.class; } else if ("Village".equals(structureName)) { target = MapGenVillage.class; } else if ("Mineshaft".equals(structureName)) { target = MapGenMineshaft.class; } else if ("Temple".equals(structureName)) { target = MapGenScatteredFeature.class; } else if ("Fortress".equals(structureName)) { target = MapGenNetherBridge.class; } else if ("EndCity".equals(structureName)) { target = MapGenEndCity.class; } if (target == null) { return false; } for (GenerationPopulator gen : this.genpop) { if (target.isInstance(gen)) { return ((MapGenStructure) gen).isInsideStructure(position); } } return false; }</code><technical_language>Fix this GetNearestStructurePos</technical_language>

Target:
public boolean isInsideStructure(World worldIn, String structureName, BlockPos position) { Class<? extends MapGenStructure> target = null; if ("Stronghold".equals(structureName)) { target = MapGenStronghold.class; } else if ("Mansion".equals(structureName)) { target = WoodlandMansion.class; } else if ("Monument".equals(structureName)) { target = StructureOceanMonument.class; } else if ("Village".equals(structureName)) { target = MapGenVillage.class; } else if ("Mineshaft".equals(structureName)) { target = MapGenMineshaft.class; } else if ("Temple".equals(structureName)) { target = MapGenScatteredFeature.class; } else if ("Fortress".equals(structureName)) { target = MapGenNetherBridge.class; } else if ("EndCity".equals(structureName)) { target = MapGenEndCity.class; } if (target != null) { for (GenerationPopulator gen : this.genpop) { if (target.isInstance(gen)) { return ((MapGenStructure) gen).isInsideStructure(position); } } } if (this.baseGenerator instanceof SpongeGenerationPopulator) { return ((SpongeGenerationPopulator) this.baseGenerator).getHandle(this.world).isInsideStructure(worldIn, structureName, position); } return false; }
Source:
<code><START> public void start() { <END> if (getBoolean(IGNITE_JVM_PAUSE_DETECTOR_DISABLED, false)) { if (LOG.isDebugEnabled()) LOG.debug("JVM Pause Detector is disabled."); return; } final Thread worker = new Thread("jvm-pause-detector-worker") { private long prev = System.currentTimeMillis(); @Override public void run() { if (LOG.isDebugEnabled()) LOG.debug(getName() + " has been started."); while (true) { try { Thread.sleep(PRECISION); final long now = System.currentTimeMillis(); final long pause = now - PRECISION - prev; prev = now; if (pause >= THRESHOLD) { LOG.warning("Possible too long JVM pause: " + pause + " milliseconds."); synchronized (LongJVMPauseDetector.class) { final int next = (int)(longPausesCnt % EVT_CNT); longPausesCnt++; longPausesTotalDuration += pause; longPausesTimestamps[next] = now; longPausesDurations[next] = pause; } } } catch (InterruptedException e) { LOG.error(getName() + " has been interrupted", e); break; } } } }; if (!workerRef.compareAndSet(null, worker)) { LOG.warning(LongJVMPauseDetector.class.getSimpleName() + " already started!"); return; } worker.setDaemon(true); worker.start(); }</code><technical_language>synchronized (LongJVMPauseDetector.class) a bug</technical_language>

Target:
public void start() { if (getBoolean(IGNITE_JVM_PAUSE_DETECTOR_DISABLED, false)) { if (log.isDebugEnabled()) log.debug("JVM Pause Detector is disabled."); return; } final Thread worker = new Thread("jvm-pause-detector-worker") { private long prev = System.currentTimeMillis(); @Override public void run() { if (log.isDebugEnabled()) log.debug(getName() + " has been started."); while (true) { try { Thread.sleep(PRECISION); final long now = System.currentTimeMillis(); final long pause = now - PRECISION - prev; prev = now; if (pause >= THRESHOLD) { log.warning("Possible too long JVM pause: " + pause + " milliseconds."); synchronized (LongJVMPauseDetector.this) { final int next = (int)(longPausesCnt % EVT_CNT); longPausesCnt++; longPausesTotalDuration += pause; longPausesTimestamps[next] = now; longPausesDurations[next] = pause; } } } catch (InterruptedException e) { log.error(getName() + " has been interrupted", e); break; } } } }; if (!workerRef.compareAndSet(null, worker)) { log.warning(LongJVMPauseDetector.class.getSimpleName() + " already started!"); return; } worker.setDaemon(true); worker.start(); if (log.isDebugEnabled()) log.debug("LongJVMPauseDetector was successfully started"); }
Source:
<code>public synchronized void renameRSGroup(String oldName, String newName) throws IOException { if (oldName.equals(RSGroupInfo.DEFAULT_GROUP)) { throw new ConstraintException(RSGroupInfo.DEFAULT_GROUP + " can't be rename"); } checkGroupName(newName); RSGroupInfo oldRSG = getRSGroupInfo(oldName); Map<String, RSGroupInfo> rsGroupMap = holder.groupName2Group; <START> if (rsGroupMap.get(newName) != null) { <END> throw new ConstraintException("Group already exists: " + newName); } Map<String, RSGroupInfo> newGroupMap = Maps.newHashMap(rsGroupMap); newGroupMap.remove(oldRSG.getName()); RSGroupInfo newRSG = new RSGroupInfo(newName, oldRSG.getServers()); newGroupMap.put(newName, newRSG); flushConfig(newGroupMap); Set<TableName> updateTables = masterServices.getTableDescriptors().getAll().values() .stream() .filter(t -> oldName.equals(t.getRegionServerGroup().orElse(null))) .map(TableDescriptor::getTableName) .collect(Collectors.toSet()); setRSGroup(updateTables, newName); }</code><technical_language>rsGroupMap.containsKey() is a check</technical_language>

Target:
public synchronized void renameRSGroup(String oldName, String newName) throws IOException { if (oldName.equals(RSGroupInfo.DEFAULT_GROUP)) { throw new ConstraintException(RSGroupInfo.DEFAULT_GROUP + " can't be rename"); } checkGroupName(newName); RSGroupInfo oldRSG = getRSGroupInfo(oldName); Map<String, RSGroupInfo> rsGroupMap = holder.groupName2Group; if (rsGroupMap.containsKey(newName)) { throw new ConstraintException("Group already exists: " + newName); } Map<String, RSGroupInfo> newGroupMap = Maps.newHashMap(rsGroupMap); newGroupMap.remove(oldRSG.getName()); RSGroupInfo newRSG = new RSGroupInfo(newName, oldRSG.getServers()); newGroupMap.put(newName, newRSG); flushConfig(newGroupMap); Set<TableName> updateTables = masterServices.getTableDescriptors().getAll().values() .stream() .filter(t -> oldName.equals(t.getRegionServerGroup().orElse(null))) .map(TableDescriptor::getTableName) .collect(Collectors.toSet()); setRSGroup(updateTables, newName); }
Source:
<code>private boolean keyEquals(ByteBuffer curKeyBuffer, ByteBuffer buffer, int bufferOffset) { int i = 0; for (; i + Long.BYTES <= keySize; i += Long.BYTES) { if (curKeyBuffer.getLong(i) != buffer.getLong(bufferOffset + i)) { return false; } } <START> for (; i + Integer.BYTES <= keySize; i += Integer.BYTES) { <END> if (curKeyBuffer.getInt(i) != buffer.getInt(bufferOffset + i)) { return false; } } for (; i < keySize; i++) { if (curKeyBuffer.get(i) != buffer.get(bufferOffset + i)) { return false; } } return true; }</code><technical_language>iteration of this loop happen, suggested remove</technical_language>

Target:
private boolean keyEquals(ByteBuffer curKeyBuffer, ByteBuffer buffer, int bufferOffset) { int i = 0; for (; i + Long.BYTES <= keySize; i += Long.BYTES) { if (curKeyBuffer.getLong(i) != buffer.getLong(bufferOffset + i)) { return false; } } if (i + Integer.BYTES <= keySize) { if (curKeyBuffer.getInt(i) != buffer.getInt(bufferOffset + i)) { return false; } i += Integer.BYTES; } for (; i < keySize; i++) { if (curKeyBuffer.get(i) != buffer.get(bufferOffset + i)) { return false; } } return true; }
Source:
<code>public final String handleDigest(String method, String uri, List<Map<String, String>> challenges, Supplier<byte[]> entityBodySupplier) { authorizationPipeliningType.set(DIGEST); Map<String, List<Map<String, String>>> challengesByType = partitionByChallengeType(challenges); for (String algorithm : ALGORITHM_PREFERENCE_ORDER) { if (!challengesByType.containsKey(algorithm)) { continue; } Function<byte[], byte[]> digestFunction = getDigestFunction(algorithm); if (digestFunction == null) { continue; } <START> Map<String, String> challenge = new ConcurrentHashMap<>(challengesByType.get(algorithm).get(0)); <END> lastChallenge.set(challenge); return createDigestAuthorizationHeader(method, uri, challenge, algorithm, entityBodySupplier, digestFunction); } return null; }</code><technical_language>Is guaranteed entry in list latest</technical_language>

Target:
public final String handleDigest(String method, String uri, List<Map<String, String>> challenges, Supplier<byte[]> entityBodySupplier) { authorizationPipeliningType.set(DIGEST); Map<String, List<Map<String, String>>> challengesByType = partitionByChallengeType(challenges); for (String algorithm : ALGORITHM_PREFERENCE_ORDER) { if (!challengesByType.containsKey(algorithm)) { continue; } Function<byte[], byte[]> digestFunction = getDigestFunction(algorithm); if (digestFunction == null) { continue; } ConcurrentHashMap<String, String> challenge = new ConcurrentHashMap<>(challengesByType.get(algorithm) .get(0)); lastChallenge.set(challenge); return createDigestAuthorizationHeader(method, uri, challenge, algorithm, entityBodySupplier, digestFunction); } return null; }
Source:
<code>public String getFrameworkRole() { return Optional.fromNullable(frameworkRole).or("*"); <START> } <END></code><technical_language>DEFAULT_ROLE defined above</technical_language>

Target:
public String getFrameworkRole() { return Optional.fromNullable(frameworkRole).or(DEFAULT_ROLE); }
Source:
<code>@Override protected void configure() { BouncyCastle.require(); bind(Clock.class).toInstance(Clock.systemUTC()); install(new CookieModule(config.getCookieKey())); install(new CryptoModule(config.getDerivationProviderClass(), config.getContentKeyStore())); bind(CookieConfig.class).annotatedWith(SessionCookie.class) .toInstance(config.getSessionCookieConfig()); bind(CookieConfig.class).annotatedWith(Xsrf.class) .toInstance(config.getXsrfCookieConfig()); bind(Environment.class).toInstance(environment); bind(Configuration.class).toInstance(config); bind(KeywhizConfig.class).toInstance(config); install(new SecretGeneratorBindingModule() { @Override protected void configure() { bindSecretGenerator("templated", TemplatedSecretGenerator.class); } }); environment.healthChecks().register("postgres-readonly-health", new HealthCheck() { <START> @Override protected Result check() { <END> try (Connection connection = readonlyDataSource(environment, config).getConnection()) { DSLContext readOnlyDB = DSL.using(connection); readOnlyDB.selectOne().execute(); return Result.healthy(); } catch (DataAccessException|SQLException e) { return Result.unhealthy("Unhealthy connection to readonly database."); } } }); }</code><technical_language>nice this class a unit test</technical_language>

Target:
@Override protected void configure() { BouncyCastle.require(); bind(Clock.class).toInstance(Clock.systemUTC()); install(new CookieModule(config.getCookieKey())); install(new CryptoModule(config.getDerivationProviderClass(), config.getContentKeyStore())); bind(CookieConfig.class).annotatedWith(SessionCookie.class) .toInstance(config.getSessionCookieConfig()); bind(CookieConfig.class).annotatedWith(Xsrf.class) .toInstance(config.getXsrfCookieConfig()); bind(Environment.class).toInstance(environment); bind(Configuration.class).toInstance(config); bind(KeywhizConfig.class).toInstance(config); install(new SecretGeneratorBindingModule() { @Override protected void configure() { bindSecretGenerator("templated", TemplatedSecretGenerator.class); } }); }
Source:
<code>public List<Integer> queryDailyMetrics(String targetType, String targetId, String name, LocalDate from, LocalDate to) { List<Integer> result = new ArrayList<>(); LocalDate date = from; <START> while (!date.isAfter(to)) { <END> result.add(queryMetric(getDailyMetricType(), targetType, targetId, name, date.getYear(), date.getMonthValue(), date.getDayOfMonth())); date = date.plusDays(1); } return result; }</code><technical_language>add a saveguard for extremely broad ranges</technical_language>

Target:
public List<Integer> queryDailyMetrics(String targetType, String targetId, String name, LocalDate from, LocalDate to) { List<Integer> result = new ArrayList<>(); LocalDate date = from; AtomicInteger limit = new AtomicInteger(MAX_DAILY_METRICS); while (!date.isAfter(to) && limit.decrementAndGet() > 0) { result.add(queryMetric(getDailyMetricType(), targetType, targetId, name, date.getYear(), date.getMonthValue(), date.getDayOfMonth())); date = date.plusDays(1); } return result; }
Source:
<code>public void contextInitialized(ServletContextEvent sce) { try { String log4jPropertyFile = sce.getServletContext().getInitParameter(LOG_PROPERTIES_FILE_KEY); if (log4jPropertyFile != null && !log4jPropertyFile.isEmpty()) { String basePath = sce.getServletContext().getRealPath("/"); System.out.println("Application BasePath:" + basePath); PropertyConfigurator.configure(basePath + "/" + log4jPropertyFile); } else { System.err.println("WARN - Empty value for " + LOG_PROPERTIES_FILE_KEY + ", using BasicConfigurator"); BasicConfigurator.configure(); } } catch (Exception exc) { System.err.println("WARNING - log4j property configurator gave error, falling back to basic configurator"); exc.printStackTrace(); BasicConfigurator.configure(); } HiveConf conf = new HiveConf(); GrillServices services = GrillServices.get(); services.init(conf); services.start(); <START> GrillApplication.init(conf); <END> Runtime.getRuntime().addShutdownHook(new Thread(new CompositeService.CompositeServiceShutdownHook(services))); }</code><technical_language>put in GrillServer.java</technical_language>

Target:
public void contextInitialized(ServletContextEvent sce) { try { String log4jPropertyFile = sce.getServletContext().getInitParameter(LOG_PROPERTIES_FILE_KEY); if (log4jPropertyFile != null && !log4jPropertyFile.isEmpty()) { String basePath = sce.getServletContext().getRealPath("/"); System.out.println("Application BasePath:" + basePath); PropertyConfigurator.configure(basePath + "/" + log4jPropertyFile); } else { System.err.println("WARN - Empty value for " + LOG_PROPERTIES_FILE_KEY + ", using BasicConfigurator"); BasicConfigurator.configure(); } } catch (Exception exc) { System.err.println("WARNING - log4j property configurator gave error, falling back to basic configurator"); exc.printStackTrace(); BasicConfigurator.configure(); } HiveConf conf = GrillServerConf.get(); GrillServices services = GrillServices.get(); services.init(conf); services.start(); Runtime.getRuntime().addShutdownHook(new Thread(new CompositeService.CompositeServiceShutdownHook(services))); }
Source:
<code>public void onResume() { super.onResume(); mMapView.resume(); <START> if (mHotspotMapImageLayer != null) { <END> addLayerToMapView(mHotspotMapImageLayer, mMapView); if (mHotspotMapImageLayer.getLoadStatus() == LoadStatus.LOADED) { mMapView.setViewpoint(new Viewpoint(mHotspotMapImageLayer.getFullExtent())); } } }</code><technical_language>do need calls if geoprocessing in a fragment and/or handling config changes in manifest</technical_language>

Target:
public void onResume() { super.onResume(); mMapView.resume(); }
Source:
<code>public String getId() { <START> return this.instructorId; <END> }</code><technical_language>rename member variable instructorId id is ambiguity in this class</technical_language>

Target:
public String getId() { return id; }
Source:
<code>public ColumnNamingSession startColumnNamingSession() { return new ColumnNamingSession() { private final Set<String> names = new HashSet<>(); @Override public String getNextColumnName(ColumnNamingContext ctx) { final String intrinsicName = ctx.getIntrinsicColumnName(); boolean unique = names.add(intrinsicName); if (unique) { return intrinsicName; } String newName = null; for (int i = 2; !unique; i++) { <START> newName = intrinsicName + i; <END> unique = names.add(newName); } return newName; } @Override public void close() { } }; }</code><technical_language>underscore better? Some columns end numbers. lead endless confusion, e.g. "is_iso9001" "is_iso90011", is a standard (no, I good reason this exact example happen, easily a general problem :))</technical_language>

Target:
public ColumnNamingSession startColumnNamingSession() { return new ColumnNamingSession() { private final Set<String> names = new HashSet<>(); @Override public String getNextColumnName(ColumnNamingContext ctx) { final String intrinsicName = ctx.getIntrinsicColumnName(); boolean unique = names.add(intrinsicName); if (unique) { return intrinsicName; } String newName = null; for (int i = 2; !unique; i++) { newName = intrinsicName + '_' + i; unique = names.add(newName); } return newName; } @Override public void close() { } }; }
Source:
<code>public DeeprootWaters(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); <START> this.addAbility(new SpellCastControllerTriggeredAbility(new CreateTokenEffect(new MerfolkHexproofToken(), 1, true, false), filter, false)); <END> }</code><technical_language>constructor for CreateTokenEffect takes token argument. tapped set true</technical_language>

Target:
public DeeprootWaters(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); this.addAbility(new SpellCastControllerTriggeredAbility(new CreateTokenEffect(new MerfolkHexproofToken()), filter, false)); }
Source:
<code>public NodeMetadata apply(Server from) { NodeMetadataBuilder builder = new NodeMetadataBuilder(); builder.ids(from.getId() + ""); builder.name(from.getName()); builder.hostname(from.getName()); builder.location(new LocationBuilder().scope(LocationScope.HOST).id(from.getHostId()).description( from.getHostId()).parent(location.get()).build()); addMetadataAndParseTagsFromCommaDelimitedValue(builder, from.getMetadata()); if (from.getMetadata().get("jclouds-group") != null) { <START> builder.group(from.getMetadata().get("jclouds-group")); <END> } else { builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from.getName())); } builder.imageId(from.getImageId() + ""); builder.operatingSystem(parseOperatingSystem(from)); builder.hardware(parseHardware(from)); builder.status(serverToNodeStatus.get(from.getStatus())); builder.publicAddresses(from.getAddresses().getPublicAddresses()); builder.privateAddresses(from.getAddresses().getPrivateAddresses()); return builder.build(); }</code><technical_language>"jclouds-group" a constant, in a couple of other classes too</technical_language>

Target:
public NodeMetadata apply(Server from) { NodeMetadataBuilder builder = new NodeMetadataBuilder(); builder.ids(from.getId() + ""); builder.name(from.getName()); builder.hostname(from.getName()); builder.location(new LocationBuilder().scope(LocationScope.HOST).id(from.getHostId()).description( from.getHostId()).parent(location.get()).build()); addMetadataAndParseTagsFromCommaDelimitedValue(builder, from.getMetadata()); builder.group(groupFromMapOrName(from.getMetadata(), from.getName(), nodeNamingConvention)); builder.imageId(from.getImageId() + ""); builder.operatingSystem(parseOperatingSystem(from)); builder.hardware(parseHardware(from)); builder.status(serverToNodeStatus.get(from.getStatus())); builder.publicAddresses(from.getAddresses().getPublicAddresses()); builder.privateAddresses(from.getAddresses().getPrivateAddresses()); return builder.build(); }
Source:
<code>public GenericRow extract(Map<String, Object> from, GenericRow to) { if (_extractAll) { <START> from.forEach((fieldName, value) -> to.putValue(fieldName, convert(value))); <END> } else { for (String fieldName : _fields) { Object value = from.get(fieldName); Object convertedValue = convert(value); to.putValue(fieldName, convertedValue); } } return to; }</code><technical_language>good avoid non-functional for performance concern. Please refer AvroRecordExtractor uses. other Extractors</technical_language>

Target:
public GenericRow extract(Map<String, Object> from, GenericRow to) { if (_extractAll) { for (Map.Entry<String, Object> fieldToVal : from.entrySet()) { Object value = fieldToVal.getValue(); if (value != null) { value = convert(value); } to.putValue(fieldToVal.getKey(), value); } } else { for (String fieldName : _fields) { Object value = from.get(fieldName); if (value != null) { value = convert(value); } to.putValue(fieldName, value); } } return to; }
Source:
<code>private List<Map<String, String>> availableConsoles(String userIdAsString) { List<Map<String, String>> jsonVms = new ArrayList<>(); Guid userGuid = null; try { if (StringUtils.isNotEmpty(userIdAsString)) { userGuid = Guid.createGuidFromString(userIdAsString); } } catch (IllegalArgumentException e) { log.debug("Could not read User GUID"); } if (userGuid != null) { <START> VdcReturnValueBase retValue1 = backend.runInternalAction(VdcActionType.LoginOnBehalf, new LoginOnBehalfParameters(userGuid)); <END> IdQueryParameters userParam = new IdQueryParameters(userGuid); VdcQueryReturnValue retVms = backend.runInternalQuery(VdcQueryType.GetAllVms, userParam); if (retVms != null) { List<VM> vmsList = retVms.getReturnValue(); for (VM vm : vmsList) { Map<String, String> jsonVm = new HashMap<String, String>(); if (vm.getRunOnVds() != null) { VdcQueryReturnValue retValue = backend.runInternalQuery(VdcQueryType.GetVdsByVdsId, new IdQueryParameters(vm.getRunOnVds())); if (retValue != null && retValue.getReturnValue() != null) { VDS vds = (VDS) retValue.getReturnValue(); jsonVm.put("vmid", vm.getId().toString()); jsonVm.put("vmname", vm.getName()); jsonVm.put("host", vds.getHostName()); jsonVm.put("console", "default"); jsonVms.add(jsonVm); } } } } } return jsonVms; }</code><technical_language>pls formatter more meaningful name retValue1 (i.e. loginResult)</technical_language>

Target:
private List<Map<String, String>> availableConsoles(String userIdAsString) { List<Map<String, String>> jsonVms = new ArrayList<>(); Guid userGuid = null; try { if (StringUtils.isNotEmpty(userIdAsString)) { userGuid = Guid.createGuidFromString(userIdAsString); } } catch (IllegalArgumentException e) { log.debug("Could not read User GUID"); } if (userGuid != null) { VdcReturnValueBase loginResult = backend.runInternalAction(VdcActionType.LoginOnBehalf, new LoginOnBehalfParameters(userGuid)); String engineSessionId = loginResult.getActionReturnValue(); try { IdQueryParameters userParam = new IdQueryParameters(userGuid); VdcQueryReturnValue retVms = backend.runInternalQuery(VdcQueryType.GetAllVms, userParam); if (retVms != null) { List<VM> vmsList = retVms.getReturnValue(); for (VM vm : vmsList) { Map<String, String> jsonVm = new HashMap<String, String>(); if (vm.getRunOnVds() != null) { VdcQueryReturnValue retValue = backend.runInternalQuery(VdcQueryType.GetVdsByVdsId, new IdQueryParameters(vm.getRunOnVds())); if (retValue != null && retValue.getReturnValue() != null) { VDS vds = (VDS) retValue.getReturnValue(); jsonVm.put("vmid", vm.getId().toString()); jsonVm.put("vmname", vm.getName()); jsonVm.put("host", vds.getHostName()); jsonVm.put("console", "default"); jsonVms.add(jsonVm); } } } } } finally { if (StringUtils.isNotEmpty(engineSessionId)) { backend.runInternalAction(VdcActionType.LogoutSession, new VdcActionParametersBase(engineSessionId)); } } } return jsonVms; }
Source:
<code>private static List<RelNode> substitute( RelNode root, RelOptMaterialization materialization) { if (materialization.starTable != null) { RelNode newRoot = RelOptMaterialization.tryUseStar(root, materialization.starRelOptTable); if (newRoot != null) { root = newRoot; } } RelNode target = materialization.queryRel; <START> root = trimUnusedfields(root); <END> HepProgram program = new HepProgramBuilder() .addRuleInstance(FilterProjectTransposeRule.INSTANCE) .addRuleInstance(FilterMergeRule.INSTANCE) .addRuleInstance(FilterJoinRule.FILTER_ON_JOIN) .addRuleInstance(FilterJoinRule.JOIN) .addRuleInstance(FilterAggregateTransposeRule.INSTANCE) .addRuleInstance(ProjectMergeRule.INSTANCE) .addRuleInstance(ProjectRemoveRule.INSTANCE) .addRuleInstance(ProjectJoinTransposeRule.INSTANCE) .addRuleInstance(ProjectSetOpTransposeRule.INSTANCE) .addRuleInstance(FilterToCalcRule.INSTANCE) .addRuleInstance(ProjectToCalcRule.INSTANCE) .addRuleInstance(FilterCalcMergeRule.INSTANCE) .addRuleInstance(ProjectCalcMergeRule.INSTANCE) .addRuleInstance(CalcMergeRule.INSTANCE) .build(); final HepPlanner hepPlanner = new HepPlanner(program); hepPlanner.setRoot(target); target = hepPlanner.findBestExp(); hepPlanner.setRoot(root); root = hepPlanner.findBestExp(); return new SubstitutionVisitor(target, root).go(materialization.tableRel); }</code><technical_language>do trimming target for canonicalization</technical_language>

Target:
private static List<RelNode> substitute( RelNode root, RelOptMaterialization materialization) { if (materialization.starTable != null) { RelNode newRoot = RelOptMaterialization.tryUseStar(root, materialization.starRelOptTable); if (newRoot != null) { root = newRoot; } } RelNode target = materialization.queryRel; root = trimUnusedfields(root); target = trimUnusedfields(target); HepProgram program = new HepProgramBuilder() .addRuleInstance(FilterProjectTransposeRule.INSTANCE) .addRuleInstance(FilterMergeRule.INSTANCE) .addRuleInstance(FilterJoinRule.FILTER_ON_JOIN) .addRuleInstance(FilterJoinRule.JOIN) .addRuleInstance(FilterAggregateTransposeRule.INSTANCE) .addRuleInstance(ProjectMergeRule.INSTANCE) .addRuleInstance(ProjectRemoveRule.INSTANCE) .addRuleInstance(ProjectJoinTransposeRule.INSTANCE) .addRuleInstance(ProjectSetOpTransposeRule.INSTANCE) .addRuleInstance(FilterToCalcRule.INSTANCE) .addRuleInstance(ProjectToCalcRule.INSTANCE) .addRuleInstance(FilterCalcMergeRule.INSTANCE) .addRuleInstance(ProjectCalcMergeRule.INSTANCE) .addRuleInstance(CalcMergeRule.INSTANCE) .build(); final HepPlanner hepPlanner = new HepPlanner(program); hepPlanner.setRoot(target); target = hepPlanner.findBestExp(); hepPlanner.setRoot(root); root = hepPlanner.findBestExp(); return new SubstitutionVisitor(target, root).go(materialization.tableRel); }
Source:
<code>private static Optional<Domain> getPathDomain(TupleDomain<? extends ColumnHandle> domainPredicate) { <START> if (domainPredicate.isNone()) { <END> return Optional.empty(); } return domainPredicate.transform(HiveColumnHandle.class::cast).getDomains().get().entrySet().stream() .filter(entry -> isPathColumnHandle(entry.getKey())) .findFirst() .map(Map.Entry::getValue); }</code><technical_language>throw exception is valid input this point</technical_language>

Target:
private static Optional<Domain> getPathDomain(TupleDomain<? extends ColumnHandle> domainPredicate) { checkArgument(!domainPredicate.isNone(), "Unexpected domain predicate: none"); return domainPredicate.transform(HiveColumnHandle.class::cast).getDomains().get().entrySet().stream() .filter(entry -> isPathColumnHandle(entry.getKey())) .findFirst() .map(Map.Entry::getValue); }
Source:
<code>boolean maybeOverrideCodeGen(Node n) { switch (n.getToken()) { case INDEX_SIGNATURE: Node first = n.getFirstChild(); if (null != first) { add("{["); add(first); add(":"); add(first.getDeclaredTypeExpression()); add("]:"); add(n.getDeclaredTypeExpression()); add("}"); } return true; case UNDEFINED_TYPE: add("undefined"); return true; case CAST: add("("); add(n.getFirstChild()); add(" as "); add(n.getDeclaredTypeExpression()); add(")"); return true; case NAME: if (n.getParent().isParamList()) { Visibility visibility = (Visibility) n.getProp(Node.ACCESS_MODIFIER); if (visibility != null) { switch (visibility) { case PRIVATE: add("private "); break; case PROTECTED: add("protected "); break; case PUBLIC: add("public "); break; default: break; } } if (n.getBooleanProp(Node.IS_CONSTANT_NAME)) { add("readonly "); } } return false; case ANY_TYPE: String anyTypeName = externsMap.get("any"); if (anyTypeName != null) { add(anyTypeName); return true; } return false; case EXPORT: <START> if (1 != n.getChildCount()) { <END> return false; } if (n.getFirstChild().getToken() == Token.TYPE_ALIAS) { add("export"); add(n.getFirstChild()); return true; } return false; default: return false; } }</code><technical_language>flip, getChildCount() != 1</technical_language>

Target:
boolean maybeOverrideCodeGen(Node n) { switch (n.getToken()) { case INDEX_SIGNATURE: Node first = n.getFirstChild(); if (null != first) { add("{["); add(first); add(":"); add(first.getDeclaredTypeExpression()); add("]:"); add(n.getDeclaredTypeExpression()); add("}"); } return true; case UNDEFINED_TYPE: add("undefined"); return true; case CAST: add("("); add(n.getFirstChild()); add(" as "); add(n.getDeclaredTypeExpression()); add(")"); return true; case NAME: if (n.getParent().isParamList()) { Visibility visibility = (Visibility) n.getProp(Node.ACCESS_MODIFIER); if (visibility != null) { switch (visibility) { case PRIVATE: add("private "); break; case PROTECTED: add("protected "); break; case PUBLIC: add("public "); break; default: break; } } if (n.getBooleanProp(Node.IS_CONSTANT_NAME)) { add("readonly "); } } return false; case ANY_TYPE: String anyTypeName = externsMap.get("any"); if (anyTypeName != null) { add(anyTypeName); return true; } return false; case EXPORT: if (n.getChildCount() != 1) { return false; } if (n.getFirstChild().getToken() == Token.TYPE_ALIAS) { add("export"); add(n.getFirstChild()); return true; } return false; default: return false; } }
Source:
<code>private Set<String> getSchemaSQLServerNames(DatabaseMetaData metaData) throws SQLException { final Set<String> schemas = new HashSet<>(); ResultSet resultSet = null; <START> try { <END> resultSet = metaData.getSchemas(); while (resultSet.next()) { if (resultSet.getString("TABLE_SCHEM").equals(DEFAULT_SCHEMA_NAME_SQLSERVER)) { schemas.add(DEFAULT_SCHEMA_NAME_SQLSERVER); break; } } } finally { FileHelper.safeClose(resultSet); } try { resultSet = metaData.getTables(_catalogName, null, null, JdbcUtils.getTableTypesAsStrings(_tableTypes)); while (resultSet.next()) { schemas.add(resultSet.getString("TABLE_SCHEM")); } } finally { FileHelper.safeClose(resultSet); } return schemas; }</code><technical_language>ResultSet is AutoCloseable, change this try-with-resources</technical_language>

Target:
private Set<String> getSchemaSQLServerNames(DatabaseMetaData metaData) throws SQLException { final Set<String> schemas = new HashSet<>(); if (hasDefaultSQLServerSchema(metaData)) { schemas.add(DEFAULT_SCHEMA_NAME_SQLSERVER); } try (ResultSet tables = metaData .getTables(_catalogName, null, null, JdbcUtils.getTableTypesAsStrings(_tableTypes))) { while (tables.next()) { schemas.add(tables.getString(SCHEMA_NAME_IDENTIFIER)); } } return schemas; }
Source:
<code>private <T extends AcsResponse> T parseAcsResponse(AcsRequest<T> request, HttpResponse baseResponse) throws ServerException, ClientException { FormatType format = baseResponse.getHttpContentType(); if (baseResponse.isSuccess()) { return readResponse(request.getResponseClass(), baseResponse, format); } else { AcsError error = readError(baseResponse, format); if (500 <= baseResponse.getStatus()) { throw new ServerException(error.getErrorCode(), error.getErrorMessage(), error.getRequestId()); } else if ("IncompleteSignature".equals(error.getErrorCode())) { String strToSign = request.strToSign; String errorMessage = error.getErrorMessage(); Pattern startPattern = Pattern.compile("string to sign is:"); Matcher startMatcher = startPattern.matcher(errorMessage); startMatcher.find(); int start = startMatcher.end(); String errorStrToSign = errorMessage.substring(start); if (strToSign.equals(errorStrToSign)) { <START> throw new ClientException("SDK.InvalidAccessSecret", "Specified Access Key Secret is not valid.", <END> error.getRequestId()); } } throw new ClientException(error.getErrorCode(), error.getErrorMessage(), error.getRequestId()); } }</code><technical_language>InvalidAccessKeySecret</technical_language>

Target:
private <T extends AcsResponse> T parseAcsResponse(AcsRequest<T> request, HttpResponse baseResponse) throws ServerException, ClientException { FormatType format = baseResponse.getHttpContentType(); if (baseResponse.isSuccess()) { return readResponse(request.getResponseClass(), baseResponse, format); } else { AcsError error = readError(baseResponse, format); if (500 <= baseResponse.getStatus()) { throw new ServerException(error.getErrorCode(), error.getErrorMessage(), error.getRequestId()); } else if ("IncompleteSignature".equals(error.getErrorCode())) { String strToSign = request.strToSign; String errorMessage = error.getErrorMessage(); Pattern startPattern = Pattern.compile(SIGNATURE_BEGIN); Matcher startMatcher = startPattern.matcher(errorMessage); startMatcher.find(); int start = startMatcher.end(); String errorStrToSign = errorMessage.substring(start); if (strToSign.equals(errorStrToSign)) { throw new ClientException("InvalidAccessSecret", "Specified Access Key Secret is not valid.", error.getRequestId()); } } throw new ClientException(error.getErrorCode(), error.getErrorMessage(), error.getRequestId()); } }
Source:
<code>public Optional<Metacard> apply(InputStream document, WfsMetadata<FeatureTypeType> metadata) { XStream xStream = new XStream(new WstxDriver()); xStream.addPermission(NoTypePermission.NONE); xStream.allowTypeHierarchy(Metacard.class); xStream.setClassLoader(this.getClass().getClassLoader()); xStream.registerConverter(new GmlGeometryConverter()); xStream.registerConverter(new GmlEnvelopeConverter()); xStream.alias(metadata.getActiveFeatureMemberNodeName(), Metacard.class); FeatureTypeType featureType = null; for (FeatureTypeType ft : metadata.getDescriptors()) { <START> if (ft.getName().getLocalPart().equals(metadata.getActiveFeatureMemberNodeName())) { <END> featureType = ft; } } lookupFeatureConverter(metadata, featureType).ifPresent(xStream::registerConverter); Metacard metacard = null; try { metacard = (Metacard) xStream.fromXML(document); } catch (XStreamException e) { LOGGER.trace("Failed to parse FeatureMember into Metacard", e); } return Optional.ofNullable(metacard); }</code><technical_language>getName() getLocalPart() null</technical_language>

Target:
public Optional<Metacard> apply(InputStream document, WfsMetadata<FeatureTypeType> metadata) { XStream xStream = new XStream(new WstxDriver()); xStream.addPermission(NoTypePermission.NONE); xStream.allowTypeHierarchy(Metacard.class); xStream.setClassLoader(this.getClass().getClassLoader()); xStream.registerConverter(new GmlGeometryConverter()); xStream.registerConverter(new GmlEnvelopeConverter()); xStream.alias(metadata.getActiveFeatureMemberNodeName(), Metacard.class); FeatureTypeType featureType = null; for (FeatureTypeType ft : metadata.getDescriptors()) { if (ft.getName() != null && metadata.getActiveFeatureMemberNodeName().equals(ft.getName().getLocalPart())) { featureType = ft; } } lookupFeatureConverter(metadata, featureType).ifPresent(xStream::registerConverter); Metacard metacard = null; try { metacard = (Metacard) xStream.fromXML(document); } catch (XStreamException e) { LOGGER.trace("Failed to parse FeatureMember into Metacard", e); } return Optional.ofNullable(metacard); }
Source:
<code>public void suggestions() { SuggestionsWsRequest.More more = SuggestionsWsRequest.More.BRC; String s = randomAlphanumeric(20); underTest.suggestions(SuggestionsWsRequest.builder() .setMore(more) .setS(s) .setRecentlyBrowsed(asList("key-1", "key-2")) .build()); serviceTester.assertThat(serviceTester.getGetRequest()) .hasPath("suggestions") .hasParam("more", more.toString()) .hasParam("s", s) <START> .hasParam("recentlyBrowsed", "key-1,key-2") <END> .andNoOtherParam(); }</code><technical_language>Please add check parser</technical_language>

Target:
public void suggestions() { SuggestionsWsRequest.More more = SuggestionsWsRequest.More.BRC; String s = randomAlphanumeric(20); underTest.suggestions(SuggestionsWsRequest.builder() .setMore(more) .setS(s) .setRecentlyBrowsed(asList("key-1", "key-2")) .build()); assertThat(serviceTester.getGetParser()).isNull(); serviceTester.assertThat(serviceTester.getGetRequest()) .hasPath("suggestions") .hasParam("more", more.toString()) .hasParam("s", s) .hasParam("recentlyBrowsed", "key-1,key-2") .andNoOtherParam(); }
Source:
<code>public Optional<String> getCountryCode(String wktLocation, int radius) throws GeoEntryQueryException, ParseException { String wkt; try { <START> Point center = WKT_READER_THREAD_LOCAL.get().read(wktLocation).getCentroid(); <END> wkt = WKT_WRITER_THREAD_LOCAL.get().write(center.buffer(radius / KM_PER_DEGREE)); } catch (org.locationtech.jts.io.ParseException e) { LOGGER.debug("Could not parse wkt: {}", wktLocation, e); throw new GeoEntryQueryException("Could not parse wkt", e); } SolrQuery solrQuery = new SolrQuery( String.format( "location_geo_index:\"Intersects( %s )\"", ClientUtils.escapeQueryChars(wkt))); solrQuery.setRows(1); QueryResponse response; try { response = client.query(solrQuery, METHOD.POST); } catch (SolrServerException | IOException e) { LOGGER.debug("Could not query for country code ({})", wktLocation, e); throw new GeoEntryQueryException("Error encountered when querying", e); } return response .getResults() .stream() .findFirst() .map(doc -> getField(doc, Location.COUNTRY_CODE + "_txt", String.class)); }</code><technical_language>if need worry intersecting geometries too. I to. <LINK_0></technical_language>

Target:
public Optional<String> getCountryCode(String wktLocation, int radius) throws GeoEntryQueryException, ParseException { String wkt; try { Point center = WKT_READER_THREAD_LOCAL .get() .read(fixSelfIntersectingGeometry(wktLocation)) .getCentroid(); wkt = WKT_WRITER_THREAD_LOCAL.get().write(center.buffer(convertKilometerToDegree(radius))); } catch (org.locationtech.jts.io.ParseException e) { LOGGER.debug("Could not parse wkt: {}", wktLocation, e); throw new GeoEntryQueryException("Could not parse wkt", e); } SolrQuery solrQuery = new SolrQuery( String.format( "%s_index:\"Intersects( %s )\"", LOCATION, ClientUtils.escapeQueryChars(wkt))); solrQuery.setRows(1); QueryResponse response; try { response = client.query(solrQuery, METHOD.POST); } catch (SolrServerException | IOException e) { LOGGER.debug("Could not query for country code ({})", wktLocation, e); throw new GeoEntryQueryException("Error encountered when querying", e); } return response .getResults() .stream() .findFirst() .map(doc -> getField(doc, COUNTRY_CODE, String.class)); }
Source:
<code>private static Config loadNeo4jConfig( Path homeDir, Path configDir, String databaseName, Map<String,String> additionalConfig ) { <START> return Config.fromFile( configDir.resolve( "neo4j.conf" ) ) <END> .withHome( homeDir ) .withSetting( DatabaseManagementSystemSettings.active_database, databaseName ) .withSettings( additionalConfig ) .withConnectorsDisabled().build(); }</code><technical_language>config name</technical_language>

Target:
private static Config loadNeo4jConfig( Path homeDir, Path configDir, String databaseName, Map<String,String> additionalConfig ) { return Config.fromFile( configDir.resolve( Config.DEFAULT_CONFIG_FILE_NAME ) ) .withHome( homeDir ) .withSetting( DatabaseManagementSystemSettings.active_database, databaseName ) .withSettings( additionalConfig ) .withConnectorsDisabled().build(); }
Source:
<code><START> public HikariCPCollector add(String name, PoolStats poolStats) { <END> poolStatsMap.put(name, poolStats); return this; }</code><technical_language>I a Prometheus user, I want understand this is public. appears /PrometheusMetricsTracker in package</technical_language>

Target:
protected HikariCPCollector add(String name, PoolStats poolStats) { poolStatsMap.put(name, poolStats); return this; }