auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public ConstantExpression(final float value) { valueType = Type.FLOAT_TYPE; <START> this.value = String.valueOf(value) + "f"; <END> }</code><technical_language>Possibly compiled away, + 'f' more efficient in principle</technical_language>

Target:
public ConstantExpression(final float value) { this(Type.FLOAT_TYPE, String.valueOf(value) + 'f'); }
Source:
<code>Function<String, CharSource> invalidEscapeStringFunction(final InvalidEscapeStringPolicy policy) { return new Function<String, CharSource>() { final Pattern p = Pattern.compile("\\p{XDigit}+"); @Override public CharSource apply(@Nullable String input) { <START> assert input != null; <END> if (policy == InvalidEscapeStringPolicy.PASSTHROUGH) { return CharSource.wrap(input); } StringBuilder s = new StringBuilder(); char[] charArray = input.toCharArray(); for (int i=0 ; i < charArray.length ; i++) { char c = charArray[i]; if (c == '\\') { if (charArray.length > i + 1) { char next = charArray[i + 1]; switch (next) { case 'b': case 'f': case 'n': case 'r': case 't': case '"': case '\\': case '/': s.append(c); break; case 'u': if (charArray.length > i + 5) { char[] hexChars = {charArray[i + 2], charArray[i + 3], charArray[i + 4], charArray[i + 5]}; String hexString = new String(hexChars); if (p.matcher(hexString).matches()) { s.append(c); } } break; default: switch (policy) { case SKIP: i++; break; case UNESCAPE: break; } break; } } } else { s.append(c); } } return CharSource.wrap(s.toString()); } }; }</code><technical_language>com.google.common.base.Preconditions instead of assert. fine, though</technical_language>

Target:
Function<String, CharSource> invalidEscapeStringFunction(final InvalidEscapeStringPolicy policy) { return new Function<String, CharSource>() { final Pattern digitsPattern = Pattern.compile("\\p{XDigit}+"); @Override public CharSource apply(@Nullable String input) { Preconditions.checkNotNull(input); if (policy == InvalidEscapeStringPolicy.PASSTHROUGH) { return CharSource.wrap(input); } StringBuilder builder = new StringBuilder(); char[] charArray = input.toCharArray(); for (int characterIndex = 0; characterIndex < charArray.length; characterIndex++) { char c = charArray[characterIndex]; if (c == '\\') { if (charArray.length > characterIndex + 1) { char next = charArray[characterIndex + 1]; switch (next) { case 'b': case 'f': case 'n': case 'r': case 't': case '"': case '\\': case '/': builder.append(c); break; case 'u': if (charArray.length > characterIndex + 5) { char[] hexChars = {charArray[characterIndex + 2], charArray[characterIndex + 3], charArray[characterIndex + 4], charArray[characterIndex + 5]}; String hexString = new String(hexChars); if (digitsPattern.matcher(hexString).matches()) { builder.append(c); } else { if (policy == InvalidEscapeStringPolicy.SKIP) { characterIndex++; } } } break; default: switch (policy) { case SKIP: characterIndex++; break; case UNESCAPE: break; } break; } } } else { builder.append(c); } } return CharSource.wrap(builder.toString()); } }; }
Source:
<code>private static JsonObject configureClusterManager() { JsonObject zkConfig = new JsonObject(); <START> zkConfig.put("zookeeperHosts", "192.168.1.12"); <END> zkConfig.put("rootPath", "io.vertx"); zkConfig.put("retry", new JsonObject() .put("initialSleepTime", 3000) .put("maxTimes", 3)); return zkConfig; }</code><technical_language>localhost</technical_language>

Target:
private static JsonObject configureClusterManager() { JsonObject zkConfig = new JsonObject(); zkConfig.put("zookeeperHosts", "localhost"); zkConfig.put("rootPath", "io.vertx"); zkConfig.put("retry", new JsonObject() .put("initialSleepTime", 3000) .put("maxTimes", 3)); return zkConfig; }
Source:
<code>private String getLeftNodeFieldName(RexNode left) { switch (left.getKind()) { case INPUT_REF: final RexInputRef left1 = (RexInputRef) left; return fieldNames.get(left1.getIndex()); case CAST: return getLeftNodeFieldName(((RexCall) left).operands.get(0)); case OTHER_FUNCTION: case ITEM: <START> return left.accept(new GeodeRules.RexToGeodeTranslator(this.fieldNames)); <END> default: return null; } }</code><technical_language>Put ITEM in front of OTHER_FUNCTION</technical_language>

Target:
private String getLeftNodeFieldName(RexNode left) { switch (left.getKind()) { case INPUT_REF: final RexInputRef left1 = (RexInputRef) left; return fieldNames.get(left1.getIndex()); case CAST: return getLeftNodeFieldName(((RexCall) left).operands.get(0)); case ITEM: case OTHER_FUNCTION: return left.accept(new GeodeRules.RexToGeodeTranslator(this.fieldNames)); default: return null; } }
Source:
<code>public GlusterVolumeStatusReturnForXmlRpc(Guid clusterId, Map<String, Object> innerMap) { super(innerMap); mStatus = new StatusForXmlRpc((Map<String, Object>) innerMap.get(STATUS)); Map<String, Object> statusInfo = (Map<String, Object>) innerMap.get(VOLUME_STATUS); if (statusInfo != null) { String volumeName = (String) statusInfo.get(VOLUME_NAME); GlusterVolumeEntity volume = getGlusterVolumeDao().getByName(clusterId, volumeName); volumeAdvancedDetails.setVolumeId(volume.getId()); List<BrickDetails> brickDetails = prepareBrickDetails(volume, (Object[]) statusInfo.get(BRICKS)); volumeAdvancedDetails.setBrickDetails(brickDetails); <START> if (statusInfo.containsKey(NFS_KEY) || statusInfo.containsKey(SHD_KEY)) { <END> volumeAdvancedDetails.setServiceInfo(prepareServiceInfo(statusInfo)); } } }</code><technical_language>containsKey() check is happening in getServiceInfo(). I is required here</technical_language>

