auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void submitCategory() { <START> pressEnter(categoryInput); <END> }</code><technical_language>log</technical_language>

Target:
public void submitCategory() { pressEnter(categoryInput); PageObjectLogging.log("submitCategory", "category submitted", true); }
Source:
<code>public Content readme() { <START> return new RtReadme(this.request); <END> }</code><technical_language>Hm.. this is strange. new RtContent(this.request, "README.md")</technical_language>

Target:
public Content readme() { return new RtReadme(this.entry, this.owner); }
Source:
<code>public Map<Long, String> getFirmwareHistory(@Scope(OAuthScope.ADMINISTRATION_READ) final AccessToken accessToken, @PathParam("device_id") final String deviceId) { if(deviceId == null) { LOGGER.error("Missing device_id parameter"); throw new WebApplicationException(Response.Status.BAD_REQUEST); } final Jedis jedis = jedisPool.getResource(); <START> final TreeMap<Long, String> fwHistory = new TreeMap<>(); <END> try { final Set<Tuple> seenFirmwares = jedis.zrangeWithScores(REDIS_SEEN_FIRMWARE_KEY, 0, -1); for (final Tuple fwInfo:seenFirmwares) { final long lastSeen = (long) fwInfo.getScore(); fwHistory.put(lastSeen, fwInfo.getElement()); } } catch (Exception e) { LOGGER.error("Failed retrieving fw history for device.", e.getMessage()); } finally { jedisPool.returnResource(jedis); } return fwHistory; }</code><technical_language>Guava style map creation</technical_language>

Target:
public TreeMap<Long, String> getFirmwareHistory(@Scope(OAuthScope.ADMINISTRATION_READ) final AccessToken accessToken, @PathParam("device_id") final String deviceId) { if(deviceId == null) { LOGGER.error("Missing device_id parameter"); throw new WebApplicationException(Response.Status.BAD_REQUEST); } final Jedis jedis = jedisPool.getResource(); final TreeMap<Long, String> fwHistory = Maps.newTreeMap(); try { final Set<Tuple> seenFirmwares = jedis.zrangeWithScores(REDIS_SEEN_FIRMWARE_KEY, 0, -1); for (final Tuple fwInfo:seenFirmwares) { final long lastSeen = (long) fwInfo.getScore(); fwHistory.put(lastSeen, fwInfo.getElement()); } } catch (Exception e) { LOGGER.error("Failed retrieving fw history for device.", e.getMessage()); } finally { jedisPool.returnResource(jedis); } return fwHistory; }
Source:
<code>public View getView(int position, View convertView, ViewGroup parent) { View v = super.getView(position, convertView, parent); <START> v.setBackgroundColor(Color.TRANSPARENT); <END> if (mSelection.get(position) != null) { v.setBackgroundColor(parent.getResources().getColor(R.color.emphasis)); } return v; }</code><technical_language>put this in else clause</technical_language>

Target:
public View getView(int position, View convertView, ViewGroup parent) { View v = super.getView(position, convertView, parent); if (mSelection.get(position) != null) { v.setBackgroundColor(parent.getResources().getColor(R.color.emphasis)); } else { v.setBackgroundColor(Color.TRANSPARENT); } return v; }
Source:
<code>public List<String> getParentNames() { if (parents == null || parents.size() == 0) return null; <START> List<String> st = new ArrayList<String>(); <END> for (Project.NameKey name : parents) st.add(name.get()); return st; }</code><technical_language>new ArrayList<String>(parents.size())</technical_language>

Target:
public List<String> getParentNames() { if (parents == null || parents.size() == 0) { return Collections.emptyList(); } List<String> st = new ArrayList<String>(parents.size()); for (Project.NameKey name : parents) { st.add(name.get()); } return st; }
Source:
<code>public boolean isFlattened() { int n = numGeometries(); if (n > 3) return false; for (int i = 0; i < n; ++i) { OGCGeometry g = geometryN(i); if (g.isEmpty()) return false; String t = g.geometryType(); if (t != OGCMultiPoint.TYPE && t != OGCMultiPolygon.TYPE && t != OGCMultiLineString.TYPE) return false; } <START> return true; <END> }</code><technical_language>a collection of OGCMultiPoints incorrectly return true</technical_language>

Target:
public boolean isFlattened() { int n = numGeometries(); if (n > 3) return false; int dimension = -1; for (int i = 0; i < n; ++i) { OGCGeometry g = geometryN(i); if (g.isEmpty()) return false; String t = g.geometryType(); if (t != OGCMultiPoint.TYPE && t != OGCMultiPolygon.TYPE && t != OGCMultiLineString.TYPE) return false; int d = g.dimension(); if (d <= dimension) return false; dimension = d; } return true; }
Source:
<code>public String getTitle() { <START> return "Empty Project Screen"; <END> }</code><technical_language>i18n</technical_language>

Target:
public String getTitle() { return ts.getTranslation( LibraryConstants.EmptyLibraryScreen ); }
Source:
<code>private void assertValid(float num) { <START> if(num == Float.NaN) { <END> throw new RuntimeException("Direction can not take a NaN float as an argument"); } else if (num == Float.NEGATIVE_INFINITY || num == Float.POSITIVE_INFINITY) { throw new RuntimeException("Direction can not take +/- infinity as an argument"); } }</code><technical_language>comparisons involving NaN (except !=) return false, Float.NaN == Float.NaN returns false. This Float.isNaN(num) instead. a Float.isInfinite(num) method for next check</technical_language>

