auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testCompareTo() { Guid guid1 = new Guid("5b411bc1-c220-4421-9abd-cfa484aecb6e"); Guid guid2 = new Guid("5b411bc1-c220-4421-9abd-cfa484aecb6f"); assertTrue(guid1.compareTo(guid2) < 0); <START> Assert.assertEquals(0, guid1.compareTo(guid1)); <END> assertTrue(guid2.compareTo(guid1) > 0); }</code><technical_language>please omit class notation</technical_language>

Target:
public void testCompareTo() { Guid guid1 = new Guid("5b411bc1-c220-4421-9abd-cfa484aecb6e"); Guid guid2 = new Guid("5b411bc1-c220-4421-9abd-cfa484aecb6f"); assertTrue(guid1.compareTo(guid2) < 0); assertEquals(0, guid1.compareTo(guid1)); assertTrue(guid2.compareTo(guid1) > 0); }
Source:
<code>public void testOnlyGraphClient() { this.contextRunner .withUserConfiguration(AADResourceServerOboConfiguration.class) <START> .withPropertyValues(AAD_PROPERTY_PREFIX + "authorization.graph.scopes=User.read") <END> .run(context -> { final InMemoryClientRegistrationRepository oboRepo = context.getBean( InMemoryClientRegistrationRepository.class); final OAuth2AuthorizedClientRepository aadOboRepo = context.getBean( AADOAuth2OboAuthorizedClientRepository.class); ClientRegistration graph = oboRepo.findByRegistrationId("graph"); Set<String> graphScopes = graph.getScopes(); assertThat(aadOboRepo).isNotNull(); assertThat(oboRepo).isExactlyInstanceOf(InMemoryClientRegistrationRepository.class); assertThat(graph).isNotNull(); assertThat(graphScopes).hasSize(1); }); }</code><technical_language>is more scope test</technical_language>

Target:
public void testOnlyGraphClient() { this.contextRunner .withUserConfiguration(AADResourceServerOboConfiguration.class) .withPropertyValues("azure.activedirectory.authorization.graph.scopes=<LINK_1>" + ".Read") .run(context -> { final InMemoryClientRegistrationRepository oboRepo = context.getBean( InMemoryClientRegistrationRepository.class); final OAuth2AuthorizedClientRepository aadOboRepo = context.getBean( AADOAuth2OboAuthorizedClientRepository.class); ClientRegistration graph = oboRepo.findByRegistrationId("graph"); Set<String> graphScopes = graph.getScopes(); assertThat(aadOboRepo).isNotNull(); assertThat(oboRepo).isExactlyInstanceOf(InMemoryClientRegistrationRepository.class); assertThat(graph).isNotNull(); assertThat(graphScopes).containsOnly("<LINK_0>"); }); }
Source:
<code>public boolean equals(Object other, boolean deepCompare) { if (other == this) { return true; } if (other == null || other.getClass() != getClass()) { return false; } SystemTreeItemModel otherModel = (SystemTreeItemModel) other; if (getChildren().size() > 0 && deepCompare) { if (otherModel.getChildren().size() == getChildren().size()) { boolean result = true; for (int i = 0; i < getChildren().size(); i++) { result = getChildren().get(i).equals(otherModel.getChildren().get(i), deepCompare); if (!result) { break; } } return result; } else { return false; } } else { if (otherModel.getEntity() != null && otherModel.getEntity().equals(getEntity()) <START> && otherModel.getTitle().equals(getTitle())) { <END> return true; } return false; } }</code><technical_language>this comparison done of deepCompare value? (Current implementation skips otherModel.entity + otherModel.title comparison if deepCompare is true.)</technical_language>

Target:
public boolean equals(Object other, boolean deepCompare) { if (other == this) { return true; } if (other == null || other.getClass() != getClass()) { return false; } boolean result = true; SystemTreeItemModel otherModel = (SystemTreeItemModel) other; if (getChildren().size() > 0 && deepCompare) { if (otherModel.getChildren().size() == getChildren().size()) { for (int i = 0; i < getChildren().size(); i++) { result = getChildren().get(i).equals(otherModel.getChildren().get(i), deepCompare); if (!result) { break; } } } else { result = false; } } if (result) { if ((otherModel.getEntity() == null && getEntity() == null) || (otherModel.getEntity() != null && otherModel.getEntity().equals(getEntity()) && otherModel.getTitle().equals(getTitle()))) { result = true; } else { result = false; } } return result; }
Source:
<code>private String buildJson() { try { return JsonWriter.string() .object() .value("user_action", getUserActionString(errorInfo.userAction)) .value("request", errorInfo.request) .value("content_language", getContentLanguageString()) <START> .value("content_country", getContentLanguageString()) <END> .value("service", errorInfo.serviceName) .value("package", getPackageName()) .value("version", BuildConfig.VERSION_NAME) .value("os", getOsString()) .value("time", currentTimeStamp) .array("exceptions", Arrays.asList(errorList)) .value("user_comment", userCommentBox.getText().toString()) .end() .done(); } catch (Throwable e) { Log.e(TAG, "Error while erroring: Could not build json"); e.printStackTrace(); } return ""; }</code><technical_language>I a mistake suggestion .value("content_country", getContentCountryString())</technical_language>

Target:
private String buildJson() { try { return JsonWriter.string() .object() .value("user_action", getUserActionString(errorInfo.userAction)) .value("request", errorInfo.request) .value("content_language", getContentLanguageString()) .value("content_country", getContentCountryString()) .value("app_language", getAppLanguage()) .value("service", errorInfo.serviceName) .value("package", getPackageName()) .value("version", BuildConfig.VERSION_NAME) .value("os", getOsString()) .value("time", currentTimeStamp) .array("exceptions", Arrays.asList(errorList)) .value("user_comment", userCommentBox.getText().toString()) .end() .done(); } catch (Throwable e) { Log.e(TAG, "Error while erroring: Could not build json"); e.printStackTrace(); } return ""; }
Source:
<code>public void testFcrepoService() throws Exception { final String webPort = System.getProperty("fcrepo.dynamic.test.port", "8080"); final String baseUrl = "http://localhost:" + webPort + "/fcrepo/rest"; final String url1 = post(baseUrl).replace(baseUrl, ""); final String url2 = post(baseUrl).replace(baseUrl, ""); final Map<String, Object> headers = new HashMap<>(); headers.put(FCREPO_BASE_URL, baseUrl); headers.put(FCREPO_IDENTIFIER, url1); template.sendBodyAndHeaders(null, headers); <START> headers.put(FCREPO_IDENTIFIER, url1); <END> template.sendBodyAndHeaders(null, headers); resultEndpoint.expectedMessageCount(2); assertMockEndpointsSatisfied(); }</code><technical_language>test pass way, intending this request url2 instead of url1</technical_language>