Target:
public GlusterVolumeStatusReturnForXmlRpc(Guid clusterId, Map<String, Object> innerMap) { super(innerMap); mStatus = new StatusForXmlRpc((Map<String, Object>) innerMap.get(STATUS)); Map<String, Object> statusInfo = (Map<String, Object>) innerMap.get(VOLUME_STATUS); if (statusInfo != null) { String volumeName = (String) statusInfo.get(VOLUME_NAME); GlusterVolumeEntity volume = getGlusterVolumeDao().getByName(clusterId, volumeName); volumeAdvancedDetails.setVolumeId(volume.getId()); List<BrickDetails> brickDetails = prepareBrickDetails(volume, (Object[]) statusInfo.get(BRICKS)); volumeAdvancedDetails.setBrickDetails(brickDetails); volumeAdvancedDetails.setServiceInfo(prepareServiceInfo(statusInfo)); } }
Source:
<code>private LocalDate decrement(LocalDate date, Interval interval) { switch (interval) { case DAILY: return LocalDate.now().minusDays(1); case MONTHLY: return LocalDate.now().minusMonths(1); case YEARLY: return LocalDate.now().minusYears(1); case FACT: return date.minusYears(999); default: <START> return date.plusYears(999); <END> } }</code><technical_language>sure</technical_language>

Target:
private LocalDate decrement(LocalDate date, Interval interval) { switch (interval) { case DAILY: return date.minusDays(1); case MONTHLY: return date.minusMonths(1); case YEARLY: return date.minusYears(1); default: return LocalDate.MIN; } }
Source:
<code>public void loadCredentials(){ <START> mCredentials = new Credentials("<LINK_0>","", ""); <END> }</code><technical_language>Please analyze if testing local.properties store retrieve credentials. Review of local.properties, this file is uploaded source control need configured in Gradle files</technical_language>

Target:
public void loadCredentials(){ mCredentials = new Credentials(BuildConfig.DEFAULT_SERVER, BuildConfig.DEFAULT_USER, BuildConfig.DEFAULT_PASSWORD); }
Source:
<code>public void exceptionsAreSuppressedAndReportedWhenClosing() { SafeShutdownRunner runner = new SafeShutdownRunner(Duration.ofSeconds(1)); assertThatCode(() -> runner.shutdownSafely(throwingRunnable)).doesNotThrowAnyException(); assertThatThrownBy(runner::close) <START> .isInstanceOf(RuntimeException.class) <END> .hasSuppressedException(EXCEPTION); }</code><technical_language>a message assert this? I point is exception thrown runner close exception happened shutdown operation</technical_language>

Target:
public void exceptionsAreSuppressedAndReportedWhenClosing() { SafeShutdownRunner runner = new SafeShutdownRunner(Duration.ofSeconds(1)); assertThatCode(() -> runner.shutdownSafely(throwingRunnable)).doesNotThrowAnyException(); assertThatThrownBy(runner::close) .isInstanceOf(SafeRuntimeException.class) .hasSuppressedException(EXCEPTION); }
Source:
<code>public void platformMotionUpAABBTest() { Level check = new Level(emptyPlayer, emptyUnit, new Grid<>(Arrays.asList( Cell.WALL, Cell.WALL, Cell.WALL, Cell.WALL, Cell.PLATFORM, Cell.WALL, Cell.WALL, Cell.WALL, Cell.WALL), 3, 3)); CollisionHandler handler = new CollisionHandler(check); Cell cell = handler.checkLevelAABB( new AABB(new Point(1, 1), new Point(2, 2)), new Point(0, -1)); <START> assertTrue(cell.getType() == Cell.EMPTY); <END> }</code><technical_language>assertEquals instead of == operator combined assertTrue, == work properly for non-objects. <testing</technical_language>

Target:
public void platformMotionUpAABBTest() { Level check = new Level(emptyPlayer, emptyUnit, new Grid<>(Arrays.asList( Cell.WALL, Cell.WALL, Cell.WALL, Cell.WALL, Cell.PLATFORM, Cell.WALL, Cell.WALL, Cell.WALL, Cell.WALL), 3, 3)); CollisionHandler handler = new CollisionHandler(check); Cell cell = handler.checkLevelAABB( new AABB(new Point(1, 1), new Point(2, 2)), new Point(0, -1)); assertEquals(cell, Cell.EMPTY); }
Source:
<code>void updateButton() { getButtonWidget().setVisible(command.getIsAvailable() && command.getIsVisible()); getButtonWidget().setEnabled(command.getIsExecutionAllowed()); String title = ""; <START> StringBuilder sb = new StringBuilder(""); <END> if (!command.getExecuteProhibitionReasons().isEmpty()) { for (String reason : command.getExecuteProhibitionReasons()) { sb.append(reason).append(","); } title = sb.toString(); if (!title.equals("")) { title = title.substring(0, title.length() -1); } } else { title = !getButtonWidget().getText().equals("") ? getButtonWidget().getText() : command.getTitle(); } getButtonWidget().setTitle(title); if (command.getTitle() == null) { getButtonWidget().setText(""); } else if (getButtonWidget().getText().equals("")) { getButtonWidget().setText(command.getTitle()); } }</code><technical_language>empty string is redundent</technical_language>

Target:
void updateButton() { getButtonWidget().setVisible(command.getIsAvailable() && command.getIsVisible()); getButtonWidget().setEnabled(command.getIsExecutionAllowed()); String title = ""; StringBuilder sb = new StringBuilder(); if (!command.getExecuteProhibitionReasons().isEmpty()) { for (String reason : command.getExecuteProhibitionReasons()) { sb.append(reason).append(","); } title = sb.toString(); if (title.length() != 0) { title = title.substring(0, title.length() -1); } } else { title = !getButtonWidget().getText().equals("") ? getButtonWidget().getText() : command.getTitle(); } getButtonWidget().setTitle(title); if (command.getTitle() == null) { getButtonWidget().setText(""); } else if (getButtonWidget().getText().equals("")) { getButtonWidget().setText(command.getTitle()); } }
Source:
<code>private static boolean matches(String expectedLine, String actualLine) { if (expectedLine.equals(actualLine)) { return true; } try { Pattern pattern = Pattern.compile(expectedLine); Matcher matcher = pattern.matcher(actualLine); <START> return matcher.matches(); <END> } catch (PatternSyntaxException ignore) { return false; } }</code><technical_language>considered shorthand return expectedLine.matches(actualLine); for brevity</technical_language>

