auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>void receiveMessage(Protos.TwoWayChannelMessage msg) throws InsufficientMoneyException; void connectionClosed(); void settle() throws IllegalStateException; void connectionOpen(); <START> ListenableFuture<Coin> incrementPayment(Coin size, ByteString info) throws ValueOutOfRangeException, IllegalStateException; <END> interface ClientConnection { void sendToServer(Protos.TwoWayChannelMessage msg); void destroyConnection(PaymentChannelCloseException.CloseReason reason); void channelOpen(boolean wasInitiated); }</code><technical_language>info parameter nullable</technical_language>

Target:
void receiveMessage(Protos.TwoWayChannelMessage msg) throws InsufficientMoneyException; void connectionClosed(); void settle() throws IllegalStateException; void connectionOpen(); ListenableFuture<Coin> incrementPayment(Coin size, @Nullable ByteString info) throws ValueOutOfRangeException, IllegalStateException; interface ClientConnection { void sendToServer(Protos.TwoWayChannelMessage msg); void destroyConnection(PaymentChannelCloseException.CloseReason reason); void channelOpen(boolean wasInitiated); }
Source:
<code>private boolean isThis(ExpressionTree expression) { <START> expression = (ExpressionUtils.skipParentheses(expression)); <END> if (expression.is(Tree.Kind.IDENTIFIER)) { String targetName = ((IdentifierTree) expression).name(); return "this".equals(targetName); } return false; }</code><technical_language>uncessary parenthesis is a nice practice reassign a parameter. Please declare a local var work with</technical_language>

Target:
private boolean isThis(ExpressionTree expression) { ExpressionTree expressionNoParenthesis = ExpressionUtils.skipParentheses(expression); if (expressionNoParenthesis.is(Tree.Kind.IDENTIFIER)) { String targetName = ((IdentifierTree) expressionNoParenthesis).name(); return "this".equals(targetName); } return false; }
Source:
<code>public static <T> T invokePrivileged(final Method method, final Object instance, final Object... args) { Assert.requireNonNull(method, "method"); Assert.requireNonNull(instance, "instance"); return AccessController.doPrivileged((PrivilegedAction<T>) new PrivilegedAction<Object>() { @Override public Object run() { <START> boolean wasAccessible = method.isAccessible(); <END> try { method.setAccessible(true); return method.invoke(instance, args); } catch (InvocationTargetException ex) { throw new DolphinRuntimeException("Error while calling method '" + method.getName() + "' on instance of type '" + instance.getClass() + "'. Method details: " + method.toGenericString(), ex); } catch (IllegalAccessException ex) { throw new DolphinRuntimeException("Cannot invoke method '" + method.getName() + "' on instance of type '" + instance.getClass() + "'. Method details: " + method.toGenericString(), ex); } finally { method.setAccessible(wasAccessible); } } }); }</code><technical_language>Add final keyword</technical_language>

Target:
public static <T> T invokePrivileged(final Method method, final Object instance, final Object... args) { Assert.requireNonNull(method, "method"); Assert.requireNonNull(instance, "instance"); return AccessController.doPrivileged((PrivilegedAction<T>) new PrivilegedAction<Object>() { @Override public Object run() { final boolean wasAccessible = method.isAccessible(); try { method.setAccessible(true); return method.invoke(instance, args); } catch (final InvocationTargetException ex) { throw new DolphinRuntimeException("Error while calling method '" + method.getName() + "' on instance of type '" + instance.getClass() + "'. Method details: " + method.toGenericString(), ex); } catch (final IllegalAccessException ex) { throw new DolphinRuntimeException("Cannot invoke method '" + method.getName() + "' on instance of type '" + instance.getClass() + "'. Method details: " + method.toGenericString(), ex); } finally { method.setAccessible(wasAccessible); } } }); }
Source:
<code>public String getReplicationId() { HashMap<String, String> dict = new HashMap<String, String>(); try { dict.put("source", this.sourceDb.getIdentifier()); } catch (DatastoreException e){ logger.log(Level.WARNING,"Failed to get ID using default",e); dict.put("source","touchdb_defaultUUID"); <START> } <END> dict.put("target", this.targetDb.getIdentifier()); byte[] sha1Bytes = Misc.getSha1(new ByteArrayInputStream(JSONUtils.serializeAsBytes(dict))); byte[] sha1Hex = new Hex().encode(sha1Bytes); return new String(sha1Hex); }</code><technical_language>Again, silently swallowing this a Bad Idea</technical_language>

Target:
public String getReplicationId() throws DatastoreException { HashMap<String, String> dict = new HashMap<String, String>(); dict.put("source", this.sourceDb.getIdentifier()); dict.put("target", this.targetDb.getIdentifier()); byte[] sha1Bytes = Misc.getSha1(new ByteArrayInputStream(JSONUtils.serializeAsBytes(dict))); byte[] sha1Hex = new Hex().encode(sha1Bytes); return new String(sha1Hex); }
Source:
<code><START> public static IConnector[] getActiveConnectors() { <END> final List<IConnector> activeConnectors = new ArrayList<>(); for (final IConnector conn : CONNECTORS) { if (conn.isActive()) { activeConnectors.add(conn); } } return activeConnectors.toArray(new IConnector[activeConnectors.size()]); }</code><technical_language>return List<IConnector></technical_language>

Target:
public static List<IConnector> getActiveConnectors() { final List<IConnector> activeConnectors = new ArrayList<>(); for (final IConnector conn : CONNECTORS) { if (conn.isActive()) { activeConnectors.add(conn); } } return activeConnectors; }
Source:
<code>public void testMODSGetsUpdated() throws Exception { populateFedora("uuid:ae0091e0-192d-46f9-a8ad-8b0dc82f33ad"); InputStream originalMods = workObj.getMODS().getBinaryStream(); assertModsNotUpdated(originalMods); importFile = createTempImportFile("src/test/resources/mods/update-work-mods.xml"); createJob(); job.run(); verify(mailSender).send(any(MimeMessage.class)); <START> InputStream updatedMods = objLoader.getWorkObject(workObj.getPid()).getMODS().getBinaryStream(); <END> assertModsUpdated(updatedMods); }</code><technical_language>wondering, if called workObj.getMODS() reflect updated MODS? I caching that</technical_language>

