auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private int populateElementPositions(int elementPositionCount) { elementPositions = ensureCapacity(elementPositions, elementPositionCount); int index = 0; for (int i = 0; i < outputPositionCount; i++) { int length = elementLengths[i]; if (maxElementLength != -1 && length > maxElementLength) { length = maxElementLength; elementLengths[i] = length; } for (int j = 0; j < length; j++) { elementPositions[index] = elementOffsets[i] + j; index++; } } <START> return index; <END> }</code><technical_language>eliminate length variable assign elementLengths[i] = Max(maxElementLength, elementLengths[i]) conditionally</technical_language>

Target:
private int populateElementPositions(int elementPositionCount) { elementPositions = ensureCapacity(elementPositions, elementPositionCount); int index = 0; for (int i = 0; i < outputPositionCount; i++) { int length = elementLengths[i]; if (maxElementLength != ELEMENT_LENGTH_UNBOUNDED && length > maxElementLength) { length = maxElementLength; elementLengths[i] = length; } for (int j = 0; j < length; j++) { elementPositions[index] = elementOffsets[i] + j; index++; } } return index; }
Source:
<code>public void archiveHeadAllFilesTarTimestamps() throws Exception { try (Git git = new Git(db)) { createTestContent(git); String fmt = "tar"; File archive = new File(getTemporaryDirectory(), "archive." + format); archive(git, archive, fmt); ObjectId hash1 = ObjectId.fromRaw(IO.readFully(archive)); try (InputStream fi = Files.newInputStream(archive.toPath()); InputStream bi = new BufferedInputStream(fi); ArchiveInputStream o = new TarArchiveInputStream(bi)) { assertEntries(o); } <START> Thread.sleep(2000); <END> archive(git, archive, fmt); assertEquals(UNEXPECTED_DIFFERENT_HASH, hash1, ObjectId.fromRaw(IO.readFully(archive))); } }</code><technical_language>this sleep avoided? below</technical_language>

Target:
public void archiveHeadAllFilesTarTimestamps() throws Exception { try (Git git = new Git(db)) { createTestContent(git); String fmt = "tar"; File archive = new File(getTemporaryDirectory(), "archive." + format); archive(git, archive, fmt); ObjectId hash1 = ObjectId.fromRaw(IO.readFully(archive)); try (InputStream fi = Files.newInputStream(archive.toPath()); InputStream bi = new BufferedInputStream(fi); ArchiveInputStream o = new TarArchiveInputStream(bi)) { assertEntries(o); } Thread.sleep(WAIT); archive(git, archive, fmt); assertEquals(UNEXPECTED_DIFFERENT_HASH, hash1, ObjectId.fromRaw(IO.readFully(archive))); } }
Source:
<code>private void handleHttpError(WebContext ctx, String objectId, @Nullable String fileExtension, @Nullable String filename, int status) { PhysicalStorageSpace replicationSpace = replicationManager.getReplicationSpace(name).orElse(null); if (replicationSpace == null) { ctx.respondWith().error(HttpResponseStatus.valueOf(status)); return; } ValueHolder<Integer> effectiveStatus = new ValueHolder<>(HttpResponseStatus.OK.code()); try { if (Strings.isFilled(filename)) { replicationSpace.engine.deliverAsDownload(ctx, name, objectId, filename, nextStatus -> { effectiveStatus.accept(nextStatus); ctx.respondWith().error(HttpResponseStatus.valueOf(nextStatus)); }); } else { replicationSpace.engine.deliver(ctx, name, objectId, fileExtension, nextStatus -> { effectiveStatus.accept(nextStatus); ctx.respondWith().error(HttpResponseStatus.valueOf(nextStatus)); }); } } catch (IOException e) { try { ctx.respondWith().error(HttpResponseStatus.INTERNAL_SERVER_ERROR); } catch (Exception ex) { Exceptions.ignore(ex); } <START> effectiveStatus.accept(HttpResponseStatus.INTERNAL_SERVER_ERROR.code()); <END> throw Exceptions.handle() .error(e) .to(StorageUtils.LOG) .withSystemErrorMessage( "Storage Layer 1: An error occurred when delivering %s (%s) via replication %s for %s: %s (%s)", objectId, name, replicationSpace.name, ctx.getRequestedURI()) .handle(); } }</code><technical_language>Result of this ValueHolder is</technical_language>

Target:
private void handleHttpError(WebContext ctx, String objectId, @Nullable String fileExtension, @Nullable String filename, int status) { PhysicalStorageSpace replicationSpace = replicationManager.getReplicationSpace(name).orElse(null); if (replicationSpace == null) { ctx.respondWith().error(HttpResponseStatus.valueOf(status)); return; } try { if (Strings.isFilled(filename)) { replicationSpace.engine.deliverAsDownload(ctx, name, objectId, filename, nextStatus -> { ctx.respondWith().error(HttpResponseStatus.valueOf(nextStatus)); }); } else { replicationSpace.engine.deliver(ctx, name, objectId, fileExtension, nextStatus -> { ctx.respondWith().error(HttpResponseStatus.valueOf(nextStatus)); }); } } catch (IOException e) { try { ctx.respondWith().error(HttpResponseStatus.INTERNAL_SERVER_ERROR); } catch (Exception ex) { Exceptions.ignore(ex); } throw Exceptions.handle() .error(e) .to(StorageUtils.LOG) .withSystemErrorMessage( "Layer 1: An error occurred when delivering %s (%s) via replication %s for %s: %s (%s)", objectId, name, replicationSpace.name, ctx.getRequestedURI()) .handle(); } }
Source:
<code>public Note call() throws GitAPIException { checkCallable(); try (RevWalk walk = new RevWalk(repo); ObjectInserter inserter = repo.newObjectInserter()) { NoteMap map = NoteMap.newEmptyMap(); RevCommit notesCommit = null; Ref ref = <START> repo.findRef(notesRef); <END> if (ref != null) { notesCommit = walk.parseCommit(ref.getObjectId()); map = NoteMap.read(walk.getObjectReader(), notesCommit); } map.set(id, null, inserter); commitNoteMap(walk, map, notesCommit, inserter, "Notes removed by 'git notes remove'"); return map.getNote(id); } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); } }</code><technical_language>exactRef</technical_language>

