auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private static void checkFlattenedConfig(Collection<? extends Map<String, ?>> configs) { Splitter splitter = Splitter.on('/'); configs.forEach( config -> { if ( !config.isEmpty() ) { List<String> firstKey = splitter.splitToList(config.keySet().iterator().next()); String configType = firstKey.get(0); <START> boolean oldStlyeConfig = firstKey.size() == 2; <END> config.keySet().forEach( key -> { List<String> keyParts = splitter.splitToList(key); checkArgument(Objects.equals(configType, keyParts.get(0)), "Invalid config type: %s. Should be: %s", keyParts.get(0), configType); if (oldStlyeConfig) { checkArgument(keyParts.size() == 2, "Expected key in [config_type/property_name] format, found [%s]", key); } else { String propertiesType = keyParts.get(1); checkArgument( keyParts.size() == 3 && PROPERTIES_PROPERTY_ID.equals(propertiesType) || keyParts.size() == 4 && PROPERTIES_ATTRIBUTES_PROPERTY_ID.equals(propertiesType), "Expected key in [config_type/properties/config_name] or [config_type/properties_attributes/attribute_name/property_name]" + " format, found [%s]", key); } }); } }); }</code><technical_language>Typo: oldStlyeConfig -> oldStyleConfig</technical_language>

Target:
private static void checkFlattenedConfig(Collection<? extends Map<String, ?>> configs) { configs.forEach( config -> { if ( !config.isEmpty() ) { List<String> firstKey = splitConfigurationKey(config.keySet().iterator().next()); String configType = firstKey.get(0); boolean legacyConfig = isKeyInLegacyFormat(firstKey); config.keySet().forEach( key -> { List<String> keyParts = splitConfigurationKey(key); checkArgument(Objects.equals(configType, keyParts.get(0)), "Invalid config type: %s. Should be: %s", keyParts.get(0), configType); checkArgument(legacyConfig && isKeyInLegacyFormat(keyParts) || !legacyConfig && isKeyInNewFormat(keyParts), "Expected key in %s format, found [%s]", legacyConfig ? "[config_type/property_name]" : "[config_type/properties/config_name] or [config_type/properties_attributes/attribute_name/property_name]", key); }); } }); }
Source:
<code>protected void buildAuditMessage(StringBuilder builder) { super.buildAuditMessage(builder); builder.append(", Operation(User login), Roles("); if (roles != null && !roles.isEmpty()) { List<String> lines = new LinkedList<>(); for (Map.Entry<String, List<String>> entry : roles.entrySet()) { <START> lines.add("(" + " " + entry.getKey() + ": " + StringUtils.join(entry.getValue(), ", ") + ")"); <END> } builder.append(StringUtils.join(lines, ")")); } builder.append("), Status(") .append(reasonOfFailure == null ? "Success" : "Failed"); if (reasonOfFailure != null) { builder.append("), Reason(") .append(reasonOfFailure); builder.append("), Consecutive failures(") .append((consecutiveFailures == null) ? "UNKNOWN USER" : String.valueOf(consecutiveFailures)); } builder.append(")"); }</code><technical_language>suggestion lines.add("(" + entry.getKey() + ": " + StringUtils.join(entry.getValue(), ", ") + ")");</technical_language>

Target:
protected void buildAuditMessage(StringBuilder builder) { super.buildAuditMessage(builder); builder.append(", Operation(User login), Roles("); if (roles != null && !roles.isEmpty()) { List<String> lines = new LinkedList<>(); for (Map.Entry<String, List<String>> entry : roles.entrySet()) { lines.add(entry.getKey() + ": " + StringUtils.join(entry.getValue(), ", ")); } builder.append(StringUtils.join(lines, ",")); } builder.append("), Status(") .append(reasonOfFailure == null ? "Success" : "Failed"); if (reasonOfFailure != null) { builder.append("), Reason(") .append(reasonOfFailure); builder.append("), Consecutive failures(") .append((consecutiveFailures == null) ? "UNKNOWN USER" : String.valueOf(consecutiveFailures)); } builder.append(")"); }
Source:
<code>public Writer<Result> createWriter(RuntimeContainer adaptor) { <START> return new MarkLogicRowReader(this, adaptor, inputProperties); <END> }</code><technical_language>Create **Writer** is **Reader**. blow brain. I great naming here</technical_language>

Target:
public MarkLogicRowProcessor createWriter(RuntimeContainer adaptor) { return new MarkLogicRowProcessor(this, adaptor, inputProperties); }
Source:
<code>String gtk_rgba_to_css_string (GdkRGBA rgba) { GdkRGBA toConvert; if (rgba != null) { toConvert = rgba; } else { GdkColor defaultGdkColor = display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND).handle; <START> toConvert = new GdkRGBA (); <END> toConvert = display.toGdkRGBA (defaultGdkColor); } long str = OS.gdk_rgba_to_string (toConvert); int length = OS.strlen (str); byte buffer = new byte [length]; OS.memmove (buffer, str, length); return new String (Converter.mbcsToWcs (null, buffer)); }</code><technical_language>display.toGdkRGBA returns null remove "rgba=new GdkRGBA()"</technical_language>

Target:
String gtk_rgba_to_css_string (GdkRGBA rgba) { GdkRGBA toConvert; if (rgba != null) { toConvert = rgba; } else { GdkColor defaultGdkColor = display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND).handle; toConvert = display.toGdkRGBA (defaultGdkColor); } long str = OS.gdk_rgba_to_string (toConvert); int length = OS.strlen (str); byte buffer = new byte [length]; OS.memmove (buffer, str, length); return new String (Converter.mbcsToWcs (null, buffer)); }
Source:
<code>protected Integer doTaskBackground(Void... params) { SqlStorage<FormRecord> storage = CommCareApplication._().getUserStorage(FormRecord.class); Vector<Integer> recordsToRemove = storage.getIDsForValues( new String[]{FormRecord.META_STATUS}, <START> new String[]{FormRecord.STATUS_SAVED}); <END> int numOldRecordsRemoved = recordsToRemove.size(); Vector<Integer> unindexedRecords = storage.getIDsForValues(new String[] { FormRecord.META_STATUS}, new String[] { FormRecord.STATUS_UNINDEXED }); int count = 0; for(int recordID : unindexedRecords) { FormRecord r = storage.read(recordID); try { updateAndWriteUnindexedRecord(context, platform, r, storage); } catch (FileNotFoundException | InvalidStructureException e) { recordsToRemove.add(recordID); } catch(XmlPullParserException | IOException | UnfullfilledRequirementsException e) { } count++; this.publishProgress(count, unindexedRecords.size()); } this.publishProgress(STATUS_CLEANUP); SqlStorage<SessionStateDescriptor> ssdStorage = CommCareApplication._().getUserStorage(SessionStateDescriptor.class); for(int recordID : recordsToRemove) { wipeRecord(context, -1, recordID, storage, ssdStorage); } int totalRecordsRemoved = recordsToRemove.size(); Log.d(TAG, "Synced: " + unindexedRecords.size() + ". Removed: " + numOldRecordsRemoved + " old records, and " + (totalRecordsRemoved - numOldRecordsRemoved) + " busted new ones"); return SUCCESS; }</code><technical_language>this app specific well</technical_language>