Target:
public void testMODSGetsUpdated() throws Exception { populateFedora("uuid:ae0091e0-192d-46f9-a8ad-8b0dc82f33ad"); InputStream originalMods = workObj.getMODS().getBinaryStream(); assertModsNotUpdated(originalMods); importFile = createTempImportFile("src/test/resources/mods/update-work-mods.xml"); createJob(); job.run(); verify(mailSender).send(any(MimeMessage.class)); InputStream updatedMods = workObj.getMODS().getBinaryStream(); assertModsUpdated(updatedMods); }
Source:
<code><START> public void prepareRun(BatchSinkContext context) throws InstantiationException, IOException { <END> FailureCollector collector = context.getFailureCollector(); config.validate(collector); ValidatingOutputFormat validatingOutputFormat = context.newPluginInstance(FORMAT_PLUGIN_ID); FileFormat fileFormat = config.getFormat(); FormatContext formatContext = new FormatContext(collector, context.getInputSchema()); validateOutputFormatProvider(formatContext, fileFormat, validatingOutputFormat); collector.getOrThrowException(); Schema schema = config.getSchema(); if (schema == null) { schema = context.getInputSchema(); } LineageRecorder lineageRecorder = new LineageRecorder(context, config.getReferenceName()); lineageRecorder.createExternalDataset(schema); if (schema != null && schema.getFields() != null && !schema.getFields().isEmpty()) { recordLineage(lineageRecorder, schema.getFields().stream().map(Schema.Field::getName).collect(Collectors.toList())); } Map<String, String> outputProperties = new HashMap<>(validatingOutputFormat.getOutputFormatConfiguration()); outputProperties.putAll(getFileSystemProperties(context)); outputProperties.put(FileOutputFormat.OUTDIR, getOutputDir(context.getLogicalStartTime())); context.addOutput(Output.of(config.getReferenceName(), new SinkOutputFormatProvider(validatingOutputFormat.getOutputFormatClassName(), outputProperties))); }</code><technical_language>change this Exception, in case other sinks in future throw other types of exceptions</technical_language>

Target:
public void prepareRun(BatchSinkContext context) throws Exception { FailureCollector collector = context.getFailureCollector(); config.validate(collector); ValidatingOutputFormat validatingOutputFormat = context.newPluginInstance(FORMAT_PLUGIN_ID); FileFormat fileFormat = config.getFormat(); FormatContext formatContext = new FormatContext(collector, context.getInputSchema()); validateOutputFormatProvider(formatContext, fileFormat, validatingOutputFormat); collector.getOrThrowException(); Schema schema = config.getSchema(); if (schema == null) { schema = context.getInputSchema(); } LineageRecorder lineageRecorder = new LineageRecorder(context, config.getReferenceName()); lineageRecorder.createExternalDataset(schema); if (schema != null && schema.getFields() != null && !schema.getFields().isEmpty()) { recordLineage(lineageRecorder, schema.getFields().stream().map(Schema.Field::getName).collect(Collectors.toList())); } Map<String, String> outputProperties = new HashMap<>(validatingOutputFormat.getOutputFormatConfiguration()); outputProperties.putAll(getFileSystemProperties(context)); outputProperties.put(FileOutputFormat.OUTDIR, getOutputDir(context.getLogicalStartTime())); context.addOutput(Output.of(config.getReferenceName(), new SinkOutputFormatProvider(validatingOutputFormat.getOutputFormatClassName(), outputProperties))); }
Source:
<code>public boolean apply(Game game, Ability source) { Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source)); Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (targetPlayer == null || controller == null || sourceObject == null) { <START> return true; <END> } String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); Cards hand = targetPlayer.getHand().copy(); targetPlayer.revealCards(source, hand, game); hand.removeIf(uuid -> { Card card = hand.get(uuid, game); if (card == null) { return true; } if (card.isSplitCard()) { SplitCard splitCard = (SplitCard) card; if (CardUtil.haveSameNames(splitCard.getLeftHalfCard().getName(), cardName)) { return false; } else if (CardUtil.haveSameNames(splitCard.getRightHalfCard().getName(), cardName)) { return false; } } if (CardUtil.haveSameNames(card.getName(), cardName)) { return false; } return true; }); targetPlayer.discard(hand, source, game); return true; }</code><technical_language>return false broken/non-applied effect</technical_language>

Target:
public boolean apply(Game game, Ability source) { Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source)); Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (targetPlayer == null || controller == null || sourceObject == null) { return false; } String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); Cards hand = targetPlayer.getHand().copy(); targetPlayer.revealCards(source, hand, game); hand.removeIf(uuid -> { Card card = hand.get(uuid, game); if (card == null) { return true; } if (card.isSplitCard()) { SplitCard splitCard = (SplitCard) card; if (CardUtil.haveSameNames(splitCard.getLeftHalfCard().getName(), cardName)) { return false; } else if (CardUtil.haveSameNames(splitCard.getRightHalfCard().getName(), cardName)) { return false; } } if (CardUtil.haveSameNames(card.getName(), cardName)) { return false; } return true; }); targetPlayer.discard(hand, source, game); return true; }
Source:
<code>protected static boolean moveFrom(String oldLocation, String newLocation, boolean force) throws InvalidReferenceException { File newFile = new File(ReferenceManager.instance().DeriveReference(newLocation).getLocalURI()); File oldFile = new File(ReferenceManager.instance().DeriveReference(oldLocation).getLocalURI()); if (!oldFile.exists()) { return newFile.exists(); } if (oldFile.exists() && newFile.exists()) { if (force) { if (!newFile.delete()) { return false; } else { } } else { return false; } } <START> boolean suceess = oldFile.renameTo(newFile); <END> if (suceess && oldFile.exists()) { Logger.log(LogTypes.SOFT_ASSERT, "Old File exists after rename"); } if (suceess && newFile.exists()) { Logger.log(LogTypes.SOFT_ASSERT, "New File doesn't exist after rename"); } return suceess; }</code><technical_language>suceess --> success</technical_language>