Target:
private void assertValid(float num) { if(Float.isNaN(num)) { throw new RuntimeException("Direction can not take a NaN float as an argument"); } else if (Float.isInfinite(num)) { throw new RuntimeException("Direction can not take +/- infinity as an argument"); } }
Source:
<code>private void initMetadataMap(EntityMetadata emd, String entityName, String rootRequestVersion) { metadataMap.put(entityName, emd); Set<String> deferred = new HashSet<>(); FieldCursor cursor = emd.getFieldCursor(); while (cursor.next()) { FieldTreeNode node = cursor.getCurrentNode(); if (node instanceof ReferenceField) { ReferenceField ref = (ReferenceField) node; String name = ref.getEntityName(); String ver = ref.getVersionValue(); EntityMetadata refMd; <START> if (ver == emd.getEntityInfo().getDefaultVersion()) { <END> refMd = metadataMap.get(entityName); } else { refMd = md.getEntityMetadata(name, ver); } if (refMd == null || refMd.getEntitySchema() == null) { throw Error.get(CrudConstants.ERR_UNKNOWN_ENTITY, name + ":" + ver); } else if (refMd.getEntitySchema().getStatus() == MetadataStatus.DISABLED) { throw Error.get(CrudConstants.ERR_DISABLED_METADATA, name + ":" + ver); } String defaultVer = refMd.getEntityInfo().getDefaultVersion(); EntityMetadata found = metadataMap.get(name); if (found != null) { String foundVer = found.getVersion().getValue(); if (isValidReference(foundVer, rootRequestVersion, defaultVer)) { if (ver != defaultVer) { metadataMap.put(name, refMd); } else { deferred.add(name); } } else { throw Error.get(CrudConstants.ERR_METADATA_APPEARS_TWICE, name + ":" + ver + " and " + foundVer); } } else { if (ver != defaultVer) { metadataMap.put(name, refMd); } else { deferred.add(name); } } } } deferred.forEach(n -> { String def = md.getEntityInfo(n).getDefaultVersion(); metadataMap.put(n, md.getEntityMetadata(n, def)); }); }</code><technical_language>if association is default version, ver=null. So, this comparison is wrong. if(ver==null), add this deferred loads, load later</technical_language>

Target:
private void initMetadataMap(EntityMetadata emd, String entityName, String rootRequestVersion) { metadataMap.put(entityName, emd); Set<String> deferred = new HashSet<>(); FieldCursor cursor = emd.getFieldCursor(); while (cursor.next()) { FieldTreeNode node = cursor.getCurrentNode(); if (node instanceof ReferenceField) validateRefField(emd, entityName, rootRequestVersion, deferred, (ReferenceField) node); } deferred.forEach(n -> { String def = md.getEntityInfo(n).getDefaultVersion(); if (def == null) { throw Error.get(CrudConstants.ERR_UNKNOWN_ENTITY, n + ":default"); } metadataMap.put(n, md.getEntityMetadata(n, def)); }); }
Source:
<code>public String convertToDatabaseColumn(Map<String, String> attribute) { <START> ObjectMapper mapper = new ObjectMapper(); <END> try { return (mapper.writeValueAsString(attribute)); } catch (Exception e) { LOG.warn("Could not convert JSON value to PostgreSQL format: " + e.getMessage()); LOG.debug("Stack trace: " + e.toString()); } return "{}"; }</code><technical_language>I this a difference, instance of Shogun2JsonObjectMapper here? <LINK_0></technical_language>

Target:
public String convertToDatabaseColumn(Map<String, String> attribute) { Shogun2JsonObjectMapper mapper = new Shogun2JsonObjectMapper(); try { return (mapper.writeValueAsString(attribute)); } catch (Exception e) { LOG.warn("Could not convert JSON value to PostgreSQL format: " + e.getMessage()); LOG.debug("Stack trace: " + e.toString()); } return "{}"; }
Source:
<code>public FeedbackQuestionDetails getQuestionDetails() { <START> if (questionType == FeedbackQuestionType.TEXT && !isJsonValid(questionMetaData.getValue())) { <END> return new FeedbackTextQuestionDetails(questionMetaData.getValue()); } Gson gson = Utils.getTeammatesGson(); return gson.fromJson(questionMetaData.getValue(), getFeedbackQuestionDetailsClass()); }</code><technical_language>extract questionMetaData.getValue() a variable is thrice in this method</technical_language>

Target:
public FeedbackQuestionDetails getQuestionDetails() { final String questionMetaDataValue = questionMetaData.getValue(); if (questionType == FeedbackQuestionType.TEXT && !isValidJsonString(questionMetaDataValue)) { return new FeedbackTextQuestionDetails(questionMetaDataValue); } Gson gson = Utils.getTeammatesGson(); return gson.fromJson(questionMetaDataValue, getFeedbackQuestionDetailsClass()); }
Source:
<code>protected T query(Uri uri) { Cursor cursor = contentResolver.query(uri, SerializedJsonContract.PROJECTION, null, null, null); <START> T gitHubRepository = null; <END> if (cursor.moveToFirst()) { final String json = cursor.getString(cursor.getColumnIndex(GitHubRepositoryContract.JSON)); gitHubRepository = new Gson().fromJson(json, type); } else { Log.e(TAG, "Could not find with id: " + uri); } cursor.close(); Log.d(TAG, "" + gitHubRepository); return gitHubRepository; }</code><technical_language>class is generic, a contract more abstract. remove "gitHub" specific stuff</technical_language>

Target:
protected T query(Uri uri) { Cursor cursor = contentResolver.query(uri, SerializedJsonContract.PROJECTION, null, null, null); T value = null; if (cursor.moveToFirst()) { final String json = cursor.getString(cursor.getColumnIndex(SerializedJsonContract.JSON)); value = new Gson().fromJson(json, type); } else { Log.e(TAG, "Could not find with id: " + uri); } cursor.close(); Log.d(TAG, "" + value); return value; }
Source:
<code>public Object invoke(MethodInvocation invocation) throws Throwable { Object[] args = invocation.getArguments(); if (args.length > 0) { arguments.add(args); } Object result = invocation.proceed(); if (args.length > 0 && result != null) { this.returns.put(result); } <START> return result; <END> }</code><technical_language>Continuing ArgumentsAndResult discussion, I robust expose arguments invocation.proceed() returns. some hook expect Exception\- try...catch invocation.proceed()</technical_language>

Target:
public Object invoke(MethodInvocation invocation) throws Throwable { Object result = null; boolean isListenerMethod = AnnotationUtils.findAnnotation(invocation.getMethod(), RabbitListener.class) != null || AnnotationUtils.findAnnotation(invocation.getMethod(), RabbitHandler.class) != null; try { result = invocation.proceed(); if (isListenerMethod) { this.invocationData.put(new InvocationData(invocation, result)); } } catch (Throwable t) { if (isListenerMethod) { this.invocationData.put(new InvocationData(invocation, t)); } throw t; } return result; }
Source:
<code>public void onFoldChange(FoldChangeEvent event) { <START> checkForRemove_ = true; <END> }</code><technical_language>avoid this state management deferring code needs run next event loop (e.g. Scheduler.get().scheduleDeferred())? (Only suggesting this if management a bit tidier)</technical_language>

