auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void deploy(final GAV gav, final String jarPath, final RepositorySystemSession session) { Artifact jarArtifact = new DefaultArtifact(gav.getGroupId(), gav.getArtifactId(), JAR_ARTIFACT, gav.getVersion()); jarArtifact = jarArtifact.setFile(new File(jarPath)); Artifact pom = null; try { final ZipFile jarFile = new ZipFile(jarArtifact.getFile()); Path target = null; final Enumeration<? extends ZipEntry> entries = jarFile.entries(); while (entries.hasMoreElements()) { ZipEntry entry = entries.nextElement(); if (entry.getName().endsWith("pom.xml")) { final String jarFileName = jarArtifact.getFile().toPath().getFileName().toString(); Path pomDir = Files.createDirectory(tempDir.resolve(jarFileName)); target = Files.createFile(pomDir.resolve(jarFileName.substring(0, jarFileName.length() - 4) + ".pom")); InputStream stream = jarFile.getInputStream(entry); java.nio.file.Files.copy(stream, target, StandardCopyOption.REPLACE_EXISTING); break; } } pom = new SubArtifact(jarArtifact, null, "pom").setFile(target.toFile()); } catch (Exception ex) { <START> pom = null; <END> } try { final InstallRequest installRequest = new InstallRequest(); installRequest.addArtifact(jarArtifact); if (pom != null) { installRequest.addArtifact(pom); } Aether.getAether().getSystem().install(session,installRequest); } catch (InstallationException e) { logger.error(e.getMessage(), e); } }</code><technical_language>please log issues here</technical_language>

Target:
public void deploy(final GAV gav, final String jarPath, final RepositorySystemSession session) { Artifact jarArtifact = new DefaultArtifact(gav.getGroupId(), gav.getArtifactId(), JAR_ARTIFACT, gav.getVersion()); jarArtifact = jarArtifact.setFile(new File(jarPath)); Artifact pom = null; try { final ZipFile jarFile = new ZipFile(jarArtifact.getFile()); Path target = null; final Enumeration<? extends ZipEntry> entries = jarFile.entries(); while (entries.hasMoreElements()) { ZipEntry entry = entries.nextElement(); if (entry.getName().endsWith("pom.xml")) { final String jarFileName = jarArtifact.getFile().toPath().getFileName().toString(); Path pomDir = Files.createDirectory(tempDir.resolve(jarFileName)); target = Files.createFile(pomDir.resolve(jarFileName.substring(0, jarFileName.length() - 4) + ".pom")); InputStream stream = jarFile.getInputStream(entry); java.nio.file.Files.copy(stream, target, StandardCopyOption.REPLACE_EXISTING); break; } } pom = new SubArtifact(jarArtifact, null, "pom").setFile(target.toFile()); } catch (Exception ex) { pom = null; logger.error(ex.getMessage(), ex); } try { final InstallRequest installRequest = new InstallRequest(); installRequest.addArtifact(jarArtifact); if (pom != null) { installRequest.addArtifact(pom); } Aether.getAether().getSystem().install(session, installRequest); } catch (InstallationException e) { logger.error(e.getMessage(), e); } }
Source:
<code>public static ITmfTrace getTrace() { TmfXmlTraceStub trace = new TmfXmlTraceStubNs(); try { IPath filePath = ActivatorTest.getAbsoluteFilePath(CALLSTACK_FILE); IStatus status = trace.validate(null, filePath.toOSString()); if (!status.isOK()) { fail(status.getException().getMessage()); } <START> try { trace.initTrace(null, filePath.toOSString(), TmfEvent.class); } catch (TmfTraceException e) { fail(e.getMessage()); } <END> TmfTraceOpenedSignal signal = new TmfTraceOpenedSignal(null, trace, null); trace.traceOpened(signal); TmfTraceManager.getInstance().traceOpened(signal); return trace; } catch (Exception e) { trace.dispose(); throw new NullPointerException("The trace could not be instantiated" + e.getMessage()); } }</code><technical_language>Nesting try block hard understand block catch/throw what. try extract in a method outer try block handle exception</technical_language>

Target:
public static ITmfTrace getTrace() { TmfXmlTraceStub trace = new TmfXmlTraceStubNs(); try { IPath filePath = ActivatorTest.getAbsoluteFilePath(CALLSTACK_FILE); IStatus status = trace.validate(null, filePath.toOSString()); if (!status.isOK()) { fail(status.getException().getMessage()); } trace.initTrace(null, filePath.toOSString(), TmfEvent.class); TmfTraceOpenedSignal signal = new TmfTraceOpenedSignal(null, trace, null); trace.traceOpened(signal); TmfTraceManager.getInstance().traceOpened(signal); return trace; } catch (Exception e) { trace.dispose(); throw new NullPointerException("The trace could not be instantiated" + e.getMessage()); } }
Source:
<code>public EvalTypeId(IType type, IBinding templateDefinition, ICPPEvaluation... arguments) { super(templateDefinition); fInputType= type; <START> fArguments= arguments == null ? new ICPPEvaluation[0] : arguments; <END> }</code><technical_language>Instead of converting null empty array preferable prevent null passed this constructor. this is done, constructor protected throwing NPE if arguments is null</technical_language>

Target:
public EvalTypeId(IType type, IBinding templateDefinition, ICPPEvaluation... arguments) { super(templateDefinition); Assert.isNotNull(arguments); fInputType= type; fArguments= arguments == null ? new ICPPEvaluation[0] : arguments; }
Source:
<code>public ConfigBuilder writeTo(URI viewUri) { conf.set(KITE_OUTPUT_URI, viewUri.toString()); DatasetRepository viewRepo = Datasets.repositoryFor(viewUri); if (viewRepo instanceof TemporaryRepositoryAccessor) { TemporaryDatasetRepository tempRepo = ((TemporaryRepositoryAccessor) viewRepo).getTemporaryRepository( <START> UUID.randomUUID().toString()); <END> conf.set(KITE_TEMP_REPO_URI, tempRepo.getUri().toString()); } return this; }</code><technical_language>getJobDatasetName instead of UUID unique, easy debug</technical_language>