Target:
protected static boolean moveFrom(String oldLocation, String newLocation, boolean force) throws InvalidReferenceException { File newFile = new File(ReferenceManager.instance().DeriveReference(newLocation).getLocalURI()); File oldFile = new File(ReferenceManager.instance().DeriveReference(oldLocation).getLocalURI()); if (!oldFile.exists()) { return newFile.exists(); } if (oldFile.exists() && newFile.exists()) { if (force) { if (!newFile.delete()) { return false; } else { } } else { return false; } } boolean success = oldFile.renameTo(newFile); if (success && oldFile.exists()) { Logger.log(LogTypes.SOFT_ASSERT, "Old File exists after rename"); } if (success && !newFile.exists()) { Logger.log(LogTypes.SOFT_ASSERT, "New File doesn't exist after rename"); } return success; }
Source:
<code>NodeCursorResourceIterator( NodeLabelIndexCursor cursor, Statement statement ) { this.cursor = cursor; this.statement = statement; <START> next = -2L; <END> }</code><technical_language>UNINITIALIZED</technical_language>

Target:
NodeCursorResourceIterator( NodeLabelIndexCursor cursor, Statement statement ) { this.cursor = cursor; this.statement = statement; this.next = NOT_INITIALIZED; }
Source:
<code>public void testSequencerCacheEvict2() { SequencerServerCache cache = new SequencerServerCache(cacheSize, Address.NOT_FOUND); long address = 0; HashMap<ConflictTxStream, Long> recordMap = new HashMap<>(); while (cache.size() < cacheSize) { for (int j = 0; j < entryPerAddress; j++) { generateData(recordMap, cache, address++, false); } } verifyData(recordMap, cache); assertThat(cache.size() == cacheSize); for (int i = 0; i < iterations; i++, address++) { generateData(recordMap, cache, address, true); } verifyData(recordMap, cache); log.info("cacheSize cacheByteSize cacheEntriesBytes ", cache.size(), cache.byteSize(), cache.byteSize()); long entrySize = cache.byteSize() / cache.size(); cache.invalidateUpTo(address - numRemains); assertThat(cache.size() == numRemains); <START> assertThat(entrySize == cache.byteSize() / cache.size()); <END> log.info("cacheSize cacheByteSize cacheEntriesBytes ", cache.size(), cache.byteSize(), cache.byteSize()); cache.invalidateUpTo(address); assertThat(cache.size() == 0); }</code><technical_language>FYI, I experiment assertThat assertThat assert parameter is true</technical_language>

Target:
public void testSequencerCacheEvict2() { SequencerServerCache cache = new SequencerServerCache(cacheSize, Address.NOT_FOUND); long address = 0; HashMap<ConflictTxStream, Long> recordMap = new HashMap<>(); while (cache.size() < cacheSize) { for (int j = 0; j < entryPerAddress; j++) { generateData(recordMap, cache, address++, false); } } verifyData(recordMap, cache); assertThat(cache.size()).isEqualTo(cacheSize); for (int i = 0; i < iterations; i++, address++) { generateData(recordMap, cache, address, true); } verifyData(recordMap, cache); log.info("cacheSize cacheByteSize cacheEntriesBytes ", cache.size(), cache.byteSize(), cache.byteSize()); long entrySize = cache.byteSize() / cache.size(); cache.invalidateUpTo(address - numRemains); assertThat(cache.size()).isEqualTo(numRemains); assertThat(entrySize).isEqualTo(cache.byteSize() / cache.size()); log.info("cacheSize cacheByteSize cacheEntriesBytes ", cache.size(), cache.byteSize(), cache.byteSize()); cache.invalidateUpTo(address); assertThat(cache.size()).isZero(); }
Source:
<code>protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.activity_snooze); <START> setTitle("Later"); <END> notificationId = getIntent().getIntExtra(NOTIFICATION_ID_KEY, -1); pushNotificationId = getIntent().getIntExtra(PUSH_NOTIFICATION_ID_KEY, -1); ListView list = (ListView)findViewById(R.id.snooze_list); list.setAdapter(new SnoozeAdapter(this)); list.setOnItemClickListener(this); }</code><technical_language>put "Later" in strings.xml</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.activity_snooze); setTitle(R.string.later_title); notificationId = getIntent().getIntExtra(NOTIFICATION_ID_KEY, -1); pushNotificationId = getIntent().getIntExtra(PUSH_NOTIFICATION_ID_KEY, -1); ListView list = (ListView)findViewById(R.id.snooze_list); list.setAdapter(new SnoozeAdapter(this)); list.setOnItemClickListener(this); }
Source:
<code>private static Field[] getFields(Class<?> recordClass, boolean excludeJava) { Field[] fieldsList; Map<String, Field> fields = new LinkedHashMap<>(); Class<?> c = recordClass; do { if (excludeJava && c.getPackage() != null && c.getPackage().getName().startsWith("java.")) break; Field[] declaredFields = c.getDeclaredFields(); <START> Arrays.sort(declaredFields, new Comparator<Field>() { <END> @Override public int compare(Field o1, Field o2) { return o1.getName().compareTo(o2.getName()); } }); for (Field field : declaredFields) if ((field.getModifiers() & (Modifier.TRANSIENT | Modifier.STATIC)) == 0) if (fields.put(field.getName(), field) != null) throw new AvroTypeException(c + " contains two fields named: " + field); c = c.getSuperclass(); } while (c != null); fieldsList = fields.values().toArray(new Field[0]); return fieldsList; }</code><technical_language>shorthand: suggestion Arrays.sort(declaredFields, Comparator.comparing(Field::getName));</technical_language>

Target:
private static Field[] getFields(Class<?> recordClass, boolean excludeJava) { Field[] fieldsList; Map<String, Field> fields = new LinkedHashMap<>(); Class<?> c = recordClass; do { if (excludeJava && c.getPackage() != null && c.getPackage().getName().startsWith("java.")) break; Field[] declaredFields = c.getDeclaredFields(); Arrays.sort(declaredFields, Comparator.comparing(Field::getName)); for (Field field : declaredFields) if ((field.getModifiers() & (Modifier.TRANSIENT | Modifier.STATIC)) == 0) if (fields.put(field.getName(), field) != null) throw new AvroTypeException(c + " contains two fields named: " + field); c = c.getSuperclass(); } while (c != null); fieldsList = fields.values().toArray(new Field[0]); return fieldsList; }
Source:
<code>private void killOpportunisticContainers(Container container) { <START> List<Container> extraOpportContainersToKill = <END> pickOpportunisticContainersToKill(container.getContainerId()); for (Container contToKill : extraOpportContainersToKill) { contToKill.sendKillEvent( ContainerExitStatus.KILLED_BY_CONTAINER_SCHEDULER, "Container Killed to make room for Guaranteed Container."); oppContainersMarkedForKill.put(contToKill.getContainerId(), contToKill); LOG.info( "Opportunistic container will be killed in order to start the " + "execution of guaranteed container {}.", contToKill.getContainerId(), container.getContainerId()); } }</code><technical_language>is this extra? is base</technical_language>