Target:
static boolean matches(String expectedLine, String actualLine) { if (expectedLine.equals(actualLine)) { return true; } try { return actualLine.matches(expectedLine); } catch (PatternSyntaxException ignore) { return false; } }
Source:
<code>public void run() { boolean done = Repeater.create(String.format("Request %s status check", builder.request.toString())) .every(Duration.ONE_SECOND) .until(new Callable<Boolean>() { @Override public Boolean call() throws Exception { final String json = HttpTool.httpGet(builder.httpClient, URI.create(builder.request.getHref()), builder.headers).getContentAsString(); final String status = JsonPath.read(json, "$.Requests.request_status"); if (!VALID_STATES.contains(status)) { throw new RuntimeException( "Request fails with state " + status + ". Check here for details " + builder.request.getHref()); } return StringUtils.equals(status, "COMPLETED"); } }) .limitTimeTo(builder.timeout) .rethrowExceptionImmediately() .run(); if (!done) { throw new RuntimeException(builder.errorMessage); } <START> ; <END> }</code><technical_language>removed</technical_language>

Target:
public void run() { boolean done = Repeater.create(String.format("Request %s status check", builder.request.toString())) .every(Duration.ONE_SECOND) .until(new Callable<Boolean>() { @Override public Boolean call() throws Exception { final String json = HttpTool.httpGet(builder.httpClient, URI.create(builder.request.getHref()), builder.headers).getContentAsString(); final String status = JsonPath.read(json, "$.Requests.request_status"); if (!VALID_STATES.contains(status)) { throw new RuntimeException( "Request fails with state " + status + ". Check here for details " + builder.request.getHref()); } return StringUtils.equals(status, "COMPLETED"); } }) .limitTimeTo(builder.timeout) .rethrowExceptionImmediately() .run(); if (!done) { throw new RuntimeException(builder.errorMessage); } }
Source:
<code>public Boolean get(Object key) { if (key == null) { throw new IllegalArgumentException("Query key is null"); } if (jexl.containsKey(key) && jexl.get(key) != null) { <START> return jexl.get(key); <END> } final JexlVCMatchExp exp = (JexlVCMatchExp) key; final boolean matches = evaluateExpression(exp); jexl.put(exp, matches); return matches; }</code><technical_language>good save returned jexl.get(key) call call in a row here</technical_language>

Target:
public Boolean get(Object key) { if (key == null) { throw new IllegalArgumentException("Query key is null"); } final Boolean value = jexl.get(key); if (jexl.containsKey(key) && value != null) { return value; } final JexlVCMatchExp exp = (JexlVCMatchExp) key; final boolean matches = evaluateExpression(exp); jexl.put(exp, matches); return matches; }
Source:
<code>public boolean hasACL( NodeCache cache ) { <START> return getMixinTypes(cache).contains(ModeShapeLexicon.ACCESS_CONTROLLABLE); <END> }</code><technical_language>I this answers question suggested method name. This returns node is capable of ACL. issue discussion, this is acceptable I track (and cache in a field) is ACL child reference. (Note choose for child reference _not_ verify reference resolves a CachedNode.)</technical_language>

Target:
public boolean hasACL( NodeCache cache ) { if (hasACL == null) { hasACL = getChildReferences(cache).getChild(ModeShapeLexicon.ACCESS_LIST_NODE_NAME) != null; } return hasACL; }
Source:
<code>private void initSessionFromCache() { session = OutcomesUtils.getCachedSession(); if (session.isIndirect()) indirectNotificationIds = getLastNotificationsReceivedIds(); else if (session.isDirect()) <START> directNotificationId = OutcomesUtils.getCacheNotificationOpenId(); <END> }</code><technical_language>Change tense getCachedNotificationOpenId</technical_language>

Target:
private void initSessionFromCache() { session = OutcomesUtils.getCachedSession(); if (session.isIndirect()) indirectNotificationIds = getLastNotificationsReceivedIds(); else if (session.isDirect()) directNotificationId = OutcomesUtils.getCachedNotificationOpenId(); }
Source:
<code>public void addStreamFile(File streamFile) throws CTFReaderException { <START> File indexFile = new File(streamFile.getParentFile(), "index" + File.separator + streamFile.getName() + ".IDX"); <END> Set<StreamInputPacketIndexEntry> sipies = new HashSet<>(); if (indexFile.exists()) { CTFIndexFile ctfIndex = new CTFIndexFile(indexFile); sipies.addAll(ctfIndex.getStreamInputPacketIndexEntries()); } openStreamInput(streamFile, sipies); }</code><technical_language>Souldn't case idx? hard coded directory name file extension</technical_language>

Target:
public void addStreamFile(File streamFile) throws CTFReaderException { File indexFile = new File(streamFile.getParentFile(), INDEX_FILE_FILTER + File.separator + streamFile.getName() + INDEX_EXTENSION); Set<StreamInputPacketIndexEntry> sipies = new HashSet<>(); if (indexFile.exists()) { CTFIndexFile ctfIndex = new CTFIndexFile(indexFile); sipies.addAll(ctfIndex.getStreamInputPacketIndexEntries()); } openStreamInput(streamFile, sipies); }
Source:
<code>private synchronized void createMissingTokens( String[] names, int[] ids ) { PrimitiveIntSet unresolvedIndexes = Primitive.intSet(); resolveIds( names, ids, i -> !unresolvedIndexes.add( i ) ); if ( !unresolvedIndexes.isEmpty() ) { <START> createUnresolvedTokens( unresolvedIndexes, names, ids ); <END> unresolvedIndexes.visitKeys( i -> { tokenCache.put( tokenFactory.newToken( names[i], ids[i] ) ); return false; } ); } }</code><technical_language>A name duplicate resolveIds stop early, result in names resolved/created. Problem</technical_language>

Target:
private synchronized void createMissingTokens( String[] names, int[] ids ) { MutableIntSet unresolvedIndexes = new IntHashSet(); resolveIds( names, ids, i -> !unresolvedIndexes.add( i ) ); if ( !unresolvedIndexes.isEmpty() ) { ObjectIntHashMap<String> createdTokens = createUnresolvedTokens( unresolvedIndexes, names, ids ); createdTokens.forEachKeyValue( ( name, index ) -> tokenCache.put( tokenFactory.newToken( name, ids[index] ) ) ); } }
Source:
<code>public int addExperiment(String expID) throws SQLException, IOException { if (expID == null || expID.isEmpty()) { throw new IOException("Invalid experiment ID."); } Experiment e = getExperiment(expID); if (e != null) { throw new IOException(expID + " already exists"); } fpg.generateExperimentFolders(expID); String query = "INSERT INTO Experiment " + "(ExpID) VALUES (?)"; int rs = 0; try (PreparedStatement stmt= conn.prepareStatement(query);) { stmt.setString(1, expID); rs = stmt.executeUpdate(); stmt.close(); } catch (SQLException ex) { conn.rollback(); throw ex; <START> } <END> return rs; }</code><technical_language>classes implement AutoCloseable interface allowed in try-with-resources clause. Therefore, close() call is needed system calls automatically for you. Also, closing shutting resources done in finally clause</technical_language>