Target:
public ConfigBuilder writeTo(URI viewUri) { conf.set(KITE_OUTPUT_URI, viewUri.toString()); return this; }
Source:
<code>private CompletableFuture<UserContext> init(Consumer<String> progressCallback) { progressCallback.accept("Retrieving Friends"); return writeSynchronizer.getCurrentWriterData(signer.publicKeyHash, signer.publicKeyHash, wd -> createFileTree(entrie, username, network, crypto.random, crypto.hasher) .thenCompose(root -> { this.entrie = root; return getByPath("/" + username + "/" + "shared") <START> .thenApply(sharedOpt -> { <END> if (!sharedOpt.isPresent()) throw new IllegalStateException("Couldn't find shared folder!"); return buildSharedWithCache(sharedOpt.get(), this::getUserRoot); }); }).thenApply(b -> wd) ).thenApply(res -> this); }</code><technical_language>this thenCompose I</technical_language>

Target:
private CompletableFuture<UserContext> init(Consumer<String> progressCallback) { progressCallback.accept("Retrieving Friends"); return writeSynchronizer.getCurrentWriterData(signer.publicKeyHash, signer.publicKeyHash, wd -> createFileTree(entrie, username, network, crypto.random, crypto.hasher) .thenCompose(root -> { this.entrie = root; return getByPath("/" + username + "/" + "shared") .thenCompose(sharedOpt -> { if (!sharedOpt.isPresent()) throw new IllegalStateException("Couldn't find shared folder!"); return buildSharedWithCache(sharedOpt.get(), this::getUserRoot); }); }).thenApply(b -> wd) ).thenApply(res -> this); }
Source:
<code>public Queue<ControllerAction> getInputQueue() { Queue<ControllerAction> result = new ArrayDeque<>(); <START> result.addAll(queuedActions); <END> queuedActions.clear(); return result; }</code><technical_language>considered skipping line Queue<ControllerAction> result = new ArrayDeque(queuedActions);</technical_language>

Target:
public Queue<ControllerAction> getInputQueue() { Queue<ControllerAction> result = new ArrayDeque<>(queuedActions); queuedActions.clear(); return result; }
Source:
<code><START> private void getTargetResultSet(Configuration conf, byte[] startRow, byte[] stopRow) throws IOException, SQLException { <END> Scan targetScan = targetQueryPlan.getContext().getScan(); targetScan.setAttribute(BaseScannerRegionObserver.SKIP_REGION_BOUNDARY_CHECK, Bytes.toBytes(true)); if(startRow != null) { targetScan.setStartRow(startRow); } if(stopRow != null) { targetScan.setStopRow(stopRow); } ResultIterator targetTableResultIterator = PhoenixMapReduceUtil .initializeIterator(conf, Collections.singletonList(targetScan), targetQueryPlan); targetResultSet = PhoenixMapReduceUtil.initializeResultSet(targetTableResultIterator, targetQueryPlan); targetHasNext = targetResultSet.next(); }</code><technical_language>This API is deprecated. want another one</technical_language>

Target:
private void getTargetResultSet(Configuration conf, byte[] startRow, byte[] stopRow) throws IOException, SQLException { Scan targetScan = targetQueryPlan.getContext().getScan(); if(startRow != null) { targetScan.withStartRow(startRow); } if(stopRow != null) { targetScan.withStopRow(stopRow); } ResultIterator targetTableResultIterator = PhoenixMapReduceUtil .initializeIterator(conf, Collections.singletonList(targetScan), targetQueryPlan); targetResultSet = PhoenixMapReduceUtil.initializeResultSet(targetTableResultIterator, targetQueryPlan); targetHasNext = targetResultSet.next(); }
Source:
<code>public void put(final JmxCollector.Rule rule, final String cacheKey, final MatchedRule matchedRule) { Map<String, MatchedRule> cachedRulesForRule = cachedRules.get(rule); if (cachedRulesForRule == null) { synchronized (cachedRules) { <START> cachedRulesForRule = cachedRules.get(rule); <END> if (cachedRulesForRule == null) { cachedRulesForRule = new ConcurrentHashMap<String, MatchedRule>(); cachedRules.put(rule, cachedRulesForRule); } } } cachedRulesForRule.put(cacheKey, matchedRule); }</code><technical_language>ConcurrentHashMap.putIfAbsent lock. rules config file, this pre-created load a config put</technical_language>

Target:
public void put(final JmxCollector.Rule rule, final String cacheKey, final MatchedRule matchedRule) { Map<String, MatchedRule> cachedRulesForRule = cachedRules.get(rule); cachedRulesForRule.put(cacheKey, matchedRule); }
Source:
<code>public static RelNode createCastRel( final RelNode rel, RelDataType castRowType, boolean rename, RelFactories.ProjectFactory projectFactory) { assert projectFactory != null; RelDataType rowType = rel.getRowType(); if (areRowTypesEqual(rowType, castRowType, rename)) { return rel; } if (rowType.getFieldCount() != castRowType.getFieldCount()) { throw new IllegalArgumentException("Field count is not equal: " + "rowType [" + rowType + "] castRowType [" + castRowType + "]"); <START> } <END> final RexBuilder rexBuilder = rel.getCluster().getRexBuilder(); List<RexNode> castExps; RelNode input; List<RelHint> hints = ImmutableList.of(); if (rel instanceof Project) { final Project project = (Project) rel; castExps = RexUtil.generateCastExpressions( rexBuilder, castRowType, ((Project) rel).getProjects()); input = rel.getInput(0); hints = project.getHints(); } else { castExps = RexUtil.generateCastExpressions( rexBuilder, castRowType, rowType); input = rel; } if (rename) { return projectFactory.createProject(input, hints, castExps, castRowType.getFieldNames()); } else { return projectFactory.createProject(input, hints, castExps, rowType.getFieldNames()); } }</code><technical_language>count is -> counts</technical_language>

Target:
public static RelNode createCastRel( final RelNode rel, RelDataType castRowType, boolean rename, RelFactories.ProjectFactory projectFactory) { assert projectFactory != null; RelDataType rowType = rel.getRowType(); if (areRowTypesEqual(rowType, castRowType, rename)) { return rel; } if (rowType.getFieldCount() != castRowType.getFieldCount()) { throw new IllegalArgumentException("Field counts are not equal: " + "rowType [" + rowType + "] castRowType [" + castRowType + "]"); } final RexBuilder rexBuilder = rel.getCluster().getRexBuilder(); List<RexNode> castExps; RelNode input; List<RelHint> hints = ImmutableList.of(); if (rel instanceof Project) { final Project project = (Project) rel; castExps = RexUtil.generateCastExpressions( rexBuilder, castRowType, ((Project) rel).getProjects()); input = rel.getInput(0); hints = project.getHints(); } else { castExps = RexUtil.generateCastExpressions( rexBuilder, castRowType, rowType); input = rel; } if (rename) { return projectFactory.createProject(input, hints, castExps, castRowType.getFieldNames()); } else { return projectFactory.createProject(input, hints, castExps, rowType.getFieldNames()); } }
Source:
<code>public void initialize(FeaturesRunner runner) { runner.getFeature(TransactionalFeature.class) <START> .addWaiter(deadline -> Framework.getService(BulkService.class).await(Duration.ofMinutes(1))); <END> }</code><technical_language>deadline. interest change</technical_language>

