auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public boolean ShouldEndAction() { synchronized (_listTasks) { java.util.ArrayList<EntityAsyncTask> CurrentActionTypeTasks = GetCurrentActionTypeTasks(); for (EntityAsyncTask task : CurrentActionTypeTasks) { if (task.getState() != AsyncTaskState.Ended) { <START> log.infoFormat("Task ID: '{0}' is in state {1}. End action for entity {2} will proceed when all the entity tasks will be completed.", <END> task.getTaskID(), task.getState(), getContainerId()); return false; } } } return true; }</code><technical_language>s/entity/entity's s/will be/are latter, noticed this</technical_language>

Target:
public boolean ShouldEndAction() { synchronized (_listTasks) { java.util.ArrayList<EntityAsyncTask> CurrentActionTypeTasks = GetCurrentActionTypeTasks(); for (EntityAsyncTask task : CurrentActionTypeTasks) { if (task.getState() != AsyncTaskState.Ended) { log.infoFormat("Task ID: '{0}' is in state {1}. End action for entity {2} will proceed when all the entity's tasks are completed.", task.getTaskID(), task.getState(), getContainerId()); return false; } } } return true; }
Source:
<code>private void reportBytesRead(int count) { <START> if (bytesAvailable - count >= 0) { <END> bytesAvailable -= count; } }</code><technical_language>if (bytesAvailable >= count) simpler</technical_language>

Target:
private void reportBytesRead(int count) { if (bytesAvailable >= count) { bytesAvailable -= count; } }
Source:
<code>public void classSetup() { startTime = TimeHelper.combineDateTime("09/05/2016", "1000"); endTime = TimeHelper.combineDateTime("09/05/2017", "1000"); fsa = FeedbackSessionAttributes <START> .builder(null, null, null) <END> .withStartTime(startTime).withEndTime(endTime).withTimeZone(8).withGracePeriod(15) .withFeedbackSessionType(FeedbackSessionType.STANDARD).withOpeningEmailEnabled(false) .withClosingEmailEnabled(false).withPublishedEmailEnabled(false) .build(); }</code><technical_language>this is a test, required fields null. If this throw errors, a sign "required" fields properly enforced</technical_language>

Target:
public void classSetup() { startTime = TimeHelper.combineDateTime("09/05/2016", "1000"); endTime = TimeHelper.combineDateTime("09/05/2017", "1000"); fsa = FeedbackSessionAttributes .builder("", "", "") .withStartTime(startTime) .withEndTime(endTime) .withTimeZone(8) .withGracePeriod(15) .withFeedbackSessionType(FeedbackSessionType.STANDARD) .withOpeningEmailEnabled(false) .withClosingEmailEnabled(false) .withPublishedEmailEnabled(false) .build(); }
Source:
<code>public void checkStorageDomainNotEqualWithStatusActive() { setStorageDomainStatus(StorageDomainStatus.Active); assertFalse(cmd.checkStorageDomainStatusNotEqual(StorageDomainStatus.Active)); List<String> messages = cmd.getReturnValue().getCanDoActionMessages(); <START> assertEquals(messages.size(), 0); <END> }</code><technical_language>why? fail a bug here</technical_language>

Target:
public void checkStorageDomainNotEqualWithStatusActive() { setStorageDomainStatus(StorageDomainStatus.Active); assertFalse(cmd.checkStorageDomainStatusNotEqual(StorageDomainStatus.Active)); List<String> messages = cmd.getReturnValue().getCanDoActionMessages(); assertEquals(messages.size(), 2); assertEquals(messages.get(0), VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2.toString()); assertEquals(messages.get(1), String.format("$status %1$s", StorageDomainStatus.Active)); }
Source:
<code>public void testNullEncoding() throws IOException, URISyntaxException { new ReversedLinesFileReader(new File(this.getClass().getResource("/test-file-empty.bin").toURI()), (Charset) null); <START> } <END></code><technical_language>@mernst, Thank for update this PR. new unit test tests ctor blow a null Charset test default Charset kicks in. Another update great</technical_language>

Target:
public void testNullEncoding() throws IOException, URISyntaxException { final File file = new File(temporaryFolder, "write.txt"); final String text = "Hello /u1234"; FileUtils.writeStringToFile(file, text, (Charset) null); ReversedLinesFileReader rlfr = new ReversedLinesFileReader(file, (Charset) null); assertEquals(text, rlfr.readLine()); }
Source:
<code>protected abstract Object[] readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException; <START> protected abstract boolean buildAnalysisSegments(ISegmentStore<ISegment> segments, IProgressMonitor monitor) throws TmfAnalysisException; <END> @Override public @Nullable ISegmentStore<ISegment> getSegmentStore() { return fSegmentStore; }</code><technical_language>Renamed segments -> segmentStore in next patch</technical_language>

Target:
protected abstract Object[] readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException; protected abstract boolean buildAnalysisSegments(ISegmentStore<ISegment> segmentStore, IProgressMonitor monitor) throws TmfAnalysisException; @Override public @Nullable ISegmentStore<ISegment> getSegmentStore() { return fSegmentStore; }
Source:
<code>protected List<Attribute> init(AbstractDefinition inputDefinition, ExpressionExecutor[] attributeExpressionExecutors, ExecutionPlanContext executionPlanContext) { kalmonFilterHashMap = new ConcurrentHashMap<String, ConcurrentHashMap<Integer, KalmonFilter>>(); if (attributeExpressionExecutors.length != 7) { throw new ExecutionPlanValidationException("Invalid no of arguments passed to " + "kf:kalman2DFilter() function, " + "requires 7, but found " + attributeExpressionExecutors.length); } ArrayList<Attribute> attributes = new ArrayList<Attribute>(2); <START> attributes.add(new Attribute("kalmonLatitude", Attribute.Type.DOUBLE)); <END> attributes.add(new Attribute("kalmonLongitude", Attribute.Type.DOUBLE)); return attributes; }</code><technical_language>@ramindu90 if making generic, I output other latitude, longitude. rename additional attributes more generic (e.g. kalmanX, outputX filteredX similar?)</technical_language>