Target:
public int addExperiment(String expID) throws SQLException, IOException { if (expID == null || expID.isEmpty()) { throw new IOException("Invalid experiment ID."); } Experiment e = getExperiment(expID); if (e != null) { throw new IOException(expID + " already exists"); } fpg.generateExperimentFolders(expID); String query = "INSERT INTO Experiment " + "(ExpID) VALUES (?)"; int rs = 0; try (PreparedStatement stmt= conn.prepareStatement(query);) { stmt.setString(1, expID); rs = stmt.executeUpdate(); } catch (SQLException ex) { conn.rollback(); throw ex; } return rs; }
Source:
<code>public long getBucketKeyFor(Object event) { if (getter == null) { Class<?> fqcn = event.getClass(); <START> Getter<Object, Object> getterTime = PojoUtils.createGetter(fqcn, keyExpression, Object.class); <END> getter = getterTime; } return Math.abs(((Object)getter.get(event)).hashCode()) % noOfBuckets; }</code><technical_language>getter created start processing event</technical_language>

Target:
public long getBucketKeyFor(Object event) { return Math.abs(((Object)getter.get(event)).hashCode()) % noOfBuckets; }
Source:
<code>protected void starting(Description description) { <START> if(!isRecorderDisabled()) { <END> startRecording(description); } }</code><technical_language>@lordofthejars Ditto</technical_language>

Target:
protected void starting(Description description) { if (isRecorderEnabled()) { startRecording(description); } }
Source:
<code>public boolean indexShareable() { TypedProperties properties = properties(); boolean hasRamDirectoryProvider = false; boolean hasOtherDirectoryProvider = false; for (Object objKey : properties.keySet()) { String key = (String) objKey; if (key.endsWith(DIRECTORY_PROVIDER_KEY)) { if (properties.get(key).equals(RAM_DIRECTORY_PROVIDER)) { hasRamDirectoryProvider = true; } else { <START> hasOtherDirectoryProvider = true; <END> } } } boolean ramOnly = hasRamDirectoryProvider && !hasOtherDirectoryProvider; return !ramOnly; }</code><technical_language>a couple of questions: - return true here? - is configure multiple directory providers</technical_language>

Target:
public boolean indexShareable() { TypedProperties properties = properties(); boolean hasRamDirectoryProvider = false; for (Object objKey : properties.keySet()) { String key = (String) objKey; if (key.endsWith(DIRECTORY_PROVIDER_KEY)) { if (properties.get(key).equals(RAM_DIRECTORY_PROVIDER)) { hasRamDirectoryProvider = true; } else { return true; } } } return !hasRamDirectoryProvider; }
Source:
<code>private CompletableFuture<RestResponse> createCache(RestRequest request) { NettyRestResponse.Builder responseBuilder = new NettyRestResponse.Builder(); ContentSource contents = request.contents(); String cacheName = request.variables().get("cacheName"); byte[] bytes = contents.rawContent(); if (bytes == null || bytes.length == 0) { return CompletableFuture.supplyAsync(() -> { restCacheManager.getInstance().administration().createCache(cacheName, (String) null); responseBuilder.status(OK); return responseBuilder.build(); }, executor); } ConfigurationBuilder cfgBuilder = new ConfigurationBuilder(); MediaType sourceType = request.contentType() == null ? APPLICATION_JSON : request.contentType(); if (sourceType.match(APPLICATION_JSON)) { JSON_READER.readJson(cfgBuilder, StandardConversions.convertTextToObject(bytes, sourceType)); } else if (sourceType.match(MediaType.APPLICATION_XML)) { ConfigurationBuilderHolder builderHolder = PARSER_REGISTRY.parse(new String(bytes, UTF_8)); cfgBuilder = builderHolder.getCurrentConfigurationBuilder(); } else { responseBuilder.status(HttpResponseStatus.UNSUPPORTED_MEDIA_TYPE); return CompletableFuture.completedFuture(responseBuilder.build()); } ConfigurationBuilder finalCfgBuilder = cfgBuilder; <START> return CompletableFuture.supplyAsync(() -> { <END> restCacheManager.getInstance().administration().createCache(cacheName, finalCfgBuilder.build()); responseBuilder.status(OK); return responseBuilder.build(); }); }</code><technical_language>Executor</technical_language>

Target:
private CompletableFuture<RestResponse> createCache(RestRequest request) { NettyRestResponse.Builder responseBuilder = new NettyRestResponse.Builder(); ContentSource contents = request.contents(); String cacheName = request.variables().get("cacheName"); byte[] bytes = contents.rawContent(); if (bytes == null || bytes.length == 0) { return CompletableFuture.supplyAsync(() -> { restCacheManager.getInstance().administration().createCache(cacheName, (String) null); responseBuilder.status(OK); return responseBuilder.build(); }, executor); } ConfigurationBuilder cfgBuilder = new ConfigurationBuilder(); MediaType sourceType = request.contentType() == null ? APPLICATION_JSON : request.contentType(); if (sourceType.match(APPLICATION_JSON)) { JSON_READER.readJson(cfgBuilder, StandardConversions.convertTextToObject(bytes, sourceType)); } else if (sourceType.match(MediaType.APPLICATION_XML)) { ConfigurationBuilderHolder builderHolder = PARSER_REGISTRY.parse(new String(bytes, UTF_8)); cfgBuilder = builderHolder.getCurrentConfigurationBuilder(); } else { responseBuilder.status(HttpResponseStatus.UNSUPPORTED_MEDIA_TYPE); return CompletableFuture.completedFuture(responseBuilder.build()); } ConfigurationBuilder finalCfgBuilder = cfgBuilder; return CompletableFuture.supplyAsync(() -> { restCacheManager.getInstance().administration().createCache(cacheName, finalCfgBuilder.build()); responseBuilder.status(OK); return responseBuilder.build(); }, executor); }
Source:
<code>private PollingResult compare(Launcher launcher, TaskListener listener, MercurialTagAction baseline, PrintStream output, Node node, FilePath repository) throws IOException, InterruptedException { HgExe hg = new HgExe(this, launcher, node, listener, new EnvVars()); String remote = hg.tip(repository, getBranch()); String rev = hg.tipNumber(repository, getBranch()); if (remote == null) { throw new IOException("failed to find ID of branch head"); } if (remote.equals(baseline.id)) { return new PollingResult(baseline, new MercurialTagAction(remote, rev, subdir), Change.NONE); } <START> if (rev == null) { <END> throw new IOException("failed to find revision of branch head"); } Set<String> changedFileNames = parseStatus(hg.popen(repository, listener, false, new ArgumentListBuilder("status", "--rev", baseline.id, "--rev", remote))); MercurialTagAction cur = new MercurialTagAction(remote, rev, subdir); return new PollingResult(baseline,cur,computeDegreeOfChanges(changedFileNames,output)); }</code><technical_language>Checking for null it</technical_language>