Target:
public void testFcrepoService() throws Exception { final String webPort = System.getProperty("fcrepo.dynamic.test.port", "8080"); final String baseUrl = "http://localhost:" + webPort + "/fcrepo/rest"; final String url1 = post(baseUrl).replace(baseUrl, ""); final String url2 = post(baseUrl).replace(baseUrl, ""); final Map<String, Object> headers = new HashMap<>(); headers.put(FCREPO_BASE_URL, baseUrl); headers.put(FCREPO_IDENTIFIER, url1); template.sendBodyAndHeaders(null, headers); headers.put(FCREPO_IDENTIFIER, url2); template.sendBodyAndHeaders(null, headers); resultEndpoint.expectedMessageCount(2); assertMockEndpointsSatisfied(); }
Source:
<code>public static boolean isLowerCamelCase(String word) { <START> return !word.isEmpty() && word.matches(ALPHANUMERIC_REGEX) && Character.isLowerCase(word.charAt(0)); <END> }</code><technical_language>Performing a regex match is more computationally expensive isLowerCase() call short-circuited possible. switch order of word.matches() isLowerCase() advantage of this</technical_language>

Target:
public static boolean isLowerCamelCase(String word) { return !word.isEmpty() && Character.isLowerCase(word.charAt(0)) && word.matches(ALPHANUMERIC_REGEX); }
Source:
<code>public ValueHolder<V> replace(final K key, final V value) throws StoreAccessException { replaceObserver.begin(); ReplaceOperation<K, V> operation = new ReplaceOperation<K, V>(key, value); ByteBuffer payload = codec.encode(operation); Chain chain = storeProxy.getAndAppend(key.hashCode(), payload); ResolvedChain<K, V> resolvedChain = resolver.resolve(chain, key); Result<V> result = resolvedChain.getResolvedResult(key); if(result == null) { <START> replaceObserver.end(StoreOperationOutcomes.ReplaceOutcome.REPLACED); <END> return null; } else { replaceObserver.end(StoreOperationOutcomes.ReplaceOutcome.MISS); return new ClusteredValueHolder<V>(result.getValue()); } }</code><technical_language>Inverted stat outcome</technical_language>

Target:
public ValueHolder<V> replace(final K key, final V value) throws StoreAccessException { replaceObserver.begin(); ReplaceOperation<K, V> operation = new ReplaceOperation<K, V>(key, value); ByteBuffer payload = codec.encode(operation); Chain chain = storeProxy.getAndAppend(key.hashCode(), payload); ResolvedChain<K, V> resolvedChain = resolver.resolve(chain, key); Result<V> result = resolvedChain.getResolvedResult(key); if(result == null) { replaceObserver.end(StoreOperationOutcomes.ReplaceOutcome.MISS); return null; } else { replaceObserver.end(StoreOperationOutcomes.ReplaceOutcome.REPLACED); return new ClusteredValueHolder<V>(result.getValue()); } }
Source:
<code>private BlackboardAttribute.Type getKeyAttribute() throws TskCoreException { if (shellBagKeyAttributeType == null) { try { shellBagKeyAttributeType = tskCase.getBlackboard().getOrAddAttributeType(SHELLBAG_ATTRIBUTE_KEY, BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING, Bundle.Shellbag_Key_Attribute_Display_Name()); } catch (BlackboardException ex) { <START> throw new TskCoreException(String.format("Failed to get key attriubte %s", SHELLBAG_ATTRIBUTE_KEY), ex); <END> } } return shellBagKeyAttributeType; }</code><technical_language>Typo attribute</technical_language>

Target:
private BlackboardAttribute.Type getKeyAttribute() throws TskCoreException { if (shellBagKeyAttributeType == null) { try { shellBagKeyAttributeType = tskCase.getBlackboard().getOrAddAttributeType(SHELLBAG_ATTRIBUTE_KEY, BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING, Bundle.Shellbag_Key_Attribute_Display_Name()); } catch (BlackboardException ex) { throw new TskCoreException(String.format("Failed to get key attribute %s", SHELLBAG_ATTRIBUTE_KEY), ex); } } return shellBagKeyAttributeType; }
Source:
<code>public boolean equals(final Object obj) { if (!(obj instanceof Ds3Object)) { return false; } final Ds3Object ds3Obj = (Ds3Object) obj; <START> return ds3Obj.getName().equals(this.getName()) && <END> ds3Obj.getSize() == this.getSize() && Objects.equals(ds3Obj.versionId, this.getVersionId()); }</code><technical_language>If in updating versionIds checked for equality, do for name well</technical_language>

Target:
public boolean equals(final Object obj) { if (!(obj instanceof Ds3Object)) { return false; } final Ds3Object ds3Obj = (Ds3Object) obj; return Objects.equals(ds3Obj.getName(), this.getName()) && ds3Obj.getSize() == this.getSize() && Objects.equals(ds3Obj.versionId, this.getVersionId()); }
Source:
<code>private void seekOffsetByStartTimeStamp(TopicPartition tp) { long startTimeStampOffset; try { startTimeStampOffset = <START> consumer.offsetsForTimes(Collections.singletonMap(tp, startTimeStamp)).get(tp).offset(); <END> } catch (IllegalArgumentException e) { LOG.error("Illegal timestamp provided for tp ", startTimeStamp, tp.toString()); throw new ReportedFailedException(); } catch (UnsupportedVersionException e) { LOG.error("Kafka Server do not support offsetsForTimes(), probably < 0.10.1", e); throw new ReportedFailedException(); } LOG.debug("First poll for topic partition [{}], seeking to partition from startTimeStamp [{}]", tp, startTimeStamp); consumer.seek(tp, startTimeStampOffset); }</code><technical_language>Nit: I this broken multiple statements breaks if get NPE</technical_language>