Target:
public Note call() throws GitAPIException { checkCallable(); try (RevWalk walk = new RevWalk(repo); ObjectInserter inserter = repo.newObjectInserter()) { NoteMap map = NoteMap.newEmptyMap(); RevCommit notesCommit = null; Ref ref = repo.exactRef(notesRef); if (ref != null) { notesCommit = walk.parseCommit(ref.getObjectId()); map = NoteMap.read(walk.getObjectReader(), notesCommit); } map.set(id, null, inserter); commitNoteMap(walk, map, notesCommit, inserter, "Notes removed by 'git notes remove'"); return map.getNote(id); } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); } }
Source:
<code>protected void processResponse(Map<String, Object> response) { Map<String, Object> result = getMap(response, "result"); if (result.containsKey("volume")) { Object o = result.get("volume"); if (o instanceof Double) { volume = ((Double)o).intValue(); } else { if (o instanceof Integer) { volume = (Integer)o; } } } if (result.containsKey("name")) name = (String)result.get("name"); <START> } <END></code><technical_language>please reformat code Eclipse coding standards</technical_language>

Target:
protected void processResponse(Map<String, Object> response) { Map<String, Object> result = getMap(response, "result"); if (result.containsKey("volume")) { Object o = result.get("volume"); if (o instanceof Double) { volume = ((Double)o).intValue(); } else { if (o instanceof Integer) { volume = (Integer)o; } } } if (result.containsKey("name")) { name = (String)result.get("name"); } }
Source:
<code>public void test() throws Throwable { ExecutorService pool = Executors.newFixedThreadPool(32); for (int i = 0; i < 32; i++) { <START> final String connStr = "jdbc:sqlite:sample-" + i + ".db"; <END> final int sleepMillis = i; pool.execute(new Runnable() { public void run() { try { Thread.sleep(sleepMillis * 10); } catch (InterruptedException e) { } try { Connection conn = DriverManager.getConnection(connStr); System.out.println("Connected!"); } catch (SQLException e) { e.printStackTrace(); Assert.fail(e.getLocalizedMessage()); } } }); } pool.awaitTermination(3, TimeUnit.SECONDS); }</code><technical_language>target/sample- path avoid messing source code root</technical_language>

Target:
public void test() throws Throwable { ExecutorService pool = Executors.newFixedThreadPool(32); for (int i = 0; i < 32; i++) { final String connStr = "jdbc:sqlite:target/sample-" + i + ".db"; final int sleepMillis = i; pool.execute(new Runnable() { public void run() { try { Thread.sleep(sleepMillis * 10); } catch (InterruptedException e) { } try { Connection conn = DriverManager.getConnection(connStr); } catch (SQLException e) { e.printStackTrace(); Assert.fail(e.getLocalizedMessage()); } } }); } pool.awaitTermination(3, TimeUnit.SECONDS); }
Source:
<code>protected RestHighLevelClient makeClient(IndexWriterParams parameters) throws IOException { hosts = parameters.getStrings(ElasticConstants.HOSTS); port = parameters.getInt(ElasticConstants.PORT, DEFAULT_PORT); user = parameters.get(ElasticConstants.USER, DEFAULT_USER); password = parameters.get(ElasticConstants.PASSWORD, ""); final CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(user, password)); RestHighLevelClient client = null; if (hosts != null && port > 1) { HttpHost[] hostsList = new HttpHost[hosts.length]; int i = 0; for(String host: hosts) { hostsList[i++] = new HttpHost(host, port); } RestClientBuilder restClientBuilder = RestClient.builder(hostsList); if (StringUtils.isNotBlank(cluster)) { Header[] defaultHeaders = new Header[]{new BasicHeader("cluster.name", cluster)}; restClientBuilder.setDefaultHeaders(defaultHeaders); } else { LOG.debug("No cluster name provided so using default"); } <START> if(StringUtils.isNotBlank(password)) { <END> restClientBuilder.setHttpClientConfigCallback(new HttpClientConfigCallback() { @Override public HttpAsyncClientBuilder customizeHttpClient( HttpAsyncClientBuilder arg0) { return arg0 .setDefaultCredentialsProvider(credentialsProvider); } }); } client = new RestHighLevelClient(restClientBuilder); } else { throw new IOException("ElasticRestClient initialization Failed!!!\\n\\nPlease Provide the hosts"); } return client; }</code><technical_language>Great, @balashashanka! good work. Minor point: If try apply [Nutch Eclipse Code Formatting rules](<LINK_0> remove trailing white space. Eclipse? If need set up</technical_language>

Target:
protected RestHighLevelClient makeClient(IndexWriterParams parameters) throws IOException { hosts = parameters.getStrings(ElasticConstants.HOSTS); port = parameters.getInt(ElasticConstants.PORT, DEFAULT_PORT); auth = parameters.getBoolean(ElasticConstants.USE_AUTH, false); user = parameters.get(ElasticConstants.USER, DEFAULT_USER); password = parameters.get(ElasticConstants.PASSWORD, ""); final CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(user, password)); RestHighLevelClient client = null; if (hosts != null && port > 1) { HttpHost[] hostsList = new HttpHost[hosts.length]; int i = 0; for (String host : hosts) { hostsList[i++] = new HttpHost(host, port); } RestClientBuilder restClientBuilder = RestClient.builder(hostsList); if (auth) { restClientBuilder .setHttpClientConfigCallback(new HttpClientConfigCallback() { @Override public HttpAsyncClientBuilder customizeHttpClient( HttpAsyncClientBuilder arg0) { return arg0.setDefaultCredentialsProvider(credentialsProvider); } }); } client = new RestHighLevelClient(restClientBuilder); } else { throw new IOException( "ElasticRestClient initialization Failed!!!\\n\\nPlease Provide the hosts"); } return client; }
Source:
<code>public void onWritePossible() throws IOException { while (out.isReady()) { try { buffer.clear(); if (in.read(buffer) < 0) { buffer = null; } else { buffer.flip(); } } catch(Throwable t) { LOG.log(Level.SEVERE, t.getMessage(), t); buffer = null; } finally { if (buffer != null) { outChannel.write(buffer); } else { try { out.close(); } finally { context.complete(); <START> return; <END> } return; } } } }</code><technical_language>Bad rebase: this removed now, of return Statement line 138 below</technical_language>

