auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public boolean notifyClientRequest(boolean keepAlive) { final long now = System.currentTimeMillis(); <START> if (!getWebApp().getConfiguration().isTimerKeepAlive()) { <END> final int tmout = getMaxInactiveInterval(); if (tmout >= 0 && (now - _tmLastReq) / 1000 > tmout) { invalidate(); return true; } } if (keepAlive) { _tmLastReq = now; } return false; }</code><technical_language>!getWebApp().getConfiguration().isTimerKeepAlive() || !keepAlive isTimerKeepAlive = true, session invalidated</technical_language>

Target:
public boolean notifyClientRequest(boolean keepAlive) { final long now = System.currentTimeMillis(); if (!getWebApp().getConfiguration().isTimerKeepAlive() || !keepAlive) { final int tmout = getMaxInactiveInterval(); if (tmout >= 0 && (now - _tmLastReq) / 1000 > tmout) { invalidate(); return true; } } if (keepAlive) { _tmLastReq = now; } return false; }
Source:
<code>public int compile(final OutputStream out, final OutputStream errors, final String outputPath, final String toCompile, final String classpath) { <START> return BatchCompiler.compile(new String[] { "-classpath", classpath, "-d", outputPath, "-source", "1.7", toCompile }, <END> new PrintWriter(out), new PrintWriter(errors), new CompilationProgress() { @Override public void begin(final int remainingWork) { } @Override public void done() { } @Override public boolean isCanceled() { return false; } @Override public void setTaskName(final String name) { } @Override public void worked(final int workIncrement, final int remainingWork) { } }) ? 0 : -1; }</code><technical_language>before, bump this "1.8"</technical_language>

Target:
public int compile(final OutputStream out, final OutputStream errors, final String outputPath, final String toCompile, final String classpath) { return BatchCompiler.compile(new String[] { "-classpath", classpath, "-d", outputPath, "-source", "1.8", toCompile }, new PrintWriter(out), new PrintWriter(errors), new CompilationProgress() { @Override public void begin(final int remainingWork) { } @Override public void done() { } @Override public boolean isCanceled() { return false; } @Override public void setTaskName(final String name) { } @Override public void worked(final int workIncrement, final int remainingWork) { } }) ? 0 : -1; }
Source:
<code>public synchronized void reqSent(Long requestId) { Long timestamp = System.currentTimeMillis(); <START> requestSent.put(requestId, timestamp); <END> }</code><technical_language>synchronize(FastSyncManager.this) { }</technical_language>

Target:
public void reqSent(Long requestId) { synchronized (FastSyncManager.this) { Long timestamp = System.currentTimeMillis(); requestSent.put(requestId, timestamp); } }
Source:
<code>public String getEventDescription() { <START> return "Attempting to migrate VM Id: " + getVirtualMachineId() + " to host Id: " + getHostId(); <END> }</code><technical_language>other if statement executed this is MigrateVMCmd, migrating a VM host another (i.e. storage migration)</technical_language>

Target:
public String getEventDescription() { String eventDescription; if (getHostId() != null) { eventDescription = String.format("Attempting to migrate VM id: %s to host Id: %s", getVirtualMachineId(), getHostId()); } else if (getStoragePoolId() != null) { eventDescription = String.format("Attempting to migrate VM id: %s to storage pool Id: %s", getVirtualMachineId(), getStoragePoolId()); } else { eventDescription = String.format("Attempting to migrate VM id: %s", getVirtualMachineId()); } return eventDescription; }
Source:
<code>public String getAnswerString() { String listString = answers.toString(); if (answers.get(0) == -1) { listString = "Invalid response"; <START> return listString; <END> } return listString.substring(1, listString.length()-1); }</code><technical_language>if change this return "Invalid response";</technical_language>

Target:
public String getAnswerString() { String listString = answers.toString(); return listString.substring(1, listString.length()-1); }
Source:
<code>public final Response getTerms(@QueryParam("start_index") final String startIndex, @QueryParam("limit") final String limit) { Map<Map.Entry<BooleanOperator, String>, List<String>> fieldsToMatch = Maps.newHashMap(); fieldsToMatch.put(immutableEntry(BooleanOperator.AND, TYPE_FIELDNAME), Collections.singletonList("glossaryTerm")); ResultsWrapper<ContentDTO> c; try { Integer resultsLimit = null; Integer startIndexOfResults = null; if (null != limit) { resultsLimit = Integer.parseInt(limit); } else { resultsLimit = DEFAULT_RESULTS_LIMIT; } if (null != startIndex) { startIndexOfResults = Integer.parseInt(startIndex); } else { startIndexOfResults = 0; } c = this.contentManager.findByFieldNames(this.contentIndex, fieldsToMatch, startIndexOfResults, resultsLimit); <START> return Response.ok(c).build(); <END> } catch (NumberFormatException e) { return new SegueErrorResponse(Status.BAD_REQUEST, "Unable to convert one of the integer parameters provided into numbers. " + "Params provided were: limit" + DEFAULT_RESULTS_LIMIT + " and startIndex " + 0, e).toResponse(); } catch (ContentManagerException e) { return new SegueErrorResponse(Status.INTERNAL_SERVER_ERROR, "Content acquisition error.", e).toResponse(); } }</code><technical_language>worth adding etag cache for this endpoint if is hit times change content version changes</technical_language>

Target:
public final Response getTerms(@QueryParam("start_index") final String startIndex, @QueryParam("limit") final String limit) { Map<Map.Entry<BooleanOperator, String>, List<String>> fieldsToMatch = Maps.newHashMap(); fieldsToMatch.put(immutableEntry(BooleanOperator.AND, TYPE_FIELDNAME), Collections.singletonList("glossaryTerm")); ResultsWrapper<ContentDTO> c; try { Integer resultsLimit = null; Integer startIndexOfResults = null; if (null != limit) { resultsLimit = Integer.parseInt(limit); } else { resultsLimit = DEFAULT_RESULTS_LIMIT; } if (null != startIndex) { startIndexOfResults = Integer.parseInt(startIndex); } else { startIndexOfResults = 0; } c = this.contentManager.findByFieldNames(this.contentIndex, fieldsToMatch, startIndexOfResults, resultsLimit); } catch (ContentManagerException e) { return new SegueErrorResponse(Status.INTERNAL_SERVER_ERROR, "Content acquisition error.", e).toResponse(); } EntityTag etag = new EntityTag(this.contentManager.getCurrentContentSHA().hashCode() + ""); return Response.ok(c).tag(etag).build(); }
Source:
<code>public void testWithSideRatioNotTooSmall4D() { double[] from = new double[] {0, 0, 0, 0}; double[] to = new double[] {1, 1, 1, 1}; Envelope envelope = new Envelope( from, to ).withSideRatioNotTooSmall(); double[] expectedFrom = new double[] {0, 0, 0, 0}; double[] expectedTo = new double[] {1, 1, 1, 1}; assertArrayEquals( expectedFrom, envelope.min , 0); assertArrayEquals( expectedTo, envelope.max, 0 ); to = new double[] {100, 0.1, 12, 0.01}; Envelope envelope2 = new Envelope( from, to ).withSideRatioNotTooSmall(); <START> double[] expectedTo2 = new double[] {100, 1, 12, 1}; <END> assertArrayEquals( expectedFrom, envelope2.min , 0); assertArrayEquals( expectedTo2, envelope2.max, 0.00001 ); }</code><technical_language>In this test changed values expected 1, due highest diff 100. test some other well</technical_language>