Target:
private void seekOffsetByStartTimeStamp(TopicPartition tp) { Map<TopicPartition, OffsetAndTimestamp> offsetsForTimes = consumer.offsetsForTimes(Collections.singletonMap(tp, startTimeStamp)); OffsetAndTimestamp startOffsetAndTimeStamp = offsetsForTimes.get(tp); long startTimeStampOffset = startOffsetAndTimeStamp.offset(); LOG.debug("First poll for topic partition [{}], seeking to partition from startTimeStamp [{}]", tp, startTimeStamp); consumer.seek(tp, startTimeStampOffset); }
Source:
<code>public int hashCode() { int result = 0; for (final Field f : getClass().getFields()) { try { Object value = f.get(this); <START> value = new FormatUtil().format(value); END> final int fieldHash = value != null ? value.hashCode() : 0; result = 31 * result + fieldHash; } catch (IllegalAccessException e) { throw new SAMException("Could not read field " + f.getName() + " from a " + getClass().getSimpleName()); } } return result; }</code><technical_language>do this? totally unnecessary hashCode() method more inefficient</technical_language>

Target:
public int hashCode() { int result = 0; FormatUtil formatter = new FormatUtil(); for (final Field f : getClass().getFields()) { try { Object value = f.get(this); value = formatter.format(value); final int fieldHash = value != null ? value.hashCode() : 0; result = 31 * result + fieldHash; } catch (IllegalAccessException e) { throw new SAMException("Could not read field " + f.getName() + " from a " + getClass().getSimpleName()); } } return result; }
Source:
<code>private Optional<Image> findImageForAppVersion(String region, String platform, String imageId, String imageOs, ImageCatalog catalog) { List<FreeIpaVersions> versions = filterFreeIpaVersionsByAppVersion(catalog.getVersions().getFreeIpaVersions()); List<Image> compatibleImages = findImage(imageId, imageOs, catalog.getImages().getFreeipaImages(), region, platform); LOGGER.debug("[{}] compatible images found, by the following parameters: imageId: {}, imageOs: {}, region: {}, platform: {}", compatibleImages.size(), imageId, imageOs, region, platform); LOGGER.debug("Attempt to find a default image to use."); return filterImages(versions, compatibleImages, FreeIpaVersions::getDefaults).or( <START> () -> { LOGGER.debug("Default image not found. Attempt to find an image, compatible with the application version."); return filterImages(versions, compatibleImages, FreeIpaVersions::getImageIds); } ).or( () -> { LOGGER.debug("Not found any image compatible with the application version. Falling back to the most recent image."); return compatibleImages.stream().max(Comparator.comparing(Image::getDate)); } <END> ); }</code><technical_language>moved a named method I check log lines whats happening :)</technical_language>

Target:
private Optional<Image> findImageForAppVersion(String region, String platform, String imageId, String imageOs, ImageCatalog catalog) { List<FreeIpaVersions> versions = filterFreeIpaVersionsByAppVersion(catalog.getVersions().getFreeIpaVersions()); List<Image> compatibleImages = findImage(imageId, imageOs, catalog.getImages().getFreeipaImages(), region, platform); LOGGER.debug("[{}] compatible images found, by the following parameters: imageId: {}, imageOs: {}, region: {}, platform: {}", compatibleImages.size(), imageId, imageOs, region, platform); return findImageInDefaults(versions, compatibleImages) .or(() -> findImageByApplicationVersion(versions, compatibleImages)) .or(() -> findMostRecentImage(compatibleImages)); }
Source:
<code>private String getSortOrder(Sort sort) { return sort.stream() .map(this::getPropertySortOrder) <START> .collect(Collectors.joining(", ")); <END> }</code><technical_language>nice change for that</technical_language>

Target:
private String getSortOrder(Sort sort) { return sort.stream() .map(Query::getPropertySortOrder) .collect(Collectors.joining(", ")); }
Source:
<code>public FileInformationDTO uploadContestArchive(FileUploadDTO fileUploadDTO) throws AppException { List<MultipartFile> files = fileUploadDTO.getFiles(); if (files == null || files.size() > 1) { throw new AppException("Fetch uploaded file error."); } MultipartFile file = files.get(0); File targetFile = new File(getContestArchiveZipFileName()); if (targetFile.exists() && !targetFile.delete()) <START> throw new AppException("Internal exception: target file exists and can not be deleted."); <END> try { file.transferTo(targetFile); } catch (IOException e) { throw new AppException("Error while save files"); } return FileInformationDTO.builder() .setFileName(file.getOriginalFilename()) .build(); }</code><technical_language>Wrap {}</technical_language>

Target:
public FileInformationDTO uploadContestArchive(FileUploadDTO fileUploadDTO) throws AppException { List<MultipartFile> files = fileUploadDTO.getFiles(); if (files == null || files.size() > 1) { throw new AppException("Fetch uploaded file error."); } MultipartFile file = files.get(0); File targetFile = new File(getContestArchiveZipFileName()); if (targetFile.exists() && !targetFile.delete()) { throw new AppException("Internal exception: target file exists and can not be deleted."); } try { file.transferTo(targetFile); } catch (IOException e) { throw new AppException("Error while save files"); } return FileInformationDTO.builder() .setFileName(file.getOriginalFilename()) .build(); }
Source:
<code>private CompletableFuture<DeployedCacheStoreMetadata> getPromise(String key) { CompletableFuture<DeployedCacheStoreMetadata> newPromise = new CompletableFuture<>(); CompletableFuture<DeployedCacheStoreMetadata> putResult = deployedCacheStores.putIfAbsent(key, newPromise); <START> if(putResult != null) { <END> return putResult; } return newPromise; }</code><technical_language>Spacing is here, do code templates installed</technical_language>