Target:
public void onFoldChange(FoldChangeEvent event) { if (folded_ != folded()) { folded_ = folded(); if (folded_) { widget_.setVisible(false); } else { widget_.setVisible(true); } return; } checkForRemove_ = true; }
Source:
<code>@Deprecated public RequestCreator skipMemoryCache() { <START> return memoryPolicy(NO_CACHE); <END> }</code><technical_language>original behaviour skip writing memory cache well, this same. java return memoryPolicy(NO_CACHE, NO_STORE);</technical_language>

Target:
@Deprecated public RequestCreator skipMemoryCache() { return memoryPolicy(NO_CACHE, NO_STORE); }
Source:
<code>public void testCanEditTransientAttribute() throws InterruptedException { final String serviceName = createUniqueBusinessServiceName(); BsmAdminPageEditWindow bsmAdminPageEditWindow = bsmAdminPage.openNewDialog(serviceName).addAttribute("foo", "bar"); wait.until(pageContainsText("foo=bar")); <START> bsmAdminPageEditWindow.cancel(); <END> }</code><technical_language>Please verify attribute foo = bar set please delete Business Service afterwards</technical_language>

Target:
public void testCanEditTransientAttribute() throws InterruptedException { final String serviceName = createUniqueBusinessServiceName(); BsmAdminPageEditWindow bsmAdminPageEditWindow = bsmAdminPage.openNewDialog(serviceName).addAttribute("foo", "bar"); wait.until(pageContainsText("foo=bar")); bsmAdminPageEditWindow.save(); bsmAdminPageEditWindow = bsmAdminPage.openEditDialog(serviceName).editAttribute("foo=bar", "123"); verifyElementPresent("foo=123"); bsmAdminPageEditWindow.cancel(); bsmAdminPageEditWindow = bsmAdminPage.openEditDialog(serviceName); verifyElementNotPresent("foo=123"); bsmAdminPageEditWindow.cancel(); bsmAdminPage.delete(serviceName); }
Source:
<code>public abstract MultiEnvironment bind(@Nonnull Run<?,?> build, FilePath workspace, Launcher launcher, TaskListener listener) throws IOException, InterruptedException; public abstract Set<String> variables(); protected final @Nonnull C getCredentials(@Nonnull Run<?,?> build) throws IOException { IdCredentials cred = CredentialsProvider.findCredentialById(credentialsId, IdCredentials.class, build); <START> CredentialsProvider.track(build, cred); <END> if (cred==null) throw new CredentialNotFoundException(credentialsId); if (type().isInstance(cred)) return type().cast(cred); Descriptor expected = Jenkins.getActiveInstance().getDescriptor(type()); throw new CredentialNotFoundException("Credentials '"+credentialsId+"' is of type '"+ cred.getDescriptor().getDisplayName()+"' where '"+ (expected!=null ? expected.getDisplayName() : type().getName())+ "' was expected"); }</code><technical_language>moved if block returns a value</technical_language>

Target:
public abstract MultiEnvironment bind(@Nonnull Run<?,?> build, FilePath workspace, Launcher launcher, TaskListener listener) throws IOException, InterruptedException; public abstract Set<String> variables(); protected final @Nonnull C getCredentials(@Nonnull Run<?,?> build) throws IOException { IdCredentials cred = CredentialsProvider.findCredentialById(credentialsId, IdCredentials.class, build); if (cred==null) throw new CredentialNotFoundException(credentialsId); if (type().isInstance(cred)) { CredentialsProvider.track(build, cred); return type().cast(cred); } Descriptor expected = Jenkins.getActiveInstance().getDescriptor(type()); throw new CredentialNotFoundException("Credentials '"+credentialsId+"' is of type '"+ cred.getDescriptor().getDisplayName()+"' where '"+ (expected!=null ? expected.getDisplayName() : type().getName())+ "' was expected"); }
Source:
<code>private void createOpenShiftConnectionControl(Composite parent, DataBindingContext dbc) { Label lblConnection = new Label(parent, SWT.NONE); lblConnection.setText("OpenShift Connection: "); GridDataFactory.fillDefaults() .align(SWT.FILL, SWT.CENTER) .applyTo(lblConnection); final Text connectionText = new Text(parent, SWT.BORDER | SWT.READ_ONLY); GridDataFactory.fillDefaults() .align(SWT.FILL, SWT.CENTER) .span(2, 1) .grab(true, false) .applyTo(connectionText); final IObservableValue connnectionTextObservable = WidgetProperties.text(SWT.None).observe(connectionText); final IObservableValue connnectionObservable = BeanProperties.value(IDeployImagePageModel.PROPERTY_CONNECTION).observe(model); ValueBindingBuilder.bind(connnectionTextObservable) <START> .to(connnectionObservable) <END> .converting(new ObjectToStringConverter(Connection.class) { ConnectionColumLabelProvider labelProvider = new ConnectionColumLabelProvider(); @Override public Object convert(Object source) { return source == null ? "" : labelProvider.getText(source); } }) .in(dbc); }</code><technical_language>add .notConvertingParticipant() update strategy text -> model is attached</technical_language>

Target:
private void createOpenShiftConnectionControl(Composite parent, DataBindingContext dbc) { Label lblConnection = new Label(parent, SWT.NONE); lblConnection.setText("OpenShift Connection: "); GridDataFactory.fillDefaults() .align(SWT.FILL, SWT.CENTER) .applyTo(lblConnection); final Text connectionText = new Text(parent, SWT.BORDER | SWT.READ_ONLY); connectionText.setBackground(lblConnection.getBackground()); GridDataFactory.fillDefaults() .align(SWT.FILL, SWT.CENTER) .span(2, 1) .grab(true, false) .applyTo(connectionText); final IObservableValue connnectionTextObservable = WidgetProperties.text(SWT.None).observe(connectionText); final IObservableValue connnectionObservable = BeanProperties.value(IDeployImagePageModel.PROPERTY_CONNECTION).observe(model); ValueBindingBuilder.bind(connnectionTextObservable) .notUpdatingParticipant() .to(connnectionObservable) .converting(new ObjectToStringConverter(Connection.class) { ConnectionColumLabelProvider labelProvider = new ConnectionColumLabelProvider(); @Override public Object convert(Object source) { return source == null ? "" : labelProvider.getText(source); } }) .in(dbc); }
Source:
<code>public synchronized TagName addTagName(String displayName, String description, TagName.HTML_COLOR color) throws TagNameAlreadyExistsException, TskCoreException { TskData.FileKnown knownStatus = TskData.FileKnown.UNKNOWN; if (getNotableTagDisplayNames().contains(displayName)) { knownStatus = TskData.FileKnown.BAD; } <START> return addTagName(displayName, description, color, knownStatus); <END> }</code><technical_language>pass unknown args method, I a tad simpler</technical_language>