Target:
protected Integer doTaskBackground(Void... params) { SqlStorage<FormRecord> storage = CommCareApplication._().getUserStorage(FormRecord.class); String currentAppId = CommCareApplication._().getCurrentApp().getAppRecord().getApplicationId(); Vector<Integer> recordsToRemove = storage.getIDsForValues( new String[]{FormRecord.META_STATUS, FormRecord.META_APP_ID}, new String[]{FormRecord.STATUS_SAVED, currentAppId}); int numOldRecordsRemoved = recordsToRemove.size(); Vector<Integer> unindexedRecords = storage.getIDsForValues(new String[] { FormRecord.META_STATUS}, new String[] { FormRecord.STATUS_UNINDEXED }); int count = 0; for(int recordID : unindexedRecords) { FormRecord r = storage.read(recordID); try { updateAndWriteUnindexedRecord(context, platform, r, storage); } catch (FileNotFoundException | InvalidStructureException e) { recordsToRemove.add(recordID); } catch(XmlPullParserException | IOException | UnfullfilledRequirementsException e) { } count++; this.publishProgress(count, unindexedRecords.size()); } this.publishProgress(STATUS_CLEANUP); SqlStorage<SessionStateDescriptor> ssdStorage = CommCareApplication._().getUserStorage(SessionStateDescriptor.class); for(int recordID : recordsToRemove) { wipeRecord(context, -1, recordID, storage, ssdStorage); } int totalRecordsRemoved = recordsToRemove.size(); Log.d(TAG, "Synced: " + unindexedRecords.size() + ". Removed: " + numOldRecordsRemoved + " old records, and " + (totalRecordsRemoved - numOldRecordsRemoved) + " busted new ones"); return SUCCESS; }
Source:
<code>public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CheckpointStatistics that = (CheckpointStatistics) o; return id == that.id && savepoint == that.savepoint && triggerTimestamp == that.triggerTimestamp && latestAckTimestamp == that.latestAckTimestamp && stateSize == that.stateSize && duration == that.duration && alignmentBuffered == that.alignmentBuffered && numSubtasks == that.numSubtasks && numAckSubtasks == that.numAckSubtasks && status == that.status && <START> Objects.equals(checkPointType, that.checkPointType) && <END> Objects.equals(checkpointStatisticsPerTask, that.checkpointStatisticsPerTask); }</code><technical_language>suggestion Objects.equals(checkPointType, that.checkpointType) &&</technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CheckpointStatistics that = (CheckpointStatistics) o; return id == that.id && savepoint == that.savepoint && triggerTimestamp == that.triggerTimestamp && latestAckTimestamp == that.latestAckTimestamp && stateSize == that.stateSize && duration == that.duration && alignmentBuffered == that.alignmentBuffered && processedData == processedData && persistedData == that.persistedData && numSubtasks == that.numSubtasks && numAckSubtasks == that.numAckSubtasks && status == that.status && Objects.equals(checkpointType, that.checkpointType) && Objects.equals(checkpointStatisticsPerTask, that.checkpointStatisticsPerTask); }
Source:
<code><START> public String toString() { <END> final StringBuffer buffer = new StringBuffer(); boolean addPlus = false; for (final Vector.Element element : parameters.nonZeroes()) { if (addPlus) { buffer.append(" + "); } buffer.append(String.valueOf(element.get())); final int index = element.index(); if (index != parameters.size() - 1) { buffer.append(String.format("x%d", index + 1)); } addPlus = true; } return buffer.toString(); }</code><technical_language>Do a well-defined format for printing out a model</technical_language>

Target:
public String toString() { final StringBuffer buffer = new StringBuffer(); boolean addPlus = false; for (final Vector.Element element : parameters.nonZeroes()) { if (addPlus) { buffer.append(" + "); } buffer.append(String.format("%e", element.get())); final int index = element.index(); if (index != parameters.size() - 1) { buffer.append(String.format(" * x%d", index + 1)); } addPlus = true; } return buffer.toString(); }
Source:
<code>public static void logWarning(final String message, final Throwable thr) { <START> getDefault().getLog().log(warning(message, thr)); <END> }</code><technical_language>handleIssue(IStatus.WARNING, message, thr, false); do trick. do need warning(...) all? If want provide for symmetry createErrorStatus() methods below, named createWarningStatus, implemented toStatus()</technical_language>

Target:
public static void logWarning(final String message, final Throwable thr) { handleIssue(IStatus.WARNING, message, thr, false); }
Source:
<code>public void log() { <START> Set<Map.Entry<Object, Object>> properties = internalProperties.entrySet(); <END> for (Map.Entry property : properties) { LOG.debug("Dolphin Platform starts with value for " + property.getKey() + " = " + property.getValue()); } }</code><technical_language>final</technical_language>

Target:
public void log() { final Set<Map.Entry<Object, Object>> properties = internalProperties.entrySet(); for (Map.Entry property : properties) { LOG.debug("Dolphin Platform starts with value for " + property.getKey() + " = " + property.getValue()); } }
Source:
<code>public void executeQueryFromExecutor(RequestScope scope) { log.info("AsyncExecutorService executor object: {}", asyncExecutorService); <START> asyncExecutorService.executeQuery(query, queryType, scope.getUser(), id); <END> }</code><technical_language>pass Query object in instead of breaking out params for it</technical_language>

