auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Status insert(String table, String key, HashMap<String, ByteIterator> values) { try { SolrInputDocument doc = new SolrInputDocument(); doc.addField("id", key); for (Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) { doc.addField(entry.getKey(), entry.getValue()); } if (cloudMode) { cloudClient.add(table, doc); <START> cloudClient.commit(table); <END> } else { httpClient.add(table, doc); httpClient.commit(table); } return Status.OK; } catch (Exception e) { e.printStackTrace(); } return Status.ERROR; }</code><technical_language>Explicit commits for record result in bad performance. Typically commits done a amount of time Solr server do auto soft/hard commits. This is a standard DB. configurable</technical_language>

Target:
public Status insert(String table, String key, HashMap<String, ByteIterator> values) { try { SolrInputDocument doc = new SolrInputDocument(); doc.addField("id", key); for (Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) { doc.addField(entry.getKey(), entry.getValue()); } UpdateResponse response; if (batchMode) { response = client.add(table, doc, commitTime); } else { response = client.add(table, doc); client.commit(table); } return checkStatus(response.getStatus()); } catch (IOException | SolrServerException e) { e.printStackTrace(); } return Status.ERROR; }
Source:
<code>public void testImportSimpleData() throws Exception { System.out.println("testImportSimpleData"); List<String> expectedMessageList = new ArrayList<>(); Properties props = new Properties(); props.put("metadata.broker.list", KAFKA_HOST_PORT); props.put("serializer.class", "kafka.serializer.StringEncoder"); ProducerConfig config = new ProducerConfig(props); Producer<String, String> producer = new Producer<String, String>(config); for (int i = 0; i < 10; i++) { String message = "test-message-" + i + ", " + i; System.out.println("Producing message: " + message); expectedMessageList.add(message); KeyedMessage<String, String> data = new KeyedMessage<String, String>(TEST_TOPIC, message); producer.send(data); } Client client = getClientToHostId(0); Stopwatch sw = Stopwatch.createStarted(); boolean findImportedData = false; while (sw.elapsed(TimeUnit.SECONDS) < (30)) { VoltTable vt = client.callProcedure("@AdHoc", "Select * from tmap order by val;").getResults()[0]; System.out.println("Elapsed " + sw.elapsed(TimeUnit.SECONDS) + " seconds, Test table contents: " + vt); if (10 == vt.getRowCount()) { findImportedData = true; break; } Thread.sleep(1000); } <START> assertTrue("VoltDB Kafka importer does not import enough data", findImportedData); <END> producer.close(); }</code><technical_language>"did import enough data"</technical_language>

Target:
public void testImportSimpleData() throws Exception { System.out.println("testImportSimpleData"); List<String> expectedMessageList = new ArrayList<>(); Properties props = new Properties(); props.put("metadata.broker.list", KAFKA_HOST_PORT); props.put("serializer.class", "kafka.serializer.StringEncoder"); ProducerConfig config = new ProducerConfig(props); Producer<String, String> producer = new Producer<String, String>(config); for (int i = 0; i < 10; i++) { String message = "test-message-" + i + ", " + i; System.out.println("Producing message: " + message); expectedMessageList.add(message); KeyedMessage<String, String> data = new KeyedMessage<String, String>(TEST_TOPIC, message); producer.send(data); } Client client = getClientToHostId(0); Stopwatch sw = Stopwatch.createStarted(); boolean foundImportData = false; while (sw.elapsed(TimeUnit.SECONDS) < (30)) { VoltTable vt = client.callProcedure("@AdHoc", "Select * from tmap order by val;").getResults()[0]; System.out.println("Elapsed " + sw.elapsed(TimeUnit.SECONDS) + " seconds, Test table contents: " + vt); if (10 == vt.getRowCount()) { foundImportData = true; break; } Thread.sleep(1000); } assertTrue("VoltDB Kafka importer did not import enough data", foundImportData); producer.close(); }
Source:
<code>public Object apply(AccountResource.Email rsrc, Input input) throws AuthException, ResourceNotFoundException, OrmException { <START> if (!(self.get() instanceof IdentifiedUser)) { <END> throw new AuthException("Authentication required"); } IdentifiedUser s = (IdentifiedUser) self.get(); if (s.getAccountId().get() != rsrc.getUser().getAccountId().get() && !self.get().getCapabilities().canAdministrateServer()) { throw new AuthException("not allowed to set preferred email address"); } Account a = dbProvider.get().accounts().get(rsrc.getUser().getAccountId()); if (a == null) { throw new ResourceNotFoundException("No such account: " + rsrc.getUser().getAccountId()); } if (rsrc.getEmail().equals(a.getPreferredEmail())) { return Response.ok(""); } a.setPreferredEmail(rsrc.getEmail()); dbProvider.get().accounts().update(Collections.singleton(a)); byIdCache.evict(a.getId()); return Response.created(""); }</code><technical_language>[1] this is needed GET requests. [1] <LINK_0></technical_language>

Target:
public Object apply(AccountResource.Email rsrc, Input input) throws AuthException, ResourceNotFoundException, OrmException { IdentifiedUser s = (IdentifiedUser) self.get(); if (s.getAccountId().get() != rsrc.getUser().getAccountId().get() && !self.get().getCapabilities().canAdministrateServer()) { throw new AuthException("not allowed to set preferred email address"); } Account a = dbProvider.get().accounts().get(rsrc.getUser().getAccountId()); if (a == null) { throw new ResourceNotFoundException("No such account: " + rsrc.getUser().getAccountId()); } if (rsrc.getEmail().equals(a.getPreferredEmail())) { return Response.ok(""); } a.setPreferredEmail(rsrc.getEmail()); dbProvider.get().accounts().update(Collections.singleton(a)); byIdCache.evict(a.getId()); return Response.created(""); }
Source:
<code>public void testNextElementSiblings() { Document doc = Jsoup.parse("<li id='a'>a</li>" + "<li id='b'>b</li>" + "<li id='c'>c</li>"); Element element = doc.getElementById("a"); List<Element> elementSiblings = element.nextElementSiblings(); assertNotNull(elementSiblings); <START> assertEquals(2, elementSiblings.size()); <END> Element element1 = doc.getElementById("c"); List<Element> elementSiblings1 = element1.nextElementSiblings(); assertNull(elementSiblings1); }</code><technical_language>do right back? good flesh out, for errors,</technical_language>