Target:
public void testWithSideRatioNotTooSmall4D() { double[] from = new double[] {0, 0, 0, 0}; double[] to = new double[] {1, 1, 1, 1}; Envelope envelope = new Envelope( from, to ).withSideRatioNotTooSmall(); double[] expectedFrom = new double[] {0, 0, 0, 0}; double[] expectedTo = new double[] {1, 1, 1, 1}; assertArrayEquals( expectedFrom, envelope.min , 0); assertArrayEquals( expectedTo, envelope.max, 0 ); final double bigValue = 107; final double smallValue = 0.00000000000000000123; to = new double[] {bigValue, smallValue, 12, smallValue * 0.1}; Envelope envelope2 = new Envelope( from, to ).withSideRatioNotTooSmall(); double[] expectedTo2 = new double[] {bigValue, bigValue / Envelope.MAXIMAL_ENVELOPE_SIDE_RATIO, 12, bigValue / Envelope.MAXIMAL_ENVELOPE_SIDE_RATIO}; assertArrayEquals( expectedFrom, envelope2.min , 0); assertArrayEquals( expectedTo2, envelope2.max, 0.00001 ); }
Source:
<code>public int run() throws IOException { int b = in.read(); if (b != -1) { dOut.write(b); size++; return 1; } else { dOut.close(); LongObjectId loid = LongObjectId .fromRaw(dOut.getMessageDigest().digest()); Path mediaFile = lfsUtil.getMediaFile(loid); if (Files.isRegularFile(mediaFile)) { long fsSize = Files.size(mediaFile); if (fsSize != size) { throw new CorruptMediaFile(mediaFile, size, fsSize); } } else { FileUtils.mkdirs(mediaFile.getParent().toFile(), true); FileUtils.rename(tmpFile.toFile(), mediaFile.toFile()); } LfsPointer lfsPointer = new LfsPointer(loid, size); lfsPointer.encode(out); out.close(); return -1; } <START> } <END></code><technical_language>this is leaking tmpFile if exception occurs</technical_language>

Target:
public int run() throws IOException { try { int b = in.read(); if (b != -1) { dOut.write(b); size++; return 1; } else { dOut.close(); tmpOut.close(); LongObjectId loid = LongObjectId .fromRaw(dOut.getMessageDigest().digest()); Path mediaFile = lfsUtil.getMediaFile(loid); if (Files.isRegularFile(mediaFile)) { long fsSize = Files.size(mediaFile); if (fsSize != size) { throw new CorruptMediaFile(mediaFile, size, fsSize); } } else { FileUtils.mkdirs(mediaFile.getParent().toFile(), true); FileUtils.rename(tmpFile.toFile(), mediaFile.toFile()); } LfsPointer lfsPointer = new LfsPointer(loid, size); lfsPointer.encode(out); out.close(); return -1; } } catch (IOException e) { out.close(); dOut.close(); tmpOut.close(); throw e; } }
Source:
<code>public List<Exception> getErrors() { List<Exception> errors = new ArrayList<Exception>(); if (causes == null) { return errors; } for (Throwable cause : causes) { <START> if (cause instanceof Exception) { <END> errors.add((Exception) cause); } } return errors; }</code><technical_language>wrap other throwables in a RuntimeException here? throw a new RuntimeException? inadvisable ignore error. this AggregateException causes</technical_language>

Target:
public List<Exception> getErrors() { List<Exception> errors = new ArrayList<Exception>(); if (causes == null) { return errors; } for (Throwable cause : causes) { if (cause instanceof Exception) { errors.add((Exception) cause); } else { errors.add(new Exception(cause)); } } return errors; }
Source:
<code>public void onResume() { super.onResume(); disposable = remoteBackupsDataCache.restoreBackup(backupMetadata, overwrite) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(success -> { if (success != null && success) { Toast.makeText(getActivity(), R.string.toast_import_complete, Toast.LENGTH_LONG).show(); for (final Table table : database.getTables()) { table.clearCache(); } tripTableController.get(); getActivity().finishAffinity(); } else { Toast.makeText(getActivity(), getString(R.string.IMPORT_ERROR), Toast.LENGTH_LONG).show(); } }, throwable -> { analytics.record(new ErrorEvent(ImportRemoteBackupWorkerProgressDialogFragment.this, throwable)); <START> if (throwable.getMessage().contains("More than five missing files")) { <END> Toast.makeText(getActivity(), getString(R.string.IMPORT_MISSING_ERROR), Toast.LENGTH_LONG).show(); } else { Toast.makeText(getActivity(), getString(R.string.IMPORT_ERROR), Toast.LENGTH_LONG).show(); } remoteBackupsDataCache.removeCachedRestoreBackupFor(backupMetadata); dismiss(); }, () -> { remoteBackupsDataCache.removeCachedRestoreBackupFor(backupMetadata); dismiss(); }); }</code><technical_language>For this, change check exception type (and return a exception for cases). This version sustainable (if change messaging)</technical_language>

