auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private boolean useGridMenu(String menuId) { if(menuId == null) { menuId = org.commcare.suite.model.Menu.ROOT_MENU_ID; } if(DeveloperPreferences.isGridMenuEnabled()) { return true; } String commonDisplayStyle = platform.getMenuDisplayStyle(menuId); if("grid".equals(commonDisplayStyle)) { return true; } return false; <START> } <END></code><technical_language>replace conditional return "grid".equals(commonDisplayStyle); replace "grid" a constant defined in menu/style related class</technical_language>

Target:
private boolean useGridMenu(String menuId) { if(menuId == null) { menuId = org.commcare.suite.model.Menu.ROOT_MENU_ID; } if(DeveloperPreferences.isGridMenuEnabled()) { return true; } String commonDisplayStyle = platform.getMenuDisplayStyle(menuId); return MENU_STYLE_GRID.equals(commonDisplayStyle); }
Source:
<code>void handleBody(InputStream payload) throws IOException, MessageFormatException { if (!successfullyDeserialized) { BlobData blobData = MessageFormatRecord.deserializeBlob(payload); BlobType blobType = blobData.getBlobType(); chunkIndexToBuffer = new TreeMap<>(); if (blobType == BlobType.MetadataBlob) { ByteBuffer serializedMetadataContent = blobData.getStream().getByteBuffer(); CompositeBlobInfo compositeBlobInfo = MetadataContentSerDe.deserializeMetadataContentRecord(serializedMetadataContent, blobIdFactory); chunkSize = compositeBlobInfo.getChunkSize(); totalSize = compositeBlobInfo.getTotalSize(); try { List<StoreKey> keys = compositeBlobInfo.getKeys(); if (hasRange) { validatedByteRange = new ValidatedByteRange(options.getRange(), totalSize); firstChunkIndexInRange = (int) (validatedByteRange.getStartOffset() / chunkSize); int lastChunkIndexInByteRange = (int) (validatedByteRange.getEndOffset() / chunkSize); keys = keys.subList(firstChunkIndexInRange, lastChunkIndexInByteRange + 1); } chunkIdIterator = keys.listIterator(); numChunksTotal = keys.size(); dataChunks = new GetChunk[Math.min(keys.size(), NonBlockingRouter.MAX_IN_MEM_CHUNKS)]; for (int i = 0; i < dataChunks.length; i++) { dataChunks[i] = new GetChunk(chunkIdIterator.nextIndex(), (BlobId) chunkIdIterator.next()); } } catch (InvalidByteRangeException e) { onInvalidRange(e.getMessage()); } } else { totalSize = blobData.getSize(); try { if (hasRange) { validatedByteRange = new ValidatedByteRange(options.getRange(), totalSize); } chunkIdIterator = null; dataChunks = null; chunkIndex = 0; numChunksTotal = 1; chunkIndexToBuffer.put(0, filterChunkToRange(blobData)); numChunksRetrieved = 1; } catch (InvalidByteRangeException e) { <START> onInvalidRange(e.getMessage()); <END> } } successfullyDeserialized = true; state = ChunkState.Complete; } else { } }</code><technical_language>need throw Exception, catch handle invalid case. do calling this function soon detect a bad range (which do if get rid of ValidatedByteRange)? Instead of creating exception, throwing handling it</technical_language>

Target:
void handleBody(InputStream payload) throws IOException, MessageFormatException { if (!successfullyDeserialized) { BlobData blobData = MessageFormatRecord.deserializeBlob(payload); BlobType blobType = blobData.getBlobType(); chunkIndexToBuffer = new TreeMap<>(); if (blobType == BlobType.MetadataBlob) { handleMetadataBlob(blobData); } else { handleSimpleBlob(blobData); } successfullyDeserialized = true; state = ChunkState.Complete; } else { } }
Source:
<code>private HandlerRegistration addListener() { <START> final JavaScriptObject functor = addEventListener(callback_, monitoredElement_); <END> return new HandlerRegistration() { public void removeHandler() { invokeFunctor(functor); } }; }</code><technical_language>nit: This is a plain JavaScript function object a functor</technical_language>

Target:
private HandlerRegistration addListener() { final JavaScriptObject function = addEventListener(callback_, monitoredElement_); return new HandlerRegistration() { public void removeHandler() { invokeJavaScriptFunction(function); } }; }
Source:
<code>public void close() { super.close(); try { ipfs.getClient().close(); } catch (IOException e) { <START> LOG.info("Couldn't successfully close the ipfsClient"); <END> } executorService.shutdown(); }</code><technical_language>good practice propagate throwables logs everywhere, LOG.info("Couldn't successfully close ipfsClient", e)</technical_language>

Target:
public void close() { super.close(); try { ipfs.getClient().close(); } catch (IOException e) { LOG.info("Couldn't successfully close the ipfsClient", e); } executorService.shutdown(); }
Source:
<code>protected Mono<VirtualNetworkGatewayInner> createInner() { final VirtualNetworkGatewayIPConfigurationImpl defaultIPConfig = ensureDefaultIPConfig(); final Mono<Resource> pipObservable; if (defaultIPConfig.publicIPAddressId() == null) { pipObservable = Utils .<PublicIPAddress>rootResource(ensureDefaultPipDefinition().createAsync().last()) .map( publicIPAddress -> { defaultIPConfig.withExistingPublicIPAddress(publicIPAddress); return publicIPAddress; }); } else { pipObservable = Mono.empty(); } final Mono<Resource> networkObservable; if (defaultIPConfig.subnetName() != null) { networkObservable = Mono.empty(); } else { <START> assert creatableNetwork != null; <END> networkObservable = Utils .<Network>rootResource(creatableNetwork.createAsync().last()) .map( network -> { defaultIPConfig.withExistingSubnet(network, GATEWAY_SUBNET); return network; }); } return Flux .merge(networkObservable, pipObservable) .last(Resource.DUMMY) .flatMap( resource -> VirtualNetworkGatewayImpl .this .manager() .inner() .virtualNetworkGateways() .createOrUpdateAsync(resourceGroupName(), name(), inner())); }</code><technical_language>check null, throw IllegalState if null</technical_language>