Target:
public void testNextElementSiblings() { Document doc = Jsoup.parse("<ul id='ul'>" + "<li id='a'>a</li>" + "<li id='b'>b</li>" + "<li id='c'>c</li>" + "</ul>" + "<div id='div'>" + "<li id='d'>d</li>" + "</div>"); Element element = doc.getElementById("a"); List<Element> elementSiblings = element.nextElementSiblings(); assertNotNull(elementSiblings); assertEquals(2, elementSiblings.size()); assertEquals("b", elementSiblings.get(0).id()); assertEquals("c", elementSiblings.get(1).id()); Element element1 = doc.getElementById("b"); List<Element> elementSiblings1 = element1.nextElementSiblings(); assertNotNull(elementSiblings1); assertEquals(1, elementSiblings1.size()); assertEquals("c", elementSiblings1.get(0).id()); Element element2 = doc.getElementById("c"); List<Element> elementSiblings2 = element2.nextElementSiblings(); assertEquals(0, elementSiblings2.size()); Element ul = doc.getElementById("ul"); List<Element> elementSiblings3 = ul.nextElementSiblings(); assertNotNull(elementSiblings3); assertEquals(1, elementSiblings3.size()); assertEquals("div", elementSiblings3.get(0).id()); Element div = doc.getElementById("div"); List<Element> elementSiblings4 = div.nextElementSiblings(); try { Element elementSibling = elementSiblings4.get(0); fail("This element should has no next siblings"); } catch (IndexOutOfBoundsException e) { } }
Source:
<code>public void executePatchRequest() throws Exception { final String rname = RandomStringUtils.randomAlphanumeric(5); final Release release = releases().create(rname); final String name = "name"; <START> final String nvalue = "v.1.1.1"; <END> final String body = "body"; final String bvalue = "Description of the release"; try { release.patch(Json.createObjectBuilder().add(name, nvalue) .add(body, bvalue).build() ); MatcherAssert.assertThat( release.json().getString(name), Matchers.startsWith(nvalue) ); MatcherAssert.assertThat( release.json().getString(body), Matchers.startsWith(bvalue) ); } finally { release.delete(); } }</code><technical_language>Need this random, also. New name exist in test repo, minimize chance of occurring</technical_language>

Target:
public void executePatchRequest() throws Exception { final String rname = RandomStringUtils.randomAlphanumeric(5); final Release release = releases().create(rname); final String name = "name"; final String nvalue = RandomStringUtils.randomAlphanumeric(5); final String body = "body"; final String bvalue = "Description of the release"; try { release.patch(Json.createObjectBuilder().add(name, nvalue) .add(body, bvalue).build() ); MatcherAssert.assertThat( release.json().getString(name), Matchers.startsWith(nvalue) ); MatcherAssert.assertThat( release.json().getString(body), Matchers.startsWith(bvalue) ); } finally { release.delete(); } }
Source:
<code>private void dateFromDefaultInit() { <START> final Calendar calendarFrom = Calendar.getInstance(); <END> calendarFrom.add(Calendar.WEEK_OF_MONTH, -1); dateFrom = calendarFrom.getTime(); dateFromFormated = DateTimeConverterUtil.dateToString(dateFrom); }</code><technical_language>Remove unnecessary final modifier local variables</technical_language>

Target:
private void dateFromDefaultInit() { Calendar calendarFrom = Calendar.getInstance(); calendarFrom.add(Calendar.WEEK_OF_MONTH, -1); dateFrom = calendarFrom.getTime(); dateFromFormated = DateTimeConverterUtil.dateToString(dateFrom); }
Source:
<code>protected char[] getBufferContent() throws ModelException { IFile file = (IFile) this.getResource(); if (file == null || !file.exists() <START> || !file.getLocation().toFile().exists()) { <END> throw newNotPresentException(); } return Util.getResourceContentsAsCharArray(file); }</code><technical_language>IPath getLocation() Returns absolute path in local file system this resource, null if path determined. This fail if project is filesystem based</technical_language>

Target:
protected char[] getBufferContent() throws ModelException { IFile file = (IFile) this.getResource(); if (file == null || !file.exists()) { throw newNotPresentException(); } IPath location = file.getLocation(); if (location != null && !location.toFile().exists()) { throw newNotPresentException(); } return Util.getResourceContentsAsCharArray(file); }
Source:
<code>public static List<Throwable> getThrowableList(Throwable throwable) { <START> final List<Throwable> list = new ArrayList<Throwable>(); <END> while (throwable != null && list.contains(throwable) == false) { list.add(throwable); throwable = getCause(throwable); } return list; }</code><technical_language>List<Throwable> list = new ArrayList<>();</technical_language>

Target:
public static List<Throwable> getThrowableList(Throwable throwable) { final List<Throwable> list = new ArrayList<>(); while (throwable != null && list.contains(throwable) == false) { list.add(throwable); throwable = getCause(throwable); } return list; }
Source:
<code>public void multiIndex_incompatibleAnalyzer_skipAnalysis() { StubMappingSearchScope scope = indexManager.createSearchScope( incompatibleAnalyzerIndexManager ); String absoluteFieldPath = indexMapping.analyzedStringField.relativeFieldName; IndexSearchQuery<DocumentReference> query = scope.query().asReference() .predicate( f -> f.match().onField( absoluteFieldPath ).matching( "fox" ) .skipAnalysis() ) .toQuery(); <START> assertThat( query ).assertThat( query ).hasDocRefHitsAnyOrder( b -> { <END> b.doc( INDEX_NAME, DOCUMENT_1 ); b.doc( INCOMPATIBLE_ANALYZER_INDEX_NAME, INCOMPATIBLE_ANALYZER_INDEX_DOCUMENT_1 ); } ); }</code><technical_language>assertThat( query ).assertThat( query )</technical_language>

Target:
public void multiIndex_incompatibleAnalyzer_skipAnalysis() { StubMappingSearchScope scope = indexManager.createSearchScope( incompatibleAnalyzerIndexManager ); String absoluteFieldPath = indexMapping.analyzedStringField.relativeFieldName; IndexSearchQuery<DocumentReference> query = scope.query().asReference() .predicate( f -> f.match().onField( absoluteFieldPath ).matching( "fox" ) .skipAnalysis() ) .toQuery(); assertThat( query ).hasDocRefHitsAnyOrder( b -> { b.doc( INDEX_NAME, DOCUMENT_1 ); b.doc( INCOMPATIBLE_ANALYZER_INDEX_NAME, INCOMPATIBLE_ANALYZER_INDEX_DOCUMENT_1 ); } ); }
Source:
<code>public synchronized long skip(long n) throws IOException { if (n <= 0) return 0; long pos = remoteOffset; <START> long seek = Math.min(pos + n, length()); <END> remoteOffset = seek; return seek - pos; }</code><technical_language>optimize avoid calling length() required. this check in a places, want a private method prevent code duplication (i.e. isLengthGreater(long))</technical_language>