Target:
public void initialize(FeaturesRunner runner) { runner.getFeature(TransactionalFeature.class) .addWaiter(duration -> Framework.getService(BulkService.class).await(duration)); }
Source:
<code>private void initUI() { VBox milestoneDialogBox = createMilestoneDialogBox(); assignedMilestoneBox = createAssignedMilestoneBox(); matchingMilestonesBox = createMatchingMilestonesBox(); inputField = createInputField(); ScrollPane allMilestoneScrollPane = createAllMilestonesScrollPane(); <START> milestoneDialogBox.setSpacing(5); <END> milestoneDialogBox.getChildren().addAll(assignedMilestoneBox, inputField, new Label(TITLE_RESULT), matchingMilestonesBox, new Label(TITLE_ALL), allMilestoneScrollPane); getDialogPane().setContent(milestoneDialogBox); refreshUI(state); Platform.runLater(inputField::requestFocus); }</code><technical_language>this bit createMilestoneDialogBox</technical_language>

Target:
private void initUI() { VBox milestoneDialogBox = createMilestoneDialogBox(); assignedMilestoneBox = createAssignedMilestoneBox(); matchingMilestonesBox = createMatchingMilestonesBox(); inputField = createInputField(); ScrollPane allMilestoneScrollPane = createAllMilestonesScrollPane(); milestoneDialogBox.getChildren().addAll( assignedMilestoneBox, inputField, new Label(TITLE_RESULT), matchingMilestonesBox, new Label(TITLE_ALL), allMilestoneScrollPane); getDialogPane().setContent(milestoneDialogBox); refreshUI(state); Platform.runLater(inputField::requestFocus); }
Source:
<code>protected ResultSet executeQuery() throws SQLException { if (incrementingColumn != null && timestampColumn != null) { Timestamp tsOffset = offset.getTimestampOffset(); Long incOffset = offset.getIncrementingOffset(); Timestamp endTime = new Timestamp(JdbcUtils.getCurrentTimeOnDB(stmt.getConnection(), UTC_CALENDAR).getTime() - timestampDelay); stmt.setTimestamp(1, endTime, UTC_CALENDAR); stmt.setTimestamp(2, tsOffset, UTC_CALENDAR); stmt.setLong(3, incOffset); stmt.setTimestamp(4, tsOffset, UTC_CALENDAR); <START> log.debug("Executing prepared statement with start time value = " + tsOffset.toString() <END> + " end time " + endTime.toString() + " and incrementing value = " + incOffset.toString()); } else if (incrementingColumn != null) { Long incOffset = offset.getIncrementingOffset(); stmt.setLong(1, incOffset); log.debug("Executing prepared statement with incrementing value = {}", incOffset); } else if (timestampColumn != null) { Timestamp tsOffset = offset.getTimestampOffset(); Timestamp endTime = new Timestamp(JdbcUtils.getCurrentTimeOnDB(stmt.getConnection(), UTC_CALENDAR).getTime() - timestampDelay); stmt.setTimestamp(1, tsOffset, UTC_CALENDAR); stmt.setTimestamp(2, endTime, UTC_CALENDAR); log.debug("Executing prepared statement with timestamp value = " + JdbcUtils.formatUTC(tsOffset) + " end time " + JdbcUtils.formatUTC(endTime)); } return stmt.executeQuery(); }</code><technical_language>{}-placeholders instead of string concat</technical_language>

Target:
protected ResultSet executeQuery() throws SQLException { if (incrementingColumn != null && timestampColumn != null) { Timestamp tsOffset = offset.getTimestampOffset(); Long incOffset = offset.getIncrementingOffset(); Timestamp endTime = new Timestamp(JdbcUtils.getCurrentTimeOnDB(stmt.getConnection(), UTC_CALENDAR).getTime() - timestampDelay); stmt.setTimestamp(1, endTime, UTC_CALENDAR); stmt.setTimestamp(2, tsOffset, UTC_CALENDAR); stmt.setLong(3, incOffset); stmt.setTimestamp(4, tsOffset, UTC_CALENDAR); log.debug("Executing prepared statement with start time value = end time = and incrementing value = {}", JdbcUtils.formatUTC(tsOffset), JdbcUtils.formatUTC(endTime), incOffset); } else if (incrementingColumn != null) { Long incOffset = offset.getIncrementingOffset(); stmt.setLong(1, incOffset); log.debug("Executing prepared statement with incrementing value = {}", incOffset); } else if (timestampColumn != null) { Timestamp tsOffset = offset.getTimestampOffset(); Timestamp endTime = new Timestamp(JdbcUtils.getCurrentTimeOnDB(stmt.getConnection(), UTC_CALENDAR).getTime() - timestampDelay); stmt.setTimestamp(1, tsOffset, UTC_CALENDAR); stmt.setTimestamp(2, endTime, UTC_CALENDAR); log.debug("Executing prepared statement with timestamp value = end time = {}", JdbcUtils.formatUTC(tsOffset), JdbcUtils.formatUTC(endTime)); } return stmt.executeQuery(); }
Source:
<code>public void maybeAddParticipant(String identifier) { <START> if (!this.participants.containsKey(identifier)) <END> { Participant p = new Participant(this, identifier); this.participants.put(identifier, p); } }</code><technical_language>participants.computeIfAbsent(identifier, -> new Participant(this, identifier));</technical_language>

Target:
public void maybeAddParticipant(String identifier) { synchronized (this.participants) { this.participants.computeIfAbsent(identifier, key -> new Participant(this, identifier)); } }
Source:
<code>public ObjectName createName(String type, String domain, String name) { Hashtable<String, String> properties = new Hashtable<>(); properties.put(KEY_NAME, name); properties.put(KEY_TYPE, type); properties.put(KEY_NAMESPACE, _namespace); try { ObjectName objectName = new ObjectName(domain, properties); boolean needQuote = false; if (objectName.isDomainPattern()) { domain = ObjectName.quote(domain); needQuote = true; } if (objectName.isPropertyValuePattern(KEY_NAME)) { properties.put(KEY_NAME, ObjectName.quote(name)); needQuote = true; } if (objectName.isPropertyValuePattern(KEY_TYPE)) { properties.put(KEY_TYPE, ObjectName.quote(type)); needQuote = true; } return needQuote ? new ObjectName(domain, properties) : objectName; } catch (MalformedObjectNameException e) { try { <START> return new ObjectName(domain, KEY_NAME, ObjectName.quote(name)); <END> } catch (MalformedObjectNameException e1) { LOG.warn("Unable to register {}", type, name, e1); throw new RuntimeException(e1); } } }</code><technical_language>If ignore 2 types of info out of 3, this ObjectName monitoring. throw Exception</technical_language>