Target:
public void executeQueryFromExecutor(RequestScope scope) { asyncExecutorService.executeQuery(this, scope.getUser()); }
Source:
<code>public String logout(RequestContext requestContext) { HttpSession session = requestContext.getRequest().getSession(false); <START> String logoutUrl = "<LINK_0>"; <END> if (!isLoggedInToGoogle(session)) { return null; } else { try { return String.format(GOOGLE_LOGOUT_URL, logoutUrl); } finally { setGoogleLoggedIn(session, false); } } }</code><technical_language>unhardcode</technical_language>

Target:
public String logout(RequestContext requestContext) { HttpSession session = requestContext.getRequest().getSession(false); String logoutUrl = String.format("%s/users/logout.page", getBaseUrl(requestContext)); if (!isLoggedInToGoogle(session)) { return null; } else { try { return String.format(GOOGLE_LOGOUT_URL, logoutUrl); } finally { setGoogleLoggedIn(session, false); } } }
Source:
<code>public void loadScript(String scriptIdentifier, InputStreamReader scriptData) { ScriptEngineContainer container = loadedScriptEngineInstances.get(scriptIdentifier); if (container == null) { logger.error("could not load script as no engine is created"); } else { ScriptEngine engine = container.getScriptEngine(); try { engine.eval(scriptData); if (engine instanceof Invocable) { Invocable inv = (Invocable) engine; try { inv.invokeFunction("scriptLoaded", scriptIdentifier); } catch (NoSuchMethodException e) { <START> logger.trace("scriptLoaded() not defined in script: " + scriptIdentifier); <END> } } else { logger.trace("engine does not support Invocable interface"); } } catch (Exception ex) { logger.error("Error during Script evaluation {}", scriptIdentifier, ex); } } }</code><technical_language>parameterized logging</technical_language>

Target:
public void loadScript(String scriptIdentifier, InputStreamReader scriptData) { ScriptEngineContainer container = loadedScriptEngineInstances.get(scriptIdentifier); if (container == null) { logger.error("could not load script as no engine is created"); } else { ScriptEngine engine = container.getScriptEngine(); try { engine.eval(scriptData); if (engine instanceof Invocable) { Invocable inv = (Invocable) engine; try { inv.invokeFunction("scriptLoaded", scriptIdentifier); } catch (NoSuchMethodException e) { logger.trace("scriptLoaded() not defined in script: {}", scriptIdentifier); } } else { logger.trace("engine does not support Invocable interface"); } } catch (Exception ex) { logger.error("Error during Script evaluation {}", scriptIdentifier, ex); } } }
Source:
<code>public Integer next() { <START> return next++; <END> }</code><technical_language>invoke next() infinite</technical_language>

Target:
public Integer next() { if (next >= size) { throw new NoSuchElementException(); } return next++; }
Source:
<code>public @ResponseBody String doesRecipientExist(HttpSession session, @RequestParam(value = "recipient") String username) { if (session.getAttribute("member") == null) <START> return "redirect:../denied"; <END> MemberDao memberDao = new MemberDao(); Member member = memberDao.getMemberByUsername(username); String isValid; if (member == null) { isValid = "{ \"valid\": false }"; } else { isValid = "{ \"valid\": true }"; } return isValid; }</code><technical_language>/denied works instead of working relative paths</technical_language>

Target:
public @ResponseBody String doesRecipientExist( HttpSession session, @RequestParam(value = "recipient") String username) { if (session.getAttribute("member") == null) return "redirect:/denied"; MemberDao memberDao = new MemberDao(); Member member = memberDao.getMemberByUsername(username); String isValid; if (member == null) { isValid = "{ \"valid\": false }"; } else { isValid = "{ \"valid\": true }"; } return isValid; }
Source:
<code>public synchronized void commit() throws SQLException { try { debugCodeCall("commit"); checkClosedForWrite(); if (SysProperties.FORCE_AUTOCOMMIT_OFF_ON_COMMIT && getAutoCommit()) { <START> throw DbException.get(ErrorCode.METHOD_DISABLED_ON_AUTOCOMMIT_TRUE, "COMMIT"); <END> } try { commit = prepareCommand("COMMIT", commit); commit.executeUpdate(false); } finally { afterWriting(); } } catch (Exception e) { throw logAndConvert(e); } }</code><technical_language>mention name of method "commit()"</technical_language>

Target:
public synchronized void commit() throws SQLException { try { debugCodeCall("commit"); checkClosedForWrite(); if (SysProperties.FORCE_AUTOCOMMIT_OFF_ON_COMMIT && getAutoCommit()) { throw DbException.get(ErrorCode.METHOD_DISABLED_ON_AUTOCOMMIT_TRUE, "commit()"); } try { commit = prepareCommand("COMMIT", commit); commit.executeUpdate(false); } finally { afterWriting(); } } catch (Exception e) { throw logAndConvert(e); } }
Source:
<code>private void ensureStorageFormatInitialized() { StorageDomain sd = getStorageDomain(); if (sd.getStorageFormat() == null) { if (sd.getStorageDomainType().isDataDomain()) { StoragePool sp = getTargetStoragePool(); if (sp != null) { sd.setStorageFormat(VersionStorageFormatUtil.getPreferredForVersion( sp.getcompatibility_version(), sd.getStorageType()) ); <START> } else { <END> if (sd.getStorageType().isBlockDomain()) { sd.setStorageFormat(StorageFormatType.V2); } else { sd.setStorageFormat(StorageFormatType.V1); } } } else { sd.setStorageFormat(StorageFormatType.V1); } } }</code><technical_language>missed patchset, current code if getTargetStoragePool() return null fail CDA isStorageFormatSupportedByStoragePool() point in else clause here. else is awkward here, close f2f update in here</technical_language>

Target:
private void ensureStorageFormatInitialized() { StorageDomain sd = getStorageDomain(); if (sd.getStorageFormat() == null) { if (sd.getStorageDomainType().isDataDomain()) { StoragePool sp = getTargetStoragePool(); if (sp != null) { sd.setStorageFormat(VersionStorageFormatUtil.getPreferredForVersion( sp.getcompatibility_version(), sd.getStorageType()) ); } } else { sd.setStorageFormat(StorageFormatType.V1); } } }
Source:
<code>public static GridCellEditAction getSupportedEditAction(final AbstractNodeMouseEvent event) { <START> return Arrays.asList(values()) <END> .stream() .filter(action -> Objects.equals(action.eventClass, event.getClass())) .findFirst() .orElse(NONE); }</code><technical_language>simplify this calling stream(..) method: suggestion return Arrays.stream(values())</technical_language>