Target:
private CompletableFuture<DeployedCacheStoreMetadata> getPromise(String key) { return deployedCacheStores.computeIfAbsent(key, mappedKey -> new CompletableFuture<>()); }
Source:
<code>private Rectangle2D getNormalEdgeLabelBounds() { Line line = getConnectionPoints(); Point2D control = getControlPoint(); double x = control.getX() / 2 + line.getX1() / 4 + line.getX2() / 4; double y = control.getY() / 2 + line.getY1() / 4 + line.getY2() / 4; LABEL.setText(toHtml(edge().getMiddleLabel())); adjustLabelFont(); Dimension dimension = LABEL.getPreferredSize(); LABEL.setBounds(0, 0, dimension.width, dimension.height); int gap = 3; if( line.getY1() >= line.getY2() - VERTICAL_TOLERANCE && line.getY1() <= line.getY2() + VERTICAL_TOLERANCE ) { x -= dimension.getWidth() / 2; } else if( line.getY1() <= line.getY2() ) { x += gap; } else { x -= dimension.getWidth() + gap; } if( line.getX1() <= line.getX2() ) { y -= dimension.getHeight() + gap; } else { y += gap; } if( edge().getGraph() != null && getPosition() > 1 ) { <START> double delta = Math.abs(Math.atan2((line.getX2()-line.getX1()),(line.getY2()-line.getY1()))); <END> delta = dimension.getHeight() - delta*RADIANS_TO_PIXELS; if( line.getX1() <= line.getX2() ) { y -= delta; } else { y += delta; } } return new Rectangle2D.Double(x, y, dimension.width, dimension.height); }</code><technical_language>Unnecessary parentheses in method arguments</technical_language>

Target:
private Rectangle2D getNormalEdgeLabelBounds() { Line line = getConnectionPoints(); Point2D control = getControlPoint(); double x = control.getX() / 2 + line.getX1() / 4 + line.getX2() / 4; double y = control.getY() / 2 + line.getY1() / 4 + line.getY2() / 4; LABEL.setText(toHtml(edge().getMiddleLabel())); adjustLabelFont(); Dimension dimension = LABEL.getPreferredSize(); LABEL.setBounds(0, 0, dimension.width, dimension.height); int gap = 3; if( line.getY1() >= line.getY2() - VERTICAL_TOLERANCE && line.getY1() <= line.getY2() + VERTICAL_TOLERANCE ) { x -= dimension.getWidth() / 2; } else if( line.getY1() <= line.getY2() ) { x += gap; } else { x -= dimension.getWidth() + gap; } if( line.getX1() <= line.getX2() ) { y -= dimension.getHeight() + gap; } else { y += gap; } if( edge().getGraph() != null && getPosition() > 1 ) { double delta = Math.abs(Math.atan2(line.getX2()-line.getX1(),line.getY2()-line.getY1())); delta = dimension.getHeight() - delta*RADIANS_TO_PIXELS; if( line.getX1() <= line.getX2() ) { y -= delta; } else { y += delta; } } return new Rectangle2D.Double(x, y, dimension.width, dimension.height); }
Source:
<code><START> public List<CommitInfo> parseCommitInfos(JsonElement result) throws RestApiException { <END> if (!result.isJsonArray()) { return Collections.singletonList(gson.fromJson(result, CommitInfo.class)); } return gson.fromJson(result, TYPE); }</code><technical_language>throws RestApiException necessary</technical_language>

Target:
public List<CommitInfo> parseCommitInfos(JsonElement result) { if (!result.isJsonArray()) { return Collections.singletonList(gson.fromJson(result, CommitInfo.class)); } return gson.fromJson(result, TYPE); }
Source:
<code>public Event getEvent(@PathParam("uuid") String uuid) { throw new BadRequestException(i18n.tr("This API endpoint is deprecated, and will be" + <START> " removed on the next major release.", uuid)); <END> }</code><technical_language>recap discussion IRC: NotFoundException new message covered here</technical_language>

Target:
public Event getEvent(@PathParam("uuid") String uuid) { throw new NotFoundException(i18n.tr("This API endpoint is deprecated, and will be" + " removed on the next major release.", uuid)); }
Source:
<code>public Object[] getElements(Object inputElement) { <START> if (leftPathsWithChildren.isEmpty() && leftOnlyPaths.isEmpty()) <END> return new String[] { UIText.CompareTreeView_NoDifferencesFoundMessage }; if (input instanceof IResource[]) { IResource[] resources = (IResource[]) input; PathNode[] nodes = new PathNode[resources.length]; for (int i = 0; i < resources.length; i++) { IResource resource = resources[i]; if (resource instanceof IFile) { IPath path = new Path(repositoryMapping .getRepoRelativePath(resource)); Type type; if (leftOnlyPaths.contains(path)) type = Type.FILE_ADDED; else if (equalContentPaths.contains(path)) type = Type.FILE_BOTH_SIDES_SAME; else type = Type.FILE_BOTH_SIDES_DIFFER; nodes[i] = new PathNode(path, type); } else nodes[i] = new PathNode(new Path(repositoryMapping .getRepoRelativePath(resource)), Type.FOLDER); } return nodes; } return new PathNode[] { new PathNode(new Path(""), Type.FOLDER) }; }</code><technical_language>names left right</technical_language>

Target:
public Object[] getElements(Object inputElement) { if (baseVersionPathsWithChildren.isEmpty() && addedPaths.isEmpty()) return new String[] { UIText.CompareTreeView_NoDifferencesFoundMessage }; if (input instanceof IResource[]) { IResource[] resources = (IResource[]) input; PathNode[] nodes = new PathNode[resources.length]; for (int i = 0; i < resources.length; i++) { IResource resource = resources[i]; if (resource instanceof IFile) { IPath path = new Path(repositoryMapping .getRepoRelativePath(resource)); Type type; if (addedPaths.contains(path)) type = Type.FILE_ADDED; else if (equalContentPaths.contains(path)) type = Type.FILE_BOTH_SIDES_SAME; else type = Type.FILE_BOTH_SIDES_DIFFER; nodes[i] = new PathNode(path, type); } else nodes[i] = new PathNode(new Path(repositoryMapping .getRepoRelativePath(resource)), Type.FOLDER); } return nodes; } return new PathNode[] { new PathNode(new Path(""), Type.FOLDER) }; }
Source:
<code>public static void main(String[] args) throws CmdLineException, NumberFormatException, HyracksException, Exception { String[] myArgs = { "-kmerLength", "55", <START> "-localInput", <END> "/home/anbangx/workspace/fullstack_genomix/hyracks/genomix/genomix-pregelix/data/TestSet/PathMerge/8", "-pipelineOrder", "MERGE", "localGraphOutput", "graph" }; if (System.getProperty("app.home") == null) System.setProperty("app.home", new File("target/appassembler").getAbsolutePath()); GenomixJobConf conf = GenomixJobConf.fromArguments(args); GenomixDriver driver = new GenomixDriver(); driver.runGenomix(conf); }</code><technical_language>erroneous commits... blow this section</technical_language>