Target:
public ObjectName createName(String type, String domain, String name) { Hashtable<String, String> properties = new Hashtable<>(); properties.put(KEY_NAME, name); properties.put(KEY_TYPE, type); properties.put(KEY_NAMESPACE, _namespace); try { ObjectName objectName = new ObjectName(domain, properties); boolean needQuote = false; if (objectName.isDomainPattern()) { domain = ObjectName.quote(domain); needQuote = true; } if (objectName.isPropertyValuePattern(KEY_NAME)) { properties.put(KEY_NAME, ObjectName.quote(name)); needQuote = true; } if (objectName.isPropertyValuePattern(KEY_TYPE)) { properties.put(KEY_TYPE, ObjectName.quote(type)); needQuote = true; } return needQuote ? new ObjectName(domain, properties) : objectName; } catch (MalformedObjectNameException e) { throw new HelixException(String .format("Unable to register metrics: domain=%s, name=%s, namespace=%s", domain, name, _namespace), e); } }
Source:
<code>private static String[] getDexCodeInstructionSets(String[] instructionSets) { HashSet<String> dexCodeInstructionSets = new HashSet<String>(instructionSets.length); for (String instructionSet : instructionSets) { dexCodeInstructionSets.add(getDexCodeInstructionSet(instructionSet)); } <START> return dexCodeInstructionSets.toArray(new String[0]); <END> }</code><technical_language>this work</technical_language>

Target:
private static String[] getDexCodeInstructionSets(String[] instructionSets) { HashSet<String> dexCodeInstructionSets = new HashSet<String>(instructionSets.length); for (String instructionSet : instructionSets) { dexCodeInstructionSets.add(getDexCodeInstructionSet(instructionSet)); } return dexCodeInstructionSets.toArray(new String[dexCodeInstructionSets.size()]); }
Source:
<code>public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); authWebView.initWebView(getActivity()); authWebView.getWebViewClient().setPageStatusListener(new URLInterceptorWebViewClient.IPageStatusListener() { @Override public void onPageStarted() { <START> <END> } @Override public void onPageFinished() { ViewPagerDownloadManager.instance.done(CourseUnitWebViewFragment.this, true); } @Override public void onPageLoadError(WebView view, int errorCode, String description, String failingUrl) { if (failingUrl != null && failingUrl.equals(view.getUrl())) { ViewPagerDownloadManager.instance.done(CourseUnitWebViewFragment.this, false); } } @Override public void onPagePartiallyLoaded() { } }); if (ViewPagerDownloadManager.USING_UI_PRELOADING) { if (ViewPagerDownloadManager.instance.inInitialPhase(unit)) { ViewPagerDownloadManager.instance.addTask(this); } else { authWebView.loadUrl(true, unit.getBlockUrl()); } } }</code><technical_language>Extra new line</technical_language>

Target:
public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); authWebView.initWebView(getActivity()); authWebView.getWebViewClient().setPageStatusListener(new URLInterceptorWebViewClient.IPageStatusListener() { @Override public void onPageStarted() { } @Override public void onPageFinished() { ViewPagerDownloadManager.instance.done(CourseUnitWebViewFragment.this, true); } @Override public void onPageLoadError(WebView view, int errorCode, String description, String failingUrl) { if (failingUrl != null && failingUrl.equals(view.getUrl())) { ViewPagerDownloadManager.instance.done(CourseUnitWebViewFragment.this, false); } } @Override @TargetApi(Build.VERSION_CODES.M) public void onPageLoadError(WebView view, WebResourceRequest request, WebResourceResponse errorResponse) { if (request.getUrl().toString().equals(view.getUrl())) { ViewPagerDownloadManager.instance.done(CourseUnitWebViewFragment.this, false); } } @Override public void onPagePartiallyLoaded() { } }); if (ViewPagerDownloadManager.USING_UI_PRELOADING) { if (ViewPagerDownloadManager.instance.inInitialPhase(unit)) { ViewPagerDownloadManager.instance.addTask(this); } else { authWebView.loadUrl(true, unit.getBlockUrl()); } } }
Source:
<code>public static SelectOrExamineResponse parse(List<ImapResponse> imapResponses, ImapFolder folder) throws IOException, MessagingException { SelectOrExamineResponse selectOrExamineResponse = new SelectOrExamineResponse(); for (ImapResponse imapResponse : imapResponses) { if (imapResponse.isTagged() || !equalsIgnoreCase(imapResponse.get(0), Responses.OK) || !imapResponse.isList(1)) { continue; } <START> handleUidValidity(imapResponse, selectOrExamineResponse); <END> handleHighestModSeq(imapResponse, selectOrExamineResponse); handlePermanentFlags(imapResponse, selectOrExamineResponse, folder.store.getPermanentFlagsIndex()); } selectOrExamineResponse.readWriteMode = isModeReadWrite(ImapUtility.getLastResponse(imapResponses)); if (folder.supportsQresync()) { selectOrExamineResponse.qresyncResponse = QresyncResponse.parse(imapResponses, folder); } else { selectOrExamineResponse.qresyncResponse = null; } return selectOrExamineResponse; }</code><technical_language>methods parse, handle</technical_language>