Target:
private PollingResult compare(Launcher launcher, TaskListener listener, MercurialTagAction baseline, PrintStream output, Node node, FilePath repository) throws IOException, InterruptedException { HgExe hg = new HgExe(this, launcher, node, listener, new EnvVars()); String remote = hg.tip(repository, getBranch()); String rev = hg.tipNumber(repository, getBranch()); if (remote == null) { throw new IOException("failed to find ID of branch head"); } if (rev == null) { throw new IOException("failed to find revision of branch head"); } if (remote.equals(baseline.id)) { return new PollingResult(baseline, new MercurialTagAction(remote, rev, subdir), Change.NONE); } Set<String> changedFileNames = parseStatus(hg.popen(repository, listener, false, new ArgumentListBuilder("status", "--rev", baseline.id, "--rev", remote))); MercurialTagAction cur = new MercurialTagAction(remote, rev, subdir); return new PollingResult(baseline,cur,computeDegreeOfChanges(changedFileNames,output)); }
Source:
<code>public static <T> ArrayList<T> Intersection(ArrayList<ArrayList<T>> lists) { ArrayList<T> result = new ArrayList<T>(); if (lists != null) { for (ArrayList<T> list : lists) { <START> result.retainAll(list); <END> } } return result; }</code><technical_language>I understand it, result is empty. try debug it</technical_language>

Target:
public static <T> ArrayList<T> Intersection(ArrayList<ArrayList<T>> lists) { ArrayList<T> result = new ArrayList<T>(); if (lists != null) { result.addAll(lists.get(0)); for (ArrayList<T> list : lists) { result.retainAll(list); } } return result; }
Source:
<code>public Transfer generateGroupFileContent( Group group, List<ArtifactStore> members, String path, EventMetadata eventMetadata ) throws IndyWorkflowException { String realPath = path; boolean canProcess; if ( canProcess( realPath ) ) { canProcess = true; } else { realPath = pathCalculator.calculateStoragePath( group.getKey(), path ); canProcess = canProcess( realPath ); } if ( !canProcess ) { return null; } final Transfer target = fileManager.getTransfer( group, realPath ); logger.debug( "Working on metadata file: (already exists? {})", target, target != null && target.exists() ); if ( !target.exists() ) { String toMergePath = realPath; if ( !realPath.endsWith( PackageMetadataMerger.METADATA_NAME ) ) { toMergePath = normalize( normalize( parentPath( toMergePath ) ), PackageMetadataMerger.METADATA_NAME ); } final List<Transfer> sources = fileManager.retrieveAllRaw( members, toMergePath, new EventMetadata() ); final byte[] merged = merger.merge( sources, group, toMergePath ); if ( merged != null ) { <START> OutputStream fos = null; <END> try { fos = target.openOutputStream( TransferOperation.GENERATE, true, eventMetadata ); fos.write( merged ); } catch ( final IOException e ) { throw new IndyWorkflowException( "Failed to write merged metadata to: {}.\nError: {}", e, target, e.getMessage() ); } finally { closeQuietly( fos ); } helper.writeMergeInfo( merged, sources, group, toMergePath ); } } if ( target.exists() ) { return target; } return null; }</code><technical_language>try-with-resources a bit cleaner here</technical_language>

Target:
public Transfer generateGroupFileContent( Group group, List<ArtifactStore> members, String path, EventMetadata eventMetadata ) throws IndyWorkflowException { String realPath = path; boolean canProcess; if ( canProcess( realPath ) ) { canProcess = true; } else { realPath = pathGenerator.getPath( new ConcreteResource( LocationUtils.toLocation( group ), path ) ); canProcess = canProcess( realPath ); } if ( !canProcess ) { return null; } final Transfer target = fileManager.getTransfer( group, realPath ); logger.debug( "Working on metadata file: (already exists? {})", target, exists( target ) ); if ( !exists( target ) ) { String toMergePath = realPath; if ( !realPath.endsWith( PackageMetadataMerger.METADATA_NAME ) ) { toMergePath = normalize( normalize( parentPath( toMergePath ) ), PackageMetadataMerger.METADATA_NAME ); } final List<Transfer> sources = fileManager.retrieveAllRaw( members, toMergePath, new EventMetadata() ); final byte[] merged = merger.merge( sources, group, toMergePath ); if ( merged != null ) { try (OutputStream fos = target.openOutputStream( TransferOperation.GENERATE, true, eventMetadata )) { fos.write( merged ); } catch ( final IOException e ) { throw new IndyWorkflowException( "Failed to write merged metadata to: {}.\nError: {}", e, target, e.getMessage() ); } helper.writeMergeInfo( helper.generateMergeInfo( sources ), group, toMergePath ); } } if ( target.exists() ) { return target; } return null; }
Source:
<code>public int getTotalParameterCount() { <START> int total = 0; <END> for (CurveParameterSize entry : data) { total += entry.getParameterCount(); } return total; }</code><technical_language>return data.stream().mapToInt(CurveParameterSize::getParameterCount).sum();</technical_language>