Target:
public synchronized long skip(long n) throws IOException { if (n <= 0) return 0; long pos = remoteOffset; long seek = Math.min(pos + n, getMaxRead(remoteOffset, n)); remoteOffset = seek; return seek - pos; }
Source:
<code>public void showDialog(final int id, final int sideForDialog, final int positionForDialog) throws IllegalStateException { if (!this.isVisible()) { return; } removeDialog(getFragmentManager()); if (id == TradeDialogFragment.DIALOG_SORT) { SortOrderDialogFragment newFragment = new SortOrderDialogFragment(); Bundle args = new Bundle(); args.putString(SortOrderDialogFragment.SAVED_SORT_ORDER, getFamiliarActivity().mPreferenceAdapter.getTradeSortOrder()); <START> args.putBoolean(SortOrderDialogFragment.SAVED_DONT_SORT, <END> getFamiliarActivity().mPreferenceAdapter.getTradeDontSort()); newFragment.setArguments(args); newFragment.show(getFragmentManager(), FamiliarActivity.DIALOG_TAG); } else { TradeDialogFragment newFragment = new TradeDialogFragment(); Bundle arguments = new Bundle(); arguments.putInt(FamiliarDialogFragment.ID_KEY, id); arguments.putInt(TradeDialogFragment.ID_SIDE, sideForDialog); arguments.putInt(TradeDialogFragment.ID_POSITION, positionForDialog); newFragment.setArguments(arguments); newFragment.show(getFragmentManager(), FamiliarActivity.DIALOG_TAG); } }</code><technical_language>SAVED_DONT_SORT - Abbreviation</technical_language>

Target:
public void showDialog(final int id, final int sideForDialog, final int positionForDialog) throws IllegalStateException { if (!this.isVisible()) { return; } removeDialog(getFragmentManager()); if (id == TradeDialogFragment.DIALOG_SORT) { SortOrderDialogFragment newFragment = new SortOrderDialogFragment(); Bundle args = new Bundle(); args.putString(SortOrderDialogFragment.SAVED_SORT_ORDER, getFamiliarActivity().mPreferenceAdapter.getTradeSortOrder()); newFragment.setArguments(args); newFragment.show(getFragmentManager(), FamiliarActivity.DIALOG_TAG); } else { TradeDialogFragment newFragment = new TradeDialogFragment(); Bundle arguments = new Bundle(); arguments.putInt(FamiliarDialogFragment.ID_KEY, id); arguments.putInt(TradeDialogFragment.ID_SIDE, sideForDialog); arguments.putInt(TradeDialogFragment.ID_POSITION, positionForDialog); newFragment.setArguments(arguments); newFragment.show(getFragmentManager(), FamiliarActivity.DIALOG_TAG); } }
Source:
<code>private void waitBetweenPolls() { while (timestampOfEndOfPreviousInvocation != null && <START> System.currentTimeMillis() <END> - timestampOfEndOfPreviousInvocation < POLLING_BREAK) { try { Thread.sleep(POLLING_BREAK); } catch (InterruptedException e) { } } }</code><technical_language>I suggest System.nanoTime() monotonic time</technical_language>

Target:
private void waitBetweenPolls() { while (timestampOfEndOfPreviousInvocation != null && currentTimestamp() - timestampOfEndOfPreviousInvocation < POLLING_BREAK) { try { Thread.sleep(POLLING_BREAK); } catch (InterruptedException e) { } } }
Source:
<code>FastAnnotatedTypeLoader(BeanManagerImpl manager, ClassTransformer transformer, ClassFileServices classFileServices, ContainerLifecycleEvents events, FastProcessAnnotatedTypeResolver resolver) { super(manager, transformer, events); this.fallback = new AnnotatedTypeLoader(manager, transformer, events); this.classFileServices = classFileServices; this.resolver = resolver; this.checkTypeModifiers = initCheckTypeModifiers(); if (!checkTypeModifiers) { <START> BootstrapLogger.LOG.usingOldJandexVersion(); <END> } }</code><technical_language>I move log message catch block line 139</technical_language>

Target:
FastAnnotatedTypeLoader(BeanManagerImpl manager, ClassTransformer transformer, ClassFileServices classFileServices, ContainerLifecycleEvents events, FastProcessAnnotatedTypeResolver resolver) { super(manager, transformer, events); this.fallback = new AnnotatedTypeLoader(manager, transformer, events); this.classFileServices = classFileServices; this.resolver = resolver; this.checkTypeModifiers = initCheckTypeModifiers(); }
Source:
<code>public OptimizerAssert(Metadata metadata, StatsCalculator statsCalculator, Session session, PlanOptimizer optimizer, TransactionManager transactionManager, AccessControl accessControl) { <START> this.metadata = metadata; <END> this.statsCalculator = new TestingStatsCalculator(statsCalculator); this.session = session; this.optimizer = optimizer; this.transactionManager = transactionManager; this.accessControl = accessControl; }</code><technical_language>Check requireNonNull(...)</technical_language>

Target:
public OptimizerAssert(Metadata metadata, StatsCalculator statsCalculator, Session session, PlanOptimizer optimizer, TransactionManager transactionManager, AccessControl accessControl) { this.metadata = requireNonNull(metadata, "metadata is null"); this.statsCalculator = new TestingStatsCalculator(requireNonNull(statsCalculator, "statsCalculator is null")); this.session = requireNonNull(session, "session is null"); this.optimizer = requireNonNull(optimizer, "optimizer is null"); this.transactionManager = requireNonNull(transactionManager, "transactionManager is null"); this.accessControl = requireNonNull(accessControl, "access control is null"); }
Source:
<code>public void setValue(String value, boolean fireEvents) { String oldValue = current; current = value; <START> if (current.equals("0")) { <END> view.setLocalTimeZone(); } else { view.setValue(current); } if (fireEvents) { ValueChangeEvent.fireIfNotEqual(this, oldValue, value); } }</code><technical_language>this</technical_language>