Target:
public void onResume() { super.onResume(); disposable = remoteBackupsDataCache.restoreBackup(backupMetadata, overwrite) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(success -> { if (success != null && success) { Toast.makeText(getActivity(), R.string.toast_import_complete, Toast.LENGTH_LONG).show(); for (final Table table : database.getTables()) { table.clearCache(); } tripTableController.get(); getActivity().finishAffinity(); } else { Toast.makeText(getActivity(), getString(R.string.IMPORT_ERROR), Toast.LENGTH_LONG).show(); } }, throwable -> { analytics.record(new ErrorEvent(ImportRemoteBackupWorkerProgressDialogFragment.this, throwable)); if (throwable instanceof MissingFilesException) { Toast.makeText(getActivity(), getString(R.string.IMPORT_MISSING_ERROR), Toast.LENGTH_LONG).show(); } else { Toast.makeText(getActivity(), getString(R.string.IMPORT_ERROR), Toast.LENGTH_LONG).show(); } remoteBackupsDataCache.removeCachedRestoreBackupFor(backupMetadata); dismiss(); }, () -> { remoteBackupsDataCache.removeCachedRestoreBackupFor(backupMetadata); dismiss(); }); }
Source:
<code><START> private static boolean objectsEqual(String object1, String object2) { <END> if (object1 == null && object2 == null) { return true; } return object1.equals(object2); }</code><technical_language>java.util.Objects.equals(Object a, Object b)</technical_language>

Target:
private static boolean objectsEqual(String object1, String object2) { return object1 != null ? object1.equals(object2) : object2 == null; }
Source:
<code>public PluginInfo upsert(@Nonnull PluginInfo pluginInfo) { validate(pluginInfo); try { PluginInfo currentPluginInfo = repository.findById(pluginInfo.getId()); List<PluginInfo.Release> newReleases = new ArrayList<>(pluginInfo.getReleases()); List<PluginInfo.Release> oldReleases = new ArrayList<>(currentPluginInfo.getReleases()); new ArrayList<>(newReleases) .forEach( release -> { oldReleases.removeIf( oldRelease -> oldRelease.getVersion().equals(release.getVersion())); }); List<PluginInfo.Release> allReleases = new ArrayList<>(); Stream.of(oldReleases, newReleases).forEach(allReleases::addAll); <START> pluginInfo.setReleases(allReleases); <END> repository.update(pluginInfo.getId(), pluginInfo); return pluginInfo; } catch (NotFoundException e) { return repository.create(pluginInfo.getId(), pluginInfo); } }</code><technical_language>want allow updating previous releases - in mind immutable: want update release point a new artifact, for example. upsert operation add new releases existing releases list? If update a previous release, expected error. Happy wrong, here, though</technical_language>

Target:
public PluginInfo upsert(@Nonnull PluginInfo pluginInfo) { validate(pluginInfo); try { PluginInfo currentPluginInfo = repository.findById(pluginInfo.getId()); List<PluginInfo.Release> newReleases = new ArrayList<>(pluginInfo.getReleases()); List<PluginInfo.Release> oldReleases = new ArrayList<>(currentPluginInfo.getReleases()); newReleases.forEach( release -> { if (oldReleases.stream() .anyMatch(oldRelease -> oldRelease.getVersion().equals(release.getVersion()))) { throw new InvalidRequestException( "Cannot update an existing release: " + release.getVersion()); } }); List<PluginInfo.Release> allReleases = new ArrayList<>(); Stream.of(oldReleases, newReleases).forEach(allReleases::addAll); pluginInfo.setReleases(allReleases); repository.update(pluginInfo.getId(), pluginInfo); return pluginInfo; } catch (NotFoundException e) { return repository.create(pluginInfo.getId(), pluginInfo); } }
Source:
<code>public void bulkScans(Blackhole blackhole) throws IOException { <START> String rowPrefix = getRowPrefix(jobConfig.cellsPerRow, jobConfig.cellSize); <END> Scan scan = new Scan().setMaxVersions(1).setRowPrefixFilter(Bytes.toBytes(rowPrefix)); ResultScanner resScanner = connection.getTable(jobConfig.tableName).getScanner(scan); for (Result result = resScanner.next(); result != null; result = resScanner.next()) { for (Cell cell : result.rawCells()) { blackhole.consume(cell); } } }</code><technical_language>I row keys need related shape...each dataShape table</technical_language>

Target:
public void bulkScans(Blackhole blackhole) throws IOException { Scan scan = new Scan().setMaxVersions(1).setRowPrefixFilter(Bytes.toBytes(READ_ROW_PREFIX)); ResultScanner resScanner = table.getScanner(scan); for (Result result = resScanner.next(); result != null; result = resScanner.next()) { for (Cell cell : result.rawCells()) { blackhole.consume(cell); } } }
Source:
<code>public void testBlockingLocalPartitionReleaseDoesNotBlockTaskExecutor() throws Exception { BlockerSync sync = new BlockerSync(); ResultPartitionManager blockingResultPartitionManager = new ResultPartitionManager() { @Override public void releasePartition(ResultPartitionID partitionId, Throwable cause) { sync.blockNonInterruptible(); super.releasePartition(partitionId, cause); } }; NettyShuffleEnvironment shuffleEnvironment = new NettyShuffleEnvironmentBuilder() .setResultPartitionManager(blockingResultPartitionManager) <START> .setIoExecutor(java.util.concurrent.Executors.newFixedThreadPool(1)) <END> .build(); final CompletableFuture<ResultPartitionID> startTrackingFuture = new CompletableFuture<>(); final TaskExecutorPartitionTracker partitionTracker = new TaskExecutorPartitionTrackerImpl(shuffleEnvironment) { @Override public void startTrackingPartition(JobID producingJobId, TaskExecutorPartitionInfo partitionInfo) { super.startTrackingPartition(producingJobId, partitionInfo); startTrackingFuture.complete(partitionInfo.getResultPartitionId()); } }; internalTestPartitionRelease( partitionTracker, shuffleEnvironment, startTrackingFuture, (jobId, resultPartitionDeploymentDescriptor, taskExecutor, taskExecutorGateway) -> { final IntermediateDataSetID dataSetId = resultPartitionDeploymentDescriptor.getResultId(); taskExecutorGateway.releaseClusterPartitions(Collections.singleton(dataSetId), timeout); taskExecutorGateway.canBeReleased().get(5, TimeUnit.SECONDS); } ); }</code><technical_language>I suggest shut this executor service end of test. necessary unblock release operation for this</technical_language>