Target:
public int getTotalParameterCount() { return data.stream() .mapToInt(CurveParameterSize::getParameterCount) .sum(); }
Source:
<code>private Collection<? extends Permissionable> findFolderAssetContainers(final User user, final String hostId, final String orderByParam) { try { final Host host = this.hostAPI.find(hostId, user, false); final List<Folder> subFolders = this.findContainersAssetsByHost(host, user); final List<Container> containers = this.getFolderContainers(host, user, subFolders); if (UtilMethods.isSet(orderByParam)) { switch (orderByParam) { case "title asc": containers.sort(Comparator.comparing(Container::getTitle)); break; case "title desc": containers.sort(Comparator.comparing(Container::getTitle).reversed()); break; <START> case "modDate asc": <END> containers.sort(Comparator.comparing(Container::getModDate)); break; case "modDate desc": containers.sort(Comparator.comparing(Container::getModDate).reversed()); break; } } return containers; } catch (Exception e) { Logger.error(this, e.getMessage(), e); return Collections.emptyList(); } }</code><technical_language>consider a case insensitive comparison (ie.: moddate, title, etc)</technical_language>

Target:
private Collection<? extends Permissionable> findFolderAssetContainers(final User user, final String hostId, final String orderByParam) { try { final Host host = this.hostAPI.find(hostId, user, false); final List<Folder> subFolders = this.findContainersAssetsByHost(host, user); final List<Container> containers = this.getFolderContainers(host, user, subFolders); if (UtilMethods.isSet(orderByParam)) { switch (orderByParam.toLowerCase()) { case "title asc": containers.sort(Comparator.comparing(Container::getTitle)); break; case "title desc": containers.sort(Comparator.comparing(Container::getTitle).reversed()); break; case "moddate asc": containers.sort(Comparator.comparing(Container::getModDate)); break; case "moddate desc": containers.sort(Comparator.comparing(Container::getModDate).reversed()); break; } } return containers; } catch (Exception e) { Logger.error(this, e.getMessage(), e); return Collections.emptyList(); } }
Source:
<code>public static File getValidTestBundleFile(TemporaryFolder temporaryFolder) throws IOException { ZipEntrySource[] addedEntries = new ZipEntrySource[] { new FileSource(TestFiles.getTestLoadFile().getName(), TestFiles.getTestLoadFile()), new FileSource(TestFiles.getTestDeploymentDescriptorFile().getName(), TestFiles.getTestDeploymentDescriptorFile()), <START> new FileSource("models/" + TestFiles.getModelsFolderFile().listFiles()[0].getName(), <END> TestFiles.getModelsFolderFile().listFiles()[0]), new FileSource("models/" + TestFiles.getModelsFolderFile().listFiles()[1].getName(), TestFiles.getModelsFolderFile().listFiles()[1]),}; File zipFile = temporaryFolder.newFile(new BigInteger(130, new SecureRandom()).toString(32) + ".zip"); ZipUtil.pack(addedEntries, zipFile); return zipFile; }</code><technical_language>fixed in new commit</technical_language>

Target:
public static File getValidTestBundleFile(TemporaryFolder temporaryFolder) throws IOException { ZipEntrySource[] addedEntries = new ZipEntrySource[] { new FileSource(TestFiles.getTestLoadFile().getName(), TestFiles.getTestLoadFile()), new FileSource(TestFiles.getTestDeploymentDescriptorFile().getName(), TestFiles.getTestDeploymentDescriptorFile())}; File zipFile = temporaryFolder.newFile(new BigInteger(130, new SecureRandom()).toString(32) + ".zip"); ZipUtil.pack(addedEntries, zipFile); addModelsToZipFile(zipFile); return zipFile; }
Source:
<code>private void handleClick(final GQuery w) { final String indexOfSelected = w.css("order"); <START> <END> final List<Element> elements = Lists.newArrayList(w.get(0), activeItem.get(0)); activeItem.bind(TRANSITION_END, new Function() { @Override public void f() { $(this).unbind(TRANSITION_END); activeItem.removeClass(sliderResources.style().activeProduct()); w.addClass(sliderResources.style().activeProduct()); setOrder(w, String.valueOf(3)); setOrder(activeItem, indexOfSelected); $(elements).css("transform", "scale(1)"); activeItem = w; } }); $(elements).css("transform", "scale(0.1)"); }</code><technical_language>Useless nl</technical_language>

Target:
private void handleClick(final GQuery w) { final String indexOfSelected = w.css("order"); final List<Element> elements = Lists.newArrayList(w.get(0), activeItem.get(0)); activeItem.bind(TRANSITION_END, new Function() { @Override public void f() { $(this).unbind(TRANSITION_END); activeItem.removeClass(sliderResources.style().activeProduct()); w.addClass(sliderResources.style().activeProduct()); setOrder(w, String.valueOf(3)); setOrder(activeItem, indexOfSelected); $(children).css("transform", "scale(1)"); activeItem = w; } }); $(elements).css("transform", "scale(0.1)"); }
Source:
<code>public CoreEvent process(final CoreEvent event) throws MuleException { if (nestedChain == null) { return event; } final boolean txPrevoiuslyActive = isTransactionActive(); Transaction previousTx = TransactionCoordination.getInstance().getTransaction(); ExecutionTemplate<CoreEvent> executionTemplate = createScopeTransactionalExecutionTemplate(muleContext, transactionConfig); ExecutionCallback<CoreEvent> processingCallback = () -> { <START> Transaction newTx = TransactionCoordination.getInstance().getTransaction(); <END> if ((!txPrevoiuslyActive && isTransactionActive()) || (txPrevoiuslyActive && previousTx != newTx)) { TransactionAdapter transaction = (TransactionAdapter) newTx; transaction.setComponentLocation(getLocation()); return processWithChildContextBlocking(event, nestedChain, ofNullable(getLocation()), messagingExceptionHandler); } else { return processWithChildContextBlocking(event, nestedChain, ofNullable(getLocation()), messagingExceptionHandler); } }; try { return executionTemplate.execute(processingCallback); } catch (MuleException e) { throw e; } catch (Exception e) { throw new DefaultMuleException(errorInvokingMessageProcessorWithinTransaction(nestedChain, transactionConfig), e); } }</code><technical_language>newTx -> currentTx</technical_language>

