auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private LogMetadata initializeLogMetadata(long startSegment, long endSegment) { LogMetadata metadata = new LogMetadata(); long start = System.currentTimeMillis(); for (long currentSegment = startSegment; currentSegment <= endSegment; currentSegment++) { SegmentHandle sh = getSegmentHandleForAddress(currentSegment * RECORDS_PER_LOG_FILE + 1); try { for (Long address : sh.getKnownAddresses().keySet()) { <START> if (address < startingAddress) { <END> continue; } LogData logEntry = read(address); metadata.update(logEntry); } } finally { sh.close(); } } writeChannels.clear(); long end = System.currentTimeMillis(); log.info("initializeStreamTails: took ms to load {}", end - start, metadata); return metadata; }</code><technical_language>more readable for liners line was</technical_language>

Target:
private LogMetadata initializeLogMetadata(long startSegment, long endSegment) { LogMetadata metadata = new LogMetadata(); long start = System.currentTimeMillis(); for (long currentSegment = startSegment; currentSegment <= endSegment; currentSegment++) { SegmentHandle segment = getSegmentHandleForAddress(currentSegment * RECORDS_PER_LOG_FILE + 1); try { for (Long address : segment.getKnownAddresses().keySet()) { if (address < startingAddress) { continue; } LogData logEntry = read(address); metadata.update(logEntry); } } finally { segment.close(); } } writeChannels.clear(); long end = System.currentTimeMillis(); log.info("initializeStreamTails: took ms to load {}", end - start, metadata); return metadata; }
Source:
<code>public WallThermostatControlMsg(String rawMsg) { super(rawMsg); logger.debug(this.msgType+" Payload Len -> "+this.payload.length); if (this.payload.length == WALL_THERMOSTAT_CONTROL_SET_POINT_AND_MEASURED_PAYLOAD_LEN) { desiredTemperature = (this.payload[0] & 0x7F)/2.0; int mTemp = (this.payload[0]&0x80); mTemp <<= 1; mTemp |= (((int)this.payload[1])&0xff); measuredTemperature = mTemp/10.0; } else if (this.payload.length == WALL_THERMOSTAT_CONTROL_SET_POINT_ONLY_PAYLOAD_LEN) { desiredTemperature = (this.payload[0] & 0x7F)/2.0; measuredTemperature = null; } <START> else logger.error("Got "+this.msgType+" message with incorrect length!"); <END> }</code><technical_language>please add curly braces</technical_language>

Target:
public WallThermostatControlMsg(String rawMsg) { super(rawMsg); logger.debug(this.msgType + " Payload Len -> " + this.payload.length); if (this.payload.length == WALL_THERMOSTAT_CONTROL_SET_POINT_AND_MEASURED_PAYLOAD_LEN) { desiredTemperature = (this.payload[0] & 0x7F) / 2.0; int mTemp = (this.payload[0] & 0x80); mTemp <<= 1; mTemp |= (((int) this.payload[1]) & 0xff); measuredTemperature = mTemp / 10.0; } else if (this.payload.length == WALL_THERMOSTAT_CONTROL_SET_POINT_ONLY_PAYLOAD_LEN) { desiredTemperature = (this.payload[0] & 0x7F) / 2.0; measuredTemperature = null; } else { logger.error("Got " + this.msgType + " message with incorrect length!"); } }
Source:
<code>public SortedFileArchiveIdentifier(File dataFile) throws FileNotFoundException { if (!dataFile.exists()) <START> throw new IllegalArgumentException("Hash to GAV data file does not exist: " + dataFile.toString()); <END> this.dataFile = dataFile; this.dataSize = this.dataFile.length(); this.dataFileIS = new FileInputStream(dataFile); }</code><technical_language>this prevent constructor throwing FileNotFoundException</technical_language>

Target:
public SortedFileArchiveIdentifier(File dataFile) { if (!dataFile.exists()) throw new IllegalArgumentException("Hash to GAV data file does not exist: " + dataFile.toString()); this.dataFile = dataFile; this.dataSize = this.dataFile.length(); try { this.dataFileIS = new FileInputStream(dataFile); } catch (FileNotFoundException ex) { throw new IllegalStateException("Could not read file despite it exists: " + dataFile, ex); } }
Source:
<code>public void setCaptureSessionSucceed() { <START> Assume.assumeTrue(mCameraDevice != null); <END> CaptureSession captureSession = new CaptureSession(mTestParameters0.mHandler); captureSession.setSessionConfig(mTestParameters0.mSessionConfig); assertThat(captureSession.getSessionConfig()).isEqualTo(mTestParameters0.mSessionConfig); }</code><technical_language>Move this setup()</technical_language>

Target:
public void setCaptureSessionSucceed() { Log.i("CaptureSessionTest", "setCaptureSessionSucceed"); CaptureSession captureSession = new CaptureSession(mTestParameters0.mHandler); captureSession.setSessionConfig(mTestParameters0.mSessionConfig); assertThat(captureSession.getSessionConfig()).isEqualTo(mTestParameters0.mSessionConfig); }
Source:
<code>void shutdown() throws InterruptedException { <START> Timer.Context context = metrics.diskShutdownTime.time(); <END> try { compactionManager.disable(); final AtomicInteger numFailures = new AtomicInteger(0); List<Thread> shutdownThreads = new ArrayList<>(); for (final Map.Entry<PartitionId, BlobStore> partitionAndStore : stores.entrySet()) { Thread thread = Utils.newThread("store-Shutdown-" + partitionAndStore.getKey(), new Runnable() { @Override public void run() { try { partitionAndStore.getValue().shutdown(); } catch (Exception e) { numFailures.incrementAndGet(); metrics.totalStoreShutdownFailures.inc(); logger.error("Exception while shutting down store on disk {}", partitionAndStore.getKey(), disk, e); } } }, false); thread.start(); shutdownThreads.add(thread); } for (Thread shutdownThread : shutdownThreads) { shutdownThread.join(); } if (numFailures.get() > 0) { logger.error( "Could not shutdown " + numFailures.get() + " out of " + stores.size() + " stores on the disk " + disk); } compactionManager.awaitTermination(); diskIOScheduler.close(); } finally { context.stop(); } }</code><technical_language>do need a Timer? Histogram enough for job</technical_language>