Target:
public static void main(String[] args) throws NumberFormatException, HyracksException, Exception { String[] myArgs = { "-runLocal", "true", "-kmerLength", "55", "-localInput", "tail600000", "-pipelineOrder", "BUILD_HYRACKS,MERGE", }; if (System.getProperty("app.home") == null) System.setProperty("app.home", new File("target/appassembler").getAbsolutePath()); GenomixJobConf conf; try { conf = GenomixJobConf.fromArguments(args); } catch (CmdLineException ex) { System.err.println("Usage: bin/genomix [options]\n"); ex.getParser().setUsageWidth(80); ex.getParser().printUsage(System.err); System.err.println("\nExample:"); System.err .println("\tbin/genomix -kmerLength 55 -pipelineOrder BUILD_HYRACKS,MERGE,TIP_REMOVE,MERGE,BUBBLE,MERGE -localInput /path/to/readfiledir/\n"); System.err.println(ex.getMessage()); return; } GenomixDriver driver = new GenomixDriver(); driver.runGenomix(conf); }
Source:
<code>public UnixSHACryptPasswordImpl(UnixSHACryptPassword password) { this.salt = password.getSalt(); this.iterationCount = password.getIterationCount(); this.id = password.getId(); <START> this.encoded = password.getEncoded(); <END> this.charset = password.getCharset(); }</code><technical_language>"encoded" field remain null. a "byte[] hash" field instead. Also, charset encoding for hash password types</technical_language>

Target:
public UnixSHACryptPasswordImpl(UnixSHACryptPassword password) { this(password.getSalt(), password.getIterationCount(), password.getAlgorithm(), password.getHash()); }
Source:
<code>private void loginUser(final SocketSession conn, final Request req, final LoginInformation login) { final boolean loginAsDefault = !login.hasIsInstructor(); try { final String userLoggedIn = DatabaseClient.mongoIdentify(login.getUsername(), login.getPassword(), loginAsDefault, login.getIsInstructor()); if (userLoggedIn != null) { final String[] ids = userLoggedIn.split(":"); if (ids.length == 2) { final boolean isInstructor = checkUserInstructor(login.getUsername(), login); send(conn, createLoginResponse(req, login, true, CORRECT_LOGIN_MESSAGE, isInstructor, ids)); } } } catch (LoginException e) { <START> LOG.info("Login failed responding to proxy"); <END> final Message.ProtoException protoEx = ExceptionUtilities.createProtoException(e); conn.send(ExceptionUtilities.createExceptionRequest(req, protoEx)); LOG.error(LoggingConstants.EXCEPTION_MESSAGE, e); send(conn, createLoginResponse(req, login, false, e.getMessage(), false, null)); } }</code><technical_language>Changing "Login server failed respond proxy server." this clearer</technical_language>

Target:
private void loginUser(final SocketSession conn, final Request req, final LoginInformation login) { final boolean loginAsDefault = !login.hasIsInstructor(); try { final String userLoggedIn = DatabaseClient.mongoIdentify(login.getUsername(), login.getPassword(), loginAsDefault, login.getIsInstructor()); if (userLoggedIn != null) { final String[] ids = userLoggedIn.split(":"); if (ids.length == 2) { final boolean isInstructor = checkUserInstructor(login.getUsername(), login); send(conn, createLoginResponse(req, login, true, CORRECT_LOGIN_MESSAGE, isInstructor, ids)); } } } catch (LoginException e) { LOG.warn("Login failed, creating failed response."); final Message.ProtoException protoEx = ExceptionUtilities.createProtoException(e); conn.send(ExceptionUtilities.createExceptionRequest(req, protoEx)); LOG.error(LoggingConstants.EXCEPTION_MESSAGE, e); send(conn, createLoginResponse(req, login, false, e.getMessage(), false, null)); } }
Source:
<code>public ImmutableRatesProviderBuilder overnightIndexCurve(OvernightIndex index, Curve forwardCurve) { <START> ArgChecker.notNull(index, "currency"); <END> ArgChecker.notNull(forwardCurve, "forwardCurve"); this.indexCurves.put(index, forwardCurve); return this; }</code><technical_language>Argument name</technical_language>

Target:
public ImmutableRatesProviderBuilder overnightIndexCurve(OvernightIndex index, Curve forwardCurve) { ArgChecker.notNull(index, "index"); ArgChecker.notNull(forwardCurve, "forwardCurve"); this.indexCurves.put(index, forwardCurve); return this; }
Source:
<code>public void testRemoveSession() { StudyParticipant participant = new StudyParticipant.Builder().withId(USER_ID).build(); UserSession session = new UserSession(participant); session.setSessionToken(DECRYPTED_SESSION_TOKEN); cacheProvider.removeSession(session); cacheProvider.getUserSession(DECRYPTED_SESSION_TOKEN); verify(transaction).del(TOKEN_TO_USER_ID.toString()); <START> verify(transaction).del(USER_ID_TO_SESSION.toString()); <END> verify(transaction).exec(); }</code><technical_language>Test verify delete 4 keys</technical_language>

Target:
public void testRemoveSession() { StudyParticipant participant = new StudyParticipant.Builder().withId(USER_ID).build(); UserSession session = new UserSession(participant); session.setSessionToken(DECRYPTED_SESSION_TOKEN); cacheProvider.removeSession(session); cacheProvider.getUserSession(DECRYPTED_SESSION_TOKEN); verify(transaction).del(TOKEN_TO_USER_ID.toString()); verify(transaction).del(USER_ID_TO_SESSION.toString()); verify(transaction).del(CacheKey.session(DECRYPTED_SESSION_TOKEN).toString()); verify(transaction).del(CacheKey.sessionByUserId(USER_ID).toString()); verify(transaction).exec(); }
Source:
<code>private static boolean googleIsReachable() { String host = "www.google.com"; InetAddress address; try { address = InetAddress.getByName(host); return address.isReachable(1500); } catch (UnknownHostException ex) { <START> return false; <END> } catch (IOException ex) { return false; } }</code><technical_language>log exceptions? provide useful debug info</technical_language>