Target:
public void setValue(String value, boolean fireEvents) { String oldValue = current; current = value; view.setValue(current); if (fireEvents) { ValueChangeEvent.fireIfNotEqual(this, oldValue, value); } }
Source:
<code>public boolean equals(Object other) { if (other == this) { return true; } if(!other.getClass().equals(Gff3BaseData.class)) { return false; } final Gff3BaseData otherBaseData = (Gff3BaseData) other; boolean ret = otherBaseData.getContig().equals(getContig()) && otherBaseData.getSource().equals(getSource()) && otherBaseData.getType().equals(getType()) && otherBaseData.getStart() == getStart() && otherBaseData.getEnd() == getEnd() && <START> otherBaseData.getScore().equals(score) && <END> otherBaseData.getPhase() == getPhase() && otherBaseData.getStrand().equals(getStrand()) && otherBaseData.getAttributes().equals(getAttributes()); if (getId() == null) { ret = ret && otherBaseData.getId() == null; } else { ret = ret && otherBaseData.getId() != null && otherBaseData.getId().equals(getId()); } if (getName() == null) { ret = ret && otherBaseData.getName() == null; } else { ret = ret && otherBaseData.getName() != null && otherBaseData.getName().equals(getName()); } if (getAlias() == null) { ret = ret && otherBaseData.getAlias() == null; } else { ret = ret && otherBaseData.getAlias() != null && otherBaseData.getAlias().equals(getAlias()); } return ret; }</code><technical_language>autogenerate these? I need check for null score is Double</technical_language>

Target:
public boolean equals(Object other) { if (other == this) { return true; } if(!other.getClass().equals(Gff3BaseData.class)) { return false; } final Gff3BaseData otherBaseData = (Gff3BaseData) other; boolean ret = otherBaseData.getContig().equals(getContig()) && otherBaseData.getSource().equals(getSource()) && otherBaseData.getType().equals(getType()) && otherBaseData.getStart() == getStart() && otherBaseData.getEnd() == getEnd() && ((Double)otherBaseData.getScore()).equals(score) && otherBaseData.getPhase() == getPhase() && otherBaseData.getStrand().equals(getStrand()) && otherBaseData.getAttributes().equals(getAttributes()); if (getId() == null) { ret = ret && otherBaseData.getId() == null; } else { ret = ret && otherBaseData.getId() != null && otherBaseData.getId().equals(getId()); } if (getName() == null) { ret = ret && otherBaseData.getName() == null; } else { ret = ret && otherBaseData.getName() != null && otherBaseData.getName().equals(getName()); } if (getAlias() == null) { ret = ret && otherBaseData.getAlias() == null; } else { ret = ret && otherBaseData.getAlias() != null && otherBaseData.getAlias().equals(getAlias()); } return ret; }
Source:
<code>private TransactionSynchronizationRegistry locateTransactionSynchronizationRegistry() { if (transactionSynchronizationRegistry == null) { <START> synchronized (WildFlyCustomJtaPlatform.class) { <END> if (transactionSynchronizationRegistry == null) { transactionSynchronizationRegistry = (TransactionSynchronizationRegistry) jndiService().locate(TSR_NAME); } } } return transactionSynchronizationRegistry; }</code><technical_language>This method is used. I do agree Jeff this static feels issue. This shared deployments correct</technical_language>

Target:
private TransactionSynchronizationRegistry locateTransactionSynchronizationRegistry() { TransactionSynchronizationRegistry curTsr = transactionSynchronizationRegistry; return curTsr != null ? curTsr : (TransactionSynchronizationRegistry) jndiService().locate(TSR_NAME); }
Source:
<code>public Collection<AsyncQuery> deleteAsyncQueryAndResultCollection(String filterExpression) { log.debug("deleteAsyncQueryAndResultCollection"); EntityDictionary dictionary = elide.getElideSettings().getDictionary(); RSQLFilterDialect filterParser = new RSQLFilterDialect(dictionary); Collection<AsyncQuery> asyncQueryList = (Collection<AsyncQuery>) executeInTransaction(dataStore, (tx, scope) -> { try { <START> FilterExpression filter = filterParser.parseFilterExpression(filterExpression, AsyncQuery.class, false); <END> EntityProjection asyncQueryCollection = EntityProjection.builder() .type(AsyncQuery.class) .filterExpression(filter) .build(); Iterable<Object> loaded = tx.loadObjects(asyncQueryCollection, scope); Iterator<Object> itr = loaded.iterator(); while(itr.hasNext()) { AsyncQuery query = (AsyncQuery) itr.next(); if(query != null) { tx.delete(query, scope); } } return null; } catch (ParseException e) { log.error("Exception: {}", e); } return null; }); return asyncQueryList; }</code><technical_language>This moved try block (by making final)</technical_language>

Target:
public Collection<AsyncQuery> deleteAsyncQueryAndResultCollection(String filterExpression) { log.debug("deleteAsyncQueryAndResultCollection"); EntityDictionary dictionary = elide.getElideSettings().getDictionary(); RSQLFilterDialect filterParser = new RSQLFilterDialect(dictionary); try { FilterExpression filter = filterParser.parseFilterExpression(filterExpression, AsyncQuery.class, false); executeInTransaction(dataStore, (tx, scope) -> { EntityProjection asyncQueryCollection = EntityProjection.builder() .type(AsyncQuery.class) .filterExpression(filter) .build(); Iterable<Object> loaded = tx.loadObjects(asyncQueryCollection, scope); Iterator<Object> itr = loaded.iterator(); while (itr.hasNext()) { AsyncQuery query = (AsyncQuery) itr.next(); if (query != null) { tx.delete(query, scope); } } return null; }); } catch (ParseException e) { log.error("Exception: {}", e); } return null; }
Source:
<code>private int optimisedRead(final byte[] b, final int off, final int len, final long readFrom, final long actualLen) throws IOException { int totalBytesRead = 0; fCursor = readFrom; <START> for (int i = 0; i < 2 && fCursor < contentLength; i++) { <END> int bytesRead = readInternal(fCursor, buffer, limit, (int) actualLen - limit, true); if (bytesRead > 0) { totalBytesRead += bytesRead; limit += bytesRead; fCursor += bytesRead; } } if (fCursor < contentLength && bCursor > limit) { restorePointerState(); return readOneBlock(b, off, len); } firstRead = false; if (totalBytesRead == -1) { return -1; } return copyToUserBuffer(b, off, len); }</code><technical_language>2 => field name</technical_language>