Target:
protected Mono<VirtualNetworkGatewayInner> createInner() { final VirtualNetworkGatewayIPConfigurationImpl defaultIPConfig = ensureDefaultIPConfig(); final Mono<Resource> pipObservable; if (defaultIPConfig.publicIPAddressId() == null) { pipObservable = Utils .<PublicIPAddress>rootResource(ensureDefaultPipDefinition().createAsync().last()) .map( publicIPAddress -> { defaultIPConfig.withExistingPublicIPAddress(publicIPAddress); return publicIPAddress; }); } else { pipObservable = Mono.empty(); } final Mono<Resource> networkObservable; if (defaultIPConfig.subnetName() != null) { networkObservable = Mono.empty(); } else if (creatableNetwork != null) { networkObservable = Utils .<Network>rootResource(creatableNetwork.createAsync().last()) .map( network -> { defaultIPConfig.withExistingSubnet(network, GATEWAY_SUBNET); return network; }); } else { throw logger.logExceptionAsError(new IllegalStateException("Creatable Network should not be null")); } return Flux .merge(networkObservable, pipObservable) .last(Resource.DUMMY) .flatMap( resource -> VirtualNetworkGatewayImpl .this .manager() .inner() .virtualNetworkGateways() .createOrUpdateAsync(resourceGroupName(), name(), inner())); }
Source:
<code>private static void validateCharacterVal( ReadableConfig tableOptions, ConfigOption<String> option) { if (tableOptions.getOptional(option).isPresent()) { if (tableOptions.get(option).length() != 1) { <START> throw new ValidationException(String.format("Option [%s.%s] must be a Character.", IDENTIFIER, option.key())); <END> } } }</code><technical_language>suggestion throw new ValidationException(String.format("Option '%s.%s' a single character, '%s'.", IDENTIFIER, option.key(), tableOptions.get(option))); 'csv.xxx' more align DDL options. character instead of Character this is in Java language</technical_language>

Target:
private static void validateCharacterVal( ReadableConfig tableOptions, ConfigOption<String> option) { if (tableOptions.getOptional(option).isPresent()) { if (tableOptions.get(option).length() != 1) { throw new ValidationException( String.format("Option '%s.%s' must be a string with single character, but was: %s", IDENTIFIER, option.key(), tableOptions.get(option))); } } }
Source:
<code>private static String executeProcess(final CliCommandBuilder commandBuilder, final boolean logFailure, final Map<String, String> env) { Process cliProc = null; try { cliProc = Launcher.of(commandBuilder) .addEnvironmentVariables(env) .launch(); } catch (IOException e) { fail("Failed to start CLI process: " + e.getLocalizedMessage()); } final ByteArrayOutputStream out = new ByteArrayOutputStream(); final ByteArrayOutputStream err = new ByteArrayOutputStream(); CustomCLIExecutor.ConsoleConsumer.start(cliProc.getInputStream(), out); CustomCLIExecutor.ConsoleConsumer.start(cliProc.getErrorStream(), err); boolean wait = true; int runningTime = 0; int exitCode = Integer.MIN_VALUE; try { boolean finished = cliProc.waitFor(CLI_PROC_TIMEOUT, TimeUnit.MILLISECONDS); if (finished) { exitCode = cliProc.exitValue(); } } catch (InterruptedException e1) { <START> new RuntimeException("Interupted while waiting", e1); <END> } finally { cliProc.destroy(); } final String cliOutput = out.toString(); if (logFailure && exitCode != 0) { LOGGER.info("Command's output: '" + cliOutput + "'"); if (err.size() > 0) { LOGGER.info("Command's error log: '" + err.toString() + "'"); } else { LOGGER.info("No output data for the command."); } } return exitCode + ": " + cliOutput; }</code><technical_language>Is this missing a throw</technical_language>

Target:
private static String executeProcess(final CliCommandBuilder commandBuilder, final boolean logFailure, final Map<String, String> env) { Process cliProc = null; try { cliProc = Launcher.of(commandBuilder) .addEnvironmentVariables(env) .launch(); } catch (IOException e) { fail("Failed to start CLI process: " + e.getLocalizedMessage()); } final ByteArrayOutputStream out = new ByteArrayOutputStream(); final ByteArrayOutputStream err = new ByteArrayOutputStream(); CustomCLIExecutor.ConsoleConsumer.start(cliProc.getInputStream(), out); CustomCLIExecutor.ConsoleConsumer.start(cliProc.getErrorStream(), err); int exitCode = Integer.MIN_VALUE; try { boolean finished = cliProc.waitFor(CLI_PROC_TIMEOUT, TimeUnit.MILLISECONDS); if (finished) { exitCode = cliProc.exitValue(); } else { LOGGER.info("A timeout has occurred while invoking CLI command."); } } catch (InterruptedException e1) { Assert.fail("Interupted while waiting. Error Message" + e1.getMessage()); } finally { cliProc.destroyForcibly(); } final String cliOutput = out.toString(); if (logFailure && exitCode != 0) { LOGGER.info("Command's output: '" + cliOutput + "'"); if (err.size() > 0) { LOGGER.info("Command's error log: '" + err.toString() + "'"); } else { LOGGER.info("No output data for the command."); } } return exitCode + ": " + cliOutput; }
Source:
<code>boolean update(RawPacket pkt) { boolean changed = false; int seqNum = pkt.getSequenceNumber(); byte[] buf = pkt.getBuffer(); int off = pkt.getOffset(), len = pkt.getLength(); MediaStreamImpl stream = rtpEncoding.getMediaStreamTrack() .getMediaStreamTrackReceiver().getStream(); boolean isSOF = stream.isStartOfFrame(buf, off, len); if (minSeen == -1 || RTPUtils.sequenceNumberDiff(minSeen, seqNum) > 0) { changed = true; <START> inOrder = isSOF; <END> minSeen = seqNum; } if (maxSeen == -1 || RTPUtils.sequenceNumberDiff(maxSeen, seqNum) < 0) { changed = true; maxSeen = seqNum; } if (end == -1 && stream.isEndOfFrame(buf, off, len)) { changed = true; end = seqNum; } if (start == -1 && isSOF) { changed = true; start = seqNum; independent = stream.isKeyFrame(buf, off, len); if (independent) { logger.debug("keyframe,stream=" + stream.hashCode() + " ssrc=" + rtpEncoding.getPrimarySSRC() + "," + toString()); } } return changed; }</code><technical_language>If I reading this correctly inOrder coincides start!=-1. Is this purpose? I get semantics of inOrder</technical_language>