Target:
void shutdown() throws InterruptedException { long startTimeMs = time.milliseconds(); try { compactionManager.disable(); final AtomicInteger numFailures = new AtomicInteger(0); List<Thread> shutdownThreads = new ArrayList<>(); for (final Map.Entry<PartitionId, BlobStore> partitionAndStore : stores.entrySet()) { Thread thread = Utils.newThread("store-shutdown-" + partitionAndStore.getKey(), new Runnable() { @Override public void run() { try { partitionAndStore.getValue().shutdown(); } catch (Exception e) { numFailures.incrementAndGet(); metrics.totalStoreShutdownFailures.inc(); logger.error("Exception while shutting down store on disk {}", partitionAndStore.getKey(), disk, e); } } }, false); thread.start(); shutdownThreads.add(thread); } for (Thread shutdownThread : shutdownThreads) { shutdownThread.join(); } if (numFailures.get() > 0) { logger.error( "Could not shutdown " + numFailures.get() + " out of " + stores.size() + " stores on the disk " + disk); } compactionManager.awaitTermination(); diskIOScheduler.close(); } finally { metrics.diskShutdownTimeMs.update(time.milliseconds() - startTimeMs); } }
Source:
<code>public static NonNullList<ItemStack> defaultRecipeGetRemainingItems(InventoryCrafting inv) { NonNullList<ItemStack> ret = NonNullList.func_191197_a(inv.getSizeInventory(), ItemStack.field_190927_a); for (int i = 0; i < ret.size(); i++) { ItemStack container = getContainerItem(inv.getStackInSlot(i)); if (container != null) { ret.set(i, container); } <START> } <END> return ret; }</code><technical_language>PROPER solution getContainerItem return null, Null ItemStacks valid anymore in 1.11</technical_language>

Target:
public static NonNullList<ItemStack> defaultRecipeGetRemainingItems(InventoryCrafting inv) { NonNullList<ItemStack> ret = NonNullList.func_191197_a(inv.getSizeInventory(), ItemStack.field_190927_a); for (int i = 0; i < ret.size(); i++) { ret.set(i, getContainerItem(inv.getStackInSlot(i))); } return ret; }
Source:
<code>DefaultConnectivityMonitor(@NonNull Context context, @NonNull ConnectivityListener listener) { this.context = context.getApplicationContext(); this.listener = listener; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { connectivityReceiver = null; callback = new ConnectivityManager.NetworkCallback() { @Override public void onAvailable(@NonNull Network network) @Override public void onLost(@NonNull Network network) { <START> onConnectivityChanged(false); <END> } @Override public void onCapabilitiesChanged( @NonNull Network network, @NonNull NetworkCapabilities networkCapabilities) { boolean connected = networkCapabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET) && networkCapabilities.hasCapability( NetworkCapabilities.NET_CAPABILITY_VALIDATED); onConnectivityChanged(connected); } }; } else { connectivityReceiver = new BroadcastReceiver() { @Override public void onReceive(@NonNull Context context, Intent intent) { onConnectivityChanged(isConnected(context)); } }; callback = null; } }</code><technical_language>do need set connectivity false here? is onCapabilitiesChanged called a network is lost available</technical_language>

Target:
DefaultConnectivityMonitor(@NonNull Context context, @NonNull ConnectivityListener listener) { this.context = context.getApplicationContext(); this.listener = listener; }
Source:
<code><START> public ToPagedIterable(DimensionDataCloudControlApi api) { <END> this.api = api; }</code><technical_language>Remove public modifier</technical_language>

Target:
ToPagedIterable(DimensionDataCloudControlApi api) { this.api = api; }
Source:
<code>public String get(String key) { Assert.notNull(key, "'key' must not be null."); <START> BoundValueOperations<String, String> ops = redisTemplate.boundValueOps(key); <END> return ops.get(); }</code><technical_language>this.redisTemplate</technical_language>

Target:
public String get(String key) { Assert.notNull(key, "'key' must not be null."); BoundValueOperations<String, String> ops = this.redisTemplate.boundValueOps(key); return ops.get(); }
Source:
<code>public EnumSchema(Name name, String doc, LockableArrayList<String> symbols, String enumDefault) { super(Type.ENUM, name, doc); this.symbols = symbols.lock(); <START> this.ordinals = new HashMap<>(symbols.size()); <END> this.enumDefault = enumDefault; int i = 0; for (String symbol : symbols) if (ordinals.put(validateName(symbol), i++) != null) throw new SchemaParseException("Duplicate enum symbol: " + symbol); if (enumDefault != null && !symbols.contains(enumDefault)) throw new SchemaParseException( "The Enum Default: " + enumDefault + " is not in the enum symbol set: " + symbols); }</code><technical_language>Hello! If avoid resizing/rehashing internal map _entirely_, this for. For example, for 100 symbols, HashMap allocate a table of 128 Node<> instances, 96th 97th insertion (~0.75 * 128), resize/rehash table 256. I agree this change guarantee *fewer* resize/rehashes (and one), however</technical_language>

Target:
public EnumSchema(Name name, String doc, LockableArrayList<String> symbols, String enumDefault) { super(Type.ENUM, name, doc); this.symbols = symbols.lock(); this.ordinals = new HashMap<>((int) Math.ceil(symbols.size() / 0.75)); this.enumDefault = enumDefault; int i = 0; for (String symbol : symbols) if (ordinals.put(validateName(symbol), i++) != null) throw new SchemaParseException("Duplicate enum symbol: " + symbol); if (enumDefault != null && !symbols.contains(enumDefault)) throw new SchemaParseException( "The Enum Default: " + enumDefault + " is not in the enum symbol set: " + symbols); }
Source:
<code>public FilterRegistrationBean getBackendInfoFilterRegistrationBean(final BackendInfoFilter filter) { final FilterRegistrationBean reg = new FilterRegistrationBean(filter); <START> reg.addUrlPatterns("/*"); <END> return reg; }</code><technical_language>I this is redundant (default)</technical_language>