Target:
private int optimisedRead(final byte[] b, final int off, final int len, final long readFrom, final long actualLen) throws IOException { fCursor = readFrom; int totalBytesRead = 0; int lastBytesRead = 0; try { buffer = new byte[bufferSize]; for (int i = 0; i < MAX_OPTIMIZED_READ_ATTEMPTS && fCursor < contentLength; i++) { lastBytesRead = readInternal(fCursor, buffer, limit, (int) actualLen - limit, true); if (lastBytesRead > 0) { totalBytesRead += lastBytesRead; limit += lastBytesRead; fCursor += lastBytesRead; fCursorAfterLastRead = fCursor; } } } catch (IOException e) { LOG.debug("Optimized read failed. Defaulting to readOneBlock {}", e); restorePointerState(); return readOneBlock(b, off, len); } finally { firstRead = false; } if (totalBytesRead < 1) { restorePointerState(); return -1; } if (fCursor < contentLength && bCursor > limit) { restorePointerState(); return readOneBlock(b, off, len); } return copyToUserBuffer(b, off, len); }
Source:
<code>private void testDeleteResponse() { ______TS("test delete response"); submitPage.fillResponseTextBox(2, 0, ""); submitPage.fillResponseTextBox(1, 0, ""); submitPage.clickSubmitButton(); submitPage.verifyStatus(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED); FeedbackQuestionAttributes fq = BackDoor.getFeedbackQuestion("IESFPTCourse", "First feedback session", 1); FeedbackResponseAttributes fr = BackDoor.getFeedbackResponse(fq.getId(), "student1InIESFPTCourse@gmail.tmt", "student1InIESFPTCourse@gmail.tmt"); assertNull(fr); fq = BackDoor.getFeedbackQuestion("IESFPTCourse", "First feedback session", 2); fr = BackDoor.getFeedbackResponse(fq.getId(), "student1InIESFPTCourse@gmail.tmt", "student1InIESFPTCourse@gmail.tmt"); assertNull(fr); <START> submitPage.waitForAndDismissAlertModal(); <END> }</code><technical_language>Move this line line 110</technical_language>

Target:
private void testDeleteResponse() { ______TS("test delete response"); submitPage.fillResponseTextBox(2, 0, ""); submitPage.fillResponseTextBox(1, 0, ""); submitPage.clickSubmitButton(); submitPage.verifyStatus(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED); submitPage.verifyAndCloseSuccessfulSubmissionModal(); FeedbackQuestionAttributes fq = BackDoor.getFeedbackQuestion("IESFPTCourse", "First feedback session", 1); FeedbackResponseAttributes fr = BackDoor.getFeedbackResponse(fq.getId(), "student1InIESFPTCourse@gmail.tmt", "student1InIESFPTCourse@gmail.tmt"); assertNull(fr); fq = BackDoor.getFeedbackQuestion("IESFPTCourse", "First feedback session", 2); fr = BackDoor.getFeedbackResponse(fq.getId(), "student1InIESFPTCourse@gmail.tmt", "student1InIESFPTCourse@gmail.tmt"); assertNull(fr); }
Source:
<code>public void autonomousMain() throws AutonomousModeOverException, InterruptedException { Elevator.elevatorControl.set(true); waitUntil(Elevator.topLimitSwitch); <START> boolean r = Rollers.running.get(); <END> Rollers.direction.set(true); Rollers.running.set(true); waitUntil(crateInPosition); Rollers.running.set(r); Elevator.elevatorControl.set(false); }</code><technical_language>save save direction running</technical_language>

Target:
public void autonomousMain() throws AutonomousModeOverException, InterruptedException { Elevator.elevatorControl.set(true); waitUntil(Elevator.topLimitSwitch); boolean r = Rollers.running.get(); boolean d = Rollers.direction.get(); Rollers.direction.set(true); Rollers.running.set(true); waitUntil(crateInPosition); Rollers.running.set(r); Rollers.direction.set(d); Elevator.elevatorControl.set(false); }
Source:
<code>protected void requesting(CDODataOutput out, OMMonitor monitor) throws IOException { if (monitor == null) { monitor = new EclipseMonitor(new NullProgressMonitor()); <START> } <END> out.writeInt(infos); monitor.begin(infos); try { writeRevisionAvailabilityInfo(out, targetInfo, monitor.fork()); writeRevisionAvailabilityInfo(out, sourceInfo, monitor.fork()); if (infos > 2) { writeRevisionAvailabilityInfo(out, targetBaseInfo, monitor.fork()); } if (infos > 3) { writeRevisionAvailabilityInfo(out, sourceBaseInfo, monitor.fork()); } } finally { monitor.done(); } }</code><technical_language>Change caller give a valid monitor</technical_language>

Target:
protected void requesting(CDODataOutput out, OMMonitor monitor) throws IOException { out.writeInt(infos); if (monitor != null) { monitor.begin(infos); } try { writeRevisionAvailabilityInfo(out, targetInfo, monitor != null ? monitor.fork() : null); writeRevisionAvailabilityInfo(out, sourceInfo, monitor != null ? monitor.fork() : null); if (infos > 2) { writeRevisionAvailabilityInfo(out, targetBaseInfo, monitor != null ? monitor.fork() : null); } if (infos > 3) { writeRevisionAvailabilityInfo(out, sourceBaseInfo, monitor != null ? monitor.fork() : null); } } finally { if (monitor != null) { monitor.done(); } } }
Source:
<code>public FileCopyOutputFormatProvider(AbstractFileCopySink.AbstractFileCopySinkConfig config) { this.conf = new HashMap<>(); FileCopyOutputFormat.setBasePath(conf, config.basePath); FileCopyOutputFormat.setEnableOverwrite(conf, config.enableOverwrite.toString()); FileCopyOutputFormat.setPreserveFileOwner(conf, config.preserveFileOwner.toString()); if (config.bufferSize != null) { FileCopyOutputFormat.setBufferSize(conf, String.valueOf(config.bufferSize << 20)); } else { FileCopyOutputFormat.setBufferSize(conf, String.valueOf(FileCopyRecordWriter.DEFAULT_BUFFER_SIZE)); } <START> conf.put(String.format("fs.%s.impl.disable.cache", config.getScheme()), String.valueOf(true)); <END> if (config.getHostUri() != null) { FileCopyOutputFormat.setFilesystemHostUri(conf, config.getHostUri()); } }</code><technical_language>want specific OutputFormat disable caching, else in Hadoop. set this here, in OutputFormat get a new FileSystem object</technical_language>