Target:
public static GridCellEditAction getSupportedEditAction(final AbstractNodeMouseEvent event) { return Arrays.stream(values()) .filter(action -> Objects.equals(action.eventClass, event.getClass())) .findFirst() .orElse(NONE); }
Source:
<code>public static void resetSession(H2PooledConnection conn) { Session s = session(conn); <START> s.setVariable("IGNITE_QUERY_CONTEXT", ValueNull.INSTANCE); <END> }</code><technical_language>QCTX_VARIABLE_NAME</technical_language>

Target:
public static void resetSession(H2PooledConnection conn) { Session s = session(conn); s.setVariable(QCTX_VARIABLE_NAME, ValueNull.INSTANCE); }
Source:
<code>public void setupUserStatusToggle() { userStatusToggle = mNavigationHeader.findViewById(R.id.user_status_toggle); if (PrefManager.getUserStatus() == Constants.USER_OFFLINE) { userStatusToggle.setChecked(true); } userStatusToggle.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (PrefManager.getUserStatus() == Constants.USER_OFFLINE) { PrefManager.setUserStatus(Constants.USER_ONLINE); Toaster.show(mNavigationHeader, R.string.online_mode, Toaster.SHORT); userStatusToggle.setChecked(false); } else { PrefManager.setUserStatus(Constants.USER_OFFLINE); <START> Toaster.show(mNavigationHeader, R.string.offline_mode, Toaster.SHORT); <END> userStatusToggle.setChecked(true); } } }); }</code><technical_language>I this message is kind of redundant change of switch's color in Online Offline mode. if change switch's title "Offline mode " "Online Mode" is add a summary do in Switch Preferences</technical_language>

Target:
public void setupUserStatusToggle() { userStatusToggle = mNavigationHeader.findViewById(R.id.user_status_toggle); if (PrefManager.getUserStatus() == Constants.USER_OFFLINE) { userStatusToggle.setChecked(true); } userStatusToggle.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (PrefManager.getUserStatus() == Constants.USER_OFFLINE) { PrefManager.setUserStatus(Constants.USER_ONLINE); userStatusToggle.setText(R.string.online_mode); userStatusToggle.setChecked(false); } else { PrefManager.setUserStatus(Constants.USER_OFFLINE); userStatusToggle.setText(R.string.offline_mode); userStatusToggle.setChecked(true); } } }); }
Source:
<code><START> public static void tearDownAfterClass() throws Exception { <END> file.delete(true, new NullProgressMonitor()); project.delete(true, new NullProgressMonitor()); }</code><technical_language>code in CompletionTest. Consider pulling out a static util method</technical_language>

Target:
public static void tearDownAfterClass() throws Exception { GenericEditorTestUtils.tearDownAfterClass(); }
Source:
<code>public void remoteCallsStillMadeIfPingableLeader404s() throws IOException, InterruptedException { availableServer.stubFor(LEADER_UUID_MAPPING.willReturn(aResponse().withStatus(404))); when(config.leader()).thenReturn(Optional.of(ImmutableLeaderConfig.builder() .localServer(getUriForPort(availablePort)) .addLeaders(getUriForPort(availablePort)) .acceptorLogDir(temporaryFolder.newFolder()) .learnerLogDir(temporaryFolder.newFolder()) .quorumSize(1) .build())); TransactionManagers.LockAndTimestampServices lockAndTimestampServices = TransactionManagers.createLockAndTimestampServices( config, environment, LockServiceImpl::create, InMemoryTimestampService::new, invalidator, USER_AGENT); availableServer.verify(getRequestedFor(urlMatching(LEADER_UUID_PATH))); <START> lockAndTimestampServices.timestamp().getFreshTimestamp(); <END> lockAndTimestampServices.lock().currentTimeMillis(); availableServer.verify(postRequestedFor(urlMatching(TIMESTAMP_PATH)) .withHeader(USER_AGENT_HEADER, WireMock.equalTo(USER_AGENT))); availableServer.verify(postRequestedFor(urlMatching(LOCK_PATH)) .withHeader(USER_AGENT_HEADER, WireMock.equalTo(USER_AGENT))); }</code><technical_language>this timelock (probably happened part of merge conflict resolution)</technical_language>

Target:
public void remoteCallsStillMadeIfPingableLeader404s() throws IOException, InterruptedException { availableServer.stubFor(LEADER_UUID_MAPPING.willReturn(aResponse().withStatus(404))); when(config.leader()).thenReturn(Optional.of(ImmutableLeaderConfig.builder() .localServer(getUriForPort(availablePort)) .addLeaders(getUriForPort(availablePort)) .acceptorLogDir(temporaryFolder.newFolder()) .learnerLogDir(temporaryFolder.newFolder()) .quorumSize(1) .build())); TransactionManagers.LockAndTimestampServices lockAndTimestampServices = TransactionManagers.createLockAndTimestampServices( config, environment, LockServiceImpl::create, InMemoryTimestampService::new, invalidator, USER_AGENT); availableServer.verify(getRequestedFor(urlMatching(LEADER_UUID_PATH))); lockAndTimestampServices.timelock().getFreshTimestamp(); lockAndTimestampServices.lock().currentTimeMillis(); availableServer.verify(postRequestedFor(urlMatching(TIMESTAMP_PATH)) .withHeader(USER_AGENT_HEADER, WireMock.equalTo(USER_AGENT))); availableServer.verify(postRequestedFor(urlMatching(LOCK_PATH)) .withHeader(USER_AGENT_HEADER, WireMock.equalTo(USER_AGENT))); }
Source:
<code>protected void paintComponent(Graphics g) { if(isIndeterminate()){ <START> } <END> final int width = getWidth(); final int height = getHeight(); if (isOpaque()) { g.setColor(WidgetUtils.BG_COLOR_DARK); g.fillRect(0, 0, width, height); } final int barWidth; if(isIndeterminate()){ barWidth = 0; } else { barWidth = getBarWidth(getValue()); } if (barWidth > 0) { g.setColor(_progressBarColor); g.fillRect(0, 0, barWidth, height / 2); g.setColor(WidgetUtils.slightlyDarker(_progressBarColor)); g.fillRect(0, height / 2, barWidth, height / 2); g.setColor(WidgetUtils.slightlyBrighter(_progressBarColor)); g.drawRect(0, 0, barWidth, height); } }</code><technical_language>I this removed ;)</technical_language>