Target:
private static boolean googleIsReachable() { String host = "www.google.com"; InetAddress address; try { address = InetAddress.getByName(host); return address.isReachable(1500); } catch (UnknownHostException ex) { logger.log(Level.WARNING, "Unable to reach google.com due to unknown host", ex); return false; } catch (IOException ex) { logger.log(Level.WARNING, "Unable to reach google.com due IOException", ex); return false; } }
Source:
<code>public boolean advance() throws IOException { try { currentRecord = bulkResultSet.next(); } catch (IOException e){ close(); throw e; } if (currentRecord == null) { <START> return retrieveNextResultSet(); <END> } dataCount++; return true; }</code><technical_language>this need include</technical_language>

Target:
public boolean advance() throws IOException { try { currentRecord = bulkResultSet.next(); if (currentRecord == null) { return retrieveNextResultSet(); } } catch (IOException e) { close(); throw e; } dataCount++; return true; }
Source:
<code>public CompletableFuture<WorkspaceRuntimeImpl> startAsync(Workspace workspace, String envName, boolean recover) throws ConflictException, ServerException { requireNonNull(workspace, "Non-null workspace required"); requireNonNull(envName, "Non-null environment name required"); EnvironmentImpl environment = copyEnv(workspace, envName); String workspaceId = workspace.getId(); CompletableFuture<WorkspaceRuntimeImpl> cmpFuture; StartTask startTask; try (@SuppressWarnings("unused") Unlocker u = locks.writeLock(workspaceId)) { checkIsNotTerminated("start the workspace"); if (isStartRefused.get()) { throw new ConflictException(format("Start of the workspace '%s' is rejected by the system, " + <START> "no more workspaces are allow to start", <END> workspace.getConfig().getName())); } RuntimeState state = states.get(workspaceId); if (state != null) { throw new ConflictException(format("Could not start workspace '%s' because its status is '%s'", workspace.getConfig().getName(), state.status)); } startTask = new StartTask(workspaceId, envName, environment, recover, cmpFuture = new CompletableFuture<>()); states.put(workspaceId, new RuntimeState(WorkspaceStatus.STARTING, envName, startTask, sharedPool.submit(startTask))); } eventsService.publish(DtoFactory.newDto(WorkspaceStatusEvent.class) .withWorkspaceId(workspaceId) .withStatus(WorkspaceStatus.STARTING) .withEventType(EventType.STARTING) .withPrevStatus(WorkspaceStatus.STOPPED)); startTask.unlockStart(); return cmpFuture; }</code><technical_language>typo allow -> allowed</technical_language>

Target:
public CompletableFuture<WorkspaceRuntimeImpl> startAsync(Workspace workspace, String envName, boolean recover) throws ConflictException, ServerException { requireNonNull(workspace, "Non-null workspace required"); requireNonNull(envName, "Non-null environment name required"); EnvironmentImpl environment = copyEnv(workspace, envName); String workspaceId = workspace.getId(); CompletableFuture<WorkspaceRuntimeImpl> cmpFuture; StartTask startTask; try (@SuppressWarnings("unused") Unlocker u = locks.writeLock(workspaceId)) { checkIsNotTerminated("start the workspace"); if (isStartRefused.get()) { throw new ConflictException(format("Start of the workspace '%s' is rejected by the system, " + "no more workspaces are allowed to start", workspace.getConfig().getName())); } RuntimeState state = states.get(workspaceId); if (state != null) { throw new ConflictException(format("Could not start workspace '%s' because its status is '%s'", workspace.getConfig().getName(), state.status)); } startTask = new StartTask(workspaceId, envName, environment, recover, cmpFuture = new CompletableFuture<>()); states.put(workspaceId, new RuntimeState(WorkspaceStatus.STARTING, envName, startTask, sharedPool.submit(startTask))); } eventsService.publish(DtoFactory.newDto(WorkspaceStatusEvent.class) .withWorkspaceId(workspaceId) .withStatus(WorkspaceStatus.STARTING) .withEventType(EventType.STARTING) .withPrevStatus(WorkspaceStatus.STOPPED)); startTask.unlockStart(); return cmpFuture; }
Source:
<code><START> public Single<String> getSessions() { <END> return readJsonAsset(Urls.SESSIONS) .flatMapCompletable(JsonHandler::handleSessions) .toSingleDefault(ConstantStrings.SESSIONS); }</code><technical_language>mapped return strings. return sessions</technical_language>

Target:
public Completable getSessions() { return readJsonAsset(Urls.SESSIONS) .flatMapCompletable(JsonHandler::handleSessions); }
Source:
<code>public CreateNattableConfigurationWizard(final TableConfiguration configuration, final Resource initialResource) { this.configuration = configuration; this.helper = new TableConfigurationHelper(this.configuration); <START> String pluginId = Activator.PLUGIN_ID; <END> ImageDescriptor desc = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImageDescriptor(pluginId, NattableConfigurationConstants.ICON_WIZBAN_PATH); setDefaultPageImageDescriptor(desc); setWindowTitle(WIZARD_TITLE); setForcePreviousAndNextButtons(true); this.initialResource = initialResource; isProjectCreation = null == this.initialResource; }</code><technical_language>create a variable</technical_language>

Target:
public CreateNattableConfigurationWizard(final TableConfiguration configuration, final Resource initialResource) { this.configuration = configuration; this.helper = new TableConfigurationHelper(this.configuration); final ImageDescriptor desc = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImageDescriptor(Activator.PLUGIN_ID, NattableConfigurationConstants.ICON_WIZBAN_PATH); setDefaultPageImageDescriptor(desc); setWindowTitle(Messages.CreateNattableConfigurationWizard_WizardTitke); setForcePreviousAndNextButtons(true); this.initialResource = initialResource; isProjectCreation = null == this.initialResource; }
Source:
<code>public String toString() { <START> return serialize(this); <END> }</code><technical_language>I recommend put human friendly text</technical_language>

Target:
public String toString() { return "name="+ name + ";javaType=" + javaType.getName() + ";uuid=" + uuid.toString(); }
Source:
<code>public void verifyFromModuleHasQuatation() { <START> List<WebElement> List = driver.findElements(fromCommunityQuatationsBy); <END> for (int i = 0; i < List.size(); i++) { PageObjectLogging.log("verifyFromModuleHasQuatation", "Checking quotation number "+(i+1), true); scrollToElement(List.get(i)); waitForElementByElement(List.get(i)); } PageObjectLogging.log("verifyFromModuleHasQuatation", "Verify that from the community module has a quatation", true); }</code><technical_language>move this UI mapping</technical_language>