Target:
protected List<Attribute> init(AbstractDefinition inputDefinition, ExpressionExecutor[] attributeExpressionExecutors, ExecutionPlanContext executionPlanContext) { kalmonFilterHashMap = new ConcurrentHashMap<String, ConcurrentHashMap<Integer, KFRelatedValueHolder>>(); if (attributeExpressionExecutors.length != 7) { throw new ExecutionPlanValidationException("Invalid no of arguments passed to " + "kf:kalman2DFilter() function, " + "requires 7, but found " + attributeExpressionExecutors.length); } ArrayList<Attribute> attributes = new ArrayList<Attribute>(2); attributes.add(new Attribute("estimatedX", Attribute.Type.DOUBLE)); attributes.add(new Attribute("estimatedY", Attribute.Type.DOUBLE)); return attributes; }
Source:
<code>private void atomicWriteToFile(String content, File file) throws IOException { File directory = file.getParentFile(); String fileName = file.getName() + ".tmp"; File tempFile = new File(directory, fileName); FileOutputStream out = new FileOutputStream(tempFile); IOUtils.write(content, out); out.close(); <START> FileUtils.moveFile(tempFile, file); <END> }</code><technical_language>if target file exists? handle FileExistsException here? thanks</technical_language>

Target:
private void atomicWriteToFile(String content, File file) throws IOException { File directory = file.getParentFile(); File tempFile = File.createTempFile(file.getName(), null, directory); FileOutputStream out = new FileOutputStream(tempFile); try { IOUtils.write(content, out); } catch (IOException iox) { if (out != null) out.close(); tempFile.delete(); throw iox; } out.close(); FileSystem defaultFileSystem = FileSystems.getDefault(); Path tempFilePath = defaultFileSystem.getPath(tempFile.getCanonicalPath()); Path destinationFilePath = defaultFileSystem.getPath(file.getCanonicalPath()); try { Files.move(tempFilePath, destinationFilePath, StandardCopyOption.ATOMIC_MOVE); } catch (IOException iox) { tempFile.delete(); throw iox; } }
Source:
<code><START> public Iterable<@NonNull IEventDeclaration> getEventDeclarations() { <END> return checkNotNull(ImmutableList.copyOf(fStreamInput.getStream().getEventDeclarations())); }</code><technical_language>redundant, class is @NNBD</technical_language>

Target:
public Iterable<IEventDeclaration> getEventDeclarations() { return checkNotNull(ImmutableList.copyOf(fStreamInput.getStream().getEventDeclarations())); }
Source:
<code>public Expression visit(LazyExpression e) { insideLazyExpression = true; Expression result = super.visit(e); <START> insideLazyExpression = false; <END> return result; }</code><technical_language>mentioning this, this kind of pattern is common in parser (maybe relevant here). In parser attribute "inInterface", true of some context, necessary save previous state restore it. java boolean prevCtx = insideLazyExpression; insideLazyExpression = true; Expression result = super.visit(e); insideLazyExpression = prevCtx; risk overwriting "true" if bit set entering method. I if nested lazy expressions a in saxon expression tree, this a bug bite</technical_language>