Target:
public FileCopyOutputFormatProvider(AbstractFileCopySink.AbstractFileCopySinkConfig config) { this.conf = new HashMap<>(); FileCopyOutputFormat.setBasePath(conf, config.basePath); FileCopyOutputFormat.setEnableOverwrite(conf, config.enableOverwrite.toString()); FileCopyOutputFormat.setPreserveFileOwner(conf, config.preserveFileOwner.toString()); FileCopyOutputFormat.setFilesystemScheme(conf, config.getScheme()); if (config.bufferSize != null) { FileCopyOutputFormat.setBufferSize(conf, String.valueOf(config.bufferSize << 20)); } else { FileCopyOutputFormat.setBufferSize(conf, String.valueOf(FileCopyRecordWriter.DEFAULT_BUFFER_SIZE)); } if (config.getHostUri() != null) { FileCopyOutputFormat.setFilesystemHostUri(conf, config.getHostUri()); } }
Source:
<code>private Set<String> getUsageArguments() { Set<String> args = new TreeSet<>(); for (String argName : this.properties.stringPropertyNames()) { String[] param = argName.split("\\."); if((param.length > 1 && !param[1].equals("arg")) || !param[0].equals(this.prefix)) { continue; } if (param.length < 4) { throw new IllegalArgumentException( <START> String.format("Invalid option '%1$s'", argName) <END> ); } args.add(param[2]); } return args; }</code><technical_language>Configuration error: invalid structure for parameter '%s'</technical_language>

Target:
private Set<String> getUsageArguments() { Set<String> args = new TreeSet<>(); for (String argName : this.properties.stringPropertyNames()) { String[] param = argName.split("\\."); if((param.length > 1 && !param[1].equals("arg")) || !param[0].equals(this.prefix)) { continue; } if (param.length < 4) { throw new IllegalArgumentException( String.format("Invalid configuration. Invalid structure for parameter'%1$s'", argName) ); } args.add(param[2]); } return args; }
Source:
<code>protected String getQueueName(Task task) { <START> return task.getTaskData().getDeploymentId()+"_"+task.getName(); <END> }</code><technical_language>recommend add process id name tasks name in processes in kjar</technical_language>

Target:
protected String getQueueName(Task task) { return task.getTaskData().getProcessId()+"_"+task.getTaskData().getDeploymentId()+"_"+task.getName(); }
Source:
<code>private void drag(double fromXScreen, double fromYScreen, double toXScreen, double toYScreen) { mapCanvas.setTranslateX(0); mapCanvas.setTranslateY(0); Point2D.Double from = new Point2D.Double(fromYScreen, fromXScreen); Point2D.Double to = new Point2D.Double(toYScreen, toXScreen); <START> from = transformScreenToWorld(from); <END> to = transformScreenToWorld(to); double fromX = from.getX(); double fromY = from.getY(); double toX = to.getX(); double toY = to.getY(); double xOffset = (toX - fromX); double yOffset = (toY - fromY); ReferencedEnvelope bBox = this.mapContent.getViewport().getBounds(); Point2D.Double minXY = transformScreenToWorld(new Point2D.Double(0 - toXScreen, 0 - toYScreen)); Point2D.Double maxXY = transformScreenToWorld(new Point2D.Double(dimensionX - toXScreen, dimensionY - toYScreen)); ReferencedEnvelope newBounds = new ReferencedEnvelope( minXY.getX(), maxXY.getX(), minXY.getY(), maxXY.getY(), this.crs); if(!maxBBox.contains(newBounds, true)){ newBounds = bBox; } setExtent(newBounds); }</code><technical_language>Formatting off</technical_language>

Target:
private void drag(double fromXScreen, double fromYScreen, double toXScreen, double toYScreen) { mapCanvas.setTranslateX(0); mapCanvas.setTranslateY(0); ReferencedEnvelope bBox = this.mapContent.getViewport().getBounds(); Point2D.Double minXY = transformScreenToWorld(new Point2D.Double(0 - toXScreen, 0 - toYScreen)); Point2D.Double maxXY = transformScreenToWorld(new Point2D.Double(dimensionX - toXScreen, dimensionY - toYScreen)); ReferencedEnvelope newBounds = new ReferencedEnvelope( minXY.getX(), maxXY.getX(), minXY.getY(), maxXY.getY(), this.crs); if(!maxBBox.contains(newBounds, true)){ newBounds = bBox; } setExtent(newBounds); }
Source:
<code>protected void executeQueryCommand() { getQueryReturnValue().setReturnValue( UserGroupUtil.retrieveUserAdGroups(DbFacade.getInstance().getDbUserDao() <START> .get((getParameters()).getId(), getParameters().isFiltered()))); <END> }</code><technical_language>this effect more restapi</technical_language>

Target:
protected void executeQueryCommand() { DbUser user = DbFacade.getInstance().getDbUserDao() .get((getParameters()).getId(), getParameters().isFiltered()); if (getParameters() instanceof GetDbUserByUserIdParameters && ((GetDbUserByUserIdParameters) getParameters()).isResolveGroups()) { UserGroupUtil.retrieveUserGroups(user); } getQueryReturnValue().setReturnValue(user); }
Source:
<code>public void cleanup() { if (internalLocator != null) { <START> try { <END> internalLocator.stop(); } catch (RuntimeException ignore) { } } }</code><technical_language>able delete try-catch here</technical_language>

Target:
public void cleanup() { if (internalLocator != null) { internalLocator.stop(); } }
Source:
<code>public List<ModFile> scanMods() { LOGGER.debug(SCAN,"Scanning mods dir for mods", this.modFolder); return uncheck(()-> Files.list(this.modFolder)). sorted(Comparator.comparing(path-> StringUtils.toLowerCase(path.getFileName().toString()))). filter(p->StringUtils.toLowerCase(p.getFileName().toString()).endsWith(SUFFIX)). map(p->new ModFile(p, this)). <START> filter(f->modJars.compute(f, (mf, fs)->createFileSystem(mf))!=null). <END> collect(Collectors.toList()); }</code><technical_language>issue is this fixing? is failing</technical_language>