Target:
protected void paintComponent(Graphics g) { final int width = getWidth(); final int height = getHeight(); if (isOpaque()) { g.setColor(WidgetUtils.BG_COLOR_DARK); g.fillRect(0, 0, width, height); } final int barWidth; if (isIndeterminate()) { barWidth = 0; } else { barWidth = getBarWidth(getValue()); } if (barWidth > 0) { g.setColor(_progressBarColor); g.fillRect(0, 0, barWidth, height / 2); g.setColor(WidgetUtils.slightlyDarker(_progressBarColor)); g.fillRect(0, height / 2, barWidth, height / 2); g.setColor(WidgetUtils.slightlyBrighter(_progressBarColor)); g.drawRect(0, 0, barWidth, height); } }
Source:
<code>public static String parseModelId(String operationLocation) { if (!CoreUtils.isNullOrEmpty(operationLocation)) { <START> return operationLocation.substring(operationLocation.lastIndexOf('/') + 1); <END> } throw LOGGER.logExceptionAsError(new RuntimeException("Failed to parse operation header for result Id.")); }</code><technical_language>if a / in String</technical_language>

Target:
public static String parseModelId(String operationLocation) { if (!CoreUtils.isNullOrEmpty(operationLocation)) { int lastIndex = operationLocation.lastIndexOf('/'); if (lastIndex != -1) { return operationLocation.substring(lastIndex + 1); } } throw LOGGER.logExceptionAsError( new RuntimeException("Failed to parse operation header for result Id from: " + operationLocation)); }
Source:
<code>public void deleteCartInStoreWithDataErasure() { <START> StoreFixtures.withStore(client(), store -> { <END> final CartDraft cartDraft = CartDraft.of(EUR).withCountry(DE); final Cart cart = client().executeBlocking(CartInStoreCreateCommand.of(store.getKey(), cartDraft)); assertThat(cart).isNotNull(); assertThat(cart.getStore()).isNotNull(); assertThat(cart.getStore().getKey()).isEqualTo(store.getKey()); client().executeBlocking(CartInStoreDeleteCommand.of(store.getKey(), cart, true)); PagedQueryResult<Cart> result = client().executeBlocking(CartQuery.of().withPredicates(cartQueryModel -> cartQueryModel.id().is(cart.getId()))); assertThat(result.getResults().size()).isZero(); }); }</code><technical_language>nice a static import - more consistent other code</technical_language>

Target:
public void deleteCartInStoreWithDataErasure() { withStore(client(), store -> { final CartDraft cartDraft = CartDraft.of(EUR).withCountry(DE); final Cart cart = client().executeBlocking(CartInStoreCreateCommand.of(store.getKey(), cartDraft)); assertThat(cart).isNotNull(); assertThat(cart.getStore()).isNotNull(); assertThat(cart.getStore().getKey()).isEqualTo(store.getKey()); client().executeBlocking(CartInStoreDeleteCommand.of(store.getKey(), cart, true)); PagedQueryResult<Cart> result = client().executeBlocking(CartQuery.of().withPredicates(cartQueryModel -> cartQueryModel.id().is(cart.getId()))); assertThat(result.getResults().size()).isZero(); }); }
Source:
<code>public void run() { ConfigContext config = buildConfig(); if (usingEncryption) { config = buildEncryptionConfig(); } try (MantaClient client = new MantaClient(config)) { if (inferOutputFileName) { outputFileName = MantaUtils.lastItemInPath(filePath); } final MantaHttpHeaders headers = new MantaHttpHeaders(); <START> headers.setByteRange(startBytes, endBytes); <END> if (outputFileName != null) { try (OutputStream out = new FileOutputStream(outputFileName); MantaObjectInputStream objectStream = client.getAsInputStream(filePath, headers)) { IOUtils.copyLarge(objectStream, out); out.flush(); } catch (IOException e) { throw new UncheckedIOException(e); } } } }</code><technical_language>This needs this range options required: if (startBytes != null) { headers.setByteRange(startBytes, endBytes); }</technical_language>

Target:
public void run() { ConfigContext config = buildConfig(); if (usingEncryption) { config = buildEncryptionConfig(); } try (MantaClient client = new MantaClient(config)) { if (inferOutputFileName) { outputFileName = MantaUtils.lastItemInPath(filePath); } MantaHttpHeaders headers = new MantaHttpHeaders(); if (startBytes != null) { headers.setByteRange(startBytes, endBytes); } if (outputFileName != null) { try (OutputStream out = new FileOutputStream(outputFileName); MantaObjectInputStream objectStream = client.getAsInputStream(filePath, headers)) { IOUtils.copyLarge(objectStream, out); out.flush(); } catch (IOException e) { throw new UncheckedIOException(e); } } } }
Source:
<code><START> public void testParseDeleteSkipTrash() { <END> DistCpOptions options = OptionsParser.parse(new String[] { "-overwrite", "-delete", "-useTrash", "hdfs://localhost:8020/source/first", "hdfs://localhost:8020/target/"}); Assert.assertTrue(options.shouldDeleteUseTrash()); options = OptionsParser.parse(new String[] { "-overwrite", "-delete", "hdfs://localhost:8020/source/first", "hdfs://localhost:8020/target/"}); Assert.assertFalse(options.shouldDeleteUseTrash()); }</code><technical_language>again, asserts need messages</technical_language>

Target:
public void testParseDeleteSkipTrash() { DistCpOptions options = OptionsParser.parse(new String[] { "-overwrite", "-delete", "-useTrash", "hdfs://localhost:8020/source/first", "hdfs://localhost:8020/target/"}); Assert.assertTrue("Delete with useTrash.", options.shouldDeleteUseTrash()); options = OptionsParser.parse(new String[] { "-overwrite", "-delete", "hdfs://localhost:8020/source/first", "hdfs://localhost:8020/target/"}); Assert.assertFalse("Delete does not use trash.", options.shouldDeleteUseTrash()); }
Source:
<code>private void checkImageTarget() { if (getVm().getOrigin() == OriginType.KVM && getActionState() == CommandActionState.EXECUTE) { StorageDomain domain = storageDomainDao.get(getStorageDomainId()); for (DiskImage image : getVm().getImages()) { if (domain.getStorageType().isBlockDomain()) { image.setActualSizeInBytes(image.getSize()); <START> } <END> } } }</code><technical_language>making a bit more declarative: if (domain.getStorageType().isBlockDomain()) { getVm().getImages().forEach(image -> image.setActualSizeInBytes(image.getSize())); }</technical_language>