Target:
public FilterRegistrationBean getBackendInfoFilterRegistrationBean(final BackendInfoFilter filter) { return new FilterRegistrationBean(filter); }
Source:
<code>public void testCopyFile(final Path file) throws IOException { final Path outFile = Files.createTempFile("tmp", ".tmp"); outFile.toFile().deleteOnExit(); IOUtil.copyFile(file.toFile(), outFile.toFile()); <START> final Stream<String> stream = Files.lines(file); <END> final Stream<String> outStream = Files.lines(outFile); final Iterator<String> itStream = stream.iterator(); final Iterator<String> itOutStream = outStream.iterator(); while (itStream.hasNext() && itOutStream.hasNext()) { Assert.assertEquals(itStream.next(), itOutStream.next()); } Assert.assertFalse(itStream.hasNext()); Assert.assertFalse(itOutStream.hasNext()); }</code><technical_language>do need save memory here, replace remaining lines of code a java Assert.assertEquals(File.lines(file),Files.lines(outFile))</technical_language>

Target:
public void testCopyFile(final Path file) throws IOException { final Path outFile = Files.createTempFile("tmp", ".tmp"); outFile.toFile().deleteOnExit(); IOUtil.copyFile(file.toFile(), outFile.toFile()); Assert.assertEquals(Files.lines(file).collect(Collectors.toList()), Files.lines(outFile).collect(Collectors.toList())); }
Source:
<code>public void testPut() { <START> ObjectMap<Object, Object> map = new ObjectMap<Object, Object>(); <END> int max = 100; Object[] values = new Object[max]; for (int i = 0; i < max; i++) values[i] = new Long(System.currentTimeMillis()); for (int i = 0; i < values.length; i++) { Object key = new Integer(i); map.put(key, values[i]); assertTrue("2.0." + i, map.containsKey(key)); assertTrue("2.1." + i, map.containsValue(values[i])); assertEquals("2.2." + i, i + 1, map.size()); } assertEquals("3.0", max, map.size()); for (int i = 0; i < values.length; i++) { Object key = new Integer(i); assertTrue("3.1." + i, map.containsKey(key)); assertNotNull("3.2." + i, map.get(key)); } }</code><technical_language>Object is general here, key of this map is Integer. Please update copyright dates in this class</technical_language>

Target:
public void testPut() { ObjectMap<Integer, Object> map = new ObjectMap<Integer, Object>(); int max = 100; Object[] values = new Object[max]; for (int i = 0; i < max; i++) values[i] = new Long(System.currentTimeMillis()); for (int i = 0; i < values.length; i++) { Integer key = new Integer(i); map.put(key, values[i]); assertTrue("2.0." + i, map.containsKey(key)); assertTrue("2.1." + i, map.containsValue(values[i])); assertEquals("2.2." + i, i + 1, map.size()); } assertEquals("3.0", max, map.size()); for (int i = 0; i < values.length; i++) { Integer key = new Integer(i); assertTrue("3.1." + i, map.containsKey(key)); assertNotNull("3.2." + i, map.get(key)); } }
Source:
<code>static ClientServerCompatibility areClientAndServerCompatible(int serverVersion, int clientMajorVersion, int clientMinorVersion) { ClientServerCompatibility compatibility = new ClientServerCompatibility(); if (VersionUtil.encodeMinPatchVersion(clientMajorVersion, clientMinorVersion) > serverVersion) { compatibility.setErrorCode(SQLExceptionCode.OUTDATED_JARS.getErrorCode()); return compatibility; } else if (VersionUtil.encodeMaxMinorVersion(clientMajorVersion) < serverVersion) { compatibility.setErrorCode(SQLExceptionCode.INCOMPATIBLE_CLIENT_SERVER_JAR.getErrorCode()); return compatibility; } <START> compatibility.setCompatible(true); <END> return compatibility; }</code><technical_language>I need set boolean default false initializing compatibility variable, set returning for clarity</technical_language>

Target:
static ClientServerCompatibility areClientAndServerCompatible(int serverVersion, int clientMajorVersion, int clientMinorVersion) { ClientServerCompatibility compatibility = new ClientServerCompatibility(); if (VersionUtil.encodeMinPatchVersion(clientMajorVersion, clientMinorVersion) > serverVersion) { compatibility.setErrorCode(SQLExceptionCode.OUTDATED_JARS.getErrorCode()); compatibility.setCompatible(false); return compatibility; } else if (VersionUtil.encodeMaxMinorVersion(clientMajorVersion) < serverVersion) { compatibility.setErrorCode(SQLExceptionCode.INCOMPATIBLE_CLIENT_SERVER_JAR.getErrorCode()); compatibility.setCompatible(false); return compatibility; } compatibility.setCompatible(true); return compatibility; }
Source:
<code>public CommentListingController(RedditURLParser.RedditURL url, final Context context) { if(url.pathType() == RedditURLParser.POST_COMMENT_LISTING_URL) { if(url.asPostCommentListURL().order == null) { url = url.asPostCommentListURL().order(defaultOrder(context)); } } else if(url.pathType() == RedditURLParser.USER_COMMENT_LISTING_URL) { if(url.asUserCommentListURL().order == null) { <START> url = url.asUserCommentListURL().order(UserCommentListingURL.Sort.TOP); <END> } } if(!(url instanceof CommentListingURL)) { throw new RuntimeException("Not comment listing URL"); } this.mUrl = (CommentListingURL)url; }</code><technical_language>this set TOP default? If so, NEW</technical_language>

Target:
public CommentListingController(RedditURLParser.RedditURL url, final Context context) { if(url.pathType() == RedditURLParser.POST_COMMENT_LISTING_URL) { if(url.asPostCommentListURL().order == null) { url = url.asPostCommentListURL().order(defaultOrder(context)); } } else if(url.pathType() == RedditURLParser.USER_COMMENT_LISTING_URL) { if(url.asUserCommentListURL().order == null) { url = url.asUserCommentListURL().order(UserCommentListingURL.Sort.NEW); } } if(!(url instanceof CommentListingURL)) { throw new RuntimeException("Not comment listing URL"); } this.mUrl = (CommentListingURL)url; }
Source:
<code>public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } CompositeValue that = (CompositeValue) o; assert components.length == that.components.length; for (int i = 0; i < components.length; ++i) { <START> if (!Comparables.equal(components[i], that.components[i])) { <END> return false; } } return true; }</code><technical_language>Do need adapt behaviour of CompositeValue#hashCode of this? In another words, happen compareTo returns 0 equals returns false</technical_language>

Target:
public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } CompositeValue that = (CompositeValue) o; return Arrays.equals(components, that.components); }
Source:
<code>public Builder dependency(String attribute, String dependsOn) { if (dependencies == null && dependsOn != null) { dependencies = new HashMap<>(); } if (dependencies != null) { dependencies.put(attribute, dependsOn); } return this; <START> } <END></code><technical_language>attribute depend single attribute? depend more</technical_language>