Target:
private void killOpportunisticContainers(Container container) { List<Container> extraOpportContainersToKill = pickOpportunisticContainersToKill(container.getContainerId()); for (Container contToKill : extraOpportContainersToKill) { contToKill.sendKillEvent( ContainerExitStatus.KILLED_BY_CONTAINER_SCHEDULER, "Container Killed to make room for Guaranteed Container."); oppContainersToKill.put(contToKill.getContainerId(), contToKill); LOG.info( "Opportunistic container will be killed in order to start the " + "execution of guaranteed container {}.", contToKill.getContainerId(), container.getContainerId()); } }
Source:
<code>private int chooseOption(int[] optionProbs) { int sum = 0; for (int opt : optionProbs) sum += opt; <START> double rand = new Random().nextDouble() * sum; END> sum = 0; for (int i = 0; i < optionProbs.length; i++) { sum += optionProbs[i]; if (rand <= sum) return i; } return optionProbs.length - 1; }</code><technical_language>bad form create a new random object for number. a private instance variable</technical_language>

Target:
private int chooseOption(int[] optionProbs) { int sum = 0; for (int opt : optionProbs) sum += opt; double rand = random.nextDouble() * sum; sum = 0; for (int i = 0; i < optionProbs.length; i++) { sum += optionProbs[i]; if (rand <= sum) return i; } return optionProbs.length - 1; }
Source:
<code>public FieldDeclarationTree CLASS_FIELD_INITIALIZER() { return b.<FieldDeclarationTree>nonterminal() .is(f.fieldDeclaration( b.optional(b.token(JavaScriptLegacyGrammar.STATIC)), PROPERTY_NAME(), <START> b.optional(f.newTuple58(b.token(JavaScriptPunctuator.EQU), ASSIGNMENT_EXPRESSION())), <END> b.token(JavaScriptPunctuator.SEMI))); }</code><technical_language>@vilchik-elena "static" is a reserved word in JavaScript. prevent definition of a class property static static = 1; implementation currently allows? BTW, instruction, of a class, is currently accepted parser. be</technical_language>

Target:
public FieldDeclarationTree CLASS_FIELD_INITIALIZER() { return b.<FieldDeclarationTree>nonterminal() .is(f.fieldDeclaration( b.optional(b.token(JavaScriptLegacyGrammar.STATIC)), PROPERTY_NAME(), b.optional(f.newTuple58(b.token(JavaScriptPunctuator.EQU), ASSIGNMENT_EXPRESSION())), b.token(JavaScriptLegacyGrammar.EOS))); }
Source:
<code>private void populateIdpList(List<IdpConfig> providers) { mIdpProviders = new ArrayList<>(); for (IdpConfig idpConfig : providers) { switch (idpConfig.getProviderId()) { case AuthUI.GOOGLE_PROVIDER: mIdpProviders.add(new GoogleProvider(this, idpConfig)); break; case AuthUI.FACEBOOK_PROVIDER: mIdpProviders.add(new FacebookProvider( this, idpConfig, mActivityHelper.getFlowParams().themeId)); break; case AuthUI.TWITTER_PROVIDER: mIdpProviders.add(new TwitterProvider(this)); break; case AuthUI.EMAIL_PROVIDER: findViewById(R.id.email_provider).setVisibility(View.VISIBLE); break; default: Log.e(TAG, "Encountered unknown IDPProvider parcel with type: " + idpConfig.getProviderId()); } } ViewGroup btnHolder = (ViewGroup) findViewById(R.id.btn_holder); for (final IdpProvider provider : mIdpProviders) { View loginButton = null; switch (provider.getProviderId()) { case GoogleAuthProvider.PROVIDER_ID: loginButton = getLayoutInflater() .inflate(R.layout.idp_button_google, btnHolder, false); break; case FacebookAuthProvider.PROVIDER_ID: loginButton = getLayoutInflater() .inflate(R.layout.idp_button_facebook, btnHolder, false); break; case TwitterAuthProvider.PROVIDER_ID: loginButton = getLayoutInflater() .inflate(R.layout.idp_button_twitter, btnHolder, false); break; default: Log.e(TAG, "No button for provider " + provider.getProviderId()); } if (loginButton != null) { loginButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mActivityHelper.showLoadingDialog(R.string.progress_dialog_loading); provider.startLogin(AuthMethodPickerActivity.this); } }); provider.setAuthenticationCallback(this); <START> btnHolder.addView(loginButton, btnHolder.getChildCount() - 1); <END> } } }</code><technical_language>If a deprecated version of behavior I agree, fully respect order provide</technical_language>

Target:
private void populateIdpList(List<IdpConfig> providers) { mProviders = new ArrayList<>(); for (IdpConfig idpConfig : providers) { switch (idpConfig.getProviderId()) { case AuthUI.GOOGLE_PROVIDER: mProviders.add(new GoogleProvider(this, idpConfig)); break; case AuthUI.FACEBOOK_PROVIDER: mProviders.add(new FacebookProvider( this, idpConfig, mActivityHelper.getFlowParams().themeId)); break; case AuthUI.TWITTER_PROVIDER: mProviders.add(new TwitterProvider(this)); break; case AuthUI.EMAIL_PROVIDER: mProviders.add(new EmailProvider(this, mActivityHelper)); break; default: Log.e(TAG, "Encountered unknown provider parcel with type: " + idpConfig.getProviderId()); } } ViewGroup btnHolder = (ViewGroup) findViewById(R.id.btn_holder); for (final Provider provider : mProviders) { View loginButton = getLayoutInflater() .inflate(provider.getButtonLayout(), btnHolder, false); loginButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (provider instanceof IdpProvider) { mActivityHelper.showLoadingDialog(R.string.progress_dialog_loading); } provider.startLogin(AuthMethodPickerActivity.this); } }); if (provider instanceof IdpProvider) { ((IdpProvider) provider).setAuthenticationCallback(this); } btnHolder.addView(loginButton); } }
Source:
<code>public void setUp() { super.setUp(); <START> testStreamAppName = String.format("test-app-name-%s", UUID.randomUUID().toString()); <END> testStreamAppId = String.format("test-app-id-%s", UUID.randomUUID().toString()); inputKafkaTopic = String.format("test-input-topic-%s", UUID.randomUUID().toString()); outputKafkaTopic = String.format("test-output-topic-%s", UUID.randomUUID().toString()); for (String kafkaTopic : ImmutableList.of(inputKafkaTopic, outputKafkaTopic)) { LOGGER.info("Creating kafka topic: {}.", kafkaTopic); TestUtils.createTopic(zkUtils(), kafkaTopic, 5, 1, servers(), new Properties()); } }</code><technical_language>generate random ID for related</technical_language>