Target:
public void verifyFromModuleHasQuatation() { for (WebElement element : fromCommunityQuatations) { scrollToElement(element); waitForElementByElement(element); } PageObjectLogging.log( "verifyFromModuleHasQuatation", "Verify that from the community module has a quatation", true ); }
Source:
<code>public SafeHtml getEntityTooltip(Cluster object) { <START> String warning = null; <END> if (object.isClusterCompatibilityLevelUpgradeNeeded()) { warning = constants.clusterLevelUpgradeNeeded(); } if (isDeprecated(object)) { if (warning != null) { warning += constants.seperatorHTML(); warning += constants.preCPUDepricationWarning(); } else { warning = constants.preCPUDepricationWarning(); } warning += object.getCpuName(); warning += constants.postCPUDepricationWarning(); } if (warning != null) { return SafeHtmlUtils.fromTrustedString(warning); } return null; }</code><technical_language>SafeHtmlBuilder instead</technical_language>

Target:
public SafeHtml getEntityTooltip(Cluster object) { String warning = null; if (object.isClusterCompatibilityLevelUpgradeNeeded()) { warning = constants.clusterLevelUpgradeNeeded(); } if (isDeprecated(object)) { if (warning != null) { warning += constants.seperatorHTML(); warning += constants.preCPUDeprecationWarning(); } else { warning = constants.preCPUDeprecationWarning(); } warning += object.getCpuName(); warning += constants.postCPUDeprecationWarning(); } if (warning != null) { return SafeHtmlUtils.fromTrustedString(warning); } return null; }
Source:
<code>private void startLatestBrokerOffsetsFetcher() { _latestBrokerOffsetsFetcher.submit(() -> { Consumer<?, ?> consumer = createKafkaConsumer(_consumerProps); while (!_shutdown) { Future<?> future = null; try { Instant currentTime = Instant.now(); <START> Set<TopicPartition> partitionsNeedingUpdate = _consumerAssignment.stream() <END> .filter(tp -> Optional.ofNullable(_offsetPositions.get(tp.toString())) .map(PhysicalSourcePosition::getSourceQueriedTime) .map(Instant::ofEpochMilli) .orElse(Instant.EPOCH) .isBefore(currentTime.minus(1, ChronoUnit.MINUTES))) .collect(Collectors.toSet()); future = _latestBrokerOffsetsFetcher.submit(updateLatestBrokerOffsetsByRpc(consumer, partitionsNeedingUpdate, currentTime.toEpochMilli())); future.get(1, TimeUnit.MINUTES); Thread.sleep(Duration.ofMinutes(1).toMillis()); } catch (Exception e) { if (future != null) { future.cancel(true); } } } if (consumer != null) { consumer.close(); } }); }</code><technical_language>need this fetcher resilient temporary glitches right. need exception handling refresh consumers retriable exceptions</technical_language>

Target:
private void startLatestBrokerOffsetsFetcher() { _latestBrokerOffsetsFetcher.submit(() -> { Consumer<?, ?> consumer = createKafkaConsumer(_consumerProps); while (!_shutdown) { Future<?> future = null; Instant currentTime = Instant.now(); Set<TopicPartition> partitionsNeedingUpdate = _consumerAssignment.stream() .filter(tp -> Optional.ofNullable(_offsetPositions.get(tp.toString())) .map(PhysicalSourcePosition::getSourceQueriedTimeMs) .map(Instant::ofEpochMilli) .orElse(Instant.EPOCH) .isBefore(currentTime.minus(1, ChronoUnit.MINUTES))) .collect(Collectors.toSet()); try { future = _latestBrokerOffsetsFetcher.submit(updateLatestBrokerOffsetsByRpc(consumer, partitionsNeedingUpdate, currentTime.toEpochMilli())); future.get(1, TimeUnit.MINUTES); Thread.sleep(Duration.ofMinutes(1).toMillis()); } catch (Exception e) { if (future != null) { future.cancel(true); } _logger.warn("Failed to update broker end offsets via RPC.", e); } } if (consumer != null) { consumer.close(); } }); }
Source:
<code>public List<CourseDetailsBundle> getCourseDetailsListForStudent(String googleId) throws EntityDoesNotExistException { List<CourseAttributes> courseList = getCoursesForStudentAccount(googleId); List<CourseDetailsBundle> courseDetailsList = new ArrayList<CourseDetailsBundle>(); for (CourseAttributes c : courseList) { StudentAttributes s = studentsLogic.getStudentForCourseIdAndGoogleId(c.getId(), googleId); if (s == null) { StringBuilder logMsg = new StringBuilder(); logMsg.append( "Student is null in CoursesLogic.getCourseDetailsListForStudent(String googleId)<br/> Student Google ID: " + googleId + "<br/> Course: " + c.getId() + "<br/> All Courses Retrieved using the Google ID:"); for (CourseAttributes course : courseList) { <START> logMsg.append("<br/>").append(course.getId()); <END> } log.severe(logMsg.toString()); Assumption.assertNotNull("Student should not be null at this point.", s); } List<FeedbackSessionAttributes> feedbackSessionList = feedbackSessionsLogic.getFeedbackSessionsForUserInCourseSkipCheck(c.getId(), s.email); CourseDetailsBundle cdd = new CourseDetailsBundle(c); for (FeedbackSessionAttributes fs : feedbackSessionList) { cdd.feedbackSessions.add(new FeedbackSessionDetailsBundle(fs)); } courseDetailsList.add(cdd); } return courseDetailsList; }</code><technical_language>lines changed, do another fix: <br/> -> <br></technical_language>