Target:
public CoreEvent process(final CoreEvent event) throws MuleException { if (nestedChain == null) { return event; } final boolean txPrevoiuslyActive = isTransactionActive(); Transaction previousTx = TransactionCoordination.getInstance().getTransaction(); ExecutionTemplate<CoreEvent> executionTemplate = createScopeTransactionalExecutionTemplate(muleContext, transactionConfig); ExecutionCallback<CoreEvent> processingCallback = () -> { Transaction currentTx = TransactionCoordination.getInstance().getTransaction(); if ((!txPrevoiuslyActive && isTransactionActive()) || (txPrevoiuslyActive && previousTx != currentTx)) { TransactionAdapter transaction = (TransactionAdapter) currentTx; transaction.setComponentLocation(getLocation()); return processWithChildContextBlocking(event, nestedChain, ofNullable(getLocation()), messagingExceptionHandler); } else { return processWithChildContextBlocking(event, nestedChain, ofNullable(getLocation()), messagingExceptionHandler); } }; try { return executionTemplate.execute(processingCallback); } catch (MuleException e) { throw e; } catch (Exception e) { throw new DefaultMuleException(errorInvokingMessageProcessorWithinTransaction(nestedChain, transactionConfig), e); } }
Source:
<code>protected void parseInfo(Variant variant, String fileId, String studyId, String info, int numAllele) { VariantSourceEntry file = variant.getSourceEntry(fileId, studyId); for (String var : info.split(";")) { String[] splits = var.split("="); if (splits.length == 2) { switch (splits[0]) { case "ACC": String[] ids = splits[1].split(","); file.addAttribute(splits[0], ids[numAllele]); <START> break; <END> case "AC": String[] counts = splits[1].split(","); file.addAttribute(splits[0], counts[numAllele]); break; case "AF": String[] frequencies = splits[1].split(","); file.addAttribute(splits[0], frequencies[numAllele]); break; case "AN": file.addAttribute(splits[0], splits[1]); break; case "NS": file.addAttribute(splits[0], String.valueOf(file.getSamplesData().size())); break; case "DP": int dp = 0; for (Map<String, String> sampleData : file.getSamplesData()) { String sampleDp = sampleData.get("DP"); if (StringUtils.isNumeric(sampleDp)) { dp += Integer.parseInt(sampleDp); } } file.addAttribute(splits[0], String.valueOf(dp)); break; case "MQ": case "MQ0": int mq = 0; int mq0 = 0; for (Map<String, String> sampleData : file.getSamplesData()) { String sampleGq = sampleData.get("GQ"); if (StringUtils.isNumeric(sampleGq)) { int gq = Integer.parseInt(sampleGq); mq += gq * gq; if (gq == 0) { mq0++; } } } file.addAttribute("MQ", String.valueOf(mq)); file.addAttribute("MQ0", String.valueOf(mq0)); break; default: file.addAttribute(splits[0], splits[1]); break; } } else { variant.getSourceEntry(fileId, studyId).addAttribute(splits[0], ""); } } }</code><technical_language>remove this case: is a standard tag, reason added is accessioning design supposed add field a VCF file</technical_language>

Target:
private void parseInfo(Variant variant, String fileId, String studyId, String info, int numAllele) { VariantSourceEntry file = variant.getSourceEntry(fileId, studyId); for (String var : info.split(";")) { String[] splits = var.split("="); if (splits.length == 2) { switch (splits[0]) { case ALLELE_COUNT: String[] counts = splits[1].split(","); file.addAttribute(splits[0], counts[numAllele]); break; case ALLELE_FREQUENCY: String[] frequencies = splits[1].split(","); file.addAttribute(splits[0], frequencies[numAllele]); break; case ALLELE_NUMBER: file.addAttribute(splits[0], splits[1]); break; case "NS": file.addAttribute(splits[0], String.valueOf(file.getSamplesData().size())); break; case "DP": int dp = 0; for (Map<String, String> sampleData : file.getSamplesData()) { String sampleDp = sampleData.get("DP"); if (StringUtils.isNumeric(sampleDp)) { dp += Integer.parseInt(sampleDp); } } file.addAttribute(splits[0], String.valueOf(dp)); break; case "MQ": case "MQ0": int mq = 0; int mq0 = 0; for (Map<String, String> sampleData : file.getSamplesData()) { String sampleGq = sampleData.get("GQ"); if (StringUtils.isNumeric(sampleGq)) { int gq = Integer.parseInt(sampleGq); mq += gq * gq; if (gq == 0) { mq0++; } } } file.addAttribute("MQ", String.valueOf(mq)); file.addAttribute("MQ0", String.valueOf(mq0)); break; default: file.addAttribute(splits[0], splits[1]); break; } } else { variant.getSourceEntry(fileId, studyId).addAttribute(splits[0], ""); } } }
Source:
<code>public synchronized ListenableFuture<?> setBytes(long bytes) { checkState(!closed, "SimpleLocalMemoryContext is already closed"); <START> <END> if (bytes == usedBytes) { return NOT_BLOCKED; } ListenableFuture<?> future = parentMemoryContext.updateBytes(bytes - usedBytes); usedBytes = bytes; return future; }</code><technical_language>bytes negative</technical_language>

Target:
public synchronized ListenableFuture<?> setBytes(long bytes) { checkState(!closed, "SimpleLocalMemoryContext is already closed"); checkArgument(bytes >= 0, "bytes cannot be negative"); if (bytes == usedBytes) { return NOT_BLOCKED; } ListenableFuture<?> future = parentMemoryContext.updateBytes(bytes - usedBytes); usedBytes = bytes; return future; }
Source:
<code>public void testWaitUntilLeaseTableExistsPayPerRequest() throws LeasingException { KinesisClientLeaseManager manager = new KinesisClientLeaseManager("nagl_ShardProgress_PayPerRequest", ddbClient, true, <START> KinesisClientLibConfiguration.DEFAULT_DDB_BILLING_MODE) { <END> @Override long sleep(long timeToSleepMillis) { Assert.fail("Should not sleep"); return 0L; } }; Assert.assertTrue(manager.waitUntilLeaseTableExists(1, 1)); }</code><technical_language>Default is provisioned - a provisioned table testing PayPerRequest</technical_language>

Target:
public void testWaitUntilLeaseTableExistsPayPerRequest() throws LeasingException { KinesisClientLeaseManager manager = new KinesisClientLeaseManager("nagl_ShardProgress_PayPerRequest", ddbClient, true, BillingMode.PAY_PER_REQUEST) { @Override long sleep(long timeToSleepMillis) { Assert.fail("Should not sleep"); return 0L; } }; Assert.assertTrue(manager.waitUntilLeaseTableExists(1, 1)); }
Source:
<code>public Set<RuntimeIdentity> getIdentities() throws InfrastructureException { try { return managerProvider .get() <START> .createQuery("SELECT r FROM KubernetesRuntime r", KubernetesRuntimeState.class) <END> .getResultList() .stream() .map(KubernetesRuntimeState::getRuntimeId) .collect(Collectors.toSet()); } catch (RuntimeException x) { throw new InfrastructureException(x.getMessage(), x); } }</code><technical_language>named query here</technical_language>