Target:
public void setUp() { super.setUp(); String uniqueTestId = UUID.randomUUID().toString(); String testStreamAppName = String.format("test-app-name-%s", uniqueTestId); String testStreamAppId = String.format("test-app-id-%s", uniqueTestId); inputKafkaTopic = String.format("test-input-topic-%s", uniqueTestId); outputKafkaTopic = String.format("test-output-topic-%s", uniqueTestId); ZkClient zkClient = new ZkClient(zkConnect()); ZkKeyBuilder zkKeyBuilder = new ZkKeyBuilder(String.format("app-%s-%s", testStreamAppName, testStreamAppId)); zkJobCoordinatorMetrics = new ZkJobCoordinatorMetrics(new NoOpMetricsRegistry()); zkUtils = new ZkUtils(zkKeyBuilder, zkClient, ZK_CONNECTION_TIMEOUT_MS, zkJobCoordinatorMetrics); zkUtils.connect(); applicationConfig1 = buildStreamApplicationConfig(TEST_SYSTEM, inputKafkaTopic, PROCESSOR_IDS[0], testStreamAppName, testStreamAppId); applicationConfig2 = buildStreamApplicationConfig(TEST_SYSTEM, inputKafkaTopic, PROCESSOR_IDS[1], testStreamAppName, testStreamAppId); applicationConfig3 = buildStreamApplicationConfig(TEST_SYSTEM, inputKafkaTopic, PROCESSOR_IDS[2], testStreamAppName, testStreamAppId); applicationRunner1 = new LocalApplicationRunner(applicationConfig1); applicationRunner2 = new LocalApplicationRunner(applicationConfig2); applicationRunner3 = new LocalApplicationRunner(applicationConfig3); for (String kafkaTopic : ImmutableList.of(inputKafkaTopic, outputKafkaTopic)) { LOGGER.info("Creating kafka topic: {}.", kafkaTopic); TestUtils.createTopic(zkUtils(), kafkaTopic, 5, 1, servers(), new Properties()); } }
Source:
<code>private Object aggregate(ParameterContext parameterContext, ExtensionContext extensionContext) { Parameter parameter = parameterContext.getParameter(); Optional<AggregateWith> annotation = AnnotationUtils.findAnnotation(parameter, AggregateWith.class); ArgumentsAccessor accessor = new DefaultArgumentsAccessor(arguments); return annotation.map(AggregateWith::value) .map(clazz -> ReflectionUtils.newInstance(clazz)) <START> .map(aggregator -> aggregator.aggregateArguments(accessor,parameterContext)) <END> .orElse(accessor); }</code><technical_language>This needs exception handling analogous in convert() method</technical_language>

Target:
private Object aggregate(ParameterContext parameterContext, ExtensionContext extensionContext) { Parameter parameter = parameterContext.getParameter(); Optional<AggregateWith> annotation = AnnotationUtils.findAnnotation(parameter, AggregateWith.class); ArgumentsAccessor accessor = new DefaultArgumentsAccessor(arguments); try { return annotation.map(AggregateWith::value) .map(clazz -> ReflectionUtils.newInstance(clazz)) .map(aggregator -> aggregator.aggregateArguments(accessor, parameterContext)) .orElse(accessor); } catch (Exception ex) { throw new ParameterResolutionException( "Error aggregating parameter at index " + parameterContext.getIndex(), ex); } }
Source:
<code>private String buildLongMessage() { StringBuilder sb = new StringBuilder(ConcurConstants.VALIDATION_RESULT_MESSAGE_MAX_LENGTH); for (int i = 0; i<ConcurConstants.VALIDATION_RESULT_MESSAGE_MAX_LENGTH; i++) { sb.append("A"); } <START> return sb.toString(); <END> }</code><technical_language>repeating build long string, simplify this calling StringUtils.repeat() instead</technical_language>

Target:
private String buildLongMessage() { return StringUtils.repeat("A", ConcurConstants.VALIDATION_RESULT_MESSAGE_MAX_LENGTH); }
Source:
<code><START> @Test public void runner_can_coexists_with_rule() { <END> Result result = runner.run(WithJUnitRule.class); JUnitResultAssert.assertThat(result).isSuccessful(); }</code><technical_language>I a opinion this. I mockito fail here. dev unintended is easy fix</technical_language>

Target:
@Test public void runner_can_coexists_with_rule() { Result result = runner.run(RunnerAndRule.class); JUnitResultAssert.assertThat(result).fails(1, UnnecessaryStubbingException.class); }
Source:
<code><START> List<Cluster> computeClusters(List<Cluster> clusters) <END> { Cluster current = new Cluster(); long prevSendTime = -1; long prevRecvTime = -1; for(Probe probe : probes_) { if(prevSendTime >= 0) { long sendDeltaMs = probe.sendTimeMs - prevSendTime; long recvDeltaMs = probe.recvTimeMs - prevRecvTime; if(sendDeltaMs >= 1 && recvDeltaMs >= 1) { ++current.numAboveMinDelta; } if(!IsWithinClusterBounds(sendDeltaMs,current)) { if(current.count >= kMinClusterSize) { clusters = addCluster(clusters,current); } current = new Cluster(); } current.sendMeanMs += sendDeltaMs; current.recvMeanMs += recvDeltaMs; current.meanSize += probe.payloadSize; ++current.count; } prevSendTime = probe.sendTimeMs; prevRecvTime = probe.recvTimeMs; } if(current.count >= kMinClusterSize) clusters = addCluster(clusters, current); return clusters; }</code><technical_language>necessary change this return a list</technical_language>