Target:
public synchronized TagName addTagName(String displayName, String description, TagName.HTML_COLOR color) throws TagNameAlreadyExistsException, TskCoreException { return addTagName(displayName, description, color, knownStatus,TskData.FileKnown.UNKNOWN); }
Source:
<code>public void setUp() throws Exception { domainList = new MemoryDomainList(new InMemoryDNSService() .registerMxRecord(Domain.LOCALHOST.asString(), "127.0.0.1") .registerMxRecord(LOCAL_DOMAIN, "127.0.0.1") .registerMxRecord("examplebis.local", "127.0.0.1") .registerMxRecord("127.0.0.1", "127.0.0.1")); domainList.setAutoDetect(false); <START> domainList.setAutoDetectIP(false); <END> domainList.addDomain(Domain.LOCALHOST); domainList.addDomain(Domain.of(LOCAL_DOMAIN)); domainList.addDomain(Domain.of("examplebis.local")); usersRepository = MemoryUsersRepository.withVirtualHosting(domainList); createMailRepositoryStore(); setUpFakeLoader(); hashedWheelTimer = new HashedWheelTimer(); setUpSMTPServer(); }</code><technical_language><LINK_0> merged, rebase this syntax for DomainList</technical_language>

Target:
public void setUp() throws Exception { domainList = new MemoryDomainList(new InMemoryDNSService() .registerMxRecord(Domain.LOCALHOST.asString(), "127.0.0.1") .registerMxRecord(Domain.LOCALHOST.asString(), "127.0.0.1") .registerMxRecord(LOCAL_DOMAIN, "127.0.0.1") .registerMxRecord("examplebis.local", "127.0.0.1") .registerMxRecord("127.0.0.1", "127.0.0.1")); domainList.configure(DomainListConfiguration.DEFAULT); domainList.addDomain(Domain.of(LOCAL_DOMAIN)); domainList.addDomain(Domain.of("examplebis.local")); usersRepository = MemoryUsersRepository.withVirtualHosting(domainList); usersRepository.addUser(BOB, PASSWORD); createMailRepositoryStore(); setUpFakeLoader(); hashedWheelTimer = new HashedWheelTimer(); setUpSMTPServer(); }
Source:
<code>public IChromosome[] readChromosomes(ISpeciesRoot speciesRoot){ IChromosomeType[] chromosomeTypes = speciesRoot.getKaryotype(); int types = readVarInt(); IChromosome[] chromosomes = new IChromosome[chromosomeTypes.length]; String primarySpeciesUid = null; String secondarySpeciesUid = null; for (IChromosomeType type : chromosomeTypes) { int index = type.ordinal(); <START> int bit = (1 << chromosomeTypes.length - index - 1); <END> if ((bit & types) != bit) { continue; } Chromosome chromosome = Chromosome.create(primarySpeciesUid, secondarySpeciesUid, type, readAllele(), readAllele()); chromosomes[index] = chromosome; if (index == speciesRoot.getSpeciesChromosomeType().ordinal()) { primarySpeciesUid = chromosome.getPrimaryAllele().getUID(); secondarySpeciesUid = chromosome.getSecondaryAllele().getUID(); } } return chromosomes; }</code><technical_language>is this doing? I do understand it</technical_language>

Target:
public IChromosome[] readChromosomes(ISpeciesRoot speciesRoot){ IChromosomeType[] chromosomeTypes = speciesRoot.getKaryotype(); IChromosome[] chromosomes = new IChromosome[chromosomeTypes.length]; String primarySpeciesUid = null; String secondarySpeciesUid = null; for (IChromosomeType type : chromosomeTypes) { int index = type.ordinal(); Chromosome chromosome = readChromosome(type, primarySpeciesUid, secondarySpeciesUid); chromosomes[index] = chromosome; if (type == speciesRoot.getSpeciesChromosomeType()) { primarySpeciesUid = chromosome.getActiveAllele().getUID(); secondarySpeciesUid = chromosome.getInactiveAllele().getUID(); } } return chromosomes; }
Source:
<code>public void expandJar_shouldExpandDirectoryWithParentTreeIfNameIsDirectoryAndKeepFullPathIsTrue() throws IOException { final int numberOfFilesInSpecifiedJarDirectory = 2; String directoryPath = "META-INF/maven/org.openmrs.module/test1-api"; File destinationFolder = this.getEmptyJarDestinationFolder(); ModuleUtil.expandJar(getJarFile(), destinationFolder, directoryPath, true); <START> Object[] filesList = FileUtils.listFiles(destinationFolder, null, true).toArray(); <END> Assert.assertEquals(numberOfFilesInSpecifiedJarDirectory, filesList.length); String expectedPath = destinationFolder.getPath() + File.separator + directoryPath.replace("/", File.separator) + File.separator; String ActualPath = ((File)filesList[0]).getPath().replace(((File)filesList[0]).getName(), ""); Assert.assertEquals(expectedPath, ActualPath); FileUtils.deleteDirectory(destinationFolder); }</code><technical_language>type File instead of Object dont need cast multiple times on. a list: List<File> filesList = (List<File>) FileUtils.listFiles(destinationFolder, null, true);</technical_language>

Target:
public void expandJar_shouldExpandDirectoryWithParentTreeIfNameIsDirectoryAndKeepFullPathIsTrue() throws Exception { final int numberOfFilesInSpecifiedJarDirectory = 2; String directoryPath = "META-INF/maven/org.openmrs.module/test1-api"; File destinationFolder = this.getEmptyJarDestinationFolder(); ModuleUtil.expandJar(getJarFile(), destinationFolder, directoryPath, true); List<File> actualExpandedFiles = (List<File>)FileUtils.listFiles(destinationFolder, null, true); Assert.assertEquals(numberOfFilesInSpecifiedJarDirectory, actualExpandedFiles.size()); File expectedPath = new File(destinationFolder, directoryPath); Assert.assertEquals(expectedPath.toString(), actualExpandedFiles.get(0).getParent()); FileUtils.deleteDirectory(destinationFolder); }
Source:
<code>private Ordering<Row> metricOrdering(final String column, final Comparator comparator) { <START> return Ordering.from(Comparator.comparing((Row row) -> row.getRaw(column), Comparator.nullsFirst(comparator))); <END> }</code><technical_language>Why</technical_language>