Target:
boolean update(RawPacket pkt) { boolean changed = false; int seqNum = pkt.getSequenceNumber(); byte[] buf = pkt.getBuffer(); int off = pkt.getOffset(), len = pkt.getLength(); MediaStreamImpl stream = rtpEncoding.getMediaStreamTrack() .getMediaStreamTrackReceiver().getStream(); boolean isSOF = stream.isStartOfFrame(buf, off, len); if (sofInOrder == null) { sofInOrder = isSOF; } if (minSeen == -1 || RTPUtils.sequenceNumberDiff(minSeen, seqNum) > 0) { changed = true; minSeen = seqNum; } if (maxSeen == -1 || RTPUtils.sequenceNumberDiff(maxSeen, seqNum) < 0) { changed = true; maxSeen = seqNum; } if (end == -1 && stream.isEndOfFrame(buf, off, len)) { changed = true; end = seqNum; } if (start == -1 && isSOF) { changed = true; start = seqNum; independent = stream.isKeyFrame(buf, off, len); if (independent) { if (logger.isInfoEnabled()) { logger.info("keyframe,stream=" + stream.hashCode() + " ssrc=" + rtpEncoding.getPrimarySSRC() + "," + toString()); } } } return changed; }
Source:
<code>public <T extends TopLevelItem> T renameTo(final String newName) { open(); String oldName = name; <START> control(by.href("/job/" + oldName + "/confirm-rename")).click(); <END> WebElement renameButton = waitFor(by.button("Rename")); control(by.name("newName")).set(newName); renameButton.click(); try { return (T) newInstance(getClass(), injector, new URL(url.toExternalForm().replace(oldName, newName)), newName); } catch (MalformedURLException e) { throw new AssertionError("Not a valid url: " + newName, e); } }</code><technical_language>this link exist in Jenkins LTS</technical_language>

Target:
public <T extends TopLevelItem> T renameTo(final String newName) { String oldName = name; if (getJenkins().getVersion().isOlderThan(new VersionNumber("2.110"))) { configure(); control("/name").set(newName); save(); waitFor(by.button("Yes")).click(); } else { open(); control(by.href("/job/" + oldName + "/confirm-rename")).click(); WebElement renameButton = waitFor(by.button("Rename"), 5); control(by.name("newName")).set(newName); renameButton.click(); } try { return (T) newInstance(getClass(), injector, new URL(url.toExternalForm().replace(oldName, newName)), newName); } catch (MalformedURLException e) { throw new AssertionError("Not a valid url: " + newName, e); } }
Source:
<code>private static void checkRfsMatchConfig(KsDef ks, CassandraKeyValueServiceConfig config, Set<String> dcs, Map<String, String> strategyOptions) { <START> for (String dataCenter : dcs) { <END> if (Integer.parseInt(strategyOptions.get(dataCenter)) != config.replicationFactor()) { throw new UnsupportedOperationException("Your current Cassandra keyspace (" + ks.getName() + ") has a replication factor not matching your Atlas Cassandra configuration." + " Change them to match, but be mindful of what steps you'll need to" + " take to correctly repair or cleanup existing data in your cluster."); } } }</code><technical_language>This is a behaviour change (we check DCs instead of first) I sense</technical_language>

Target:
private static void checkRfsMatchConfig(KsDef ks, CassandraKeyValueServiceConfig config, Set<String> dcs, Map<String, String> strategyOptions) { for (String datacenter : dcs) { if (Integer.parseInt(strategyOptions.get(datacenter)) != config.replicationFactor()) { throw new UnsupportedOperationException("Your current Cassandra keyspace (" + ks.getName() + ") has a replication factor not matching your Atlas Cassandra configuration." + " Change them to match, but be mindful of what steps you'll need to" + " take to correctly repair or cleanup existing data in your cluster."); } } }
Source:
<code>public long getAgentUpdateExitTimeout() { <START> long value = m_preferences.getLong(AgentConfigurationConstants.AGENT_UPDATE_EXIT_TIMEOUT_MSECS, <END> AgentConfigurationConstants.DEFAULT_AGENT_UPDATE_EXIT_TIMEOUT_MSECS); return value; }</code><technical_language>is redundant, return right away</technical_language>

Target:
public long getAgentUpdateExitTimeout() { return m_preferences.getLong(AgentConfigurationConstants.AGENT_UPDATE_EXIT_TIMEOUT_MSECS, AgentConfigurationConstants.DEFAULT_AGENT_UPDATE_EXIT_TIMEOUT_MSECS); }
Source:
<code>public void testWaitForMemoryAvailable() throws Exception { final GlobalMemoryManager gmm = spy(new GlobalMemoryManager(100, 80)); final ChildMemoryManager rmm1 = new ChildMemoryManager(gmm,100); final ChildMemoryManager rmm2 = new ChildMemoryManager(gmm,100); final CountDownLatch latch = new CountDownLatch(2); Thread t1 = new Thread() { @Override public void run() { MemoryChunk c1 = rmm1.allocate(50); MemoryChunk c2 = rmm1.allocate(50); sleepFor(40); c1.close(); sleepFor(20); c2.close(); latch.countDown(); } }; Thread t2 = new Thread() { @Override public void run() { sleepFor(20); <START> Stopwatch watch = new Stopwatch().start(); <END> MemoryChunk c3 = rmm2.allocate(50); Mockito.verify(gmm, atLeastOnce()).waitForBytesToFree(anyLong(), anyLong()); c3.close(); latch.countDown(); } }; t2.start(); t1.start(); latch.await(1, TimeUnit.SECONDS); ChildMemoryManager rmm = new ChildMemoryManager(gmm,100); MemoryChunk c = rmm.allocate(100); c.close(); assertTrue(rmm.getAvailableMemory() == rmm.getMaxMemory()); assertTrue(rmm1.getAvailableMemory() == rmm1.getMaxMemory()); assertTrue(rmm2.getAvailableMemory() == rmm2.getMaxMemory()); }</code><technical_language>Actually, I this watch anywhere. phoenix eclipse preferences imported. This flagged unused variable warning</technical_language>