Target:
private void computeClusters(List<Cluster> clusters) { Cluster current = new Cluster(); long prevSendTime = -1; long prevRecvTime = -1; for(Probe probe : probes_) { if(prevSendTime >= 0) { long sendDeltaMs = probe.sendTimeMs - prevSendTime; long recvDeltaMs = probe.recvTimeMs - prevRecvTime; if(sendDeltaMs >= 1 && recvDeltaMs >= 1) { ++current.numAboveMinDelta; } if(!IsWithinClusterBounds(sendDeltaMs,current)) { if(current.count >= kMinClusterSize) { addCluster(clusters,current); } current = new Cluster(); } current.sendMeanMs += sendDeltaMs; current.recvMeanMs += recvDeltaMs; current.meanSize += probe.payloadSize; ++current.count; } prevSendTime = probe.sendTimeMs; prevRecvTime = probe.recvTimeMs; } if(current.count >= kMinClusterSize) addCluster(clusters, current); }
Source:
<code>public StudentAttributes getStudentForRegistrationKey(String registrationKey) { Assumption.assertNotNull(Const.StatusCodes.DBLEVEL_NULL_INPUT, registrationKey); try { String originalKey = StringHelper.decrypt(registrationKey.trim()); CourseStudent courseStudent = getCourseStudentEntityForRegistrationKey(originalKey); if (courseStudent == null) { return null; } return new StudentAttributes(courseStudent); } catch (Exception e) { <START> Assumption.fail("Exception thrown trying to retrieve CourseStudent \n" <END> + TeammatesException.toStringWithStackTrace(e)); return null; } }</code><technical_language>Yes, I remember proposed workaround. I figured out handle case now. (the obvious is decrypt "next URL" practically invalidate URLs now)</technical_language>

Target:
public StudentAttributes getStudentForRegistrationKey(String registrationKey) { Assumption.assertNotNull(Const.StatusCodes.DBLEVEL_NULL_INPUT, registrationKey); try { String originalKey = StringHelper.decrypt(registrationKey.trim()); CourseStudent courseStudent = getCourseStudentEntityForRegistrationKey(originalKey); if (courseStudent == null) { return null; } return new StudentAttributes(courseStudent); } catch (Exception e) { log.severe("Exception thrown trying to retrieve CourseStudent \n" + TeammatesException.toStringWithStackTrace(e)); return null; } }
Source:
<code>public Map<String, String> getJobMessageProperties() { <START> if (jobProperties == null) { <END> jobProperties.put(VdcObjectType.VmTemplate.name().toLowerCase(), (getVmTemplateName() == null) ? "" : getVmTemplateName()); } return jobProperties; }</code><technical_language>this fail - initialize jobProperties first...</technical_language>

Target:
public Map<String, String> getJobMessageProperties() { if (jobProperties == null) { jobProperties = new HashMap<String, String>(); jobProperties.put(VdcObjectType.VmTemplate.name().toLowerCase(), (getVmTemplateName() == null) ? "" : getVmTemplateName()); } return jobProperties; }
Source:
<code>Mono<Response<KeyVaultKey>> createEcKeyWithResponse(CreateEcKeyOptions createEcKeyOptions, Context context) { <START> Objects.requireNonNull(createEcKeyOptions, "The Ec key options options cannot be null."); <END> KeyRequestParameters parameters = new KeyRequestParameters() .setKty(createEcKeyOptions.getKeyType()) .setCurve(createEcKeyOptions.getCurve()) .setKeyOps(createEcKeyOptions.getKeyOperations()) .setKeyAttributes(new KeyRequestAttributes(createEcKeyOptions)); return service.createKey(endpoint, createEcKeyOptions.getName(), API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Creating Ec key - {}", createEcKeyOptions.getName())) .doOnSuccess(response -> logger.info("Created Ec key - {}", response.getValue().getName())) .doOnError(error -> logger.warning("Failed to create Ec key - {}", createEcKeyOptions.getName(), error)); }</code><technical_language>options word</technical_language>

Target:
Mono<Response<KeyVaultKey>> createEcKeyWithResponse(CreateEcKeyOptions createEcKeyOptions, Context context) { Objects.requireNonNull(createEcKeyOptions, "The Ec key options cannot be null."); KeyRequestParameters parameters = new KeyRequestParameters() .setKty(createEcKeyOptions.getKeyType()) .setCurve(createEcKeyOptions.getCurveName()) .setKeyOps(createEcKeyOptions.getKeyOperations()) .setKeyAttributes(new KeyRequestAttributes(createEcKeyOptions)); return service.createKey(vaultUrl, createEcKeyOptions.getName(), API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Creating Ec key - {}", createEcKeyOptions.getName())) .doOnSuccess(response -> logger.info("Created Ec key - {}", response.getValue().getName())) .doOnError(error -> logger.warning("Failed to create Ec key - {}", createEcKeyOptions.getName(), error)); }
Source:
<code>private void createReviewedPanel(){ reviewedPanel = new FlowPanel(); reviewedCheckBox = new CheckBox(PatchUtil.C.reviewed() + " "); reviewedCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() { @Override public void onValueChange(ValueChangeEvent<Boolean> event) { setReviewedByCurrentUser(event.getValue()); } }); <START> Anchor reviewedAnchor = new Anchor(PatchUtil.C.andContinue()); <END> reviewedAnchor.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { setReviewedByCurrentUser(true); } }); final PatchValidator unreviewedValidator = new PatchValidator() { public boolean isValid(Patch patch) { return !patch.isReviewedByCurrentUser(); } }; int nextUnreviewedPatchIndex = patchSetDetail.getNextPatch(patchIndex, true, unreviewedValidator, fileList.PREFERENCE_VALIDATOR); if (nextUnreviewedPatchIndex > -1) { final PatchLink reviewedLink = fileList.createLink(nextUnreviewedPatchIndex, getPatchScreenType(), null, null); reviewedLink.setText(""); reviewedAnchor.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { reviewedLink.go(); } }); } else { final ChangeLink upLink = new ChangeLink("", patchKey.getParentKey()); reviewedAnchor.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { upLink.go(); } }); } reviewedPanel.add(reviewedCheckBox); reviewedPanel.add(reviewedAnchor); }</code><technical_language>nit: include arrow icon, end of next file name link catch eye better, this sense too</technical_language>