Target:
public void onWritePossible() throws IOException { while (out.isReady()) { try { buffer.clear(); if (in.read(buffer) < 0) { buffer = null; } else { buffer.flip(); } } catch(Throwable t) { LOG.log(Level.SEVERE, t.getMessage(), t); buffer = null; } finally { if (buffer != null) { outChannel.write(buffer); } else { try { out.close(); } finally { context.complete(); } return; } } } }
Source:
<code>public String normalize(String absoluteFieldPath, String value) { if ( value == null ) { return null; } return analyzerOrNormalizer != null <START> ? analyzerOrNormalizer.normalize( absoluteFieldPath, value ).utf8ToString() <END> : value; }</code><technical_language>I of callers of normalize() convert String return a BytesRef. drop extra utf8ToString() call this method return a BytesRef directly</technical_language>

Target:
public BytesRef normalize(String absoluteFieldPath, String value) { if ( value == null ) { return null; } if ( analyzerOrNormalizer == null ) { return new BytesRef( value ); } return analyzerOrNormalizer.normalize( absoluteFieldPath, value ); }
Source:
<code>private Guid findImageForSameDrive(Guid snapshotId, DiskImage diskImage) { List<DiskImage> imagesFromSnapshot = diskImageDao.getAllSnapshotsForVmSnapshot(snapshotId); <START> for (DiskImage currDiskImage : imagesFromSnapshot) { if (diskImage.getId().equals(currDiskImage.getId())) { return currDiskImage.getImageId(); } } <END> return null; }</code><technical_language>streams more elegant</technical_language>

Target:
private Guid findImageForSameDrive(Guid snapshotId, DiskImage diskImage) { List<DiskImage> imagesFromSnapshot = diskImageDao.getAllSnapshotsForVmSnapshot(snapshotId); return imagesFromSnapshot.stream() .filter(currDiskImage -> diskImage.getId().equals(currDiskImage.getId())) .findFirst() .map(DiskImage::getImageId) .orElse(null); }
Source:
<code>public void handleSetDataResponse(final EmptyResponseDto emptyResponseDto, final String deviceIdentification, final String organisationIdentification, final String correlationUid, final String messageType, final ResponseMessageResultType responseMessageResultType, final OsgpException osgpException) { LOGGER.info("handleResponse for MessageType: {}", messageType); ResponseMessageResultType result = ResponseMessageResultType.OK; EmptyResponse emptyResponse = null; OsgpException exception = null; try { if (responseMessageResultType == ResponseMessageResultType.NOT_OK || osgpException != null) { LOGGER.error("Device Response not ok.", osgpException); throw osgpException; } this.handleResponseMessageReceived(deviceIdentification); emptyResponse = this.mapper.map(emptyResponseDto, EmptyResponse.class); } catch (final Exception e) { LOGGER.error("Unexpected Exception", e); result = ResponseMessageResultType.NOT_OK; exception = this.ensureOsgpException(e, "Exception occurred while setting data"); } <START> this.webServiceResponseMessageSender.send(ResponseMessage.newResponseMessageBuilder() <END> .withCorrelationUid(correlationUid).withOrganisationIdentification(organisationIdentification) .withDeviceIdentification(deviceIdentification).withResult(result).withOsgpException(exception) .withDataObject(emptyResponse).build(), messageType); }</code><technical_language>Extract building of ResponseMessage variable (in eclipse, select text, right-click > refactor > extract local variable / select code + shift+alt+L). This code a bit more readable, especially passing in other besides ResponseMessage</technical_language>

Target:
public void handleSetDataResponse(final EmptyResponseDto emptyResponseDto, final String deviceIdentification, final String organisationIdentification, final String correlationUid, final String messageType, final ResponseMessageResultType responseMessageResultType, final OsgpException osgpException) { LOGGER.info("handleResponse for MessageType: {}", messageType); ResponseMessageResultType result = ResponseMessageResultType.OK; EmptyResponse emptyResponse = null; OsgpException exception = null; try { if (responseMessageResultType == ResponseMessageResultType.NOT_OK || osgpException != null) { LOGGER.error("Device Response not ok.", osgpException); throw osgpException; } this.handleResponseMessageReceived(deviceIdentification); emptyResponse = this.mapper.map(emptyResponseDto, EmptyResponse.class); } catch (final Exception e) { LOGGER.error("Unexpected Exception", e); result = ResponseMessageResultType.NOT_OK; exception = this.ensureOsgpException(e, "Exception occurred while setting data"); } ResponseMessage responseMessage = ResponseMessage.newResponseMessageBuilder() .withCorrelationUid(correlationUid).withOrganisationIdentification(organisationIdentification) .withDeviceIdentification(deviceIdentification).withResult(result).withOsgpException(exception) .withDataObject(emptyResponse).build(); this.webServiceResponseMessageSender.send(responseMessage, messageType); }
Source:
<code>public void testExecuteQuery() { Guid storagePoolID = new Guid(UUID.randomUUID()); storage_pool expectedResult = mock(storage_pool.class); StoragePoolQueryParametersBase paramsMock = getQueryParameters(); when(paramsMock.getStoragePoolId()).thenReturn(storagePoolID); StoragePoolDAO storagePoolDAOMock = mock(StoragePoolDAO.class); when(storagePoolDAOMock.get(storagePoolID, getUser().getUserId(), paramsMock.isFiltered())).thenReturn(expectedResult); DbFacade dbFacadeMock = getDbFacadeMockInstance(); when(dbFacadeMock.getStoragePoolDAO()).thenReturn(storagePoolDAOMock); getQuery().executeQueryCommand(); storage_pool result = (storage_pool) getQuery().getQueryReturnValue().getReturnValue(); assertEquals("Wrong storage pool returned", expectedResult, result); <START> verify(storagePoolDAOMock, times(1)).get(storagePoolID, getUser().getUserId(), paramsMock.isFiltered()); <END> verifyNoMoreInteractions(storagePoolDAOMock); }</code><technical_language>need for times(1). Generally, need verify a method return influences code is called, mocked (This is recommended Mockito)</technical_language>