Target:
public void testWaitForMemoryAvailable() throws Exception { final GlobalMemoryManager gmm = spy(new GlobalMemoryManager(100, 80)); final ChildMemoryManager rmm1 = new ChildMemoryManager(gmm,100); final ChildMemoryManager rmm2 = new ChildMemoryManager(gmm,100); final CountDownLatch latch = new CountDownLatch(2); Thread t1 = new Thread() { @Override public void run() { MemoryChunk c1 = rmm1.allocate(50); MemoryChunk c2 = rmm1.allocate(50); sleepFor(40); c1.close(); sleepFor(20); c2.close(); latch.countDown(); } }; Thread t2 = new Thread() { @Override public void run() { sleepFor(20); MemoryChunk c3 = rmm2.allocate(50); Mockito.verify(gmm, atLeastOnce()).waitForBytesToFree(anyLong(), anyLong()); c3.close(); latch.countDown(); } }; t2.start(); t1.start(); latch.await(1, TimeUnit.SECONDS); ChildMemoryManager rmm = new ChildMemoryManager(gmm,100); MemoryChunk c = rmm.allocate(100); c.close(); assertTrue(rmm.getAvailableMemory() == rmm.getMaxMemory()); assertTrue(rmm1.getAvailableMemory() == rmm1.getMaxMemory()); assertTrue(rmm2.getAvailableMemory() == rmm2.getMaxMemory()); }
Source:
<code>public Map<String, Object> saveExistingQuestionGroups( @RequestBody QuestionGroupListPayload payLoad) { final Map<String, Object> response = new HashMap<String, Object>(); RestStatusDto statusDto = new RestStatusDto(); statusDto.setStatus("failed"); statusDto.setMessage("No question groups to change"); final List<QuestionGroupDto> requestList = payLoad.getQuestion_groups(); if (requestList != null && requestList.size() > 0) { for (final QuestionGroupDto questionGroupDto : requestList) { if (questionGroupDto != null) { Long keyId = questionGroupDto.getKeyId(); QuestionGroup qg; if (keyId != null) { qg = questionGroupDao.getByKey(keyId); if (qg != null) { BeanUtils.copyProperties(questionGroupDto, qg, new String[] {"createdDateTime", "status"}); <START> qg = questionGroupDao.save(qg); <END> } else { statusDto.setMessage("Cannot change unknown question group " + keyId); response.put("meta", statusDto); return response; } } else { statusDto.setMessage("Cannot change question group without id"); response.put("meta", statusDto); return response; } } } statusDto.setStatus("ok"); statusDto.setMessage(""); } response.put("meta", statusDto); return response; }</code><technical_language>BaseDAO.save(Collection) method do in batch</technical_language>

Target:
public Map<String, Object> saveExistingQuestionGroups( @RequestBody QuestionGroupListPayload payLoad) { final Map<String, Object> response = new HashMap<String, Object>(); RestStatusDto statusDto = new RestStatusDto(); statusDto.setStatus("failed"); statusDto.setMessage("No question groups to change"); List<QuestionGroup> saveList = new ArrayList<>(); final List<QuestionGroupDto> requestList = payLoad.getQuestion_groups(); if (requestList != null && requestList.size() > 0) { for (final QuestionGroupDto questionGroupDto : requestList) { if (questionGroupDto != null) { Long keyId = questionGroupDto.getKeyId(); QuestionGroup qg; if (keyId != null) { qg = questionGroupDao.getByKey(keyId); if (qg != null) { BeanUtils.copyProperties(questionGroupDto, qg, new String[] {"createdDateTime", "status"}); saveList.add(qg); } else { statusDto.setMessage("Cannot change unknown question group " + keyId); response.put("meta", statusDto); return response; } } else { statusDto.setMessage("Cannot change question group without id"); response.put("meta", statusDto); return response; } } } questionGroupDao.save(saveList); statusDto.setStatus("ok"); statusDto.setMessage(""); } response.put("meta", statusDto); return response; }
Source:
<code>private List<ConstraintViolation> validateListTypeField(Schema schema, List<PathNode> path, Field field, Object value) { assert field.getType().isListType(); List<ConstraintViolation> violations = new ArrayList<ConstraintViolation>(); Collection<?> castedValue = null; if (!field.isNillable() && value == null) { addNotNullViolation(violations, schema, path); } if (value instanceof List) { castedValue = (Collection<?>) value; } else if (value instanceof Object[]) { castedValue = Arrays.asList((Object[]) value); } if (castedValue != null) { <START> if (!field.isNillable() && castedValue.size() < 1) { <END> addNotNullViolation(violations, schema, path); } ListType listType = (ListType) field.getType(); Field listField = listType.getField(); int index = 0; for (Object item : castedValue) { List<PathNode> subPath = new ArrayList<PathNode>(path); subPath.add(new PathNode(listField, index)); violations.addAll(validateAnyTypeField(schema, subPath, listField, item, true)); index++; } return violations; } return violations; }</code><technical_language>isEmpty() .size() < 1</technical_language>

Target:
private List<ConstraintViolation> validateListTypeField(Schema schema, List<PathNode> path, Field field, Object value) { assert field.getType().isListType(); List<ConstraintViolation> violations = new ArrayList<ConstraintViolation>(); Collection<?> castedValue = null; if (!field.isNillable() && value == null) { addNotNullViolation(violations, schema, path); } if (value instanceof List) { castedValue = (Collection<?>) value; } else if (value instanceof Object[]) { castedValue = Arrays.asList((Object[]) value); } if (castedValue != null) { if (!field.isNillable() && castedValue.isEmpty()) { addNotNullViolation(violations, schema, path); } ListType listType = (ListType) field.getType(); Field listField = listType.getField(); int index = 0; for (Object item : castedValue) { List<PathNode> subPath = new ArrayList<PathNode>(path); subPath.add(new PathNode(listField, index)); violations.addAll(validateAnyTypeField(schema, subPath, listField, item, true)); index++; } return violations; } return violations; }
Source:
<code>private List<AlgorithmModel> filterInclusivelyByAllOrSpecificDataType(List<AlgorithmModel> algorithmModels, DataType dataType) { return (dataType == DataType.All) ? algorithmModels : algorithmModels.stream() .filter(e -> { for (DataType dt : e.getAlgorithm().getAnnotation().dataType()) { <START> if (!(dt == DataType.All || dt == dataType)) { <END> return false; } } return true; }) .collect(Collectors.toList()); }</code><technical_language>I logic in for loop is right. For algorithm handle continuous discrete data, if annotation continuous discrete, input data is discrete, this algorithm included. For example. @edu.cmu.tetrad.annotation.Algorithm( name = "GFCI", command = "gfci", algoType = AlgType.allow_latent_common_causes, dataType = {DataType.Continuous, DataType.Discrete, DataType.Mixed} ) GFCI show in algo chooser I some simulated discrete data, data type is continuous return false</technical_language>

Target:
private List<AlgorithmModel> filterInclusivelyByAllOrSpecificDataType(List<AlgorithmModel> algorithmModels, DataType dataType) { return (dataType == DataType.All) ? algorithmModels : algorithmModels.stream() .filter(e -> { for (DataType dt : e.getAlgorithm().getAnnotation().dataType()) { if (dt == DataType.All || dt == dataType) { return true; } } return false; }) .collect(Collectors.toList()); }
Source:
<code>public CustomizedStateProvider buildCustomizedStateProvider(String instanceName) { if (_helixManager == null) { throw new HelixException("Helix Manager has not been set yet."); <START> } else { <END> return buildCustomizedStateProvider(_helixManager, instanceName); } }</code><technical_language>Remove else clause</technical_language>