Target:
public Expression visit(LazyExpression e) { boolean prevCtx = insideLazyExpression; insideLazyExpression = true; Expression result = super.visit(e); insideLazyExpression = prevCtx; return result; }
Source:
<code>private void removeCacheByKey(final Ehcache tenantCache, final String tenantRecordId) { <START> for (String key : (List<String>) tenantCache.getKeys()) { <END> if (key.endsWith("::" + tenantRecordId)) { tenantCache.remove(key); } } }</code><technical_language>Nit: casts behave runtime hide some cryptic bugs. issue here, I suggest rewriting it: for (final Object key : tenantCache.getKeys()) { if (key != null && key.toString().endsWith("::" + tenantRecordId)) { ..</technical_language>

Target:
private void removeCacheByKey(final Ehcache tenantCache, final String tenantRecordId) { for (Object key : tenantCache.getKeys()) { if (null != key && key.toString().endsWith("::" + tenantRecordId)) { tenantCache.remove(key); } } }
Source:
<code>public void cloneSnapshot(String s, TableName tableName, boolean b) throws IOException, TableExistsException, RestoreSnapshotException { <START> throw new UnsupportedOperationException("cloneSnapshot"); END> }</code><technical_language>I supported if booleans arte false</technical_language>

Target:
public void cloneSnapshot(String s, TableName tableName, boolean b) throws IOException, TableExistsException, RestoreSnapshotException { if (!b) { this.cloneSnapshot(s, tableName); } throw new UnsupportedOperationException("cloneSnapshot"); }
Source:
<code>public void startCycle() { if (tileAltar.getWorld() != null) tileAltar.getWorld().notifyBlockUpdate(tileAltar.getPos(), tileAltar.getWorld().getBlockState(tileAltar.getPos()), tileAltar.getWorld().getBlockState(tileAltar.getPos()), 3); checkTier(); if ((fluid == null || fluid.amount <= 0) && totalCharge <= 0) return; if (!isActive) progress = 0; if (tileAltar.getStackInSlot(0) != null) { <START> AltarRecipe recipe = AltarRecipeRegistry.getRecipeForInput(Collections.singletonList(tileAltar.getStackInSlot(0))); <END> if (recipe != null) { if (recipe.doesRequiredItemMatch(tileAltar.getStackInSlot(0), altarTier)) { this.isActive = true; this.recipe = recipe; this.result = recipe.getOutput() == null ? null : new ItemStack(recipe.getOutput().getItem(), 1, recipe.getOutput().getMetadata()); this.liquidRequired = recipe.getSyphon(); this.canBeFilled = recipe.isFillable(); this.consumptionRate = recipe.getConsumeRate(); this.drainRate = recipe.getDrainRate(); return; } } } isActive = false; }</code><technical_language>add a helper takes a single stack forwards call</technical_language>

Target:
public void startCycle() { if (tileAltar.getWorld() != null) tileAltar.getWorld().notifyBlockUpdate(tileAltar.getPos(), tileAltar.getWorld().getBlockState(tileAltar.getPos()), tileAltar.getWorld().getBlockState(tileAltar.getPos()), 3); checkTier(); if ((fluid == null || fluid.amount <= 0) && totalCharge <= 0) return; if (!isActive) progress = 0; if (tileAltar.getStackInSlot(0) != null) { AltarRecipe recipe = AltarRecipeRegistry.getRecipeForInput(tileAltar.getStackInSlot(0)); if (recipe != null) { if (recipe.doesRequiredItemMatch(tileAltar.getStackInSlot(0), altarTier)) { this.isActive = true; this.recipe = recipe; this.result = recipe.getOutput() == null ? null : new ItemStack(recipe.getOutput().getItem(), 1, recipe.getOutput().getMetadata()); this.liquidRequired = recipe.getSyphon(); this.canBeFilled = recipe.isFillable(); this.consumptionRate = recipe.getConsumeRate(); this.drainRate = recipe.getDrainRate(); return; } } } isActive = false; }
Source:
<code>public void testCommentTable() <START> { <END> }</code><technical_language>I test expected error message in case connector support this feature</technical_language>

Target:
public void testCommentTable() { assertQueryFails("COMMENT ON TABLE orders IS 'hello'", "This connector does not support commenting tables"); }
Source:
<code><START> public void setUp() throws Exception { <END> classLoader = Thread.currentThread().getContextClassLoader(); transformers = new LocalizedXStreams(classLoader); en = transformers.get(Locale.US).getConverterLookup(); }</code><technical_language>intent revealing name setUp()</technical_language>

Target:
public void setUp() throws Exception { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); LocalizedXStreams transformers = new LocalizedXStreams(classLoader); en = transformers.get(Locale.US).getConverterLookup(); no = transformers.get(new Locale("no")).getConverterLookup(); }
Source:
<code>private Vector<OCFile> getFolderContent(long parentId ) { Vector<OCFile> ret = new Vector<OCFile>(); Uri req_uri = Uri.withAppendedPath( ProviderTableMeta.CONTENT_URI_DIR, String.valueOf(parentId)); Cursor c = null; if (getContentProviderClient() != null) { try { c = getContentProviderClient().query(req_uri, null, ProviderTableMeta.FILE_PARENT + "=?", new String[]{String.valueOf(parentId)}, null); } catch (RemoteException e) { Log_OC.e(TAG, e.getMessage()); return ret; } } else { c = getContentResolver().query(req_uri, null, ProviderTableMeta.FILE_PARENT + "=?", new String[]{String.valueOf(parentId)}, null); } <START> if (c!= null) { <END> if (c.moveToFirst()) { boolean inFolderAvailableOffline = isAnyAncestorAvailableOfflineFolder(parentId); do { OCFile child = createFileInstance(c); if (inFolderAvailableOffline) { child.setAvailableOfflineStatus(OCFile.AvailableOfflineStatus.AVAILABLE_OFFLINE_PARENT); } ret.add(child); } while (c.moveToNext()); } c.close(); } Collections.sort(ret); return ret; }</code><technical_language>This "patch" is needed for methods return individual files</technical_language>

Target:
private Vector<OCFile> getFolderContent(long parentId ) { Vector<OCFile> ret = new Vector<OCFile>(); Uri req_uri = Uri.withAppendedPath( ProviderTableMeta.CONTENT_URI_DIR, String.valueOf(parentId)); Cursor c = null; if (getContentProviderClient() != null) { try { c = getContentProviderClient().query(req_uri, null, ProviderTableMeta.FILE_PARENT + "=?", new String[]{String.valueOf(parentId)}, null); } catch (RemoteException e) { Log_OC.e(TAG, e.getMessage()); return ret; } } else { c = getContentResolver().query(req_uri, null, ProviderTableMeta.FILE_PARENT + "=?", new String[]{String.valueOf(parentId)}, null); } if (c!= null) { if (c.moveToFirst()) { do { OCFile child = createFileInstance(c); ret.add(child); } while (c.moveToNext()); } c.close(); } Collections.sort(ret); return ret; }
Source:
<code>public Response getAPIRevisions(String apiId, MessageContext messageContext) { try { APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider(); List<APIRevision> apiRevisions = apiProvider.getAPIRevisions(apiId); APIRevisionListDTO apiRevisionListDTO = APIMappingUtil.fromListAPIRevisiontoDTO(apiRevisions); return Response.ok().entity(apiRevisionListDTO).build(); <START> } catch (Exception e) { <END> String errorMessage = "Error while adding retrieving API Revision for api id : " + apiId + " - " + e.getMessage(); RestApiUtil.handleInternalServerError(errorMessage, e, log); } return null; }</code><technical_language>catching a generic Exception</technical_language>

Target:
public Response getAPIRevisions(String apiId, MessageContext messageContext) { try { APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider(); List<APIRevision> apiRevisions = apiProvider.getAPIRevisions(apiId); APIRevisionListDTO apiRevisionListDTO = APIMappingUtil.fromListAPIRevisiontoDTO(apiRevisions); return Response.ok().entity(apiRevisionListDTO).build(); } catch (APIManagementException e) { String errorMessage = "Error while adding retrieving API Revision for api id : " + apiId + " - " + e.getMessage(); RestApiUtil.handleInternalServerError(errorMessage, e, log); } return null; }
Source:
<code>protected List<KiePMMLModel> getKiePMMLModelsFromResource(KnowledgeBuilderImpl kbuilderImpl, Resource resource) { String[] classNamePackageName = getFactoryClassNamePackageName(resource); String factoryClassName = classNamePackageName[0]; String packageName = classNamePackageName[1]; try { <START> final Class<? extends KiePMMLModelFactory> aClass = (Class<? extends KiePMMLModelFactory>) Class.forName(packageName + "." + factoryClassName); return aClass.newInstance().getKiePMMLModels(); <END> } catch (ClassNotFoundException e) { logger.info(String.format("%s not found in kjar, going to compile model", factoryClassName)); } catch (Exception e) { throw new KiePMMLException("Exception while instantiating " + factoryClassName, e); } PMMLCompiler pmmlCompiler = kbuilderImpl.getCachedOrCreate(PMML_COMPILER_CACHE_KEY, () -> getCompiler(kbuilderImpl)); try { return pmmlCompiler.getModels(resource.getInputStream(), kbuilderImpl); } catch (IOException e) { throw new ExternalException("ExternalException", e); } }</code><technical_language>This work native compilation. please create a ticket track verify</technical_language>

Target:
protected List<KiePMMLModel> getKiePMMLModelsFromResource(KnowledgeBuilderImpl kbuilderImpl, Resource resource) { String[] classNamePackageName = getFactoryClassNamePackageName(resource); String factoryClassName = classNamePackageName[0]; String packageName = classNamePackageName[1]; String fullFactoryClassName = packageName + "." + factoryClassName; try { final Class<? extends KiePMMLModelFactory> aClass = (Class<? extends KiePMMLModelFactory>) kbuilderImpl.getRootClassLoader().loadClass(fullFactoryClassName); return aClass.newInstance().getKiePMMLModels(); } catch (ClassNotFoundException e) { logger.info(String.format("%s class not found in rootClassLoader, going to compile model", fullFactoryClassName)); } catch (Exception e) { throw new KiePMMLException("Exception while instantiating " + fullFactoryClassName, e); } PMMLCompiler pmmlCompiler = kbuilderImpl.getCachedOrCreate(PMML_COMPILER_CACHE_KEY, () -> getCompiler(kbuilderImpl)); try { return pmmlCompiler.getModels(resource.getInputStream(), kbuilderImpl); } catch (IOException e) { throw new ExternalException("ExternalException", e); } }
Source:
<code>public void testOneTouchPlay() throws Exception { HdmiCecUtils hdmiCecUtils = new HdmiCecUtils(CecDevice.PLAYBACK_1, "1.0.0.0"); if (hdmiCecUtils.init()) { try { ITestDevice device = getDevice(); assertNotNull("Device not set", device); device.executeShellCommand("input keyevent KEYCODE_HOME"); hdmiCecUtils.checkExpectedOutput(CecDevice.TV, CecMessage.TEXT_VIEW_ON); <START> hdmiCecUtils.checkExpectedOutput(CecMessage.ACTIVE_SOURCE); <END> } finally { hdmiCecUtils.killCecProcess(); } } }</code><technical_language>want verify if this Active Source is fully correct Active Source. for source destination address checking right now, want check physical addresses match</technical_language>

Target:
public void testOneTouchPlay() throws Exception { HdmiCecUtils hdmiCecUtils = new HdmiCecUtils(CecDevice.PLAYBACK_1, "1.0.0.0"); if (hdmiCecUtils.init()) { try { ITestDevice device = getDevice(); assertNotNull("Device not set", device); device.executeShellCommand("input keyevent KEYCODE_HOME"); hdmiCecUtils.checkExpectedOutput(CecDevice.TV, CecMessage.TEXT_VIEW_ON); String message = hdmiCecUtils.checkExpectedOutput(CecMessage.ACTIVE_SOURCE); assertEquals(PHYSICAL_ADDRESS, hdmiCecUtils.getParamsFromMessage(message)); } finally { hdmiCecUtils.killCecProcess(); } } }
Source:
<code>public void start() { hWordle.setAlignment(Pos.CENTER); hWordle.setPadding(new Insets(20)); hWordle.prefWidthProperty().bind(root.widthProperty()); hWordle.prefHeightProperty().bind(root.heightProperty()); root.setCenter(hWordle); try { System.out.println("** 1. Creating Tag Cloud for " + searchText); buildTagCloud(tweeter.search(new TweetQuery().query(searchText).count(100))); createWordle(); <START> } catch (TweetException ex) { <END> System.out.println("Error Twitter: " + ex); return; } System.out.println("** 2. Starting new Tweets search for " + searchText); showTweetsExecutor.execute(showTweetsTask); }</code><technical_language>Enhance exception handling providing a error facade in new tweet api</technical_language>

Target:
public void start() { hWordle.setAlignment(Pos.CENTER); hWordle.setPadding(new Insets(20)); hWordle.prefWidthProperty().bind(root.widthProperty()); hWordle.prefHeightProperty().bind(root.heightProperty()); root.setCenter(hWordle); System.out.println("** 1. Creating Tag Cloud for " + tweetSetData.getSearchText()); tweetSetData.buildTree(100); createWordle(); System.out.println("** 2. Starting new Tweets search for " + tweetSetData.getSearchText()); showTweetsExecutor.execute(new ShowTweetsTask()); }
Source:
<code>private File testResource(String baseName) { return new File(new File("k-distribution/src/test/resources" + baseName) <START> .getAbsoluteFile().toString().replaceAll("k-distribution.k-distribution", "k-distribution")); <END> }</code><technical_language>if want support windows, File.separator. need a regex</technical_language>

Target:
private File testResource(String baseName) { return new File(new File("k-distribution/src/test/resources" + baseName) .getAbsoluteFile().toString().replace("k-distribution" + File.separator + "k-distribution", "k-distribution")); }
Source:
<code>public RegistryEntry getRegistryEntry(String key) { MediationRegistryEntryImpl entryEmbedded = new MediationRegistryEntryImpl(); try { URL url = new URL(resolveRegistryPath(key)); if ("file".equals(url.getProtocol())) { try { url.openStream(); <START> } catch (FileNotFoundException e) { <END> return entryEmbedded; } catch (IOException e) { log.error("Error occurred while accessing registry resource: " + key, e); return null; } } URLConnection urlc = url.openConnection(); entryEmbedded.setKey(key); entryEmbedded.setName(url.getFile()); entryEmbedded.setType(ESBRegistryConstants.FILE); entryEmbedded.setDescription("Resource at : " + url.toString()); entryEmbedded.setLastModified(urlc.getLastModified()); entryEmbedded.setVersion(urlc.getLastModified()); if (urlc.getExpiration() > 0) { entryEmbedded.setCachableDuration( urlc.getExpiration() - System.currentTimeMillis()); } else { entryEmbedded.setCachableDuration(getCachableDuration()); } } catch (MalformedURLException e) { handleException("Invalid URL reference " + resolveRegistryPath(key), e); } catch (IOException e) { handleException("IO Error reading from URL " + resolveRegistryPath(key), e); } return entryEmbedded; }</code><technical_language>log error here. WDYT</technical_language>

Target:
public RegistryEntry getRegistryEntry(String key) { MediationRegistryEntryImpl entryEmbedded = new MediationRegistryEntryImpl(); try { URL url = new URL(resolveRegistryPath(key)); if ("file".equals(url.getProtocol())) { try { url.openStream(); } catch (IOException e) { log.error("Error occurred while accessing registry resource: " + key, e); return null; } } URLConnection urlc = url.openConnection(); entryEmbedded.setKey(key); entryEmbedded.setName(url.getFile()); entryEmbedded.setType(ESBRegistryConstants.FILE); entryEmbedded.setDescription("Resource at : " + url.toString()); entryEmbedded.setLastModified(urlc.getLastModified()); entryEmbedded.setVersion(urlc.getLastModified()); if (urlc.getExpiration() > 0) { entryEmbedded.setCachableDuration( urlc.getExpiration() - System.currentTimeMillis()); } else { entryEmbedded.setCachableDuration(getCachableDuration()); } } catch (MalformedURLException e) { handleException("Invalid URL reference " + resolveRegistryPath(key), e); } catch (IOException e) { handleException("IO Error reading from URL " + resolveRegistryPath(key), e); } return entryEmbedded; }
Source:
<code>private void enterLoggedInState() { Stage stage = StageHolder.getStage(); stage.setTitle(mainWindowTitle); getMainScene().setContent(mainRoot); getMainScene().setMoveControl(mainRoot); if (preferencesService.getPreferences().isPrereleaseCheckEnabled()) { clientUpdateService.checkForRegularUpdateInBackground(); } else { <START> clientUpdateService.checkForBetaUpdateInBackground(); <END> } gamePathHandler.detectAndUpdateGamePath(); restoreLastView(); }</code><technical_language>method a boolean parameter a choice? create 2 methods? is preference read in a UI class, clientUpdateService read property itself</technical_language>

Target:
private void enterLoggedInState() { Stage stage = StageHolder.getStage(); stage.setTitle(mainWindowTitle); getMainScene().setContent(mainRoot); getMainScene().setMoveControl(mainRoot); applicationEventPublisher.publishEvent(new LoggedInEvent()); gamePathHandler.detectAndUpdateGamePath(); restoreLastView(); }
Source:
<code>public void testTidyDatabaseList() { <START> Set<File> databases = new HashSet<File>(); <END> databases.add(new File("foo.db")); databases.add(new File("foo.db-journal")); databases.add(new File("bar.db")); databases.add(new File("bar.db-journal")); databases.add(new File("bar.db-uid")); databases.add(new File("baz.db")); databases.add(new File("baz.db-somethingelse")); databases.add(new File("dangling.db-journal")); File[] expected = { new File("foo.db"), new File("bar.db"), new File("baz.db"), new File("baz.db-somethingelse"), new File("dangling.db-journal") }; List<File> tidied = DatabasePeerManager.tidyDatabaseList(databases); assertEquals(expected.length, tidied.size()); assertEquals(true, tidied.containsAll(Arrays.asList(expected))); }</code><technical_language>Prefer modify this test. I wanted APIs preserve order</technical_language>

Target:
public void testTidyDatabaseList() { File[] databases = { new File("foo.db"), new File("foo.db-journal"), new File("bar.db"), new File("bar.db-journal"), new File( "bar.db-uid"), new File("baz.db"), new File("baz.db-somethingelse"), new File("dangling.db-journal"), }; File[] expected = { new File( "foo.db"), new File("bar.db"), new File("baz.db"), new File("baz.db-somethingelse"), new File("dangling.db-journal") }; List<File> tidied = DatabasePeerManager.tidyDatabaseList(Arrays.asList(databases)); assertArrayEquals(expected, tidied.toArray()); }
Source:
<code>public OracleQueryRewriter(JdbcDataContext dataContext) { <START> super(dataContext, 11); <END> }</code><technical_language>BTW, I thought supported version 12c in Oracle</technical_language>

Target:
public OracleQueryRewriter(JdbcDataContext dataContext) { super(dataContext, FIRST_FETCH_SUPPORTING_VERSION); }
Source:
<code>public void testCorrectHeaderFormatWithNodeId() { <START> UserAgent baseUserAgent = UserAgent.of(UserAgent.Agent.of("service", "1.0.0"), "nodeId"); <END> assertThat(UserAgents.format(baseUserAgent)).isEqualTo("service/1.0.0 (nodeId:nodeId)"); UserAgent derivedAgent = baseUserAgent.addAgent(UserAgent.Agent.of("remoting", "2.0.0")); assertThat(UserAgents.format(derivedAgent)).isEqualTo("service/1.0.0 (nodeId:nodeId), remoting/2.0.0"); }</code><technical_language>a nodeId string nodeId this rendered</technical_language>

Target:
public void testCorrectHeaderFormatWithNodeId() { UserAgent baseUserAgent = UserAgent.of(UserAgent.Agent.of("service", "1.0.0"), "myNode"); assertThat(UserAgents.format(baseUserAgent)).isEqualTo("service/1.0.0 (nodeId:myNode)"); UserAgent derivedAgent = baseUserAgent.addAgent(UserAgent.Agent.of("remoting", "2.0.0")); assertThat(UserAgents.format(derivedAgent)).isEqualTo("service/1.0.0 (nodeId:myNode), remoting/2.0.0"); }
Source:
<code>public boolean isVerboseEnabled() { <START> return !verbose.isEmpty(); <END> }</code><technical_language>I if -Ddocker.verbose=false verbose logging disabled well. Please add a check for "false", too</technical_language>

Target:
public boolean isVerboseEnabled() { return isVerbose; }
Source:
<code><START> private void parseRClass(String respectivePackageName, String rClass) { <END> Element element; try { element = elementUtils.getTypeElement(rClass); } catch (MirroredTypeException mte) { element = typeUtils.asElement(mte.getTypeMirror()); } JCTree tree = (JCTree) trees.getTree(element); if (tree != null) { IdScanner idScanner = new IdScanner(symbols, respectivePackageName); tree.accept(idScanner); } else { parseCompiledR(respectivePackageName, (TypeElement) element); } }</code><technical_language>rename rPackageName</technical_language>

Target:
private void parseRClass(String respectivePackageName, String rClass) { Element element; try { element = elementUtils.getTypeElement(rClass); } catch (MirroredTypeException mte) { element = typeUtils.asElement(mte.getTypeMirror()); } JCTree tree = (JCTree) trees.getTree(element); if (tree != null) { IdScanner idScanner = new IdScanner(symbols, elementUtils.getPackageOf(element) .getQualifiedName().toString(), respectivePackageName); tree.accept(idScanner); } else { parseCompiledR(respectivePackageName, (TypeElement) element); } }
Source:
<code><START> public synchronized SSLContext getDefaultSSLContext() throws X509Exception.SSLContextException { <END> if (defaultSSLContext == null) { defaultSSLContext = createSSLContext(); } return defaultSSLContext; }</code><technical_language>Is aquire lock of read of this property</technical_language>

Target:
public SSLContext getDefaultSSLContext() throws X509Exception.SSLContextException { SSLContext result = defaultSSLContext.get(); if (result == null) { result = createSSLContext(); if (!defaultSSLContext.compareAndSet(null, result)) { result = defaultSSLContext.get(); } } return result; }
Source:
<code>@Override public void tag(String tag) throws IgniteCheckedException { if (tag == null || tag.isEmpty()) throw new IgniteCheckedException("Please provide not-null and not empty string for cluster tag"); if (tag.length() > MAX_TAG_LENGTH) throw new IgniteCheckedException("Maximum tag length is exceeded, max length is " + <START> MAX_TAG_LENGTH + <END> " symbols, provided value has " + tag.length() + " symbols."); if (!ctx.state().publicApiActiveState(true)) throw new IgniteCheckedException("Can not change cluster tag on inactive cluster. To activate the cluster call Ignite.active(true)."); ctx.cluster().updateTag(tag); }</code><technical_language>lines is required here. If is, CG mandate of curly brace here: if body longer line</technical_language>

Target:
@Override public void tag(String tag) throws IgniteCheckedException { if (tag == null || tag.isEmpty()) throw new IgniteCheckedException("Please provide not-null and not empty string for cluster tag"); if (tag.length() > MAX_TAG_LENGTH) { throw new IgniteCheckedException("Maximum tag length is exceeded, max length is " + MAX_TAG_LENGTH + " symbols, provided value has " + tag.length() + " symbols."); } if (!ctx.state().publicApiActiveState(true)) throw new IgniteCheckedException("Can not change cluster tag on inactive cluster. To activate the cluster call Ignite.active(true)."); ctx.cluster().updateTag(tag); }
Source:
<code><START> public boolean hasWindowOrJoins() { <END> Set<OperatorSpec> operatorSpecs = getAllOperatorSpecs(); Set<OperatorSpec> windowOrJoinSpecs = operatorSpecs.stream() .filter(spec -> spec.getOpCode() == OperatorSpec.OpCode.WINDOW || spec.getOpCode() == OperatorSpec.OpCode.JOIN) .collect(Collectors.toSet()); return windowOrJoinSpecs.size() != 0; }</code><technical_language>nit: window join interesting of identities, of behavior; depend "window" phase of event loop. If obvious name captures this, better. So, "hasTimedOperators" captures general behavior current examples. If is name in this case, feel free ignore</technical_language>

Target:
public boolean hasWindowOrJoins() { Collection<OperatorSpec> operatorSpecs = getAllOperatorSpecs(); Set<OperatorSpec> windowOrJoinSpecs = operatorSpecs.stream() .filter(spec -> spec.getOpCode() == OperatorSpec.OpCode.WINDOW || spec.getOpCode() == OperatorSpec.OpCode.JOIN) .collect(Collectors.toSet()); return windowOrJoinSpecs.size() != 0; }
Source:
<code>public Optional<String> checkValue(String value) { if (StringUtil.isBlank(value)) { return Optional.empty(); } if (value.equals(FIRST_EDITION)) { return Optional.of(Localization.lang("edition of book reported as just 1")); } if (bibDatabaseContextEdition.isBiblatexMode() && !ONLY_NUMERALS_OR_LITERALS.test(value.trim())) { return Optional.of(Localization.lang("should contain an integer or a literal")); } if (!bibDatabaseContextEdition.isBiblatexMode()) { if (!isFirstCharDigit(value) && (!allowIntegerEdition) && !FIRST_LETTER_CAPITALIZED.test(value.trim())) { return Optional.of(Localization.lang("should have the first letter capitalized")); } else { <START> if (ONLY_NUMERALS.test(value.trim()) && (!allowIntegerEdition) && !FIRST_LETTER_CAPITALIZED.test(value.trim())) { <END> return Optional.of(Localization.lang("should have the first letter capitalized")); } } } return Optional.empty(); }</code><technical_language>code test work if revert change</technical_language>

Target:
public Optional<String> checkValue(String value) { if (StringUtil.isBlank(value)) { return Optional.empty(); } if (value.equals(FIRST_EDITION)) { return Optional.of(Localization.lang("edition of book reported as just 1")); } if (bibDatabaseContextEdition.isBiblatexMode()) { if (!ONLY_NUMERALS_OR_LITERALS.test(value.trim())) { return Optional.of(Localization.lang("should contain an integer or a literal")); } } else { if (ONLY_NUMERALS.test(value) && (!allowIntegerEdition)) { return Optional.of(Localization.lang("no integer as values for edition allowed")); } } if (!isFirstCharDigit(value) && !FIRST_LETTER_CAPITALIZED.test(value.trim())) { return Optional.of(Localization.lang("should have the first letter capitalized")); } return Optional.empty(); }
Source:
<code>public AsyncJobStatus setContextOwner(Owner owner) { if (owner != null && owner.getId() == null) { <START> throw new IllegalArgumentException("owner is null and lacks an ID"); <END> } if (owner != null) { this.owner = owner; this.ownerId = owner.getId(); } else { this.owner = null; this.ownerId = null; } return this; }</code><technical_language>Typo here. "owner is non-null lacks ID"</technical_language>

Target:
public AsyncJobStatus setContextOwner(Owner owner) { if (owner != null) { if (owner.getId() == null) { throw new IllegalArgumentException("provided owner lacks an ID"); } this.owner = owner; this.ownerId = owner.getId(); } else { this.owner = null; this.ownerId = null; } return this; }
Source:
<code>public void ack(Tuple input) { if(stormIdName != null && input.contains(stormIdName)) { String stormId = input.getStringByField(stormIdName); Monitor.getMonitor().endLatency(pair(input), boltService, stormIdName, stormId, null ); } else { <START> Monitor.getMonitor().endLatency(pair(input), boltService, null ); <END> } super.ack(input); }</code><technical_language>/*error = */ null</technical_language>

Target:
public void ack(Tuple input) { if(stormIdName.isPresent() && input.contains(stormIdName.get())) { String stormId = input.getStringByField(stormIdName.get()); Monitor.getMonitor().endLatency(pair(input), boltService, stormIdName.get(), stormId, null ); } else { Monitor.getMonitor().endLatency(pair(input), boltService, null); } super.ack(input); }
Source:
<code>private DomainMonitoringResult analyzeDomainReport(VDSDomainsData tempData, StoragePool storagePool, boolean isLog) { if (!tempData.isActual() && FeatureSupported.reportWhetherDomainMonitoringResultIsActual(storagePool.getCompatibilityVersion())) { <START> log.error("Domain '{}' report isn't an actual report", <END> getDomainIdTuple(tempData.getDomainId())); return DomainMonitoringResult.NOT_ACTUAL; } if (tempData.getCode() != 0) { if (isLog) { log.error("Domain '{}' was reported with error code '{}'", getDomainIdTuple(tempData.getDomainId()), tempData.getCode()); } if (tempData.getCode() == VdcBllErrors.StorageDomainDoesNotExist.getValue() || tempData.getCode() == VdcBllErrors.StorageException.getValue()) { return DomainMonitoringResult.STORAGE_ACCCESS_ERROR; } return DomainMonitoringResult.PROBLEMATIC; } if (tempData.getLastCheck() > Config .<Double> getValue(ConfigValues.MaxStorageVdsTimeoutCheckSec)) { if (isLog) { log.error("Domain '{}' check timeout '{}' is too big", getDomainIdTuple(tempData.getDomainId()), tempData.getLastCheck()); } return DomainMonitoringResult.PROBLEMATIC; } return DomainMonitoringResult.OK; }</code><technical_language>log.warn - this error per-se</technical_language>

Target:
private DomainMonitoringResult analyzeDomainReport(VDSDomainsData tempData, StoragePool storagePool, boolean isLog) { if (!tempData.isActual() && FeatureSupported.reportWhetherDomainMonitoringResultIsActual(storagePool.getCompatibilityVersion())) { log.warn("Domain '{}' report isn't an actual report", getDomainIdTuple(tempData.getDomainId())); return DomainMonitoringResult.NOT_ACTUAL; } if (tempData.getCode() != 0) { if (isLog) { log.error("Domain '{}' was reported with error code '{}'", getDomainIdTuple(tempData.getDomainId()), tempData.getCode()); } if (tempData.getCode() == VdcBllErrors.StorageDomainDoesNotExist.getValue() || tempData.getCode() == VdcBllErrors.StorageException.getValue()) { return DomainMonitoringResult.STORAGE_ACCCESS_ERROR; } return DomainMonitoringResult.PROBLEMATIC; } if (tempData.getLastCheck() > Config .<Double> getValue(ConfigValues.MaxStorageVdsTimeoutCheckSec)) { if (isLog) { log.error("Domain '{}' check timeout '{}' is too big", getDomainIdTuple(tempData.getDomainId()), tempData.getLastCheck()); } return DomainMonitoringResult.PROBLEMATIC; } return DomainMonitoringResult.OK; }
Source:
<code>public static boolean isShowingEntireContents(StyledText widget) { if (widget.getTopPixel() != 0) return false; int lastVisiblePixel= computeLastVisiblePixel(widget); int bottom= widget.getLineIndex(lastVisiblePixel); <START> if (bottom + 1 < widget.getLineCount()) END> return false; int bottomLastPixel= getLinePixel(widget, bottom + 1) - 1; return bottomLastPixel <= lastVisiblePixel; }</code><technical_language>policy curly braces in JFace? In EGit require them</technical_language>

Target:
public static boolean isShowingEntireContents(StyledText widget) { if (widget.getTopPixel() != 0) { return false; } int lastVisiblePixel= computeLastVisiblePixel(widget); int bottom= widget.getLineIndex(lastVisiblePixel); if (bottom + 1 < widget.getLineCount()) { return false; } int bottomLastPixel= getLinePixel(widget, bottom + 1) - 1; return bottomLastPixel <= lastVisiblePixel; }
Source:
<code>private Plugin loadPlugin(String name, File srcPlugin, FileSnapshot snapshot) throws IOException, ClassNotFoundException, InvalidPluginException { File tmp; FileInputStream in = new FileInputStream(srcPlugin); String extension = getExtension(srcPlugin); try { tmp = asTemp(in, tempNameFor(name), extension, tmpDir); } finally { in.close(); } String pluginName = srcPlugin.getName(); if (isJarPlugin(pluginName)) { return loadJarPlugin(name, srcPlugin, snapshot, tmp); } else if (isJsPlugin(pluginName)) { <START> return loadJsPlugin(name, srcPlugin, snapshot); <END> } else { throw new RuntimeException("Unsupported plugin type"); } }</code><technical_language>loadJsPlugin need thmp above</technical_language>

Target:
private Plugin loadPlugin(String name, File srcPlugin, FileSnapshot snapshot) throws IOException, ClassNotFoundException, InvalidPluginException { String pluginName = srcPlugin.getName(); if (isJarPlugin(pluginName)) { File tmp; FileInputStream in = new FileInputStream(srcPlugin); String extension = getExtension(srcPlugin); try { tmp = asTemp(in, tempNameFor(name), extension, tmpDir); } finally { in.close(); } return loadJarPlugin(name, srcPlugin, snapshot, tmp); } else if (isJsPlugin(pluginName)) { return loadJsPlugin(name, srcPlugin, snapshot); } else { throw new InvalidPluginException(String.format( "Unsupported plugin type: ", srcPlugin.getName())); } }
Source:
<code>public TargetRoll getAllModsForMaintenance() { TargetRoll mods = new TargetRoll(campaign.getCampaignOptions().getMaintenanceBonus(), "maintenance"); mods.addModifier(Availability.getTechModifier(getTechRating()), "tech rating " + ITechnology.getRatingName(getTechRating())); <START> if(null != getUnit()) { <END> mods.append(getUnit().getSiteMod()); if(getUnit().getEntity().hasQuirk("easy_maintain")) { mods.addModifier(-1, "easy to maintain"); } else if(getUnit().getEntity().hasQuirk("difficult_maintain")) { mods.addModifier(1, "difficult to maintain"); } if(isClanTechBase() || (this instanceof MekLocation && getUnit().getEntity().isClan())) { if (getUnit().getTech() == null) { mods.addModifier(2, "Clan tech"); } else if (!getUnit().getTech().isClanner() && !getUnit().getTech().getOptions().booleanOption(PersonnelOptions.TECH_CLAN_TECH_KNOWLEDGE)) { mods.addModifier(2, "Clan tech"); } } } if(campaign.getCampaignOptions().useQualityMaintenance()) { switch(quality) { case QUALITY_A: mods.addModifier(3, "Quality A"); break; case QUALITY_B: mods.addModifier(2, "Quality B"); break; case QUALITY_C: mods.addModifier(1, "Quality C"); break; case QUALITY_D: mods.addModifier(0, "Quality D"); break; case QUALITY_E: mods.addModifier(-1, "Quality E"); break; case QUALITY_F: mods.addModifier(-2, "Quality F"); break; } } return mods; }</code><technical_language>suggestion if (null != getUnit()) {</technical_language>

Target:
public TargetRoll getAllModsForMaintenance() { TargetRoll mods = new TargetRoll(campaign.getCampaignOptions().getMaintenanceBonus(), "maintenance"); mods.addModifier(Availability.getTechModifier(getTechRating()), "tech rating " + ITechnology.getRatingName(getTechRating())); if (null != getUnit()) { mods.append(getUnit().getSiteMod()); if (getUnit().getEntity().hasQuirk("easy_maintain")) { mods.addModifier(-1, "easy to maintain"); } else if (getUnit().getEntity().hasQuirk("difficult_maintain")) { mods.addModifier(1, "difficult to maintain"); } if (isClanTechBase() || ((this instanceof MekLocation) && getUnit().getEntity().isClan())) { if (getUnit().getTech() == null) { mods.addModifier(2, "Clan tech"); } else if (!getUnit().getTech().isClanner() && !getUnit().getTech().getOptions().booleanOption(PersonnelOptions.TECH_CLAN_TECH_KNOWLEDGE)) { mods.addModifier(2, "Clan tech"); } } } if(campaign.getCampaignOptions().useQualityMaintenance()) { switch(quality) { case QUALITY_A: mods.addModifier(3, "Quality A"); break; case QUALITY_B: mods.addModifier(2, "Quality B"); break; case QUALITY_C: mods.addModifier(1, "Quality C"); break; case QUALITY_D: mods.addModifier(0, "Quality D"); break; case QUALITY_E: mods.addModifier(-1, "Quality E"); break; case QUALITY_F: mods.addModifier(-2, "Quality F"); break; } } return mods; }
Source:
<code>public void testListAvailableContainers() { final long count = testingPostgres.runSelectStatement("select count(*) from tool where ispublished='f'", long.class); <START> assertEquals("there should be 4 entries, there are " + count, 6, count); <END> }</code><technical_language>Mismatch count in error message. leave number out of error message. automatically expected 6 actual w/e</technical_language>

Target:
public void testListAvailableContainers() { final long count = testingPostgres.runSelectStatement("select count(*) from tool where ispublished='f'", long.class); assertEquals("unpublished entries should match", 6, count); }
Source:
<code>public Rule deepCopy() { Rule rule = null; try { rule = getClass().newInstance(); } catch (InstantiationException | IllegalAccessException e) { } rule.setName(getName()); rule.setLanguage(getLanguage()); rule.setMinimumLanguageVersion(getMinimumLanguageVersion()); rule.setMaximumLanguageVersion(getMaximumLanguageVersion()); rule.setSince(getSince()); rule.setMessage(getMessage()); rule.setRuleSetName(getRuleSetName()); rule.setExternalInfoUrl(getExternalInfoUrl()); if (usesDFA()) { rule.setUsesDFA(); } if (usesTypeResolution()) { rule.setUsesTypeResolution(); } if (usesMetrics()) { rule.setUsesMetrics(); } rule.setDescription(getDescription()); for (final String example : getExamples()) { rule.addExample(example); } rule.setPriority(getPriority()); <START> for (final PropertyDescriptor<?> prop : getPropertyDescriptors()) { <END> final PropertyDescriptor<?> existingProp = rule.getPropertyDescriptor(prop.name()); if (existingProp == null) { rule.definePropertyDescriptor(prop); } rule.setProperty((PropertyDescriptor<Object>) prop, getProperty((PropertyDescriptor<Object>) prop)); } return rule; }</code><technical_language>In AbstractPropertySource some methods, (or need adjusted do a real deep copy): copyPropertyDescriptors, hasDescriptor</technical_language>

Target:
public Rule deepCopy() { Rule rule = null; try { rule = getClass().newInstance(); } catch (InstantiationException | IllegalAccessException e) { } rule.setName(getName()); rule.setLanguage(getLanguage()); rule.setMinimumLanguageVersion(getMinimumLanguageVersion()); rule.setMaximumLanguageVersion(getMaximumLanguageVersion()); rule.setSince(getSince()); rule.setMessage(getMessage()); rule.setRuleSetName(getRuleSetName()); rule.setExternalInfoUrl(getExternalInfoUrl()); if (usesDFA()) { rule.setUsesDFA(); } if (usesTypeResolution()) { rule.setUsesTypeResolution(); } if (usesMetrics()) { rule.setUsesMetrics(); } rule.setDescription(getDescription()); for (final String example : getExamples()) { rule.addExample(example); } rule.setPriority(getPriority()); for (final PropertyDescriptor<?> prop : getPropertyDescriptors()) { if (!rule.hasDescriptor(prop)) { rule.definePropertyDescriptor(prop); } rule.setProperty((PropertyDescriptor<Object>) prop, getProperty((PropertyDescriptor<Object>) prop)); } return rule; }
Source:
<code>public void pillowfight(String targetHostnameAndPort, String bucket, String username, String password, Integer iterations, Integer numItems, String keyPrefix, Integer numThreads, Integer numInstances, Integer randomSeed, Integer ratio, Integer minSize, Integer maxSize) { <START> ((CouchbaseLoadGeneratorDriver)getDriver()).pillowfight(targetHostnameAndPort, bucket, username, password, <END> iterations, numItems, keyPrefix, numThreads, numInstances, randomSeed, ratio, minSize, maxSize); }</code><technical_language>add a getDriver() override returns a cast of super.getDriver() this neater</technical_language>

Target:
public void pillowfight(String targetHostnameAndPort, String bucket, String username, String password, Integer iterations, Integer numItems, String keyPrefix, Integer numThreads, Integer numInstances, Integer randomSeed, Integer ratio, Integer minSize, Integer maxSize) { getDriver().pillowfight(targetHostnameAndPort, bucket, username, password, iterations, numItems, keyPrefix, numThreads, numInstances, randomSeed, ratio, minSize, maxSize); }
Source:
<code>public void handleNewSession() { <START> LOG.info("ZkStateChangeListener:: A new session established."); <END> }</code><technical_language>nit: session established -> session established</technical_language>

Target:
public void handleNewSession() { LOG.info("ZkStateChangeListener::A new session has been established."); }