Target:
public void testExecuteQuery() { Guid storagePoolID = new Guid(UUID.randomUUID()); storage_pool expectedResult = mock(storage_pool.class); StoragePoolQueryParametersBase paramsMock = getQueryParameters(); when(paramsMock.getStoragePoolId()).thenReturn(storagePoolID); StoragePoolDAO storagePoolDAOMock = mock(StoragePoolDAO.class); when(storagePoolDAOMock.get(storagePoolID, getUser().getUserId(), paramsMock.isFiltered())).thenReturn(expectedResult); DbFacade dbFacadeMock = getDbFacadeMockInstance(); when(dbFacadeMock.getStoragePoolDAO()).thenReturn(storagePoolDAOMock); getQuery().executeQueryCommand(); storage_pool result = (storage_pool) getQuery().getQueryReturnValue().getReturnValue(); assertEquals("Wrong storage pool returned", expectedResult, result); }
Source:
<code>protected CorsConfiguration getCorsConfiguration(Object handler, HttpServletRequest request) { CorsConfiguration corsConfiguration = super.getCorsConfiguration(handler, request); String lookupPath = getUrlPathHelper().getLookupPathForRequest(request); String repositoryLookupPath = new BaseUri(configuration.getBaseUri()).getRepositoryLookupPath(lookupPath); <START> if (StringUtils.hasText(repositoryLookupPath) && repositories != null) { <END> CorsConfiguration repositoryConfiguration = new CorsConfigurationAccessor(mappings, repositories, embeddedValueResolver).findCorsConfiguration(lookupPath); if (repositoryConfiguration != null) { if (corsConfiguration != null) { return corsConfiguration.combine(repositoryConfiguration); } return repositoryConfiguration; } } return corsConfiguration; }</code><technical_language>invert conditions able early returns avoid nesting</technical_language>

Target:
protected CorsConfiguration getCorsConfiguration(Object handler, HttpServletRequest request) { CorsConfiguration corsConfiguration = super.getCorsConfiguration(handler, request); String lookupPath = getUrlPathHelper().getLookupPathForRequest(request); String repositoryLookupPath = new BaseUri(configuration.getBaseUri()).getRepositoryLookupPath(lookupPath); if (!StringUtils.hasText(repositoryLookupPath) || repositories == null) { return corsConfiguration; } CorsConfiguration repositoryConfiguration = new CorsConfigurationAccessor(mappings, repositories, embeddedValueResolver).findCorsConfiguration(lookupPath); if (repositoryConfiguration != null) { return corsConfiguration != null ? corsConfiguration.combine(repositoryConfiguration) : repositoryConfiguration; } return corsConfiguration; }
Source:
<code><START> private boolean isWithinTryHeader(Tree syntaxNode) { <END> final Tree parent = syntaxNode.parent(); if (parent.is(Tree.Kind.VARIABLE)) { return isTryStatementResource((VariableTree) parent); } return false; }</code><technical_language>isTryStatementResource is static, this static well</technical_language>

Target:
private static boolean isWithinTryHeader(Tree syntaxNode) { final Tree parent = syntaxNode.parent(); if (parent.is(Tree.Kind.VARIABLE)) { return isTryStatementResource((VariableTree) parent); } return false; }
Source:
<code>protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException { TaggedValuePointable tvp1 = args[0]; ObjectPointable op; if (tvp1.getTag() == ValueTag.SEQUENCE_TAG) { <START> List<TaggedValuePointable> pointables = new ArrayList<>(); <END> TaggedValuePointable temptvp = ppool.takeOne(TaggedValuePointable.class); try { tvp1.getValue(sp1); int size1 = sp1.getEntryCount(); int size2; for (int i = 0; i < size1; i++) { sp1.getEntry(i, temptvp); if (temptvp.getTag() == ValueTag.OBJECT_TAG) { op = (ObjectPointable) ObjectPointable.FACTORY.createPointable(); temptvp.getValue(op); op.getKeys(temptvp); temptvp.getValue(sp2); size2 = sp2.getEntryCount(); for (int j = 0; j < size2; j++) { TaggedValuePointable tvp = (TaggedValuePointable) TaggedValuePointable.FACTORY .createPointable(); sp2.getEntry(j, tvp); pointables.add(tvp); } } } removeDuplicates(pointables); abvs.reset(); sb.reset(abvs); for (TaggedValuePointable tvp : pointables) { sb.addItem(tvp); } sb.finish(); result.set(abvs); } catch (IOException e) { throw new SystemException(ErrorCode.SYSE0001, e); } finally { ppool.giveBack(temptvp); } } else if (tvp1.getTag() == ValueTag.OBJECT_TAG) { try { op = (ObjectPointable) ObjectPointable.FACTORY.createPointable(); tvp1.getValue(op); op.getKeys(result); } catch (IOException e) { throw new SystemException(ErrorCode.SYSE0001, e); } } else { XDMConstants.setEmptySequence(result); } }</code><technical_language>Move creation of pointables object constructor. In evaluate, reset clear pointables variable</technical_language>

Target:
protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException { TaggedValuePointable tvp1 = args[0]; ObjectPointable op; if (tvp1.getTag() == ValueTag.SEQUENCE_TAG) { pointables = new ArrayList<>(); TaggedValuePointable temptvp = ppool.takeOne(TaggedValuePointable.class); try { tvp1.getValue(sp1); int size1 = sp1.getEntryCount(); int size2; for (int i = 0; i < size1; i++) { sp1.getEntry(i, temptvp); if (temptvp.getTag() == ValueTag.OBJECT_TAG) { op = (ObjectPointable) ObjectPointable.FACTORY.createPointable(); temptvp.getValue(op); op.getKeys(temptvp); temptvp.getValue(sp2); size2 = sp2.getEntryCount(); for (int j = 0; j < size2; j++) { TaggedValuePointable tvp = (TaggedValuePointable) TaggedValuePointable.FACTORY .createPointable(); sp2.getEntry(j, tvp); pointables.add(tvp); } } } removeDuplicates(pointables); abvs.reset(); sb.reset(abvs); for (TaggedValuePointable tvp : pointables) { sb.addItem(tvp); } sb.finish(); result.set(abvs); } catch (IOException e) { throw new SystemException(ErrorCode.SYSE0001, e); } finally { ppool.giveBack(temptvp); } } else if (tvp1.getTag() == ValueTag.OBJECT_TAG) { try { op = (ObjectPointable) ObjectPointable.FACTORY.createPointable(); tvp1.getValue(op); op.getKeys(result); } catch (IOException e) { throw new SystemException(ErrorCode.SYSE0001, e); } } else { XDMConstants.setEmptySequence(result); } }
Source:
<code>private static boolean deepEqualsRowData( RowData should, RowData is, RowDataSerializer serializer1, RowDataSerializer serializer2, boolean checkClass) { if (should.getArity() != is.getArity()) { return false; } if (checkClass && should.getClass() != is.getClass()) { return false; } <START> BinaryRowData row1 = serializer1.toBinaryRow(should); <END> BinaryRowData row2 = serializer2.toBinaryRow(is); return Objects.equals(row1, row2); }</code><technical_language>convert rows BinaryRowData for comparing. additionally compare RowData checkClass is true</technical_language>