Target:
public Set<RuntimeIdentity> getIdentities() throws InfrastructureException { try { return managerProvider .get() .createNamedQuery("KubernetesRuntime.getAll", KubernetesRuntimeState.class) .getResultList() .stream() .map(KubernetesRuntimeState::getRuntimeId) .collect(Collectors.toSet()); } catch (RuntimeException x) { throw new InfrastructureException(x.getMessage(), x); } }
Source:
<code>public Opt<Identity> enter(final Request req) throws IOException { final Iterator<String> cookies = new RqCookies.Base(req) .cookie(this.cookie).iterator(); <START> Opt<Identity> retValue = null; <END> if (cookies.hasNext()) { retValue = new Opt.Single<Identity>( this.codec.decode(cookies.next().getBytes()) ); } if (retValue == null) { retValue = new Opt.Empty<Identity>(); } return retValue; }</code><technical_language>@antonini please name user, initialize Opt.Empty</technical_language>

Target:
public Opt<Identity> enter(final Request req) throws IOException { final Iterator<String> cookies = new RqCookies.Base(req) .cookie(this.cookie).iterator(); Opt<Identity> user = new Opt.Empty<Identity>(); if (cookies.hasNext()) { user = new Opt.Single<Identity>( this.codec.decode(cookies.next().getBytes()) ); } return user; }
Source:
<code>public void add(final RevCommit c) { sinceLastIndex++; if (++inQueue > REBUILD_INDEX_COUNT && sinceLastIndex > REBUILD_INDEX_COUNT) { sinceLastIndex = 0; buildIndex(); } Entry q = head; final long when = c.commitTime; if (index != null && index[first] != null && index[first].commit.commitTime > when) { int low = first, high = last; <START> while (low <= high) { <END> int mid = (low + high) / 2; if (index[mid].commit.commitTime < when) high = mid - 1; else if (index[mid].commit.commitTime > when) low = mid + 1; else break; } q = index[Math.min(low, high)]; } final Entry n = newEntry(c); if (q == null || when > q.commit.commitTime) { n.next = q; head = n; } else { Entry p = q.next; while (p != null && p.commit.commitTime > when) { q = p; p = q.next; } n.next = q.next; q.next = n; } }</code><technical_language>< high? equal is point in running a binary search iteration. is element examine index reassignment of q loop breaks pick single element</technical_language>

Target:
public void add(final RevCommit c) { sinceLastIndex++; if (++inQueue > REBUILD_INDEX_COUNT && sinceLastIndex > REBUILD_INDEX_COUNT) { sinceLastIndex = 0; buildIndex(); } Entry q = head; final long when = c.commitTime; if (index != null && index[first] != null && index[first].commit.commitTime > when) { int low = first, high = last; while (low <= high) { int mid = (low + high) >>> 1; int t = index[mid].commit.commitTime; if (t < when) high = mid - 1; else if (t > when) { low = mid + 1; } else { low = mid - 1; break; } } low = Math.min(low, high); while (low >= first && when == index[low].commit.commitTime) --low; q = index[low]; } final Entry n = newEntry(c); if (q == null || (q == head && when > q.commit.commitTime)) { n.next = q; head = n; } else { Entry p = q.next; while (p != null && p.commit.commitTime > when) { q = p; p = q.next; } n.next = q.next; q.next = n; } }
Source:
<code>private String extractChecksText(String testsURL) { StringBuilder builder = new StringBuilder(); if (summary.getFailCount() > 0) { List<CaseResult> failedTests = action.getResult().getFailedTests(); for (CaseResult failedTest: failedTests) { String testReport = mapFailedTestToTestReport(failedTest); <START> int messageSize = testReport.getBytes(StandardCharsets.UTF_8).length + builder.toString().getBytes(StandardCharsets.UTF_8).length; <END> if (messageSize > (MAX_MSG_SIZE_TO_CHECKS_API - 1024)){ builder.append("\n") .append("more test results are not shown here, view them on [Jenkins](") .append(testsURL).append(")"); break; } builder.append(testReport); } } return builder.toString(); }</code><technical_language>is reason calling get bytes length()</technical_language>

Target:
private String extractChecksText(String testsURL) { StringBuilder builder = new StringBuilder(); if (summary.getFailCount() > 0) { List<CaseResult> failedTests = action.getResult().getFailedTests(); for (CaseResult failedTest: failedTests) { String testReport = mapFailedTestToTestReport(failedTest); int messageSize = testReport.length() + builder.toString().length(); if (messageSize > (MAX_MSG_SIZE_TO_CHECKS_API - 1024)){ builder.append("\n") .append("more test results are not shown here, view them on [Jenkins](") .append(testsURL).append(")"); break; } builder.append(testReport); } } return builder.toString(); }
Source:
<code>private void throwProtocolAdapterException(final Map<String, AccessResultCode> failureAccessResultMap) throws ProtocolAdapterException { String keys = ""; String values = ""; for (final String key : failureAccessResultMap.keySet()) { <START> keys += key + " "; <END> } for (final Object value : failureAccessResultMap.values()) { values += value + " "; } LOGGER.error("ActivityCalendar: Requests for failed with result code: {}", keys, values); throw new ProtocolAdapterException("AccessResultCode for <" + keys + "> + set Activity Calendar: <" + values + ">"); }</code><technical_language>loop entrySet() concatenate keys values strings in go</technical_language>

Target:
private void throwProtocolAdapterException(final Map<String, AccessResultCode> failureAccessResultMap) throws ProtocolAdapterException { String keyValues = ""; for (final Map.Entry<String, AccessResultCode> entry : failureAccessResultMap.entrySet()) { final String keyValueString = entry.getKey() + ": " + entry.getValue(); if ("".equals(keyValues)) { keyValues = keyValueString; } else { keyValues += ", " + keyValueString; } } LOGGER.error("ActivityCalendar: Requests failed for: {}", keyValues); throw new ProtocolAdapterException("ActivityCalendar: Requests failed for: " + keyValues); }
Source:
<code>public Iterable<E> read(Configuration configuration) throws IOException { DatasetReader<E> reader = view.newReader(); <START> return reader; END> }</code><technical_language>Inline</technical_language>

Target:
public Iterable<E> read(Configuration configuration) throws IOException { return view.newReader(); }