Target:
public List<CourseDetailsBundle> getCourseDetailsListForStudent(String googleId) throws EntityDoesNotExistException { List<CourseAttributes> courseList = getCoursesForStudentAccount(googleId); List<CourseDetailsBundle> courseDetailsList = new ArrayList<CourseDetailsBundle>(); for (CourseAttributes c : courseList) { StudentAttributes s = studentsLogic.getStudentForCourseIdAndGoogleId(c.getId(), googleId); if (s == null) { StringBuilder logMsg = new StringBuilder(); logMsg.append( "Student is null in CoursesLogic.getCourseDetailsListForStudent(String googleId)<br> Student Google ID: " + googleId + "<br> Course: " + c.getId() + "<br> All Courses Retrieved using the Google ID:"); for (CourseAttributes course : courseList) { logMsg.append("<br>").append(course.getId()); } log.severe(logMsg.toString()); Assumption.assertNotNull("Student should not be null at this point.", s); } List<FeedbackSessionAttributes> feedbackSessionList = feedbackSessionsLogic.getFeedbackSessionsForUserInCourseSkipCheck(c.getId(), s.email); CourseDetailsBundle cdd = new CourseDetailsBundle(c); for (FeedbackSessionAttributes fs : feedbackSessionList) { cdd.feedbackSessions.add(new FeedbackSessionDetailsBundle(fs)); } courseDetailsList.add(cdd); } return courseDetailsList; }
Source:
<code>Request(HttpMethod method, String url, Map<String, Collection<String>> headers, Body body, RequestTemplate requestTemplate) { this.httpMethod = checkNotNull(method, "httpMethod of %s", method.name()); this.url = checkNotNull(url, "url"); this.headers = checkNotNull(headers, "headers of %s %s", method, url); <START> this.body = (body != null) ? body : Body.EMPTY; <END> this.requestTemplate = requestTemplate; }</code><technical_language>is a problem... <LINK_0> clients out change behavior body is null</technical_language>

Target:
Request(HttpMethod method, String url, Map<String, Collection<String>> headers, Body body, RequestTemplate requestTemplate) { this.httpMethod = checkNotNull(method, "httpMethod of %s", method.name()); this.url = checkNotNull(url, "url"); this.headers = checkNotNull(headers, "headers of %s %s", method, url); this.body = body; this.requestTemplate = requestTemplate; }
Source:
<code><START> public static boolean removeAidlCallback (long id){ <END> return callbacks.remove(id) != null; }</code><technical_language>static</technical_language>

Target:
public boolean removeAidlCallback(long id) { for (Long key : callbacks.keySet()) { if (key == id) { callbacks.remove(id); return true; } } return false; }
Source:
<code><START> Collection<CompletableFuture<Void>> getPendingFutures() { <END> return pendingFutures.values(); }</code><technical_language>Unnecessary, remove</technical_language>

Target:
Collection<CompletableFuture<Void>> getPendingFutures() { return pendingFutures; }
Source:
<code>public CompletableFuture<DispatchStatus> send(S message) { CompletableFuture<DispatchStatus> sendFuture = new CompletableFuture<>(); if (!asyncPolicy.isBlockWhenFull() && dispatchQueue.isFull()) { droppedCounter.inc(); sendFuture.completeExceptionally(new RuntimeException("Dispatch queue full")); return sendFuture; } try { String newId = UUID.randomUUID().toString(); DispatchQueue.EnqueueResult result = dispatchQueue.enqueue(message, newId); <START> LOG.trace("Result of enqueueing was {}", result); <END> if (result == DispatchQueue.EnqueueResult.DEFERRED) { sendFuture.complete(DispatchStatus.QUEUED); } else { futureMap.put(newId, sendFuture); } } catch (WriteFailedException e) { sendFuture.completeExceptionally(e); } return sendFuture; }</code><technical_language>add newId in message put in RATE_LIMITED_LOGGER</technical_language>

Target:
public CompletableFuture<DispatchStatus> send(S message) { CompletableFuture<DispatchStatus> sendFuture = new CompletableFuture<>(); if (!asyncPolicy.isBlockWhenFull() && dispatchQueue.isFull()) { droppedCounter.inc(); sendFuture.completeExceptionally(new RuntimeException("Dispatch queue full")); return sendFuture; } try { String newId = UUID.randomUUID().toString(); DispatchQueue.EnqueueResult result = dispatchQueue.enqueue(message, newId); LOG.trace("Result of enqueueing for Id was {}", newId, result); if (result == DispatchQueue.EnqueueResult.DEFERRED) { sendFuture.complete(DispatchStatus.QUEUED); } else { futureMap.put(newId, sendFuture); } } catch (WriteFailedException e) { sendFuture.completeExceptionally(e); } return sendFuture; }
Source:
<code>public DeleteObjectResult call() throws Exception { DeleteObjectResponse response; try { <START> response = getClient().deleteObject(new DeleteObjectRequest(bucketName, objectName)); <END> } catch (final IOException e) { throw new CommandException("Error: Request failed with the following error: " + e.getMessage(), e); } return new DeleteObjectResult("Success: Deleted object '" + this.objectName + "' from bucket '" + this.bucketName + "'."); }</code><technical_language>is response here</technical_language>

Target:
public DeleteObjectResult call() throws Exception { try { getClient().deleteObject(new DeleteObjectRequest(bucketName, objectName)); } catch (final IOException e) { throw new CommandException("Error: Request failed with the following error: " + e.getMessage(), e); } return new DeleteObjectResult("Success: Deleted object '" + this.objectName + "' from bucket '" + this.bucketName + "'."); }
Source:
<code>final public void run() { Thread.currentThread().setName(this.name); try { this.configure(); } catch (Exception e) { logger.error("Unable to configure {}", name, e); System.exit(1); } try { this.start(); } catch (Exception e) { <START> logger.error("Unable to start ", name, e); <END> System.exit(1); } Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { shutdown(); } }); try { join(); } catch (Exception e) { logger.warn("Interrupted (most likely JVM is shutting down and this is safe to ignore)"); } }</code><technical_language>{} missing</technical_language>

Target:
final public void run() { Thread.currentThread().setName(this.name); try { this.configure(); } catch (Exception e) { logger.error("Unable to configure {}", name, e); System.exit(1); } try { this.start(); } catch (Exception e) { logger.error("Unable to start {}", name, e); System.exit(1); } Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { shutdown(); } }); try { join(); } catch (Exception e) { logger.warn("Interrupted (most likely JVM is shutting down and this is safe to ignore)"); } }
Source:
<code>default Iterator<T> reverseIterator() { return new AbstractIterator<T>() { final ListIterator<T> delegate = IndexedSeq.this.listIterator(IndexedSeq.this.length()); @Override public boolean hasNext() { return delegate.hasPrevious(); } <START> @Override public T getNext() { return delegate.previous(); } <END> }; }</code><technical_language>reading here, a more methods overridden here? nextIndex, hasPrevious, getPrevious, previousIndex</technical_language>

Target:
default Iterator<T> reverseIterator() { return new AbstractIterator<T>() { private int i = IndexedSeq.this.length(); @Override public boolean hasNext() { return i > 0; } @Override public T getNext() { return IndexedSeq.this.get(--i); } }; }