Target:
private static boolean deepEqualsRowData( RowData should, RowData is, RowDataSerializer serializer1, RowDataSerializer serializer2, boolean checkClass) { if (should.getArity() != is.getArity()) { return false; } if (checkClass && (should.getClass() != is.getClass() || !should.equals(is))) { return false; } BinaryRowData row1 = serializer1.toBinaryRow(should); BinaryRowData row2 = serializer2.toBinaryRow(is); return Objects.equals(row1, row2); }
Source:
<code>public void setBlock(Block block) { this.columnarRow = ColumnarRow.toColumnarRow(block); this.position = 0; <START> this.positionCount = block == null ? 0 : block.getPositionCount(); <END> }</code><technical_language>NPE line 72. ColumnarRow.toColumnarRow throws for null argument</technical_language>

Target:
public void setBlock(Block block) { this.position = 0; this.nonNullPosition = 0; if (block == null) { this.columnarRow = null; this.positionCount = 0; } else { this.columnarRow = ColumnarRow.toColumnarRow(block); this.positionCount = block.getPositionCount(); } }
Source:
<code><START> public PartitionId PartitionIdentifyCreate(ServletRequestDetails theRequestDetails) { <END> String partitionName = theRequestDetails.getHeader("X-Partition-Name"); return PartitionId.fromPartitionName(partitionName); }</code><technical_language>Is this time requesting a non-boolean a callback? I if need consider other concerns--e.g. consequences for other languages need consider</technical_language>

Target:
public RequestPartitionId PartitionIdentifyCreate(ServletRequestDetails theRequestDetails) { String partitionName = theRequestDetails.getHeader("X-Partition-Name"); return RequestPartitionId.fromPartitionName(partitionName); }
Source:
<code>protected void fillEdgesToUsingFilter(EdgeFilter edgeFilter) { EdgeFilter tmpFilter = additionalEdgeFilter; additionalEdgeFilter = edgeFilter; finishedTo = !fillEdgesTo(); additionalEdgeFilter = tmpFilter; <START> } <END></code><technical_language>cases for EdgeFilter for non-CH algos? (For CH is CHLevelEdgeFilter, here?) Is vehicle edge remove this code #1835</technical_language>

Target:
protected void fillEdgesToUsingFilter(EdgeFilter edgeFilter) { additionalEdgeFilter = edgeFilter; finishedTo = !fillEdgesTo(); additionalEdgeFilter = null; }
Source:
<code>public int slotForBlockId(int partitionId, String streamName) { <START> int offset = m_slotManager.slotForBlockId(partitionId, streamName); <END> assert(offset != -1); return offset; }</code><technical_language>this handle a streamName partitionId exist in manager</technical_language>

Target:
public int slotForBlockId(int partitionId, String streamName) { int offset = m_slotMapper.slotForBlockId(partitionId, streamName); assert(offset != -1); return offset; }
Source:
<code>public DataStore buildDataStore(EntityManagerFactory entityManagerFactory, QueryEngine queryEngine, ObjectProvider<ElideDynamicEntityCompiler> dynamicCompiler, ElideConfigProperties settings) throws ClassNotFoundException { AggregationDataStore aggregationDataStore = null; <START> JpaDataStore.JpaTransactionCancel jpaTransactionCancel = null; <END> if (isDynamicConfigEnabled(settings)) { ElideDynamicEntityCompiler compiler = dynamicCompiler.getIfAvailable(); Set<Class<?>> annotatedClass = compiler.findAnnotatedClasses(FromTable.class); annotatedClass.addAll(compiler.findAnnotatedClasses(FromSubquery.class)); aggregationDataStore = new AggregationDataStore( () -> { return entityManagerFactory.createEntityManager(); }, queryEngine, annotatedClass, (entityManager -> { entityManager.unwrap(Session.class).cancelQuery();})); } else { aggregationDataStore = new AggregationDataStore( () -> { return entityManagerFactory.createEntityManager(); }, queryEngine, (entityManager -> { entityManager.unwrap(Session.class).cancelQuery();})); } JpaDataStore jpaDataStore = new JpaDataStore( () -> { return entityManagerFactory.createEntityManager(); }, (em -> { return new NonJtaTransaction(em, em.unwrap(Session.class).cancelQuery()); }), (entityManager -> { entityManager.unwrap(Session.class).cancelQuery();})); return new MultiplexManager(jpaDataStore, queryEngine.getMetaDataStore(), aggregationDataStore); }</code><technical_language>This assigned like: java jpaTransactionCancel = (entityManager) -> { entityManager.unwrap(Session.class).cancelQuery();}; reuse jpaTransactionCancel below</technical_language>

Target:
public DataStore buildDataStore(EntityManagerFactory entityManagerFactory, QueryEngine queryEngine, ObjectProvider<ElideDynamicEntityCompiler> dynamicCompiler, ElideConfigProperties settings) throws ClassNotFoundException { AggregationDataStore.AggregationDataStoreBuilder aggregationDataStoreBuilder = AggregationDataStore.builder() .queryEngine(queryEngine); if (isDynamicConfigEnabled(settings)) { ElideDynamicEntityCompiler compiler = dynamicCompiler.getIfAvailable(); Set<Class<?>> annotatedClass = compiler.findAnnotatedClasses(FromTable.class); annotatedClass.addAll(compiler.findAnnotatedClasses(FromSubquery.class)); aggregationDataStoreBuilder.dynamicCompiledClasses(annotatedClass); } AggregationDataStore aggregationDataStore = aggregationDataStoreBuilder.build(); JpaDataStore jpaDataStore = new JpaDataStore( () -> { return entityManagerFactory.createEntityManager(); }, (em) -> { return new NonJtaTransaction(em, txCancel); }); return new MultiplexManager(jpaDataStore, queryEngine.getMetaDataStore(), aggregationDataStore); }
Source:
<code>public <W extends Window> TimeWindowedCogroupedKStream<K, VOut> windowedBy(final Windows<W> windows) { Objects.requireNonNull(windows, "windows can't be null"); <START> return new TimeWindowedCogroupedKStreamImpl<>(windows, <END> builder, sourceNodes, name, keySerde, null, aggregateBuilder, streamsGraphNode, groupPatterns); }</code><technical_language>nit: move windows next line</technical_language>