Target:
private Ordering<Row> metricOrdering(final String column, final Comparator comparator) { if (NullHandling.sqlCompatible()) { return Ordering.from(Comparator.comparing((Row row) -> row.getRaw(column), Comparator.nullsFirst(comparator))); } else { return Ordering.from(Comparator.comparing((Row row) -> row.getRaw(column), Comparator.nullsLast(comparator))); } }
Source:
<code>public void testV2LsRefs() throws Exception { RevCommit tip = remote.commit().message("message").create(); remote.update("master", tip); server.updateRef("HEAD").link("refs/heads/master"); RevTag tag = remote.tag("tag", tip); remote.update("refs/tags/tag", tag); ByteArrayInputStream recvStream = uploadPackV2("command=ls-refs\n", <START> PacketLineIn.DELIM, PacketLineIn.END); <END> PacketLineIn pckIn = new PacketLineIn(recvStream); assertThat(pckIn.readString(), is(tip.toObjectId().getName() + " HEAD")); assertThat(pckIn.readString(), is(tip.toObjectId().getName() + " refs/heads/master")); assertThat(pckIn.readString(), is(tag.toObjectId().getName() + " refs/tags/tag")); assertTrue(pckIn.readString() == PacketLineIn.END); }</code><technical_language>is DELIM needed here</technical_language>

Target:
public void testV2LsRefs() throws Exception { RevCommit tip = remote.commit().message("message").create(); remote.update("master", tip); server.updateRef("HEAD").link("refs/heads/master"); RevTag tag = remote.tag("tag", tip); remote.update("refs/tags/tag", tag); ByteArrayInputStream recvStream = uploadPackV2("command=ls-refs\n", PacketLineIn.END); PacketLineIn pckIn = new PacketLineIn(recvStream); assertThat(pckIn.readString(), is(tip.toObjectId().getName() + " HEAD")); assertThat(pckIn.readString(), is(tip.toObjectId().getName() + " refs/heads/master")); assertThat(pckIn.readString(), is(tag.toObjectId().getName() + " refs/tags/tag")); assertTrue(pckIn.readString() == PacketLineIn.END); }
Source:
<code>private List<EventHandler<ActiveContext>> getActiveContextHandler(final String namespace) { <START> final List<EventHandler<ActiveContext>> activeContextHandlers = new ArrayList<>(3); <END> switch (namespace) { case NAMESPACE_SERVER: activeContextHandlers.add(asyncDolphinDriver.get().getFirstContextActiveHandlerForServer(true)); activeContextHandlers.add(new ServerContextActiveHandler()); break; case NAMESPACE_WORKER: activeContextHandlers.add(asyncDolphinDriver.get().getFirstContextActiveHandlerForWorker(true)); activeContextHandlers.add(new WorkerContextActiveHandler()); break; default: throw new RuntimeException("Unsupported namespace"); } return activeContextHandlers; }</code><technical_language>initial size of list is _2_..</technical_language>

Target:
private List<EventHandler<ActiveContext>> getActiveContextHandler(final String namespace) { final List<EventHandler<ActiveContext>> activeContextHandlers = new ArrayList<>(2); switch (namespace) { case NAMESPACE_SERVER: activeContextHandlers.add(asyncDolphinDriver.get().getFirstContextActiveHandlerForServer(true)); activeContextHandlers.add(new ServerContextActiveHandler()); break; case NAMESPACE_WORKER: activeContextHandlers.add(asyncDolphinDriver.get().getFirstContextActiveHandlerForWorker(true)); activeContextHandlers.add(new WorkerContextActiveHandler()); break; default: throw new RuntimeException("Unsupported namespace"); } return activeContextHandlers; }
Source:
<code>protected void configureDispatch() { <START> bindAnnotated(RpcDispatchHooks.class).to(builder.getDispatchHooks()).in(Singleton.class); <END> bind(RpcDispatchCallFactory.class).to(DefaultRpcDispatchCallFactory.class).in(Singleton.class); bind(DispatchAsync.class).to(RpcDispatchAsync.class).in(Singleton.class); }</code><technical_language>do need bindAnnotated, implementation of RpcDispatchHooks. bindAnnotated bind interface for RPC REST dispatchers implementations</technical_language>

Target:
protected void configureDispatch() { bind(RpcDispatchHooks.class).to(builder.getDispatchHooks()).in(Singleton.class); bind(RpcDispatchCallFactory.class).to(DefaultRpcDispatchCallFactory.class).in(Singleton.class); bind(DispatchAsync.class).to(RpcDispatchAsync.class).in(Singleton.class); }
Source:
<code>private void verifyAccountAndContainerFromBlobId(String blobId, Account expectedAccount, Container expectedContainer, RestServiceErrorCode expectedRestErrorCode) throws Exception { RestRequest restRequest; for (RestMethod restMethod : Lists.newArrayList(RestMethod.GET, RestMethod.HEAD, RestMethod.DELETE)) { restRequest = createRestRequest(restMethod, blobId, null, null); MockRestResponseChannel restResponseChannel = new MockRestResponseChannel(); try { doOperation(restRequest, restResponseChannel); if (expectedRestErrorCode != null) { <START> if (expectedRestErrorCode != null) { <END> fail("Should have thrown"); } } } catch (RestServiceException e) { assertEquals("Wrong RestServiceErrorCode", expectedRestErrorCode, e.getErrorCode()); } assertEquals("Wrong account object in RestRequest's args", expectedAccount, restRequest.getArgs().get(RestUtils.InternalKeys.TARGET_ACCOUNT_KEY)); assertEquals("Wrong container object in RestRequest's args", expectedContainer, restRequest.getArgs().get(RestUtils.InternalKeys.TARGET_CONTAINER_KEY)); assertEquals("Wrong account object in RestRequest's args", expectedAccount, restRequest.getArgs().get(RestUtils.InternalKeys.TARGET_ACCOUNT_KEY)); assertEquals("Wrong container object in RestRequest's args", expectedContainer, restRequest.getArgs().get(RestUtils.InternalKeys.TARGET_CONTAINER_KEY)); } }</code><technical_language>if check mistake</technical_language>