Target:
private void parse(List<ImapResponse> imapResponses, ImapFolder folder) throws IOException, MessagingException { for (ImapResponse imapResponse : imapResponses) { if (imapResponse.isTagged() || !equalsIgnoreCase(imapResponse.get(0), Responses.OK) || !imapResponse.isList(1)) { continue; } parseUidValidity(imapResponse); parseHighestModSeq(imapResponse); parsePermanentFlags(imapResponse, folder.getPermanentFlags()); } this.readWriteMode = isModeReadWriteIfAvailable(ImapUtility.getLastResponse(imapResponses)); if (folder.doesConnectionSupportQresync() && highestModSeq != INVALID_HIGHEST_MOD_SEQ && ImapConfig.shouldUseQresync()) { this.qresyncParamResponse = QresyncParamResponse.fromSelectOrExamineResponse(imapResponses, folder); } else { this.qresyncParamResponse = null; } }
Source:
<code>protected void evaluateTextField() { String trimName = nameText.getText().trim(); IStatus status = ResourcesPlugin.getWorkspace().validateName(trimName, IResource.FILE); <START> if(!status.isOK()){ <END> nameStatus = status; updatePageStatus(); return; } else { nameStatus = AbstractNamedWizardPage.createOkStatus(); if (!isValidResourceName(trimName)) { nameStatus = createStatus(IStatus.ERROR, Messages.getString("NewRouteResourceWizardPage.itemAlreadyExist")); updatePageStatus(); return; } else { if (property != null && nameStatus.getSeverity() == IStatus.OK) { property.setLabel(getPropertyLabel(trimName)); property.setDisplayName(trimName); property.setModificationDate(new Date()); } } } if(filenameText != null){ String filePath = filenameText.getText().trim(); if (filePath != null && !filePath.isEmpty()) { File file = new File(filePath); if (!file.exists()) { try { url = new URL(filePath); InputStream is = url.openStream(); if (is == null) { url = null; } if (is != null) { is.close(); } } catch (Exception e) { url = null; } } else { try { url = file.toURI().toURL(); } catch (Exception e) { url = null; } } if (url == null) { nameStatus = createStatus(IStatus.ERROR, Messages.getString("NewRouteResourceWizardPage.errorLoadFile") + filePath + "."); } } } updatePageStatus(); }</code><technical_language>In new logic, is need temp variable **status**</technical_language>

Target:
protected void evaluateTextField() { String trimName = nameText.getText().trim(); nameStatus = ResourcesPlugin.getWorkspace().validateName(trimName, IResource.FILE); if(!nameStatus.isOK()){ updatePageStatus(); return; } else { nameStatus = AbstractNamedWizardPage.createOkStatus(); if (!isValidResourceName(trimName)) { nameStatus = createStatus(IStatus.ERROR, Messages.getString("NewRouteResourceWizardPage.itemAlreadyExist")); updatePageStatus(); return; } else { if (property != null && nameStatus.getSeverity() == IStatus.OK) { property.setLabel(getPropertyLabel(trimName)); property.setDisplayName(trimName); property.setModificationDate(new Date()); } } } if(filenameText != null){ String filePath = filenameText.getText().trim(); if (filePath != null && !filePath.isEmpty()) { File file = new File(filePath); if (!file.exists()) { try { url = new URL(filePath); InputStream is = url.openStream(); if (is == null) { url = null; } if (is != null) { is.close(); } } catch (Exception e) { url = null; } } else { try { url = file.toURI().toURL(); } catch (Exception e) { url = null; } } if (url == null) { nameStatus = createStatus(IStatus.ERROR, Messages.getString("NewRouteResourceWizardPage.errorLoadFile") + filePath + "."); } } } updatePageStatus(); }
Source:
<code>public int getNumberOfResultTemplates() { switchToIFrame(); <START> int numberOfTemplates = -1; <END> if (checkIfElementOnPage(resultTemplatesBy)) { numberOfTemplates = resultTemplates.size(); } else { numberOfTemplates = 0; } switchOutOfIFrame(); PageObjectLogging.log("getNumberOfResultTemplates", "Number of result templates found: " + numberOfTemplates, true); return numberOfTemplates; }</code><technical_language>assigning -1 numberOfTemplates, if assigning in next line</technical_language>

Target:
public int getNumberOfResultTemplates() { switchToIFrame(); try { if (resultTemplates.isEmpty()) { return 0; } else { return resultTemplates.size(); } } finally { PageObjectLogging.log( "getNumberOfResultTemplates", "Number of result templates found: " + resultTemplates.size(), true ); switchOutOfIFrame(); } }
Source:
<code>private void sendReplyMessage(Message<?> replyMessage, final Object replyChannelHeaderValue) { if (logger.isDebugEnabled()) { logger.debug("handler '" + this + "' sending reply Message: " + replyMessage); } <START> if (StringUtils.hasText(this.outputChannelName)) { <END> synchronized (this) { if (this.outputChannelName != null) { try { this.outputChannel = this.getBeanFactory().getBean(this.outputChannelName, MessageChannel.class); this.outputChannelName = null; } catch (BeansException e) { throw new DestinationResolutionException("Failed to look up MessageChannel with name '" + this.outputChannelName + "' in the BeanFactory."); } } } } if (this.outputChannel != null) { this.sendMessage(replyMessage, this.outputChannel); } else if (replyChannelHeaderValue != null) { this.sendMessage(replyMessage, replyChannelHeaderValue); } else { throw new DestinationResolutionException("no output-channel or replyChannel header available"); } }</code><technical_language>optimize</technical_language>