Target:
public <W extends Window> TimeWindowedCogroupedKStream<K, VOut> windowedBy(final Windows<W> windows) { Objects.requireNonNull(windows, "windows can't be null"); return new TimeWindowedCogroupedKStreamImpl<>( windows, builder, sourceNodes, name, aggregateBuilder, streamsGraphNode, groupPatterns); }
Source:
<code>protected Vector<ChangeBasedEvent> getEventsFromDateRange(Date lowerDate) throws IOException { <START> GerritServer server = PluginImpl.getInstance().getServer(serverName); <END> IGerritHudsonTriggerConfig config = server.getConfig(); String events = getEventsFromEventsLogPlugin(config, buildEventsLogURL(config, lowerDate)); return createEventsFromString(events); }</code><technical_language>Findbugs issue this in current core version depending PluginImpl.getInstance() is annotated CheckForNull</technical_language>

Target:
protected List<GerritTriggeredEvent> getEventsFromDateRange(Date lowerDate) throws IOException { GerritServer server = PluginImpl.getServer_(serverName); if (server == null) { logger.error("Server for could not be found.", serverName); return Collections.synchronizedList(new ArrayList<GerritTriggeredEvent>()); } IGerritHudsonTriggerConfig config = server.getConfig(); String events = getEventsFromEventsLogPlugin(config, buildEventsLogURL(config, lowerDate)); return createEventsFromString(events); }
Source:
<code>public void testWithDisabledInstancesLimit() throws Exception { MaintenanceSignal maintenanceSignal = _dataAccessor.getProperty(_dataAccessor.keyBuilder().maintenance()); Assert.assertNull(maintenanceSignal); checkForRebalanceError(false); HelixAdmin admin = new ZKHelixAdmin(_gZkClient); int i; for (i = 2; i < 2 + _maxOfflineInstancesAllowed; i++) { String instance = _participants.get(i).getInstanceName(); admin.enableInstance(CLUSTER_NAME, instance, false); } boolean result = TestHelper.verify(() -> { MaintenanceSignal ms = _dataAccessor.getProperty(_dataAccessor.keyBuilder().maintenance()); return ms == null; }, TestHelper.WAIT_DURATION); Assert.assertTrue(result); String instance = _participants.get(i).getInstanceName(); admin.enableInstance(CLUSTER_NAME, instance, false); ZkHelixClusterVerifier clusterVerifier = new BestPossibleExternalViewVerifier.Builder(CLUSTER_NAME).setZkClient(_gZkClient) .build(); Assert.assertTrue(clusterVerifier.verifyByPolling()); result = TestHelper.verify(() -> { MaintenanceSignal ms =_dataAccessor.getProperty(_dataAccessor.keyBuilder().maintenance()); return ms != null && ms.getReason() != null; <START> }, TestHelper.WAIT_DURATION); <END> checkForRebalanceError(true); for (i = 2; i < 2 + _maxOfflineInstancesAllowed + 1; i++) { instance = _participants.get(i).getInstanceName(); admin.enableInstance(CLUSTER_NAME, instance, true); } admin.enableMaintenanceMode(CLUSTER_NAME, false); }</code><technical_language>Assert</technical_language>

Target:
public void testWithDisabledInstancesLimit() throws Exception { MaintenanceSignal maintenanceSignal = _dataAccessor.getProperty(_dataAccessor.keyBuilder().maintenance()); Assert.assertNull(maintenanceSignal); checkForRebalanceError(false); HelixAdmin admin = new ZKHelixAdmin(_gZkClient); int i; for (i = 2; i < 2 + _maxOfflineInstancesAllowed; i++) { String instance = _participants.get(i).getInstanceName(); admin.enableInstance(CLUSTER_NAME, instance, false); } boolean result = TestHelper.verify(() -> { MaintenanceSignal ms = _dataAccessor.getProperty(_dataAccessor.keyBuilder().maintenance()); return ms == null; }, TestHelper.WAIT_DURATION); Assert.assertTrue(result); String instance = _participants.get(i).getInstanceName(); admin.enableInstance(CLUSTER_NAME, instance, false); ZkHelixClusterVerifier clusterVerifier = new BestPossibleExternalViewVerifier.Builder(CLUSTER_NAME).setZkClient(_gZkClient) .setWaitTillVerify(TestHelper.DEFAULT_REBALANCE_PROCESSING_WAIT_TIME) .build(); Assert.assertTrue(clusterVerifier.verifyByPolling()); result = TestHelper.verify(() -> { MaintenanceSignal ms =_dataAccessor.getProperty(_dataAccessor.keyBuilder().maintenance()); return ms != null && ms.getReason() != null; }, TestHelper.WAIT_DURATION); Assert.assertTrue(result); checkForRebalanceError(true); for (i = 2; i < 2 + _maxOfflineInstancesAllowed + 1; i++) { instance = _participants.get(i).getInstanceName(); admin.enableInstance(CLUSTER_NAME, instance, true); } admin.enableMaintenanceMode(CLUSTER_NAME, false); Assert.assertTrue(clusterVerifier.verifyByPolling()); }
Source:
<code>public boolean equals(Object other) { <START> if (other == null || !(other instanceof VdcParameter)) { <END> return false; } return getGuid().equals(((VdcParameter) other).getGuid()); }</code><technical_language>instanceof..</technical_language>

Target:
public boolean equals(Object other) { if (other == null || getClass() != other.getClass()) { return false; } return uuid.equals(((VdcParameter) other).uuid); }
Source:
<code>private void handleSuccess() { LOG.info("Unlock of '{}' succeeded.", vault.getDisplayableName()); if (savePassword.get()) { savePasswordToSystemkeychain(); } switch (vault.getVaultSettings().actionAfterUnlock().get()) { case ASK -> Platform.runLater(() -> { window.setScene(successScene.get()); window.show(); }); case REVEAL -> { <START> Platform.runLater(() -> { window.setScene(unlockScene.get()); window.close(); }); <END> vaultService.reveal(vault); } case IGNORE -> { Platform.runLater(() -> { window.setScene(unlockScene.get()); window.close(); }); } } }</code><technical_language>suggestion Platform.runLater(window::close); need set a scene closing a window. Especially a scene is set :wink: for IGNORE</technical_language>