Target:
public void testBlockingLocalPartitionReleaseDoesNotBlockTaskExecutor() throws Exception { BlockerSync sync = new BlockerSync(); ResultPartitionManager blockingResultPartitionManager = new ResultPartitionManager() { @Override public void releasePartition(ResultPartitionID partitionId, Throwable cause) { sync.blockNonInterruptible(); super.releasePartition(partitionId, cause); } }; NettyShuffleEnvironment shuffleEnvironment = new NettyShuffleEnvironmentBuilder() .setResultPartitionManager(blockingResultPartitionManager) .setIoExecutor(TEST_EXECUTOR_SERVICE_RESOURCE.getExecutor()) .build(); final CompletableFuture<ResultPartitionID> startTrackingFuture = new CompletableFuture<>(); final TaskExecutorPartitionTracker partitionTracker = new TaskExecutorPartitionTrackerImpl(shuffleEnvironment) { @Override public void startTrackingPartition(JobID producingJobId, TaskExecutorPartitionInfo partitionInfo) { super.startTrackingPartition(producingJobId, partitionInfo); startTrackingFuture.complete(partitionInfo.getResultPartitionId()); } }; try { internalTestPartitionRelease( partitionTracker, shuffleEnvironment, startTrackingFuture, (jobId, resultPartitionDeploymentDescriptor, taskExecutor, taskExecutorGateway) -> { final IntermediateDataSetID dataSetId = resultPartitionDeploymentDescriptor.getResultId(); taskExecutorGateway.releaseClusterPartitions(Collections.singleton(dataSetId), timeout); taskExecutorGateway.canBeReleased().get(5, TimeUnit.SECONDS); } ); } finally { sync.releaseBlocker(); } }
Source:
<code>public void testListing() throws DDFException { List<String> files = manager.listFiles("/usr"); <START> LOG.info("========== files =========="); <END> for (String file: files) { LOG.info(file); } }</code><technical_language>assertions instead of log? this is for debugging. E.g: number of files == X > 0</technical_language>

Target:
public void testListing() throws DDFException { List<String> files = manager.listFiles("/test_pe"); assert (files.size() > 0); }
Source:
<code>private static boolean isSetter(ASTMethodDeclaration node, Map<String, String> fieldNames) { <START> if (node.getFirstDescendantOfType(ASTFormalParameters.class).jjtGetNumChildren() == 0) { <END> return false; } List<ASTStatementExpression> statementExpressions = node.getBlock().findDescendantsOfType(ASTStatementExpression.class); Set<String> namesToCheck = new HashSet<>(); for (ASTStatementExpression st : statementExpressions) { ASTName name = st.getFirstDescendantOfType(ASTName.class); if (name == null) { ASTPrimaryExpression prim = st.getFirstChildOfType(ASTPrimaryExpression.class); ASTPrimaryPrefix prefix = prim.getFirstChildOfType(ASTPrimaryPrefix.class); if (prefix.usesThisModifier() || prefix.usesSuperModifier()) { namesToCheck.add(prim.getFirstChildOfType(ASTPrimarySuffix.class).getImage()); } else { namesToCheck.add(prefix.getImage().split("\\.")[0]); } } else { namesToCheck.add(name.getImage().split("\\.")[0]); } } for (String name : namesToCheck) { if (fieldNames.containsKey(name)) { return true; } } return false; }</code><technical_language>!= 1 - a typical setter parameter..</technical_language>

Target:
private static boolean isSetter(ASTMethodDeclaration node, Map<String, String> fieldNames) { if (node.getFirstDescendantOfType(ASTFormalParameters.class).jjtGetNumChildren() != 1) { return false; } List<ASTStatementExpression> statementExpressions = node.getBlock().findDescendantsOfType(ASTStatementExpression.class); Set<String> namesToCheck = new HashSet<>(); for (ASTStatementExpression st : statementExpressions) { ASTName name = st.getFirstDescendantOfType(ASTName.class); if (name == null) { ASTPrimaryExpression prim = st.getFirstChildOfType(ASTPrimaryExpression.class); ASTPrimaryPrefix prefix = prim.getFirstChildOfType(ASTPrimaryPrefix.class); if (prefix.usesThisModifier() || prefix.usesSuperModifier()) { namesToCheck.add(prim.getFirstChildOfType(ASTPrimarySuffix.class).getImage()); } else { namesToCheck.add(prefix.getImage().split("\\.")[0]); } } else { namesToCheck.add(name.getImage().split("\\.")[0]); } } for (String name : namesToCheck) { if (fieldNames.containsKey(name)) { return true; } } return false; }
Source:
<code>public void shouldRaiseAlertWhenSensitiveInfoInReferer() throws HttpMalformedHeaderException, URIException { <START> String testReferer = "<LINK_0>"; <END> HttpMessage msg = createHttpMessageWithRespBody(testReferer); rule.scanHttpRequestSend(msg, -1); assertEquals(1, alertsRaised.size()); }</code><technical_language>other example domain (e.g. example.org)</technical_language>

Target:
public void shouldRaiseAlertWhenSensitiveInfoInReferer() throws HttpMalformedHeaderException, URIException { String sensitiveParamName = "passWord"; String sensitiveValue = "whatsup"; String testReferer = "<LINK_1>"; HttpMessage msg = createHttpMessageWithRespBody(testReferer); rule.scanHttpRequestSend(msg, -1); assertEquals(1, alertsRaised.size()); assertEquals(sensitiveParamName, alertsRaised.get(0).getEvidence()); assertEquals( Constant.messages.getString( InformationDisclosureReferrerScanner.MESSAGE_PREFIX + "otherinfo.sensitiveinfo"), alertsRaised.get(0).getOtherInfo()); }
Source:
<code><START> public static Pair<Integer, Integer> getPrecisionAndScale(String type) { <END> String param = type.substring(8, type.length() - 1); String[] params = param.split(","); return new Pair<>(Integer.parseInt(params[0].trim()), Integer.parseInt(params[1].trim())); }</code><technical_language>some unit tests for this? this handle extraneous whitespaces well</technical_language>

Target:
public static Pair<Integer, Integer> getPrecisionAndScale(String type) { type = type.trim(); String param = type.substring(8, type.length() - 1); String[] params = param.split(","); return new Pair<>(Integer.parseInt(params[0].trim()), Integer.parseInt(params[1].trim())); }
Source:
<code>public void putObjectWithSync() throws Exception { <START> assumeThat(Util.getBlackPearlVersion(client), greaterThan(3.0)); <END> final String bucketName = "test_put_object"; try { Util.createBucket(client, bucketName); final Arguments args = new Arguments(new String[]{"--http", "-c", "put_object", "-b", bucketName, "-o", Utils.getFileName(Paths.get("."), Paths.get(Util.RESOURCE_BASE_NAME + "beowulf.txt")), "--sync"}); CommandResponse response = Util.command(client, args); assertThat(response.getMessage(), is("Success: Finished syncing file to ds3 appliance.")); response = Util.command(client, args); assertThat(response.getMessage(), is("Success: No need to sync src/test/resources/books/beowulf.txt")); } finally { Util.deleteBucket(client, bucketName); } }</code><technical_language>this test run bp >= 3.0. greaterThan check for equal</technical_language>