Target:
public List<ModFile> scanMods() { LOGGER.debug(SCAN,"Scanning mods dir for mods", this.modFolder); return uncheck(()-> Files.list(this.modFolder)). sorted(Comparator.comparing(path-> StringUtils.toLowerCase(path.getFileName().toString()))). filter(p->StringUtils.toLowerCase(p.getFileName().toString()).endsWith(SUFFIX)). map(p->new ModFile(p, this)). peek(f->modJars.compute(f, (mf, fs)->createFileSystem(mf))). collect(Collectors.toList()); }
Source:
<code>public boolean applicableInState(State state, String[] params) { if (!super.applicableInState(state, params)) { return false; } ObjectInstance tool = state.getObject(params[1]); ObjectInstance container = state.getObject(params[2]); <START> if (!ToolFactory.getSpaceName(tool).equals(ContainerFactory.getSpaceName(container))) { <END> return false; } for (String name : ContainerFactory.getContentNames(container)) { ObjectInstance ingredient = state.getObject(name); if (!ToolFactory.toolCanBeUsed(tool, ingredient)) { return false; } if (ToolFactory.toolHasBeenUsed(tool, ingredient)) { return false; } } return true; }</code><technical_language>break multiple lines for readability</technical_language>

Target:
public boolean applicableInState(State state, String[] params) { return this.checkActionIsApplicableInState(state, params).getIsSuccess(); }
Source:
<code>private String translateAuthenticationMessage(AuthenticationFailedMessage message) { String context = message.getContext(); if (context == null) { context = ""; } switch (context) { <START> case "denied": <END> return i18n.get("login.deniedError"); case "steam_link": return i18n.get("login.steamLinkError", clientProperties.getWebsite().getSteamLinkUrl()); case "policy": String result = message.getResult(); if (result != null) { switch (result) { case "vm": return i18n.get("login.policyVMError", clientProperties.getWebsite().getSteamLinkUrl()); case "already_associated": return i18n.get("login.policyAssociatedError", clientProperties.getWebsite().getSteamLinkUrl()); case "fraudulent": return i18n.get("login.policyFraudulentError"); default: return i18n.get("login.policyError", result); } } } String messageText = message.getText(); return messageText != null ? messageText: i18n.get("login.failedError"); }</code><technical_language>this ends in a lot of lines if do this for mesage. I expect a unique identifying string/number for message. in return in messages of client a prefix For Example: Server message a field messageId= 147 -> i18n.get("serverMessage.147", message.getParameters()); -> serverMessage.147 = Login failed, banned for {0} days Translating done in line</technical_language>

Target:
private String translateAuthenticationMessage(AuthenticationFailedMessage message) { String context = message.getContext(); if (context == null) { String messageText = message.getText(); return messageText != null ? messageText: i18n.get("login.error"); } ArrayList<String> key = new ArrayList(Arrays.asList("login", "error", context)); ArrayList<Object> args = new ArrayList(Arrays.asList(clientProperties.getWebsite().getSteamLinkUrl())); String result = message.getResult(); if (context.equals("policy") && result != null) { key.add(result); args.add(result); } Object[] argsArray = args.toArray(); while(key.size() > 1) { try { return i18n.get(String.join(".", key), argsArray); } catch(NoSuchMessageException e) { key.remove(key.size() - 1); } } return "login.error"; }
Source:
<code>protected boolean validate() { <START> if (getParameters().getVmBackup().getFromCheckpointId() != null && !FeatureSupported.isIncrementalBackupSupported(getCluster().getCompatibilityVersion())) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_INCREMENTAL_BACKUP_NOT_SUPPORTED); } <END> DiskExistenceValidator diskExistenceValidator = createDiskExistenceValidator(getDiskIds()); if (!validate(diskExistenceValidator.disksNotExist())) { return false; } if (getParameters().getVmBackup().getFromCheckpointId() != null) { DiskImagesValidator diskImagesValidator = createDiskImagesValidator(getDisks()); if (!validate(diskImagesValidator.incrementalBackupEnabled())) { return false; } } if (!getVm().getStatus().isQualifiedForVmBackup()) { return failValidation(EngineMessage.CANNOT_START_BACKUP_VM_SHOULD_BE_IN_UP_STATUS); } if (!vmBackupDao.getAllForVm(getVmId()).isEmpty()) { return failValidation(EngineMessage.CANNOT_START_BACKUP_ALREADY_IN_PROGRESS); } if (!getVds().isBackupEnabled()) { return failValidation(EngineMessage.CANNOT_START_BACKUP_NOT_SUPPORTED_BY_VDS, String.format("$vdsName %s", getVdsName())); } return true; }</code><technical_language>moving this check (below "DiskExistenceValidator"), incremental backup related checks together? This allow uniting 1st "if (getParameters().getVmBackup().getFromCheckpointId() != null)"</technical_language>

Target:
protected boolean validate() { DiskExistenceValidator diskExistenceValidator = createDiskExistenceValidator(getDiskIds()); if (!validate(diskExistenceValidator.disksNotExist())) { return false; } if (getParameters().getVmBackup().getFromCheckpointId() != null) { if (!FeatureSupported.isIncrementalBackupSupported(getCluster().getCompatibilityVersion())) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_INCREMENTAL_BACKUP_NOT_SUPPORTED); } DiskImagesValidator diskImagesValidator = createDiskImagesValidator(getDisks()); if (!validate(diskImagesValidator.incrementalBackupEnabled())) { return false; } } if (!getVm().getStatus().isQualifiedForVmBackup()) { return failValidation(EngineMessage.CANNOT_START_BACKUP_VM_SHOULD_BE_IN_UP_STATUS); } if (!vmBackupDao.getAllForVm(getVmId()).isEmpty()) { return failValidation(EngineMessage.CANNOT_START_BACKUP_ALREADY_IN_PROGRESS); } if (!getVds().isBackupEnabled()) { return failValidation(EngineMessage.CANNOT_START_BACKUP_NOT_SUPPORTED_BY_VDS, String.format("$vdsName %s", getVdsName())); } return true; }
Source:
<code>protected <START> ResourceSetListenerImpl getEventListener() <END> { return eventListener; }</code><technical_language>Dont return XXXImpl, ResourceSetListener interface</technical_language>

Target:
protected ResourceSetListener getEventListener() { return eventListener; }
Source:
<code>public StrPosb() { super(new Column[] { <START> new Column("org/apache/tajo/storage/text", TajoDataTypes.Type.TEXT), <END> new Column("substring", TajoDataTypes.Type.TEXT) }); }</code><technical_language>This changed while refactor 'text'</technical_language>