Target:
private void checkImageTarget() { if (getVm().getOrigin() == OriginType.KVM && getActionState() == CommandActionState.EXECUTE) { StorageDomain domain = storageDomainDao.get(getStorageDomainId()); if (domain.getStorageType().isBlockDomain()) { getVm().getImages().forEach(image -> image.setActualSizeInBytes(image.getSize())); } } }
Source:
<code>public Future<Void> asynchronousPreInitializationEventHandler(FMLPreInitializationEvent e) { <START> CompletableFuture[] futures = Stream.of(1,2,3,4,5,6,7,8,9,10) <END> .map(i -> CompletableFuture.runAsync(AsynchronousEventHandlerTest::doSomeStuffThatTakesALongTime)) .collect(Collectors.toList()) .toArray(new CompletableFuture[10]); return CompletableFuture.allOf(futures); }</code><technical_language>IntStream.range(0, 10).map()</technical_language>

Target:
public Future<Void> asynchronousPreInitializationEventHandler(FMLPreInitializationEvent e) { CompletableFuture[] futures = IntStream.range(1, 10) .boxed() .map(i -> CompletableFuture.runAsync(AsynchronousEventHandlerTest::doSomeStuffThatTakesALongTime)) .collect(Collectors.toList()) .toArray(new CompletableFuture[10]); return CompletableFuture.allOf(futures); }
Source:
<code>private static void validateRequestMethod(HttpServletRequest req) throws MethodNotAllowedException { <START> if (!"GET".equals(req.getMethod()) && !"HEAD".equals(req.getMethod())) { <END> throw new MethodNotAllowedException(); } }</code><technical_language>Or: if (!(req.getMethod().equals("GET") || req.getMethod().equals("HEAD")))</technical_language>

Target:
private static void validateRequestMethod(HttpServletRequest req) throws MethodNotAllowedException { if (!("GET".equals(req.getMethod()) || "HEAD".equals(req.getMethod()))) { throw new MethodNotAllowedException(); } }
Source:
<code>private KieCompilationResponse compileAndLoadKieJarMetadataAllResourcesPackagedJar() { String alternateSettingsAbsPath = TestUtilMaven.getSettingsFile(); <START> ; <END> Path tmpRoot = Files.createTempDirectory("repo_" + UUID.randomUUID().toString()); Path tmp = Files.createDirectories(Paths.get(tmpRoot.toString(), "dummy")); try { TestUtil.copyTree(Paths.get(ResourcesConstants.KJAR_2_ALL_RESOURCES), tmp); } catch (Exception e) { logger.error(e.getMessage()); } final AFCompiler compiler = KieMavenCompilerFactory.getCompiler(KieDecorator.KIE_AND_LOG_AFTER); final WorkspaceCompilationInfo info = new WorkspaceCompilationInfo(tmp); final CompilationRequest req = new DefaultCompilationRequest(mavenRepo, info, new String[]{ MavenCLIArgs.COMPILE, MavenCLIArgs.ALTERNATE_USER_SETTINGS + alternateSettingsAbsPath }, Boolean.FALSE); final KieCompilationResponse res = (KieCompilationResponse) compiler.compile(req); logger.info("\nFinished " + res.isSuccessful() + " all Metadata tmp:" + tmp + " UUID:" + req.getRequestUUID() + " res.getMavenOutput().isEmpty():" + res.getMavenOutput().isEmpty()); if (!res.isSuccessful()) { try { logger.error("writing output on target folder:" + tmp); TestUtil.writeMavenOutputIntoTargetFolder(tmp, res.getMavenOutput(), "ConcurrentBuildTest.compileAndLoadKieJarMetadataAllResourcesPackagedJar_" + req.getRequestUUID()); } catch (Exception e) { logger.error(e.getMessage()); } } latch.countDown(); return res; }</code><technical_language>nitpick: redundant ';'</technical_language>

Target:
private KieCompilationResponse compileAndLoadKieJarMetadataAllResourcesPackagedJar() { String alternateSettingsAbsPath = TestUtilMaven.getSettingsFile(); Path tmpRoot = Files.createTempDirectory("repo_" + UUID.randomUUID().toString()); Path tmp = Files.createDirectories(Paths.get(tmpRoot.toString(), "dummy")); try { TestUtil.copyTree(Paths.get(ResourcesConstants.KJAR_2_ALL_RESOURCES), tmp); } catch (Exception e) { logger.error(e.getMessage()); } final AFCompiler compiler = KieMavenCompilerFactory.getCompiler(KieDecorator.KIE_AND_LOG_AFTER); final WorkspaceCompilationInfo info = new WorkspaceCompilationInfo(tmp); final CompilationRequest req = new DefaultCompilationRequest(mavenRepo, info, new String[]{ MavenCLIArgs.COMPILE, MavenCLIArgs.ALTERNATE_USER_SETTINGS + alternateSettingsAbsPath }, Boolean.FALSE); final KieCompilationResponse res = (KieCompilationResponse) compiler.compile(req); logger.info("\nFinished " + res.isSuccessful() + " all Metadata tmp:" + tmp + " UUID:" + req.getRequestUUID() + " res.getMavenOutput().isEmpty():" + res.getMavenOutput().isEmpty()); if (!res.isSuccessful()) { try { logger.error("writing output on target folder:" + tmp); TestUtil.writeMavenOutputIntoTargetFolder(tmp, res.getMavenOutput(), "ConcurrentBuildTest.compileAndLoadKieJarMetadataAllResourcesPackagedJar_" + req.getRequestUUID()); } catch (Exception e) { logger.error(e.getMessage()); } } latch.countDown(); return res; }
Source:
<code>public ListenableFuture<PartitionedConsumption<Supplier<LookupSource>>> finishProbeOperator(OptionalInt lookupJoinsCount) { rwLock.writeLock().lock(); try { if (!spillingInfo.hasSpilled()) { finishedProbeOperators++; return immediateFuture(new PartitionedConsumption<>(1, emptyList(), i -> { throw new UnsupportedOperationException(); <START> }, i -> { <END> })); } int operatorsCount = lookupJoinsCount .orElseThrow(() -> new IllegalStateException("Indeterminate number of LookupJoinOperator-s when using spill to disk. This is a bug.")); checkState(finishedProbeOperators < operatorsCount, "%s probe operators finished out of %s declared", finishedProbeOperators + 1, operatorsCount); if (!partitionedConsumptionParticipants.isPresent()) { partitionedConsumptionParticipants = OptionalInt.of(operatorsCount - finishedProbeOperators); } finishedProbeOperators++; if (finishedProbeOperators == operatorsCount) { freePartitions(); verify(!partitionedConsumption.isDone()); partitionedConsumption.set(new PartitionedConsumption<>( partitionedConsumptionParticipants.getAsInt(), spilledPartitions.keySet(), this::loadSpilledLookupSource, this::disposeSpilledLookupSource)); } return partitionedConsumption; } finally { rwLock.writeLock().unlock(); } }</code><technical_language>formatting is also... arg line i -> {})); line</technical_language>