Target:
public CustomizedStateProvider buildCustomizedStateProvider(String instanceName) { if (_helixManager == null) { throw new HelixException("Helix Manager has not been set yet."); } return buildCustomizedStateProvider(_helixManager, instanceName); }
Source:
<code>public CompletableFuture<Collection<V>> get(K key) { assertRemoteCacheManagerIsStarted(); K compatKey = hasCompatibility() ? key : null; <START> byte[] marshallKey = MarshallerUtil.obj2bytes(marshaller, key, true, estimateKeySize, estimateValueSize); <END> GetKeyMultimapOperation<V> gco = operationsFactory.newGetKeyMultimapOperation(compatKey, marshallKey); return CompletableFuture.supplyAsync(() -> gco.execute()); }</code><technical_language>want trace messages for methods others</technical_language>

Target:
public CompletableFuture<Collection<V>> get(K key) { if (trace) { log.tracef("About to call get (K): (%s)", key); } assertRemoteCacheManagerIsStarted(); K compatKey = hasCompatibility() ? key : null; byte[] marshallKey = MarshallerUtil.obj2bytes(marshaller, key, true, estimateKeySize, estimateValueSize); GetKeyMultimapOperation<V> gco = operationsFactory.newGetKeyMultimapOperation(compatKey, marshallKey); return CompletableFuture.supplyAsync(() -> gco.execute()); }
Source:
<code>public void modifyMerchantRecipeList(MerchantRecipeList recipeList, Random random) { <START> ItemStack stack = trackKits.get(random.nextInt(trackKits.size())).getTrackKitItem(2); <END> if (stack == null) return; recipeList.add(new MerchantRecipe(stack, null, new ItemStack(Items.EMERALD, MathHelper.getRandomIntegerInRange(random, 1, 3)))); }</code><technical_language>This crash if trackKits.size() == 0, if is disabled</technical_language>

Target:
public void modifyMerchantRecipeList(MerchantRecipeList recipeList, Random random) { if (trackKits.size() == 0) return; ItemStack stack = trackKits.get(random.nextInt(trackKits.size())).getTrackKitItem(2); if (stack == null) return; recipeList.add(new MerchantRecipe(stack, null, new ItemStack(Items.EMERALD, MathHelper.getRandomIntegerInRange(random, 1, 3)))); }
Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_provider_management); ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { getSupportActionBar().setElevation(0); getSupportActionBar().setDisplayHomeAsUpEnabled(true); } providerManagerDashboardFragment = (ProviderManagerDashboardFragment) getSupportFragmentManager().findFragmentById(R.id.providerManagementContentFrame); if (providerManagerDashboardFragment == null) { providerManagerDashboardFragment = ProviderManagerDashboardFragment.newInstance(); } if (!providerManagerDashboardFragment.isActive()) { addFragmentToActivity(getSupportFragmentManager(), providerManagerDashboardFragment, R.id.providerManagementContentFrame); } if (savedInstanceState != null) { ProviderManagerDashboardPresenter mPresenter = new ProviderManagerDashboardPresenter(providerManagerDashboardFragment); } else { <START> ProviderManagerDashboardPresenter mPresenter = new ProviderManagerDashboardPresenter(providerManagerDashboardFragment); <END> } }</code><technical_language>Is mPresenter else in this class</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_provider_management); ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { getSupportActionBar().setElevation(0); getSupportActionBar().setDisplayHomeAsUpEnabled(true); } providerManagerDashboardFragment = (ProviderManagerDashboardFragment) getSupportFragmentManager().findFragmentById(R.id.providerManagementContentFrame); if (providerManagerDashboardFragment == null) { providerManagerDashboardFragment = ProviderManagerDashboardFragment.newInstance(); } if (!providerManagerDashboardFragment.isActive()) { addFragmentToActivity(getSupportFragmentManager(), providerManagerDashboardFragment, R.id.providerManagementContentFrame); } ProviderManagerDashboardPresenter mPresenter = new ProviderManagerDashboardPresenter(providerManagerDashboardFragment); }
Source:
<code>public List<String> getPrimaryKeyColumns() { <START> return new ArrayList<>(_primaryKeyColumns); <END> }</code><technical_language>(nit) need a copy of array (save garbage). guard callers modifying list is internal code</technical_language>

Target:
public List<String> getPrimaryKeyColumns() { return _primaryKeyColumns; }
Source:
<code>private void onRoutingTableUpdateMsg(final AvroElasticMemoryMessage msg) { <START> Trace.setProcessId("eval"); <END> try (final TraceScope onRoutingTableUpdateMsgScope = Trace.startSpan(ON_TABLE_UPDATE_MSG, HTraceUtils.fromAvro(msg.getTraceInfo()))) { final RoutingTableUpdateMsg routingTableUpdateMsg = msg.getRoutingTableUpdateMsg(); final List<Integer> blockIds = routingTableUpdateMsg.getBlockIds(); final int newOwnerId = getStoreId(routingTableUpdateMsg.getNewEvalId().toString()); final int oldOwnerId = getStoreId(routingTableUpdateMsg.getOldEvalId().toString()); LOG.log(Level.INFO, "Update routing table. [newOwner: {0}, oldOwner: {1}, blocks: {2}]", new Object[]{newOwnerId, oldOwnerId, blockIds}); for (final int blockId : blockIds) { router.updateOwnership(blockId, oldOwnerId, newOwnerId); } } }</code><technical_language>define eval a constant</technical_language>

Target:
private void onRoutingTableUpdateMsg(final AvroElasticMemoryMessage msg) { Trace.setProcessId("eval"); try (final TraceScope onRoutingTableUpdateMsgScope = Trace.startSpan("on_table_update_msg", HTraceUtils.fromAvro(msg.getTraceInfo()))) { final RoutingTableUpdateMsg routingTableUpdateMsg = msg.getRoutingTableUpdateMsg(); final List<Integer> blockIds = routingTableUpdateMsg.getBlockIds(); final int newOwnerId = getStoreId(routingTableUpdateMsg.getNewEvalId().toString()); final int oldOwnerId = getStoreId(routingTableUpdateMsg.getOldEvalId().toString()); LOG.log(Level.INFO, "Update routing table. [newOwner: {0}, oldOwner: {1}, blocks: {2}]", new Object[]{newOwnerId, oldOwnerId, blockIds}); for (final int blockId : blockIds) { router.updateOwnership(blockId, oldOwnerId, newOwnerId); } } }
Source:
<code>public SqlNode expandSelectExpr(SqlNode expr, SelectScope scope, SqlSelect select) { final Expander expander = new SelectExpander(this, scope, select); <START> SqlNode newExpr = expr.accept(expander); <END> if (expr != newExpr) { setOriginal(newExpr, expr); } return newExpr; }</code><technical_language>final</technical_language>