Target:
public Builder dependency(String attribute, String dependsOn) { if (dependencies == null && dependsOn != null) { dependencies = new DirectedAcyclicGraph<>(String.class); } if (dependencies != null) { dependencies.addVertex(attribute); dependencies.addVertex(dependsOn); dependencies.addEdge(dependsOn, attribute); } return this; }
Source:
<code>public static String credentialReferencePartAsStringIfDefined(ModelNode credentialReferenceValue, String name) throws OperationFailedException { assert !credentialReferenceValue.isDefined() : credentialReferenceValue; ModelNode result = credentialReferenceValue.get(name); if (result.isDefined()) { return result.asString(); } <START> return null; <END> }</code><technical_language>odd here. L148 asserts credentialReferenceValue is undefined. test L150 test false method return null. L148 intend for '!' there</technical_language>

Target:
public static String credentialReferencePartAsStringIfDefined(ModelNode credentialReferenceValue, String name) throws OperationFailedException { assert credentialReferenceValue.isDefined() : credentialReferenceValue; ModelNode result = credentialReferenceValue.get(name); if (result.isDefined()) { return result.asString(); } return null; }
Source:
<code>protected void walkProjection() { projection = new BasicDBObject(); boolean projectionOnFulltextScore = false; for (Operand op : selectClause.getSelectList().values()) { if (!(op instanceof Reference)) { throw new QueryParseException("Projection not supported: " + op); } FieldInfo fieldInfo = walkReference((Reference) op); if (!NXQL.ECM_UUID.equals(fieldInfo.prop) && !fieldInfo.prop.equals(fieldInfo.projectionField) && <START> !fieldInfo.prop.contains("/")) { <END> propertyKeys.put(fieldInfo.projectionField, fieldInfo.prop); } projection.put(fieldInfo.projectionField, ONE); if (fieldInfo.hasWildcard) { projectionHasWildcard = true; } if (fieldInfo.projectionField.equals(KEY_FULLTEXT_SCORE)) { projectionOnFulltextScore = true; } } if (projectionOnFulltextScore || sortOnFulltextScore) { if (!hasFulltext) { throw new QueryParseException(NXQL.ECM_FULLTEXT_SCORE + " cannot be used without " + NXQL.ECM_FULLTEXT); } projection.put(KEY_FULLTEXT_SCORE, new BasicDBObject(MONGODB_META, MONGODB_TEXT_SCORE)); } }</code><technical_language>Put fieldInfo.prop in a local variable</technical_language>

Target:
protected void walkProjection() { projection = new BasicDBObject(); boolean projectionOnFulltextScore = false; for (Operand op : selectClause.getSelectList().values()) { if (!(op instanceof Reference)) { throw new QueryParseException("Projection not supported: " + op); } FieldInfo fieldInfo = walkReference((Reference) op); String propertyField = fieldInfo.prop; if (!propertyField.equals(NXQL.ECM_UUID) && !propertyField.equals(fieldInfo.projectionField) && !propertyField.contains("/")) { propertyKeys.put(fieldInfo.projectionField, propertyField); } projection.put(fieldInfo.projectionField, ONE); if (fieldInfo.hasWildcard) { projectionHasWildcard = true; } if (fieldInfo.projectionField.equals(KEY_FULLTEXT_SCORE)) { projectionOnFulltextScore = true; } } if (projectionOnFulltextScore || sortOnFulltextScore) { if (!hasFulltext) { throw new QueryParseException(NXQL.ECM_FULLTEXT_SCORE + " cannot be used without " + NXQL.ECM_FULLTEXT); } projection.put(KEY_FULLTEXT_SCORE, new BasicDBObject(MONGODB_META, MONGODB_TEXT_SCORE)); } }
Source:
<code>public String getNodesStats() { try { <START> Response response = lowLevelClient.performRequest("GET", "/" + "_nodes/stats"); <END> return EntityUtils.toString(response.getEntity()); } catch (IOException e) { throw new NuxeoException(e); } }</code><technical_language>Put / in "_nodes/_all" string</technical_language>

Target:
public String getNodesStats() { try { Response response = lowLevelClient.performRequest("GET", "/_nodes/stats"); return EntityUtils.toString(response.getEntity()); } catch (IOException e) { throw new NuxeoException(e); } }
Source:
<code>public List<OwDiscoveryItem> getAssociatedSensors(OwSensorType sensorType) { <START> List<OwDiscoveryItem> returnList = new ArrayList<OwDiscoveryItem>(); <END> for (OwDiscoveryItem owDiscoveryItem : associatedSensors) { if (sensorType == owDiscoveryItem.getSensorType()) { returnList.add(owDiscoveryItem); } } return returnList; }</code><technical_language>diamond operator</technical_language>

Target:
public List<OwDiscoveryItem> getAssociatedSensors(OwSensorType sensorType) { List<OwDiscoveryItem> returnList = new ArrayList<>(); for (OwDiscoveryItem owDiscoveryItem : associatedSensors) { if (sensorType == owDiscoveryItem.getSensorType()) { returnList.add(owDiscoveryItem); } } return returnList; }
Source:
<code>public void replaceBrick(GlusterBrickEntity oldBrick, GlusterBrickEntity newBrick) { getCallsHandler().executeModification("UpdateGlusterVolumeBrick", getCustomMapSqlParameterSource().addValue("id", oldBrick.getId()) .addValue("new_id", newBrick.getId()) .addValue("new_server_id", newBrick.getServerId()) <START> .addValue("new_status", EnumUtils.nameOrNull(newBrick.getStatus()))); <END> }</code><technical_language>new_brick_dir passed new_server_id</technical_language>

Target:
public void replaceBrick(GlusterBrickEntity oldBrick, GlusterBrickEntity newBrick) { getCallsHandler().executeModification("UpdateGlusterVolumeBrick", getCustomMapSqlParameterSource().addValue("id", oldBrick.getId()) .addValue("new_id", newBrick.getId()) .addValue("new_server_id", newBrick.getServerId()) .addValue("new_brick_dir", newBrick.getBrickDirectory()) .addValue("new_status", EnumUtils.nameOrNull(newBrick.getStatus()))); }
Source:
<code>public void init(final ByteBuffer buf, final int position) { final int oldPosition = buf.position(); try { buf.position(position); buf.put(emptySketch); } finally { buf.position(oldPosition); } final WritableMemory mem = getMemory(buf).writableRegion(position, size); <START> putSketchIntoCache(buf, position, new HllSketch(lgK, tgtHllType, mem)); <END> }</code><technical_language>I this be: putSketchIntoCache(buf, position, HllSketch.writableWrap(mem));</technical_language>