Target:
public void putObjectWithSync() throws Exception { assumeThat(Util.getBlackPearlVersion(client), greaterThan(1.2)); final String bucketName = "test_put_object"; try { Util.createBucket(client, bucketName); final Arguments args = new Arguments(new String[]{"--http", "-c", "put_object", "-b", bucketName, "-o", Utils.getFileName(Paths.get("."), Paths.get(Util.RESOURCE_BASE_NAME + "beowulf.txt")), "--sync"}); CommandResponse response = Util.command(client, args); assertThat(response.getMessage(), is("Success: Finished syncing file to ds3 appliance.")); response = Util.command(client, args); assertThat(response.getMessage(), is("Success: No need to sync src/test/resources/books/beowulf.txt")); } finally { Util.deleteBucket(client, bucketName); } }
Source:
<code>public void pass_headers_Test() throws Exception { respondWith(JSON_USERS); KeystoneToken token = new KeystoneToken(); Map headersMap = new HashMap(); <START> headersMap.put("X-Project-Name","admin"); <END> headersMap.put("X-Project-Domain-Id","default"); Config config = Config.newConfig(); token.setEndpoint(authURL("/v3")); OSClient.OSClientV3 osClient = OSFactory.clientFromToken(token, config).headers(headersMap); osClient.identity().users().list(); RecordedRequest request = server.takeRequest(); System.out.println("request.getHeader(\"X-Project-Name\"):" + request.getHeader("X-Project-Name")); assertEquals("admin1111", request.getHeader("X-Project-Name")); assertEquals("default1111", request.getHeader("X-Project-Domain-Id")); }</code><technical_language>please refer other test case, define variables for constant string for "admin"</technical_language>

Target:
public void pass_headers_Test() throws Exception { respondWith(JSON_USERS); Map header = new HashMap(); String key = "X-Domain-Id"; String value = "default"; header.put(key, value); KeystoneToken token = new KeystoneToken(); token.setEndpoint(authURL("/v3")); OSClient.OSClientV3 osClient = OSFactory.clientFromToken(token).headers(header); osClient.identity().users().list(); RecordedRequest request = server.takeRequest(); assertEquals(request.getHeader(key), value); }
Source:
<code>private void activate() { for (ExtensionEntry entry : loadedEntries.values()) { entry.enabled = EngineLocalConfig.getInstance().getBoolean( "ENGINE_EXTENSION_ENABLE_" + entry.getName(), entry.enabled ); if (entry.enabled) { try { entry.extension = (Extension) lookupService( Extension.class, entry.getConfig().getProperty(CLASS), entry.getConfig().getProperty(MODULE) ).newInstance(); entry.extension.setContext(entry.context); entry.extension.init(); activatedEntries.put(entry.getName(), entry); MultiValueMapUtils.addToMap(entry.getProvides(), entry, providesEntries); } catch (Exception ex) { log.error( String.format( "Error in activating extension %1$s. Exception message is %2$s", entry.getName(), ex.getMessage() ) ); if (log.isDebugEnabled()) { log.error("", ex); } } } } <START> log.info("Activated extensions list: "); <END> for (ExtensionEntry entry: loadedEntries.values()) { if (entry.extension != null) { log.info( String.format( "Name: %1$s Author %2$s Version %3$s Home: %4$s License: %5$s", emptyIfNull(entry.extension.getContext().get(ExtensionProperties.EXTENSION_NAME)), emptyIfNull(entry.extension.getContext().get(ExtensionProperties.AUTHOR)), emptyIfNull(entry.extension.getContext().get(ExtensionProperties.VERSION)), emptyIfNull(entry.extension.getContext().get(ExtensionProperties.HOME)), emptyIfNull(entry.extension.getContext().get(ExtensionProperties.LICENSE)) ) ); } } log.info("End of activated extensions list"); }</code><technical_language>I moved function..</technical_language>

Target:
private void activate() { EngineLocalConfig config = EngineLocalConfig.getInstance(); for (ExtensionEntry entry : loadedEntries.values()) { entry.enabled = config.getBoolean(ENGINE_EXTENSION_ENABLED + entry.getName(), entry.enabled); if (entry.enabled) { try { entry.extension = (Extension) lookupService( Extension.class, entry.getConfig().getProperty(CLASS), entry.getConfig().getProperty(MODULE) ).newInstance(); entry.extension.setContext(entry.context); entry.extension.init(); activatedEntries.put(entry.getName(), entry); MultiValueMapUtils.addToMap(entry.getProvides(), entry, providesEntries); } catch (Exception ex) { log.error( String.format( "Error in activating extension %1$s. Exception message is %2$s", entry.getName(), ex.getMessage() ) ); if (log.isDebugEnabled()) { log.error("", ex); } } } } logEnabledExtensions(); }
Source:
<code>public static String getLogFileName() { <START> ApexRollingFileAppender apexAppender = (ApexRollingFileAppender)LogManager.getRootLogger().getAppender( <END> APEX_APPENDER); return apexAppender == null ? null : apexAppender.getCurrentFileName(); }</code><technical_language>this throw ClassCastException</technical_language>

Target:
public static String getLogFileName() { Appender appender = LogManager.getRootLogger().getAppender(APEX_APPENDER); if (appender != null && appender instanceof LogLocationProvider) { LogLocationProvider apexAppender = (LogLocationProvider)appender; return apexAppender.getCurrentFileName(); } return null; }
Source:
<code>private Logger getLogger() { <START> return LoggerFactory.getLogger(this.getClass()); <END> }</code><technical_language>suggestion return LoggerFactory.getLogger(FrontendAnnotatedClassVisitor.class);</technical_language>

Target:
private Logger getLogger() { return LoggerFactory.getLogger(FrontendAnnotatedClassVisitor.class); }
Source:
<code>public boolean isCinderDomain() { return this == CINDER <START> || this == MANAGED_BLOCK_STORAGE; <END> }</code><technical_language>do want correlate cinder managed block storage</technical_language>