Target:
private void sendReplyMessage(Message<?> replyMessage, final Object replyChannelHeaderValue) { if (logger.isDebugEnabled()) { logger.debug("handler '" + this + "' sending reply Message: " + replyMessage); } if (this.outputChannelName != null) { synchronized (this) { if (this.outputChannelName != null) { try { this.outputChannel = this.getBeanFactory().getBean(this.outputChannelName, MessageChannel.class); this.outputChannelName = null; } catch (BeansException e) { throw new DestinationResolutionException("Failed to look up MessageChannel with name '" + this.outputChannelName + "' in the BeanFactory."); } } } } if (this.outputChannel != null) { this.sendMessage(replyMessage, this.outputChannel); } else if (replyChannelHeaderValue != null) { this.sendMessage(replyMessage, replyChannelHeaderValue); } else { throw new DestinationResolutionException("no output-channel or replyChannel header available"); } }
Source:
<code>public void mechCamo(Vector<Entity> entities) { if (entities.size() < 1) { return; } CamoChooser mcd = new CamoChooser(clientgui.getFrame()); int result = mcd.showDialog(entities.get(0)); <START> if (result == JOptionPane.CANCEL_OPTION || mcd.getSelectedItem() == null) { <END> return; } DirectoryItem selectedItem = mcd.getSelectedItem(); IPlayer owner = entities.get(0).getOwner(); DirectoryItem ownerCamo = new DirectoryItem(owner.getCamoCategory(), owner.getCamoFileName()); boolean noIndividualCamo = selectedItem.equals(ownerCamo); for (Entity ent : entities) { if (isEditable(ent)) { if (noIndividualCamo) { ent.setCamoCategory(null); ent.setCamoFileName(null); } else { ent.setCamoCategory(selectedItem.getCategory()); ent.setCamoFileName(selectedItem.getItem()); } getLocalClient(ent).sendUpdateEntity(ent); } } }</code><technical_language>suggestion if ((result == JOptionPane.CANCEL_OPTION) || (mcd.getSelectedItem() == null)) {</technical_language>

Target:
public void mechCamo(Vector<Entity> entities) { if (entities.size() < 1) { return; } CamoChooser mcd = new CamoChooser(clientgui.getFrame()); int result = mcd.showDialog(entities.get(0)); if ((result == JOptionPane.CANCEL_OPTION) || (mcd.getSelectedItem() == null)) { return; } DirectoryItem selectedItem = mcd.getSelectedItem(); IPlayer owner = entities.get(0).getOwner(); DirectoryItem ownerCamo = new DirectoryItem(owner.getCamoCategory(), owner.getCamoFileName()); boolean noIndividualCamo = selectedItem.equals(ownerCamo); for (Entity ent : entities) { if (isEditable(ent)) { if (noIndividualCamo) { ent.setCamoCategory(null); ent.setCamoFileName(null); } else { ent.setCamoCategory(selectedItem.getCategory()); ent.setCamoFileName(selectedItem.getItem()); } getLocalClient(ent).sendUpdateEntity(ent); } } }
Source:
<code>public static void afterTests() { <START> KEY_STORE_FILE.delete(); <END> TRUST_STORE_FILE.delete(); }</code><technical_language>a check files exist deleting</technical_language>

Target:
public static void afterTests() { deleteKeyStoreFiles(); }
Source:
<code>public Object[] getVariants() { PhpIndex phpIndex = PhpIndex.getInstance(getElement().getProject()); Symfony2ProjectComponent symfony2ProjectComponent = getElement().getProject().getComponent(Symfony2ProjectComponent.class); Map<String, String> em = symfony2ProjectComponent.getEntityNamespacesMap(); List<LookupElement> results = new ArrayList<LookupElement>(); for (String shortcutName : em.keySet()) { Collection<PhpNamespace> entities = phpIndex.getNamespacesByName(em.get(shortcutName)); for (PhpNamespace entity_files : entities) { String filename = entity_files.getContainingFile().getName(); String className = filename.substring(0, filename.lastIndexOf('.')); String repoName = shortcutName + ':' + className; <START> if(!className.endsWith("Repository")) { <END> for (PhpClass entityClass : phpIndex.getClassesByFQN(em.get(shortcutName) + "\\" + className)) { if(!entityClass.isAbstract()) { results.add(new DoctrineEntityLookupElement(repoName, entityClass)); } } } } } return results.toArray(); }</code><technical_language>if entity is named "Repository"</technical_language>

Target:
public Object[] getVariants() { PhpIndex phpIndex = PhpIndex.getInstance(getElement().getProject()); Symfony2ProjectComponent symfony2ProjectComponent = getElement().getProject().getComponent(Symfony2ProjectComponent.class); Map<String, String> entityNamespaces = symfony2ProjectComponent.getEntityNamespacesMap(); List<LookupElement> results = new ArrayList<LookupElement>(); PhpClass repositoryClass = getRepositoryClass(phpIndex); if(null == repositoryClass) { return results.toArray(); } for (Map.Entry<String, String> entry : entityNamespaces.entrySet()) { Collection<PhpNamespace> entities = phpIndex.getNamespacesByName(entry.getValue()); for (PhpNamespace entity_files : entities) { String filename = entity_files.getContainingFile().getName(); String className = filename.substring(0, filename.lastIndexOf('.')); String repoName = entry.getKey() + ':' + className; PhpClass entityClass = getClass(phpIndex, entityNamespaces.get(entry.getKey()) + "\\" + className); if(null != entityClass && isEntity(entityClass, repositoryClass)) { results.add(new DoctrineEntityLookupElement(repoName, entityClass)); } } } return results.toArray(); }
Source:
<code>private boolean validateVmwareConfiguration() { getvCenter().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(255), new HostAddressValidation() }); getEsx().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(255), new HostAddressValidation() }); getVmwareDatacenter().validateEntity(new IValidation[] { new NotEmptyValidation() }); getUsername().validateEntity(new IValidation[] { <START> new NotEmptyValidation() }); <END> getPassword().validateEntity(new IValidation[] { new NotEmptyValidation()} ); return getvCenter().getIsValid() && getEsx().getIsValid() && getVmwareDatacenter().getIsValid() && getUsername().getIsValid() && getPassword().getIsValid(); }</code><technical_language>a username ' % @#$!@%& '. Is correct? subclass AsciiNameValidation add a support for '@' character? "NameWithDomainValidation"</technical_language>

Target:
private boolean validateVmwareConfiguration() { getvCenter().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(255), new HostAddressValidation() }); getEsx().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(255), new HostAddressValidation() }); getVmwareDatacenter().validateEntity(new IValidation[] { new NotEmptyValidation() }); getUsername().validateEntity(new IValidation[] { new NotEmptyValidation(), new NameAndOptionalDomainValidation() }); getPassword().validateEntity(new IValidation[] { new NotEmptyValidation() }); return getvCenter().getIsValid() && getEsx().getIsValid() && getVmwareDatacenter().getIsValid() && getUsername().getIsValid() && getPassword().getIsValid(); }
Source:
<code><START> public Map<String, Object> getLibraries() throws IOException { <END> Map<String, Object> map = new HashMap<String, Object>(); for (DatabaseFile df : getPipelineScanner().getLibraryFiles()) { map.put(df.getId().toString(), getLibraryMap(df)); } return map; }</code><technical_language>a user of this class, feel weird catch IOException rest of signature of this method. I wrap a caller understand do about</technical_language>

Target:
public Map<String, Object> getLibraries() throws DatabaseException { try { Map<String, Object> map = new HashMap<String, Object>(); for (DatabaseFile df : getPipelineScanner().getLibraryFiles()) { map.put(df.getId().toString(), getLibraryMap(df)); } return map; } catch (IOException e) { throw new DatabaseException("Failed to scan pipeline", e); } }
Source:
<code>private void setupSettings() { <START> testEnumSetting = new SettingImpl<>(TestEnum.class, new SimpleUri("engine-tests:TestSetting1"), TestEnum.A1); <END> config.add(testEnumSetting); doubleSetting = new SettingImpl<>(Double.class, new SimpleUri("engine-tests:TestSetting2"), 30.0); config.add(doubleSetting); testClassSetting = new SettingImpl<>(TestClass.class, new SimpleUri("engine-tests:TestSetting3"), null); config.add(testClassSetting); }</code><technical_language>perspective this of instantiating a setting is a mouthful I immediateness readability perspective need this: testEnumSetting = new IntegerSetting(new SimpleUri("engine-tests:TestSetting1"), TestEnum.A1); So, need reintroduce concrete classes (*) SettingImpl class abstract. (*) I.e.: public class IntegerSetting extends SettingImpl { public IntegerSetting(SimpleUri id, Integer defaultValue) { super(Integer.class, id, defaultValue, null); } }</technical_language>