Target:
public SqlNode expandSelectExpr(SqlNode expr, SelectScope scope, SqlSelect select) { final Expander expander = new SelectExpander(this, scope, select); final SqlNode newExpr = expr.accept(expander); if (expr != newExpr) { setOriginal(newExpr, expr); } return newExpr; }
Source:
<code><START> public void setCurrentUrl( URL urlCurrent ) { <END> oldFeedSource.setCurrentUrl( urlCurrent ); newFeedSource.setCurrentUrl( urlCurrent ); }</code><technical_language>Hm... Migration feed is sense Archive URLs. methods no-op</technical_language>

Target:
public void setCurrentUrl( URL urlCurrent ) { }
Source:
<code>public void calculate() { final HuffmanTree<Integer> tree; { final int size = countMap.size(); final int[] frequencies = new int[size]; final int[] values = new int[size]; int i = 0; for (final Integer key : countMap.keySet()) { values[i] = key; frequencies[i] = countMap.get(key).value; i++; } tree = HuffmanCode.buildTree(frequencies, autobox(values)); } final List<Integer> valueList = new ArrayList<Integer>(); final List<Integer> lens = new ArrayList<Integer>(); HuffmanCode.getValuesAndBitLengths(valueList, lens, tree); final BitCode[] codes = new BitCode[valueList.size()]; for (int i = 0; i < valueList.size(); i++) { codes[i] = new BitCode(valueList.get(i), lens.get(i)); } Arrays.sort(codes); values = new int[codes.length]; bitLens = new int[codes.length]; for (int i = 0; i < codes.length; i++) { final BitCode code = codes[i]; <START> getBitLens()[i] = code.length; <END> getValues()[i] = code.value; } }</code><technical_language>I cleaner bitLens values here</technical_language>

Target:
public void calculate() { final HuffmanTree<Integer> tree; { final int size = countMap.size(); final int[] frequencies = new int[size]; final int[] values = new int[size]; int i = 0; for (final Integer key : countMap.keySet()) { values[i] = key; frequencies[i] = countMap.get(key).value; i++; } tree = HuffmanCode.buildTree(frequencies, autobox(values)); } final List<Integer> valueList = new ArrayList<Integer>(); final List<Integer> lens = new ArrayList<Integer>(); HuffmanCode.getValuesAndBitLengths(valueList, lens, tree); final BitCode[] codes = new BitCode[valueList.size()]; for (int i = 0; i < valueList.size(); i++) { codes[i] = new BitCode(valueList.get(i), lens.get(i)); } Arrays.sort(codes); values = new int[codes.length]; bitLens = new int[codes.length]; for (int i = 0; i < codes.length; i++) { final BitCode code = codes[i]; bitLens[i] = code.length; values[i] = code.value; } }
Source:
<code>private static CloudHealthcare createClient() throws IOException { GoogleCredential credential = GoogleCredential.getApplicationDefault(HTTP_TRANSPORT, JSON_FACTORY) .createScoped(Collections.singleton(CloudHealthcareScopes.CLOUD_PLATFORM)); HttpRequestInitializer requestInitializer = request -> { credential.initialize(request); <START> request.setConnectTimeout(60000); request.setReadTimeout(60000); END> }; return new CloudHealthcare.Builder(HTTP_TRANSPORT, JSON_FACTORY, requestInitializer) .setApplicationName("your-application-name") .build(); }</code><technical_language>1 * 60 * 1000 clearer</technical_language>

Target:
private static CloudHealthcare createClient() throws IOException { GoogleCredential credential = GoogleCredential.getApplicationDefault(HTTP_TRANSPORT, JSON_FACTORY) .createScoped(Collections.singleton(CloudHealthcareScopes.CLOUD_PLATFORM)); HttpRequestInitializer requestInitializer = request -> { credential.initialize(request); request.setConnectTimeout(1 * 60 * 1000); request.setReadTimeout(1 * 60 * 1000); }; return new CloudHealthcare.Builder(HTTP_TRANSPORT, JSON_FACTORY, requestInitializer) .setApplicationName("your-application-name") .build(); }
Source:
<code>public static <T> T adapt(Object sourceObject, Class<T> adapter, boolean allowActivation) { if (sourceObject == null) { return null; } if (adapter.isInstance(sourceObject)) { return (T) sourceObject; } if (sourceObject instanceof IAdaptable) { IAdaptable adaptable = (IAdaptable) sourceObject; Object result = adaptable.getAdapter(adapter); if (result != null) { if (!adapter.isInstance(result)) { throw new AssertionFailedException(adaptable.getClass().getName() + ".getAdapter(" + adapter.getName() + ".class) returned " + result.getClass().getName() + " that is not an instance of " + adapter.getName()); } return (T) result; } } if ((sourceObject instanceof PlatformObject) && !allowActivation) { return null; } String adapterId = adapter.getName(); Object result = queryAdapterManager(sourceObject, adapterId, allowActivation); if (result != null) { if (!adapter.isInstance(result)) { throw new AssertionFailedException(result.getClass().getName() + ", returned as an adapter for " + sourceObject.getClass().getName() + ", <START> is not <END> an instance of " + adapter.getName()); } return (T) result; } return null; }</code><technical_language>reword match wording of earlier change: ...an adapter for XXX is instance..</technical_language>