Target:
public boolean isCinderDomain() { return this == CINDER; }
Source:
<code><START> public void forceInsert_sameRevisionTwice() throws Exception { <END> final String sql = "SELECT docs.docid, revid from revs join docs on revs.doc_id == docs.doc_id where docs.docid = ? and revs.revid = ? "; final DocumentRevision rev = createDbObject("1-rev", bodyOne); datastore.forceInsert(rev, "1-rev"); Assert.assertThat(datastore.getDocumentCount(), is(1)); try { datastore.forceInsert(rev, "1-rev"); } finally { datastore.runOnDbQueue(new SQLQueueCallable<Void>() { @Override public Void call(SQLDatabase db) throws Exception { Cursor cursor = null; try { cursor = db.rawQuery(sql, new String[]{rev.getId(), "1-rev"}); int resultscount = 0; while (cursor.moveToNext()) { resultscount++; } Assert.assertThat(resultscount, is(1)); } finally { DatabaseUtils.closeCursorQuietly(cursor); } return null; } }).get(); } }</code><technical_language>Check events get published correctly</technical_language>

Target:
public void forceInsert_sameRevisionTwice() throws Exception { DocumentRevision rev = createDbObject("1-rev", bodyOne); EventSubscriber eventSubscriber = new EventSubscriber(); datastore.getEventBus().register(eventSubscriber); datastore.forceInsert(rev, "1-rev"); Assert.assertThat(datastore.getDocumentCount(), is(1)); Assert.assertThat(eventSubscriber.eventCount, is(1)); datastore.forceInsert(rev, "1-rev"); }
Source:
<code>public Association getAssociation(AssociationKey key, AssociationContext associationContext) { String table = key.getTable(); Table tableMetadata = provider.getMetaDataCache().get( key.getTable() ); List<Column> tablePKCols = (List<Column>) tableMetadata.getPrimaryKey().getColumns(); Select select = select().all().from( quote( key.getTable() ) ); Select.Where selectWhere = select.where( eq( quote( key.getColumnNames()[0] ), QueryBuilder.bindMarker() ) ); for ( int i = 1; i < key.getColumnNames().length; i++ ) { selectWhere = selectWhere.and( eq( quote( key.getColumnNames()[i] ), QueryBuilder.bindMarker() ) ); } <START> boolean requiredFiltering = false; <END> for ( Column column : tablePKCols ) { String name = column.getName(); boolean foundColumn = false; for ( int i = 0; i < key.getColumnNames().length; i++ ) { if ( name.equals( key.getColumnNames()[i] ) ) { foundColumn = true; break; } } if ( !foundColumn ) { requiredFiltering = true; break; } } if ( requiredFiltering ) { select.allowFiltering(); } Object[] columnValues = key.getColumnValues(); ResultSet resultSet = bindAndExecute( columnValues, select ); if ( resultSet.isExhausted() ) { return null; } Association association = new Association( new ResultSetAssociationSnapshot( key, resultSet, provider.getMetaDataCache() .get( table ), protocolVersion ) ); return association; }</code><technical_language>is "requiredFiltering" about</technical_language>

Target:
public Association getAssociation(AssociationKey key, AssociationContext associationContext) { String table = key.getTable(); Table tableMetadata = provider.getMetaDataCache().get( key.getTable() ); List<Column> tablePKCols = (List<Column>) tableMetadata.getPrimaryKey().getColumns(); Select select = select().all().from( quote( key.getTable() ) ); Select.Where selectWhere = select.where( eq( quote( key.getColumnNames()[0] ), QueryBuilder.bindMarker() ) ); for ( int i = 1; i < key.getColumnNames().length; i++ ) { selectWhere = selectWhere.and( eq( quote( key.getColumnNames()[i] ), QueryBuilder.bindMarker() ) ); } boolean requiredFiltering = false; for ( Column column : tablePKCols ) { String name = column.getName(); boolean foundColumn = false; for ( int i = 0; i < key.getColumnNames().length; i++ ) { if ( name.equals( key.getColumnNames()[i] ) ) { foundColumn = true; break; } } if ( !foundColumn ) { requiredFiltering = true; break; } } if ( requiredFiltering ) { select.allowFiltering(); } Object[] columnValues = key.getColumnValues(); ResultSet resultSet = bindAndExecute( columnValues, select ); if ( resultSet.isExhausted() ) { return null; } Association association = new Association( new ResultSetAssociationSnapshot( key, resultSet, tableMetadata, protocolVersion ) ); return association; }
Source:
<code><START> static public void say(@ParamDoc(name = "text") Object text) { <END> say(text.toString(), null); }</code><technical_language>change order of file, too</technical_language>

Target:
public static void say(@ParamDoc(name = "text") Object text) { say(text.toString(), null); }
Source:
<code>private int handleException(Exception e, Path sourcePath, Path targetPath, int currentRetry, UserGroupInformation proxyUser) { try { <START> LOG.warn("Checking if source path " + sourcePath + " is missing for exception ", e); <END> if (!checkIfPathExist(sourcePath, proxyUser)) { LOG.warn("Source path is missing. Ignoring exception."); return 0; } } catch (Exception ex) { LOG.warn("Source path missing check failed. ", ex); } if (!(e instanceof IOException)) { LOG.error("Unable to copy to {}", sourcePath, targetPath, e); setException(e); return ErrorMsg.getErrorMsg(e.getMessage()).getErrorCode(); } if (currentRetry <= MAX_COPY_RETRY) { LOG.warn("Unable to copy to {}", sourcePath, targetPath, e); } else { LOG.error("Unable to copy to {}", sourcePath, targetPath, e); setException(e); return ErrorMsg.REPL_FILE_SYSTEM_OPERATION_RETRY.getErrorCode(); } int sleepTime = FileUtils.getSleepTime(currentRetry); LOG.info("Sleep for " + sleepTime + " milliseconds before retry " + (currentRetry)); try { Thread.sleep(sleepTime); } catch (InterruptedException timerEx) { LOG.info("Sleep interrupted", timerEx.getMessage()); } try { if (proxyUser == null) { proxyUser = Utils.getUGI(); } FileSystem.closeAllForUGI(proxyUser); } catch (Exception ex) { LOG.warn("Unable to closeAllForUGI for user " + proxyUser, ex); } return ErrorMsg.getErrorMsg(e.getMessage()).getErrorCode(); }</code><technical_language>info debug</technical_language>