Target:
public ListenableFuture<PartitionedConsumption<Supplier<LookupSource>>> finishProbeOperator(OptionalInt lookupJoinsCount) { lock.writeLock().lock(); try { if (!spillingInfo.hasSpilled()) { finishedProbeOperators++; return immediateFuture(new PartitionedConsumption<>( 1, emptyList(), i -> { throw new UnsupportedOperationException(); }, i -> {})); } int operatorsCount = lookupJoinsCount .orElseThrow(() -> new IllegalStateException("A fixed distribution is required for JOIN when spilling is enabled")); checkState(finishedProbeOperators < operatorsCount, "%s probe operators finished out of %s declared", finishedProbeOperators + 1, operatorsCount); if (!partitionedConsumptionParticipants.isPresent()) { partitionedConsumptionParticipants = OptionalInt.of(operatorsCount - finishedProbeOperators); } finishedProbeOperators++; if (finishedProbeOperators == operatorsCount) { freePartitions(); verify(!partitionedConsumption.isDone()); partitionedConsumption.set(new PartitionedConsumption<>( partitionedConsumptionParticipants.getAsInt(), spilledPartitions.keySet(), this::loadSpilledLookupSource, this::disposeSpilledLookupSource)); } return partitionedConsumption; } finally { lock.writeLock().unlock(); } }
Source:
<code>public void testConsistentIdConfiguredInIgniteCfgAndJvmProp() throws Exception { defConsistentId = "IgniteCfg consistent id"; String specificConsistentId = "JvmProp consistent id"; System.setProperty(IgniteSystemProperties.IGNITE_CONSISTENT_ID, specificConsistentId); Ignite ignite = startGrid(0); assertEquals(specificConsistentId, ignite.configuration().getConsistentId()); assertEquals(specificConsistentId, ignite.cluster().localNode().consistentId()); <START> info("Consistent id in that case: " + ignite.cluster().localNode().consistentId()); <END> }</code><technical_language>suggestion info("Consistent ID: " + ignite.cluster().localNode().consistentId());</technical_language>

Target:
public void testConsistentIdConfiguredInIgniteCfgAndJvmProp() throws Exception { defConsistentId = "IgniteCfg consistent id"; String specificConsistentId = "JvmProp consistent id"; System.setProperty(IgniteSystemProperties.IGNITE_OVERRIDE_CONSISTENT_ID, specificConsistentId); Ignite ignite = startGrid(0); assertEquals(specificConsistentId, ignite.configuration().getConsistentId()); assertEquals(specificConsistentId, ignite.cluster().localNode().consistentId()); info("Consistent ID: " + ignite.cluster().localNode().consistentId()); }
Source:
<code>public int hashCode() { <START> return Objects.hash(fEntry, fTime, fDuration, getValue()); <END> }</code><technical_language>Active properties ignored? Is this OK</technical_language>

Target:
public int hashCode() { return Objects.hash(fEntry, fTime, fDuration, getValue(), getActiveProperties()); }
Source:
<code>private ExecRow getIndexRow(int i, ExecRow locatedRow) throws StandardException { int col = 1; <START> for (int j = 0; i< sortedIndexRowColMap[i].length;j++) { <END> indexRows[i].setColumn(col, locatedRow.getColumn(sortedIndexRowColMap[i][j])); col++; } indexRows[i].setKey(locatedRow.getKey()); return indexRows[i]; }</code><technical_language>j < length</technical_language>

Target:
private ExecRow getIndexRow(int i, ExecRow locatedRow) throws StandardException { int col = 1; for (int j = 0; j< sortedIndexRowColMap[i].length;j++) { indexRows[i].setColumn(col, locatedRow.getColumn(sortedIndexRowColMap[i][j])); col++; } indexRows[i].setKey(locatedRow.getKey()); return indexRows[i]; }
Source:
<code>public static int getSimpleType(Type type){ int tc = type.getTypeCode(); switch(tc){ case Type.POINT: case Type.MULTIPOINT: return POINT; case Type.LINESTRING: case Type.MULTILINESTRING: return LINE; case Type.POLYGON: case Type.MULTIPOLYGON: return POLYGON; case Type.GEOMETRYCOLLECTION: case Type.GEOMETRY: return ALL; } <START> throw new IllegalArgumentException("Can't recognize "+tc+" as a geometry type"); <END> }</code><technical_language>putting this in default: case of switch (switches default, know...)</technical_language>

Target:
public static int getSimpleType(Type type){ int tc = type.getTypeCode(); switch(tc){ case Type.POINT: case Type.MULTIPOINT: return POINT; case Type.LINESTRING: case Type.MULTILINESTRING: return LINE; case Type.POLYGON: case Type.MULTIPOLYGON: return POLYGON; case Type.GEOMETRYCOLLECTION: case Type.GEOMETRY: return ALL; default: throw new IllegalArgumentException("Can't recognize " + tc + " as a geometry type"); } }
Source:
<code>void uploadFiles() { <START> StringBuffer agentPublicIps = new StringBuffer(); <END> if (!isLocal(simulatorProperties)) { List<AgentData> agents = componentRegistry.getAgents(); for (AgentData agentData : agents) { agentPublicIps.append(agentData.getPublicAddress()).append(','); } } String vendor = simulatorProperties.get("VENDOR"); String installFile = getConfigurationFile("install-" + vendor + ".sh").getPath(); for (String versionSpec : clusterLayout.getVersionSpecs()) { LOGGER.info("Installing '" + vendor + "' '" + versionSpec + "' on Agents using " + installFile); new BashCommand(installFile) .addParams(testSuite.getId(), agentPublicIps.toString(), versionSpec) .addEnvironment(simulatorProperties.asMap()) .execute(); LOGGER.info("Successfully installed '" + vendor + "'"); } }</code><technical_language>StringBuilder, synchronization is needed</technical_language>