Target:
private void createReviewedPanel(){ reviewedPanel = new FlowPanel(); reviewedCheckBox = new CheckBox(PatchUtil.C.reviewed() + " & "); reviewedCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() { @Override public void onValueChange(ValueChangeEvent<Boolean> event) { setReviewedByCurrentUser(event.getValue()); } }); reviewedPanel.add(reviewedCheckBox); reviewedPanel.add(getReviewedAnchor()); }
Source:
<code>public Mono<CosmosDatabaseResponse> createDatabase(CosmosDatabaseProperties databaseProperties, CosmosDatabaseRequestOptions options) { if (options == null) { options = new CosmosDatabaseRequestOptions(); } Database wrappedDatabase = new Database(); wrappedDatabase.setId(databaseProperties.getId()); <START> final CosmosDatabaseRequestOptions requestOptions = options; <END> return withContext(context -> createDatabaseInternal(wrappedDatabase, requestOptions, context)); }</code><technical_language>a code style perspective, do lines 255-257 260 a single line: final CosmosDatabaseRequestOptions requestOptions = options == null ? new CosmosDatabaseRequestOptions() : options;</technical_language>

Target:
public Mono<CosmosDatabaseResponse> createDatabase(CosmosDatabaseProperties databaseProperties, CosmosDatabaseRequestOptions options) { final CosmosDatabaseRequestOptions requestOptions = options == null ? new CosmosDatabaseRequestOptions() : options; Database wrappedDatabase = new Database(); wrappedDatabase.setId(databaseProperties.getId()); return withContext(context -> createDatabaseInternal(wrappedDatabase, requestOptions, context)); }
Source:
<code>public int hashCode() { int bits = 1; bits = 31 * bits + this.minx; bits = 31 * bits + this.miny; bits = 31 * bits + this.minz; bits = 31 * bits + this.maxx; bits = 31 * bits + this.maxy; bits = 31 * bits + this.maxz; <START> return bits; <END> }</code><technical_language>b ^ (b >> 31) is missed here</technical_language>

Target:
public int hashCode() { int bits = 1; bits = 31 * bits + this.minx; bits = 31 * bits + this.miny; bits = 31 * bits + this.minz; bits = 31 * bits + this.maxx; bits = 31 * bits + this.maxy; bits = 31 * bits + this.maxz; return bits ^ (bits >> 31); }
Source:
<code>public void forEachTuple(ModelConsumer consumer, TupleTypeContext tupleTypeContext, EntityKeyMetadata entityKeyMetadata) { MongoDatabase db = provider.getDatabase(); <START> MongoCollection<Document> collection = db.getCollection( entityKeyMetadata.getTable() ); <END> consumer.consume( new MongoDBTuplesSupplier( collection, entityKeyMetadata ) ); }</code><technical_language>area applying withOption method in this case? applying anymore write read options, surprised test fails in of this</technical_language>

Target:
public void forEachTuple(ModelConsumer consumer, TupleTypeContext tupleTypeContext, EntityKeyMetadata entityKeyMetadata) { MongoCollection<Document> collection = getCollection( entityKeyMetadata.getTable(), tupleTypeContext.getOptionsContext() ); consumer.consume( new MongoDBTuplesSupplier( collection, entityKeyMetadata ) ); }
Source:
<code>String displayableValue(MarshallingMessage message) { if (StringUtils.nonEmpty(message.getMessageKey())) { final List<?> arguments = Optional.ofNullable(message.getMessageArguments()).orElse(Collections.emptyList()); String translation = <START> translationService.getValue(message.getMessageKey(), arguments.stream().toArray(Object[]::new)); <END> if (!erraiDefaultValue(message.getMessageKey()).equals(translation)) { return translation; } } return message.getMessage(); }</code><technical_language>good catch, arguments.toArray() instead</technical_language>

Target:
String displayableValue(MarshallingMessage message) { if (StringUtils.nonEmpty(message.getMessageKey())) { final List<?> arguments = Optional.ofNullable(message.getMessageArguments()).orElse(Collections.emptyList()); String translation = translationService.getValue(message.getMessageKey(), arguments.toArray(new Object[0])); if (!erraiDefaultValue(message.getMessageKey()).equals(translation)) { return translation; } } return message.getMessage(); }
Source:
<code>public void testMean() throws Exception { Byte byte10 = 10; Byte byte20 = 20; Byte byte30 = 30; Short short10 = 10; Short short20 = 20; Short short30 = 30; Long long10 = (long) 100000000; Long long20 = (long) 200000000; Long long30 = (long) 300000000; String string10 = "-10"; String string20 = "-20"; <START> String string30 = "-30.00"; <END> KnoxShellTable TABLE = new KnoxShellTable(); TABLE.header("Column Integer").header("Column Double").header("Column Float").header("Column Byte").header("Column Short").header("Column Long").header("Column String"); TABLE.row().value(10).value(20d).value(20.9999).value(byte10).value(short10).value(long10).value(string10); TABLE.row().value(30).value(40d).value(40.9999).value(byte20).value(short20).value(long20).value(string20); TABLE.row().value(27).value(60d).value(60.9999).value(byte30).value(short30).value(long30).value(string30); assertEquals(22.3, TABLE.mean("Column Integer"), 0.1); assertEquals(40, TABLE.mean("Column Double"), 0.1); assertEquals(22.3, TABLE.mean(0), 0.1); assertEquals(40, TABLE.mean(1), 0.1); assertEquals(40.9999, TABLE.mean("Column Float"), 0.1); assertEquals(40.9999, TABLE.mean(2), 0.1); assertEquals(20, TABLE.mean("Column Byte"), 0.1); assertEquals(20, TABLE.mean("Column Short"), 0.1); assertEquals(2.0E8, TABLE.mean("Column Long"), 0.1); assertEquals(-20, TABLE.mean("Column String"), 0.1); }</code><technical_language>Need test positives? do more digits. sense randomize this. Random multiply a double. for other values</technical_language>