Target:
private void handleSuccess() { LOG.info("Unlock of '{}' succeeded.", vault.getDisplayableName()); if (savePassword.get()) { savePasswordToSystemkeychain(); } switch (vault.getVaultSettings().actionAfterUnlock().get()) { case ASK -> Platform.runLater(() -> { window.setScene(successScene.get()); window.show(); }); case REVEAL -> { Platform.runLater(window::close); vaultService.reveal(vault); } case IGNORE -> Platform.runLater(window::close); } }
Source:
<code>public void setup(TestContext textConTx) { testContext = textConTx; targetInstance = testContext.getTargetInstance(); basename = testContext.getTestId(); if (TestUtils.isMemberNode(targetInstance)) { HazelcastServerCachingProvider hcp = new HazelcastServerCachingProvider(); cacheManager = new HazelcastServerCacheManager(hcp, targetInstance, hcp.getDefaultURI(), hcp.getDefaultClassLoader(), null); } else { HazelcastClientCachingProvider hcp = new HazelcastClientCachingProvider(); cacheManager = new HazelcastClientCacheManager( hcp, targetInstance, hcp.getDefaultURI(), hcp.getDefaultClassLoader(), null); } config.setName(basename); <START> MutableConfiguration a; <END> cacheManager.createCache(basename, config); }</code><technical_language>unused variable</technical_language>

Target:
public void setup(TestContext textConTx) { testContext = textConTx; targetInstance = testContext.getTargetInstance(); basename = testContext.getTestId(); if (TestUtils.isMemberNode(targetInstance)) { HazelcastServerCachingProvider hcp = new HazelcastServerCachingProvider(); cacheManager = new HazelcastServerCacheManager(hcp, targetInstance, hcp.getDefaultURI(), hcp.getDefaultClassLoader(), null); } else { HazelcastClientCachingProvider hcp = new HazelcastClientCachingProvider(); cacheManager = new HazelcastClientCacheManager( hcp, targetInstance, hcp.getDefaultURI(), hcp.getDefaultClassLoader(), null); } config.setName(basename); cacheManager.createCache(basename, config); }
Source:
<code><START> void getBytes(int index, OutputStream out, int length, boolean internal) throws IOException { <END> getBytes(index, out, length); }</code><technical_language>this override, internal parameter used</technical_language>

Target:
void getBytes(int index, OutputStream out, int length, boolean internal) throws IOException { UnsafeByteBufUtil.getBytes(this, addr(index), index, out, length); }
Source:
<code>public synchronized void changeChannelEventLoopGroup(EventLoopGroup newGroup, Runnable callback) { if (newGroup.equals(channel.eventLoop())) { return; } channel.deregister().addListener((ChannelFutureListener) future -> { <START> synchronized (channel) { <END> if (!channel.isRegistered()) { newGroup.register(channel).sync(); } } callback.run(); }); }</code><technical_language>I question if synchronization is correct. walk understand</technical_language>

Target:
public synchronized void changeChannelEventLoopGroup(EventLoopGroup newGroup, Runnable callback) { if (newGroup.equals(channel.eventLoop())) { callback.run(); return; } channel.deregister().addListener((ChannelFutureListener) future -> { synchronized (channel) { if (!channel.isRegistered()) { try { newGroup.register(channel).sync(); } catch (Exception e) { logger.warn("Unable to register new EventLoopGroup: {}", e.getMessage()); return; } } } callback.run(); }); }
Source:
<code>public void shouldThrowExceptionIfTypeMismatchesInQueryForObject() { <START> session.queryForObject(Restaurant.class, "MATCH (n:User) return count(n)", emptyMap()); <END> }</code><technical_language>suggestion assertThatExceptionOfType(MappingException.class) .isThrownBy(() -> session.queryForObject(Restaurant.class, "MATCH (n:User) return count(n)", emptyMap())) .withMessage("Cannot map java.lang.Long %s. This caused missing registration of %1$s.", Restaurant.class.getName());</technical_language>

Target:
public void shouldThrowExceptionIfTypeMismatchesInQueryForObject() { assertThatExceptionOfType(MappingException.class) .isThrownBy(() -> session.queryForObject(Restaurant.class, "MATCH (n:User) return count(n)", emptyMap())) .withMessage("Cannot map java.lang.Long to %s. This can be caused by missing registration of %1$s.", Restaurant.class.getName()); }
Source:
<code><START> private ObjectStream getPrologRules() throws IOException{ <END> Repository git = gitMgr.openRepository(getProject().getNameKey()); try { ObjectId config = getConfig().getRevision(); ObjectId rules = git.resolve(config.getName() + ":rules.pl"); if (rules == null) { return null; } ObjectLoader ldr = git.open(rules); if (ldr.getType() != Constants.OBJ_BLOB) { return null; } return ldr.openStream(); } finally { git.close(); } }</code><technical_language>Style-nit: space exception name {</technical_language>

Target:
private String getPrologRules() throws RepositoryNotFoundException { Repository git = gitMgr.openRepository(getProject().getNameKey()); ProjectConfig config = getConfig(); if (config == null) { return null; } return config.getPrologRules(); }
Source:
<code>public static void validateConfiguration(Configuration conf) throws IOException { ConfigurationUtil.getMandatoryConfig(conf, REQUIRED_KEYS); <START> getJobProjectId(conf); <END> getTableSchema(conf); getFileFormat(conf); getFileOutputFormat(conf); getGcsOutputPath(conf); }</code><technical_language>Do want check getProjectId() getJobProjectId() here</technical_language>

Target:
public static void validateConfiguration(Configuration conf) throws IOException { ConfigurationUtil.getMandatoryConfig(conf, REQUIRED_KEYS); getProjectId(conf); getJobProjectId(conf); getTableSchema(conf); getFileFormat(conf); getFileOutputFormat(conf); getGcsOutputPath(conf); }
Source:
<code>public GraphiteMetrics readMetrics(String... metrics) { try { GraphiteMetrics response = new GraphiteMetrics(); queryGraphite(metrics).stream().forEach(metric -> response.addMetricValue(metric.getTarget(), getFirstValue(metric))); return response; } catch (GraphiteConnectionException exception) { <START> logger.warn("Unable to read from Graphite", exception.getMessage()); <END> return GraphiteMetrics.unavailable(metrics); } }</code><technical_language>do remove stacktrace information logs? GraphiteConnectionException messages informative, e.g. "Error connecting Graphite". cause: timeout, corrupted data, host unreachable else</technical_language>

Target:
public GraphiteMetrics readMetrics(String... metrics) { try { GraphiteMetrics response = new GraphiteMetrics(); queryGraphite(metrics).stream().forEach(metric -> response.addMetricValue(metric.getTarget(), getFirstValue(metric))); return response; } catch (Exception exception) { logger.warn("Unable to read from Graphite. {}", getRootCause(exception).getMessage()); return GraphiteMetrics.unavailable(metrics); } }
Source:
<code>protected void done() { List<BlackboardArtifact> listOfArtifacts = new ArrayList<>(); if (!isCancelled()) { try { listOfArtifacts.addAll(get()); } catch (InterruptedException | ExecutionException ex) { logger.log(Level.SEVERE, "Exception while trying to get list of artifacts for Domain details for artifact type: " + artifactType.getDisplayName() + " and domain: " + domain, ex); <START> } <END> } DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.ArtifactListRetrievedEvent(artifactType, listOfArtifacts)); }</code><technical_language>If task is cancelled conditional starts line 66, get a CancellationException. I caught (and logged) Swing if catch ourselves. I add a catch clause for CancellationException (we ignore actual exception) log cleaner</technical_language>