Target:
private int handleException(Exception e, Path sourcePath, Path targetPath, int currentRetry, UserGroupInformation proxyUser) { try { LOG.info("Checking if source path " + sourcePath + " is missing for exception ", e); if (!checkIfPathExist(sourcePath, proxyUser)) { LOG.info("Source path is missing. Ignoring exception."); return 0; } } catch (Exception ex) { LOG.warn("Source path missing check failed. ", ex); } if (!(e instanceof IOException)) { LOG.error("Unable to copy to {}", sourcePath, targetPath, e); setException(e); return ErrorMsg.getErrorMsg(e.getMessage()).getErrorCode(); } if (currentRetry <= MAX_COPY_RETRY) { LOG.warn("Unable to copy to {}", sourcePath, targetPath, e); } else { LOG.error("Unable to copy to even after retrying for time", sourcePath, targetPath, currentRetry, e); setException(e); return ErrorMsg.REPL_FILE_SYSTEM_OPERATION_RETRY.getErrorCode(); } int sleepTime = FileUtils.getSleepTime(currentRetry); LOG.info("Sleep for " + sleepTime + " milliseconds before retry no " + (currentRetry)); try { Thread.sleep(sleepTime); } catch (InterruptedException timerEx) { LOG.info("Sleep interrupted", timerEx.getMessage()); } try { if (proxyUser == null) { proxyUser = Utils.getUGI(); } FileSystem.closeAllForUGI(proxyUser); } catch (Exception ex) { LOG.warn("Unable to closeAllForUGI for user " + proxyUser, ex); } return ErrorMsg.getErrorMsg(e.getMessage()).getErrorCode(); }
Source:
<code>public void setValidationProvider(){ <START> validationProvider = new BeansXmlValidationProviderCDI11(); <END> requireBeansXML = false; prepareBeanXml("all", true); new WaitWhile(new JobIsRunning()); }</code><technical_language>question above. answer ;)</technical_language>

Target:
public void setValidationProvider(){ validationProvider = new BeansXmlValidationProviderCDI20(); requireBeansXML = false; prepareBeanXml("all", true); new WaitWhile(new JobIsRunning()); }
Source:
<code>private void readProxyConf() { String proxyHostString = StringUtils.isBlank(System.getenv("https_proxy")) ? System.getenv("HTTPS_PROXY") : System.getenv("https_proxy"); if (StringUtils.isBlank(proxyHostString)) { proxyHostString = StringUtils.isBlank(System.getenv("http_proxy")) ? System.getenv("HTTP_PROXY") : System.getenv("http_proxy"); } if (!StringUtils.isBlank(proxyHostString)) { URI uri = null; try { uri = new URI(proxyHostString); } catch (URISyntaxException e) { <START> LOG.error("Proxy uri doesn't follow correct syntax", e); <END> } if (uri != null) { PROXY_ON = true; proxyClient = HttpProxyClient.newInstance(uri); } } }</code><technical_language>warning instead of error</technical_language>

Target:
private void readProxyConf() { String proxyHostString = StringUtils.isBlank(System.getenv("https_proxy")) ? System.getenv("HTTPS_PROXY") : System.getenv("https_proxy"); if (StringUtils.isBlank(proxyHostString)) { proxyHostString = StringUtils.isBlank(System.getenv("http_proxy")) ? System.getenv("HTTP_PROXY") : System.getenv("http_proxy"); } if (!StringUtils.isBlank(proxyHostString)) { URI uri = null; try { uri = new URI(proxyHostString); } catch (URISyntaxException e) { LOG.warn("Proxy uri doesn't follow correct syntax", e); } if (uri != null) { PROXY_ON = true; proxyClient = HttpProxyClient.newInstance(uri); } } }
Source:
<code><START> protected Optional<Process> fetchStandbyProcess(String type, String tenantId) { <END> Process process = standbyProcessCache.get(type + "-" + tenantId); if (process != null) { return Optional.of(process); } process = elastic.select(Process.class) .eq(Process.STATE, ProcessState.STANDBY) .eq(Process.TENANT_ID, tenantId) .eq(Process.PROCESS_TYPE, type) .first() .orElse(null); return Optional.ofNullable(process); }</code><technical_language>this is internal API - @Nullable + plain return type sufficient</technical_language>

Target:
protected Process fetchStandbyProcess(String type, String tenantId) { Process process = standbyProcessCache.get(type + "-" + tenantId); if (process != null) { return process; } process = elastic.select(Process.class) .eq(Process.STATE, ProcessState.STANDBY) .eq(Process.TENANT_ID, tenantId) .eq(Process.PROCESS_TYPE, type) .first() .orElse(null); if (process != null) { standbyProcessCache.put(type + "-" + tenantId, process); } return process; }
Source:
<code>public int hashCode() { int result = _networkUuid != null ? _networkUuid.hashCode() : 0; result = 31 * result + (_nicFromDdUuid != null ? _nicFromDdUuid.hashCode() : 0); result = 31 * result + (_nicMacAddress != null ? _nicMacAddress.hashCode() : 0); result = 31 * result + (_nicIp4Address != null ? _nicIp4Address.hashCode() : 0); result = 31 * result + (_isL3Network ? 1 : 0); result = 31 * result + (_isSharedNetwork ? 1 : 0); result = 31 * result + (_vpcUuid != null ? _vpcUuid.hashCode() : 0); result = 31 * result + (_networksDomainUuid != null ? _networksDomainUuid.hashCode() : 0); result = 31 * result + (_vmInstanceName != null ? _vmInstanceName.hashCode() : 0); result = 31 * result + (_vmUuid != null ? _vmUuid.hashCode() : 0); result = 31 * result + (_isExpungingState ? 1 : 0); return result; <START> } <END></code><technical_language>Please implement toString() provide debugging state information for debugging purposes</technical_language>