Target:
void uploadFiles() { StringBuilder agentPublicIps = new StringBuilder(); if (!isLocal(simulatorProperties)) { List<AgentData> agents = componentRegistry.getAgents(); for (AgentData agentData : agents) { agentPublicIps.append(agentData.getPublicAddress()).append(','); } } String vendor = simulatorProperties.get("VENDOR"); String installFile = getConfigurationFile("install-" + vendor + ".sh").getPath(); for (String versionSpec : clusterLayout.getVersionSpecs()) { LOGGER.info("Installing '" + vendor + "' '" + versionSpec + "' on Agents using " + installFile); new BashCommand(installFile) .addParams(testSuite.getId(), agentPublicIps.toString(), versionSpec) .addEnvironment(simulatorProperties.asMap()) .execute(); LOGGER.info("Successfully installed '" + vendor + "'"); } }
Source:
<code>public void createIndexConditions() { if (onCondition != null) { onCondition.createIndexConditions(session, this); if (nestedJoin != null) { onCondition.createIndexConditions(session, nestedJoin); } } if (join != null) { join.createIndexConditions(); <START> } <END> if (nestedJoin != null) { nestedJoin.createIndexConditions(); } }</code><technical_language>this block need end of method, new plans more plans, I suspect largely right, re-ordering is of consequence</technical_language>

Target:
public void createIndexConditions() { if (joinCondition != null) { joinCondition.createIndexConditions(session, this); if (nestedJoin != null) { joinCondition.createIndexConditions(session, nestedJoin); } } if (join != null) { join.createIndexConditions(); } if (nestedJoin != null) { nestedJoin.createIndexConditions(); } }
Source:
<code>GlobalStreamingCommitterOperator( GlobalCommitter<CommT, GlobalCommT> globalCommitter, SimpleVersionedSerializer<GlobalCommT> committableSerializer) { super(globalCommitter, committableSerializer); <START> this.globalCommitter = globalCommitter; <END> this.endOfInput = false; }</code><technical_language>add a checkNotNull for safety</technical_language>

Target:
GlobalStreamingCommitterOperator( GlobalCommitter<CommT, GlobalCommT> globalCommitter, SimpleVersionedSerializer<GlobalCommT> committableSerializer) { super(committableSerializer); this.globalCommitter = checkNotNull(globalCommitter); this.recoveredGlobalCommittables = new ArrayList<>(); this.endOfInput = false; }
Source:
<code>public ShareStatistics(int shareUsageInGB) { this.shareUsageInGB = shareUsageInGB; <START> this.shareUsageInBytes = 0; <END> }</code><technical_language>default this -1 customers difference set empty share</technical_language>

Target:
public ShareStatistics(int shareUsageInGB) { this.shareUsageInGB = shareUsageInGB; this.shareUsageInBytes = -1; }
Source:
<code>void addReplicasToPartition(AmbryPartition partition, List<AmbryReplica> replicas) { <START> ambryPartitionToAmbryReplicas.computeIfAbsent(partition, k -> ConcurrentHashMap.newKeySet()).addAll(replicas); <END> clusterWideAllocatedRawCapacityBytes.getAndAdd(replicas.get(0).getCapacityInBytes() * replicas.size()); }</code><technical_language>I is a computeIfAbsent call here. a case this method called addPartitionIfAbsent is called? Also, if happens, other partition set done (maybe calling addPartitionIfAbsent)</technical_language>

Target:
void addReplicasToPartition(AmbryPartition partition, List<AmbryReplica> replicas) { AmbryPartition currentPartition = addPartitionIfAbsent(partition, replicas.get(0).getCapacityInBytes()); ambryPartitionToAmbryReplicas.compute(currentPartition, (k, v) -> { v.addAll(replicas); return v; }); clusterWideAllocatedRawCapacityBytes.getAndAdd(replicas.get(0).getCapacityInBytes() * replicas.size()); }
Source:
<code>public void testBadMyId() throws Exception { ClientBase.setupTestEnv(); final int CLIENT_PORT_QP1 = PortAssignment.unique(); List<Integer> invalidMyidList = new ArrayList<>(); invalidMyidList.add(-1); invalidMyidList.add(0); invalidMyidList.add(256); invalidMyidList.add(1024); for (Integer myidForCheck : invalidMyidList) { String quorumCfgSection = "server.1=127.0.0.1:" + PortAssignment.unique() + ":" + PortAssignment.unique() + "\nserver." + myidForCheck + "=127.0.0.1:" + PortAssignment.unique() + ":" + PortAssignment.unique(); <START> MainThread q1 = new MainThread(myidForCheck, CLIENT_PORT_QP1, quorumCfgSection); <END> String args[] = new String[1]; args[0] = q1.confFile.toString(); try { q1.start(); q1.main.initializeAndRun(args); Assert.fail("the number of myid must be between 1 and 255."); } catch (QuorumPeerConfig.ConfigException e) { } } }</code><technical_language>Do need setup of this stuff in order test simple validation</technical_language>

Target:
public void testBadMyId() throws Exception { ClientBase.setupTestEnv(); int invalidMyid = 256; final int CLIENT_PORT_QP1 = PortAssignment.unique(); String quorumCfgSection = "server.1=127.0.0.1:" + PortAssignment.unique() + ":" + PortAssignment.unique() + "\nserver." + invalidMyid + "=127.0.0.1:" + PortAssignment.unique() + ":" + PortAssignment.unique(); MainThread q1 = new MainThread(invalidMyid, CLIENT_PORT_QP1, quorumCfgSection); String args[] = new String[1]; args[0] = q1.confFile.toString(); try { q1.start(); q1.main.initializeAndRun(args); Assert.fail("the number of myid must be between 0 and 255."); } catch (QuorumPeerConfig.ConfigException e) { } }