Target:
public StrPosb() { super(new Column[] { new Column("text", TajoDataTypes.Type.TEXT), new Column("substring", TajoDataTypes.Type.TEXT) }); }
Source:
<code>public Filter toFilter() { ExtractionFn extractionFn = getExtractionFn(); String dimension = getDimension(); final String value = getValue(); if (extractionFn == null) { return new NoBitmapSelectorFilter(dimension, value); } else { final String valueOrNull = Strings.emptyToNull(value); final DruidPredicateFactory predicateFactory = new DruidPredicateFactory() { @Override public Predicate<String> makeStringPredicate() { return new Predicate<String>() { @Override public boolean apply(String input) { return Objects.equals(valueOrNull, input); } }; } @Override public DruidLongPredicate makeLongPredicate() { return new DruidLongPredicate() { @Override public boolean applyLong(long input) { return false; } }; } @Override public DruidFloatPredicate makeFloatPredicate() { <START> return new DruidFloatPredicate() <END> { @Override public boolean applyFloat(float input) { return false; } }; } }; return new NoBitmapDimensionPredicateFilter(dimension, predicateFactory, extractionFn); } }</code><technical_language>Please extract a singleton</technical_language>

Target:
public Filter toFilter() { ExtractionFn extractionFn = getExtractionFn(); String dimension = getDimension(); final String value = getValue(); if (extractionFn == null) { return new NoBitmapSelectorFilter(dimension, value); } else { final String valueOrNull = Strings.emptyToNull(value); final DruidPredicateFactory predicateFactory = new DruidPredicateFactory() { @Override public Predicate<String> makeStringPredicate() { return new Predicate<String>() { @Override public boolean apply(String input) { return Objects.equals(valueOrNull, input); } }; } @Override public DruidLongPredicate makeLongPredicate() { return DruidLongPredicate.ALWAYS_FALSE; } @Override public DruidFloatPredicate makeFloatPredicate() { return DruidFloatPredicate.ALWAYS_FALSE; } }; return new NoBitmapDimensionPredicateFilter(dimension, predicateFactory, extractionFn); } }
Source:
<code>public void testCachePutPluginModifiesMetacard() { String name = "attribute"; String value = "value"; List<Metacard> metacards = new ArrayList<>(); Metacard metacard = mock(Metacard.class); when(metacard.getSourceId()).thenReturn(TEST_ID); when(metacard.getId()).thenReturn(TEST_ID); metacards.add(metacard); when(mockCachePutPlugin.process(any())) .thenAnswer( (Answer<Optional<Metacard>>) invocationOnMock -> { Metacard metacardToModify = (Metacard) invocationOnMock.getArguments()[0]; metacardToModify.setAttribute(new AttributeImpl(name, value)); return Optional.of(metacardToModify); }); solrCache.put(metacards); <START> ArgumentCaptor<Attribute> argumentCaptor = ArgumentCaptor.forClass(Attribute.class); <END> verify(metacard).setAttribute(argumentCaptor.capture()); assertThat(argumentCaptor.getValue().getName(), is(name)); assertThat(argumentCaptor.getValue().getValue(), is(value)); }</code><technical_language>I thinking a captor for metacard list in metacardClient.add(updatedMetacards, false) call verify modified metacards passed cache client. a MetacardImpl instead of a mock verification easier too</technical_language>

Target:
public void testCachePutPluginModifiesMetacard() throws SolrServerException, MetacardCreationException, IOException { String name = "attribute"; String value = "value"; List<Metacard> metacards = new ArrayList<>(); MetacardImpl metacard = new MetacardImpl(); metacard.setSourceId(TEST_ID); metacard.setId(TEST_ID); metacards.add(metacard); when(mockCachePutPlugin.process(any())) .thenAnswer( invocationOnMock -> { Metacard metacardToModify = (Metacard) invocationOnMock.getArguments()[0]; metacardToModify.setAttribute(new AttributeImpl(name, value)); return Optional.of(metacardToModify); }); solrCache.put(metacards); ArgumentCaptor<List> updatedMetacardsCaptor = ArgumentCaptor.forClass(List.class); verify(mockCacheSolrMetacardClient).add(updatedMetacardsCaptor.capture(), eq(false)); assertThat(updatedMetacardsCaptor.getValue().size(), is(1)); assertThat(updatedMetacardsCaptor.getValue().get(0), is(metacard)); Metacard capturedMetacard = (Metacard) updatedMetacardsCaptor.getValue().get(0); assertThat(capturedMetacard.getAttribute(name), notNullValue()); assertThat(capturedMetacard.getAttribute(name).getValue(), is(value)); }
Source:
<code>void canConstructReportsUrlFromTeamcityProperty() { System.setProperty("teamcity.serverUrl", "<LINK_0>"); System.setProperty("teamcity.buildType.id", "my-build"); System.setProperty("build.number", "1"); <START> assertThat(new SelenideConfig().reportsUrl()).isEqualTo("<LINK_0>/repository/download/my-build/1:id/"); <END> }</code><technical_language>Double slash .org part, is correct? not</technical_language>

Target:
void canConstructReportsUrlFromTeamcityProperty() { System.setProperty("teamcity.serverUrl", "<LINK_0>"); System.setProperty("teamcity.buildType.id", "my-build"); System.setProperty("build.number", "1"); assertThat(new SelenideConfig().reportsUrl()).isEqualTo("<LINK_0>repository/download/my-build/1:id/"); }
Source:
<code>public boolean hasNext() { <START> return currentIdx < numberOfEntries(mmap); <END> }</code><technical_language>if this is a sealed segment, is numberOfEntries(mmap) a fixed value? If yes, worth keeping calculating multiple times</technical_language>

Target:
public boolean hasNext() { return currentIdx < numberOfEntries; }
Source:
<code>public static List<ContainerStatus> getContainerStatus(Pod pod) { PodStatus podStatus = pod.getStatus(); if (podStatus == null) { return Collections.emptyList(); } <START> return pod.getStatus().getContainerStatuses(); <END> }</code><technical_language>suggestion return podStatus.getContainerStatuses();</technical_language>

Target:
public static List<ContainerStatus> getContainerStatus(Pod pod) { PodStatus podStatus = pod.getStatus(); if (podStatus == null) { return Collections.emptyList(); } return podStatus.getContainerStatuses(); }
Source:
<code>public PageRequest() { <START> this.offset = null; <END> this.limit = DEFAULT_LIMIT; }</code><technical_language>pls call this(null, DEFAULT_LIMIT)</technical_language>

Target:
public PageRequest() { this(null, DEFAULT_LIMIT); }