Target:
private void verifyAccountAndContainerFromBlobId(String blobId, Account expectedAccount, Container expectedContainer, RestServiceErrorCode expectedRestErrorCode) throws Exception { RestRequest restRequest; for (RestMethod restMethod : Lists.newArrayList(RestMethod.GET, RestMethod.HEAD, RestMethod.DELETE)) { restRequest = createRestRequest(restMethod, blobId, null, null); MockRestResponseChannel restResponseChannel = new MockRestResponseChannel(); try { doOperation(restRequest, restResponseChannel); if (expectedRestErrorCode != null) { fail("Should have thrown"); } } catch (RestServiceException e) { assertEquals("Wrong RestServiceErrorCode", expectedRestErrorCode, e.getErrorCode()); } assertEquals("Wrong account object in RestRequest's args", expectedAccount, restRequest.getArgs().get(RestUtils.InternalKeys.TARGET_ACCOUNT_KEY)); assertEquals("Wrong container object in RestRequest's args", expectedContainer, restRequest.getArgs().get(RestUtils.InternalKeys.TARGET_CONTAINER_KEY)); } }
Source:
<code>private static String getQuotaRegexString(SearchObjectAutoCompleter search) { <START> String query = ".*" + search.getDefaultSort(SearchObjects.QUOTA_OBJ_NAME) + ".*" <END> + search.getRelatedTableNameWithOutTags(SearchObjects.QUOTA_OBJ_NAME) + ".* "; return query; }</code><technical_language>StringBuilder ??</technical_language>

Target:
private static String getQuotaRegexString(SearchObjectAutoCompleter search) { StringBuilder query = new StringBuilder(); query.append(".*") .append(search.getDefaultSort(SearchObjects.QUOTA_OBJ_NAME)) .append(".*") .append(search.getRelatedTableNameWithOutTags(SearchObjects.QUOTA_OBJ_NAME)) .append(".* "); return query.toString(); }
Source:
<code>MethodSpec generateConstructor(List<Property> properties) { List<ParameterSpec> params = Lists.newArrayListWithCapacity(properties.size()); for (Property property : properties) { params.add(ParameterSpec.builder(property.type, property.name).build()); } MethodSpec.Builder builder = MethodSpec.constructorBuilder() .addParameters(params); StringBuilder superFormat = new StringBuilder("super("); <START> List<ParameterSpec> args = new LinkedList<ParameterSpec>(); <END> for (int i = 0, n = params.size(); i < n; i++) { args.add(params.get(i)); superFormat.append("$N"); if (i < n - 1) superFormat.append(", "); } superFormat.append(")"); builder.addStatement(superFormat.toString(), args.toArray()); return builder.build(); }</code><technical_language>Another one! reason lighter-weight ArrayList</technical_language>

Target:
MethodSpec generateConstructor(List<Property> properties) { List<ParameterSpec> params = Lists.newArrayListWithCapacity(properties.size()); for (Property property : properties) { params.add(ParameterSpec.builder(property.type, property.name).build()); } MethodSpec.Builder builder = MethodSpec.constructorBuilder() .addParameters(params); StringBuilder superFormat = new StringBuilder("super("); List<ParameterSpec> args = new ArrayList<ParameterSpec>(); for (int i = 0, n = params.size(); i < n; i++) { args.add(params.get(i)); superFormat.append("$N"); if (i < n - 1) superFormat.append(", "); } superFormat.append(")"); builder.addStatement(superFormat.toString(), args.toArray()); return builder.build(); }
Source:
<code>protected boolean connect(String serverName) { boolean connectStatus = false; client = getSSHClient(); Integer timeout = Config.<Integer> GetValue(ConfigValues.ConnectToServerTimeoutInSeconds) * 1000; client.setHardTimeout(timeout); client.setSoftTimeout(timeout); client.setHost(serverName, port); try { client.connect(); client.authenticate(); connectStatus = true; } catch (Exception e) { log.debug( <START> String.format("Could not connect to server %1$s: %2$s", this.host, e.getMessage())); <END> } return connectStatus; }</code><technical_language>Throw exception well</technical_language>

Target:
protected boolean connect(String serverName) { boolean connectStatus = false; client = getSSHClient(); Integer timeout = Config.<Integer> GetValue(ConfigValues.ConnectToServerTimeoutInSeconds) * 1000; client.setHardTimeout(timeout); client.setSoftTimeout(timeout); client.setHost(serverName, port); try { client.connect(); client.authenticate(); connectStatus = true; } catch (Exception e) { log.debug( String.format("Could not connect to server %1$s: %2$s", serverName, e.getMessage())); throw new RuntimeException(e); } return connectStatus; }
Source:
<code>public void marshalJAXBElementWithEmptySpaces() throws Exception { Reader input = new InputStreamReader(Thread.currentThread() .getContextClassLoader() <START> .getResourceAsStream("MOBS2-with-trailling-whitespace.xml")); <END> GeodesyMLType geodesyML = marshaller.unmarshal(input, GeodesyMLType.class).getValue(); List<JAXBElement<?>> els = geodesyML.getElements(); Traverser.traverse(geodesyML, new Traverser.Visitor() { public void process(Object x) { if (x instanceof String) { Assert.assertEquals(x.toString(), x.toString().trim()); } } }); }</code><technical_language>spelling, L: trailing</technical_language>

Target:
public void marshalJAXBElementWithEmptySpaces() throws Exception { Reader input = new InputStreamReader(Thread.currentThread() .getContextClassLoader() .getResourceAsStream("MOBS2-with-trailing-whitespace.xml")); GeodesyMLType geodesyML = marshaller.unmarshal(input, GeodesyMLType.class).getValue(); List<JAXBElement<?>> els = geodesyML.getElements(); Traverser.traverse(geodesyML, new Traverser.Visitor() { public void process(Object x) { if (x instanceof String) { Assert.assertEquals(x.toString(), x.toString().trim()); } } }); }
Source:
<code>public ReadOnlyTableException(String message) { <START> super(SQLExceptionInfo.getNewInfoObject(code).setMessage(message).toString(), code.getSQLState()); <END> }</code><technical_language>for message - remove if get it</technical_language>