Target:
public static <T> T adapt(Object sourceObject, Class<T> adapter, boolean allowActivation) { if (sourceObject == null) { return null; } if (adapter.isInstance(sourceObject)) { return (T) sourceObject; } if (sourceObject instanceof IAdaptable) { IAdaptable adaptable = (IAdaptable) sourceObject; Object result = adaptable.getAdapter(adapter); if (result != null) { if (!adapter.isInstance(result)) { throw new AssertionFailedException(adaptable.getClass().getName() + ".getAdapter(" + adapter.getName() + ".class) returned " + result.getClass().getName() + " that is not an instance the requested type"); } return (T) result; } } if ((sourceObject instanceof PlatformObject) && !allowActivation) { return null; } String adapterId = adapter.getName(); Object result = queryAdapterManager(sourceObject, adapterId, allowActivation); if (result != null) { if (!adapter.isInstance(result)) { throw new AssertionFailedException(result.getClass().getName() + ", returned by the AdapterManager for " + sourceObject.getClass().getName() + ", is not an instance of " + adapter.getName()); } return (T) result; } return null; }
Source:
<code>private void refreshClusterHeavyWeightData(VDSGroup cluster) { VDS upServer = getClusterUtils().getRandomUpServer(cluster.getId()); if (upServer == null) { log.debug("No server UP in cluster '{}'. Can't refresh it's data at this point.", cluster.getName()); return; } for (GlusterVolumeEntity volume : getVolumeDao().getByClusterId(cluster.getId())) { log.debug("Refreshing brick statuses for volume '{}' of cluster '{}'", volume.getName(), cluster.getName()); if (volume.isOnline()) { acquireLock(cluster.getId()); try { refreshVolumeDetails(upServer, volume); } catch (Exception e) { log.error("Error while refreshing brick statuses for volume '{}' of cluster '{}': {}", volume.getName(), cluster.getName(), e.getMessage()); log.debug("Exception", e); } finally { releaseLock(cluster.getId()); } <START> disableCliSnapshotSchedulingFlag(cluster, volume); <END> } } }</code><technical_language>create Audit Log for 5 minute?</technical_language>

Target:
private void refreshClusterHeavyWeightData(VDSGroup cluster) { VDS upServer = getClusterUtils().getRandomUpServer(cluster.getId()); if (upServer == null) { log.debug("No server UP in cluster '{}'. Can't refresh it's data at this point.", cluster.getName()); return; } for (GlusterVolumeEntity volume : getVolumeDao().getByClusterId(cluster.getId())) { log.debug("Refreshing brick statuses for volume '{}' of cluster '{}'", volume.getName(), cluster.getName()); if (volume.isOnline()) { acquireLock(cluster.getId()); try { refreshVolumeDetails(upServer, volume); } catch (Exception e) { log.error("Error while refreshing brick statuses for volume '{}' of cluster '{}': {}", volume.getName(), cluster.getName(), e.getMessage()); log.debug("Exception", e); } finally { releaseLock(cluster.getId()); } runVdsCommand(VDSCommandType.OverrideGlusterVolumeSnapshotSchedule, new GlusterVolumeActionVDSParameters(upServer.getId(), volume.getName(), false)); } } }
Source:
<code>void deleteQueue() { String queueName = testResourceNamer.randomName("test", 7); QueueDescription description = new QueueDescription().setMaxDeliveryCount(15); CreateQueueBody createEntity = new CreateQueueBody(); CreateQueueBodyContent content = new CreateQueueBodyContent() .setType("application/xml") .setQueueDescription(description); createEntity.setContent(content); logger.info("Creating queue: {}", queueName); Response<Object> response = queuesClient.putWithResponseAsync(queueName, createEntity, null, Context.NONE) .block(timeout); <START> assertNotNull(response); <END> StepVerifier.create(queuesClient.deleteWithResponseAsync(queueName, Context.NONE)) .assertNext(deletedResponse -> assertEquals(200, deletedResponse.getStatusCode())) .verifyComplete(); }</code><technical_language><LINK_0></technical_language>

Target:
void deleteQueue() { String queueName = testResourceNamer.randomName("test", 7); QueueDescription description = new QueueDescription().setMaxDeliveryCount(15); CreateQueueBody createEntity = new CreateQueueBody(); CreateQueueBodyContent content = new CreateQueueBodyContent() .setType("application/xml") .setQueueDescription(description); createEntity.setContent(content); logger.info("Creating queue: {}", queueName); Response<Object> response = queuesClient.putWithResponseAsync(queueName, createEntity, null, Context.NONE) .block(timeout); assertNotNull(response); StepVerifier.create(queuesClient.deleteWithResponseAsync(queueName, Context.NONE)) .assertNext(deletedResponse -> { assertEquals(200, deletedResponse.getStatusCode()); }) .verifyComplete(); }
Source:
<code>private Map<Long, Boolean> getResultForPutList(final List<Long> inputKeys, final List<LongRange> failedKeyRanges) { final Map<Long, Boolean> resultMap = new HashMap<>(inputKeys.size()); if (failedKeyRanges.isEmpty()) { for (final long key : inputKeys) { resultMap.put(key, true); } return resultMap; } Collections.sort(failedKeyRanges, LongRangeUtils.LONG_RANGE_COMPARATOR); Collections.sort(inputKeys); final Iterator<LongRange> rangeIterator = failedKeyRanges.iterator(); <START> LongRange range = rangeIterator.next(); <END> int keyIdx; for (keyIdx = 0; keyIdx < inputKeys.size(); keyIdx++) { final long key = inputKeys.get(keyIdx); if (range.getMinimumLong() > key) { resultMap.put(key, false); continue; } if (range.getMaximumLong() < key) { if (rangeIterator.hasNext()) { range = rangeIterator.next(); keyIdx--; continue; } else { break; } } resultMap.put(key, true); } for (; keyIdx < inputKeys.size(); keyIdx++) { resultMap.put(inputKeys.get(keyIdx), false); } return resultMap; }</code><technical_language>assuming is range in failedKeyRanges. Is correct</technical_language>

Target:
private Map<Long, Boolean> getResultForPutList(final List<Long> inputKeys, final List<LongRange> failedKeyRanges) { final Map<Long, Boolean> resultMap = new HashMap<>(inputKeys.size()); if (failedKeyRanges.isEmpty()) { for (final long key : inputKeys) { resultMap.put(key, true); } return resultMap; } Collections.sort(failedKeyRanges, LongRangeUtils.LONG_RANGE_COMPARATOR); Collections.sort(inputKeys); final Iterator<LongRange> rangeIterator = failedKeyRanges.iterator(); LongRange range = rangeIterator.next(); int keyIdx; for (keyIdx = 0; keyIdx < inputKeys.size(); keyIdx++) { final long key = inputKeys.get(keyIdx); if (range.getMinimumLong() > key) { resultMap.put(key, true); continue; } if (range.getMaximumLong() < key) { if (rangeIterator.hasNext()) { range = rangeIterator.next(); keyIdx--; continue; } else { break; } } resultMap.put(key, false); } for (; keyIdx < inputKeys.size(); keyIdx++) { resultMap.put(inputKeys.get(keyIdx), true); } return resultMap; }
Source:
<code>public GlobalContext( FileSystem fs, boolean deterministicFunctions, GlobalOptions globalOptions, KRunOptions krunOptions, KExceptionManager kem, SMTOptions smtOptions, Map<String, MethodHandle> hookProvider, FileUtil files, Stage stage) { this.fs = fs; this.globalOptions = globalOptions; this.krunOptions = krunOptions; this.kem = kem; this.hookProvider = hookProvider; this.files = files; this.equalityOps = new EqualityOperations(() -> def); <START> this.constraintOps = new SMTOperations(() -> def, smtOptions, new Z3Wrapper(smtOptions, kem, globalOptions, files), globalOptions); <END> this.kItemOps = new KItemOperations(stage, deterministicFunctions, kem, this::builtins, globalOptions); this.stage = stage; }</code><technical_language>pass kem SMTOperations, globalOptions for else</technical_language>