Target:
public void init(final ByteBuffer buf, final int position) { final int oldPosition = buf.position(); try { buf.position(position); buf.put(emptySketch); } finally { buf.position(oldPosition); } final WritableMemory mem = getMemory(buf).writableRegion(position, size); putSketchIntoCache(buf, position, HllSketch.writableWrap(mem)); }
Source:
<code>protected void createFolder(String path) { try { Files.createDirectories(Paths.get(path)); } catch (IOException e) { <START> s_logger.error(String.format("Unable to create directory %s for template %s: %s%n", path, getTemplate().getUrl(), e.toString())); <END> throw new CloudRuntimeException(e); } }</code><technical_language>please reconsider this log message s_logger.error(String.format("Unable create directory %s for template %s: %s%n", path, getTemplate().getUrl(), e.toString())) especially %s%n part of it, logging exception string newline semms want. I a stack trace a message, both</technical_language>

Target:
protected void createFolder(String path) { try { Files.createDirectories(Paths.get(path)); } catch (IOException e) { s_logger.error(String.format("Unable to create directory %s for template %s: %s%n", path, getTemplate().getUrl(), e.toString()), e); throw new CloudRuntimeException(e); } }
Source:
<code>public static Set<String> getPreviousTypeParamNames(List<TypeParameter> typeParams, ASTNode missingNode) { Set<String> previousNames= new HashSet<>(); for (int i = 0; i < <START> typeParams.size(); <END> i++) { TypeParameter curr= typeParams.get(i); if (curr == missingNode) { return previousNames; } previousNames.add('<' + curr.getName().getIdentifier() + '>'); } return previousNames; }</code><technical_language>Foreach</technical_language>

Target:
public static Set<String> getPreviousTypeParamNames(List<TypeParameter> typeParams, ASTNode missingNode) { Set<String> previousNames= new HashSet<>(); for (TypeParameter curr : typeParams) { if (curr == missingNode) { return previousNames; } previousNames.add('<' + curr.getName().getIdentifier() + '>'); } return previousNames; }
Source:
<code>protected ChronicleLogAppender(Codec<M> codec, File basePath, ChronicleRetentionDuration retention) { if (!exists(basePath)) { throw new IllegalArgumentException("Cannot open Chronicle Queues, invalid path: " + basePath); } if (log.isDebugEnabled()) { log.debug("Opening: " + toString()); } Objects.requireNonNull(codec); this.codec = codec; this.basePath = basePath; this.name = basePath.getName(); Path metadataPath = getMetadataPath(); Properties metadata; if (metadataPath.toFile().exists()) { metadata = readMetadata(getMetadataPath()); } else { metadata = guessMetadata(retention); } ChronicleRetentionDuration storedRetention = new ChronicleRetentionDuration( metadata.getProperty(RETENTION_KEY)); if (retention.disable()) { this.retention = ChronicleRetentionDuration.disableOf(storedRetention); } else if (retention.getRollCycle() != storedRetention.getRollCycle()) { throw new IllegalArgumentException(String.format("Cannot open Log %s: expecting retention: %s got: %s", name, storedRetention, retention)); } else { <START> this.retention = retention; <END> } this.nbPartitions = Integer.parseInt(metadata.getProperty(PARTITIONS_KEY)); this.blockSize = Integer.parseInt(metadata.getProperty(BLOCK_SIZE_KEY)); this.partitions = new ArrayList<>(nbPartitions); initPartitions(false); }</code><technical_language>put throw branch of else</technical_language>

Target:
protected ChronicleLogAppender(Codec<M> codec, File basePath, ChronicleRetentionDuration retention) { if (!exists(basePath)) { throw new IllegalArgumentException("Cannot open Chronicle Queues, invalid path: " + basePath); } if (log.isDebugEnabled()) { log.debug("Opening: " + toString()); } Objects.requireNonNull(codec); this.codec = codec; this.basePath = basePath; this.name = basePath.getName(); Path metadataPath = getMetadataPath(); Properties metadata; if (metadataPath.toFile().exists()) { metadata = readMetadata(getMetadataPath()); } else { metadata = guessMetadata(retention); } ChronicleRetentionDuration storedRetention = new ChronicleRetentionDuration( metadata.getProperty(RETENTION_KEY)); if (retention.disable()) { this.retention = ChronicleRetentionDuration.disableOf(storedRetention); } else if (retention.getRollCycle() == storedRetention.getRollCycle()) { this.retention = retention; } else { throw new IllegalArgumentException(String.format("Cannot open Log %s: expecting retention: %s got: %s", name, storedRetention, retention)); } this.nbPartitions = Integer.parseInt(metadata.getProperty(PARTITIONS_KEY)); this.blockSize = Integer.parseInt(metadata.getProperty(BLOCK_SIZE_KEY)); this.partitions = new ArrayList<>(nbPartitions); initPartitions(false); }
Source:
<code>public void ValidationStereotypesListClass1Test() { EList<Stereotype> appliedStereotypes = class1.getAppliedStereotypes(); List<Stereotype> expectedStereotypes = new ArrayList<Stereotype>(); expectedStereotypes.add(stereotype1); expectedStereotypes.add(stereotype2); <START> assertEquals(appliedStereotypes, expectedStereotypes); <END> }</code><technical_language>Please add error message</technical_language>

Target:
public void ValidationStereotypesListClass1Test() { EList<Stereotype> appliedStereotypes = class1.getAppliedStereotypes(); List<Stereotype> expectedStereotypes = new ArrayList<Stereotype>(); expectedStereotypes.add(stereotype1); expectedStereotypes.add(stereotype2); assertEquals("The stereotypes applied on the class must be the same as the expected stereotypes.", appliedStereotypes, expectedStereotypes); }
Source:
<code>public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { try { Command command = (Command) msg; logger.info("Executing Redis command: {}", command); executeCommand(ctx, command); } catch (Exception e) { logger.error(e); <START> e.printStackTrace(); <END> throw e; } }</code><technical_language>Remove this printStackTrace. logger.error log a stack trace if do this: logger.error("description of context", e); Basically want e.printStackTrace in geode code. a logger instead</technical_language>