Target:
public ReadOnlyTableException(String message) { super(new SQLExceptionInfo.Builder(code).setMessage(message).toString(), code.getSQLState()); }
Source:
<code>private static Personname formatPatientName(String nameString, EnExplicitFamily lastname, EnExplicitGiven firstname, EnExplicitGiven middlename, EnExplicitPrefix prefix, EnExplicitSuffix suffix) { boolean namefound; Personname personNameDBModel = new Personname(); namefound = checkNameContents(lastname, firstname, middlename, prefix, suffix, personNameDBModel); if (!namefound && StringUtils.isNotEmpty(nameString)) { <START> LOG.info("setting name by nameString ", nameString); <END> personNameDBModel.setLastName(nameString); } return personNameDBModel; }</code><technical_language>forgot a parameter in logging here: "setting name nameString {}"</technical_language>

Target:
private static Personname formatPatientName(String nameString, EnExplicitFamily lastname, EnExplicitGiven firstname, EnExplicitGiven middlename, EnExplicitPrefix prefix, EnExplicitSuffix suffix) { boolean namefound; Personname personNameDBModel = new Personname(); namefound = checkNameContents(lastname, firstname, middlename, prefix, suffix, personNameDBModel); if (!namefound && StringUtils.isNotEmpty(nameString)) { LOG.info("setting name by nameString : ", nameString); personNameDBModel.setLastName(nameString); } return personNameDBModel; }
Source:
<code>public void clearCache() { Enumeration<IReferenceCollection> <START> elementss = <END> fApiComponentCache.elements(); while (elementss.hasMoreElements()) { IReferenceCollection reference = elementss.nextElement(); reference.clear(); } fApiComponentCache.flush(); }</code><technical_language>want fix typo while around... :)</technical_language>

Target:
public void clearCache() { Enumeration<IReferenceCollection> elements = fApiComponentCache.elements(); while (elements.hasMoreElements()) { IReferenceCollection reference = elements.nextElement(); reference.clear(); } fApiComponentCache.flush(); }
Source:
<code>public Object handle(Message<?> message) throws Exception { Callable<Object> messageHandling; if (message instanceof CommandMessage) { messageHandling = () -> handle((CommandMessage) message); <START> } else { <END> messageHandling = () -> handle((EventMessage) message); } return executeWithResult(messageHandling); }</code><technical_language>This result in a ClassCastException e.g. a QueryMessage is delivered. If a message type supported, throw explicit exception stating that</technical_language>

Target:
public Object handle(Message<?> message) throws Exception { Callable<Object> messageHandling; if (message instanceof CommandMessage) { messageHandling = () -> handle((CommandMessage) message); } else if (message instanceof EventMessage) { messageHandling = () -> handle((EventMessage) message); } else { throw new IllegalArgumentException("Unsupported message type: " + message.getClass()); } return executeWithResult(messageHandling); }
Source:
<code>private Double getOverlappingPercentages(double cMin, double cMax, double bMin, double bMax) { if (cMin > bMax || cMax < bMin) { return 0.0; } double regionMin = Math.max(cMin, bMin); double regionMax = Math.min(cMax, bMax); double dividend = regionMax - regionMin; double divider = bMax - bMin; <START> if (dividend == divider) <END> return 1.0; else return dividend / divider; }</code><technical_language>check explicitly for zero? This is opaque, optimize a division</technical_language>

Target:
private Double getOverlappingPercentages(double cMin, double cMax, double bMin, double bMax) { if (cMin > bMax || cMax < bMin) { return 0.0; } double regionMin = Math.max(cMin, bMin); double regionMax = Math.min(cMax, bMax); double dividend = regionMax - regionMin; double divider = bMax - bMin; if (divider == 0.0) { if (dividend == 0.0) { return 1.0; } else return 0.0; } else return dividend / divider; }
Source:
<code>public void testCreateLinearIndexFromBCF(final File inputBCF) throws IOException { <START> final File tmpBCF = new File(IOUtil.createTempDir("testCreateIndexFromBCF", null), inputBCF.getName()); <END> Files.copy(inputBCF, tmpBCF); final Index index = IndexFactory.createIndex(tmpBCF, new BCF2Codec(), IndexFactory.IndexType.LINEAR); index.writeBasedOnFeatureFile(tmpBCF); try(final VCFFileReader originalReader = new VCFFileReader(inputBCF,false); final VCFFileReader tmpReader = new VCFFileReader(tmpBCF, new File(tmpBCF.getAbsolutePath()+ ".idx"),true)) { Iterator<VariantContext> originalIt = originalReader.iterator(); while(originalIt.hasNext()) { VariantContext vcOrig = originalIt.next(); final Interval queryInterval = new Interval(vcOrig.getContig(), vcOrig.getStart(), vcOrig.getEnd()); Iterator<VariantContext> tmpIt = tmpReader.query(queryInterval.getContig(), queryInterval.getStart(), queryInterval.getEnd()); Assert.assertTrue(tmpIt.hasNext(), "Variant not returned from indexed file"); VariantContext vcTmp = tmpIt.next(); Assert.assertEquals(vcOrig.getContig(), vcTmp.getContig()); Assert.assertEquals(vcOrig.getStart(), vcTmp.getStart()); Assert.assertEquals(vcOrig.getEnd(), vcTmp.getEnd()); Assert.assertFalse(tmpIt.hasNext()); } } }</code><technical_language>cleanup issue I</technical_language>

Target:
public void testCreateLinearIndexFromBCF(final File inputBCF) throws IOException { final File tempDir = IOUtil.createTempDir("testCreateIndexFromBCF", null); tempDir.deleteOnExit(); final File tmpBCF = new File(tempDir, inputBCF.getName()); Files.copy(inputBCF, tmpBCF); tmpBCF.deleteOnExit(); final Index index = IndexFactory.createIndex(tmpBCF, new BCF2Codec(), IndexFactory.IndexType.LINEAR); index.writeBasedOnFeatureFile(tmpBCF); final File tempIndex = Tribble.indexFile(tmpBCF); tempIndex.deleteOnExit(); try (final VCFFileReader originalReader = new VCFFileReader(inputBCF,false); final VCFFileReader tmpReader = new VCFFileReader(tmpBCF, tempIndex,true)) { final Iterator<VariantContext> originalIt = originalReader.iterator(); while (originalIt.hasNext()) { final VariantContext vcOrig = originalIt.next(); final Interval queryInterval = new Interval(vcOrig.getContig(), vcOrig.getStart(), vcOrig.getEnd()); final Iterator<VariantContext> tmpIt = tmpReader.query(queryInterval.getContig(), queryInterval.getStart(), queryInterval.getEnd()); Assert.assertTrue(tmpIt.hasNext(), "Variant not returned from indexed file"); final VariantContext vcTmp = tmpIt.next(); Assert.assertEquals(vcOrig.getContig(), vcTmp.getContig()); Assert.assertEquals(vcOrig.getStart(), vcTmp.getStart()); Assert.assertEquals(vcOrig.getEnd(), vcTmp.getEnd()); Assert.assertFalse(tmpIt.hasNext()); } } }
Source:
<code>public MetaDataService metaDataService() { <START> return mock(MetaDataService.class, RETURNS_DEEP_STUBS); <END> }</code><technical_language>a deep stub do I need one</technical_language>