Target:
protected void done() { List<BlackboardArtifact> listOfArtifacts = new ArrayList<>(); if (!isCancelled()) { try { listOfArtifacts.addAll(get()); } catch (InterruptedException | ExecutionException ex) { logger.log(Level.SEVERE, "Exception while trying to get list of artifacts for Domain details for artifact type: " + artifactType.getDisplayName() + " and domain: " + domain, ex); } catch (CancellationException ignored) { } } DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.ArtifactSearchResultEvent(artifactType, listOfArtifacts)); }
Source:
<code>public void testGetDDMFromLocationLat() { String ddm = UIUtils.getDDMFromLocation(getTargetContext(),24.15346, "lat"); <START> assertEquals("N 24° 9.208", ddm); <END> }</code><technical_language>N 24 09.208 please</technical_language>

Target:
public void testGetDDMFromLocationLat() { String ddm = UIUtils.getDDMFromLocation(getTargetContext(),24.15346, "lat"); assertEquals("N\t\u200724° 09.208", ddm); }
Source:
<code>public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) { <START> return size; <END> } size = 0; for (int i = 0; i < location_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, location_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }</code><technical_language>4 spaces</technical_language>

Target:
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; for (int i = 0; i < location_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, location_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
Source:
<code>private PerfData test(int characters) { PerfData ret = new PerfData(); String a = DiffTestDataGenerator.generateSequence(characters, 971, 3); String b = DiffTestDataGenerator.generateSequence(characters, 1621, 5); CharArray ac = toCharArray(a); CharArray bc = toCharArray(b); long millis = System.currentTimeMillis(); MyersDiff myersDiff = new MyersDiff(ac, bc); millis = System.currentTimeMillis() - millis; ret.t = millis; ret.N = (ac.size() + bc.size()); ret.D = myersDiff.getEdits().size(); <START> return (ret); <END> }</code><technical_language>Style-nit: Unnecessary parens</technical_language>

Target:
private PerfData test(int characters) { PerfData ret = new PerfData(); String a = DiffTestDataGenerator.generateSequence(characters, 971, 3); String b = DiffTestDataGenerator.generateSequence(characters, 1621, 5); CharArray ac = new CharArray(a); CharArray bc = new CharArray(b); MyersDiff myersDiff = null; int cpuTimeChanges = 0; long lastReadout = 0; long interimTime = 0; int repetitions = 0; stopwatch.start(); while (cpuTimeChanges < minCPUTimerTicks && interimTime < longTaskBoundary) { myersDiff = new MyersDiff(ac, bc); repetitions++; interimTime = stopwatch.readout(); if (interimTime != lastReadout) { cpuTimeChanges++; lastReadout = interimTime; } } ret.runningTime = stopwatch.stop() / repetitions; ret.N = (ac.size() + bc.size()); ret.D = myersDiff.getEdits().size(); return ret; }
Source:
<code>public static void addBiome(BiomeType type, BiomeEntry entry) { <START> if (!isModded) isModded = true; <END> getListOfType(type).add(entry); }</code><technical_language>a theoretical question Out of curiosity isModded=true; if (!isModded) isModded = true; 1 read var 2 if var = true jump 4 3 else set var = true 4 etc... 1. set var = true</technical_language>

Target:
public static void addBiome(BiomeType type, BiomeEntry entry) { isModded = true; int idx = type.ordinal(); List<BiomeEntry> list = idx > biomes.length ? null : biomes[idx]; if (list != null) list.add(entry); }
Source:
<code>public RqLengthAware(final Request req) { super( <START> new RqOf( <END> req::head, () -> RqLengthAware.cap(req) ) ); }</code><technical_language>@fanifieiev above</technical_language>

Target:
public RqLengthAware(final Request req) { super(new RequestOf(req::head, () -> RqLengthAware.cap(req))); }
Source:
<code><START> public void grabEncodersFromRegistry(EncoderRegistry encoderRegistry, EncodingClasses encodingClasses) { <END> this.keyEncoder = encoderRegistry.getEncoder(encodingClasses.getKeyEncoderClass()); this.valueEncoder = encoderRegistry.getEncoder(encodingClasses.getValueEncoderClass()); this.keyWrapper = encoderRegistry.getWrapper(encodingClasses.getKeyWrapperClass()); this.valueWrapper = encoderRegistry.getWrapper(encodingClasses.getValueWrapperClass()); }</code><technical_language>this a static method fields final..</technical_language>

Target:
public static CacheEncoders grabEncodersFromRegistry(EncoderRegistry encoderRegistry, EncodingClasses encodingClasses) { CacheEncoders cacheEncoders = new CacheEncoders(encoderRegistry.getEncoder(encodingClasses.getKeyEncoderClass()), encoderRegistry.getWrapper(encodingClasses.getKeyWrapperClass()), encoderRegistry.getEncoder(encodingClasses.getValueEncoderClass()), encoderRegistry.getWrapper(encodingClasses.getValueWrapperClass()) ); return cacheEncoders; }