Target:
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { Command command = (Command) msg; try { logger.info("Executing Redis command: {}", command); executeCommand(ctx, command); } catch (Exception e) { logger.error( "Execution of Redis command " + command + " failed", e); throw e; } }
Source:
<code>private List<VariableSymbol> getBooleanParametersAsSymbol(List<VariableTree> parameters) { List<VariableSymbol> booleanParameters = Lists.newLinkedList(); for (VariableTree variableTree : parameters) { if (isBooleanVariable(variableTree)) { <START> booleanParameters.add(((VariableTreeImpl) variableTree).getSymbol()); <END> } } return booleanParameters; }</code><technical_language>Design suggestion: symbol extracted isBoolean symbol parameter</technical_language>

Target:
private List<VariableSymbol> getBooleanParametersAsSymbol(List<VariableTree> parameters) { List<VariableSymbol> booleanParameters = Lists.newLinkedList(); for (VariableTree variableTree : parameters) { VariableSymbol variableSymbol = ((VariableTreeImpl) variableTree).getSymbol(); if (isBooleanVariable(variableSymbol)) { booleanParameters.add(variableSymbol); } } return booleanParameters; }
Source:
<code>private void checkVmLeaseStorageDomain() { StorageDomain leaseStorageDomain = storageDomainDao.getForStoragePool(getVm().getLeaseStorageDomainId(), getVm().getStoragePoolId()); StorageDomainValidator storageDomainValidator = new StorageDomainValidator(leaseStorageDomain); ValidationResult validationResult = storageDomainValidator.isDomainExistAndActive(); if (!validate(validationResult)) { log.warn("The VM lease storage domain (${LeaseStorageDomainName}) status is not active, " <START> + "VM '{}' will fail to run in case the storage domain isn't reachable", <END> leaseStorageDomain.getName(), getVm().getName()); } }</code><technical_language>warning is needed, debug log good enough</technical_language>

Target:
protected void checkVmLeaseStorageDomain() { StorageDomain leaseStorageDomain = storageDomainDao.getForStoragePool(getVm().getLeaseStorageDomainId(), getVm().getStoragePoolId()); StorageDomainValidator storageDomainValidator = new StorageDomainValidator(leaseStorageDomain); ValidationResult validationResult = storageDomainValidator.isDomainExistAndActive(); if (!validate(validationResult)) { log.warn("The VM lease storage domain (${LeaseStorageDomainName}) status is not active, " + "VM '{}' will fail to run in case the storage domain isn't reachable", leaseStorageDomain.getName(), getVm().getName()); } }
Source:
<code>private void addCompoundUninstallTaskFor(Feature feature, TaskList tasks) { tasks.add( Operation.UNINSTALL, feature.getId(), HashMap<String, Set<Feature>>::new, (features, r) -> uninstallFeatures(r, features), <START> (id, features) -> <END> features .computeIfAbsent(FeaturesService.ROOT_REGION, r -> new HashSet<>()) .add(feature)); }</code><technical_language>installing features in subsystems if this is true? install features in root subsystem instead</technical_language>

Target:
private void addCompoundUninstallTaskFor(Feature feature, TaskList tasks) { tasks .addIfAbsent( Operation.UNINSTALL, HashMap<String, Set<Feature>>::new, (features, r) -> uninstallFeatures(r, features)) .add( feature.getId(), features -> features .computeIfAbsent(FeaturesService.ROOT_REGION, r -> new HashSet<>()) .add(feature)); }
Source:
<code>public void setAction(Action newAction) { if (!Action.COMMENT.equals(action) && Action.COMMENT.equals(newAction)) { if (comment == null) comment = "# " + action.token + " " <START> + ((commit == null) ? "null" : commit.toString()) + " " END> + ((shortMessage == null) ? "null" : shortMessage); } else if (Action.COMMENT.equals(action) && !Action.COMMENT.equals(newAction)) { if (commit == null) throw new JGitInternalException(MessageFormat.format( JGitText.get().cannotChangeActionOnComment, action, newAction)); } this.action = newAction; }</code><technical_language>commit.name()</technical_language>

Target:
public void setAction(Action newAction) { if (!Action.COMMENT.equals(action) && Action.COMMENT.equals(newAction)) { if (comment == null) comment = "# " + action.token + " " + ((commit == null) ? "null" : commit.name()) + " " + ((shortMessage == null) ? "null" : shortMessage); } else if (Action.COMMENT.equals(action) && !Action.COMMENT.equals(newAction)) { if (commit == null) throw new JGitInternalException(MessageFormat.format( JGitText.get().cannotChangeActionOnComment, action, newAction)); } this.action = newAction; }
Source:
<code>public File toFile() throws IOException { <START> File file = File.createTempFile(getName().split("\\.")[0], "." + getName().split("\\.")[1]); <END> file.setLastModified(getLastModified().getTime()); BufferedWriter writer = new BufferedWriter(new FileWriter(file)); writer.write(new String(getContent(), "UTF-8")); writer.close(); return file; }</code><technical_language>do split</technical_language>

Target:
public File toFile() throws IOException { String[] nameParts = getName().split("\\."); File file = File.createTempFile(nameParts[0], "." + nameParts[1]); file.setLastModified(getLastModified().getTime()); FileOutputStream fos = new FileOutputStream(file); fos.write(getContent()); fos.close(); return file; }
Source:
<code>private static DecimalFormat getCryptoFormat() { DecimalFormat cryptoFormat = new DecimalFormat(); cryptoFormat.setDecimalFormatSymbols(CUSTOM_SYMBOLS); cryptoFormat.setMaximumFractionDigits(4); cryptoFormat.setGroupingUsed(false); <START> cryptoFormat.setRoundingMode(RoundingMode.UNNECESSARY); <END> return cryptoFormat; }</code><technical_language>1 this ArithmeticException's <LINK_0></technical_language>