Target:
public MetaDataService metaDataService() { return mock(MetaDataService.class); }
Source:
<code>public Request( final String name, final HttpVerb verb, final String path, final ImmutableList<Arguments> requiredArguments, final ImmutableList<Arguments> optionalArguments) { this.name = name; this.verb = verb; this.path = path; this.requiredArguments = requiredArguments; this.optionalArguments = optionalArguments; <START> this.cHelper = CHelper.getInstance(); <END> }</code><technical_language>Element Type references CHelper</technical_language>

Target:
public Request( final String name, final HttpVerb verb, final String path, final ImmutableList<Arguments> requiredArguments, final ImmutableList<Arguments> optionalArguments) { this.name = name; this.verb = verb; this.path = path; this.requiredArguments = requiredArguments; this.optionalArguments = optionalArguments; this.requestHelper = RequestHelper.getInstance(); }
Source:
<code><START> public void error(String s) { <END> logger.error(s); }</code><technical_language>add apublic void error (String msg, Throwable e) change public void warn(String s, Exception e) public void warn(String s, Throwable e)</technical_language>

Target:
public void error(String s) { logger.log(Level.ERROR, s); }
Source:
<code>protected abstract TupleBatch fetchNextReady() throws Exception; protected final void setEOS() { <START> if (isProfilingMode() && !eos()) { <END> PROFILING_LOGGER.info("[{}#{}][{}@{}][{}][{}]:end", MyriaConstants.EXEC_ENV_VAR_QUERY_ID, getQueryId(), getOpName(), getFragmentId(), System.nanoTime()); } eos = true; }</code><technical_language>Including !eos() in this check a odd write this code. simply: java if eos() { return; } if (isProfilingMode()) { ... } eos = true; };</technical_language>

Target:
protected abstract TupleBatch fetchNextReady() throws Exception; protected final void setEOS() { if (eos()) { return; } if (isProfilingMode()) { PROFILING_LOGGER.info("[{}#{}][{}@{}][{}][{}]:end", MyriaConstants.EXEC_ENV_VAR_QUERY_ID, getQueryId(), getOpName(), getFragmentId(), System.nanoTime()); } eos = true; }
Source:
<code>private boolean overwrite(String name) { for (Object <START> propertie : <END> getProperties()) { Property property = (Property) propertie; String propertyName = property.getName(); if (propertyName.equals(name)) { if (property.isDefault()) { MessageDialog.openError(propertyTableViewer.getControl().getShell(), AntPreferencesMessages.AntPropertiesBlock_17, MessageFormat.format(AntPreferencesMessages.AntPropertiesBlock_18, new Object[] { propertyName, property.getPluginLabel() })); return false; } boolean overWrite = MessageDialog.openQuestion(propertyTableViewer.getControl().getShell(), AntPreferencesMessages.AntPropertiesBlock_15, MessageFormat.format(AntPreferencesMessages.AntPropertiesBlock_16, new Object[] { name })); if (!overWrite) { return false; } ((AntContentProvider) propertyTableViewer.getContentProvider()).remove(property); break; } } return true; }</code><technical_language>rename p prop</technical_language>

Target:
private boolean overwrite(String name) { for (Object prop : getProperties()) { Property property = (Property) prop; String propertyName = property.getName(); if (propertyName.equals(name)) { if (property.isDefault()) { MessageDialog.openError(propertyTableViewer.getControl().getShell(), AntPreferencesMessages.AntPropertiesBlock_17, MessageFormat.format(AntPreferencesMessages.AntPropertiesBlock_18, new Object[] { propertyName, property.getPluginLabel() })); return false; } boolean overWrite = MessageDialog.openQuestion(propertyTableViewer.getControl().getShell(), AntPreferencesMessages.AntPropertiesBlock_15, MessageFormat.format(AntPreferencesMessages.AntPropertiesBlock_16, new Object[] { name })); if (!overWrite) { return false; } ((AntContentProvider) propertyTableViewer.getContentProvider()).remove(property); break; } } return true; }
Source:
<code>public static INDArray expandDims(INDArray input, int dimension) { if (dimension < 0) dimension += input.rank(); int[] shape = input.shape(); int[] indexes = new int[input.rank() + 1]; for (int i = 0; i < indexes.length; i++) indexes[i] = i < dimension ? shape[i] : i == dimension ? 1 : shape[i - 1]; <START> return input.reshape(indexes); <END> }</code><technical_language>Hm... thoughts here: (a) reshape a no-copy op. sure, end returning a copy in some cases this approach? (b) if do reshape, more comfortable a .reshape(input.ordering(), indexes)</technical_language>

Target:
public static INDArray expandDims(INDArray input, int dimension) { if (dimension < 0) dimension += input.rank(); int[] shape = input.shape(); int[] indexes = new int[input.rank() + 1]; for (int i = 0; i < indexes.length; i++) indexes[i] = i < dimension ? shape[i] : i == dimension ? 1 : shape[i - 1]; return input.reshape(input.ordering(), indexes); }
Source:
<code>public void initiate() { for (int i = 0; i < lh.getLedgerMetadata().currentEnsemble.size(); i++) { <START> lh.bk.getBookieClient().readEntry(lh.getLedgerMetadata().currentEnsemble.get(i), <END> lh.ledgerId, BookieProtocol.LAST_ADD_CONFIRMED, this, i, BookieProtocol.FLAG_NONE); } }</code><technical_language>"capture" lh.getLedgerMetadata() ? is guaranteed else calling getLedgerMetadata return object safeOrderedExecutor, is clear reading this code</technical_language>

Target:
public void initiate() { LedgerMetadata metadata = lh.getLedgerMetadata(); for (int i = 0; i < metadata.currentEnsemble.size(); i++) { lh.bk.getBookieClient().readEntry(metadata.currentEnsemble.get(i), lh.ledgerId, BookieProtocol.LAST_ADD_CONFIRMED, this, i, BookieProtocol.FLAG_NONE); } }