Target:
public int hashCode() { int result = super.hashCode(); result = 31 * result + (_networkUuid != null ? _networkUuid.hashCode() : 0); result = 31 * result + (_nicFromDdUuid != null ? _nicFromDdUuid.hashCode() : 0); result = 31 * result + (_nicMacAddress != null ? _nicMacAddress.hashCode() : 0); result = 31 * result + (_nicIp4Address != null ? _nicIp4Address.hashCode() : 0); result = 31 * result + (_isL3Network ? 1 : 0); result = 31 * result + (_isSharedNetwork ? 1 : 0); result = 31 * result + (_vpcUuid != null ? _vpcUuid.hashCode() : 0); result = 31 * result + (_networksDomainUuid != null ? _networksDomainUuid.hashCode() : 0); result = 31 * result + (_vmInstanceName != null ? _vmInstanceName.hashCode() : 0); result = 31 * result + (_vmUuid != null ? _vmUuid.hashCode() : 0); result = 31 * result + (_isExpungingState ? 1 : 0); return result; }
Source:
<code>public ActionResult execute() { String courseId = getNonNullRequestParamValue(Const.ParamsNames.COURSE_ID); StudentAttributes student; String studentEmail = getRequestParamValue(Const.ParamsNames.STUDENT_EMAIL); if (studentEmail == null) { student = getUnregisteredStudent().orElseGet(() -> { if (userInfo == null) { return null; } return logic.getStudentForGoogleId(courseId, userInfo.id); }); } else { student = logic.getStudentForEmail(courseId, studentEmail); } if (student == null) { return new JsonResult(STUDENT_NOT_FOUND, HttpStatus.SC_NOT_FOUND); } StudentData studentData = new StudentData(student); <START> if (isBackdoor()) { <END> studentData.setKey(student.getKey()); } if (studentEmail == null) { studentData.hideInformationForStudent(); } return new JsonResult(studentData); }</code><technical_language>I instead of this, check for admin privilege</technical_language>

Target:
public ActionResult execute() { String courseId = getNonNullRequestParamValue(Const.ParamsNames.COURSE_ID); StudentAttributes student; String studentEmail = getRequestParamValue(Const.ParamsNames.STUDENT_EMAIL); if (studentEmail == null) { student = getUnregisteredStudent().orElseGet(() -> { if (userInfo == null) { return null; } return logic.getStudentForGoogleId(courseId, userInfo.id); }); } else { student = logic.getStudentForEmail(courseId, studentEmail); } if (student == null) { return new JsonResult(STUDENT_NOT_FOUND, HttpStatus.SC_NOT_FOUND); } StudentData studentData = new StudentData(student); if (userInfo != null && userInfo.isAdmin) { studentData.setKey(student.getKey()); } if (studentEmail == null) { studentData.hideInformationForStudent(); } return new JsonResult(studentData); }
Source:
<code>public void should_pass_if_actual_contains_only_expected_entries() throws Exception { <START> maps.assertContainsOnlyKeys(someInfo(), actual, "name", "color"); <END> }</code><technical_language>add maps.assertContainsOnlyKeys(someInfo(), actual, "color", "name"); check order matter</technical_language>

Target:
public void should_pass_if_actual_contains_only_expected_entries() throws Exception { maps.assertContainsOnlyKeys(someInfo(), actual, "color", "name"); }
Source:
<code>protected void createLoaders() { final Map loaders = getLoaders(); loaders.put( LockMode.NONE, createEntityLoader( LockMode.NONE ) ); <START> <END> noneLockLoader = createEntityLoader( LockMode.NONE ); readLockLoader = createEntityLoader( LockMode.READ ); loaders.put( "merge", new CascadeEntityLoader( this, CascadingActions.MERGE, getFactory() ) ); loaders.put( "refresh", new CascadeEntityLoader( this, CascadingActions.REFRESH, getFactory() ) ); }</code><technical_language>This is instance of entity loader for LockMode.NONE. Please move this line next line line 4118 reuse instance</technical_language>

Target:
protected void createLoaders() { noneLockLoader = createEntityLoader( LockMode.NONE ); readLockLoader = createEntityLoader( LockMode.READ ); final Map loaders = getLoaders(); loaders.put( "merge", new CascadeEntityLoader( this, CascadingActions.MERGE, getFactory() ) ); loaders.put( "refresh", new CascadeEntityLoader( this, CascadingActions.REFRESH, getFactory() ) ); }
Source:
<code>public RedisResponse executeCommand(Command command, ExecutionHandlerContext context) { String result; List<ByteArrayWrapper> commands = command.getProcessedCommandWrappers(); <START> if (containsTooManyParameters(commands)) { <END> throw new RedisParametersMismatchException(RedisConstants.ERROR_SYNTAX); } if (containsSectionParameter(commands)) { result = getSpecifiedSection(context, commands); } else { result = getAllSections(context); } return RedisResponse.bulkString(result); }</code><technical_language>I this replaced a constraint in RedisCommandType</technical_language>

Target:
public RedisResponse executeCommand(Command command, ExecutionHandlerContext context) { String result; List<ByteArrayWrapper> commands = command.getProcessedCommandWrappers(); if (containsSectionParameter(commands)) { result = getSpecifiedSection(context, commands); } else { result = getAllSections(context); } return RedisResponse.bulkString(result); }
Source:
<code>protected FileType doGetType() throws Exception { <START> return (this.stat == null) ? FileType.IMAGINARY : FileType.FILE_OR_FOLDER; <END> }</code><technical_language>extra (clutter) please</technical_language>

Target:
protected FileType doGetType() throws Exception { return this.stat == null ? FileType.IMAGINARY : FileType.FILE_OR_FOLDER; }
Source:
<code>private void interpolateElevationsOfTowerNodes() { final AllEdgesIterator edge = storage.getAllEdges(); final GHBitSet visitedEdgeIds = new GHBitSetImpl(edge.getMaxId()); final EdgeExplorer edgeExplorer = storage.createEdgeExplorer(); while (edge.next()) { final int edgeId = edge.getEdge(); if(edgeId == 6){ System.out.println(6); <START> } <END> if (isInterpolatableEdge(edge)) { if (!visitedEdgeIds.contains(edgeId)) { interpolateEdge(edge, visitedEdgeIds, edgeExplorer); } } visitedEdgeIds.add(edgeId); } }</code><technical_language>Sorry, removed this :flushed:</technical_language>

Target:
private void interpolateElevationsOfTowerNodes() { final AllEdgesIterator edge = storage.getAllEdges(); final GHBitSet visitedEdgeIds = new GHBitSetImpl(edge.getMaxId()); final EdgeExplorer edgeExplorer = storage.createEdgeExplorer(); while (edge.next()) { final int edgeId = edge.getEdge(); if (isInterpolatableEdge(edge)) { if (!visitedEdgeIds.contains(edgeId)) { interpolateEdge(edge, visitedEdgeIds, edgeExplorer); } } visitedEdgeIds.add(edgeId); } }
Source:
<code><START> public Cursor getAddress(String rowId, String[] columns) { <END> String selection = "rowId = ?"; String[] selectionArgs = new String[]{rowId}; return query(selection, selectionArgs, columns); }</code><technical_language>final</technical_language>

Target:
public final Cursor getAddress(String rowId, String[] columns) { String selection = "rowId = ?"; String[] selectionArgs = new String[]{rowId}; return query(selection, selectionArgs, columns); }