Target:
private static DecimalFormat getCryptoFormat() { DecimalFormat cryptoFormat = new DecimalFormat(); cryptoFormat.setDecimalFormatSymbols(CUSTOM_SYMBOLS); cryptoFormat.setMaximumFractionDigits(4); cryptoFormat.setGroupingUsed(false); cryptoFormat.setRoundingMode(RoundingMode.DOWN); return cryptoFormat; }
Source:
<code>public AnalysisJobBuilder removeSourceColumn(MetaModelInputColumn inputColumn) { <START> boolean removed = _sourceColumns.remove(inputColumn); <END> if (removed) { List<SourceColumnChangeListener> listeners = new ArrayList<>(_sourceColumnListeners); for (SourceColumnChangeListener listener : listeners) { listener.onRemove(inputColumn); } } return this; }</code><technical_language>it..</technical_language>

Target:
public AnalysisJobBuilder removeSourceColumn(MetaModelInputColumn inputColumn) { final boolean removed = _sourceColumns.remove(inputColumn); if (removed) { final List<SourceColumnChangeListener> listeners = new ArrayList<>(_sourceColumnListeners); for (SourceColumnChangeListener listener : listeners) { listener.onRemove(inputColumn); } } return this; }
Source:
<code>private static Concept buildAllergen(AllergyIntolerance allergyIntolerance) { if (allergyIntolerance.getCode() != null) { return FHIRUtils.getConceptByCodeableConcept(allergyIntolerance.getCode()); } <START> return null; <END> }</code><technical_language>do in line</technical_language>

Target:
private static Concept buildAllergen(AllergyIntolerance allergyIntolerance) { return (allergyIntolerance.getCode() != null) ? FHIRUtils.getConceptByCodeableConcept(allergyIntolerance.getCode()) : null; }
Source:
<code>private void releaseAfterCancel(HttpMethod method) { <START> if (mayHaveBody(method) && this.state.compareAndSet(ReactorNettyResponseState.NOT_SUBSCRIBED, ReactorNettyResponseState.CANCELLED)) { <END> if (logger.isDebugEnabled()) { logger.debug("Releasing body, not yet subscribed"); } this.bodyIntern() .doOnNext(byteBuf -> {}) .subscribe(byteBuf -> {}, ex -> {}); } }</code><technical_language>Do need mayHaveBody check , happen if clear cancel irrespective of body, avoid extra check</technical_language>

Target:
private void releaseAfterCancel(HttpMethod method) { if (this.state.compareAndSet(ReactorNettyResponseState.NOT_SUBSCRIBED, ReactorNettyResponseState.CANCELLED)) { if (logger.isDebugEnabled()) { logger.debug("Releasing body, not yet subscribed"); } this.bodyIntern() .doOnNext(byteBuf -> {}) .subscribe(byteBuf -> {}, ex -> {}); } }
Source:
<code>private boolean validate(String resource, String partition, String participant) { int usage = _capacityProvider.getParticipantUsage(participant) + (_pendingUsage .containsKey(participant) ? _pendingUsage.get(participant) : 0); <START> return +_partitionWeightProvider.getPartitionWeight(resource, partition) + usage <END> <= _capacityProvider.getParticipantCapacity(participant); }</code><technical_language>is a "+" in begining of statement</technical_language>

Target:
private boolean validate(String resource, String partition, String participant) { int usage = _capacityProvider.getParticipantUsage(participant) + (_pendingUsage .containsKey(participant) ? _pendingUsage.get(participant) : 0); return _partitionWeightProvider.getPartitionWeight(resource, partition) + usage <= _capacityProvider.getParticipantCapacity(participant); }
Source:
<code>public PhysicalOperation(OperatorFactory operatorFactory, Map<Symbol, Integer> layout, LocalExecutionPlanContext context, PipelineExecutionStrategy pipelineExecutionStrategy) { requireNonNull(operatorFactory, "operatorFactory is null"); requireNonNull(layout, "layout is null"); int channelCount = layout.values().stream().mapToInt(Integer::intValue).max().orElse(-1) + 1; checkArgument(layout.size() == channelCount, "invalid layout"); <START> checkArgument(ImmutableSet.copyOf(layout.values()).containsAll(ContiguousSet.create(closedOpen(0, channelCount), integers())), "invalid layout"); <END> Map<Integer, Symbol> channelLayout = ImmutableBiMap.copyOf(layout).inverse(); this.operatorFactories = ImmutableList.of(operatorFactory); this.layout = ImmutableMap.copyOf(layout); this.types = range(0, channelCount) .mapToObj(channelLayout::get) .map(context.getTypes()::get) .collect(toImmutableList()); verify(this.types.equals(operatorFactory.getTypes())); this.pipelineExecutionStrategy = pipelineExecutionStrategy; }</code><technical_language>check instead of two? For equality of sets? also, mention in raised exc msg</technical_language>

Target:
public PhysicalOperation(OperatorFactory operatorFactory, Map<Symbol, Integer> layout, LocalExecutionPlanContext context, PipelineExecutionStrategy pipelineExecutionStrategy) { this(operatorFactory, layout, context, Optional.empty(), pipelineExecutionStrategy); }
Source:
<code>public boolean isValid() { long now = System.currentTimeMillis(); <START> return expirationTimestamp == 0 || now <= expirationTimestamp && (!options.isKeepAliveTTLEnabled() || options.getKeepAliveTTL() * 1000 > now - initialTimestamp); <END> }</code><technical_language>surround parenthesis expressions right left of && more clear</technical_language>