Target:
private void setupSettings() { testEnumSetting = new SettingImpl<>(new SimpleUri("engine-tests:TestSetting1"), TestEnum.A1); config.add(testEnumSetting); doubleSetting = new SettingImpl<>(new SimpleUri("engine-tests:TestSetting2"), 30.0); config.add(doubleSetting); testClassSetting = new SettingImpl<>(new SimpleUri("engine-tests:TestSetting3"), new TestClass(101)); config.add(testClassSetting); }
Source:
<code>public void setData(String data) { <START> this.data = data; <END> }</code><technical_language>naming convention, longer need this. disambiguate variable referencing</technical_language>

Target:
public void setData(String data) { mData = data; }
Source:
<code>public int hdel(List<ByteArrayWrapper> subList) { AtomicLong numDeleted = new AtomicLong(); region().computeIfPresent(key, (_unused_, oldHash) -> { HashMap<ByteArrayWrapper, ByteArrayWrapper> newHash = new HashMap<>(oldHash); for (ByteArrayWrapper fieldToRemove : subList) { newHash.remove(fieldToRemove); } numDeleted.set(oldHash.size() - newHash.size()); return newHash; }); <START> if (hgetall().size() == 0) { <END> RedisDataType type = context.getKeyRegistrar().getType(key); context.getRegionProvider().removeKey(key, type); } return numDeleted.intValue(); }</code><technical_language>Instead of ".size() == 0" I ".isEmpty()" is better</technical_language>

Target:
public int hdel(List<ByteArrayWrapper> subList) { AtomicLong numDeleted = new AtomicLong(); region().computeIfPresent(key, (_unused_, oldHash) -> { HashMap<ByteArrayWrapper, ByteArrayWrapper> newHash = new HashMap<>(oldHash); for (ByteArrayWrapper fieldToRemove : subList) { newHash.remove(fieldToRemove); } numDeleted.set(oldHash.size() - newHash.size()); return newHash; }); if (hgetall().isEmpty()) { RedisDataType type = context.getKeyRegistrar().getType(key); if (type == RedisDataType.REDIS_HASH) { context.getRegionProvider().removeKey(key, type); } } return numDeleted.intValue(); }
Source:
<code>private boolean hasAlternativeInstructor(String courseId, String instructorToDeleteEmail) { List<InstructorAttributes> instructors = logic.getInstructorsForCourse(courseId); for (InstructorAttributes instr : instructors) { boolean isAlternativeInstructor = instr.isRegistered() && !instr.getEmail().equals(instructorToDeleteEmail) && instr.isAllowedForPrivilege(Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_INSTRUCTOR) <START> && instr.isDisplayedToStudents(); <END> if (isAlternativeInstructor) { return true; } } return false; }</code><technical_language>accurate. instructor is visible is allowed modify other instructors need person</technical_language>

Target:
private boolean hasAlternativeInstructor(String courseId, String instructorToDeleteEmail) { List<InstructorAttributes> instructors = logic.getInstructorsForCourse(courseId); boolean isAlternativeInstructorWithModifyInstructorPermissionPresent = false; boolean isAlternativeVisibleInstructorPresent = false; for (InstructorAttributes instr : instructors) { isAlternativeInstructorWithModifyInstructorPermissionPresent = instr.isRegistered() && !instr.getEmail().equals(instructorToDeleteEmail) && instr.isAllowedForPrivilege(Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_INSTRUCTOR); if (isAlternativeInstructorWithModifyInstructorPermissionPresent) { break; } } for (InstructorAttributes instr : instructors) { isAlternativeVisibleInstructorPresent = instr.isDisplayedToStudents() && !instr.getEmail().equals(instructorToDeleteEmail); if (isAlternativeVisibleInstructorPresent) { break; } } return isAlternativeInstructorWithModifyInstructorPermissionPresent && isAlternativeVisibleInstructorPresent; }
Source:
<code>public RenderPipelineTask generateTask() { task = new BindFBOTask(fboId); <START> return task; <END> }</code><technical_language>change to: return new BindFBOTask(fboId); - clear enough</technical_language>

Target:
public RenderPipelineTask generateTask() { if (task == null) { task = new BindFBOTask(fboId, fboName); if (fboId != DEFAULT_FRAME_BUFFER_ID) { frameBuffersManager.subscribe(this); } } else { if (fboId != DEFAULT_FRAME_BUFFER_ID) { update(); } } return task; }
Source:
<code>public List<Pair<Integer, Integer>> getMatchedSequences() { <START> if (matchedIndices == null) { <END> throw new RuntimeException("getMatchedSequences() called with matchedIndices == null"); } List<Pair<Integer, Integer>> positions = new ArrayList<>(this.matchedIndices.size()); int start = this.matchedIndices.get(0); int end = start + 1; for (int i = 1; i < this.matchedIndices.size(); i += 1) { if (end == this.matchedIndices.get(i)) { end += 1; } else { positions.add(new Pair<>(start, end)); start = this.matchedIndices.get(i); end = start + 1; } } positions.add(new Pair<>(start, end)); return positions; }</code><technical_language>I skip this, crash call .size()</technical_language>

Target:
public List<Pair<Integer, Integer>> getMatchedSequences() { assert this.matchedIndices != null; List<Pair<Integer, Integer>> positions = new ArrayList<>(this.matchedIndices.size()); int start = this.matchedIndices.get(0); int end = start + 1; for (int i = 1; i < this.matchedIndices.size(); i += 1) { if (end == this.matchedIndices.get(i)) { end += 1; } else { positions.add(new Pair<>(start, end)); start = this.matchedIndices.get(i); end = start + 1; } } positions.add(new Pair<>(start, end)); return positions; }
Source:
<code>public void checkSpecificAccessControl() { String feedbackQuestionId = getNonNullRequestParamValue(Const.ParamsNames.FEEDBACK_QUESTION_ID); FeedbackQuestionAttributes questionAttributes = logic.getFeedbackQuestion(feedbackQuestionId); if (questionAttributes == null) { <START> throw new UnauthorizedAccessException("Unknown question id"); <END> } gateKeeper.verifyAccessible(logic.getInstructorForGoogleId(questionAttributes.getCourseId(), userInfo.getId()), logic.getFeedbackSession(questionAttributes.getFeedbackSessionName(), questionAttributes.getCourseId()), false, Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_SESSION); }</code><technical_language>This fits 404 better</technical_language>