Target:
public void testMean() throws Exception { Byte byte10 = 10; Byte byte20 = 20; Byte byte30 = 30; Short short10 = 10; Short short20 = 20; Short short30 = 30; Long long10 = (long) 100000000; Long long20 = (long) 200000000; Long long30 = (long) 300000000; String string10 = "1023.98000000000"; String string20 = "2089743.6"; String string30 = "-3"; KnoxShellTable TABLE = new KnoxShellTable(); TABLE.header("Column Integer").header("Column Double").header("Column Float").header("Column Byte").header("Column Short").header("Column Long").header("Column String"); TABLE.row().value(10).value(20d).value(20.9999).value(byte10).value(short10).value(long10).value(string10); TABLE.row().value(30).value(40d).value(40.9999).value(byte20).value(short20).value(long20).value(string20); TABLE.row().value(27).value(60d).value(60.9999).value(byte30).value(short30).value(long30).value(string30); assertEquals(22.3, TABLE.mean("Column Integer"), 0.1); assertEquals(40, TABLE.mean("Column Double"), 0.1); assertEquals(22.3, TABLE.mean(0), 0.1); assertEquals(40, TABLE.mean(1), 0.1); assertEquals(40.9999, TABLE.mean("Column Float"), 0.1); assertEquals(40.9999, TABLE.mean(2), 0.1); assertEquals(20, TABLE.mean("Column Byte"), 0.1); assertEquals(20, TABLE.mean("Column Short"), 0.1); assertEquals(2.0E8, TABLE.mean("Column Long"), 0.1); assertEquals(696921.52666666, TABLE.mean("Column String"), 0.1); }
Source:
<code>private Session createSession() { Cluster.Builder clusterBuilder = new Cluster.Builder(); clusterBuilder.addContactPoints(cassandraNodes.toArray(new String[]{})); if (useSSL) { <START> SSLOptions sslOptions; <END> try { String[] defaultCipherSuites = {"TLS_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_256_CBC_SHA"}; sslOptions = JdkSSLOptions.builder().withSSLContext(SSLContext.getDefault()) .withCipherSuites(defaultCipherSuites).build(); clusterBuilder.withSSL(sslOptions); } catch (NoSuchAlgorithmException e) { throw new RuntimeException("SSL support is required but is not available in the JVM.", e); } } clusterBuilder.withoutJMXReporting(); Cluster cluster = clusterBuilder.build(); cluster.init(); Session createdSession = null; try { createdSession = cluster.connect("system"); return createdSession; } finally { if (createdSession == null) { cluster.close(); } } }</code><technical_language>Logging exception useful here. currently fails for connection initialization, find out</technical_language>

Target:
private void createSession() { Cluster.Builder clusterBuilder = new Cluster.Builder(); clusterBuilder.addContactPoints(cassandraNodes.toArray(new String[]{})); if (useSSL) { SSLOptions sslOptions; try { String[] defaultCipherSuites = {"TLS_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_256_CBC_SHA"}; sslOptions = JdkSSLOptions.builder().withSSLContext(SSLContext.getDefault()) .withCipherSuites(defaultCipherSuites).build(); clusterBuilder.withSSL(sslOptions); } catch (NoSuchAlgorithmException e) { throw new RuntimeException("SSL support is required but is not available in the JVM.", e); } } clusterBuilder.withoutJMXReporting(); this.cluster = clusterBuilder.build(); this.cluster.init(); session = null; try { session = cluster.connect(this.keyspace); } finally { if (session == null) { cluster.close(); } } }
Source:
<code>public void testBlobNotFoundWithTwoBlobDeleted() throws Exception { ifServerRespond = true; initialize("9"); <START> ServerErrorCode[] serverErrorCodes = <END> {ServerErrorCode.Blob_Not_Found, ServerErrorCode.Blob_Not_Found, ServerErrorCode.Blob_Not_Found, ServerErrorCode.Blob_Not_Found, ServerErrorCode.Blob_Not_Found, ServerErrorCode.Blob_Deleted, ServerErrorCode.Blob_Not_Found, ServerErrorCode.Blob_Not_Found, ServerErrorCode.Blob_Deleted}; writeBlobRecordToServers(serverErrorCodes); future = router.deleteBlob(blobIdString, new ClientCallback()); try { future.get(); fail("Deletion should be unsuccessful. Error is expected."); } catch (Exception e) { assertEquals("RouterErrorCode should be BlobDeleted", RouterErrorCode.BlobDeleted, ((RouterException) e.getCause()).getErrorCode()); } assertCloseCleanup(); }</code><technical_language>here. need set explicitly for blob cases</technical_language>

Target:
public void testBlobNotFoundWithTwoBlobDeleted() throws Exception { ServerErrorCode[] serverErrorCodes = new ServerErrorCode[9]; Arrays.fill(serverErrorCodes, ServerErrorCode.IO_Error); serverErrorCodes[5] = ServerErrorCode.Blob_Deleted; serverErrorCodes[8] = ServerErrorCode.Blob_Deleted; presetServerErrorCode(serverErrorCodes); future = router.deleteBlob(blobIdString, new ClientCallback()); future.get(); }
Source:
<code>protected void send(String line) { Message<?> message = this.getMessageBuilderFactory().withPayload(line) .setHeader(FileHeaders.FILENAME, this.file.getName()) .setHeader(FileHeaders.ORIGINAL_FILE, this.file) .build(); super.sendMessage(message); <START> this.updateLastReceive(); <END> }</code><technical_language>Minor, prefer do this. prefix for methods:</technical_language>

Target:
protected void send(String line) { Message<?> message = this.getMessageBuilderFactory().withPayload(line) .setHeader(FileHeaders.FILENAME, this.file.getName()) .setHeader(FileHeaders.ORIGINAL_FILE, this.file) .build(); super.sendMessage(message); updateLastProduce(); }
Source:
<code><START> public void tearDown() throws Exception { <END> store.clear(); }</code><technical_language>junit5 instead thinking removing Junit4. is a in junit5 write nested tests <LINK_0></technical_language>

Target:
void tearDown() { store.clear(); }