Target:
public boolean isValid() { long now = System.currentTimeMillis(); return (expirationTimestamp == 0 || now <= expirationTimestamp) && (!options.isKeepAliveTTLEnabled() || options.getKeepAliveTTL() * 1000 > now - initialTimestamp); }
Source:
<code>private Link createPaginationLink(String species, String assembly, int pageNumber, int pageSize, String linkName) { <START> return new Link(linkTo(methodOn(ArchiveWSServerV2.class).getBrowsableStudies(species, assembly, <END> pageNumber, pageSize)) .toUriComponentsBuilder() .toUriString(), linkName); }</code><technical_language>travis is failing this class name updated suggestion return new Link(linkTo(methodOn(StudyWSServerV2.class).getBrowsableStudies(species, assembly,</technical_language>

Target:
private Link createPaginationLink(String species, String assembly, int pageNumber, int pageSize, String linkName) { return new Link(linkTo(methodOn(StudyWSServerV2.class).getBrowsableStudies(species, assembly, pageNumber, pageSize)) .toUriComponentsBuilder() .toUriString(), linkName); }
Source:
<code><START> public DiskManager getDiskManager(PartitionId id) { <END> return partitionToDiskManager.get(id); }</code><technical_language>is this public</technical_language>

Target:
DiskManager getDiskManager(PartitionId id) { return partitionToDiskManager.get(id); }
Source:
<code>public void start() { Preconditions.checkState(!started, "already started"); Preconditions.checkState(!exec.isShutdown(), "already stopped"); try { consumer = getKafkaConsumer(); exec.submit( new Runnable() { @Override public void run() { try { while (!Thread.currentThread().isInterrupted()) { final Notice notice = notices.take(); try { notice.handle(); } catch (Exception e) { log.makeAlert(e, "KafkaSupervisor[%s] failed to handle notice", dataSource) .addData("noticeClass", notice.getClass().getSimpleName()) .emit(); } } } catch (InterruptedException e) { log.info("KafkaSupervisor[%s] interrupted, exiting", dataSource); } } } ); } catch (Exception e) { log.makeAlert(e, "Exception starting KafkaSupervisor[%s]", dataSource) .emit(); throw Throwables.propagate(e); } firstRunTime = DateTime.now().plus(ioConfig.getStartDelay()); <START> timer.scheduleAtFixedRate( <END> buildRunTask(), firstRunTime.toDate(), Math.max(ioConfig.getPeriod().getMillis(), MAX_RUN_FREQUENCY_MILLIS) ); started = true; log.info("Started KafkaSupervisor[%s], first run in [%s]", dataSource, ioConfig.getStartDelay()); }</code><technical_language>other Druid code Execs.scheduledSingleThreaded(threadName) a timer. get a daemon thread a nice name. a daemon thread, a name nice too. I switch this a scheduled executor (with a nice name) Timer constructor takes a thread name</technical_language>

Target:
public void start() { Preconditions.checkState(!started, "already started"); Preconditions.checkState(!exec.isShutdown(), "already stopped"); try { consumer = getKafkaConsumer(); exec.submit( new Runnable() { @Override public void run() { try { while (!Thread.currentThread().isInterrupted()) { final Notice notice = notices.take(); try { notice.handle(); } catch (Exception e) { log.makeAlert(e, "KafkaSupervisor[%s] failed to handle notice", dataSource) .addData("noticeClass", notice.getClass().getSimpleName()) .emit(); } } } catch (InterruptedException e) { log.info("KafkaSupervisor[%s] interrupted, exiting", dataSource); } } } ); } catch (Exception e) { log.makeAlert(e, "Exception starting KafkaSupervisor[%s]", dataSource) .emit(); throw Throwables.propagate(e); } firstRunTime = DateTime.now().plus(ioConfig.getStartDelay()); scheduledExec.scheduleAtFixedRate( buildRunTask(), ioConfig.getStartDelay().getMillis(), Math.max(ioConfig.getPeriod().getMillis(), MAX_RUN_FREQUENCY_MILLIS), TimeUnit.MILLISECONDS ); started = true; log.info("Started KafkaSupervisor[%s], first run in [%s]", dataSource, ioConfig.getStartDelay()); }
Source:
<code>public void initialize() throws HBaseIOException { try { if (rsGroupInfoManager == null) { List<RSGroupAdminEndpoint> cps = masterServices.getMasterCoprocessorHost().findCoprocessors(RSGroupAdminEndpoint.class); if (cps.size() != 1) { String msg = "Expected one implementation of GroupAdminEndpoint but found " + cps.size(); LOG.error(msg); throw new HBaseIOException(msg); } rsGroupInfoManager = cps.get(0).getGroupInfoManager(); if(rsGroupInfoManager == null){ String msg = "RSGroupInfoManager hasn't been initialized"; LOG.error(msg); throw new HBaseIOException(msg); } rsGroupInfoManager.start(); } } catch (IOException e) { throw new HBaseIOException("Failed to initialize GroupInfoManagerImpl", e); } Class<? extends LoadBalancer> balancerKlass = config.getClass(HBASE_RSGROUP_LOADBALANCER_CLASS, StochasticLoadBalancer.class, LoadBalancer.class); <START> if (balancerKlass.equals(this.getClass())) { <END> LOG.warn("The internal balancer of RSGroupBasedLoadBalancer cannot be itself, " + "falling back to the default LoadBalancer class"); balancerKlass = LoadBalancerFactory.getDefaultLoadBalancerClass(); } internalBalancer = ReflectionUtils.newInstance(balancerKlass, config); internalBalancer.setMasterServices(masterServices); if (clusterStatus != null) { internalBalancer.setClusterMetrics(clusterStatus); } internalBalancer.setConf(config); internalBalancer.initialize(); }</code><technical_language>this.getClass().isAssignableFrom(balancerKlass) this is check stay consistent master branch</technical_language>

Target:
public void initialize() throws HBaseIOException { try { if (rsGroupInfoManager == null) { List<RSGroupAdminEndpoint> cps = masterServices.getMasterCoprocessorHost().findCoprocessors(RSGroupAdminEndpoint.class); if (cps.size() != 1) { String msg = "Expected one implementation of GroupAdminEndpoint but found " + cps.size(); LOG.error(msg); throw new HBaseIOException(msg); } rsGroupInfoManager = cps.get(0).getGroupInfoManager(); if(rsGroupInfoManager == null){ String msg = "RSGroupInfoManager hasn't been initialized"; LOG.error(msg); throw new HBaseIOException(msg); } rsGroupInfoManager.start(); } } catch (IOException e) { throw new HBaseIOException("Failed to initialize GroupInfoManagerImpl", e); } Class<? extends LoadBalancer> balancerClass = config.getClass(HBASE_RSGROUP_LOADBALANCER_CLASS, StochasticLoadBalancer.class, LoadBalancer.class); if (this.getClass().isAssignableFrom(balancerClass)) { LOG.warn("The internal balancer of RSGroupBasedLoadBalancer cannot be itself, " + "falling back to the default LoadBalancer class"); balancerClass = LoadBalancerFactory.getDefaultLoadBalancerClass(); } internalBalancer = ReflectionUtils.newInstance(balancerClass, config); internalBalancer.setMasterServices(masterServices); if (clusterStatus != null) { internalBalancer.setClusterMetrics(clusterStatus); } internalBalancer.setConf(config); internalBalancer.initialize(); }