Target:
public void checkSpecificAccessControl() { String feedbackQuestionId = getNonNullRequestParamValue(Const.ParamsNames.FEEDBACK_QUESTION_ID); FeedbackQuestionAttributes questionAttributes = logic.getFeedbackQuestion(feedbackQuestionId); if (questionAttributes == null) { throw new EntityNotFoundException(new EntityDoesNotExistException("Unknown question id")); } gateKeeper.verifyAccessible(logic.getInstructorForGoogleId(questionAttributes.getCourseId(), userInfo.getId()), logic.getFeedbackSession(questionAttributes.getFeedbackSessionName(), questionAttributes.getCourseId()), false, Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_SESSION); }
Source:
<code>private List<Row> doJoin(Row outerRow, List<Row> innerRows, JoinRelType joinRelType) throws InterruptedException { boolean outerRowOnLeft = joinRelType != JoinRelType.RIGHT; copyToContext(outerRow, outerRowOnLeft); List<Row> matchInnerRows = new ArrayList<>(); for (Row innerRow: innerRows) { copyToContext(innerRow, !outerRowOnLeft); final Boolean execute = (Boolean) condition.execute(context); if (execute != null && execute) { matchInnerRows.add(innerRow); } } doSend(outerRow, matchInnerRows, joinRelType); <START> return ImmutableList.copyOf(matchInnerRows); <END> }</code><technical_language>Do need ImmutableList copy? matchRowSet.addAll() copy again, right</technical_language>

Target:
private List<Row> doJoin(Row outerRow, List<Row> innerRows, JoinRelType joinRelType) throws InterruptedException { boolean outerRowOnLeft = joinRelType != JoinRelType.RIGHT; copyToContext(outerRow, outerRowOnLeft); List<Row> matchInnerRows = new ArrayList<>(); for (Row innerRow: innerRows) { copyToContext(innerRow, !outerRowOnLeft); final Boolean execute = (Boolean) condition.execute(context); if (execute != null && execute) { matchInnerRows.add(innerRow); } } doSend(outerRow, matchInnerRows, joinRelType); return matchInnerRows; }
Source:
<code>Object[][] data_badDates() { return new Object[][] { { 0, 1, 1 }, { 1900, 0, 0 }, { 1900, -1, 1 }, { 1900, 0, 1 }, <START> { 1900, 15, 1 }, <END> { 1900, 16, 1 }, { 1900, 1, -1 }, { 1900, 1, 0 }, { 1900, 1, 29 }, { 1900, 13, -1 }, { 1900, 13, 0 }, { 1900, 13, 88 }, { 1900, 14, -1 }, { 1900, 14, 0 }, { 1900, 14, 29 }, { 1900, 14, 30 }, { 1898, 13, -1 }, { 1898, 13, 0 }, { 1898, 14, 29 }, { 1898, 14, 30 }, { 1898, 14, 1 }, { 1898, 14, 2 }, { 1900, 14, -1 }, { 1900, 14, 0 }, { 1900, 14, 29 }, { 1900, 2, 29 }, { 1900, 3, 29 }, { 1900, 4, 29 }, { 1900, 5, 29 }, { 1900, 6, 29 }, { 1900, 7, 29 }, { 1900, 8, 29 }, { 1900, 9, 29 }, { 1900, 10, 29 }, { 1900, 11, 29 }, { 1900, 12, 29 }, }; }</code><technical_language>Missing 1900, 14, 1</technical_language>

Target:
Object[][] data_badDates() { return new Object[][] { {-1, 13, 28}, {-1, 0, 0}, {0, 1, 1}, {1900, -2, 1}, {1900, 14, 1}, {1900, 15, 1}, {1900, 1, -1}, {1900, 1, 0}, {1900, 1, 29}, {1904, -1, -2}, {1904, -1, 0}, {1904, -1, 1}, {1900, -1, -1}, {1900, -1, 0}, {1900, -1, -2}, {1900, 0, -1}, {1900, 0, 1}, {1900, 0, 2}, {1900, 2, 29}, {1900, 3, 29}, {1900, 4, 29}, {1900, 5, 29}, {1900, 6, 29}, {1900, 7, 29}, {1900, 8, 29}, {1900, 9, 29}, {1900, 10, 29}, {1900, 11, 29}, {1900, 12, 29}, {1900, 13, 29}, }; }
Source:
<code>public void getNettyServerTest() { Properties properties = new Properties(); VerifiableProperties verifiableProperties = new VerifiableProperties(properties); RestRequestHandler restRequestHandler = new MockRestRequestResponseHandler(); PublicAccessLogger publicAccessLogger = new PublicAccessLogger(new String[]{}, new String[]{}); <START> VIPHealthCheckService vipHealthCheckService = new VIPHealthCheckService("/ambry-frontend/admin"); <END> NettyServerFactory nettyServerFactory = new NettyServerFactory(verifiableProperties, new MetricRegistry(), restRequestHandler, publicAccessLogger, vipHealthCheckService); NioServer nioServer = nettyServerFactory.getNioServer(); assertNotNull("No NioServer returned", nioServer); assertEquals("Did not receive a NettyServer instance", NettyServer.class.getCanonicalName(), nioServer.getClass().getCanonicalName()); }</code><technical_language>Change URL</technical_language>

Target:
public void getNettyServerTest() { Properties properties = new Properties(); VerifiableProperties verifiableProperties = new VerifiableProperties(properties); RestRequestHandler restRequestHandler = new MockRestRequestResponseHandler(); PublicAccessLogger publicAccessLogger = new PublicAccessLogger(new String[]{}, new String[]{}); RestServerState restServerState = new RestServerState("/healthCheck"); NettyServerFactory nettyServerFactory = new NettyServerFactory(verifiableProperties, new MetricRegistry(), restRequestHandler, publicAccessLogger, restServerState); NioServer nioServer = nettyServerFactory.getNioServer(); assertNotNull("No NioServer returned", nioServer); assertEquals("Did not receive a NettyServer instance", NettyServer.class.getCanonicalName(), nioServer.getClass().getCanonicalName()); }