Target:
public GlobalContext( FileSystem fs, boolean deterministicFunctions, GlobalOptions globalOptions, KRunOptions krunOptions, KExceptionManager kem, SMTOptions smtOptions, Map<String, MethodHandle> hookProvider, FileUtil files, Stage stage) { this.fs = fs; this.globalOptions = globalOptions; this.krunOptions = krunOptions; this.kem = kem; this.hookProvider = hookProvider; this.files = files; this.equalityOps = new EqualityOperations(() -> def); this.constraintOps = new SMTOperations(() -> def, smtOptions, new Z3Wrapper(smtOptions, kem, globalOptions, files), kem, globalOptions); this.kItemOps = new KItemOperations(stage, deterministicFunctions, kem, this::builtins, globalOptions); this.stage = stage; }
Source:
<code>public void tearDown() throws Throwable { <START> server.stop(); <END> server.shutdown(); }</code><technical_language>Check server != null tearing down</technical_language>

Target:
public void tearDown() throws Throwable { if ( server != null ) { server.stop(); server.shutdown(); } if ( channel != null ) { channel.close(); } }
Source:
<code>private static String getModules(Map<String, ModuleService> modules) { <START> StringBuilder sb = new StringBuilder("Available Modules:\n"); <END> for(ModuleService entry : modules.values()) { sb.append(String.format(" %-10s - %s", entry.getName(), entry.getDescription())); } return sb.toString(); }</code><technical_language>if %n in usage, consistent..</technical_language>

Target:
private static String getModules(Map<String, ModuleService> modules) { StringBuilder sb = new StringBuilder(String.format("Available Modules:%n")); for(ModuleService entry : modules.values()) { sb.append( String.format(" %-10s - %s", entry.getName(), entry.getDescription()) ); } return sb.toString(); }
Source:
<code>private List<PhdCandidacyPeriod> getCandidacyPeriods() { <START> List<PhdCandidacyPeriod> candidacyPeriodList = new ArrayList<>(); <END> CollectionUtils.select(Bennu.getInstance().getCandidacyPeriodsSet(), new Predicate() { @Override public boolean evaluate(Object arg0) { return arg0 instanceof PhdCandidacyPeriod; } }, candidacyPeriodList); return candidacyPeriodList; }</code><technical_language>this change is in scope of this issue</technical_language>

Target:
private List<PhdCandidacyPeriod> getCandidacyPeriods() { List<PhdCandidacyPeriod> candidacyPeriodList = new ArrayList<PhdCandidacyPeriod>(); CollectionUtils.select(Bennu.getInstance().getCandidacyPeriodsSet(), new Predicate() { @Override public boolean evaluate(Object arg0) { return arg0 instanceof PhdCandidacyPeriod; } }, candidacyPeriodList); return candidacyPeriodList; }
Source:
<code>public void initialise() { super.initialise(); playerCamera = worldRenderer.getActiveCamera(); <START> requireDynamicFBO(new FBOConfig(REFRACTIVE_REFLECTIVE_URN, 1.0f, FBO.Type.HDR).useNormalBuffer()); <END> }</code><technical_language>1.0f -> enum</technical_language>

Target:
public void initialise() { super.initialise(); playerCamera = worldRenderer.getActiveCamera(); requiresFBO(new FBOConfig(REFRACTIVE_REFLECTIVE, FULL_SCALE, FBO.Type.HDR).useNormalBuffer(), displayResolutionDependentFBOs); }
Source:
<code>public boolean writeGuestbookAndShowPreview(GuestbookResponse guestbookResponse) { <START> boolean valid = validateGuestbookResponse(guestbookResponse); <END> if (!valid) { return false; } else { guestbookResponse.setDownloadtype("Explore"); fileDownloadService.writeGuestbookResponseRecord(guestbookResponse); return true; } }</code><technical_language>validation is done in UI, I writing GB response</technical_language>

Target:
public boolean writeGuestbookAndShowPreview(GuestbookResponse guestbookResponse) { guestbookResponse.setDownloadtype("Explore"); fileDownloadService.writeGuestbookResponseRecord(guestbookResponse); return true; }
Source:
<code>public void theSetAlarmNotificationsRequestIsReceived() throws Throwable { <START> PROPERTIES_MAP.put(DEVICE_IDENTIFICATION_G_LABEL, this.deviceId.getDeviceIdG()); <END> PROPERTIES_MAP.put(ORGANISATION_IDENTIFICATION_LABEL, this.organisationId.getOrganisationId()); this.RequestRunner(PROPERTIES_MAP, TEST_CASE_NAME_REQUEST, TEST_CASE_XML, TEST_SUITE_XML); }</code><technical_language>SetAlarmNotifications tested E-meter DEVICE_IDENTIFICATION_G_LABEL -> DEVICE_IDENTIFICATION_E_LABEL getDeviceIdG -> getDeviceIdE</technical_language>

Target:
public void theSetAlarmNotificationsRequestIsReceived() throws Throwable { PROPERTIES_MAP.put(DEVICE_IDENTIFICATION_E_LABEL, this.deviceId.getDeviceIdE()); PROPERTIES_MAP.put(ORGANISATION_IDENTIFICATION_LABEL, this.organisationId.getOrganisationId()); this.RequestRunner(PROPERTIES_MAP, TEST_CASE_NAME_REQUEST, TEST_CASE_XML, TEST_SUITE_XML); }
Source:
<code>protected @NonNull Iterable<ITmfTrace> getTracesToBuild(@NonNull ITmfTrace trace) { <START> return NonNullUtils.checkNotNull(Arrays.asList(TmfTraceManager.getTraceSet(trace))); <END> }</code><technical_language>This code I wrote</technical_language>

Target:
protected @NonNull Iterable<ITmfTrace> getTracesToBuild(@NonNull ITmfTrace trace) { return checkNotNull(Arrays.asList(TmfTraceManager.getTraceSet(trace))); }